From 884c0e845c39802d7e156426cc1173c0a5ffaa8d Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 22 May 2018 17:37:47 +0300 Subject: [PATCH 001/237] Added solc compiler bindings --- cbits/solidity_lite.cpp | 99 ++++++++++++++++++++ cbits/solidity_lite.h | 26 ++++++ src/Language/Solidity/Compiler.hs | 47 ++++++++++ src/Language/Solidity/Compiler/Foreign.hsc | 102 +++++++++++++++++++++ stack.yaml | 2 +- web3.cabal | 12 +++ 6 files changed, 287 insertions(+), 1 deletion(-) create mode 100644 cbits/solidity_lite.cpp create mode 100644 cbits/solidity_lite.h create mode 100644 src/Language/Solidity/Compiler.hs create mode 100644 src/Language/Solidity/Compiler/Foreign.hsc diff --git a/cbits/solidity_lite.cpp b/cbits/solidity_lite.cpp new file mode 100644 index 00000000..c3fce361 --- /dev/null +++ b/cbits/solidity_lite.cpp @@ -0,0 +1,99 @@ +#include +#include +#include + +using namespace dev::solidity; +using namespace std; + +struct Solidity { + Solidity() : compiler(new CompilerStack) + {} + + ~Solidity() + { delete compiler; } + + CompilerStack * compiler; + map libs; +}; + +#ifdef __cplusplus +extern "C" +{ +#endif + +namespace dev { +namespace solidity { +namespace lite { + +void * create() +{ + return static_cast(new Solidity); +} + +void destroy(void * self) +{ + delete static_cast(self); +} + +int addSource(void * self, const char * name, const char * source) +{ + return static_cast(self)->compiler->addSource(name, source); +} + +int addLibrary(void * self, const char * name, const char * address) +{ + static_cast(self)->libs[name] = dev::h160(address); + return 0; +} + +int compile(void * self, int optimize) +{ + auto s = static_cast(self); + + s->compiler->setOptimiserSettings(optimize); + s->compiler->setLibraries(s->libs); + s->compiler->reset(true); + if (s->compiler->parseAndAnalyze()) + if (s->compiler->compile()) + return 0; + + return -1; +} + +char * c_string(const std::string &str) +{ + auto c_str = (char *) calloc(1, str.size()+1); + memcpy(c_str, str.c_str(), str.size()); + return c_str; +} + +char * abi(void * self, const char * name) +{ + auto abi_value = static_cast(self)->compiler->contractABI(name); + return c_string(abi_value.toStyledString()); +} + +char * binary(void * self, const char * name) +{ + auto bin_object = static_cast(self)->compiler->object(name); + return c_string(bin_object.toHex()); +} + +char * errors(void * self) +{ + auto compiler = static_cast(self)->compiler; + stringstream error_stream; + for (auto const& error: compiler->errors()) { + SourceReferenceFormatter fmt(error_stream, [&](string const& _source) -> Scanner const& { return compiler->scanner(_source); }); + fmt.printExceptionInformation(*error, (error->type() == Error::Type::Warning) ? "Warning" : "Error"); + } + return c_string(error_stream.str()); +} + +} // solidity +} // lite +} // dev + +#ifdef __cplusplus +} +#endif diff --git a/cbits/solidity_lite.h b/cbits/solidity_lite.h new file mode 100644 index 00000000..2ae935ae --- /dev/null +++ b/cbits/solidity_lite.h @@ -0,0 +1,26 @@ +#pragma once + +#ifdef __cplusplus +extern "C" +{ +#endif + +void * solite_create(); + +void solite_destroy(void * solite); + +int solite_add_source(void * solite, const char * name, const char * source); + +int solite_add_library(void * solite, const char * name, const char * address); + +int solite_compile(void * solite, int optimize); + +char * solite_abi(void * solite, const char * name); + +char * solite_binary(void * solite, const char * name); + +char * solite_errors(void * solite); + +#ifdef __cplusplus +} +#endif diff --git a/src/Language/Solidity/Compiler.hs b/src/Language/Solidity/Compiler.hs new file mode 100644 index 00000000..60277cba --- /dev/null +++ b/src/Language/Solidity/Compiler.hs @@ -0,0 +1,47 @@ +{-# LANGUAGE RecordWildCards #-} + +-- | +-- Module : Language.Solidity.Compiler +-- Copyright : Alexander Krupenkin 2017-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Solidity compiler high-level bindings. +-- + +module Language.Solidity.Compiler where + +import Data.ByteString (ByteString) +import Data.Map (Map) +import qualified Language.Solidity.Compiler.Foreign as FFI +import System.IO.Unsafe (unsafePerformIO) + +-- | Input contract sources +data Sources = Sources + { sourceMap :: Map ByteString ByteString + -- ^ Source code map from contract name in keys + , libraries :: Map ByteString ByteString + -- ^ Library address map for linking + , optimization :: Bool + -- ^ Enable optimization? + } deriving (Eq, Show) + +instance Monoid Sources where + mempty = Sources mempty mempty False + a `mappend` b = Sources (sourceMap a `mappend` sourceMap b) + (libraries a `mappend` libraries b) + (optimization a || optimization b) + +type Compiled = Map ByteString (ByteString, ByteString) + +-- | Compile Solidity contracts +compile :: Sources + -- ^ Contract sources + -> Either ByteString Compiled + -- ^ Error string or compiled contracts ABI and hex +{-# NOINLINE compile #-} +compile Sources{..} = unsafePerformIO $ + FFI.compile sourceMap libraries optimization diff --git a/src/Language/Solidity/Compiler/Foreign.hsc b/src/Language/Solidity/Compiler/Foreign.hsc new file mode 100644 index 00000000..53c3c308 --- /dev/null +++ b/src/Language/Solidity/Compiler/Foreign.hsc @@ -0,0 +1,102 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + +-- | +-- Module : Language.Solidity.Compiler.Foreign +-- Copyright : Alexander Krupenkin 2017-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Ethereum Solidity library FFI. +-- + +module Language.Solidity.Compiler.Foreign where + +#include + +import Data.Map as M +import Data.ByteString.Char8 as BS +import Data.Typeable (Typeable) +import Foreign.C.String (CString, peekCString, withCString) +import Foreign.C.Types (CInt(..)) +import Foreign.Ptr (Ptr) +import Foreign (free) + +data Solidity + deriving Typeable + +foreign import ccall unsafe "create" c_create + :: IO (Ptr Solidity) +foreign import ccall unsafe "destroy" c_destroy + :: Ptr Solidity -> IO () +foreign import ccall unsafe "addSource" c_addSource + :: Ptr Solidity -> CString -> CString -> IO CInt +foreign import ccall unsafe "addLibrary" c_addLibrary + :: Ptr Solidity -> CString -> CString -> IO CInt +foreign import ccall unsafe "compile" c_compile + :: Ptr Solidity -> CInt -> IO CInt +foreign import ccall unsafe "abi" c_abi + :: Ptr Solidity -> CString -> IO CString +foreign import ccall unsafe "binary" c_binary + :: Ptr Solidity -> CString -> IO CString +foreign import ccall unsafe "errors" c_errors + :: Ptr Solidity -> IO CString + +withSolidity :: (Ptr Solidity -> IO a) -> IO a +{-# INLINE withSolidity #-} +withSolidity f = do + ptr <- c_create + r <- f ptr + c_destroy ptr + return r + +withCStringPair :: (CString -> CString -> IO a) -> (ByteString, ByteString) -> IO a +{-# INLINE withCStringPair #-} +withCStringPair f (a, b) = + withCString (BS.unpack a) $ \astr -> + withCString (BS.unpack b) $ \bstr -> + f astr bstr + +addSources :: Ptr Solidity -> Map ByteString ByteString -> IO () +{-# INLINE addSources #-} +addSources ptr = mapM_ (withCStringPair $ c_addSource ptr) . M.toList + +addLibraries :: Ptr Solidity -> Map ByteString ByteString -> IO () +{-# INLINE addLibraries #-} +addLibraries ptr = mapM_ (withCStringPair $ c_addLibrary ptr) . M.toList + +result :: Ptr Solidity -> ByteString -> IO (ByteString, ByteString) +result ptr name = + withCString (BS.unpack name) $ \cname -> do + abi <- c_abi ptr cname + bin <- c_binary ptr cname + res <- (,) <$> fmap BS.pack (peekCString abi) + <*> fmap BS.pack (peekCString bin) + free abi + free bin + return res + +errors :: Ptr Solidity -> IO ByteString +errors ptr = do + errs <- c_errors ptr + res <- BS.pack <$> peekCString errs + free errs + return res + +compile :: Map ByteString ByteString + -> Map ByteString ByteString + -> Bool + -> IO (Either ByteString (Map ByteString (ByteString, ByteString))) +compile srcs libs opt = + withSolidity $ \ptr -> do + addSources ptr srcs + addLibraries ptr libs + res <- c_compile ptr optI + let compiled = sequence $ M.mapWithKey (const . result ptr) srcs + if res < 0 + then Left <$> errors ptr + else Right <$> compiled + where optI | opt = 1 + | otherwise = 0 diff --git a/stack.yaml b/stack.yaml index 06498d5e..b0ec81a3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -14,4 +14,4 @@ extra-package-dbs: [] pvp-bounds: both # Nix integration nix: - packages: [ zlib ] + packages: [ zlib boost jsoncpp solc solc.dev ] diff --git a/web3.cabal b/web3.cabal index f84f27f1..dfa43490 100644 --- a/web3.cabal +++ b/web3.cabal @@ -34,6 +34,10 @@ flag tls description: Enable TLS support default: False +flag solidity + description: Solidity language compiler support + default: True + library hs-source-dirs: src exposed-modules: Network.Ethereum.Web3 @@ -88,6 +92,14 @@ library build-depends: http-client-tls >=0.3.5.3 && <0.4 cpp-options: -DTLS_MANAGER + if flag(solidity) + c-sources: cbits/solidity_lite.cpp + include-dirs: cbits + extra-libraries: solidity + exposed-modules: Language.Solidity.Compiler + other-modules: Language.Solidity.Compiler.Foreign + build-depends: containers + default-language: Haskell2010 ghc-options: -Wduplicate-exports -Whi-shadowing -Widentities -Wnoncanonical-monoid-instances -Woverlapping-patterns -Wtabs -Wpartial-type-signatures -Wderiving-typeable From f9f8ea71bb826a8ff8e5287d3d2b8ae43c5ca50f Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Wed, 23 May 2018 17:30:50 +0200 Subject: [PATCH 002/237] Drop leading underscores in data definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These cause errors of the form Illegal data constructor name: ‘_fooData’ When splicing a TH declaration: --- src/Network/Ethereum/Contract/TH.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 2f373fc1..1bb382ef 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -213,7 +213,7 @@ mkDecl fun@(DFunction name constant inputs outputs) = (++) [funD' 'selector [] [|const mIdent|]] ] where mIdent = T.unpack (methodId $ fun {funName = T.replace "'" "" name}) - dataName = mkName (toUpperFirst (T.unpack $ name <> "Data")) + dataName = mkName (toUpperFirst (T.unpack $ T.dropWhile (== '_') name <> "Data")) fnName = mkName (toLowerFirst (T.unpack name)) bangInput = fmap funBangType inputs derivingD = [''Show, ''Eq, ''Ord, ''GHC.Generic] From 97188859afbc4f5038f126145315a875c62211ec Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 29 Jun 2018 14:39:23 +0300 Subject: [PATCH 003/237] JsonRpc client monad generalization --- src/Network/Ethereum/Web3/Eth.hs | 84 ++++++------- src/Network/Ethereum/Web3/Net.hs | 14 +-- src/Network/Ethereum/Web3/Provider.hs | 66 +++++------ src/Network/Ethereum/Web3/Web3.hs | 8 +- src/Network/JsonRpc/TinyClient.hs | 163 +++++++++++++++----------- 5 files changed, 181 insertions(+), 154 deletions(-) diff --git a/src/Network/Ethereum/Web3/Eth.hs b/src/Network/Ethereum/Web3/Eth.hs index d7ab743c..51a5b44a 100644 --- a/src/Network/Ethereum/Web3/Eth.hs +++ b/src/Network/Ethereum/Web3/Eth.hs @@ -1,4 +1,5 @@ {-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} -- | @@ -17,217 +18,216 @@ module Network.Ethereum.Web3.Eth where import Network.Ethereum.ABI.Prim.Address (Address) import Network.Ethereum.ABI.Prim.Bytes (Bytes, BytesN) -import Network.Ethereum.Web3.Provider (Web3) import Network.Ethereum.Web3.Types (Block, Call, Change, DefaultBlock, Filter, Hash, Quantity, SyncingState, Transaction, TxReceipt) -import Network.JsonRpc.TinyClient (remote) +import Network.JsonRpc.TinyClient (JsonRpcM, remote) -- | Returns the current ethereum protocol version. -protocolVersion :: Web3 Int +protocolVersion :: JsonRpcM m => m Int {-# INLINE protocolVersion #-} protocolVersion = remote "eth_protocolVersion" -- | Returns an object with data about the sync status or false. -syncing :: Web3 SyncingState +syncing :: JsonRpcM m => m SyncingState {-# INLINE syncing #-} syncing = remote "eth_syncing" -- | Returns the client coinbase address. -coinbase :: Web3 Address +coinbase :: JsonRpcM m => m Address {-# INLINE coinbase #-} coinbase = remote "eth_coinbase" -- | Returns true if client is actively mining new blocks. -mining :: Web3 Bool +mining :: JsonRpcM m => m Bool {-# INLINE mining #-} mining = remote "eth_mining" -- | Returns the number of hashes per second that the node is mining with. -hashrate :: Web3 Quantity +hashrate :: JsonRpcM m => m Quantity {-# INLINE hashrate #-} hashrate = remote "eth_hashrate" -- | Returns the value from a storage position at a given address. -getStorageAt :: Address -> Quantity -> DefaultBlock -> Web3 (BytesN 32) +getStorageAt :: JsonRpcM m => Address -> Quantity -> DefaultBlock -> m (BytesN 32) {-# INLINE getStorageAt #-} getStorageAt = remote "eth_getStorageAt" -- | Returns the number of transactions sent from an address. -getTransactionCount :: Address -> DefaultBlock -> Web3 Quantity +getTransactionCount :: JsonRpcM m => Address -> DefaultBlock -> m Quantity {-# INLINE getTransactionCount #-} getTransactionCount = remote "eth_getTransactionCount" -- | Returns the number of transactions in a block from a block matching the given block hash. -getBlockTransactionCountByHash :: Hash -> Web3 Quantity +getBlockTransactionCountByHash :: JsonRpcM m => Hash -> m Quantity {-# INLINE getBlockTransactionCountByHash #-} getBlockTransactionCountByHash = remote "eth_getBlockTransactionCountByHash" -- | Returns the number of transactions in a block matching the -- given block number. -getBlockTransactionCountByNumber :: Quantity -> Web3 Quantity +getBlockTransactionCountByNumber :: JsonRpcM m => Quantity -> m Quantity {-# INLINE getBlockTransactionCountByNumber #-} getBlockTransactionCountByNumber = remote "eth_getBlockTransactionCountByNumber" -- | Returns the number of uncles in a block from a block matching the given -- block hash. -getUncleCountByBlockHash :: Hash -> Web3 Quantity +getUncleCountByBlockHash :: JsonRpcM m => Hash -> m Quantity {-# INLINE getUncleCountByBlockHash #-} getUncleCountByBlockHash = remote "eth_getUncleCountByBlockHash" -- | Returns the number of uncles in a block from a block matching the given -- block number. -getUncleCountByBlockNumber :: Quantity -> Web3 Quantity +getUncleCountByBlockNumber :: JsonRpcM m => Quantity -> m Quantity {-# INLINE getUncleCountByBlockNumber #-} getUncleCountByBlockNumber = remote "eth_getUncleCountByBlockNumber" -- | Returns code at a given address. -getCode :: Address -> DefaultBlock -> Web3 Bytes +getCode :: JsonRpcM m => Address -> DefaultBlock -> m Bytes {-# INLINE getCode #-} getCode = remote "eth_getCode" -- | Returns an Ethereum specific signature with: -- sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))). -sign :: Address -> Bytes -> Web3 Bytes +sign :: JsonRpcM m => Address -> Bytes -> m Bytes {-# INLINE sign #-} sign = remote "eth_sign" -- | Creates new message call transaction or a contract creation, -- if the data field contains code. -sendTransaction :: Call -> Web3 Hash +sendTransaction :: JsonRpcM m => Call -> m Hash {-# INLINE sendTransaction #-} sendTransaction = remote "eth_sendTransaction" -- | Creates new message call transaction or a contract creation for signed -- transactions. -sendRawTransaction :: Bytes -> Web3 Hash +sendRawTransaction :: JsonRpcM m => Bytes -> m Hash {-# INLINE sendRawTransaction #-} sendRawTransaction = remote "eth_sendRawTransaction" -- | Returns the balance of the account of given address. -getBalance :: Address -> DefaultBlock -> Web3 Quantity +getBalance :: JsonRpcM m => Address -> DefaultBlock -> m Quantity {-# INLINE getBalance #-} getBalance = remote "eth_getBalance" -- | Creates a filter object, based on filter options, to notify when the -- state changes (logs). To check if the state has changed, call -- 'getFilterChanges'. -newFilter :: Filter e -> Web3 Quantity +newFilter :: JsonRpcM m => Filter e -> m Quantity {-# INLINE newFilter #-} newFilter = remote "eth_newFilter" -- | Polling method for a filter, which returns an array of logs which -- occurred since last poll. -getFilterChanges :: Quantity -> Web3 [Change] +getFilterChanges :: JsonRpcM m => Quantity -> m [Change] {-# INLINE getFilterChanges #-} getFilterChanges = remote "eth_getFilterChanges" -- | Uninstalls a filter with given id. -- Should always be called when watch is no longer needed. -uninstallFilter :: Quantity -> Web3 Bool +uninstallFilter :: JsonRpcM m => Quantity -> m Bool {-# INLINE uninstallFilter #-} uninstallFilter = remote "eth_uninstallFilter" -- | Returns an array of all logs matching a given filter object. -getLogs :: Filter e -> Web3 [Change] +getLogs :: JsonRpcM m => Filter e -> m [Change] {-# INLINE getLogs #-} getLogs = remote "eth_getLogs" -- | Executes a new message call immediately without creating a -- transaction on the block chain. -call :: Call -> DefaultBlock -> Web3 Bytes +call :: JsonRpcM m => Call -> DefaultBlock -> m Bytes {-# INLINE call #-} call = remote "eth_call" -- | Makes a call or transaction, which won't be added to the blockchain and -- returns the used gas, which can be used for estimating the used gas. -estimateGas :: Call -> Web3 Quantity +estimateGas :: JsonRpcM m => Call -> m Quantity {-# INLINE estimateGas #-} estimateGas = remote "eth_estimateGas" -- | Returns information about a block by hash. -getBlockByHash :: Hash -> Web3 Block +getBlockByHash :: JsonRpcM m => Hash -> m Block {-# INLINE getBlockByHash #-} getBlockByHash = flip (remote "eth_getBlockByHash") True -- | Returns information about a block by block number. -getBlockByNumber :: Quantity -> Web3 Block +getBlockByNumber :: JsonRpcM m => Quantity -> m Block {-# INLINE getBlockByNumber #-} getBlockByNumber = flip (remote "eth_getBlockByNumber") True -- | Returns the information about a transaction requested by transaction hash. -getTransactionByHash :: Hash -> Web3 (Maybe Transaction) +getTransactionByHash :: JsonRpcM m => Hash -> m (Maybe Transaction) {-# INLINE getTransactionByHash #-} getTransactionByHash = remote "eth_getTransactionByHash" -- | Returns information about a transaction by block hash and transaction index position. -getTransactionByBlockHashAndIndex :: Hash -> Quantity -> Web3 (Maybe Transaction) +getTransactionByBlockHashAndIndex :: JsonRpcM m => Hash -> Quantity -> m (Maybe Transaction) {-# INLINE getTransactionByBlockHashAndIndex #-} getTransactionByBlockHashAndIndex = remote "eth_getTransactionByBlockHashAndIndex" -- | Returns information about a transaction by block number and transaction -- index position. -getTransactionByBlockNumberAndIndex :: DefaultBlock -> Quantity -> Web3 (Maybe Transaction) +getTransactionByBlockNumberAndIndex :: JsonRpcM m => DefaultBlock -> Quantity -> m (Maybe Transaction) {-# INLINE getTransactionByBlockNumberAndIndex #-} getTransactionByBlockNumberAndIndex = remote "eth_getTransactionByBlockNumberAndIndex" -- | Returns the receipt of a transaction by transaction hash. -getTransactionReceipt :: Hash -> Web3 (Maybe TxReceipt) +getTransactionReceipt :: JsonRpcM m => Hash -> m (Maybe TxReceipt) {-# INLINE getTransactionReceipt #-} getTransactionReceipt = remote "eth_getTransactionReceipt" -- | Returns a list of addresses owned by client. -accounts :: Web3 [Address] +accounts :: JsonRpcM m => m [Address] {-# INLINE accounts #-} accounts = remote "eth_accounts" -- | Creates a filter in the node, to notify when a new block arrives. -newBlockFilter :: Web3 Quantity +newBlockFilter :: JsonRpcM m => m Quantity {-# INLINE newBlockFilter #-} newBlockFilter = remote "eth_newBlockFilter" -- | Polling method for a block filter, which returns an array of block hashes -- occurred since last poll. -getBlockFilterChanges :: Quantity -> Web3 [Hash] +getBlockFilterChanges :: JsonRpcM m => Quantity -> m [Hash] {-# INLINE getBlockFilterChanges #-} getBlockFilterChanges = remote "eth_getFilterChanges" -- | Returns the number of most recent block. -blockNumber :: Web3 Quantity +blockNumber :: JsonRpcM m => m Quantity {-# INLINE blockNumber #-} blockNumber = remote "eth_blockNumber" -- | Returns the current price per gas in wei. -gasPrice :: Web3 Quantity +gasPrice :: JsonRpcM m => m Quantity {-# INLINE gasPrice #-} gasPrice = remote "eth_gasPrice" -- | Returns information about a uncle of a block by hash and uncle index -- position. -getUncleByBlockHashAndIndex :: Hash -> Quantity -> Web3 Block +getUncleByBlockHashAndIndex :: JsonRpcM m => Hash -> Quantity -> m Block {-# INLINE getUncleByBlockHashAndIndex #-} getUncleByBlockHashAndIndex = remote "eth_getUncleByBlockHashAndIndex" -- | Returns information about a uncle of a block by number and uncle index -- position. -getUncleByBlockNumberAndIndex :: DefaultBlock -> Quantity -> Web3 Block +getUncleByBlockNumberAndIndex :: JsonRpcM m => DefaultBlock -> Quantity -> m Block {-# INLINE getUncleByBlockNumberAndIndex #-} getUncleByBlockNumberAndIndex = remote "eth_getUncleByBlockNumberAndIndex" -- | Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call getFilterChanges. Returns a FilterId. -newPendingTransactionFilter :: Web3 Quantity +newPendingTransactionFilter :: JsonRpcM m => m Quantity {-# INLINE newPendingTransactionFilter #-} newPendingTransactionFilter = remote "eth_newPendingTransactionFilter" -- | Returns an array of all logs matching filter with given id. -getFilterLogs :: Quantity -> Web3 [Change] +getFilterLogs :: JsonRpcM m => Quantity -> m [Change] {-# INLINE getFilterLogs #-} getFilterLogs = remote "eth_getFilterLogs" -- | Returns the hash of the current block, the seedHash, and the boundary -- condition to be met ("target"). -getWork :: Web3 [Bytes] +getWork :: JsonRpcM m => m [Bytes] {-# INLINE getWork #-} getWork = remote "eth_getWork" @@ -236,7 +236,7 @@ getWork = remote "eth_getWork" -- 1. DATA, 8 Bytes - The nonce found (64 bits) -- 2. DATA, 32 Bytes - The header's pow-hash (256 bits) -- 3. DATA, 32 Bytes - The mix digest (256 bits) -submitWork :: BytesN 8 -> BytesN 32 -> BytesN 32 -> Web3 Bool +submitWork :: JsonRpcM m => BytesN 8 -> BytesN 32 -> BytesN 32 -> m Bool {-# INLINE submitWork #-} submitWork = remote "eth_submitWork" @@ -244,6 +244,6 @@ submitWork = remote "eth_submitWork" -- Parameters: -- 1. Hashrate, a hexadecimal string representation (32 bytes) of the hash rate -- 2. ID, String - A random hexadecimal(32 bytes) ID identifying the client -submitHashrate :: BytesN 32 -> BytesN 32 -> Web3 Bool +submitHashrate :: JsonRpcM m => BytesN 32 -> BytesN 32 -> m Bool {-# INLINE submitHashrate #-} submitHashrate = remote "eth_submitHashrate" diff --git a/src/Network/Ethereum/Web3/Net.hs b/src/Network/Ethereum/Web3/Net.hs index 8959b1f3..38d1a949 100644 --- a/src/Network/Ethereum/Web3/Net.hs +++ b/src/Network/Ethereum/Web3/Net.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} -- | @@ -14,22 +15,21 @@ module Network.Ethereum.Web3.Net where -import Data.Text (Text) -import Network.Ethereum.Web3.Provider (Web3) -import Network.Ethereum.Web3.Types (Quantity) -import Network.JsonRpc.TinyClient (remote) +import Data.Text (Text) +import Network.Ethereum.Web3.Types (Quantity) +import Network.JsonRpc.TinyClient (JsonRpcM, remote) -- | Returns the current network id. -version :: Web3 Text +version :: JsonRpcM m => m Text {-# INLINE version #-} version = remote "net_version" -- | Returns true if client is actively listening for network connections. -listening :: Web3 Bool +listening :: JsonRpcM m => m Bool {-# INLINE listening #-} listening = remote "net_listening" -- | Returns number of peers currently connected to the client. -peerCount :: Web3 Quantity +peerCount :: JsonRpcM m => m Quantity {-# INLINE peerCount #-} peerCount = remote "net_peerCount" diff --git a/src/Network/Ethereum/Web3/Provider.hs b/src/Network/Ethereum/Web3/Provider.hs index b1fa3e24..15b26a36 100644 --- a/src/Network/Ethereum/Web3/Provider.hs +++ b/src/Network/Ethereum/Web3/Provider.hs @@ -2,7 +2,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE CPP #-} -- | -- Module : Network.Ethereum.Web3.Provider @@ -22,30 +21,24 @@ import Control.Concurrent.Async (Async, async) import Control.Exception (Exception, try) import Control.Monad.Catch (MonadThrow) import Control.Monad.IO.Class (MonadIO (..)) -import Control.Monad.Reader (MonadReader (..)) -import Control.Monad.Trans.Reader (ReaderT, mapReaderT, runReaderT) -import Data.Aeson (FromJSON) +import Control.Monad.State (MonadState (..)) +import Control.Monad.Trans.State (StateT, evalStateT) import Data.Default (Default (..)) import GHC.Generics (Generic) -import Network.HTTP.Client (Manager, newManager) +import Lens.Micro.Mtl ((.=)) +import Network.HTTP.Client (Manager) -#ifdef TLS_MANAGER -import Network.HTTP.Client.TLS (tlsManagerSettings) -#else -import Network.HTTP.Client (defaultManagerSettings) -#endif - -import Network.JsonRpc.TinyClient (Remote, ServerUri) +import Network.JsonRpc.TinyClient (JsonRpcClient, defaultSettings, + jsonRpcManager) -- | Any communication with Ethereum node wrapped with 'Web3' monad -newtype Web3 a = Web3 { unWeb3 :: ReaderT (ServerUri, Manager) IO a } +newtype Web3 a = Web3 { unWeb3 :: StateT JsonRpcClient IO a } deriving (Functor, Applicative, Monad, MonadIO, MonadThrow) -instance MonadReader (ServerUri, Manager) Web3 where - ask = Web3 ask - local f = Web3 . local f . unWeb3 - -instance FromJSON a => Remote Web3 (Web3 a) +instance MonadState JsonRpcClient Web3 where + get = Web3 get + put = Web3 . put + state = Web3 . state -- | Some peace of error response data Web3Error @@ -61,34 +54,37 @@ instance Exception Web3Error --TODO: Change to `HttpProvider ServerUri | IpcProvider FilePath` to support IPC -- | Web3 Provider -data Provider = HttpProvider ServerUri +data Provider = HttpProvider String deriving (Show, Eq, Generic) instance Default Provider where def = HttpProvider "http://localhost:8545" -- | 'Web3' monad runner, using the supplied Manager -runWeb3With :: MonadIO m => Manager -> Provider -> Web3 a -> m (Either Web3Error a) -runWeb3With manager (HttpProvider uri) f = - liftIO . try . flip runReaderT (uri, manager) . unWeb3 $ f +runWeb3With :: MonadIO m + => Manager + -> Provider + -> Web3 a + -> m (Either Web3Error a) +runWeb3With manager provider f = + runWeb3' provider $ jsonRpcManager .= manager >> f -- | 'Web3' monad runner -runWeb3' :: MonadIO m => Provider -> Web3 a -> m (Either Web3Error a) -runWeb3' provider f = do - manager <- liftIO $ -#ifdef TLS_MANAGER - newManager tlsManagerSettings -#else - newManager defaultManagerSettings -#endif - runWeb3With manager provider f +runWeb3' :: MonadIO m + => Provider + -> Web3 a + -> m (Either Web3Error a) +runWeb3' (HttpProvider uri) f = do + cfg <- defaultSettings uri + liftIO . try . flip evalStateT cfg . unWeb3 $ f -- | 'Web3' runner for default provider -runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a) +runWeb3 :: MonadIO m + => Web3 a + -> m (Either Web3Error a) {-# INLINE runWeb3 #-} runWeb3 = runWeb3' def --- | Fork 'Web3' with the same 'Provider' +-- | Fork 'Web3' with the same 'Provider' and 'Manager' forkWeb3 :: Web3 a -> Web3 (Async a) -{-# INLINE forkWeb3 #-} -forkWeb3 = Web3 . mapReaderT async . unWeb3 +forkWeb3 f = liftIO . async . evalStateT (unWeb3 f) =<< get diff --git a/src/Network/Ethereum/Web3/Web3.hs b/src/Network/Ethereum/Web3/Web3.hs index 5c80cb02..52d001d7 100644 --- a/src/Network/Ethereum/Web3/Web3.hs +++ b/src/Network/Ethereum/Web3/Web3.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} -- | @@ -16,16 +17,15 @@ module Network.Ethereum.Web3.Web3 where import Data.Text (Text) import Network.Ethereum.ABI.Prim.Bytes (Bytes) -import Network.Ethereum.Web3.Provider (Web3) import Network.Ethereum.Web3.Types (Hash) -import Network.JsonRpc.TinyClient (remote) +import Network.JsonRpc.TinyClient (JsonRpcM, remote) -- | Returns current node version string. -clientVersion :: Web3 Text +clientVersion :: JsonRpcM m => m Text {-# INLINE clientVersion #-} clientVersion = remote "web3_clientVersion" -- | Returns Keccak-256 (not the standardized SHA3-256) of the given data. -sha3 :: Bytes -> Web3 Hash +sha3 :: JsonRpcM m => Bytes -> m Hash {-# INLINE sha3 #-} sha3 = remote "web3_sha3" diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index ba453c85..7249f1ac 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -1,9 +1,12 @@ -{-# LANGUAGE DefaultSignatures #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} @@ -20,38 +23,94 @@ -- Functions for implementing the client side of JSON-RPC 2.0. -- See . -- +-- If you have monad with 'MonadIO', 'MonadThrow' and 'MonadReader' instances, +-- it can be used as base for JSON-RPC calls. +-- +-- Example: +-- +-- @ +-- newtype MyMonad a = ... +-- +-- foo :: Int -> Bool -> Mymonad Text +-- foo = remote "foo" +-- @ +-- +-- Arguments of function are stored into @params@ request array. +-- +-- Example: +-- +-- @ +-- myMethod :: JsonRpcM m => Int -> Bool -> m String +-- myMethod = remote "myMethod" +-- @ +-- module Network.JsonRpc.TinyClient ( JsonRpcException(..) + , defaultSettings + , JsonRpcClient + , jsonRpcServer + , jsonRpcManager , RpcError(..) , MethodName - , ServerUri - , Remote + , JsonRpcM , remote ) where -import Control.Applicative ((<|>)) -import Control.Exception (Exception) -import Control.Monad ((<=<)) -import Control.Monad.Catch (MonadThrow, throwM) -import Control.Monad.IO.Class (MonadIO, liftIO) -import Control.Monad.Reader (MonadReader, ask) -import Data.Aeson -import Data.ByteString.Lazy (ByteString) -import Data.Text (Text, unpack) -import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), - httpLbs, method, parseRequest, - requestBody, requestHeaders, - responseBody) +import Control.Applicative ((<|>)) +import Control.Exception (Exception) +import Control.Monad ((<=<)) +import Control.Monad.Catch (MonadThrow, throwM) +import Control.Monad.IO.Class (MonadIO, liftIO) +import Control.Monad.State (MonadState) +import Data.Aeson (FromJSON (..), ToJSON (..), + Value (String), eitherDecode, encode, + object, withObject, (.:), (.:?), (.=)) +import Data.ByteString.Lazy (ByteString) +import Data.Text (Text, unpack) +import Lens.Micro.Mtl (use) +import Lens.Micro.TH (makeLenses) +import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), + httpLbs, method, newManager, + parseRequest, requestBody, + requestHeaders, responseBody) + +#ifdef TLS_MANAGER +import Network.HTTP.Client.TLS (tlsManagerSettings) +#else +import Network.HTTP.Client (defaultManagerSettings) +#endif -- | Name of called method. type MethodName = Text --- | JSON-RPC server URI -type ServerUri = String - --- | JSON-RPC minimal client config -type Config = (ServerUri, Manager) +-- | Remote call monad constrait +type JsonRpcM m = (MonadIO m, MonadThrow m, MonadState JsonRpcClient m) + +-- | JSON-RPC client state vars +data JsonRpcClient = JsonRpcClient + { _jsonRpcManager :: Manager + -- ^ HTTP connection manager + , _jsonRpcServer :: String + -- ^ Remote server URI + } + +$(makeLenses ''JsonRpcClient) + +defaultSettings :: MonadIO m + => String + -- ^ JSON-RPC server URI + -> m JsonRpcClient +defaultSettings srv = liftIO $ JsonRpcClient +#ifdef TLS_MANAGER + <$> newManager tlsManagerSettings +#else + <$> newManager defaultManagerSettings +#endif + <*> pure srv + +instance Show JsonRpcClient where + show JsonRpcClient{..} = "JsonRpcClient<" ++ _jsonRpcServer ++ ">" -- | JSON-RPC request. data Request = Request { rqMethod :: !Text @@ -93,70 +152,42 @@ instance FromJSON RpcError where <*> v .: "message" <*> v .:? "data" --- | Typeclass for JSON-RPC monad base. --- --- If you have monad with 'MonadIO', 'MonadThrow' and 'MonadReader' instances, --- it can be used as base for JSON-RPC calls. --- --- Example: --- --- @ --- newtype MyMonad a = ... --- --- instance Remote MyMonad (Mymonad a) --- --- foo :: Int -> Bool -> Mymonad Text --- foo = remote "foo" --- @ --- -class (MonadIO m, MonadThrow m, MonadReader Config m) => Remote m a | a -> m where - remote_ :: ([Value] -> m ByteString) -> a +data JsonRpcException + = ParsingException String + | CallException RpcError + deriving (Eq, Show) + +instance Exception JsonRpcException - default remote_ :: (FromJSON b, m b ~ a) => ([Value] -> m ByteString) -> a - remote_ f = decodeResponse =<< f [] +class JsonRpcM m => Remote m a | a -> m where + remote' :: ([Value] -> m ByteString) -> a instance (ToJSON a, Remote m b) => Remote m (a -> b) where - remote_ f x = remote_ (\xs -> f (toJSON x : xs)) + remote' f x = remote' (\xs -> f (toJSON x : xs)) + +instance {-# INCOHERENT #-} (JsonRpcM m, FromJSON b) => Remote m (m b) where + remote' f = decodeResponse =<< f [] -- | Remote call of JSON-RPC method. --- --- Arguments of function are stored into @params@ request array. --- --- Example: --- --- @ --- myMethod :: Int -> Bool -> m String --- myMethod = remote "myMethod" --- @ --- remote :: Remote m a => MethodName -> a -{-# INLINE remote #-} -remote = remote_ . call +remote = remote' . call -call :: (MonadIO m, - MonadThrow m, - MonadReader Config m) +call :: JsonRpcM m => MethodName -> [Value] -> m ByteString call n = connection . encode . Request n 1 . toJSON where connection body = do - (uri, manager) <- ask - request <- parseRequest uri + serverUri <- use jsonRpcServer + request <- parseRequest serverUri let request' = request { requestBody = RequestBodyLBS body , requestHeaders = [("Content-Type", "application/json")] , method = "POST" } + manager <- use jsonRpcManager responseBody <$> liftIO (httpLbs request' manager) -data JsonRpcException - = ParsingException String - | CallException RpcError - deriving (Eq, Show) - -instance Exception JsonRpcException - decodeResponse :: (MonadThrow m, FromJSON a) => ByteString -> m a From 8be18125daf09f6b93a789d399f0d86b548c4a65 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 22 Aug 2018 23:48:47 +0300 Subject: [PATCH 004/237] Module tree restructure * Network.Ethereum.ABI -> Data.Solidity * Network.Ethereum.Web3 -> Network.Ethereum.Api * Added package.yaml instead web3.cabal * Introduced HexString datatype * Cleanup API types from Solidity-like types * Export from/to hexstring in Address module * Bump stackage version --- .gitignore | 1 + LICENSE | 4 +- package.yaml | 110 +++++++++++++ src/Data/HexString.hs | 55 +++++++ .../ABI/Class.hs => Data/Solidity/Abi.hs} | 34 ++-- src/Data/Solidity/Abi/Codec.hs | 62 ++++++++ .../ABI => Data/Solidity/Abi}/Generic.hs | 51 +++--- .../ABI => Data/Solidity/Abi}/Json.hs | 22 +-- .../Ethereum/ABI => Data/Solidity}/Event.hs | 27 ++-- .../ABI => Data/Solidity}/Event/Internal.hs | 4 +- src/Data/Solidity/Prim.hs | 30 ++++ src/Data/Solidity/Prim/Address.hs | 79 +++++++++ src/Data/Solidity/Prim/Bool.hs | 28 ++++ .../ABI => Data/Solidity}/Prim/Bytes.hs | 66 ++++---- .../ABI => Data/Solidity}/Prim/Int.hs | 34 ++-- src/Data/Solidity/Prim/List.hs | 54 +++++++ src/Data/Solidity/Prim/String.hs | 29 ++++ src/Data/Solidity/Prim/Tagged.hs | 35 ++++ .../ABI => Data/Solidity}/Prim/Tuple.hs | 23 ++- src/Data/Solidity/Prim/Tuple/TH.hs | 34 ++++ src/Network/Ethereum/ABI/Codec.hs | 63 -------- src/Network/Ethereum/ABI/Prim/Address.hs | 81 ---------- src/Network/Ethereum/ABI/Prim/Bool.hs | 29 ---- src/Network/Ethereum/ABI/Prim/List.hs | 55 ------- src/Network/Ethereum/ABI/Prim/String.hs | 29 ---- src/Network/Ethereum/ABI/Prim/Tagged.hs | 36 ----- src/Network/Ethereum/ABI/Prim/Tuple/TH.hs | 34 ---- src/Network/Ethereum/{Web3 => Api}/Eth.hs | 51 +++--- src/Network/Ethereum/{Web3 => Api}/Net.hs | 12 +- .../Ethereum/{Web3 => Api}/Provider.hs | 6 +- src/Network/Ethereum/{Web3 => Api}/Types.hs | 118 ++++++-------- src/Network/Ethereum/{Web3 => Api}/Web3.hs | 15 +- src/Network/Ethereum/Contract/Event.hs | 38 ++--- src/Network/Ethereum/Contract/Method.hs | 35 ++-- src/Network/Ethereum/Contract/TH.hs | 94 +++++------ src/Network/Ethereum/Web3.hs | 22 +-- stack.yaml | 12 +- web3.cabal | 150 ------------------ 38 files changed, 836 insertions(+), 826 deletions(-) create mode 100644 package.yaml create mode 100644 src/Data/HexString.hs rename src/{Network/Ethereum/ABI/Class.hs => Data/Solidity/Abi.hs} (71%) create mode 100644 src/Data/Solidity/Abi/Codec.hs rename src/{Network/Ethereum/ABI => Data/Solidity/Abi}/Generic.hs (72%) rename src/{Network/Ethereum/ABI => Data/Solidity/Abi}/Json.hs (94%) rename src/{Network/Ethereum/ABI => Data/Solidity}/Event.hs (84%) rename src/{Network/Ethereum/ABI => Data/Solidity}/Event/Internal.hs (97%) create mode 100644 src/Data/Solidity/Prim.hs create mode 100644 src/Data/Solidity/Prim/Address.hs create mode 100644 src/Data/Solidity/Prim/Bool.hs rename src/{Network/Ethereum/ABI => Data/Solidity}/Prim/Bytes.hs (54%) rename src/{Network/Ethereum/ABI => Data/Solidity}/Prim/Int.hs (76%) create mode 100644 src/Data/Solidity/Prim/List.hs create mode 100644 src/Data/Solidity/Prim/String.hs create mode 100644 src/Data/Solidity/Prim/Tagged.hs rename src/{Network/Ethereum/ABI => Data/Solidity}/Prim/Tuple.hs (51%) create mode 100644 src/Data/Solidity/Prim/Tuple/TH.hs delete mode 100644 src/Network/Ethereum/ABI/Codec.hs delete mode 100644 src/Network/Ethereum/ABI/Prim/Address.hs delete mode 100644 src/Network/Ethereum/ABI/Prim/Bool.hs delete mode 100644 src/Network/Ethereum/ABI/Prim/List.hs delete mode 100644 src/Network/Ethereum/ABI/Prim/String.hs delete mode 100644 src/Network/Ethereum/ABI/Prim/Tagged.hs delete mode 100644 src/Network/Ethereum/ABI/Prim/Tuple/TH.hs rename src/Network/Ethereum/{Web3 => Api}/Eth.hs (84%) rename src/Network/Ethereum/{Web3 => Api}/Net.hs (70%) rename src/Network/Ethereum/{Web3 => Api}/Provider.hs (95%) rename src/Network/Ethereum/{Web3 => Api}/Types.hs (79%) rename src/Network/Ethereum/{Web3 => Api}/Web3.hs (56%) delete mode 100644 web3.cabal diff --git a/.gitignore b/.gitignore index ec9dcef8..c67b087d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .DS_Store build/ dist/ +web3.cabal diff --git a/LICENSE b/LICENSE index 87e6c6c9..50eb1b3a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright Alexander Krupenkin (c) 2016 +Copyright Alexander Krupenkin (c) 2016-2018 All rights reserved. @@ -27,4 +27,4 @@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/package.yaml b/package.yaml new file mode 100644 index 00000000..d1e7b37b --- /dev/null +++ b/package.yaml @@ -0,0 +1,110 @@ +name: web3 +version: 0.7.1.0 +synopsis: Ethereum API for Haskell +description: Web3 is a Haskell client library for Ethereum +github: "airalab/hs-web3" +license: BSD3 +license-file: LICENSE +author: Alexander Krupenkin +maintainer: mail@akru.me +copyright: "(c) Alexander Krupenkin 2016-2018" +category: Network + +extra-source-files: +- README.md +- CHANGELOG.md +- test-support/contracts/Migrations.sol +- test-support/contracts/SimpleStorage.sol +- test-support/truffle.js +- test-support/migrations/1_initial_migration.js +- test-support/migrations/2_deploy_contracts.js +- test-support/convertAbi.sh +- test-support/inject-contract-addresses.sh +- examples/ERC20.hs +- examples/ERC20.json +- examples/TokenInfo.hs + +dependencies: +- base >4.9 && <4.12 +- template-haskell >=2.12.0.0 && <2.14 +- microlens-mtl +- microlens-th +- data-default >=0.7.1.1 && <0.8 +- generics-sop >=0.3.2.0 && <0.4 +- transformers >=0.5.2.0 && <0.6 +- http-client >=0.5.12.1 && <0.6 +- bytestring >=0.10.8.2 && <0.11 +- cryptonite ==0.25.* +- exceptions +- basement >=0.0.7 && <0.1 +- machines >=0.6.3 && <0.7 +- tagged >=0.8.5 && <0.9 +- parsec >=3.1.13.0 && <3.2 +- memory >=0.14.16 && <0.15 +- cereal >=0.5.5.0 && <0.6 +- aeson >=1.2.4.0 && <1.4 +- async >=2.1.1.1 && <2.3 +- text >=1.2.3.0 && <1.3 +- mtl >=2.2.2 && <2.3 + +ghc-options: +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +flags: + tls: + description: Enable TLS support + default: False + manual: True + +library: + source-dirs: src + +tests: + unit: + main: Spec.hs + source-dirs: unit + dependencies: + - hspec-expectations >=0.8.2 && <0.9 + - hspec-discover >=2.4.8 && <2.6 + - hspec-contrib >=0.4.0 && <0.6 + - hspec >=2.4.8 && <2.6 + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + + live: + main: Spec.hs + source-dirs: test + dependencies: + - hspec-expectations >=0.8.2 && <0.9 + - hspec-discover >=2.4.8 && <2.6 + - hspec-contrib >=0.4.0 && <0.6 + - hspec >=2.4.8 && <2.6 + - stm >=2.4.5.0 && <2.5 + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/src/Data/HexString.hs b/src/Data/HexString.hs new file mode 100644 index 00000000..51f0ffc2 --- /dev/null +++ b/src/Data/HexString.hs @@ -0,0 +1,55 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE OverloadedStrings #-} + +module Data.HexString ( HexString + , hexString + , fromBytes + , toBytes + , toText ) where + +import Data.Aeson (FromJSON (..), ToJSON (..), + Value (String), withText) +import Data.ByteArray (ByteArray, ByteArrayAccess, convert) +import Data.ByteArray.Encoding (Base (Base16), convertFromBase, + convertToBase) +import Data.ByteString (ByteString) +import qualified Data.ByteString as BS (drop, take) +import Data.Monoid (Monoid, (<>)) +import Data.Semigroup (Semigroup) +import Data.Text (Text) +import qualified Data.Text.Encoding as TE (decodeUtf8, encodeUtf8) + +-- | Represents a Hex string. Guarantees that all characters it contains +-- are valid hex characters. +newtype HexString = HexString { unHexString :: ByteString } + deriving (Eq, Ord, Semigroup, Monoid, ByteArrayAccess, ByteArray) + +instance Show HexString where + show = ("HexString " ++) . show . toText + +instance FromJSON HexString where + parseJSON = withText "HexString" $ hexString . TE.encodeUtf8 + +instance ToJSON HexString where + toJSON = String . toText + +-- | Smart constructor which validates that all the text are actually +-- have `0x` prefix, hexadecimal characters and length is even. +hexString :: Monad m => ByteString -> m HexString +hexString bs + | BS.take 2 bs == "0x" = either fail pure (HexString <$> bs') + | otherwise = fail $ "Not a valid hex string: " ++ show bs + where + bs' = convertFromBase Base16 (BS.drop 2 bs) + +-- | Reads a raw bytes and converts to hex representation. +fromBytes :: ByteArrayAccess ba => ba -> HexString +fromBytes = HexString . convert + +-- | Access to the raw bytes of 'HexString'. +toBytes :: ByteArray ba => HexString -> ba +toBytes = convert . unHexString + +-- | Access to a 'Text' representation of the 'HexString' +toText :: HexString -> Text +toText = ("0x" <>) . TE.decodeUtf8 . convertToBase Base16 . unHexString diff --git a/src/Network/Ethereum/ABI/Class.hs b/src/Data/Solidity/Abi.hs similarity index 71% rename from src/Network/Ethereum/ABI/Class.hs rename to src/Data/Solidity/Abi.hs index 9735183f..f801e54a 100644 --- a/src/Network/Ethereum/ABI/Class.hs +++ b/src/Data/Solidity/Abi.hs @@ -3,7 +3,7 @@ {-# LANGUAGE TypeFamilies #-} -- | --- Module : Network.Ethereum.ABI.Class +-- Module : Data.Solidity.Abi -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- @@ -11,15 +11,15 @@ -- Stability : experimental -- Portability : noportable -- --- Ethereum ABI encoding base type classes. +-- Solidity ABI encoding type classes. -- -module Network.Ethereum.ABI.Class ( - ABIType(..) - , ABIPut(..) - , ABIGet(..) - , GenericABIPut(..) - , GenericABIGet(..) +module Data.Solidity.Abi ( + AbiType(..) + , AbiPut(..) + , AbiGet(..) + , GenericAbiPut(..) + , GenericAbiGet(..) ) where import Data.Proxy (Proxy) @@ -27,7 +27,7 @@ import Data.Serialize (Get, Putter) import Generics.SOP (Generic, Rep, from, to) -- | A class for abi encoding datatype descriptions -class ABIType a where +class AbiType a where isDynamic :: Proxy a -> Bool -- | A class for encoding datatypes to their abi encoding @@ -37,17 +37,17 @@ class ABIType a where -- the 'abiPut' method will have default generic implementations. -- -- To use this option, simply add a @deriving 'Generic'@ clause --- to your datatype and declare a 'ABIPut' instance for it without +-- to your datatype and declare a 'AbiPut' instance for it without -- giving a definition for 'abiPut'. -- -class ABIType a => ABIPut a where +class AbiType a => AbiPut a where abiPut :: Putter a - default abiPut :: (Generic a, Rep a ~ rep, GenericABIPut rep) => Putter a + default abiPut :: (Generic a, Rep a ~ rep, GenericAbiPut rep) => Putter a abiPut = gAbiPut . from -- | A class for encoding generically composed datatypes to their abi encoding -class GenericABIPut a where +class GenericAbiPut a where gAbiPut :: Putter a -- | A class for decoding datatypes from their abi encoding @@ -57,15 +57,15 @@ class GenericABIPut a where -- the 'abiGet' method will have default generic implementations. -- -- To use this option, simply add a @deriving 'Generic'@ clause --- to your datatype and declare a 'ABIGet' instance for it without +-- to your datatype and declare a 'AbiGet' instance for it without -- giving a definition for 'abiGet'. -- -class ABIType a => ABIGet a where +class AbiType a => AbiGet a where abiGet :: Get a - default abiGet :: (Generic a, Rep a ~ rep, GenericABIGet rep) => Get a + default abiGet :: (Generic a, Rep a ~ rep, GenericAbiGet rep) => Get a abiGet = to <$> gAbiGet -- | A class for decoding generically composed datatypes from their abi encoding -class GenericABIGet a where +class GenericAbiGet a where gAbiGet :: Get a diff --git a/src/Data/Solidity/Abi/Codec.hs b/src/Data/Solidity/Abi/Codec.hs new file mode 100644 index 00000000..c492aa47 --- /dev/null +++ b/src/Data/Solidity/Abi/Codec.hs @@ -0,0 +1,62 @@ +{-# LANGUAGE TypeFamilies #-} + +-- | +-- Module : Data.Solidity.Codec +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- Solidity contract ABI encoding functions. +-- + +module Data.Solidity.Abi.Codec ( + encode + , decode + , encode' + , decode' + ) where + +import Data.ByteArray (ByteArray, ByteArrayAccess, convert) +import Data.Serialize (runGet, runPut) +import Generics.SOP (Generic, Rep, from, to) + +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), + GenericAbiGet (..), + GenericAbiPut (..)) +import Data.Solidity.Abi.Generic () + +-- | Encode datatype to Ethereum Abi-encoding +encode :: (AbiPut a, ByteArray ba) + => a + -> ba +{-# INLINE encode #-} +encode = convert . runPut . abiPut + +-- | Generic driven version of 'encode' +encode' :: (Generic a, + Rep a ~ rep, + GenericAbiPut rep, + ByteArray ba) + => a + -> ba +{-# INLINE encode' #-} +encode' = convert . runPut . gAbiPut . from + +-- | Decode datatype from Ethereum Abi-encoding +decode :: (ByteArrayAccess ba, AbiGet a) + => ba + -> Either String a +{-# INLINE decode #-} +decode = runGet abiGet . convert + +-- | Generic driven version of 'decode' +decode' :: (Generic a, + Rep a ~ rep, + GenericAbiGet rep, + ByteArrayAccess ba) + => ba + -> Either String a +decode' = runGet (to <$> gAbiGet) . convert diff --git a/src/Network/Ethereum/ABI/Generic.hs b/src/Data/Solidity/Abi/Generic.hs similarity index 72% rename from src/Network/Ethereum/ABI/Generic.hs rename to src/Data/Solidity/Abi/Generic.hs index 4d9528f5..0501a8bb 100644 --- a/src/Network/Ethereum/ABI/Generic.hs +++ b/src/Data/Solidity/Abi/Generic.hs @@ -8,7 +8,7 @@ {-# LANGUAGE TypeOperators #-} -- | --- Module : Network.Ethereum.ABI.Generic +-- Module : Data.Solidity.Abi.Generic -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- @@ -21,24 +21,21 @@ -- The user of this library should have no need to use this directly in application code. -- -module Network.Ethereum.ABI.Generic () where - -import qualified Data.ByteString.Lazy as LBS -import Data.Int (Int64) -import qualified Data.List as L -import Data.Monoid ((<>)) -import Data.Proxy (Proxy (..)) -import Data.Serialize (Get, Put) -import Data.Serialize.Get (bytesRead, lookAheadE, skip) -import Data.Serialize.Put (runPutLazy) -import Generics.SOP (I (..), NP (..), NS (..), - SOP (..)) - -import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..), - ABIType (..), - GenericABIGet (..), - GenericABIPut (..)) -import Network.Ethereum.ABI.Prim.Int (getWord256, putWord256) +module Data.Solidity.Abi.Generic () where + +import qualified Data.ByteString.Lazy as LBS +import Data.Int (Int64) +import qualified Data.List as L +import Data.Monoid ((<>)) +import Data.Proxy (Proxy (..)) +import Data.Serialize (Get, Put) +import Data.Serialize.Get (bytesRead, lookAheadE, skip) +import Data.Serialize.Put (runPutLazy) +import Generics.SOP (I (..), NP (..), NS (..), SOP (..)) + +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), AbiType (..), + GenericAbiGet (..), GenericAbiPut (..)) +import Data.Solidity.Prim.Int (getWord256, putWord256) data EncodedValue = EncodedValue { order :: Int64 @@ -80,13 +77,13 @@ combineEncodedValues encodings = Just _ -> acc + 32 ) 0 encodings -class ABIData a where +class AbiData a where _serialize :: [EncodedValue] -> a -> [EncodedValue] -instance ABIData (NP f '[]) where +instance AbiData (NP f '[]) where _serialize encoded _ = encoded -instance (ABIType b, ABIPut b, ABIData (NP I as)) => ABIData (NP I (b :as)) where +instance (AbiType b, AbiPut b, AbiData (NP I as)) => AbiData (NP I (b :as)) where _serialize encoded (I b :* a) = if isDynamic (Proxy :: Proxy b) then _serialize (dynEncoding : encoded) a @@ -101,20 +98,20 @@ instance (ABIType b, ABIPut b, ABIData (NP I as)) => ABIData (NP I (b :as)) wher , order = 1 + (fromInteger . toInteger . L.length $ encoded) } -instance ABIData (NP f as) => GenericABIPut (SOP f '[as]) where +instance AbiData (NP f as) => GenericAbiPut (SOP f '[as]) where gAbiPut (SOP (Z a)) = combineEncodedValues $ _serialize [] a gAbiPut _ = error "Impossible branch" -instance GenericABIGet (NP f '[]) where +instance GenericAbiGet (NP f '[]) where gAbiGet = return Nil -instance (ABIGet a, GenericABIGet (NP I as)) => GenericABIGet (NP I (a : as)) where +instance (AbiGet a, GenericAbiGet (NP I as)) => GenericAbiGet (NP I (a : as)) where gAbiGet = (:*) <$> (I <$> factorParser) <*> gAbiGet -instance GenericABIGet (NP f as) => GenericABIGet (SOP f '[as]) where +instance GenericAbiGet (NP f as) => GenericAbiGet (SOP f '[as]) where gAbiGet = SOP . Z <$> gAbiGet -factorParser :: forall a . ABIGet a => Get a +factorParser :: forall a . AbiGet a => Get a factorParser | not $ isDynamic (Proxy :: Proxy a) = abiGet | otherwise = do diff --git a/src/Network/Ethereum/ABI/Json.hs b/src/Data/Solidity/Abi/Json.hs similarity index 94% rename from src/Network/Ethereum/ABI/Json.hs rename to src/Data/Solidity/Abi/Json.hs index 820cf077..60e592a4 100644 --- a/src/Network/Ethereum/ABI/Json.hs +++ b/src/Data/Solidity/Abi/Json.hs @@ -2,7 +2,7 @@ {-# LANGUAGE TemplateHaskell #-} -- | --- Module : Network.Ethereum.ABI.Json +-- Module : Data.Solidity.Abi.Json -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- @@ -13,8 +13,8 @@ -- JSON encoded contract ABI parsers. -- -module Network.Ethereum.ABI.Json ( - ContractABI(..) +module Data.Solidity.Abi.Json ( + ContractAbi(..) , Declaration(..) , FunctionArg(..) , EventArg(..) @@ -120,18 +120,18 @@ $(deriveJSON (defaultOptions { , fieldLabelModifier = toLowerFirst . drop 3 }) ''Declaration) --- | Contract ABI is a list of method / event declarations -newtype ContractABI = ContractABI { unABI :: [Declaration] } +-- | Contract Abi is a list of method / event declarations +newtype ContractAbi = ContractAbi { unAbi :: [Declaration] } deriving (Eq, Ord) -instance FromJSON ContractABI where - parseJSON = fmap ContractABI . parseJSON +instance FromJSON ContractAbi where + parseJSON = fmap ContractAbi . parseJSON -instance ToJSON ContractABI where - toJSON = toJSON . unABI +instance ToJSON ContractAbi where + toJSON = toJSON . unAbi -instance Show ContractABI where - show (ContractABI c) = T.unpack $ T.unlines $ +instance Show ContractAbi where + show (ContractAbi c) = T.unpack $ T.unlines $ [ "Contract:" ] ++ foldMap showConstructor c ++ [ "\tEvents:" ] diff --git a/src/Network/Ethereum/ABI/Event.hs b/src/Data/Solidity/Event.hs similarity index 84% rename from src/Network/Ethereum/ABI/Event.hs rename to src/Data/Solidity/Event.hs index e8a026b2..92e38032 100644 --- a/src/Network/Ethereum/ABI/Event.hs +++ b/src/Data/Solidity/Event.hs @@ -10,7 +10,7 @@ {-# LANGUAGE UndecidableInstances #-} -- | --- Module : Network.Ethereum.Web3.Encoding.Event +-- Module : Data.Solidity.Event -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- @@ -24,21 +24,20 @@ -- this directly in application code. -- -module Network.Ethereum.ABI.Event( +module Data.Solidity.Event ( DecodeEvent(..) , IndexedEvent(..) ) where -import Data.ByteArray (ByteArrayAccess) -import Data.Proxy (Proxy (..)) -import Generics.SOP (Generic, I (..), NP (..), - NS (..), Rep, SOP (..), - from, to) +import Data.ByteArray (ByteArrayAccess) +import Data.Proxy (Proxy (..)) +import Generics.SOP (Generic, I (..), NP (..), + NS (..), Rep, SOP (..), from, to) -import Network.Ethereum.ABI.Class (GenericABIGet) -import Network.Ethereum.ABI.Codec (decode') -import Network.Ethereum.ABI.Event.Internal -import Network.Ethereum.Web3.Types (Change (..)) +import Data.Solidity.Abi (GenericAbiGet) +import Data.Solidity.Abi.Codec (decode') +import Data.Solidity.Event.Internal +import Network.Ethereum.Api.Types (Change (..)) -- | Indexed event args come back in as a list of encoded values. 'ArrayParser' -- | is used to decode these values so that they can be used to reconstruct the @@ -51,7 +50,7 @@ class ArrayParser a where instance ArrayParser (NP f '[]) where arrayParser _ = Right Nil -instance (ArrayParser (NP I as), Generic a, Rep a ~ rep, GenericABIGet rep) +instance (ArrayParser (NP I as), Generic a, Rep a ~ rep, GenericAbiGet rep) => ArrayParser (NP I (a : as)) where arrayParser [] = Left "Empty" arrayParser (a : as) = do @@ -83,7 +82,7 @@ parseChange :: ( Generic i , ArrayParser irep , Generic ni , Rep ni ~ nirep - , GenericABIGet nirep + , GenericAbiGet nirep ) => Change -> Bool @@ -135,7 +134,7 @@ instance ( IndexedEvent i ni e , Generic e , Rep e ~ SOP I '[hle] , CombineChange i ni e - , GenericABIGet (SOP I '[hlni]) + , GenericAbiGet (SOP I '[hlni]) , ArrayParser (SOP I '[hli]) ) => DecodeEvent i ni e where decodeEvent change = do diff --git a/src/Network/Ethereum/ABI/Event/Internal.hs b/src/Data/Solidity/Event/Internal.hs similarity index 97% rename from src/Network/Ethereum/ABI/Event/Internal.hs rename to src/Data/Solidity/Event/Internal.hs index d98fe668..f7c17b15 100644 --- a/src/Network/Ethereum/ABI/Event/Internal.hs +++ b/src/Data/Solidity/Event/Internal.hs @@ -12,7 +12,7 @@ {-# LANGUAGE UndecidableInstances #-} -- | --- Module : Network.Ethereum.ABI.Event.Internal +-- Module : Data.Solidity.Event.Internal -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- @@ -25,7 +25,7 @@ -- this directly in application code. -- -module Network.Ethereum.ABI.Event.Internal where +module Data.Solidity.Event.Internal where import Data.Kind (Type) import Data.Proxy (Proxy (..)) diff --git a/src/Data/Solidity/Prim.hs b/src/Data/Solidity/Prim.hs new file mode 100644 index 00000000..12d5df89 --- /dev/null +++ b/src/Data/Solidity/Prim.hs @@ -0,0 +1,30 @@ +-- | +-- Module : Data.Solidity.Prim +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- Ethereum VM primitive types. +-- + +module Data.Solidity.Prim ( + Address + , Bytes + , BytesN + , IntN + , UIntN + , ListN + , Singleton(..) + ) where + +import Data.Solidity.Prim.Address (Address) +import Data.Solidity.Prim.Bool () +import Data.Solidity.Prim.Bytes (Bytes, BytesN) +import Data.Solidity.Prim.Int (IntN, UIntN) +import Data.Solidity.Prim.List (ListN) +import Data.Solidity.Prim.String () +import Data.Solidity.Prim.Tagged () +import Data.Solidity.Prim.Tuple (Singleton (..)) diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs new file mode 100644 index 00000000..03c4f8e3 --- /dev/null +++ b/src/Data/Solidity/Prim/Address.hs @@ -0,0 +1,79 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Data.Solidity.Prim.Address +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- Ethereum Abi address type. +-- + +module Data.Solidity.Prim.Address ( + Address + , toHexString + , fromHexString + ) where + +import Control.Monad ((<=<)) +import Data.Aeson (FromJSON (..), ToJSON (..)) +import Data.ByteArray (zero) +import Data.ByteString (ByteString) +import qualified Data.ByteString.Char8 as C8 (drop, length) +import Data.HexString (HexString, fromBytes, hexString, + toBytes, toText) +import Data.String (IsString (..)) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) + +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), + AbiType (..)) +import Data.Solidity.Abi.Codec (decode, encode) +import Data.Solidity.Prim.Int (UIntN) + +-- | Ethereum account address +newtype Address = Address { unAddress :: UIntN 160 } + deriving (Eq, Ord, GHC.Generic) + +instance Generic Address + +-- TODO: Address . drop 12 . sha3 +{- +fromPublic :: ByteArrayAccess bin => bin -> Maybe Address +fromPublic = undefined +-} + +fromHexString :: HexString -> Either String Address +fromHexString bs + | bslen == 20 = decode (zero 12 <> toBytes bs :: ByteString) + | otherwise = fail $ "Incorrect address length: " ++ show bslen + where bslen = C8.length (toBytes bs) + +toHexString :: Address -> HexString +toHexString = fromBytes . C8.drop 12 . encode + +instance Show Address where + show = show . toText . toHexString + +instance IsString Address where + fromString = either error id . (fromHexString <=< hexString) . fromString + +instance AbiType Address where + isDynamic _ = False + +instance AbiGet Address where + abiGet = Address <$> abiGet + +instance AbiPut Address where + abiPut = abiPut . unAddress + +instance FromJSON Address where + parseJSON = (either fail pure . fromHexString) <=< parseJSON + +instance ToJSON Address where + toJSON = toJSON . toHexString diff --git a/src/Data/Solidity/Prim/Bool.hs b/src/Data/Solidity/Prim/Bool.hs new file mode 100644 index 00000000..d1233846 --- /dev/null +++ b/src/Data/Solidity/Prim/Bool.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} + +-- | +-- Module : Data.Solidity.Prim.Bool +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- Ethereum Abi boolean type. +-- + +module Data.Solidity.Prim.Bool () where + +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), AbiType (..)) +import Data.Solidity.Prim.Int (getWord256, putWord256) + +instance AbiType Bool where + isDynamic _ = False + +instance AbiGet Bool where + abiGet = toEnum . fromIntegral <$> getWord256 + +instance AbiPut Bool where + abiPut = putWord256 . fromIntegral . fromEnum diff --git a/src/Network/Ethereum/ABI/Prim/Bytes.hs b/src/Data/Solidity/Prim/Bytes.hs similarity index 54% rename from src/Network/Ethereum/ABI/Prim/Bytes.hs rename to src/Data/Solidity/Prim/Bytes.hs index 4ccce28c..74933c87 100644 --- a/src/Network/Ethereum/ABI/Prim/Bytes.hs +++ b/src/Data/Solidity/Prim/Bytes.hs @@ -7,7 +7,7 @@ {-# LANGUAGE TypeOperators #-} -- | --- Module : Network.Ethereum.ABI.Prim.Bytes +-- Module : Data.Solidity.Prim.Bytes -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- @@ -15,55 +15,53 @@ -- Stability : experimental -- Portability : noportable -- --- Ethereum ABI bytes and bytesN types. +-- Bytes and BytesN primitive types. -- -module Network.Ethereum.ABI.Prim.Bytes ( +module Data.Solidity.Prim.Bytes ( Bytes , BytesN ) where -import Data.Aeson (FromJSON (..), ToJSON (..), - Value (String)) -import Data.ByteArray (Bytes, convert, length, zero) -import Data.ByteArray.Encoding (Base (Base16), convertFromBase, - convertToBase) -import Data.ByteArray.Sized (SizedByteArray, - unSizedByteArray, - unsafeFromByteArrayAccess) -import qualified Data.ByteArray.Sized as S (take) -import Data.ByteString (ByteString) -import qualified Data.ByteString.Char8 as C8 -import Data.Monoid ((<>)) -import Data.Proxy (Proxy (..)) -import Data.Serialize (Get, Putter, getBytes, - putByteString) -import Data.String (IsString (..)) -import qualified Data.Text as T (append, drop, take) -import Data.Text.Encoding (decodeUtf8, encodeUtf8) +import Data.Aeson (FromJSON (..), ToJSON (..), + Value (String)) +import Data.ByteArray (Bytes, convert, length, zero) +import Data.ByteArray.Encoding (Base (Base16), convertFromBase, + convertToBase) +import Data.ByteArray.Sized (SizedByteArray, unSizedByteArray, + unsafeFromByteArrayAccess) +import qualified Data.ByteArray.Sized as S (take) +import Data.ByteString (ByteString) +import qualified Data.ByteString.Char8 as C8 +import Data.Monoid ((<>)) +import Data.Proxy (Proxy (..)) +import Data.Serialize (Get, Putter, getBytes, putByteString) +import Data.String (IsString (..)) +import qualified Data.Text as T (append, drop, take) +import Data.Text.Encoding (decodeUtf8, encodeUtf8) import GHC.TypeLits -import Prelude hiding (length) +import Prelude hiding (length) -import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..), - ABIType (..)) -import Network.Ethereum.ABI.Prim.Int (getWord256, putWord256) +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), + AbiType (..)) +import Data.Solidity.Prim.Int (getWord256, putWord256) -instance ABIType ByteString where +instance AbiType ByteString where isDynamic _ = True -instance ABIGet ByteString where +instance AbiGet ByteString where abiGet = abiGetByteString -instance ABIPut ByteString where +instance AbiPut ByteString where abiPut = abiPutByteString -instance ABIType Bytes where +instance AbiType Bytes where isDynamic _ = True -instance ABIGet Bytes where +instance AbiGet Bytes where abiGet = convert <$> abiGetByteString -instance ABIPut Bytes where +instance AbiPut Bytes where abiPut = abiPutByteString . convert instance IsString Bytes where @@ -82,15 +80,15 @@ instance ToJSON Bytes where type BytesN n = SizedByteArray n Bytes -instance (n <= 32) => ABIType (BytesN n) where +instance (n <= 32) => AbiType (BytesN n) where isDynamic _ = False -instance (KnownNat n, n <= 32) => ABIGet (BytesN n) where +instance (KnownNat n, n <= 32) => AbiGet (BytesN n) where abiGet = do ba <- unsafeFromByteArrayAccess <$> getBytes 32 return $ S.take (ba :: BytesN 32) -instance (KnownNat n, n <= 32) => ABIPut (BytesN n) where +instance (KnownNat n, n <= 32) => AbiPut (BytesN n) where abiPut ba = putByteString $ convert ba <> zero (32 - len) where len = fromIntegral $ natVal (Proxy :: Proxy n) diff --git a/src/Network/Ethereum/ABI/Prim/Int.hs b/src/Data/Solidity/Prim/Int.hs similarity index 76% rename from src/Network/Ethereum/ABI/Prim/Int.hs rename to src/Data/Solidity/Prim/Int.hs index 7098205b..aa6f7ae9 100644 --- a/src/Network/Ethereum/ABI/Prim/Int.hs +++ b/src/Data/Solidity/Prim/Int.hs @@ -16,27 +16,27 @@ -- Stability : experimental -- Portability : noportable -- --- Ethereum ABI intN and uintN types. +-- Ethereum Abi intN and uintN types. -- -module Network.Ethereum.ABI.Prim.Int ( +module Data.Solidity.Prim.Int ( IntN , UIntN , getWord256 , putWord256 ) where -import qualified Basement.Numerical.Number as Basement (toInteger) -import Basement.Types.Word256 (Word256 (Word256)) -import qualified Basement.Types.Word256 as Basement (quot, rem) -import Data.Bits (Bits (testBit)) -import Data.Proxy (Proxy (..)) -import Data.Serialize (Get, Putter, Serialize (get, put)) -import GHC.Generics (Generic) +import qualified Basement.Numerical.Number as Basement (toInteger) +import Basement.Types.Word256 (Word256 (Word256)) +import qualified Basement.Types.Word256 as Basement (quot, rem) +import Data.Bits (Bits (testBit)) +import Data.Proxy (Proxy (..)) +import Data.Serialize (Get, Putter, Serialize (get, put)) +import GHC.Generics (Generic) import GHC.TypeLits -import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..), - ABIType (..)) +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), + AbiType (..)) instance Real Word256 where toRational = toRational . toInteger @@ -62,13 +62,13 @@ instance (KnownNat n, n <= 256) => Integral (UIntN n) where toInteger = toInteger . unUIntN quotRem (UIntN a) (UIntN b) = (UIntN $ quot a b, UIntN $ rem a b) -instance (n <= 256) => ABIType (UIntN n) where +instance (n <= 256) => AbiType (UIntN n) where isDynamic _ = False -instance (n <= 256) => ABIGet (UIntN n) where +instance (n <= 256) => AbiGet (UIntN n) where abiGet = UIntN <$> getWord256 -instance (n <= 256) => ABIPut (UIntN n) where +instance (n <= 256) => AbiPut (UIntN n) where abiPut = putWord256 . unUIntN -- TODO: Signed data type @@ -102,13 +102,13 @@ instance (KnownNat n, n <= 256) => Integral (IntN n) where | testBit x 255 = toInteger (unIntN x) - 2 ^ 256 | otherwise = toInteger $ unIntN x -instance (n <= 256) => ABIType (IntN n) where +instance (n <= 256) => AbiType (IntN n) where isDynamic _ = False -instance (n <= 256) => ABIGet (IntN n) where +instance (n <= 256) => AbiGet (IntN n) where abiGet = IntN <$> getWord256 -instance (n <= 256) => ABIPut (IntN n) where +instance (n <= 256) => AbiPut (IntN n) where abiPut = putWord256 . unIntN putWord256 :: Putter Word256 diff --git a/src/Data/Solidity/Prim/List.hs b/src/Data/Solidity/Prim/List.hs new file mode 100644 index 00000000..542fbd3c --- /dev/null +++ b/src/Data/Solidity/Prim/List.hs @@ -0,0 +1,54 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UndecidableInstances #-} + +-- | +-- Module : Data.Solidity.Prim.List +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- Ethereum Abi dynamic and static size vectors based on linked lists. +-- + +module Data.Solidity.Prim.List ( + ListN + ) where + +import Basement.Nat (NatWithinBound) +import Basement.Sized.List (ListN, toListN_, unListN) +import qualified Basement.Sized.List as SL (mapM_, replicateM) +import Control.Monad (replicateM) +import GHC.Exts (IsList (..)) +import GHC.TypeLits (KnownNat) + +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), AbiType (..)) +import Data.Solidity.Prim.Int (getWord256, putWord256) + +instance AbiType [a] where + isDynamic _ = True + +instance AbiPut a => AbiPut [a] where + abiPut l = do putWord256 $ fromIntegral (length l) + foldMap abiPut l + +instance AbiGet a => AbiGet [a] where + abiGet = do len <- fromIntegral <$> getWord256 + replicateM len abiGet + +instance AbiType (ListN n a) where + isDynamic _ = False + +instance AbiPut a => AbiPut (ListN n a) where + abiPut = SL.mapM_ abiPut + +instance (NatWithinBound Int n, KnownNat n, AbiGet a) => AbiGet (ListN n a) where + abiGet = SL.replicateM abiGet + +instance (NatWithinBound Int n, KnownNat n) => IsList (ListN n a) where + type Item (ListN n a) = a + fromList = toListN_ + toList = unListN diff --git a/src/Data/Solidity/Prim/String.hs b/src/Data/Solidity/Prim/String.hs new file mode 100644 index 00000000..242e5fdf --- /dev/null +++ b/src/Data/Solidity/Prim/String.hs @@ -0,0 +1,29 @@ +-- | +-- Module : Data.Solidity.Prim.String +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- Ethereum Abi UTF8-encoded string type. +-- + +module Data.Solidity.Prim.String () where + +import Data.Text (Text) +import Data.Text.Encoding (decodeUtf8, encodeUtf8) + +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), + AbiType (..)) +import Data.Solidity.Prim.Bytes () + +instance AbiType Text where + isDynamic _ = True + +instance AbiPut Text where + abiPut = abiPut . encodeUtf8 + +instance AbiGet Text where + abiGet = decodeUtf8 <$> abiGet diff --git a/src/Data/Solidity/Prim/Tagged.hs b/src/Data/Solidity/Prim/Tagged.hs new file mode 100644 index 00000000..b14627b4 --- /dev/null +++ b/src/Data/Solidity/Prim/Tagged.hs @@ -0,0 +1,35 @@ +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ScopedTypeVariables #-} + +-- | +-- Module : Data.Solidity.Prim.Tagged +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- Ethereum Abi UTF8-encoded tagged types. +-- + +module Data.Solidity.Prim.Tagged ( + Tagged + ) where + +import Data.Proxy (Proxy (..)) +import Data.Tagged (Tagged (..)) +import Generics.SOP (Generic) + +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), AbiType (..)) + +instance AbiType a => AbiType (Tagged t a) where + isDynamic _ = isDynamic (Proxy :: Proxy a) + +instance AbiPut a => AbiPut (Tagged t a) where + abiPut (Tagged a) = abiPut a + +instance AbiGet a => AbiGet (Tagged t a) where + abiGet = Tagged <$> abiGet + +instance Generic a => Generic (Tagged t a) diff --git a/src/Network/Ethereum/ABI/Prim/Tuple.hs b/src/Data/Solidity/Prim/Tuple.hs similarity index 51% rename from src/Network/Ethereum/ABI/Prim/Tuple.hs rename to src/Data/Solidity/Prim/Tuple.hs index 35330c70..f933fb23 100644 --- a/src/Network/Ethereum/ABI/Prim/Tuple.hs +++ b/src/Data/Solidity/Prim/Tuple.hs @@ -4,7 +4,7 @@ {-# LANGUAGE TemplateHaskell #-} -- | --- Module : Network.Ethereum.ABI.Prim.Tuple +-- Module : Data.Solidity.Prim.Tuple -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- @@ -15,18 +15,17 @@ -- Tuple type abi encoding instances. -- -module Network.Ethereum.ABI.Prim.Tuple ( +module Data.Solidity.Prim.Tuple ( Singleton(..) ) where -import Data.Proxy (Proxy (..)) -import Generics.SOP (Generic) -import qualified GHC.Generics as GHC (Generic) +import Data.Proxy (Proxy (..)) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) -import Network.Ethereum.ABI.Class (ABIGet, ABIPut, - ABIType (..)) -import Network.Ethereum.ABI.Generic () -import Network.Ethereum.ABI.Prim.Tuple.TH (tupleDecs) +import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) +import Data.Solidity.Abi.Generic () +import Data.Solidity.Prim.Tuple.TH (tupleDecs) -- | The type for one-tuples newtype Singleton a = Singleton { unSingleton :: a } @@ -36,10 +35,10 @@ deriving instance Eq a => Eq (Singleton a) deriving instance Show a => Show (Singleton a) instance Generic (Singleton a) -instance ABIType a => ABIType (Singleton a) where +instance AbiType a => AbiType (Singleton a) where isDynamic _ = isDynamic (Proxy :: Proxy a) -instance ABIGet a => ABIGet (Singleton a) -instance ABIPut a => ABIPut (Singleton a) +instance AbiGet a => AbiGet (Singleton a) +instance AbiPut a => AbiPut (Singleton a) $(fmap concat $ sequence $ map tupleDecs [2..20]) diff --git a/src/Data/Solidity/Prim/Tuple/TH.hs b/src/Data/Solidity/Prim/Tuple/TH.hs new file mode 100644 index 00000000..2a701e3b --- /dev/null +++ b/src/Data/Solidity/Prim/Tuple/TH.hs @@ -0,0 +1,34 @@ +{-# LANGUAGE TemplateHaskell #-} + +-- | +-- Module : Data.Solidity.Prim.Tuple.TH +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- This module is for internal usage only. +-- It contains tuple abi encoding template haskell generator. +-- + +module Data.Solidity.Prim.Tuple.TH (tupleDecs) where + + +import Control.Monad (replicateM) +import Language.Haskell.TH (DecsQ, Type (VarT), appT, clause, conT, + cxt, funD, instanceD, newName, normalB, + tupleT) + +import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) + +tupleDecs :: Int -> DecsQ +tupleDecs n = do + vars <- replicateM n $ newName "a" + let types = fmap (pure . VarT) vars + sequence $ + [ instanceD (cxt $ map (appT $ conT ''AbiType) types) (appT (conT ''AbiType) (foldl appT (tupleT n) types)) + [funD 'isDynamic [clause [] (normalB [|const False|]) []]] + , instanceD (cxt $ map (appT $ conT ''AbiGet) types) (appT (conT ''AbiGet) (foldl appT (tupleT n) types)) [] + , instanceD (cxt $ map (appT $ conT ''AbiPut) types) (appT (conT ''AbiPut) (foldl appT (tupleT n) types)) [] ] diff --git a/src/Network/Ethereum/ABI/Codec.hs b/src/Network/Ethereum/ABI/Codec.hs deleted file mode 100644 index 285327a1..00000000 --- a/src/Network/Ethereum/ABI/Codec.hs +++ /dev/null @@ -1,63 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} - --- | --- Module : Network.Ethereum.ABI.Codec --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : noportable --- --- Ethereum ABI encoding codec functions. --- - -module Network.Ethereum.ABI.Codec ( - encode - , decode - , encode' - , decode' - ) where - -import Data.ByteArray (ByteArray, ByteArrayAccess, - convert) -import Data.Serialize (runGet, runPut) -import Generics.SOP (Generic, Rep, from, to) - -import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..), - GenericABIGet (..), - GenericABIPut (..)) -import Network.Ethereum.ABI.Generic () - --- | Encode datatype to Ethereum ABI-encoding -encode :: (ABIPut a, ByteArray ba) - => a - -> ba -{-# INLINE encode #-} -encode = convert . runPut . abiPut - --- | Generic driven version of 'encode' -encode' :: (Generic a, - Rep a ~ rep, - GenericABIPut rep, - ByteArray ba) - => a - -> ba -{-# INLINE encode' #-} -encode' = convert . runPut . gAbiPut . from - --- | Decode datatype from Ethereum ABI-encoding -decode :: (ByteArrayAccess ba, ABIGet a) - => ba - -> Either String a -{-# INLINE decode #-} -decode = runGet abiGet . convert - --- | Generic driven version of 'decode' -decode' :: (Generic a, - Rep a ~ rep, - GenericABIGet rep, - ByteArrayAccess ba) - => ba - -> Either String a -decode' = runGet (to <$> gAbiGet) . convert diff --git a/src/Network/Ethereum/ABI/Prim/Address.hs b/src/Network/Ethereum/ABI/Prim/Address.hs deleted file mode 100644 index b1e3366b..00000000 --- a/src/Network/Ethereum/ABI/Prim/Address.hs +++ /dev/null @@ -1,81 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Network.Ethereum.ABI.Prim.Address --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : noportable --- --- Ethereum ABI address type. --- - -module Network.Ethereum.ABI.Prim.Address ( - Address - ) where - -import Control.Monad ((<=<)) -import Data.Aeson (FromJSON (..), ToJSON (..), - Value (String)) -import Data.ByteArray (Bytes, zero) -import Data.ByteArray.Encoding (Base (Base16), convertFromBase, - convertToBase) -import Data.ByteString (ByteString) -import qualified Data.ByteString.Char8 as C8 (drop, pack, take, unpack) -import Data.Monoid ((<>)) -import Data.String (IsString (..)) -import Data.Text.Encoding (decodeUtf8, encodeUtf8) -import Generics.SOP (Generic) -import qualified GHC.Generics as GHC (Generic) - -import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..), - ABIType (..)) -import Network.Ethereum.ABI.Codec (decode, encode) -import Network.Ethereum.ABI.Prim.Int (UIntN) - --- | Ethereum account address -newtype Address = Address { unAddress :: UIntN 160 } - deriving (Eq, Ord, GHC.Generic) - -instance Generic Address - --- TODO: Address . drop 12 . sha3 -{- -fromPublic :: ByteArrayAccess bin => bin -> Maybe Address -fromPublic = undefined --} - -fromHexString :: ByteString -> Either String Address -fromHexString = decode . align <=< convertFromBase Base16 . trim0x - where trim0x s | C8.take 2 s == "0x" = C8.drop 2 s - | otherwise = s - align = (zero 12 <>) :: Bytes -> Bytes - -toHexString :: Address -> ByteString -toHexString = ("0x" <>) . convertToBase Base16 . C8.drop 12 . encode - -instance Show Address where - show = C8.unpack . toHexString - -instance IsString Address where - fromString = either error id . fromHexString . C8.pack - -instance ABIType Address where - isDynamic _ = False - -instance ABIGet Address where - abiGet = Address <$> abiGet - -instance ABIPut Address where - abiPut = abiPut . unAddress - -instance FromJSON Address where - parseJSON (String a) = either fail return $ fromHexString (encodeUtf8 a) - parseJSON _ = fail "Address should be a string" - -instance ToJSON Address where - toJSON = String . decodeUtf8 . toHexString diff --git a/src/Network/Ethereum/ABI/Prim/Bool.hs b/src/Network/Ethereum/ABI/Prim/Bool.hs deleted file mode 100644 index 0ccb17cc..00000000 --- a/src/Network/Ethereum/ABI/Prim/Bool.hs +++ /dev/null @@ -1,29 +0,0 @@ -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} - --- | --- Module : Network.Ethereum.ABI.Prim.Bool --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : noportable --- --- Ethereum ABI boolean type. --- - -module Network.Ethereum.ABI.Prim.Bool () where - -import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..), - ABIType (..)) -import Network.Ethereum.ABI.Prim.Int (getWord256, putWord256) - -instance ABIType Bool where - isDynamic _ = False - -instance ABIGet Bool where - abiGet = toEnum . fromIntegral <$> getWord256 - -instance ABIPut Bool where - abiPut = putWord256 . fromIntegral . fromEnum diff --git a/src/Network/Ethereum/ABI/Prim/List.hs b/src/Network/Ethereum/ABI/Prim/List.hs deleted file mode 100644 index d7006b25..00000000 --- a/src/Network/Ethereum/ABI/Prim/List.hs +++ /dev/null @@ -1,55 +0,0 @@ -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE UndecidableInstances #-} - --- | --- Module : Network.Ethereum.ABI.Prim.List --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : noportable --- --- Ethereum ABI dynamic and static size vectors based on linked lists. --- - -module Network.Ethereum.ABI.Prim.List ( - ListN - ) where - -import Basement.Nat (NatWithinBound) -import Basement.Sized.List (ListN, toListN_, unListN) -import qualified Basement.Sized.List as SL (mapM_, replicateM) -import Control.Monad (replicateM) -import GHC.Exts (IsList (..)) -import GHC.TypeLits (KnownNat) - -import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..), - ABIType (..)) -import Network.Ethereum.ABI.Prim.Int (getWord256, putWord256) - -instance ABIType [a] where - isDynamic _ = True - -instance ABIPut a => ABIPut [a] where - abiPut l = do putWord256 $ fromIntegral (length l) - foldMap abiPut l - -instance ABIGet a => ABIGet [a] where - abiGet = do len <- fromIntegral <$> getWord256 - replicateM len abiGet - -instance ABIType (ListN n a) where - isDynamic _ = False - -instance ABIPut a => ABIPut (ListN n a) where - abiPut = SL.mapM_ abiPut - -instance (NatWithinBound Int n, KnownNat n, ABIGet a) => ABIGet (ListN n a) where - abiGet = SL.replicateM abiGet - -instance (NatWithinBound Int n, KnownNat n) => IsList (ListN n a) where - type Item (ListN n a) = a - fromList = toListN_ - toList = unListN diff --git a/src/Network/Ethereum/ABI/Prim/String.hs b/src/Network/Ethereum/ABI/Prim/String.hs deleted file mode 100644 index e884c9e0..00000000 --- a/src/Network/Ethereum/ABI/Prim/String.hs +++ /dev/null @@ -1,29 +0,0 @@ --- | --- Module : Network.Ethereum.ABI.Prim.String --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : noportable --- --- Ethereum ABI UTF8-encoded string type. --- - -module Network.Ethereum.ABI.Prim.String () where - -import Data.Text (Text) -import Data.Text.Encoding (decodeUtf8, encodeUtf8) - -import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..), - ABIType (..)) -import Network.Ethereum.ABI.Prim.Bytes () - -instance ABIType Text where - isDynamic _ = True - -instance ABIPut Text where - abiPut = abiPut . encodeUtf8 - -instance ABIGet Text where - abiGet = decodeUtf8 <$> abiGet diff --git a/src/Network/Ethereum/ABI/Prim/Tagged.hs b/src/Network/Ethereum/ABI/Prim/Tagged.hs deleted file mode 100644 index 365ea049..00000000 --- a/src/Network/Ethereum/ABI/Prim/Tagged.hs +++ /dev/null @@ -1,36 +0,0 @@ -{-# LANGUAGE PolyKinds #-} -{-# LANGUAGE ScopedTypeVariables #-} - --- | --- Module : Network.Ethereum.ABI.Prim.Tagged --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : noportable --- --- Ethereum ABI UTF8-encoded tagged types. --- - -module Network.Ethereum.ABI.Prim.Tagged ( - Tagged - ) where - -import Data.Proxy (Proxy (..)) -import Data.Tagged (Tagged (..)) -import Generics.SOP (Generic) - -import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..), - ABIType (..)) - -instance ABIType a => ABIType (Tagged t a) where - isDynamic _ = isDynamic (Proxy :: Proxy a) - -instance ABIPut a => ABIPut (Tagged t a) where - abiPut (Tagged a) = abiPut a - -instance ABIGet a => ABIGet (Tagged t a) where - abiGet = Tagged <$> abiGet - -instance Generic a => Generic (Tagged t a) diff --git a/src/Network/Ethereum/ABI/Prim/Tuple/TH.hs b/src/Network/Ethereum/ABI/Prim/Tuple/TH.hs deleted file mode 100644 index 5c3303d6..00000000 --- a/src/Network/Ethereum/ABI/Prim/Tuple/TH.hs +++ /dev/null @@ -1,34 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-} - --- | --- Module : Network.Ethereum.ABI.Prim.Tuple.TH --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : noportable --- --- This module is for internal usage only. --- It contains tuple abi encoding template haskell generator. --- - -module Network.Ethereum.ABI.Prim.Tuple.TH (tupleDecs) where - - -import Control.Monad (replicateM) -import Language.Haskell.TH (DecsQ, Type (VarT), appT, clause, - conT, cxt, funD, instanceD, - newName, normalB, tupleT) - -import Network.Ethereum.ABI.Class (ABIGet, ABIPut, ABIType (..)) - -tupleDecs :: Int -> DecsQ -tupleDecs n = do - vars <- replicateM n $ newName "a" - let types = fmap (pure . VarT) vars - sequence $ - [ instanceD (cxt $ map (appT $ conT ''ABIType) types) (appT (conT ''ABIType) (foldl appT (tupleT n) types)) - [funD 'isDynamic [clause [] (normalB [|const False|]) []]] - , instanceD (cxt $ map (appT $ conT ''ABIGet) types) (appT (conT ''ABIGet) (foldl appT (tupleT n) types)) [] - , instanceD (cxt $ map (appT $ conT ''ABIPut) types) (appT (conT ''ABIPut) (foldl appT (tupleT n) types)) [] ] diff --git a/src/Network/Ethereum/Web3/Eth.hs b/src/Network/Ethereum/Api/Eth.hs similarity index 84% rename from src/Network/Ethereum/Web3/Eth.hs rename to src/Network/Ethereum/Api/Eth.hs index 51a5b44a..0eceb01f 100644 --- a/src/Network/Ethereum/Web3/Eth.hs +++ b/src/Network/Ethereum/Api/Eth.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Ethereum.Web3.Eth --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -14,15 +14,14 @@ -- Ethereum node JSON-RPC API methods with `eth_` prefix. -- -module Network.Ethereum.Web3.Eth where +module Network.Ethereum.Api.Eth where -import Network.Ethereum.ABI.Prim.Address (Address) -import Network.Ethereum.ABI.Prim.Bytes (Bytes, BytesN) -import Network.Ethereum.Web3.Types (Block, Call, Change, - DefaultBlock, Filter, Hash, - Quantity, SyncingState, - Transaction, TxReceipt) -import Network.JsonRpc.TinyClient (JsonRpcM, remote) +import Data.HexString (HexString) +import Data.Solidity.Prim.Address (Address) +import Network.Ethereum.Api.Types (Block, Call, Change, DefaultBlock, + Filter, Quantity, SyncingState, + Transaction, TxReceipt) +import Network.JsonRpc.TinyClient (JsonRpcM, remote) -- | Returns the current ethereum protocol version. protocolVersion :: JsonRpcM m => m Int @@ -50,7 +49,7 @@ hashrate :: JsonRpcM m => m Quantity hashrate = remote "eth_hashrate" -- | Returns the value from a storage position at a given address. -getStorageAt :: JsonRpcM m => Address -> Quantity -> DefaultBlock -> m (BytesN 32) +getStorageAt :: JsonRpcM m => Address -> Quantity -> DefaultBlock -> m HexString {-# INLINE getStorageAt #-} getStorageAt = remote "eth_getStorageAt" @@ -60,7 +59,7 @@ getTransactionCount :: JsonRpcM m => Address -> DefaultBlock -> m Quantity getTransactionCount = remote "eth_getTransactionCount" -- | Returns the number of transactions in a block from a block matching the given block hash. -getBlockTransactionCountByHash :: JsonRpcM m => Hash -> m Quantity +getBlockTransactionCountByHash :: JsonRpcM m => HexString -> m Quantity {-# INLINE getBlockTransactionCountByHash #-} getBlockTransactionCountByHash = remote "eth_getBlockTransactionCountByHash" @@ -72,7 +71,7 @@ getBlockTransactionCountByNumber = remote "eth_getBlockTransactionCountByNumber" -- | Returns the number of uncles in a block from a block matching the given -- block hash. -getUncleCountByBlockHash :: JsonRpcM m => Hash -> m Quantity +getUncleCountByBlockHash :: JsonRpcM m => HexString -> m Quantity {-# INLINE getUncleCountByBlockHash #-} getUncleCountByBlockHash = remote "eth_getUncleCountByBlockHash" @@ -83,25 +82,25 @@ getUncleCountByBlockNumber :: JsonRpcM m => Quantity -> m Quantity getUncleCountByBlockNumber = remote "eth_getUncleCountByBlockNumber" -- | Returns code at a given address. -getCode :: JsonRpcM m => Address -> DefaultBlock -> m Bytes +getCode :: JsonRpcM m => Address -> DefaultBlock -> m HexString {-# INLINE getCode #-} getCode = remote "eth_getCode" -- | Returns an Ethereum specific signature with: -- sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))). -sign :: JsonRpcM m => Address -> Bytes -> m Bytes +sign :: JsonRpcM m => Address -> HexString -> m HexString {-# INLINE sign #-} sign = remote "eth_sign" -- | Creates new message call transaction or a contract creation, -- if the data field contains code. -sendTransaction :: JsonRpcM m => Call -> m Hash +sendTransaction :: JsonRpcM m => Call -> m HexString {-# INLINE sendTransaction #-} sendTransaction = remote "eth_sendTransaction" -- | Creates new message call transaction or a contract creation for signed -- transactions. -sendRawTransaction :: JsonRpcM m => Bytes -> m Hash +sendRawTransaction :: JsonRpcM m => HexString -> m HexString {-# INLINE sendRawTransaction #-} sendRawTransaction = remote "eth_sendRawTransaction" @@ -136,7 +135,7 @@ getLogs = remote "eth_getLogs" -- | Executes a new message call immediately without creating a -- transaction on the block chain. -call :: JsonRpcM m => Call -> DefaultBlock -> m Bytes +call :: JsonRpcM m => Call -> DefaultBlock -> m HexString {-# INLINE call #-} call = remote "eth_call" @@ -147,7 +146,7 @@ estimateGas :: JsonRpcM m => Call -> m Quantity estimateGas = remote "eth_estimateGas" -- | Returns information about a block by hash. -getBlockByHash :: JsonRpcM m => Hash -> m Block +getBlockByHash :: JsonRpcM m => HexString -> m Block {-# INLINE getBlockByHash #-} getBlockByHash = flip (remote "eth_getBlockByHash") True @@ -157,12 +156,12 @@ getBlockByNumber :: JsonRpcM m => Quantity -> m Block getBlockByNumber = flip (remote "eth_getBlockByNumber") True -- | Returns the information about a transaction requested by transaction hash. -getTransactionByHash :: JsonRpcM m => Hash -> m (Maybe Transaction) +getTransactionByHash :: JsonRpcM m => HexString -> m (Maybe Transaction) {-# INLINE getTransactionByHash #-} getTransactionByHash = remote "eth_getTransactionByHash" -- | Returns information about a transaction by block hash and transaction index position. -getTransactionByBlockHashAndIndex :: JsonRpcM m => Hash -> Quantity -> m (Maybe Transaction) +getTransactionByBlockHashAndIndex :: JsonRpcM m => HexString -> Quantity -> m (Maybe Transaction) {-# INLINE getTransactionByBlockHashAndIndex #-} getTransactionByBlockHashAndIndex = remote "eth_getTransactionByBlockHashAndIndex" @@ -173,7 +172,7 @@ getTransactionByBlockNumberAndIndex :: JsonRpcM m => DefaultBlock -> Quantity -> getTransactionByBlockNumberAndIndex = remote "eth_getTransactionByBlockNumberAndIndex" -- | Returns the receipt of a transaction by transaction hash. -getTransactionReceipt :: JsonRpcM m => Hash -> m (Maybe TxReceipt) +getTransactionReceipt :: JsonRpcM m => HexString -> m (Maybe TxReceipt) {-# INLINE getTransactionReceipt #-} getTransactionReceipt = remote "eth_getTransactionReceipt" @@ -189,7 +188,7 @@ newBlockFilter = remote "eth_newBlockFilter" -- | Polling method for a block filter, which returns an array of block hashes -- occurred since last poll. -getBlockFilterChanges :: JsonRpcM m => Quantity -> m [Hash] +getBlockFilterChanges :: JsonRpcM m => Quantity -> m [HexString] {-# INLINE getBlockFilterChanges #-} getBlockFilterChanges = remote "eth_getFilterChanges" @@ -205,7 +204,7 @@ gasPrice = remote "eth_gasPrice" -- | Returns information about a uncle of a block by hash and uncle index -- position. -getUncleByBlockHashAndIndex :: JsonRpcM m => Hash -> Quantity -> m Block +getUncleByBlockHashAndIndex :: JsonRpcM m => HexString -> Quantity -> m Block {-# INLINE getUncleByBlockHashAndIndex #-} getUncleByBlockHashAndIndex = remote "eth_getUncleByBlockHashAndIndex" @@ -227,7 +226,7 @@ getFilterLogs = remote "eth_getFilterLogs" -- | Returns the hash of the current block, the seedHash, and the boundary -- condition to be met ("target"). -getWork :: JsonRpcM m => m [Bytes] +getWork :: JsonRpcM m => m [HexString] {-# INLINE getWork #-} getWork = remote "eth_getWork" @@ -236,7 +235,7 @@ getWork = remote "eth_getWork" -- 1. DATA, 8 Bytes - The nonce found (64 bits) -- 2. DATA, 32 Bytes - The header's pow-hash (256 bits) -- 3. DATA, 32 Bytes - The mix digest (256 bits) -submitWork :: JsonRpcM m => BytesN 8 -> BytesN 32 -> BytesN 32 -> m Bool +submitWork :: JsonRpcM m => HexString -> HexString -> HexString -> m Bool {-# INLINE submitWork #-} submitWork = remote "eth_submitWork" @@ -244,6 +243,6 @@ submitWork = remote "eth_submitWork" -- Parameters: -- 1. Hashrate, a hexadecimal string representation (32 bytes) of the hash rate -- 2. ID, String - A random hexadecimal(32 bytes) ID identifying the client -submitHashrate :: JsonRpcM m => BytesN 32 -> BytesN 32 -> m Bool +submitHashrate :: JsonRpcM m => HexString -> HexString -> m Bool {-# INLINE submitHashrate #-} submitHashrate = remote "eth_submitHashrate" diff --git a/src/Network/Ethereum/Web3/Net.hs b/src/Network/Ethereum/Api/Net.hs similarity index 70% rename from src/Network/Ethereum/Web3/Net.hs rename to src/Network/Ethereum/Api/Net.hs index 38d1a949..83e1066f 100644 --- a/src/Network/Ethereum/Web3/Net.hs +++ b/src/Network/Ethereum/Api/Net.hs @@ -2,8 +2,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Ethereum.Web3.Net --- Copyright : Alexander Krupenkin 2016 +-- Module : Network.Ethereum.Api.Net +-- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -13,11 +13,11 @@ -- Ethereum node JSON-RPC API methods with `net_` prefix. -- -module Network.Ethereum.Web3.Net where +module Network.Ethereum.Api.Net where -import Data.Text (Text) -import Network.Ethereum.Web3.Types (Quantity) -import Network.JsonRpc.TinyClient (JsonRpcM, remote) +import Data.Text (Text) +import Network.Ethereum.Api.Types (Quantity) +import Network.JsonRpc.TinyClient (JsonRpcM, remote) -- | Returns the current network id. version :: JsonRpcM m => m Text diff --git a/src/Network/Ethereum/Web3/Provider.hs b/src/Network/Ethereum/Api/Provider.hs similarity index 95% rename from src/Network/Ethereum/Web3/Provider.hs rename to src/Network/Ethereum/Api/Provider.hs index 15b26a36..a7a2f63c 100644 --- a/src/Network/Ethereum/Web3/Provider.hs +++ b/src/Network/Ethereum/Api/Provider.hs @@ -4,8 +4,8 @@ {-# LANGUAGE MultiParamTypeClasses #-} -- | --- Module : Network.Ethereum.Web3.Provider --- Copyright : Alexander Krupenkin 2016 +-- Module : Network.Ethereum.Api.Provider +-- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -15,7 +15,7 @@ -- Web3 service provider. -- -module Network.Ethereum.Web3.Provider where +module Network.Ethereum.Api.Provider where import Control.Concurrent.Async (Async, async) import Control.Exception (Exception, try) diff --git a/src/Network/Ethereum/Web3/Types.hs b/src/Network/Ethereum/Api/Types.hs similarity index 79% rename from src/Network/Ethereum/Web3/Types.hs rename to src/Network/Ethereum/Api/Types.hs index 01253055..78777e0e 100644 --- a/src/Network/Ethereum/Web3/Types.hs +++ b/src/Network/Ethereum/Api/Types.hs @@ -6,8 +6,8 @@ {-# LANGUAGE TemplateHaskell #-} -- | --- Module : Network.Ethereum.Web3.Types --- Copyright : Alexander Krupenkin 2016 +-- Module : Network.Ethereum.Api.Types +-- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -17,31 +17,25 @@ -- Ethereum generic JSON-RPC types. -- -module Network.Ethereum.Web3.Types where - -import Data.Aeson (FromJSON (..), Options (fieldLabelModifier, omitNothingFields), - ToJSON (..), - Value (Bool, String), - defaultOptions, object, - (.=)) -import Data.Aeson.TH (deriveJSON) -import Data.Default (Default (..)) -import Data.Monoid ((<>)) -import Data.Ord (Down (..)) -import Data.String (IsString (..)) -import qualified Data.Text as T (pack) -import qualified Data.Text.Lazy.Builder as B (toLazyText) -import qualified Data.Text.Lazy.Builder.Int as B (hexadecimal) -import qualified Data.Text.Read as R (decimal, hexadecimal) -import GHC.Generics (Generic) - -import Data.String.Extra (toLowerFirst) -import Network.Ethereum.ABI.Prim.Address (Address) -import Network.Ethereum.ABI.Prim.Bytes (Bytes, BytesN) -import Network.Ethereum.Unit - --- | 32 byte type synonym for transaction and block hashes. -type Hash = BytesN 32 +module Network.Ethereum.Api.Types where + +import Data.Aeson (FromJSON (..), Options (fieldLabelModifier, omitNothingFields), + ToJSON (..), Value (Bool, String), + defaultOptions, object, (.=)) +import Data.Aeson.TH (deriveJSON) +import Data.Default (Default (..)) +import Data.Monoid ((<>)) +import Data.Ord (Down (..)) +import Data.Solidity.Prim.Address (Address) +import Data.String (IsString (..)) +import qualified Data.Text as T (pack) +import qualified Data.Text.Lazy.Builder as B (toLazyText) +import qualified Data.Text.Lazy.Builder.Int as B (hexadecimal) +import qualified Data.Text.Read as R (decimal, hexadecimal) +import GHC.Generics (Generic) + +import Data.HexString (HexString) +import Data.String.Extra (toLowerFirst) -- | Should be viewed as type to representing QUANTITY in Web3 JSON RPC docs -- @@ -55,7 +49,7 @@ type Hash = BytesN 32 -- WRONG: 0x0400 (no leading zeroes allowed) -- WRONG: ff (must be prefixed 0x) newtype Quantity = Quantity { unQuantity :: Integer } - deriving (Read, Num, Real, Enum, Eq, Ord, Generic) + deriving (Num, Real, Integral, Enum, Eq, Ord, Generic) instance Show Quantity where show = show . unQuantity @@ -64,11 +58,11 @@ instance IsString Quantity where fromString ('0' : 'x' : hex) = case R.hexadecimal (T.pack hex) of Right (x, "") -> Quantity x - _ -> error "Unable to parse Quantity!" - fromString str = - case R.decimal (T.pack str) of + _ -> error ("Quantity " ++ show hex ++ " is not valid hex") + fromString num = + case R.decimal (T.pack num) of Right (x, "") -> Quantity x - _ -> error "Unable to parse Quantity!" + _ -> error ("Quantity " ++ show num ++ " is not valid decimal") instance ToJSON Quantity where toJSON (Quantity x) = @@ -79,20 +73,8 @@ instance FromJSON Quantity where parseJSON (String v) = case R.hexadecimal v of Right (x, "") -> return (Quantity x) - _ -> fail "Unable to parse Quantity" - parseJSON _ = fail "Quantity may only be parsed from a JSON String" - -instance Fractional Quantity where - (/) a b = Quantity $ div (unQuantity a) (unQuantity b) - fromRational = Quantity . floor - -instance Unit Quantity where - fromWei = Quantity - toWei = unQuantity - -instance UnitSpec Quantity where - divider = const 1 - name = const "quantity" + _ -> fail $ "Quantity " ++ show v <> " is not valid hex" + parseJSON _ = fail "Quantity should be a JSON String" -- | An object with sync status data. data SyncActive = SyncActive @@ -122,17 +104,17 @@ data Change = Change -- ^ QUANTITY - integer of the log index position in the block. null when its pending log. , changeTransactionIndex :: !Quantity -- ^ QUANTITY - integer of the transactions index position log was created from. null when its pending log. - , changeTransactionHash :: !Hash + , changeTransactionHash :: !HexString -- ^ DATA, 32 Bytes - hash of the transactions this log was created from. null when its pending log. - , changeBlockHash :: !Hash + , changeBlockHash :: !HexString -- ^ DATA, 32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log. , changeBlockNumber :: !Quantity -- ^ QUANTITY - the block number where this log was in. null when its pending. null when its pending log. , changeAddress :: !Address -- ^ DATA, 20 Bytes - address from which this log originated. - , changeData :: !Bytes + , changeData :: !HexString -- ^ DATA - contains one or more 32 Bytes non-indexed arguments of the log. - , changeTopics :: ![BytesN 32] + , changeTopics :: ![HexString] -- ^ Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments. -- (In solidity: The first topic is the hash of the signature of the event -- (e.g. Deposit(address, bytes32, uint256)), except you declared the event with @@ -154,7 +136,7 @@ data Call = Call -- ^ QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas. , callValue :: !(Maybe Quantity) -- ^ QUANTITY - (optional) Integer of the value sent with this transaction. - , callData :: !(Maybe Bytes) + , callData :: !(Maybe HexString) -- ^ DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. , callNonce :: !(Maybe Quantity) -- ^ QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce. @@ -186,7 +168,7 @@ data Filter e = Filter -- ^ QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. , filterToBlock :: !DefaultBlock -- ^ QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. - , filterTopics :: !(Maybe [Maybe (BytesN 32)]) + , filterTopics :: !(Maybe [Maybe HexString]) -- ^ Array of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. -- Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters: -- * [] "anything" @@ -215,11 +197,11 @@ instance Ord DefaultBlock where -- | The Receipt of a Transaction data TxReceipt = TxReceipt - { receiptTransactionHash :: !Hash + { receiptTransactionHash :: !HexString -- ^ DATA, 32 Bytes - hash of the transaction. , receiptTransactionIndex :: !Quantity -- ^ QUANTITY - index of the transaction. - , receiptBlockHash :: !Hash + , receiptBlockHash :: !HexString -- ^ DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending. , receiptBlockNumber :: !Quantity -- ^ QUANTITY - block number where this transaction was in. @@ -231,7 +213,7 @@ data TxReceipt = TxReceipt -- ^ DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null. , receiptLogs :: ![Change] -- ^ Array - Array of log objects, which this transaction generated. - , receiptLogsBloom :: !Bytes + , receiptLogsBloom :: !HexString -- ^ DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs. , receiptStatus :: !(Maybe Quantity) -- ^ QUANTITY either 1 (success) or 0 (failure) @@ -242,11 +224,11 @@ $(deriveJSON (defaultOptions -- | Transaction information. data Transaction = Transaction - { txHash :: !Hash + { txHash :: !HexString -- ^ DATA, 32 Bytes - hash of the transaction. , txNonce :: !Quantity -- ^ QUANTITY - the number of transactions made by the sender prior to this one. - , txBlockHash :: !Hash + , txBlockHash :: !HexString -- ^ DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending. , txBlockNumber :: !Quantity -- ^ QUANTITY - block number where this transaction was in. null when its pending. @@ -262,7 +244,7 @@ data Transaction = Transaction -- ^ QUANTITY - gas price provided by the sender in Wei. , txGas :: !Quantity -- ^ QUANTITY - gas provided by the sender. - , txInput :: !Bytes + , txInput :: !HexString -- ^ DATA - the data send along with the transaction. } deriving (Eq, Show, Generic) @@ -273,21 +255,21 @@ $(deriveJSON (defaultOptions data Block = Block { blockNumber :: !Quantity -- ^ QUANTITY - the block number. null when its pending block. - , blockHash :: !Hash + , blockHash :: !HexString -- ^ DATA, 32 Bytes - hash of the block. null when its pending block. - , blockParentHash :: !Hash + , blockParentHash :: !HexString -- ^ DATA, 32 Bytes - hash of the parent block. - , blockNonce :: !(Maybe Bytes) + , blockNonce :: !(Maybe HexString) -- ^ DATA, 8 Bytes - hash of the generated proof-of-work. null when its pending block. - , blockSha3Uncles :: !(BytesN 32) + , blockSha3Uncles :: !HexString -- ^ DATA, 32 Bytes - SHA3 of the uncles data in the block. - , blockLogsBloom :: !Bytes + , blockLogsBloom :: !HexString -- ^ DATA, 256 Bytes - the bloom filter for the logs of the block. null when its pending block. - , blockTransactionsRoot :: !(BytesN 32) + , blockTransactionsRoot :: !HexString -- ^ DATA, 32 Bytes - the root of the transaction trie of the block. - , blockStateRoot :: !(BytesN 32) + , blockStateRoot :: !HexString -- ^ DATA, 32 Bytes - the root of the final state trie of the block. - , blockReceiptRoot :: !(Maybe (BytesN 32)) + , blockReceiptRoot :: !(Maybe HexString) -- ^ DATA, 32 Bytes - the root of the receipts trie of the block. , blockMiner :: !Address -- ^ DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given. @@ -295,7 +277,7 @@ data Block = Block -- ^ QUANTITY - integer of the difficulty for this block. , blockTotalDifficulty :: !Quantity -- ^ QUANTITY - integer of the total difficulty of the chain until this block. - , blockExtraData :: !Bytes + , blockExtraData :: !HexString -- ^ DATA - the "extra data" field of this block. , blockSize :: !Quantity -- ^ QUANTITY - integer the size of this block in bytes. @@ -307,7 +289,7 @@ data Block = Block -- ^ QUANTITY - the unix timestamp for when the block was collated. , blockTransactions :: ![Transaction] -- ^ Array of transaction objects. - , blockUncles :: ![Hash] + , blockUncles :: ![HexString] -- ^ Array - Array of uncle hashes. } deriving (Show, Generic) diff --git a/src/Network/Ethereum/Web3/Web3.hs b/src/Network/Ethereum/Api/Web3.hs similarity index 56% rename from src/Network/Ethereum/Web3/Web3.hs rename to src/Network/Ethereum/Api/Web3.hs index 52d001d7..fcc06cd4 100644 --- a/src/Network/Ethereum/Web3/Web3.hs +++ b/src/Network/Ethereum/Api/Web3.hs @@ -2,8 +2,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Ethereum.Web3.Web3 --- Copyright : Alexander Krupenkin 2016 +-- Module : Network.Ethereum.Api.Web3 +-- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -13,12 +13,11 @@ -- Ethereum node JSON-RPC API methods with `web3_` prefix. -- -module Network.Ethereum.Web3.Web3 where +module Network.Ethereum.Api.Web3 where -import Data.Text (Text) -import Network.Ethereum.ABI.Prim.Bytes (Bytes) -import Network.Ethereum.Web3.Types (Hash) -import Network.JsonRpc.TinyClient (JsonRpcM, remote) +import Data.HexString (HexString) +import Data.Text (Text) +import Network.JsonRpc.TinyClient (JsonRpcM, remote) -- | Returns current node version string. clientVersion :: JsonRpcM m => m Text @@ -26,6 +25,6 @@ clientVersion :: JsonRpcM m => m Text clientVersion = remote "web3_clientVersion" -- | Returns Keccak-256 (not the standardized SHA3-256) of the given data. -sha3 :: JsonRpcM m => Bytes -> m Hash +sha3 :: JsonRpcM m => HexString -> m HexString {-# INLINE sha3 #-} sha3 = remote "web3_sha3" diff --git a/src/Network/Ethereum/Contract/Event.hs b/src/Network/Ethereum/Contract/Event.hs index 265db559..a4ace6cc 100644 --- a/src/Network/Ethereum/Contract/Event.hs +++ b/src/Network/Ethereum/Contract/Event.hs @@ -22,25 +22,25 @@ module Network.Ethereum.Contract.Event ( , eventMany' ) where -import Control.Concurrent (threadDelay) -import Control.Monad (forM, void, when) -import Control.Monad.IO.Class (liftIO) -import Control.Monad.Trans.Class (lift) -import Control.Monad.Trans.Reader (ReaderT (..)) -import Data.Either (rights) -import Data.Machine (MachineT, asParts, autoM, - await, construct, final, - mapping, repeatedly, runT, - unfoldPlan, (~>)) -import Data.Machine.Plan (PlanT, stop, yield) -import Data.Maybe (listToMaybe) - -import Control.Concurrent.Async (Async) -import Network.Ethereum.ABI.Event (DecodeEvent (..)) -import qualified Network.Ethereum.Web3.Eth as Eth -import Network.Ethereum.Web3.Provider (Web3, forkWeb3) -import Network.Ethereum.Web3.Types (Change (..), DefaultBlock (..), - Filter (..), Quantity) +import Control.Concurrent (threadDelay) +import Control.Monad (forM, void, when) +import Control.Monad.IO.Class (liftIO) +import Control.Monad.Trans.Class (lift) +import Control.Monad.Trans.Reader (ReaderT (..)) +import Data.Either (rights) +import Data.Machine (MachineT, asParts, autoM, await, + construct, final, mapping, + repeatedly, runT, unfoldPlan, + (~>)) +import Data.Machine.Plan (PlanT, stop, yield) +import Data.Maybe (listToMaybe) + +import Control.Concurrent.Async (Async) +import Data.Solidity.Event (DecodeEvent (..)) +import qualified Network.Ethereum.Api.Eth as Eth +import Network.Ethereum.Api.Provider (Web3, forkWeb3) +import Network.Ethereum.Api.Types (Change (..), DefaultBlock (..), + Filter (..), Quantity) -- | Event callback control response data EventAction = ContinueEvent diff --git a/src/Network/Ethereum/Contract/Method.hs b/src/Network/Ethereum/Contract/Method.hs index a7a2d07d..4d92efb0 100644 --- a/src/Network/Ethereum/Contract/Method.hs +++ b/src/Network/Ethereum/Contract/Method.hs @@ -18,25 +18,26 @@ module Network.Ethereum.Contract.Method ( , sendTx ) where -import Control.Monad.Catch (throwM) -import Data.Monoid ((<>)) -import Data.Proxy (Proxy (..)) +import Control.Monad.Catch (throwM) +import Data.ByteArray (convert) +import Data.Monoid ((<>)) +import Data.Proxy (Proxy (..)) -import Network.Ethereum.ABI.Class (ABIGet, ABIPut, ABIType (..)) -import Network.Ethereum.ABI.Codec (decode, encode) -import Network.Ethereum.ABI.Prim.Bytes (Bytes) -import qualified Network.Ethereum.Web3.Eth as Eth -import Network.Ethereum.Web3.Provider (Web3, Web3Error (ParserFail)) -import Network.Ethereum.Web3.Types (Call (callData), DefaultBlock, - Hash) +import Data.HexString (HexString) +import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) +import Data.Solidity.Abi.Codec (decode, encode) +import Data.Solidity.Prim.Bytes (Bytes) +import qualified Network.Ethereum.Api.Eth as Eth +import Network.Ethereum.Api.Provider (Web3, Web3Error (ParserFail)) +import Network.Ethereum.Api.Types (Call (callData), DefaultBlock) -class ABIPut a => Method a where +class AbiPut a => Method a where selector :: Proxy a -> Bytes -instance ABIType () where +instance AbiType () where isDynamic _ = False -instance ABIPut () +instance AbiPut () -- | Send transaction without method selection instance Method () where @@ -48,13 +49,13 @@ sendTx :: Method a -- ^ Call configuration -> a -- ^ method data - -> Web3 Hash + -> Web3 HexString sendTx call' (dat :: a) = let sel = selector (Proxy :: Proxy a) - in Eth.sendTransaction (call' { callData = Just $ sel <> encode dat }) + in Eth.sendTransaction (call' { callData = Just $ convert sel <> encode dat }) -- | 'call' is used to call contract methods that have no state changing effects. -call :: (Method a, ABIGet b) +call :: (Method a, AbiGet b) => Call -- ^ Call configuration -> DefaultBlock @@ -65,7 +66,7 @@ call :: (Method a, ABIGet b) -- ^ 'Web3' wrapped result call call' mode (dat :: a) = do let sel = selector (Proxy :: Proxy a) - res <- Eth.call (call' { callData = Just $ sel <> encode dat }) mode + res <- Eth.call (call' { callData = Just $ convert sel <> encode dat }) mode case decode res of Left e -> throwM $ ParserFail $ "Unable to parse response: " ++ e Right x -> return x diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index bb8c8dd1..331ef3eb 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -17,7 +17,7 @@ -- The Application Binary Interface is the standard way to interact -- with contracts in the Ethereum ecosystem. It can be described by -- specially JSON file, like @ERC20.json@. This module use TemplateHaskell --- for generation described in ABI contract methods and events. Helper +-- for generation described in Abi contract methods and events. Helper -- functions and instances inserted in haskell module and can be used in -- another modules or in place. -- @@ -37,42 +37,42 @@ module Network.Ethereum.Contract.TH (abi, abiFrom) where -import Control.Monad (replicateM, (<=<)) -import Data.Aeson (eitherDecode) -import Data.Default (Default (..)) -import Data.List (group, sort, uncons) -import Data.Monoid ((<>)) -import Data.Tagged (Tagged) -import Data.Text (Text) -import qualified Data.Text as T -import qualified Data.Text.Lazy as LT -import qualified Data.Text.Lazy.Encoding as LT -import Generics.SOP (Generic) -import qualified GHC.Generics as GHC (Generic) +import Control.Monad (replicateM, (<=<)) +import Data.Aeson (eitherDecode) +import Data.Default (Default (..)) +import Data.List (group, sort, uncons) +import Data.Monoid ((<>)) +import Data.Tagged (Tagged) +import Data.Text (Text) +import qualified Data.Text as T +import qualified Data.Text.Lazy as LT +import qualified Data.Text.Lazy.Encoding as LT +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) import Language.Haskell.TH import Language.Haskell.TH.Quote -import Data.String.Extra (toLowerFirst, toUpperFirst) -import Network.Ethereum.ABI.Class (ABIGet, ABIPut, - ABIType (..)) -import Network.Ethereum.ABI.Event (IndexedEvent (..)) -import Network.Ethereum.ABI.Json (ContractABI (..), - Declaration (..), - EventArg (..), - FunctionArg (..), - SolidityType (..), eventId, - methodId, parseSolidityType) -import Network.Ethereum.ABI.Prim.Address (Address) -import Network.Ethereum.ABI.Prim.Bytes (Bytes, BytesN) -import Network.Ethereum.ABI.Prim.Int (IntN, UIntN) -import Network.Ethereum.ABI.Prim.List (ListN) -import Network.Ethereum.ABI.Prim.String () -import Network.Ethereum.ABI.Prim.Tagged () -import Network.Ethereum.ABI.Prim.Tuple (Singleton (..)) -import Network.Ethereum.Contract.Method (Method (..), call, sendTx) -import Network.Ethereum.Web3.Provider (Web3) -import Network.Ethereum.Web3.Types (Call, DefaultBlock (..), - Filter (..), Hash) +import Data.HexString (HexString) +import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) +import Data.Solidity.Abi.Json (ContractAbi (..), + Declaration (..), + EventArg (..), + FunctionArg (..), + SolidityType (..), eventId, + methodId, parseSolidityType) +import Data.Solidity.Event (IndexedEvent (..)) +import Data.Solidity.Prim.Address (Address) +import Data.Solidity.Prim.Bytes (Bytes, BytesN) +import Data.Solidity.Prim.Int (IntN, UIntN) +import Data.Solidity.Prim.List (ListN) +import Data.Solidity.Prim.String () +import Data.Solidity.Prim.Tagged () +import Data.Solidity.Prim.Tuple (Singleton (..)) +import Data.String.Extra (toLowerFirst, toUpperFirst) +import Network.Ethereum.Api.Provider (Web3) +import Network.Ethereum.Api.Types (Call, DefaultBlock (..), + Filter (..)) +import Network.Ethereum.Contract.Method (Method (..), call, sendTx) -- | Read contract ABI from file abiFrom :: QuasiQuoter @@ -101,7 +101,7 @@ dataD' name rec derive = funD' :: Name -> [PatQ] -> ExpQ -> DecQ funD' name p f = funD name [clause p (normalB f) []] --- | ABI and Haskell types association +-- | Abi and Haskell types association toHSType :: SolidityType -> TypeQ toHSType s = case s of SolidityBool -> conT ''Bool @@ -158,7 +158,7 @@ funWrapper c name dname args result = do ] else - [ sigD name $ [t|$(arrowing $ [t|Call|] : inputT ++ [[t|Web3 Hash|]])|] + [ sigD name $ [t|$(arrowing $ [t|Call|] : inputT ++ [[t|Web3 HexString|]])|] , funD' name (varP <$> a : vars) $ [|sendTx $(varE a) $(params)|] ] where @@ -177,12 +177,12 @@ mkDecl :: Declaration -> DecsQ mkDecl ev@(DEvent name inputs anonymous) = sequence [ dataD' indexedName (normalC indexedName (map (toBang <=< tag) indexedArgs)) derivingD , instanceD' indexedName (conT ''Generic) [] - , instanceD' indexedName (conT ''ABIType) [funD' 'isDynamic [] [|const False|]] - , instanceD' indexedName (conT ''ABIGet) [] + , instanceD' indexedName (conT ''AbiType) [funD' 'isDynamic [] [|const False|]] + , instanceD' indexedName (conT ''AbiGet) [] , dataD' nonIndexedName (normalC nonIndexedName (map (toBang <=< tag) nonIndexedArgs)) derivingD , instanceD' nonIndexedName (conT ''Generic) [] - , instanceD' nonIndexedName (conT ''ABIType) [funD' 'isDynamic [] [|const False|]] - , instanceD' nonIndexedName (conT ''ABIGet) [] + , instanceD' nonIndexedName (conT ''AbiType) [funD' 'isDynamic [] [|const False|]] + , instanceD' nonIndexedName (conT ''AbiGet) [] , dataD' allName (recC allName (map (\(n, a) -> ((\(b,t) -> return (n,b,t)) <=< toBang <=< typeQ $ a)) allArgs)) derivingD , instanceD' allName (conT ''Generic) [] , instanceD (cxt []) @@ -211,10 +211,10 @@ mkDecl fun@(DFunction name constant inputs outputs) = (++) <*> sequence [ dataD' dataName (normalC dataName bangInput) derivingD , instanceD' dataName (conT ''Generic) [] - , instanceD' dataName (conT ''ABIType) + , instanceD' dataName (conT ''AbiType) [funD' 'isDynamic [] [|const False|]] - , instanceD' dataName (conT ''ABIPut) [] - , instanceD' dataName (conT ''ABIGet) [] + , instanceD' dataName (conT ''AbiPut) [] + , instanceD' dataName (conT ''AbiGet) [] , instanceD' dataName (conT ''Method) [funD' 'selector [] [|const mIdent|]] ] @@ -270,18 +270,18 @@ isKeyword = flip elem [ "as", "case", "of", "class" , "newtype", "proc", "qualified" , "rec", "type", "where"] --- | ABI to declarations converter +-- | Abi to declarations converter quoteAbiDec :: String -> DecsQ quoteAbiDec abi_string = case eitherDecode abi_lbs of Left e -> fail $ "Error: " ++ show e - Right (ContractABI a) -> concat <$> mapM mkDecl (escape a) + Right (ContractAbi a) -> concat <$> mapM mkDecl (escape a) where abi_lbs = LT.encodeUtf8 (LT.pack abi_string) --- | ABI information string +-- | Abi information string quoteAbiExp :: String -> ExpQ quoteAbiExp abi_string = stringE $ case eitherDecode abi_lbs of Left e -> "Error: " ++ show e - Right a -> show (a :: ContractABI) + Right a -> show (a :: ContractAbi) where abi_lbs = LT.encodeUtf8 (LT.pack abi_string) diff --git a/src/Network/Ethereum/Web3.hs b/src/Network/Ethereum/Web3.hs index 527662f4..5d85fe3c 100644 --- a/src/Network/Ethereum/Web3.hs +++ b/src/Network/Ethereum/Web3.hs @@ -45,15 +45,15 @@ module Network.Ethereum.Web3 ( ) where -import Network.Ethereum.ABI.Prim.Address (Address) -import Network.Ethereum.ABI.Prim.Bool () -import Network.Ethereum.ABI.Prim.Bytes (Bytes, BytesN) -import Network.Ethereum.ABI.Prim.Int (IntN, UIntN) -import Network.Ethereum.ABI.Prim.List (ListN) -import Network.Ethereum.ABI.Prim.String () -import Network.Ethereum.Contract.Event (EventAction (..), event, - event') -import Network.Ethereum.Contract.Method (sendTx) +import Data.Solidity.Prim.Address (Address) +import Data.Solidity.Prim.Bool () +import Data.Solidity.Prim.Bytes (Bytes, BytesN) +import Data.Solidity.Prim.Int (IntN, UIntN) +import Data.Solidity.Prim.List (ListN) +import Data.Solidity.Prim.String () +import Network.Ethereum.Api.Provider (Web3, runWeb3) +import Network.Ethereum.Api.Types (Call (..)) +import Network.Ethereum.Contract.Event (EventAction (..), event, + event') +import Network.Ethereum.Contract.Method (sendTx) import Network.Ethereum.Unit -import Network.Ethereum.Web3.Provider (Web3, runWeb3) -import Network.Ethereum.Web3.Types (Call (..)) diff --git a/stack.yaml b/stack.yaml index ba026a5a..1e678fc7 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,17 +1,13 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-11.7 +resolver: lts-12.7 + # User packages to be built. packages: - '.' -# Dependency packages to be pulled from upstream that are not in the resolver -# (e.g., acme-missiles-0.3) -extra-deps: [] -# Override default flag values for local packages and extra-deps -flags: {} -# Extra package databases containing global packages -extra-package-dbs: [] + # Dependencies bounds pvp-bounds: both + # Nix integration nix: packages: [ zlib ] diff --git a/web3.cabal b/web3.cabal deleted file mode 100644 index ac863fba..00000000 --- a/web3.cabal +++ /dev/null @@ -1,150 +0,0 @@ -name: web3 -version: 0.7.1.0 -synopsis: Ethereum API for Haskell -description: Web3 is a Haskell client library for Ethereum -homepage: https://github.com/airalab/hs-web3#readme -license: BSD3 -license-file: LICENSE -author: Alexander Krupenkin -maintainer: mail@akru.me -copyright: Alexander Krupenkin -category: Network -build-type: Simple -cabal-version: >=1.10 - -extra-source-files: - README.md - CHANGELOG.md - test-support/contracts/Migrations.sol - test-support/contracts/SimpleStorage.sol - test-support/truffle.js - test-support/migrations/1_initial_migration.js - test-support/migrations/2_deploy_contracts.js - test-support/convertAbi.sh - test-support/inject-contract-addresses.sh - examples/ERC20.hs - examples/ERC20.json - examples/TokenInfo.hs - -source-repository head - type: git - location: https://github.com/airalab/hs-web3 - -flag tls - description: Enable TLS support - default: False - -library - hs-source-dirs: src - exposed-modules: Network.Ethereum.Web3 - , Network.Ethereum.Web3.Eth - , Network.Ethereum.Web3.Net - , Network.Ethereum.Web3.Web3 - , Network.Ethereum.Web3.Types - , Network.Ethereum.Web3.Provider - , Network.Ethereum.Unit - , Network.Ethereum.ABI.Json - , Network.Ethereum.ABI.Class - , Network.Ethereum.ABI.Codec - , Network.Ethereum.ABI.Event - , Network.Ethereum.ABI.Event.Internal - , Network.Ethereum.ABI.Generic - , Network.Ethereum.ABI.Prim.Int - , Network.Ethereum.ABI.Prim.Bool - , Network.Ethereum.ABI.Prim.List - , Network.Ethereum.ABI.Prim.Bytes - , Network.Ethereum.ABI.Prim.Tuple - , Network.Ethereum.ABI.Prim.Tuple.TH - , Network.Ethereum.ABI.Prim.String - , Network.Ethereum.ABI.Prim.Tagged - , Network.Ethereum.ABI.Prim.Address - , Network.Ethereum.Contract.TH - , Network.Ethereum.Contract.Event - , Network.Ethereum.Contract.Method - , Network.JsonRpc.TinyClient - , Data.String.Extra - build-depends: base >4.9 && <4.12 - , template-haskell >=2.12.0.0 && <2.14 - , data-default >=0.7.1.1 && <0.8 - , generics-sop >=0.3.2.0 && <0.4 - , transformers >=0.5.2.0 && <0.6 - , http-client >=0.5.12.1 && <0.6 - , exceptions >=0.8.3 && <0.9 - , bytestring >=0.10.8.2 && <0.11 - , cryptonite ==0.25.* - , basement >=0.0.7 && <0.1 - , machines >=0.6.3 && <0.7 - , tagged >=0.8.5 && <0.9 - , parsec >=3.1.13.0 && <3.2 - , memory >=0.14.16 && <0.15 - , cereal >=0.5.5.0 && <0.6 - , aeson >=1.2.4.0 && <1.3 - , async >=2.1.1.1 && <2.3 - , text >=1.2.3.0 && <1.3 - , mtl >=2.2.2 && <2.3 - - if flag(tls) - build-depends: http-client-tls >=0.3.5.3 && <0.4 - cpp-options: -DTLS_MANAGER - - default-language: Haskell2010 - ghc-options: -Wduplicate-exports -Whi-shadowing -Widentities -Wnoncanonical-monoid-instances - -Woverlapping-patterns -Wtabs -Wpartial-type-signatures -Wderiving-typeable - -Wunrecognised-pragmas -Wunticked-promoted-constructors -Wtyped-holes - -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods - -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures - -Wname-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances - -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds - -Wunused-imports -Wunused-matches -Wunused-foralls -Wunused-do-bind -Wwrong-do-bind - -Wtrustworthy-safe -Wwarnings-deprecations -Wdeferred-type-errors - -test-suite unit - type: exitcode-stdio-1.0 - hs-source-dirs: unit - main-is: Spec.hs - other-modules: Network.Ethereum.Web3.Test.MethodDumpSpec - Network.Ethereum.Web3.Test.EncodingSpec - Network.Ethereum.Web3.Test.EventSpec - build-depends: base >4.9 && <4.12 - , hspec-expectations >=0.8.2 && <0.9 - , hspec-discover >=2.4.8 && <2.6 - , hspec-contrib >=0.4.0 && <0.6 - , hspec >=2.4.8 && <2.6 - , data-default >=0.7.1.1 && <0.8 - , generics-sop >=0.3.2.0 && <0.4 - , transformers >=0.5.2.0 && <0.6 - , bytestring >=0.10.8.2 && <0.11 - , memory >=0.14.16 && <0.15 - , tagged >=0.8.5 && <0.9 - , split >=0.2.3.3 && <0.3 - , time >=1.8.0.2 && <1.9 - , text >=1.2.3.0 && <1.3 - , web3 - ghc-options: -threaded -rtsopts -with-rtsopts=-N - default-language: Haskell2010 - -test-suite live - type: exitcode-stdio-1.0 - hs-source-dirs: test - main-is: Spec.hs - other-modules: Network.Ethereum.Web3.Test.ComplexStorageSpec - , Network.Ethereum.Web3.Test.SimpleStorageSpec - , Network.Ethereum.Web3.Test.Utils - build-depends: base >4.9 && <4.12 - , hspec-expectations >=0.8.2 && <0.9 - , hspec-discover >=2.4.8 && <2.6 - , hspec-contrib >=0.4.0 && <0.6 - , hspec >=2.4.8 && <2.6 - , transformers >=0.5.2.0 && <0.6 - , data-default >=0.7.1.1 && <0.8 - , bytestring >=0.10.8.2 && <0.11 - , memory >=0.14.16 && <0.15 - , tagged >=0.8.5 && <0.9 - , split >=0.2.3.3 && <0.3 - , async >=2.1.1.1 && <2.3 - , time >=1.8.0.2 && <1.9 - , text >=1.2.3.0 && <1.3 - , stm >=2.4.5.0 && <2.5 - , web3 - ghc-options: -threaded -rtsopts -with-rtsopts=-N - default-language: Haskell2010 From 6b98119205d975195bce8aa3a66a94b68ea3683e Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 23 Aug 2018 00:06:59 +0300 Subject: [PATCH 005/237] Unit test build fixes * Added IsString instance for HexString * Fixed module names in unit tests --- package.yaml | 2 ++ src/Data/HexString.hs | 4 +++ .../Ethereum/Web3/Test/EncodingSpec.hs | 33 +++++++++---------- unit/Network/Ethereum/Web3/Test/EventSpec.hs | 25 +++++++------- .../Ethereum/Web3/Test/MethodDumpSpec.hs | 1 - 5 files changed, 33 insertions(+), 32 deletions(-) diff --git a/package.yaml b/package.yaml index d1e7b37b..9ab4f74a 100644 --- a/package.yaml +++ b/package.yaml @@ -90,6 +90,7 @@ tests: - hspec-discover >=2.4.8 && <2.6 - hspec-contrib >=0.4.0 && <0.6 - hspec >=2.4.8 && <2.6 + - web3 ghc-options: - -threaded - -rtsopts @@ -104,6 +105,7 @@ tests: - hspec-contrib >=0.4.0 && <0.6 - hspec >=2.4.8 && <2.6 - stm >=2.4.5.0 && <2.5 + - web3 ghc-options: - -threaded - -rtsopts diff --git a/src/Data/HexString.hs b/src/Data/HexString.hs index 51f0ffc2..bb421aab 100644 --- a/src/Data/HexString.hs +++ b/src/Data/HexString.hs @@ -16,6 +16,7 @@ import Data.ByteString (ByteString) import qualified Data.ByteString as BS (drop, take) import Data.Monoid (Monoid, (<>)) import Data.Semigroup (Semigroup) +import Data.String (IsString (..)) import Data.Text (Text) import qualified Data.Text.Encoding as TE (decodeUtf8, encodeUtf8) @@ -27,6 +28,9 @@ newtype HexString = HexString { unHexString :: ByteString } instance Show HexString where show = ("HexString " ++) . show . toText +instance IsString HexString where + fromString = either error id . hexString . fromString + instance FromJSON HexString where parseJSON = withText "HexString" $ hexString . TE.encodeUtf8 diff --git a/unit/Network/Ethereum/Web3/Test/EncodingSpec.hs b/unit/Network/Ethereum/Web3/Test/EncodingSpec.hs index 7b206dab..4bd65bfc 100644 --- a/unit/Network/Ethereum/Web3/Test/EncodingSpec.hs +++ b/unit/Network/Ethereum/Web3/Test/EncodingSpec.hs @@ -6,21 +6,20 @@ module Network.Ethereum.Web3.Test.EncodingSpec where -import Data.Monoid ((<>)) -import Data.Text (Text) -import Generics.SOP (Generic, Rep) +import Data.Monoid ((<>)) +import Data.Text (Text) +import Generics.SOP (Generic, Rep) import Test.Hspec -import Network.Ethereum.ABI.Class (ABIGet, ABIPut, - GenericABIGet, GenericABIPut) -import Network.Ethereum.ABI.Codec (decode, decode', encode, - encode') -import Network.Ethereum.ABI.Prim.Bool () -import Network.Ethereum.ABI.Prim.Bytes (Bytes, BytesN) -import Network.Ethereum.ABI.Prim.Int (IntN, UIntN) -import Network.Ethereum.ABI.Prim.List (ListN) -import Network.Ethereum.ABI.Prim.String () -import Network.Ethereum.ABI.Prim.Tuple (Singleton (..)) +import Data.Solidity.Abi (AbiGet, AbiPut, GenericAbiGet, + GenericAbiPut) +import Data.Solidity.Abi.Codec (decode, decode', encode, encode') +import Data.Solidity.Prim.Bool () +import Data.Solidity.Prim.Bytes (Bytes, BytesN) +import Data.Solidity.Prim.Int (IntN, UIntN) +import Data.Solidity.Prim.List (ListN) +import Data.Solidity.Prim.String () +import Data.Solidity.Prim.Tuple (Singleton (..)) spec :: Spec spec = do @@ -198,8 +197,8 @@ tuplesTest = -- | Run encoded/decoded comaration roundTrip :: ( Show a , Eq a - , ABIPut a - , ABIGet a + , AbiPut a + , AbiGet a ) => a -> Bytes @@ -213,8 +212,8 @@ roundTripGeneric :: ( Show a , Eq a , Generic a , Rep a ~ rep - , GenericABIPut rep - , GenericABIGet rep + , GenericAbiPut rep + , GenericAbiGet rep ) => a -> Bytes diff --git a/unit/Network/Ethereum/Web3/Test/EventSpec.hs b/unit/Network/Ethereum/Web3/Test/EventSpec.hs index 5f076a71..133d2a30 100644 --- a/unit/Network/Ethereum/Web3/Test/EventSpec.hs +++ b/unit/Network/Ethereum/Web3/Test/EventSpec.hs @@ -5,20 +5,17 @@ module Network.Ethereum.Web3.Test.EventSpec where -import Data.Tagged (Tagged) -import Generics.SOP (Generic) -import qualified GHC.Generics as GHC (Generic) -import Test.Hspec (Spec, describe, it, - shouldBe) - -import Network.Ethereum.ABI.Class (ABIGet) -import Network.Ethereum.ABI.Event (IndexedEvent (..), - decodeEvent) -import Network.Ethereum.ABI.Prim.Address (Address) -import Network.Ethereum.ABI.Prim.Bytes () -import Network.Ethereum.ABI.Prim.Int (UIntN) -import Network.Ethereum.ABI.Prim.Tagged () -import Network.Ethereum.Web3.Types (Change (..)) +import Data.Tagged (Tagged) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) +import Test.Hspec (Spec, describe, it, shouldBe) + +import Data.Solidity.Event (IndexedEvent (..), decodeEvent) +import Data.Solidity.Prim.Address (Address) +import Data.Solidity.Prim.Bytes () +import Data.Solidity.Prim.Int (UIntN) +import Data.Solidity.Prim.Tagged () +import Network.Ethereum.Api.Types (Change (..)) spec :: Spec diff --git a/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs b/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs index 5f7e454f..8abe8da3 100644 --- a/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs +++ b/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs @@ -4,7 +4,6 @@ module Network.Ethereum.Web3.Test.MethodDumpSpec where import Network.Ethereum.Contract.TH import Test.Hspec -import Text.Printf spec :: Spec From 2d65e854c008fabb98a3d8d82e9065eecb76586e Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 29 Aug 2018 14:49:01 +0300 Subject: [PATCH 006/237] Minor fixes * Added solidity prim types instances import into TH generator * Fixed Show instance for Address type --- src/Data/Solidity/Prim/Address.hs | 5 +++-- src/Network/Ethereum/Contract/TH.hs | 9 ++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs index b85a2610..cf0d9900 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/src/Data/Solidity/Prim/Address.hs @@ -33,8 +33,9 @@ import qualified Data.ByteString as BS (take, unpack) import qualified Data.ByteString.Char8 as C8 (drop, length, pack, unpack) import qualified Data.Char as C (toLower, toUpper) import Data.HexString (HexString, fromBytes, hexString, - toBytes) + toBytes, toText) import Data.String (IsString (..)) +import Data.Text.Encoding as T (encodeUtf8) import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) @@ -69,7 +70,7 @@ verifyChecksum :: ByteString -> Bool verifyChecksum = toChecksum >>= (==) instance Show Address where - show = show . toChecksum . toBytes . toHexString + show = show . toChecksum . T.encodeUtf8 . toText . toHexString instance IsString Address where fromString = either error id . (fromHexString <=< hexString) . fromString diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 472001d5..fe268e54 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -65,13 +65,8 @@ import Data.Solidity.Abi.Json (ContractAbi (..), SolidityType (..), eventId, methodId, parseSolidityType) import Data.Solidity.Event (IndexedEvent (..)) -import Data.Solidity.Prim.Address (Address) -import Data.Solidity.Prim.Bytes (Bytes, BytesN) -import Data.Solidity.Prim.Int (IntN, UIntN) -import Data.Solidity.Prim.List (ListN) -import Data.Solidity.Prim.String () -import Data.Solidity.Prim.Tagged () -import Data.Solidity.Prim.Tuple (Singleton (..)) +import Data.Solidity.Prim (Address, Bytes, BytesN, IntN, + ListN, Singleton (..), UIntN) import Data.String.Extra (toLowerFirst, toUpperFirst) import Network.Ethereum.Api.Provider (Web3) import Network.Ethereum.Api.Types (Call, DefaultBlock (..), From a22b420b21ac68f5269e1381c9c09c932090e178 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 29 Aug 2018 15:43:40 +0300 Subject: [PATCH 007/237] Stackage aeson 1.4 bound fixes --- package.yaml | 2 +- stack.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.yaml b/package.yaml index 19f5f861..9bff6aba 100644 --- a/package.yaml +++ b/package.yaml @@ -44,7 +44,7 @@ dependencies: - parsec >=3.1.13.0 && <3.2 - memory >=0.14.16 && <0.15 - cereal >=0.5.5.0 && <0.6 -- aeson >=1.2.4.0 && <1.4 +- aeson >=1.2.4.0 && <1.5 - vinyl >=0.8.1.0 && <0.9 - async >=2.1.1.1 && <2.3 - text >=1.2.3.0 && <1.3 diff --git a/stack.yaml b/stack.yaml index 1e678fc7..ad273c52 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-12.7 +resolver: lts-12.8 # User packages to be built. packages: From 7cb66370c82b555742c43149fbdf44ddda502522 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 29 Aug 2018 16:43:55 +0300 Subject: [PATCH 008/237] Added ENS mainnet simple resolver --- src/Network/Ethereum/Ens.hs | 50 ++++++++++++++++++++++ src/Network/Ethereum/Ens/PublicResolver.hs | 24 +++++++++++ src/Network/Ethereum/Ens/Registry.hs | 24 +++++++++++ 3 files changed, 98 insertions(+) create mode 100644 src/Network/Ethereum/Ens.hs create mode 100644 src/Network/Ethereum/Ens/PublicResolver.hs create mode 100644 src/Network/Ethereum/Ens/Registry.hs diff --git a/src/Network/Ethereum/Ens.hs b/src/Network/Ethereum/Ens.hs new file mode 100644 index 00000000..d4d2cd75 --- /dev/null +++ b/src/Network/Ethereum/Ens.hs @@ -0,0 +1,50 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ethereum.Ens +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- ENS offers a secure & decentralised way to address resources both on +-- and off the blockchain using simple, human-readable names. +-- +-- This module provide basic ENS resolvers. +-- + +module Network.Ethereum.Ens where + +import Crypto.Hash (Digest, Keccak_256, hash) +import Data.ByteArray (convert, zero) +import Data.ByteArray.Sized (unsafeFromByteArrayAccess) +import Data.ByteString (ByteString) +import Data.ByteString.Char8 (split) +import Data.Default (def) +import Data.Solidity.Prim (Address, BytesN) +import Network.Ethereum.Api.Provider (Web3) +import Network.Ethereum.Api.Types (Call (callTo), + DefaultBlock (Latest)) +import qualified Network.Ethereum.Ens.PublicResolver as Resolver +import qualified Network.Ethereum.Ens.Registry as Reg + +-- | Namehash algorithm implementation: http://docs.ens.domains/en/latest/implementers.html#algorithm +namehash :: ByteString -> BytesN 32 +namehash = + unsafeFromByteArrayAccess . foldr algo (zero 32) . split '.' + where + algo a b = sha3 (b <> sha3 a) + sha3 :: ByteString -> ByteString + sha3 bs = convert (hash bs :: Digest Keccak_256) + +-- | Get address of ENS domain +resolve :: ByteString -> Web3 Address +resolve name = do + r <- Reg.resolver (def { callTo = Just ensRegistry }) Latest node + Resolver.addr (def { callTo = Just r }) Latest node + where + node = namehash name + ensRegistry = "0x314159265dD8dbb310642f98f50C066173C1259b" diff --git a/src/Network/Ethereum/Ens/PublicResolver.hs b/src/Network/Ethereum/Ens/PublicResolver.hs new file mode 100644 index 00000000..bfb17633 --- /dev/null +++ b/src/Network/Ethereum/Ens/PublicResolver.hs @@ -0,0 +1,24 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} + +-- | +-- Module : Network.Ethereum.Ens.PublicResolver +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Ethereum Name System public resolver smart contract. +-- + +module Network.Ethereum.Ens.PublicResolver where + +import Network.Ethereum.Contract.TH + +[abi|[{"constant":true,"inputs":[{"name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"},{"name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"name":"contentType","type":"uint256"},{"name":"data","type":"bytes"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"x","type":"bytes32"},{"name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"content","outputs":[{"name":"ret","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"addr","outputs":[{"name":"ret","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"contentType","type":"uint256"},{"name":"data","type":"bytes"}],"name":"setABI","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"name","outputs":[{"name":"ret","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"name","type":"string"}],"name":"setName","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"hash","type":"bytes32"}],"name":"setContent","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"name":"x","type":"bytes32"},{"name":"y","type":"bytes32"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"addr","type":"address"}],"name":"setAddr","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"ensAddr","type":"address"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"hash","type":"bytes32"}],"name":"ContentChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":true,"name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"x","type":"bytes32"},{"indexed":false,"name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"}]|] diff --git a/src/Network/Ethereum/Ens/Registry.hs b/src/Network/Ethereum/Ens/Registry.hs new file mode 100644 index 00000000..c5c15c6a --- /dev/null +++ b/src/Network/Ethereum/Ens/Registry.hs @@ -0,0 +1,24 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} + +-- | +-- Module : Network.Ethereum.Ens.Registry +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Ethereum Name System registry smart contract. +-- + +module Network.Ethereum.Ens.Registry where + +import Network.Ethereum.Contract.TH + +[abi|[{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"resolver","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"label","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setSubnodeOwner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"ttl","outputs":[{"name":"","type":"uint64"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":true,"name":"label","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"NewOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"resolver","type":"address"}],"name":"NewResolver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"ttl","type":"uint64"}],"name":"NewTTL","type":"event"}]|] From 8d855645e08ae6e10f40e96d9036f3a3f3dedd11 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 29 Aug 2018 17:07:37 +0300 Subject: [PATCH 009/237] Added tls flag condition to package.yaml --- package.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.yaml b/package.yaml index 9bff6aba..023f44b1 100644 --- a/package.yaml +++ b/package.yaml @@ -83,6 +83,10 @@ flags: library: source-dirs: src + when: + - condition: flag(tls) + cpp-options: -DTLS_MANAGER + dependencies: http-client-tls tests: unit: From cfe07021f802c5392686bf0a31b9f3f3381dbbf2 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 30 Aug 2018 16:34:33 +0300 Subject: [PATCH 010/237] WIP: account abstraction, added account type class --- src/Network/Ethereum/Account.hs | 35 +++++++++++++ src/Network/Ethereum/Contract.hs | 86 ++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 src/Network/Ethereum/Account.hs create mode 100644 src/Network/Ethereum/Contract.hs diff --git a/src/Network/Ethereum/Account.hs b/src/Network/Ethereum/Account.hs new file mode 100644 index 00000000..66d2cee3 --- /dev/null +++ b/src/Network/Ethereum/Account.hs @@ -0,0 +1,35 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FunctionalDependencies #-} +{-# LANGUAGE MultiParamTypeClasses #-} + +-- | +-- Module : Network.Ethereum.Account +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- +-- + +module Network.Ethereum.Account where + +import Data.HexString (HexString) +import Network.Ethereum.Contract.Method (Method) +import Network.JsonRpc.TinyClient (JsonRpcM) + +class Account a t | t -> a where + withAccount :: JsonRpcM m + => a + -> t m b + -> m b + + send :: (JsonRpcM m, Method b) + => b + -> t m HexString + + call :: (JsonRpcM m, Method b) + => b + -> t m HexString diff --git a/src/Network/Ethereum/Contract.hs b/src/Network/Ethereum/Contract.hs new file mode 100644 index 00000000..51dbfde9 --- /dev/null +++ b/src/Network/Ethereum/Contract.hs @@ -0,0 +1,86 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeSynonymInstances #-} + +-- | +-- Module : Network.Ethereum.Contract +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- +-- + +module Network.Ethereum.Contract where + +import Control.Monad.State (StateT, get, runStateT, + withStateT) +import Control.Monad.Trans (lift) +import qualified Data.ByteArray as BA (convert) +import Data.Default (Default (..)) +import Data.Proxy (Proxy (..)) +import Data.Solidity.Abi.Codec (encode) +import Data.Solidity.Prim (Address) +import Lens.Micro ((.~), (^.)) +import Lens.Micro.TH (makeLenses) +import Network.Ethereum.Account (Account (..)) +import qualified Network.Ethereum.Api.Eth as Eth (call, sendTransaction) +import Network.Ethereum.Api.Types (Call (..), + DefaultBlock (Latest)) +import Network.Ethereum.Contract.Method (selector) +import Network.Ethereum.Unit (Unit (toWei)) + +data CallState = CallState + { _target :: Address + , _value :: Integer + , _gas :: Maybe Integer + , _gasPrice :: Maybe Integer + , _block :: DefaultBlock + } deriving (Eq, Show) + +instance Default CallState where + def = CallState "0x0000000000000000000000000000000000000000" def def def Latest + +makeLenses ''CallState + +type ContractT = StateT CallState + +instance Account () ContractT where + withAccount _ = fmap fst . flip runStateT def + + send (args :: a) = do + s <- get + lift $ Eth.sendTransaction $ + def { callTo = Just (s ^. target) + , callGas = fmap fromInteger (s ^. gas) + , callGasPrice = fmap fromInteger (s ^. gasPrice) + , callValue = Just $ fromInteger (s ^. value) + , callData = Just $ BA.convert dat } + where dat = selector (Proxy :: Proxy a) <> encode args + + call (args :: a) = do + s <- get + lift $ flip Eth.call (s ^. block) $ + def { callTo = Just (s ^. target) + , callData = Just $ BA.convert dat } + where dat = selector (Proxy :: Proxy a) <> encode args + +withTarget :: Address + -> ContractT m a + -> ContractT m a +{-# INLINE withTarget #-} +withTarget a = withStateT (target .~ a) + +withValue :: Unit value + => value + -> ContractT m a + -> ContractT m a +{-# INLINE withValue #-} +withValue a = withStateT (value .~ toWei a) From c60d85e73daa43f1b488f513f6b519d0f3feade4 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 31 Aug 2018 15:38:45 +0300 Subject: [PATCH 011/237] Upgraded TH generator for using account type class --- src/Network/Ethereum/Account.hs | 32 ++++++++-- src/Network/Ethereum/Contract.hs | 55 ++++++++++------- src/Network/Ethereum/Contract/Method.hs | 69 ++-------------------- src/Network/Ethereum/Contract/TH.hs | 59 +++++++++--------- src/Network/Ethereum/Ens.hs | 12 ++-- src/Network/Ethereum/Ens/PublicResolver.hs | 1 + src/Network/Ethereum/Ens/Registry.hs | 1 + src/Network/Ethereum/Web3.hs | 17 +++--- 8 files changed, 115 insertions(+), 131 deletions(-) diff --git a/src/Network/Ethereum/Account.hs b/src/Network/Ethereum/Account.hs index 66d2cee3..1921c6b6 100644 --- a/src/Network/Ethereum/Account.hs +++ b/src/Network/Ethereum/Account.hs @@ -17,19 +17,39 @@ module Network.Ethereum.Account where import Data.HexString (HexString) +import Data.Solidity.Abi (AbiGet) +import Network.Ethereum.Api.Types (TxReceipt) import Network.Ethereum.Contract.Method (Method) import Network.JsonRpc.TinyClient (JsonRpcM) +-- | class Account a t | t -> a where + -- | Run account monad with given account credentials withAccount :: JsonRpcM m => a + -- ^ Account credentials like password or private key -> t m b + -- ^ Monad transformer that handle account oriented rpc communication -> m b + -- ^ Json-rpc monad + + -- | Send transaction like a 'write' command + send :: (JsonRpcM m, Method args) + => args + -- ^ Function arguments encoded as 'Method' call + -> t m TxReceipt + -- ^ Receipt of sended transaction - send :: (JsonRpcM m, Method b) - => b - -> t m HexString + -- | Fast version of 'send' function excluding gas estimation and receipt waiting + send' :: (JsonRpcM m, Method args) + => args + -- ^ Function arguments encoded as 'Method' call + -> t m HexString + -- ^ Hash of sended transaction - call :: (JsonRpcM m, Method b) - => b - -> t m HexString + -- | Call constant function like a 'read' command + call :: (JsonRpcM m, Method args, AbiGet result) + => args + -- ^ Function arguments encoded as 'Method' call + -> t m result + -- ^ Decoded result of function call diff --git a/src/Network/Ethereum/Contract.hs b/src/Network/Ethereum/Contract.hs index 51dbfde9..3d39342d 100644 --- a/src/Network/Ethereum/Contract.hs +++ b/src/Network/Ethereum/Contract.hs @@ -20,22 +20,23 @@ module Network.Ethereum.Contract where +import Control.Monad.Catch (throwM) import Control.Monad.State (StateT, get, runStateT, withStateT) import Control.Monad.Trans (lift) import qualified Data.ByteArray as BA (convert) import Data.Default (Default (..)) import Data.Proxy (Proxy (..)) -import Data.Solidity.Abi.Codec (encode) +import Data.Solidity.Abi.Codec (decode, encode) import Data.Solidity.Prim (Address) import Lens.Micro ((.~), (^.)) import Lens.Micro.TH (makeLenses) import Network.Ethereum.Account (Account (..)) import qualified Network.Ethereum.Api.Eth as Eth (call, sendTransaction) +import Network.Ethereum.Api.Provider (Web3Error (ParserFail)) import Network.Ethereum.Api.Types (Call (..), DefaultBlock (Latest)) import Network.Ethereum.Contract.Method (selector) -import Network.Ethereum.Unit (Unit (toWei)) data CallState = CallState { _target :: Address @@ -52,35 +53,47 @@ makeLenses ''CallState type ContractT = StateT CallState +getCall :: Monad m => ContractT m Call +getCall = do + s <- get + return $ + def { callTo = Just (s ^. target) + , callGas = fmap fromInteger (s ^. gas) + , callGasPrice = fmap fromInteger (s ^. gasPrice) + , callValue = Just $ fromInteger (s ^. value) } + instance Account () ContractT where withAccount _ = fmap fst . flip runStateT def - send (args :: a) = do - s <- get + send' (args :: a) = do + c <- getCall lift $ Eth.sendTransaction $ - def { callTo = Just (s ^. target) - , callGas = fmap fromInteger (s ^. gas) - , callGasPrice = fmap fromInteger (s ^. gasPrice) - , callValue = Just $ fromInteger (s ^. value) - , callData = Just $ BA.convert dat } - where dat = selector (Proxy :: Proxy a) <> encode args + c { callData = Just $ BA.convert dat } + where + dat = selector (Proxy :: Proxy a) <> encode args + + send = undefined call (args :: a) = do + c <- getCall s <- get - lift $ flip Eth.call (s ^. block) $ - def { callTo = Just (s ^. target) - , callData = Just $ BA.convert dat } - where dat = selector (Proxy :: Proxy a) <> encode args + res <- lift $ flip Eth.call (s ^. block) $ + c { callData = Just $ BA.convert dat } + case decode res of + Left e -> lift $ throwM $ ParserFail $ "Unable to parse response: " ++ e + Right x -> return x + where + dat = selector (Proxy :: Proxy a) <> encode args + +{- +data PersonalAccount = PersonalAccount Int Text + +instance Account PersonalAccount ContractT where + withAccount (PersonalAccount ix pass) = +-} withTarget :: Address -> ContractT m a -> ContractT m a {-# INLINE withTarget #-} withTarget a = withStateT (target .~ a) - -withValue :: Unit value - => value - -> ContractT m a - -> ContractT m a -{-# INLINE withValue #-} -withValue a = withStateT (value .~ toWei a) diff --git a/src/Network/Ethereum/Contract/Method.hs b/src/Network/Ethereum/Contract/Method.hs index b80c77a7..5f32beb8 100644 --- a/src/Network/Ethereum/Contract/Method.hs +++ b/src/Network/Ethereum/Contract/Method.hs @@ -12,26 +12,12 @@ -- Ethereum contract method support. -- -module Network.Ethereum.Contract.Method ( - Method(..) - , call - , sendTx - , sendTx' - ) where +module Network.Ethereum.Contract.Method where -import Control.Monad.Catch (throwM) -import Data.ByteArray (convert) -import Data.HexString (HexString) -import Data.Monoid ((<>)) -import Data.Proxy (Proxy (..)) -import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) -import Data.Solidity.Abi.Codec (decode, encode) -import Data.Solidity.Prim.Bytes (Bytes) -import Data.Text (Text) -import qualified Network.Ethereum.Api.Eth as Eth -import qualified Network.Ethereum.Api.Personal as Personal (sendTransaction) -import Network.Ethereum.Api.Provider (Web3, Web3Error (ParserFail)) -import Network.Ethereum.Api.Types (Call (callData), DefaultBlock) +import Data.Proxy (Proxy) +import Data.Solidity.Abi (AbiPut, AbiType (..)) +import Data.Solidity.Abi.Generic () +import Data.Solidity.Prim.Bytes (Bytes) class AbiPut a => Method a where selector :: Proxy a -> Bytes @@ -44,48 +30,3 @@ instance AbiPut () -- | Send transaction without method selection instance Method () where selector = mempty - --- | 'sendTx' is used to submit a state changing transaction. -sendTx :: Method a - => Call - -- ^ Call configuration - -> a - -- ^ method data - -> Web3 HexString -sendTx call' (dat :: a) = - let sel = selector (Proxy :: Proxy a) - cdata = sel <> encode dat - in Eth.sendTransaction (call' { callData = Just $ convert cdata }) - -sendTx' :: Method a - => Text - -- ^ Password for account unlocking - -> Call - -- ^ Call configuration - -> a - -- ^ method data - -> Web3 HexString -sendTx' pass call' (dat :: a) = do - let sel = selector (Proxy :: Proxy a) - cdata = sel <> encode dat - callArgs = call' { callData = Just $ convert cdata } - Personal.sendTransaction callArgs pass - --- | 'call' is used to call contract methods that have no state changing effects. -call :: (Method a, AbiGet b) - => Call - -- ^ Call configuration - -> DefaultBlock - -- ^ State mode for constant call (latest or pending) - -> a - -- ^ Method data - -> Web3 b - -- ^ 'Web3' wrapped result -call call' mode (dat :: a) = do - let sel = selector (Proxy :: Proxy a) - cdata = sel <> encode dat - c = (call' { callData = Just $ convert cdata }) - res <- Eth.call c mode - case decode res of - Left e -> throwM $ ParserFail $ "Unable to parse response: " ++ e - Right x -> return x diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index fe268e54..90eb8105 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -56,7 +56,6 @@ import Language.Haskell.TH.Quote import Lens.Micro ((^?)) import Lens.Micro.Aeson (key, _JSON) -import Data.HexString (HexString) import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Abi.Json (ContractAbi (..), Declaration (..), @@ -68,10 +67,11 @@ import Data.Solidity.Event (IndexedEvent (..)) import Data.Solidity.Prim (Address, Bytes, BytesN, IntN, ListN, Singleton (..), UIntN) import Data.String.Extra (toLowerFirst, toUpperFirst) -import Network.Ethereum.Api.Provider (Web3) -import Network.Ethereum.Api.Types (Call, DefaultBlock (..), - Filter (..)) -import Network.Ethereum.Contract.Method (Method (..), call, sendTx) +import Network.Ethereum.Account (Account (..)) +import Network.Ethereum.Api.Types (DefaultBlock (..), + Filter (..), TxReceipt) +import Network.Ethereum.Contract.Method (Method (..)) +import Network.JsonRpc.TinyClient (JsonRpcM) -- | Read contract Abi from file abiFrom :: QuasiQuoter @@ -143,33 +143,36 @@ funWrapper :: Bool -> Maybe [FunctionArg] -- ^ Results -> DecsQ -funWrapper c name dname args result = - if c - then do - a : b : vars <- replicateM (length args + 2) (newName "t") - let params = appsE $ conE dname : fmap varE vars - sequence [ sigD name $ [t|$(arrowing $ [t|Call|] : [t|DefaultBlock|] : inputT ++ [outputT])|] - , funD' name (varP <$> a : b : vars) $ - case result of - Just [_] -> [|unSingleton <$> call $(varE a) $(varE b) $(params)|] - _ -> [|call $(varE a) $(varE b) $(params)|] - ] - else do - a : _ : vars <- replicateM (length args + 2) (newName "t") - let params = appsE $ conE dname : fmap varE vars - sequence [ sigD name $ [t|$(arrowing $ [t|Call|] : inputT ++ [[t|Web3 HexString|]])|] - , funD' name (varP <$> a : vars) $ - [|sendTx $(varE a) $(params)|] ] +funWrapper c name dname args result = do + vars <- replicateM (length args) (newName "t") + a <- varT <$> newName "a" + t <- varT <$> newName "t" + m <- varT <$> newName "m" + + + let params = appsE $ conE dname : fmap varE vars + inputT = fmap (typeQ . funArgType) args + outputT = case result of + Nothing -> [t|$t $m ()|] + Just [x] -> [t|$t $m $(typeQ $ funArgType x)|] + Just xs -> let outs = fmap (typeQ . funArgType) xs + in [t|$t $m $(foldl appT (tupleT (length xs)) outs)|] + + sequence [ + sigD name $ [t| + (JsonRpcM $m, Account $a $t, Functor ($t $m)) => + $(arrowing $ inputT ++ [if c then outputT else [t|$t $m TxReceipt|]]) + |] + , if c + then funD' name (varP <$> vars) $ case result of + Just [_] -> [|unSingleton <$> call $(params)|] + _ -> [|call $(params)|] + else funD' name (varP <$> vars) $ [|send $(params)|] + ] where arrowing [] = error "Impossible branch call" arrowing [x] = x arrowing (x : xs) = [t|$x -> $(arrowing xs)|] - inputT = fmap (typeQ . funArgType) args - outputT = case result of - Nothing -> [t|Web3 ()|] - Just [x] -> [t|Web3 $(typeQ $ funArgType x)|] - Just xs -> let outs = fmap (typeQ . funArgType) xs - in [t|Web3 $(foldl appT (tupleT (length xs)) outs)|] mkDecl :: Declaration -> DecsQ diff --git a/src/Network/Ethereum/Ens.hs b/src/Network/Ethereum/Ens.hs index d4d2cd75..85d11826 100644 --- a/src/Network/Ethereum/Ens.hs +++ b/src/Network/Ethereum/Ens.hs @@ -1,4 +1,5 @@ {-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} -- | @@ -25,11 +26,14 @@ import Data.ByteString (ByteString) import Data.ByteString.Char8 (split) import Data.Default (def) import Data.Solidity.Prim (Address, BytesN) +import Network.Ethereum.Account (Account) import Network.Ethereum.Api.Provider (Web3) import Network.Ethereum.Api.Types (Call (callTo), DefaultBlock (Latest)) +import Network.Ethereum.Contract (ContractT, withTarget) import qualified Network.Ethereum.Ens.PublicResolver as Resolver import qualified Network.Ethereum.Ens.Registry as Reg +import Network.JsonRpc.TinyClient (JsonRpcM) -- | Namehash algorithm implementation: http://docs.ens.domains/en/latest/implementers.html#algorithm namehash :: ByteString -> BytesN 32 @@ -41,10 +45,10 @@ namehash = sha3 bs = convert (hash bs :: Digest Keccak_256) -- | Get address of ENS domain -resolve :: ByteString -> Web3 Address +resolve :: JsonRpcM m => ByteString -> ContractT m Address resolve name = do - r <- Reg.resolver (def { callTo = Just ensRegistry }) Latest node - Resolver.addr (def { callTo = Just r }) Latest node + r <- ensRegistry $ Reg.resolver node + withTarget r $ Resolver.addr node where node = namehash name - ensRegistry = "0x314159265dD8dbb310642f98f50C066173C1259b" + ensRegistry = withTarget "0x314159265dD8dbb310642f98f50C066173C1259b" diff --git a/src/Network/Ethereum/Ens/PublicResolver.hs b/src/Network/Ethereum/Ens/PublicResolver.hs index bfb17633..8d35672e 100644 --- a/src/Network/Ethereum/Ens/PublicResolver.hs +++ b/src/Network/Ethereum/Ens/PublicResolver.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/src/Network/Ethereum/Ens/Registry.hs b/src/Network/Ethereum/Ens/Registry.hs index c5c15c6a..a10d7703 100644 --- a/src/Network/Ethereum/Ens/Registry.hs +++ b/src/Network/Ethereum/Ens/Registry.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/src/Network/Ethereum/Web3.hs b/src/Network/Ethereum/Web3.hs index 42669d29..c71b20e3 100644 --- a/src/Network/Ethereum/Web3.hs +++ b/src/Network/Ethereum/Web3.hs @@ -24,9 +24,9 @@ module Network.Ethereum.Web3 ( , runWeb3 -- ** Basic transaction sending - , sendTx - , sendTx' - , Call(..) + , Account(..) + , withTarget + , value -- ** Basic event listening , EventAction(..) @@ -42,9 +42,10 @@ module Network.Ethereum.Web3 ( ) where import Data.Solidity.Prim -import Network.Ethereum.Api.Provider (Web3, runWeb3) -import Network.Ethereum.Api.Types (Call (..)) -import Network.Ethereum.Contract.Event (EventAction (..), event, - event') -import Network.Ethereum.Contract.Method (sendTx, sendTx') +import Network.Ethereum.Account (Account (..)) +import Network.Ethereum.Api.Provider (Web3, runWeb3) +import Network.Ethereum.Api.Types (Call (..)) +import Network.Ethereum.Contract (value, withTarget) +import Network.Ethereum.Contract.Event (EventAction (..), event, + event') import Network.Ethereum.Unit From e2e4a0898e0a674cce004940dc5f19a892acbdb2 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 5 Sep 2018 12:34:11 +0300 Subject: [PATCH 012/237] Move Solidity JSON ABI parsers to Language.Solidity.Abi --- .../Solidity/Abi/Json.hs => Language/Solidity/Abi.hs} | 4 ++-- src/Network/Ethereum/Contract/TH.hs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) rename src/{Data/Solidity/Abi/Json.hs => Language/Solidity/Abi.hs} (99%) diff --git a/src/Data/Solidity/Abi/Json.hs b/src/Language/Solidity/Abi.hs similarity index 99% rename from src/Data/Solidity/Abi/Json.hs rename to src/Language/Solidity/Abi.hs index 60e592a4..f8d91910 100644 --- a/src/Data/Solidity/Abi/Json.hs +++ b/src/Language/Solidity/Abi.hs @@ -3,7 +3,7 @@ -- | -- Module : Data.Solidity.Abi.Json --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -13,7 +13,7 @@ -- JSON encoded contract ABI parsers. -- -module Data.Solidity.Abi.Json ( +module Language.Solidity.Abi ( ContractAbi(..) , Declaration(..) , FunctionArg(..) diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 90eb8105..e56ae293 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -57,16 +57,16 @@ import Lens.Micro ((^?)) import Lens.Micro.Aeson (key, _JSON) import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) -import Data.Solidity.Abi.Json (ContractAbi (..), +import Data.Solidity.Event (IndexedEvent (..)) +import Data.Solidity.Prim (Address, Bytes, BytesN, IntN, + ListN, Singleton (..), UIntN) +import Data.String.Extra (toLowerFirst, toUpperFirst) +import Language.Solidity.Abi (ContractAbi (..), Declaration (..), EventArg (..), FunctionArg (..), SolidityType (..), eventId, methodId, parseSolidityType) -import Data.Solidity.Event (IndexedEvent (..)) -import Data.Solidity.Prim (Address, Bytes, BytesN, IntN, - ListN, Singleton (..), UIntN) -import Data.String.Extra (toLowerFirst, toUpperFirst) import Network.Ethereum.Account (Account (..)) import Network.Ethereum.Api.Types (DefaultBlock (..), Filter (..), TxReceipt) From e089e7da74625e3c4a0053a6dd4fd1b91298f8a0 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 4 Oct 2018 18:12:57 +0300 Subject: [PATCH 013/237] WIP: account abstraction, finish typeclass * Added instance for default account * Added instance for 'personal' accounts * Added function for sending transaction with confirmations * Removed 'convert' function from Unit typeclass as useless --- CHANGELOG.md | 22 +++++ examples/ERC20.hs | 1 + examples/TokenInfo.hs | 30 +++---- src/Network/Ethereum/Account.hs | 57 ++++-------- src/Network/Ethereum/Account/Class.hs | 54 ++++++++++++ src/Network/Ethereum/Account/Default.hs | 68 ++++++++++++++ src/Network/Ethereum/Account/Internal.hs | 108 +++++++++++++++++++++++ src/Network/Ethereum/Account/Personal.hs | 71 +++++++++++++++ src/Network/Ethereum/Account/Safe.hs | 50 +++++++++++ src/Network/Ethereum/Contract.hs | 88 ++++-------------- src/Network/Ethereum/Contract/Method.hs | 8 +- src/Network/Ethereum/Contract/TH.hs | 2 +- src/Network/Ethereum/Ens.hs | 19 ++-- src/Network/Ethereum/Unit.hs | 4 - src/Network/Ethereum/Web3.hs | 7 +- stack.yaml | 2 +- 16 files changed, 437 insertions(+), 154 deletions(-) create mode 100644 src/Network/Ethereum/Account/Class.hs create mode 100644 src/Network/Ethereum/Account/Default.hs create mode 100644 src/Network/Ethereum/Account/Internal.hs create mode 100644 src/Network/Ethereum/Account/Personal.hs create mode 100644 src/Network/Ethereum/Account/Safe.hs diff --git a/CHANGELOG.md b/CHANGELOG.md index 79882327..ded3a1e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,28 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.8.0.0] 2018-10-** +### Added +- Local private key transaction signer +- Generalized JSON-RPC monad for API methods +- Support for multiple transaction sending methods via one `Account` api +- Monad based transaction sending parametrization +- Experimental support for solidity compiler (disabled by default) +- Support for Ethereum mainnet ENS resolver +- Event single/multi filters +- HexString data type +- Personal api calls +- Address checksum + +### Changed +- package.yaml instead web3.cabal package descriptor +- Solidity related data types and codecs moved to Data.Solidity +- Solidity related parsers and compiler moved to Language.Solidity +- Modules in Network.Ethereum.Web3 moved to Network.Ethereum.Api + +### Removed +- `convert` function from `Unit` typeclass + ## [0.7.3.0] 2018-05-22 ### Added - 'Network.Ethereum.ABI.Prim' meta-module as primitive types and instances aggregator. diff --git a/examples/ERC20.hs b/examples/ERC20.hs index da17f14d..75c1a11f 100644 --- a/examples/ERC20.hs +++ b/examples/ERC20.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/examples/TokenInfo.hs b/examples/TokenInfo.hs index e0f1c885..0fc675fd 100644 --- a/examples/TokenInfo.hs +++ b/examples/TokenInfo.hs @@ -1,29 +1,27 @@ {-# LANGUAGE OverloadedStrings #-} module Main where -import Data.Default (def) -import Data.Text (unpack) -import Text.Printf (printf) +import Data.Default (def) +import Data.Text (unpack) +import Text.Printf (printf) -import Network.Ethereum.Contract.TH -import Network.Ethereum.Web3 hiding (name) +import Network.Ethereum.Account +import Network.Ethereum.Web3 hiding (name) import ERC20 main :: IO () main = do - result <- runWeb3 $ do - n <- name tokenCall - s <- symbol tokenCall - d <- decimals tokenCall - return $ printf "Token %s with symbol %s and decimals %d" + result <- runWeb3 $ + withAccount () $ + airaToken $ do + n <- name + s <- symbol + d <- decimals + return $ printf "Token %s with symbol %s and decimals %d" (unpack n) (unpack s) (fromIntegral d :: Int) case result of - Left err -> print err + Left err -> error err Right info -> putStrLn info where - token :: Address - token = "0xA2f4FCb0FDe2dD59f7a1873e121bc5623e3164Eb" - - tokenCall :: Call - tokenCall = def { callTo = Just token } + airaToken = withParam $ to .~ "0xA2f4FCb0FDe2dD59f7a1873e121bc5623e3164Eb" diff --git a/src/Network/Ethereum/Account.hs b/src/Network/Ethereum/Account.hs index 1921c6b6..98f30ba8 100644 --- a/src/Network/Ethereum/Account.hs +++ b/src/Network/Ethereum/Account.hs @@ -1,7 +1,3 @@ -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FunctionalDependencies #-} -{-# LANGUAGE MultiParamTypeClasses #-} - -- | -- Module : Network.Ethereum.Account -- Copyright : Alexander Krupenkin 2018 @@ -11,45 +7,26 @@ -- Stability : experimental -- Portability : unportable -- --- --- -module Network.Ethereum.Account where +module Network.Ethereum.Account ( + Account(..) -import Data.HexString (HexString) -import Data.Solidity.Abi (AbiGet) -import Network.Ethereum.Api.Types (TxReceipt) -import Network.Ethereum.Contract.Method (Method) -import Network.JsonRpc.TinyClient (JsonRpcM) + , DefaultAccount --- | -class Account a t | t -> a where - -- | Run account monad with given account credentials - withAccount :: JsonRpcM m - => a - -- ^ Account credentials like password or private key - -> t m b - -- ^ Monad transformer that handle account oriented rpc communication - -> m b - -- ^ Json-rpc monad + , PersonalAccount + , Personal(..) + + , withParam + , to + , (&) + , (.~) - -- | Send transaction like a 'write' command - send :: (JsonRpcM m, Method args) - => args - -- ^ Function arguments encoded as 'Method' call - -> t m TxReceipt - -- ^ Receipt of sended transaction + ) where - -- | Fast version of 'send' function excluding gas estimation and receipt waiting - send' :: (JsonRpcM m, Method args) - => args - -- ^ Function arguments encoded as 'Method' call - -> t m HexString - -- ^ Hash of sended transaction +import Lens.Micro ((&), (.~)) - -- | Call constant function like a 'read' command - call :: (JsonRpcM m, Method args, AbiGet result) - => args - -- ^ Function arguments encoded as 'Method' call - -> t m result - -- ^ Decoded result of function call +import Network.Ethereum.Account.Class (Account (..)) +import Network.Ethereum.Account.Default (DefaultAccount) +import Network.Ethereum.Account.Internal (to, withParam) +import Network.Ethereum.Account.Personal (Personal (..), + PersonalAccount) diff --git a/src/Network/Ethereum/Account/Class.hs b/src/Network/Ethereum/Account/Class.hs new file mode 100644 index 00000000..3eaf0e24 --- /dev/null +++ b/src/Network/Ethereum/Account/Class.hs @@ -0,0 +1,54 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FunctionalDependencies #-} +{-# LANGUAGE MultiParamTypeClasses #-} + +-- | +-- Module : Network.Ethereum.Account.Class +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + +module Network.Ethereum.Account.Class where + +import Control.Monad.Trans (MonadTrans) + +import Data.Solidity.Abi (AbiGet) +import Network.Ethereum.Api.Types (TxReceipt) +import Network.Ethereum.Contract.Method (Method) +import Network.JsonRpc.TinyClient (JsonRpcM) + +-- | Account is needed for sending transactions to blockchain +-- +-- Typically account is provided by node. In this case node manage accounts: +-- encrypt and decrypt private keys, manipulate files etc. In other case web3 +-- can derive account from private key and send to node already signed transactions. +-- +class MonadTrans t => Account a t | t -> a where + + -- | Run computation with given account credentials + withAccount :: JsonRpcM m + => a + -- ^ Account params (like a password or private key) + -> t m b + -- ^ Computation that use account for sending transactions + -> m b + -- ^ Json-rpc monad + + -- | Send transaction to contract, like a 'write' command + send :: (JsonRpcM m, Method args) + => args + -- ^ Contract method arguments + -> t m TxReceipt + -- ^ Receipt of sended transaction + + -- | Call constant method of contract, like a 'read' command + call :: (JsonRpcM m, Method args, AbiGet result) + => args + -- ^ Contact method arguments + -> t m result + -- ^ Decoded result of method call + diff --git a/src/Network/Ethereum/Account/Default.hs b/src/Network/Ethereum/Account/Default.hs new file mode 100644 index 00000000..394fd208 --- /dev/null +++ b/src/Network/Ethereum/Account/Default.hs @@ -0,0 +1,68 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeSynonymInstances #-} + +-- | +-- Module : Network.Ethereum.Account.Default +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + +module Network.Ethereum.Account.Default where + +import Control.Monad.Catch (throwM) +import Control.Monad.State.Strict (get, runStateT) +import Control.Monad.Trans (MonadTrans (..)) +import qualified Data.ByteArray as BA (convert) +import Data.Proxy (Proxy (..)) + +import Data.Solidity.Abi.Codec (decode, encode) +import Network.Ethereum.Account.Class (Account (..)) +import Network.Ethereum.Account.Internal (AccountT (..), + CallParam (..), + defaultCallParam, getCall, + getReceipt) +import qualified Network.Ethereum.Api.Eth as Eth (accounts, call, + sendTransaction) +import Network.Ethereum.Api.Provider (Web3Error (ParserFail)) +import Network.Ethereum.Api.Types (Call (callData, callFrom)) +import Network.Ethereum.Contract.Method (Method (..)) + +type DefaultAccount = AccountT () + +instance Account () DefaultAccount where + withAccount _ = + fmap fst . flip runStateT (defaultCallParam ()) . runAccountT + + send (args :: a) = do + c <- getCall + lift $ do + let dat = selector (Proxy :: Proxy a) <> encode args + params = c { callData = Just $ BA.convert dat } + accounts <- Eth.accounts + tx <- Eth.sendTransaction $ + case accounts of + (a : _) -> params { callFrom = Just a } + _ -> params + getReceipt tx + + call (args :: a) = do + c <- getCall + let dat = selector (Proxy :: Proxy a) <> encode args + params = c { callData = Just $ BA.convert dat } + s <- get + case s of + CallParam _ _ _ _ block _ -> do + res <- lift $ do + accounts <- Eth.accounts + flip Eth.call block $ case accounts of + (a : _) -> params { callFrom = Just a } + _ -> params + case decode res of + Right r -> return r + Left e -> lift $ throwM (ParserFail e) diff --git a/src/Network/Ethereum/Account/Internal.hs b/src/Network/Ethereum/Account/Internal.hs new file mode 100644 index 00000000..27e04eaa --- /dev/null +++ b/src/Network/Ethereum/Account/Internal.hs @@ -0,0 +1,108 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ethereum.Account.Internal +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + +module Network.Ethereum.Account.Internal where + +import Control.Concurrent (threadDelay) +import Control.Monad.IO.Class (liftIO) +import Control.Monad.State.Strict (MonadState (..), StateT (..), + withStateT) +import Control.Monad.Trans (MonadTrans (..)) +import Data.Default (Default (..)) +import Data.HexString (HexString) +import Data.Solidity.Prim (Address) +import Lens.Micro (Lens', lens) +import Network.Ethereum.Account.Class (Account) +import qualified Network.Ethereum.Api.Eth as Eth (getTransactionReceipt) +import Network.Ethereum.Api.Types (Call (..), + DefaultBlock (Latest), + TxReceipt (receiptTransactionHash)) +import Network.Ethereum.Unit (Unit (toWei), Wei) +import Network.JsonRpc.TinyClient (JsonRpcM) + +-- | Account is needed to send transactions to blockchain + +-- | TODO +data CallParam p where + CallParam :: (Unit value, Unit gasprice) + => Address + -- ^ Transaction recepient + -> value + -- ^ Transaction value + -> Maybe Integer + -- ^ Transaction gas limit + -> Maybe gasprice + -- ^ Transaction gas price + -> DefaultBlock + -- ^ Call block number + -> p + -- ^ Account params to sign transaction + -> CallParam p + +to :: Lens' (CallParam p) Address +to = lens getTo (flip setTo) + where + getTo = \case + CallParam t _ _ _ _ _ -> t + setTo t = \case + CallParam _ a b c d e -> CallParam t a b c d e + +-- | TODO +newtype AccountT p m a = AccountT + { runAccountT :: StateT (CallParam p) m a } + deriving (Functor, Applicative, Monad, MonadTrans) + +instance Monad m => MonadState (CallParam p) (AccountT p m) where + get = AccountT get + put = AccountT . put + +withParam :: Account p (AccountT p) + => (CallParam p -> CallParam p) + -> AccountT p m a + -> AccountT p m a +{-# INLINE withParam #-} +withParam f m = AccountT $ withStateT f $ runAccountT m + +defaultCallParam :: a -> CallParam a +{-# INLINE defaultCallParam #-} +defaultCallParam = + CallParam "0x0000000000000000000000000000000000000000" (0 :: Wei) Nothing (Nothing :: Maybe Wei) Latest + +getCall :: MonadState (CallParam t) m => m Call +getCall = do + s <- get + return $ case s of + CallParam recipient value gas gasprice _ _ -> + def { callTo = Just recipient + , callValue = Just (fromInteger $ toWei value) + , callGas = fromInteger <$> gas + , callGasPrice = (fromInteger . toWei) <$> gasprice + } + +getReceipt :: JsonRpcM m => HexString -> m TxReceipt +getReceipt tx = do + mbreceipt <- Eth.getTransactionReceipt tx + case mbreceipt of + Just receipt -> return receipt + Nothing -> do + liftIO $ threadDelay 100000 + -- | TODO: avoid inifinite loop + getReceipt tx + +updateReceipt :: JsonRpcM m => TxReceipt -> m TxReceipt +{-# INLINE updateReceipt #-} +updateReceipt = getReceipt . receiptTransactionHash diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs new file mode 100644 index 00000000..4e3bb734 --- /dev/null +++ b/src/Network/Ethereum/Account/Personal.hs @@ -0,0 +1,71 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeSynonymInstances #-} + +-- | +-- Module : Network.Ethereum.Account.Personal +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + +module Network.Ethereum.Account.Personal where + +import Control.Monad.State.Strict (get, runStateT) +import Control.Monad.Trans (lift) +import qualified Data.ByteArray as BA (convert) +import Data.Default (Default (..)) +import Data.Proxy (Proxy (..)) + +import Data.Solidity.Abi.Codec (decode, encode) +import Data.Solidity.Prim.Address (Address) +import Network.Ethereum.Account.Class (Account (..)) +import Network.Ethereum.Account.Internal (CallParam (..), + defaultCallParam) +import Network.Ethereum.Account.Internal (AccountT (..), getCall, + getReceipt) +import qualified Network.Ethereum.Api.Eth as Eth (call) +import Network.Ethereum.Api.Personal (Passphrase) +import qualified Network.Ethereum.Api.Personal as Personal (sendTransaction) +import Network.Ethereum.Api.Types (Call (callData, callFrom)) +import Network.Ethereum.Contract.Method (selector) + +data Personal = Personal !Address !Passphrase + deriving (Eq, Show) + +instance Default Personal where + def = Personal "0x0000000000000000000000000000000000000000" "" + +type PersonalAccount = AccountT Personal + +instance Account Personal PersonalAccount where + withAccount a = + fmap fst . flip runStateT (defaultCallParam a) . runAccountT + + send (args :: a) = do + s <- get + case s of + CallParam _ _ _ _ _ (Personal address passphrase) -> do + c <- getCall + let dat = selector (Proxy :: Proxy a) <> encode args + params = c { callFrom = Just address, callData = Just $ BA.convert dat } + lift $ do + tx <- Personal.sendTransaction params passphrase + getReceipt tx + + call (args :: a) = do + s <- get + case s of + CallParam _ _ _ _ block (Personal address _) -> do + c <- getCall + let dat = selector (Proxy :: Proxy a) <> encode args + params = c { callFrom = Just address, callData = Just $ BA.convert dat } + res <- lift $ Eth.call params block + case decode res of + Right r -> return r + Left e -> fail e diff --git a/src/Network/Ethereum/Account/Safe.hs b/src/Network/Ethereum/Account/Safe.hs new file mode 100644 index 00000000..6633422e --- /dev/null +++ b/src/Network/Ethereum/Account/Safe.hs @@ -0,0 +1,50 @@ +{-# LANGUAGE FlexibleContexts #-} + +-- | +-- Module : Network.Ethereum.Account.Safe +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- + +module Network.Ethereum.Account.Safe where + +import Control.Concurrent (threadDelay) +import Control.Monad.IO.Class (liftIO) +import Control.Monad.Trans (lift) + +import Network.Ethereum.Account.Class (Account (send)) +import Network.Ethereum.Account.Internal (updateReceipt) +import qualified Network.Ethereum.Api.Eth as Eth +import Network.Ethereum.Api.Types (TxReceipt (receiptBlockNumber)) +import Network.Ethereum.Contract.Method (Method) +import Network.JsonRpc.TinyClient (JsonRpcM) + +-- | Safe version of 'send' function of 'Account' typeclass +-- +-- Waiting for some blocks of transaction confirmation before return +safeSend :: (Account p t, JsonRpcM m, Method args, Monad (t m)) + => Integer + -- ^ Confirmation in blocks + -> args + -- ^ Contract method arguments + -> t m TxReceipt + -- ^ Receipt of sended transaction +safeSend b a = lift . waiting =<< send a + where + waiting receipt = + case receiptBlockNumber receipt of + Nothing -> do + liftIO $ threadDelay 1000000 + waiting =<< updateReceipt receipt + Just bn -> do + current <- Eth.blockNumber + if current - bn >= fromInteger b + then return receipt + else do liftIO $ threadDelay 1000000 + waiting receipt + diff --git a/src/Network/Ethereum/Contract.hs b/src/Network/Ethereum/Contract.hs index 3d39342d..927b416e 100644 --- a/src/Network/Ethereum/Contract.hs +++ b/src/Network/Ethereum/Contract.hs @@ -20,80 +20,22 @@ module Network.Ethereum.Contract where -import Control.Monad.Catch (throwM) -import Control.Monad.State (StateT, get, runStateT, - withStateT) -import Control.Monad.Trans (lift) -import qualified Data.ByteArray as BA (convert) -import Data.Default (Default (..)) -import Data.Proxy (Proxy (..)) -import Data.Solidity.Abi.Codec (decode, encode) -import Data.Solidity.Prim (Address) -import Lens.Micro ((.~), (^.)) -import Lens.Micro.TH (makeLenses) -import Network.Ethereum.Account (Account (..)) -import qualified Network.Ethereum.Api.Eth as Eth (call, sendTransaction) -import Network.Ethereum.Api.Provider (Web3Error (ParserFail)) -import Network.Ethereum.Api.Types (Call (..), - DefaultBlock (Latest)) -import Network.Ethereum.Contract.Method (selector) +import Data.Proxy (Proxy) +import Data.Text (Text) -data CallState = CallState - { _target :: Address - , _value :: Integer - , _gas :: Maybe Integer - , _gasPrice :: Maybe Integer - , _block :: DefaultBlock - } deriving (Eq, Show) +import Data.HexString (HexString) +import Network.Ethereum.Account.Class (Account) +import Network.Ethereum.Api.Types (TxReceipt) +import Network.JsonRpc.TinyClient (JsonRpcM) -instance Default CallState where - def = CallState "0x0000000000000000000000000000000000000000" def def def Latest +class Contract a where + abi :: Proxy a + -> Text -makeLenses ''CallState + bytecode :: Proxy a + -> HexString -type ContractT = StateT CallState - -getCall :: Monad m => ContractT m Call -getCall = do - s <- get - return $ - def { callTo = Just (s ^. target) - , callGas = fmap fromInteger (s ^. gas) - , callGasPrice = fmap fromInteger (s ^. gasPrice) - , callValue = Just $ fromInteger (s ^. value) } - -instance Account () ContractT where - withAccount _ = fmap fst . flip runStateT def - - send' (args :: a) = do - c <- getCall - lift $ Eth.sendTransaction $ - c { callData = Just $ BA.convert dat } - where - dat = selector (Proxy :: Proxy a) <> encode args - - send = undefined - - call (args :: a) = do - c <- getCall - s <- get - res <- lift $ flip Eth.call (s ^. block) $ - c { callData = Just $ BA.convert dat } - case decode res of - Left e -> lift $ throwM $ ParserFail $ "Unable to parse response: " ++ e - Right x -> return x - where - dat = selector (Proxy :: Proxy a) <> encode args - -{- -data PersonalAccount = PersonalAccount Int Text - -instance Account PersonalAccount ContractT where - withAccount (PersonalAccount ix pass) = --} - -withTarget :: Address - -> ContractT m a - -> ContractT m a -{-# INLINE withTarget #-} -withTarget a = withStateT (target .~ a) +new :: (Account p t, JsonRpcM m) + => Proxy a + -> t m TxReceipt +new = undefined diff --git a/src/Network/Ethereum/Contract/Method.hs b/src/Network/Ethereum/Contract/Method.hs index 5f32beb8..22b85bb3 100644 --- a/src/Network/Ethereum/Contract/Method.hs +++ b/src/Network/Ethereum/Contract/Method.hs @@ -20,13 +20,13 @@ import Data.Solidity.Abi.Generic () import Data.Solidity.Prim.Bytes (Bytes) class AbiPut a => Method a where - selector :: Proxy a -> Bytes + selector :: Proxy a -> Bytes instance AbiType () where - isDynamic _ = False + isDynamic _ = False instance AbiPut () --- | Send transaction without method selection +-- | Fallback contract method instance Method () where - selector = mempty + selector _ = mempty diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index e56ae293..4ecc7b36 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -67,7 +67,7 @@ import Language.Solidity.Abi (ContractAbi (..), FunctionArg (..), SolidityType (..), eventId, methodId, parseSolidityType) -import Network.Ethereum.Account (Account (..)) +import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Api.Types (DefaultBlock (..), Filter (..), TxReceipt) import Network.Ethereum.Contract.Method (Method (..)) diff --git a/src/Network/Ethereum/Ens.hs b/src/Network/Ethereum/Ens.hs index 85d11826..f8b8640d 100644 --- a/src/Network/Ethereum/Ens.hs +++ b/src/Network/Ethereum/Ens.hs @@ -24,18 +24,17 @@ import Data.ByteArray (convert, zero) import Data.ByteArray.Sized (unsafeFromByteArrayAccess) import Data.ByteString (ByteString) import Data.ByteString.Char8 (split) -import Data.Default (def) +import Lens.Micro ((.~)) + import Data.Solidity.Prim (Address, BytesN) -import Network.Ethereum.Account (Account) -import Network.Ethereum.Api.Provider (Web3) -import Network.Ethereum.Api.Types (Call (callTo), - DefaultBlock (Latest)) -import Network.Ethereum.Contract (ContractT, withTarget) +import Network.Ethereum.Account.Class (Account) +import Network.Ethereum.Account.Internal (AccountT, to, withParam) import qualified Network.Ethereum.Ens.PublicResolver as Resolver import qualified Network.Ethereum.Ens.Registry as Reg import Network.JsonRpc.TinyClient (JsonRpcM) --- | Namehash algorithm implementation: http://docs.ens.domains/en/latest/implementers.html#algorithm +-- | Namehash algorithm +-- http://docs.ens.domains/en/latest/implementers.html#algorithm namehash :: ByteString -> BytesN 32 namehash = unsafeFromByteArrayAccess . foldr algo (zero 32) . split '.' @@ -45,10 +44,10 @@ namehash = sha3 bs = convert (hash bs :: Digest Keccak_256) -- | Get address of ENS domain -resolve :: JsonRpcM m => ByteString -> ContractT m Address +resolve :: (JsonRpcM m, Account p (AccountT p)) => ByteString -> AccountT p m Address resolve name = do r <- ensRegistry $ Reg.resolver node - withTarget r $ Resolver.addr node + withParam (to .~ r) $ Resolver.addr node where node = namehash name - ensRegistry = withTarget "0x314159265dD8dbb310642f98f50C066173C1259b" + ensRegistry = withParam $ to .~ "0x314159265dD8dbb310642f98f50C066173C1259b" diff --git a/src/Network/Ethereum/Unit.hs b/src/Network/Ethereum/Unit.hs index 2e706176..629ed4d8 100644 --- a/src/Network/Ethereum/Unit.hs +++ b/src/Network/Ethereum/Unit.hs @@ -74,10 +74,6 @@ class (Read a, Show a, UnitSpec a, Fractional a) => Unit a where fromWei :: Integer -> a -- | Convert a value to integer wei toWei :: a -> Integer - -- | Conversion beween two values - convert :: Unit b => a -> b - {-# INLINE convert #-} - convert = fromWei . toWei -- | Unit specification class UnitSpec a where diff --git a/src/Network/Ethereum/Web3.hs b/src/Network/Ethereum/Web3.hs index c71b20e3..0f93a359 100644 --- a/src/Network/Ethereum/Web3.hs +++ b/src/Network/Ethereum/Web3.hs @@ -24,9 +24,7 @@ module Network.Ethereum.Web3 ( , runWeb3 -- ** Basic transaction sending - , Account(..) - , withTarget - , value + , module Network.Ethereum.Account -- ** Basic event listening , EventAction(..) @@ -42,10 +40,9 @@ module Network.Ethereum.Web3 ( ) where import Data.Solidity.Prim -import Network.Ethereum.Account (Account (..)) +import Network.Ethereum.Account import Network.Ethereum.Api.Provider (Web3, runWeb3) import Network.Ethereum.Api.Types (Call (..)) -import Network.Ethereum.Contract (value, withTarget) import Network.Ethereum.Contract.Event (EventAction (..), event, event') import Network.Ethereum.Unit diff --git a/stack.yaml b/stack.yaml index cd743f13..8145673c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-12.8 +resolver: lts-12.11 # User packages to be built. packages: From ea933206bbd03ece0b5394dcb4f40e8b7d65070b Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 5 Oct 2018 15:39:24 +0300 Subject: [PATCH 014/237] Added CallParam lenses --- src/Network/Ethereum/Account.hs | 9 ++- src/Network/Ethereum/Account/Internal.hs | 76 +++++++++++++----------- 2 files changed, 50 insertions(+), 35 deletions(-) diff --git a/src/Network/Ethereum/Account.hs b/src/Network/Ethereum/Account.hs index 98f30ba8..9392a3d8 100644 --- a/src/Network/Ethereum/Account.hs +++ b/src/Network/Ethereum/Account.hs @@ -18,6 +18,11 @@ module Network.Ethereum.Account ( , withParam , to + , value + , gasLimit + , gasPrice + , block + , account , (&) , (.~) @@ -27,6 +32,8 @@ import Lens.Micro ((&), (.~)) import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Account.Default (DefaultAccount) -import Network.Ethereum.Account.Internal (to, withParam) +import Network.Ethereum.Account.Internal (account, block, gasLimit, + gasPrice, to, value, + withParam) import Network.Ethereum.Account.Personal (Personal (..), PersonalAccount) diff --git a/src/Network/Ethereum/Account/Internal.hs b/src/Network/Ethereum/Account/Internal.hs index 27e04eaa..18077888 100644 --- a/src/Network/Ethereum/Account/Internal.hs +++ b/src/Network/Ethereum/Account/Internal.hs @@ -1,9 +1,9 @@ {-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} -- | -- Module : Network.Ethereum.Account.Internal @@ -23,43 +23,53 @@ import Control.Monad.State.Strict (MonadState (..), StateT (..), withStateT) import Control.Monad.Trans (MonadTrans (..)) import Data.Default (Default (..)) +import Lens.Micro (Lens', lens) + import Data.HexString (HexString) import Data.Solidity.Prim (Address) -import Lens.Micro (Lens', lens) import Network.Ethereum.Account.Class (Account) import qualified Network.Ethereum.Api.Eth as Eth (getTransactionReceipt) import Network.Ethereum.Api.Types (Call (..), DefaultBlock (Latest), TxReceipt (receiptTransactionHash)) -import Network.Ethereum.Unit (Unit (toWei), Wei) +import Network.Ethereum.Unit (Unit (..)) import Network.JsonRpc.TinyClient (JsonRpcM) -- | Account is needed to send transactions to blockchain -- | TODO -data CallParam p where - CallParam :: (Unit value, Unit gasprice) - => Address - -- ^ Transaction recepient - -> value - -- ^ Transaction value - -> Maybe Integer - -- ^ Transaction gas limit - -> Maybe gasprice - -- ^ Transaction gas price - -> DefaultBlock - -- ^ Call block number - -> p - -- ^ Account params to sign transaction - -> CallParam p +data CallParam p = CallParam + { _to :: Address + -- ^ Transaction recepient + , _value :: Integer + -- ^ Transaction value + , _gasLimit :: Maybe Integer + -- ^ Transaction gas limit + , _gasPrice :: Maybe Integer + -- ^ Transaction gas price + , _block :: DefaultBlock + -- ^ Call block number + , _account :: p + -- ^ Account params to sign transaction + } deriving Eq to :: Lens' (CallParam p) Address -to = lens getTo (flip setTo) - where - getTo = \case - CallParam t _ _ _ _ _ -> t - setTo t = \case - CallParam _ a b c d e -> CallParam t a b c d e +to = lens _to $ \a b -> a { _to = b } + +value :: Unit value => Lens' (CallParam p) value +value = lens (fromWei . _value) $ \a b -> a { _value = toWei b } + +gasLimit :: Lens' (CallParam p) (Maybe Integer) +gasLimit = lens _gasLimit $ \a b -> a { _gasLimit = b } + +gasPrice :: Unit gasprice => Lens' (CallParam p) (Maybe gasprice) +gasPrice = lens (fmap fromWei . _gasPrice) $ \a b -> a { _gasPrice = toWei <$> b } + +block :: Lens' (CallParam p) DefaultBlock +block = lens _block $ \a b -> a { _block = b } + +account :: Lens' (CallParam p) p +account = lens _account $ \a b -> a { _account = b } -- | TODO newtype AccountT p m a = AccountT @@ -80,18 +90,16 @@ withParam f m = AccountT $ withStateT f $ runAccountT m defaultCallParam :: a -> CallParam a {-# INLINE defaultCallParam #-} defaultCallParam = - CallParam "0x0000000000000000000000000000000000000000" (0 :: Wei) Nothing (Nothing :: Maybe Wei) Latest + CallParam "0x0000000000000000000000000000000000000000" 0 Nothing Nothing Latest -getCall :: MonadState (CallParam t) m => m Call +getCall :: MonadState (CallParam p) m => m Call getCall = do - s <- get - return $ case s of - CallParam recipient value gas gasprice _ _ -> - def { callTo = Just recipient - , callValue = Just (fromInteger $ toWei value) - , callGas = fromInteger <$> gas - , callGasPrice = (fromInteger . toWei) <$> gasprice - } + CallParam{..} <- get + return $ def { callTo = Just _to + , callValue = Just $ fromInteger _value + , callGas = fromInteger <$> _gasLimit + , callGasPrice = fromInteger <$> _gasPrice + } getReceipt :: JsonRpcM m => HexString -> m TxReceipt getReceipt tx = do From 6992fdc61e260573707d1e8384c0f2bfcc0ecc5f Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 11 Oct 2018 18:27:43 +0300 Subject: [PATCH 015/237] Added support for Ethereum ECDSA --- package.yaml | 7 +++- src/Crypto/Ethereum.hs | 35 +++++++++++++++++++ src/Data/Solidity/Prim/Address.hs | 19 ++++++++++ stack.yaml | 14 ++++++-- unit/Crypto/Ethereum/Test/EcdsaSpec.hs | 32 +++++++++++++++++ .../Solidity}/Test/AddressSpec.hs | 26 ++++++++++++-- .../Solidity}/Test/EncodingSpec.hs | 2 +- .../Solidity}/Test/CompilerSpec.hs | 2 +- 8 files changed, 130 insertions(+), 7 deletions(-) create mode 100644 src/Crypto/Ethereum.hs create mode 100644 unit/Crypto/Ethereum/Test/EcdsaSpec.hs rename unit/{Network/Ethereum/ABI/Prim => Data/Solidity}/Test/AddressSpec.hs (62%) rename unit/{Network/Ethereum/Web3 => Data/Solidity}/Test/EncodingSpec.hs (99%) rename unit/{Network/Ethereum/Web3 => Language/Solidity}/Test/CompilerSpec.hs (97%) diff --git a/package.yaml b/package.yaml index 57f71ad3..19c4be4d 100644 --- a/package.yaml +++ b/package.yaml @@ -38,6 +38,7 @@ dependencies: - bytestring >=0.10.8.2 && <0.11 - cryptonite ==0.25.* - exceptions +- secp256k1 - basement >=0.0.7 && <0.1 - machines >=0.6.3 && <0.7 - tagged >=0.8.5 && <0.9 @@ -78,12 +79,14 @@ ghc-options: flags: tls: description: Enable TLS support - default: False + default: True manual: True + debug: description: Enable debug compiler options default: False manual: True + solidity: description: Enable Solidity compiler default: False @@ -95,8 +98,10 @@ library: - condition: flag(tls) cpp-options: -DTLS_MANAGER dependencies: http-client-tls + - condition: flag(debug) ghc-options: -ddump-splices + - condition: flag(solidity) cpp-options: -DSOLIDITY_COMPILER dependencies: containers diff --git a/src/Crypto/Ethereum.hs b/src/Crypto/Ethereum.hs new file mode 100644 index 00000000..e56c2bcb --- /dev/null +++ b/src/Crypto/Ethereum.hs @@ -0,0 +1,35 @@ +module Crypto.Ethereum where + +import Crypto.Hash (Keccak_256 (..), hashWith) +import Crypto.Secp256k1 (CompactRecSig, SecKey, + exportCompactRecSig, + importCompactRecSig, msg, recover, + signRecMsg) +import Data.ByteArray (ByteArrayAccess, convert) + +import Data.Solidity.Prim.Address (Address, fromPubKey) + +-- | Sign message with Ethereum private key +ecsign :: ByteArrayAccess message + => message + -- ^ Message content + -> SecKey + -- ^ Private key + -> Maybe CompactRecSig + -- ^ Signature +ecsign message privateKey = do + msgHash <- msg $ convert $ hashWith Keccak_256 message + return . exportCompactRecSig $ signRecMsg privateKey msgHash + +-- | Recover message signer Ethereum address +ecrecover :: ByteArrayAccess message + => message + -- ^ Message content + -> CompactRecSig + -- ^ Signature + -> Maybe Address + -- ^ Message signer address +ecrecover message sig = do + msgHash <- msg $ convert $ hashWith Keccak_256 message + sig' <- importCompactRecSig sig + fromPubKey <$> recover sig' msgHash diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs index cf0d9900..c000fc4e 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/src/Data/Solidity/Prim/Address.hs @@ -18,16 +18,19 @@ module Data.Solidity.Prim.Address ( Address , toHexString , fromHexString + , fromPubKey , toChecksum , verifyChecksum ) where import Control.Monad ((<=<)) import Crypto.Hash (Keccak_256 (..), hashWith) +import Crypto.Secp256k1 (PubKey, exportPubKey) import Data.Aeson (FromJSON (..), ToJSON (..)) import Data.Bits ((.&.)) import Data.Bool (bool) import Data.ByteArray (convert, zero) +import qualified Data.ByteArray as BA (drop) import Data.ByteString (ByteString) import qualified Data.ByteString as BS (take, unpack) import qualified Data.ByteString.Char8 as C8 (drop, length, pack, unpack) @@ -50,15 +53,29 @@ newtype Address = Address { unAddress :: UIntN 160 } instance Generic Address +-- | Derive address from secp256k1 public key +fromPubKey :: PubKey -> Address +fromPubKey key = + case decode $ zero 12 <> BA.drop 12 (sha3 key) of + Right a -> a + Left e -> error e + where + sha3 :: PubKey -> ByteString + sha3 = convert . hashWith Keccak_256 . BA.drop 1 . exportPubKey False + +-- | Decode address from hex string fromHexString :: HexString -> Either String Address fromHexString bs | bslen == 20 = decode (zero 12 <> toBytes bs :: ByteString) | otherwise = Left $ "Incorrect address length: " ++ show bslen where bslen = C8.length (toBytes bs) +-- | Encode address to hex string toHexString :: Address -> HexString toHexString = fromBytes . C8.drop 12 . encode +-- | Encode address with mixed-case checksum +-- https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md toChecksum :: ByteString -> ByteString toChecksum addr = ("0x" <>) . C8.pack $ zipWith ($) upcaseVector lower where @@ -66,6 +83,8 @@ toChecksum addr = ("0x" <>) . C8.pack $ zipWith ($) upcaseVector lower fourthBits n = bool id C.toUpper <$> [n .&. 0x80 /= 0, n .&. 0x08 /= 0] lower = drop 2 . fmap C.toLower . C8.unpack $ addr +-- | Verify mixed-case address checksum +-- https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md verifyChecksum :: ByteString -> Bool verifyChecksum = toChecksum >>= (==) diff --git a/stack.yaml b/stack.yaml index 8145673c..bc50f8c1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,13 +1,23 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-12.11 +resolver: lts-12.12 # User packages to be built. packages: - '.' +# Extra package dependencies +extra-deps: +- secp256k1-1.1.2 + # Dependencies bounds pvp-bounds: both # Nix integration nix: - packages: [ zlib boost jsoncpp solc solc.dev ] + packages: + - zlib + - boost + - jsoncpp + - solc + - solc.dev + - secp256k1 diff --git a/unit/Crypto/Ethereum/Test/EcdsaSpec.hs b/unit/Crypto/Ethereum/Test/EcdsaSpec.hs new file mode 100644 index 00000000..80f972cb --- /dev/null +++ b/unit/Crypto/Ethereum/Test/EcdsaSpec.hs @@ -0,0 +1,32 @@ +{-# LANGUAGE OverloadedStrings #-} +module Crypto.Ethereum.Test.EcdsaSpec where + +import Crypto.Secp256k1 (SecKey, derivePubKey) +import Data.ByteArray (convert) +import Data.ByteString (ByteString, pack) +import Data.Serialize (decode) +import Test.Hspec +import Test.Hspec.QuickCheck + +import Crypto.Ethereum +import Data.HexString (HexString) +import Data.Solidity.Prim.Address (fromPubKey) + +spec :: Spec +spec = do + describe "Ethereum signatures" $ do + let key = "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20" :: SecKey + address = fromPubKey (derivePubKey key) + message = "Hello World!" :: ByteString + sign = "0xd4a9620cd94387a31b9333935f1e76fbee8467c283d07c39c1606dc4e2af021e317293af09601dbb48f547e40f6b98fe8a67a23dcd1f7f8d054695a81521177001" :: HexString + sign' = either error id $ decode (convert sign) + + it "sign message by Ethereum private key" $ do + ecsign message key `shouldBe` Just sign' + + it "verify message by Ethereum public key" $ do + ecrecover message sign' `shouldBe` Just address + + prop "round robin sign/verify for random message" $ \chars -> + let msg = pack chars + in (ecrecover msg =<< ecsign msg key) `shouldBe` Just address diff --git a/unit/Network/Ethereum/ABI/Prim/Test/AddressSpec.hs b/unit/Data/Solidity/Test/AddressSpec.hs similarity index 62% rename from unit/Network/Ethereum/ABI/Prim/Test/AddressSpec.hs rename to unit/Data/Solidity/Test/AddressSpec.hs index 71fa95e4..011805ee 100644 --- a/unit/Network/Ethereum/ABI/Prim/Test/AddressSpec.hs +++ b/unit/Data/Solidity/Test/AddressSpec.hs @@ -1,20 +1,42 @@ {-# LANGUAGE OverloadedStrings #-} -module Network.Ethereum.ABI.Prim.Test.AddressSpec where +module Data.Solidity.Test.AddressSpec where +import Crypto.Secp256k1 (SecKey, derivePubKey) import Data.ByteString (ByteString) import Data.ByteString.Char8 (unpack) import Data.Foldable (for_) import Data.Monoid ((<>)) -import Data.Solidity.Prim.Address import Test.Hspec +import Data.Solidity.Prim.Address + spec :: Spec spec = do describe "EIP55 Test Vectors" $ for_ checksummedAddrs (\addr -> it (unpack addr <> " should be checksummed") $ verifyChecksum addr `shouldBe` True) + describe "EIP55 Test Vectors Tampered" $ for_ unchecksummedAddrs (\addr -> it (unpack addr <> " should not be checksummed") $ verifyChecksum addr `shouldBe` False) + describe "Conversion from/to hex string" $ do + it "should convert from/to on valid hex" $ do + fromHexString "0x6370eF2f4Db3611D657b90667De398a2Cc2a370C" + `shouldBe` Right "0x6370eF2f4Db3611D657b90667De398a2Cc2a370C" + + toHexString "0x6370eF2f4Db3611D657b90667De398a2Cc2a370C" + `shouldBe` "0x6370eF2f4Db3611D657b90667De398a2Cc2a370C" + + it "should fail on broken hex" $ do + fromHexString "0x42" + `shouldBe` Left "Incorrect address length: 1" + + + describe "Conversion from Secp256k1 keys" $ do + it "derivation from private key" $ do + let key = "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20" :: SecKey + fromPubKey (derivePubKey key) + `shouldBe` "0x6370eF2f4Db3611D657b90667De398a2Cc2a370C" + checksummedAddrs :: [ByteString] checksummedAddrs = [ "0x52908400098527886E0F7030069857D2E4169EE7" diff --git a/unit/Network/Ethereum/Web3/Test/EncodingSpec.hs b/unit/Data/Solidity/Test/EncodingSpec.hs similarity index 99% rename from unit/Network/Ethereum/Web3/Test/EncodingSpec.hs rename to unit/Data/Solidity/Test/EncodingSpec.hs index f22a7fa0..3e0c3d83 100644 --- a/unit/Network/Ethereum/Web3/Test/EncodingSpec.hs +++ b/unit/Data/Solidity/Test/EncodingSpec.hs @@ -4,7 +4,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} -module Network.Ethereum.Web3.Test.EncodingSpec where +module Data.Solidity.Test.EncodingSpec where import Data.Monoid ((<>)) import Data.Text (Text) diff --git a/unit/Network/Ethereum/Web3/Test/CompilerSpec.hs b/unit/Language/Solidity/Test/CompilerSpec.hs similarity index 97% rename from unit/Network/Ethereum/Web3/Test/CompilerSpec.hs rename to unit/Language/Solidity/Test/CompilerSpec.hs index 2c064ab5..89941376 100644 --- a/unit/Network/Ethereum/Web3/Test/CompilerSpec.hs +++ b/unit/Language/Solidity/Test/CompilerSpec.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -module Network.Ethereum.Web3.Test.CompilerSpec where +module Language.Solidity.Test.CompilerSpec where import Language.Solidity.Compiler import Test.Hspec From 4be2ca85059ad7ae73724785e855223d7c69db44 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 12 Oct 2018 17:52:51 +0300 Subject: [PATCH 016/237] Added private key account --- package.yaml | 1 + src/Crypto/Ethereum.hs | 30 ++--- src/Network/Ethereum/Account.hs | 21 ++-- src/Network/Ethereum/Account/PrivateKey.hs | 121 +++++++++++++++++++++ src/Network/Ethereum/Web3.hs | 1 - stack.yaml | 1 + unit/Crypto/Ethereum/Test/EcdsaSpec.hs | 6 +- 7 files changed, 155 insertions(+), 26 deletions(-) create mode 100644 src/Network/Ethereum/Account/PrivateKey.hs diff --git a/package.yaml b/package.yaml index 19c4be4d..e206281f 100644 --- a/package.yaml +++ b/package.yaml @@ -39,6 +39,7 @@ dependencies: - cryptonite ==0.25.* - exceptions - secp256k1 +- relapse - basement >=0.0.7 && <0.1 - machines >=0.6.3 && <0.7 - tagged >=0.8.5 && <0.9 diff --git a/src/Crypto/Ethereum.hs b/src/Crypto/Ethereum.hs index e56c2bcb..95c2e423 100644 --- a/src/Crypto/Ethereum.hs +++ b/src/Crypto/Ethereum.hs @@ -1,35 +1,37 @@ module Crypto.Ethereum where import Crypto.Hash (Keccak_256 (..), hashWith) -import Crypto.Secp256k1 (CompactRecSig, SecKey, +import Crypto.Secp256k1 (CompactRecSig, Msg, SecKey, exportCompactRecSig, importCompactRecSig, msg, recover, signRecMsg) import Data.ByteArray (ByteArrayAccess, convert) +import Data.Maybe (fromJust) import Data.Solidity.Prim.Address (Address, fromPubKey) +-- | Keccak 256 hash of argument +hashMessage :: ByteArrayAccess ba => ba -> Msg +hashMessage = fromJust . msg . convert . hashWith Keccak_256 + -- | Sign message with Ethereum private key ecsign :: ByteArrayAccess message - => message - -- ^ Message content - -> SecKey + => SecKey -- ^ Private key - -> Maybe CompactRecSig + -> message + -- ^ Message content + -> CompactRecSig -- ^ Signature -ecsign message privateKey = do - msgHash <- msg $ convert $ hashWith Keccak_256 message - return . exportCompactRecSig $ signRecMsg privateKey msgHash +ecsign key = exportCompactRecSig . signRecMsg key . hashMessage -- | Recover message signer Ethereum address ecrecover :: ByteArrayAccess message - => message - -- ^ Message content - -> CompactRecSig + => CompactRecSig -- ^ Signature + -> message + -- ^ Message content -> Maybe Address -- ^ Message signer address -ecrecover message sig = do - msgHash <- msg $ convert $ hashWith Keccak_256 message +ecrecover sig message = do sig' <- importCompactRecSig sig - fromPubKey <$> recover sig' msgHash + fromPubKey <$> recover sig' (hashMessage message) diff --git a/src/Network/Ethereum/Account.hs b/src/Network/Ethereum/Account.hs index 9392a3d8..4097f364 100644 --- a/src/Network/Ethereum/Account.hs +++ b/src/Network/Ethereum/Account.hs @@ -16,6 +16,9 @@ module Network.Ethereum.Account ( , PersonalAccount , Personal(..) + , PrivateKeyAccount + , PrivateKey(..) + , withParam , to , value @@ -28,12 +31,14 @@ module Network.Ethereum.Account ( ) where -import Lens.Micro ((&), (.~)) +import Lens.Micro ((&), (.~)) -import Network.Ethereum.Account.Class (Account (..)) -import Network.Ethereum.Account.Default (DefaultAccount) -import Network.Ethereum.Account.Internal (account, block, gasLimit, - gasPrice, to, value, - withParam) -import Network.Ethereum.Account.Personal (Personal (..), - PersonalAccount) +import Network.Ethereum.Account.Class (Account (..)) +import Network.Ethereum.Account.Default (DefaultAccount) +import Network.Ethereum.Account.Internal (account, block, gasLimit, + gasPrice, to, value, + withParam) +import Network.Ethereum.Account.Personal (Personal (..), + PersonalAccount) +import Network.Ethereum.Account.PrivateKey (PrivateKey (..), + PrivateKeyAccount) diff --git a/src/Network/Ethereum/Account/PrivateKey.hs b/src/Network/Ethereum/Account/PrivateKey.hs new file mode 100644 index 00000000..7fa9e3fc --- /dev/null +++ b/src/Network/Ethereum/Account/PrivateKey.hs @@ -0,0 +1,121 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeSynonymInstances #-} + +-- | +-- Module : Network.Ethereum.Account.PrivateKey +-- Copyright : Alexander Krupenkin 2018 +-- Roy Blankman 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + +module Network.Ethereum.Account.PrivateKey ( + PrivateKey(..) + , PrivateKeyAccount +) where + +import Control.Monad.State.Strict (get, runStateT) +import Control.Monad.Trans (lift) +import Crypto.Secp256k1 (CompactRecSig (..), SecKey, + derivePubKey) +import Data.ByteArray (convert) +import Data.ByteString (ByteString) +import Data.ByteString.Short (fromShort) +import Data.Maybe (fromMaybe) +import Data.Monoid (mempty) +import Data.Proxy (Proxy (..)) +import Data.RLP (packRLP, rlpEncode) + +import Crypto.Ethereum (ecsign) +import Data.HexString (HexString, toBytes) +import Data.Solidity.Abi.Codec (decode, encode) +import Data.Solidity.Prim.Address (fromPubKey, toHexString) +import Network.Ethereum.Account.Class (Account (..)) +import Network.Ethereum.Account.Internal (AccountT (..), + CallParam (..), + defaultCallParam, getCall, + getReceipt) +import qualified Network.Ethereum.Api.Eth as Eth (call, + getTransactionCount, + sendRawTransaction) +import Network.Ethereum.Api.Types (Call (..), unQuantity) +import Network.Ethereum.Contract.Method (selector) + +data PrivateKey = PrivateKey + { privateKey :: SecKey + , chainId :: Integer + } + deriving (Eq, Show) + +type PrivateKeyAccount = AccountT PrivateKey + +instance Account PrivateKey PrivateKeyAccount where + withAccount a = + fmap fst . flip runStateT (defaultCallParam a) . runAccountT + + send (args :: a) = do + CallParam{..} <- get + c <- getCall + let dat = selector (Proxy :: Proxy a) <> encode args + address = fromPubKey (derivePubKey $ privateKey _account) + + nonce <- lift $ Eth.getTransactionCount address _block + let params = c { callFrom = Just address + , callNonce = Just nonce + , callData = Just $ convert dat } + signed = signTransaction params (chainId _account) (privateKey _account) + + lift $ case signed of + Just params' -> getReceipt =<< Eth.sendRawTransaction params' + Nothing -> fail $ "Unable to sign transaction: " ++ show params + + call (args :: a) = do + CallParam{..} <- get + c <- getCall + let dat = selector (Proxy :: Proxy a) <> encode args + address = fromPubKey (derivePubKey $ privateKey _account) + params = c { callFrom = Just address, callData = Just $ convert dat } + res <- lift $ Eth.call params _block + case decode res of + Right r -> return r + Left e -> fail e + +encodeTransaction :: Call + -> Either Integer (Integer, ByteString, ByteString) + -> Maybe HexString +encodeTransaction Call{..} vrs = do + (nonce :: Integer) <- unQuantity <$> callNonce + (gasPrice :: Integer) <- unQuantity <$> callGasPrice + (gasLimit :: Integer) <- unQuantity <$> callGas + (to :: ByteString) <- toBytes . toHexString <$> callTo + (value :: Integer) <- unQuantity <$> callValue + let (dat :: ByteString) = fromMaybe mempty (convert <$> callData) + + return . rlp $ case vrs of + -- Unsigned transaction by EIP155 + Left chain_id -> (nonce, gasPrice, gasLimit, to, value, dat, chain_id, mempty, mempty) + -- Signed transaction + Right (v, r, s) -> (nonce, gasPrice, gasLimit, to, value, dat, v, s, r) + where + rlp = convert . packRLP . rlpEncode + +signTransaction :: Call + -> Integer + -> SecKey + -> Maybe HexString +signTransaction c i key = do + unsigned <- encodeTransaction c (Left i) + let recSig = ecsign key unsigned + v = fromIntegral $ getCompactRecSigV recSig + r = fromShort $ getCompactRecSigR recSig + s = fromShort $ getCompactRecSigS recSig + encodeTransaction c $ Right ((toEthV v), r, s) + where + toEthV v = v + 35 + 2 * i + {-# INLINE toEthV #-} diff --git a/src/Network/Ethereum/Web3.hs b/src/Network/Ethereum/Web3.hs index 0f93a359..f9f71232 100644 --- a/src/Network/Ethereum/Web3.hs +++ b/src/Network/Ethereum/Web3.hs @@ -42,7 +42,6 @@ module Network.Ethereum.Web3 ( import Data.Solidity.Prim import Network.Ethereum.Account import Network.Ethereum.Api.Provider (Web3, runWeb3) -import Network.Ethereum.Api.Types (Call (..)) import Network.Ethereum.Contract.Event (EventAction (..), event, event') import Network.Ethereum.Unit diff --git a/stack.yaml b/stack.yaml index bc50f8c1..d673c66c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -8,6 +8,7 @@ packages: # Extra package dependencies extra-deps: - secp256k1-1.1.2 +- relapse-1.0.0.0 # Dependencies bounds pvp-bounds: both diff --git a/unit/Crypto/Ethereum/Test/EcdsaSpec.hs b/unit/Crypto/Ethereum/Test/EcdsaSpec.hs index 80f972cb..8d12083f 100644 --- a/unit/Crypto/Ethereum/Test/EcdsaSpec.hs +++ b/unit/Crypto/Ethereum/Test/EcdsaSpec.hs @@ -22,11 +22,11 @@ spec = do sign' = either error id $ decode (convert sign) it "sign message by Ethereum private key" $ do - ecsign message key `shouldBe` Just sign' + ecsign key message `shouldBe` sign' it "verify message by Ethereum public key" $ do - ecrecover message sign' `shouldBe` Just address + ecrecover sign' message `shouldBe` Just address prop "round robin sign/verify for random message" $ \chars -> let msg = pack chars - in (ecrecover msg =<< ecsign msg key) `shouldBe` Just address + in ecrecover (ecsign key msg) msg `shouldBe` Just address From 7692da4d26f9d54813b70e8b9066e735fd9420b9 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 15 Oct 2018 18:52:04 +0300 Subject: [PATCH 017/237] Improved transaction sending * Added transaction gas estimation before sending * Added 'new' function for creating contracts * Added 'Network.Ethereum.Chain' module that collects chain ids --- src/Data/Solidity/Prim/Address.hs | 8 ++- src/Network/Ethereum/Account/Default.hs | 43 ++++++------ src/Network/Ethereum/Account/Internal.hs | 9 ++- src/Network/Ethereum/Account/Personal.hs | 33 ++++++---- src/Network/Ethereum/Account/PrivateKey.hs | 76 ++++++++++++---------- src/Network/Ethereum/Account/Safe.hs | 5 ++ src/Network/Ethereum/Chain.hs | 36 ++++++++++ src/Network/Ethereum/Contract.hs | 35 ++++++---- 8 files changed, 155 insertions(+), 90 deletions(-) create mode 100644 src/Network/Ethereum/Chain.hs diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs index c000fc4e..bfa4412d 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/src/Data/Solidity/Prim/Address.hs @@ -35,13 +35,14 @@ import Data.ByteString (ByteString) import qualified Data.ByteString as BS (take, unpack) import qualified Data.ByteString.Char8 as C8 (drop, length, pack, unpack) import qualified Data.Char as C (toLower, toUpper) -import Data.HexString (HexString, fromBytes, hexString, - toBytes, toText) +import Data.Default (Default (..)) import Data.String (IsString (..)) import Data.Text.Encoding as T (encodeUtf8) import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) +import Data.HexString (HexString, fromBytes, hexString, + toBytes, toText) import Data.Solidity.Abi (AbiGet (..), AbiPut (..), AbiType (..)) import Data.Solidity.Abi.Codec (decode, encode) @@ -53,6 +54,9 @@ newtype Address = Address { unAddress :: UIntN 160 } instance Generic Address +instance Default Address where + def = Address 0 + -- | Derive address from secp256k1 public key fromPubKey :: PubKey -> Address fromPubKey key = diff --git a/src/Network/Ethereum/Account/Default.hs b/src/Network/Ethereum/Account/Default.hs index 394fd208..61ee82d7 100644 --- a/src/Network/Ethereum/Account/Default.hs +++ b/src/Network/Ethereum/Account/Default.hs @@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} @@ -19,6 +20,7 @@ import Control.Monad.Catch (throwM) import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (MonadTrans (..)) import qualified Data.ByteArray as BA (convert) +import Data.Maybe (listToMaybe) import Data.Proxy (Proxy (..)) import Data.Solidity.Abi.Codec (decode, encode) @@ -28,9 +30,10 @@ import Network.Ethereum.Account.Internal (AccountT (..), defaultCallParam, getCall, getReceipt) import qualified Network.Ethereum.Api.Eth as Eth (accounts, call, + estimateGas, sendTransaction) import Network.Ethereum.Api.Provider (Web3Error (ParserFail)) -import Network.Ethereum.Api.Types (Call (callData, callFrom)) +import Network.Ethereum.Api.Types (Call (callData, callFrom, callGas)) import Network.Ethereum.Contract.Method (Method (..)) type DefaultAccount = AccountT () @@ -42,27 +45,25 @@ instance Account () DefaultAccount where send (args :: a) = do c <- getCall lift $ do - let dat = selector (Proxy :: Proxy a) <> encode args - params = c { callData = Just $ BA.convert dat } accounts <- Eth.accounts - tx <- Eth.sendTransaction $ - case accounts of - (a : _) -> params { callFrom = Just a } - _ -> params - getReceipt tx + let dat = selector (Proxy :: Proxy a) <> encode args + params = c { callData = Just $ BA.convert dat + , callFrom = listToMaybe accounts } + + gasLimit <- Eth.estimateGas params + let params' = params { callGas = Just gasLimit } + + getReceipt =<< Eth.sendTransaction params' call (args :: a) = do c <- getCall - let dat = selector (Proxy :: Proxy a) <> encode args - params = c { callData = Just $ BA.convert dat } - s <- get - case s of - CallParam _ _ _ _ block _ -> do - res <- lift $ do - accounts <- Eth.accounts - flip Eth.call block $ case accounts of - (a : _) -> params { callFrom = Just a } - _ -> params - case decode res of - Right r -> return r - Left e -> lift $ throwM (ParserFail e) + CallParam{..} <- get + res <- lift $ do + accounts <- Eth.accounts + let dat = selector (Proxy :: Proxy a) <> encode args + params = c { callData = Just $ BA.convert dat + , callFrom = listToMaybe accounts } + Eth.call params _block + case decode res of + Right r -> return r + Left e -> lift $ throwM (ParserFail e) diff --git a/src/Network/Ethereum/Account/Internal.hs b/src/Network/Ethereum/Account/Internal.hs index 18077888..67beb7cb 100644 --- a/src/Network/Ethereum/Account/Internal.hs +++ b/src/Network/Ethereum/Account/Internal.hs @@ -39,7 +39,7 @@ import Network.JsonRpc.TinyClient (JsonRpcM) -- | TODO data CallParam p = CallParam - { _to :: Address + { _to :: Maybe Address -- ^ Transaction recepient , _value :: Integer -- ^ Transaction value @@ -54,7 +54,7 @@ data CallParam p = CallParam } deriving Eq to :: Lens' (CallParam p) Address -to = lens _to $ \a b -> a { _to = b } +to = lens (maybe def id . _to) $ \a b -> a { _to = Just b } value :: Unit value => Lens' (CallParam p) value value = lens (fromWei . _value) $ \a b -> a { _value = toWei b } @@ -89,13 +89,12 @@ withParam f m = AccountT $ withStateT f $ runAccountT m defaultCallParam :: a -> CallParam a {-# INLINE defaultCallParam #-} -defaultCallParam = - CallParam "0x0000000000000000000000000000000000000000" 0 Nothing Nothing Latest +defaultCallParam = CallParam def 0 Nothing Nothing Latest getCall :: MonadState (CallParam p) m => m Call getCall = do CallParam{..} <- get - return $ def { callTo = Just _to + return $ def { callTo = _to , callValue = Just $ fromInteger _value , callGas = fromInteger <$> _gasLimit , callGasPrice = fromInteger <$> _gasPrice diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs index 4e3bb734..0e177708 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/src/Network/Ethereum/Account/Personal.hs @@ -1,6 +1,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} @@ -29,17 +30,19 @@ import Network.Ethereum.Account.Internal (CallParam (..), defaultCallParam) import Network.Ethereum.Account.Internal (AccountT (..), getCall, getReceipt) -import qualified Network.Ethereum.Api.Eth as Eth (call) +import qualified Network.Ethereum.Api.Eth as Eth (call, estimateGas) import Network.Ethereum.Api.Personal (Passphrase) import qualified Network.Ethereum.Api.Personal as Personal (sendTransaction) -import Network.Ethereum.Api.Types (Call (callData, callFrom)) +import Network.Ethereum.Api.Types (Call (callData, callFrom, callGas)) import Network.Ethereum.Contract.Method (selector) -data Personal = Personal !Address !Passphrase - deriving (Eq, Show) +data Personal = Personal { + personalAddress :: !Address + , personalPassphrase :: !Passphrase + } deriving (Eq, Show) instance Default Personal where - def = Personal "0x0000000000000000000000000000000000000000" "" + def = Personal def "" type PersonalAccount = AccountT Personal @@ -48,15 +51,17 @@ instance Account Personal PersonalAccount where fmap fst . flip runStateT (defaultCallParam a) . runAccountT send (args :: a) = do - s <- get - case s of - CallParam _ _ _ _ _ (Personal address passphrase) -> do - c <- getCall - let dat = selector (Proxy :: Proxy a) <> encode args - params = c { callFrom = Just address, callData = Just $ BA.convert dat } - lift $ do - tx <- Personal.sendTransaction params passphrase - getReceipt tx + CallParam{..} <- get + c <- getCall + lift $ do + let dat = selector (Proxy :: Proxy a) <> encode args + params = c { callFrom = Just $ personalAddress _account + , callData = Just $ BA.convert dat } + + gasLimit <- Eth.estimateGas params + let params' = params { callGas = Just gasLimit } + + getReceipt =<< Personal.sendTransaction params' (personalPassphrase _account) call (args :: a) = do s <- get diff --git a/src/Network/Ethereum/Account/PrivateKey.hs b/src/Network/Ethereum/Account/PrivateKey.hs index 7fa9e3fc..8ea0148e 100644 --- a/src/Network/Ethereum/Account/PrivateKey.hs +++ b/src/Network/Ethereum/Account/PrivateKey.hs @@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} @@ -27,7 +28,8 @@ import Crypto.Secp256k1 (CompactRecSig (..), SecKey, import Data.ByteArray (convert) import Data.ByteString (ByteString) import Data.ByteString.Short (fromShort) -import Data.Maybe (fromMaybe) +import Data.Default (Default (..)) +import Data.Maybe (fromJust, fromMaybe) import Data.Monoid (mempty) import Data.Proxy (Proxy (..)) import Data.RLP (packRLP, rlpEncode) @@ -41,17 +43,21 @@ import Network.Ethereum.Account.Internal (AccountT (..), CallParam (..), defaultCallParam, getCall, getReceipt) -import qualified Network.Ethereum.Api.Eth as Eth (call, +import qualified Network.Ethereum.Api.Eth as Eth (call, estimateGas, getTransactionCount, sendRawTransaction) import Network.Ethereum.Api.Types (Call (..), unQuantity) +import Network.Ethereum.Chain (foundation) import Network.Ethereum.Contract.Method (selector) +import Network.Ethereum.Unit (Shannon, toWei) data PrivateKey = PrivateKey - { privateKey :: SecKey - , chainId :: Integer - } - deriving (Eq, Show) + { privateKey :: !SecKey + , privateKeyChain :: !Integer + } deriving (Eq, Show) + +instance Default PrivateKey where + def = PrivateKey "" foundation type PrivateKeyAccount = AccountT PrivateKey @@ -62,18 +68,20 @@ instance Account PrivateKey PrivateKeyAccount where send (args :: a) = do CallParam{..} <- get c <- getCall + let dat = selector (Proxy :: Proxy a) <> encode args address = fromPubKey (derivePubKey $ privateKey _account) nonce <- lift $ Eth.getTransactionCount address _block - let params = c { callFrom = Just address - , callNonce = Just nonce - , callData = Just $ convert dat } - signed = signTransaction params (chainId _account) (privateKey _account) + let params = c { callFrom = Just address + , callNonce = Just nonce + , callData = Just $ convert dat } + + gasLimit <- lift $ Eth.estimateGas params + let params' = params { callGas = Just gasLimit } - lift $ case signed of - Just params' -> getReceipt =<< Eth.sendRawTransaction params' - Nothing -> fail $ "Unable to sign transaction: " ++ show params + let signed = signTransaction params' (privateKeyChain _account) (privateKey _account) + lift $ getReceipt =<< Eth.sendRawTransaction signed call (args :: a) = do CallParam{..} <- get @@ -81,6 +89,7 @@ instance Account PrivateKey PrivateKeyAccount where let dat = selector (Proxy :: Proxy a) <> encode args address = fromPubKey (derivePubKey $ privateKey _account) params = c { callFrom = Just address, callData = Just $ convert dat } + res <- lift $ Eth.call params _block case decode res of Right r -> return r @@ -88,34 +97,33 @@ instance Account PrivateKey PrivateKeyAccount where encodeTransaction :: Call -> Either Integer (Integer, ByteString, ByteString) - -> Maybe HexString + -> HexString encodeTransaction Call{..} vrs = do - (nonce :: Integer) <- unQuantity <$> callNonce - (gasPrice :: Integer) <- unQuantity <$> callGasPrice - (gasLimit :: Integer) <- unQuantity <$> callGas - (to :: ByteString) <- toBytes . toHexString <$> callTo - (value :: Integer) <- unQuantity <$> callValue - let (dat :: ByteString) = fromMaybe mempty (convert <$> callData) - - return . rlp $ case vrs of + let (to :: ByteString) = fromMaybe mempty (toBytes . toHexString <$> callTo) + (value :: Integer) = unQuantity $ fromJust callValue + (nonce :: Integer) = unQuantity $ fromJust callNonce + (gasPrice :: Integer) = fromMaybe defaultGasPrice $ fmap unQuantity callGasPrice + (gasLimit :: Integer) = unQuantity $ fromJust callGas + (input :: ByteString) = convert $ fromMaybe mempty callData + + rlp $ case vrs of -- Unsigned transaction by EIP155 - Left chain_id -> (nonce, gasPrice, gasLimit, to, value, dat, chain_id, mempty, mempty) + Left chain_id -> (nonce, gasPrice, gasLimit, to, value, input, chain_id, mempty, mempty) -- Signed transaction - Right (v, r, s) -> (nonce, gasPrice, gasLimit, to, value, dat, v, s, r) + Right (v, r, s) -> (nonce, gasPrice, gasLimit, to, value, input, v, s, r) where rlp = convert . packRLP . rlpEncode + defaultGasPrice = toWei (5 :: Shannon) signTransaction :: Call -> Integer -> SecKey - -> Maybe HexString -signTransaction c i key = do - unsigned <- encodeTransaction c (Left i) - let recSig = ecsign key unsigned - v = fromIntegral $ getCompactRecSigV recSig - r = fromShort $ getCompactRecSigR recSig - s = fromShort $ getCompactRecSigS recSig - encodeTransaction c $ Right ((toEthV v), r, s) + -> HexString +signTransaction c i key = encodeTransaction c $ Right (v', r, s) where - toEthV v = v + 35 + 2 * i - {-# INLINE toEthV #-} + unsigned = encodeTransaction c (Left i) + recSig = ecsign key unsigned + v = fromIntegral $ getCompactRecSigV recSig + r = fromShort $ getCompactRecSigR recSig + s = fromShort $ getCompactRecSigS recSig + v' = v + 35 + 2 * i -- Improved 'v' according to EIP155 diff --git a/src/Network/Ethereum/Account/Safe.hs b/src/Network/Ethereum/Account/Safe.hs index 6633422e..01fd4582 100644 --- a/src/Network/Ethereum/Account/Safe.hs +++ b/src/Network/Ethereum/Account/Safe.hs @@ -48,3 +48,8 @@ safeSend b a = lift . waiting =<< send a else do liftIO $ threadDelay 1000000 waiting receipt +-- | Count block confirmation to keep secure +-- According to Vitalik post +-- https://blog.ethereum.org/2015/09/14/on-slow-and-fast-block-times/ +safeConfirmations :: Integer +safeConfirmations = 10 diff --git a/src/Network/Ethereum/Chain.hs b/src/Network/Ethereum/Chain.hs new file mode 100644 index 00000000..e54d89ef --- /dev/null +++ b/src/Network/Ethereum/Chain.hs @@ -0,0 +1,36 @@ +-- | +-- Module : Network.Ethereum.Chain +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- + +module Network.Ethereum.Chain where + +-- | Ethereum mainnet CHAIN_ID from EIP155 +foundation :: Integer +foundation = 1 + +-- | Ethereum testnet CHAIN_ID from EIP155 +ropsten :: Integer +ropsten = 3 + +-- | Rokenby CHAIN_ID from EIP155 +rikenby :: Integer +rikenby = 4 + +-- | Kovan CHAIN_ID from EIP155 +kovan :: Integer +kovan = 42 + +-- | Ethereum Classic mainnet CHAIN_ID from EIP155 +classic :: Integer +classic = 61 + +-- | Ethereum Classic testnet CHAIN_ID from EIP155 +classicTestnet :: Integer +classicTestnet = 62 diff --git a/src/Network/Ethereum/Contract.hs b/src/Network/Ethereum/Contract.hs index 927b416e..7192433f 100644 --- a/src/Network/Ethereum/Contract.hs +++ b/src/Network/Ethereum/Contract.hs @@ -20,22 +20,29 @@ module Network.Ethereum.Contract where -import Data.Proxy (Proxy) -import Data.Text (Text) +import Data.Proxy (Proxy) +import Data.Text (Text) -import Data.HexString (HexString) -import Network.Ethereum.Account.Class (Account) -import Network.Ethereum.Api.Types (TxReceipt) -import Network.JsonRpc.TinyClient (JsonRpcM) +import Data.HexString (HexString) +import Data.Solidity.Prim.Address (Address) +import Network.Ethereum.Account.Class (Account) +import Network.Ethereum.Account.Safe (safeConfirmations, safeSend) +import Network.Ethereum.Api.Types (receiptContractAddress) +import Network.Ethereum.Contract.Method (Method) +import Network.JsonRpc.TinyClient (JsonRpcM) class Contract a where - abi :: Proxy a - -> Text + -- | Contract Solidity ABI + -- https://solidity.readthedocs.io/en/latest/abi-spec.html + abi :: Proxy a -> Text - bytecode :: Proxy a - -> HexString + -- | Contract bytecode as hex string + bytecode :: Proxy a -> HexString -new :: (Account p t, JsonRpcM m) - => Proxy a - -> t m TxReceipt -new = undefined +-- | Create new contract on blockchain +new :: (Account p t, JsonRpcM m, Method a, Monad (t m)) + => a + -- ^ Contract constructor + -> t m (Maybe Address) + -- ^ Address of deployed contract when transaction success +new = fmap receiptContractAddress . safeSend safeConfirmations From eb5268487c2b0006f0a61da674323f9c38b91bfe Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 16 Oct 2018 17:07:08 +0300 Subject: [PATCH 018/237] Added contract constructor TH generation --- src/Network/Ethereum/Contract/TH.hs | 102 +++++++++++++++++----------- 1 file changed, 64 insertions(+), 38 deletions(-) diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 4ecc7b36..85cad613 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} @@ -35,14 +36,19 @@ -- Full code example available in examples folder. -- -module Network.Ethereum.Contract.TH (abi, abiFrom) where +module Network.Ethereum.Contract.TH ( + abi + , abiFrom +) where import Control.Applicative ((<|>)) import Control.Monad (replicateM, (<=<)) -import Data.Aeson (eitherDecode) +import qualified Data.Aeson as Aeson (encode) +import Data.ByteArray (convert) import qualified Data.Char as Char import Data.Default (Default (..)) import Data.List (group, sort, uncons) +import Data.Maybe (listToMaybe) import Data.Monoid ((<>)) import Data.Tagged (Tagged) import Data.Text (Text) @@ -54,7 +60,7 @@ import qualified GHC.Generics as GHC (Generic) import Language.Haskell.TH import Language.Haskell.TH.Quote import Lens.Micro ((^?)) -import Lens.Micro.Aeson (key, _JSON) +import Lens.Micro.Aeson (key, _JSON, _String) import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Event (IndexedEvent (..)) @@ -70,6 +76,7 @@ import Language.Solidity.Abi (ContractAbi (..), import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Api.Types (DefaultBlock (..), Filter (..), TxReceipt) +import qualified Network.Ethereum.Contract as Contract (Contract (..)) import Network.Ethereum.Contract.Method (Method (..)) import Network.JsonRpc.TinyClient (JsonRpcM) @@ -80,11 +87,10 @@ abiFrom = quoteFile abi -- | QQ reader for contract Abi abi :: QuasiQuoter abi = QuasiQuoter - { quoteDec = quoteAbiDec - , quoteExp = quoteAbiExp - , quotePat = undefined - , quoteType = undefined - } + { quoteDec = quoteAbiDec + , quoteExp = quoteAbiExp + , quotePat = undefined + , quoteType = undefined } -- | Instance declaration with empty context instanceD' :: Name -> TypeQ -> [DecQ] -> DecQ @@ -230,6 +236,28 @@ mkDecl fun@(DFunction name constant inputs outputs) = (++) mkDecl _ = return [] +mkContractDecl :: Text -> Text -> Text -> Declaration -> DecsQ +mkContractDecl name a b (DConstructor inputs) = sequence + [ dataD' dataName (normalC dataName bangInput) derivingD + , instanceD' dataName (conT ''Generic) [] + , instanceD' dataName (conT ''AbiType) + [funD' 'isDynamic [] [|const False|]] + , instanceD' dataName (conT ''AbiPut) [] + , instanceD' dataName (conT ''Method) + [funD' 'selector [] [|convert . Contract.bytecode|]] + , instanceD' dataName (conT ''Contract.Contract) + [ funD' 'Contract.abi [] [|const abiString|] + , funD' 'Contract.bytecode [] [|const bytecodeString|] + ] + ] + where abiString = T.unpack a + bytecodeString = T.unpack b + dataName = mkName (toUpperFirst (T.unpack $ name <> "Contract")) + bangInput = fmap funBangType inputs + derivingD = [''Show, ''Eq, ''Ord, ''GHC.Generic] + +mkContractDecl _ _ _ _ = return [] + -- | this function gives appropriate names for the accessors in the following way -- | argName -> evArgName -- | arg_name -> evArg_name @@ -241,9 +269,9 @@ makeArgs prefix ns = go 1 ns prefixStr = toLowerFirst . T.unpack $ prefix go :: Int -> [(Text, Text)] -> [(Name, Text)] go _ [] = [] - go i ((h, ty) : tail') = if T.null h - then (mkName $ prefixStr ++ show i, ty) : go (i + 1) tail' - else (mkName . (++ "_") . (++) prefixStr . toUpperFirst . T.unpack $ h, ty) : go (i + 1) tail' + go i ((h, ty) : tail') + | T.null h = (mkName $ prefixStr ++ show i, ty) : go (i + 1) tail' + | otherwise = (mkName . (++ "_") . (++) prefixStr . toUpperFirst . T.unpack $ h, ty) : go (i + 1) tail' escape :: [Declaration] -> [Declaration] escape = escapeEqualNames . fmap escapeReservedNames @@ -272,36 +300,34 @@ isKeyword = flip elem [ "as", "case", "of", "class" , "infix", "infixl", "infixr" , "let", "in", "mdo", "module" , "newtype", "proc", "qualified" - , "rec", "type", "where"] + , "rec", "type", "where" + ] + +constructorSpec :: String -> Maybe (Text, Text, Text, Declaration) +constructorSpec str = do + name <- str ^? key "contractName" . _String + abiValue <- str ^? key "abi" + bytecode <- str ^? key "bytecode" . _String + decl <- listToMaybe =<< (filter isContructor . unAbi <$> str ^? key "abi" . _JSON) + return (name, LT.toStrict $ LT.decodeUtf8 $ Aeson.encode abiValue, bytecode, decl) + where + isContructor (DConstructor _) = True + isContructor _ = False -- | Abi to declarations converter quoteAbiDec :: String -> DecsQ -quoteAbiDec abi_string = - let abi_lbs = LT.encodeUtf8 (LT.pack abi_string) - eabi = abiDec abi_lbs <|> abiDecNested abi_lbs - in case eabi of - Left e -> fail ("Error in quoteAbiDec: " ++ e) - Right a -> concat <$> mapM mkDecl (escape a) - where - abiDec _abi_lbs = case eitherDecode _abi_lbs of - Left e -> Left e - Right (ContractAbi a) -> Right a - abiDecNested _abi_lbs = case _abi_lbs ^? key "abi" . _JSON of - Nothing -> Left $ "Failed to find Abi at 'abi' key in JSON object." - Just (ContractAbi a) -> Right a +quoteAbiDec str = + case str ^? _JSON <|> str ^? key "abi" . _JSON of + Nothing -> fail "Unable to decode contract ABI" + Just (ContractAbi decs) -> do + funEvDecs <- concat <$> mapM mkDecl (escape decs) + case constructorSpec str of + Nothing -> return funEvDecs + Just (a, b, c, d) -> (funEvDecs ++) <$> mkContractDecl a b c d -- | Abi information string quoteAbiExp :: String -> ExpQ -quoteAbiExp abi_string = stringE $ - let abi_lbs = LT.encodeUtf8 (LT.pack abi_string) - eabi = abiDec abi_lbs <|> abiDecNested abi_lbs - in case eabi of - Left e -> "Error in 'quoteAbiExp' : " ++ e - Right a -> a - where - abiDec _abi_lbs = case eitherDecode _abi_lbs of - Left e -> Left e - Right a -> Right $ show (a :: ContractAbi) - abiDecNested _abi_lbs = case _abi_lbs ^? key "abi" . _JSON of - Nothing -> Left $ "Failed to find Abi at 'abi' key in JSON object." - Just a -> Right $ show (a :: ContractAbi) +quoteAbiExp str = + case str ^? _JSON <|> str ^? key "abi" . _JSON of + Nothing -> fail "Unable to decode contract ABI" + Just a@(ContractAbi _) -> stringE (show a) From 22c45fac07e0dfebd153f2382703f5dc57a7136a Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 16 Oct 2018 19:12:22 +0300 Subject: [PATCH 019/237] Updated docs and changelog --- CHANGELOG.md | 4 ++ package.yaml | 1 + src/Crypto/Ethereum.hs | 28 ++++++++- src/Data/HexString.hs | 18 ++++-- src/Data/Solidity/Abi.hs | 15 ++--- src/Data/Solidity/Abi/Codec.hs | 20 ++++--- src/Data/Solidity/Abi/Generic.hs | 2 +- src/Data/Solidity/Event.hs | 11 ++-- src/Data/Solidity/Event/Internal.hs | 2 +- src/Data/Solidity/Prim.hs | 21 +++---- src/Data/Solidity/Prim/Address.hs | 26 ++++++--- src/Data/Solidity/Prim/Bool.hs | 5 +- src/Data/Solidity/Prim/Bytes.hs | 15 +++-- src/Data/Solidity/Prim/Int.hs | 25 +++++--- src/Data/Solidity/Prim/List.hs | 10 ++-- src/Data/Solidity/Prim/String.hs | 8 ++- src/Data/Solidity/Prim/Tagged.hs | 12 ++-- src/Data/Solidity/Prim/Tuple.hs | 12 ++-- src/Data/String/Extra.hs | 2 +- src/Language/Solidity/Abi.hs | 30 ++++++---- src/Network/Ethereum/Account.hs | 19 ++++++- src/Network/Ethereum/Account/Class.hs | 2 + src/Network/Ethereum/Account/Default.hs | 2 + src/Network/Ethereum/Account/Internal.hs | 22 ++++++- src/Network/Ethereum/Account/Personal.hs | 4 ++ src/Network/Ethereum/Account/PrivateKey.hs | 6 +- src/Network/Ethereum/Account/Safe.hs | 2 +- src/Network/Ethereum/Contract.hs | 7 ++- src/Network/Ethereum/Contract/Event.hs | 9 +-- src/Network/Ethereum/Contract/Event/Common.hs | 12 ++++ .../Ethereum/Contract/Event/MultiFilter.hs | 57 ++++++++++++------- .../Ethereum/Contract/Event/SingleFilter.hs | 29 +++++++--- src/Network/Ethereum/Contract/Method.hs | 5 +- src/Network/Ethereum/Contract/TH.hs | 10 ++-- src/Network/Ethereum/Ens.hs | 11 +++- src/Network/Ethereum/Unit.hs | 28 +++++---- src/Network/Ethereum/Web3.hs | 41 +++++++------ src/Network/JsonRpc/TinyClient.hs | 30 ++++++---- 38 files changed, 365 insertions(+), 198 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ded3a1e9..7be16b26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,16 @@ All notable changes to this project will be documented in this file. ## [0.8.0.0] 2018-10-** ### Added +- Support for Ethereum cryptography - Local private key transaction signer - Generalized JSON-RPC monad for API methods - Support for multiple transaction sending methods via one `Account` api - Monad based transaction sending parametrization - Experimental support for solidity compiler (disabled by default) - Support for Ethereum mainnet ENS resolver +- Contract typeclass with api/bytecode getters +- Contract typeclass TH generator +- Function for creating contracts - Event single/multi filters - HexString data type - Personal api calls diff --git a/package.yaml b/package.yaml index e206281f..1f12e778 100644 --- a/package.yaml +++ b/package.yaml @@ -53,6 +53,7 @@ dependencies: - mtl >=2.2.2 && <2.3 ghc-options: +- -funbox-strict-fields - -Wduplicate-exports - -Whi-shadowing - -Widentities diff --git a/src/Crypto/Ethereum.hs b/src/Crypto/Ethereum.hs index 95c2e423..ede81a0e 100644 --- a/src/Crypto/Ethereum.hs +++ b/src/Crypto/Ethereum.hs @@ -1,8 +1,30 @@ -module Crypto.Ethereum where +-- | +-- Module : Crypto.Ethereum +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Ethereum ECDSA based on secp256k1 bindings. +-- + +module Crypto.Ethereum + ( + -- * Ethereum ECDSA sign/recover + hashMessage + , ecsign + , ecrecover + + -- * Re-export useful Secp256k1 functions + , SecKey + , derivePubKey + )where import Crypto.Hash (Keccak_256 (..), hashWith) import Crypto.Secp256k1 (CompactRecSig, Msg, SecKey, - exportCompactRecSig, + derivePubKey, exportCompactRecSig, importCompactRecSig, msg, recover, signRecMsg) import Data.ByteArray (ByteArrayAccess, convert) @@ -10,7 +32,7 @@ import Data.Maybe (fromJust) import Data.Solidity.Prim.Address (Address, fromPubKey) --- | Keccak 256 hash of argument +-- | SHA3 hash of argument hashMessage :: ByteArrayAccess ba => ba -> Msg hashMessage = fromJust . msg . convert . hashWith Keccak_256 diff --git a/src/Data/HexString.hs b/src/Data/HexString.hs index 54d1566d..6f1324ee 100644 --- a/src/Data/HexString.hs +++ b/src/Data/HexString.hs @@ -1,11 +1,19 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} -module Data.HexString ( HexString - , hexString - , fromBytes - , toBytes - , toText ) where +-- | +-- Module : Data.HexString +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Hex string data type and useful functions. +-- + +module Data.HexString where import Data.Aeson (FromJSON (..), ToJSON (..), Value (String), withText) diff --git a/src/Data/Solidity/Abi.hs b/src/Data/Solidity/Abi.hs index f801e54a..134f80fc 100644 --- a/src/Data/Solidity/Abi.hs +++ b/src/Data/Solidity/Abi.hs @@ -4,23 +4,20 @@ -- | -- Module : Data.Solidity.Abi --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me -- Stability : experimental -- Portability : noportable -- --- Solidity ABI encoding type classes. +-- The Application Binary Interface is the standard way to interact with contracts +-- in the Ethereum ecosystem, both from outside the blockchain and for contract-to-contract +-- interaction. Data is encoded according to its type, as described in this specification. +-- The encoding is not self describing and thus requires a schema in order to decode. -- -module Data.Solidity.Abi ( - AbiType(..) - , AbiPut(..) - , AbiGet(..) - , GenericAbiPut(..) - , GenericAbiGet(..) - ) where +module Data.Solidity.Abi where import Data.Proxy (Proxy) import Data.Serialize (Get, Putter) diff --git a/src/Data/Solidity/Abi/Codec.hs b/src/Data/Solidity/Abi/Codec.hs index c492aa47..9a7b53bc 100644 --- a/src/Data/Solidity/Abi/Codec.hs +++ b/src/Data/Solidity/Abi/Codec.hs @@ -1,8 +1,8 @@ {-# LANGUAGE TypeFamilies #-} -- | --- Module : Data.Solidity.Codec --- Copyright : Alexander Krupenkin 2016-2018 +-- Module : Data.Solidity.Abi.Codec +-- Copyright : Alexander Krupenkin 2017-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -12,12 +12,16 @@ -- Solidity contract ABI encoding functions. -- -module Data.Solidity.Abi.Codec ( - encode - , decode - , encode' - , decode' - ) where +module Data.Solidity.Abi.Codec + ( + -- * @AbiPut@/@AbiGet@ type class encoding + encode + , decode + + -- * Generic encoding + , encode' + , decode' + ) where import Data.ByteArray (ByteArray, ByteArrayAccess, convert) import Data.Serialize (runGet, runPut) diff --git a/src/Data/Solidity/Abi/Generic.hs b/src/Data/Solidity/Abi/Generic.hs index 0501a8bb..e0434eae 100644 --- a/src/Data/Solidity/Abi/Generic.hs +++ b/src/Data/Solidity/Abi/Generic.hs @@ -9,7 +9,7 @@ -- | -- Module : Data.Solidity.Abi.Generic --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2017-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me diff --git a/src/Data/Solidity/Event.hs b/src/Data/Solidity/Event.hs index 92e38032..b2e748fd 100644 --- a/src/Data/Solidity/Event.hs +++ b/src/Data/Solidity/Event.hs @@ -11,7 +11,7 @@ -- | -- Module : Data.Solidity.Event --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2017-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -24,10 +24,11 @@ -- this directly in application code. -- -module Data.Solidity.Event ( - DecodeEvent(..) - , IndexedEvent(..) - ) where +module Data.Solidity.Event + ( + DecodeEvent(..) + , IndexedEvent(..) + ) where import Data.ByteArray (ByteArrayAccess) import Data.Proxy (Proxy (..)) diff --git a/src/Data/Solidity/Event/Internal.hs b/src/Data/Solidity/Event/Internal.hs index f7c17b15..06067f1b 100644 --- a/src/Data/Solidity/Event/Internal.hs +++ b/src/Data/Solidity/Event/Internal.hs @@ -13,7 +13,7 @@ -- | -- Module : Data.Solidity.Event.Internal --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2017-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me diff --git a/src/Data/Solidity/Prim.hs b/src/Data/Solidity/Prim.hs index f0efeea6..b60751d4 100644 --- a/src/Data/Solidity/Prim.hs +++ b/src/Data/Solidity/Prim.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.Solidity.Prim --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -10,15 +10,16 @@ -- Solidity primitive data types. -- -module Data.Solidity.Prim ( - Address - , Bytes - , BytesN - , IntN - , UIntN - , ListN - , Singleton(..) - ) where +module Data.Solidity.Prim + ( + Address + , Bytes + , BytesN + , IntN + , UIntN + , ListN + , Singleton(..) + ) where import Data.Solidity.Prim.Address (Address) import Data.Solidity.Prim.Bool () diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs index bfa4412d..99c44753 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/src/Data/Solidity/Prim/Address.hs @@ -4,7 +4,7 @@ -- | -- Module : Data.Solidity.Prim.Address --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -14,14 +14,22 @@ -- Ethreum account address. -- -module Data.Solidity.Prim.Address ( - Address - , toHexString - , fromHexString - , fromPubKey - , toChecksum - , verifyChecksum - ) where +module Data.Solidity.Prim.Address + ( + -- * The @Address@ type + Address + + -- * Hex string encoding + , toHexString + , fromHexString + + -- * Public key to @Address@ convertor + , fromPubKey + + -- * EIP55 Mix-case checksum address encoding + , toChecksum + , verifyChecksum + ) where import Control.Monad ((<=<)) import Crypto.Hash (Keccak_256 (..), hashWith) diff --git a/src/Data/Solidity/Prim/Bool.hs b/src/Data/Solidity/Prim/Bool.hs index d1233846..5266f57f 100644 --- a/src/Data/Solidity/Prim/Bool.hs +++ b/src/Data/Solidity/Prim/Bool.hs @@ -1,9 +1,6 @@ -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} - -- | -- Module : Data.Solidity.Prim.Bool --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me diff --git a/src/Data/Solidity/Prim/Bytes.hs b/src/Data/Solidity/Prim/Bytes.hs index f50151bc..762d7f7b 100644 --- a/src/Data/Solidity/Prim/Bytes.hs +++ b/src/Data/Solidity/Prim/Bytes.hs @@ -8,7 +8,7 @@ -- | -- Module : Data.Solidity.Prim.Bytes --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -18,10 +18,14 @@ -- Bytes and BytesN primitive types. -- -module Data.Solidity.Prim.Bytes ( - Bytes - , BytesN - ) where +module Data.Solidity.Prim.Bytes + ( + -- * The dynamic length @Bytes@ type + Bytes + + -- * The fixed length @BytesN@ type + , BytesN + ) where import Control.Monad (unless) import Data.Aeson (FromJSON (..), ToJSON (..), @@ -79,6 +83,7 @@ instance FromJSON Bytes where instance ToJSON Bytes where toJSON = toJSON . T.append "0x" . decodeUtf8 . convertToBase Base16 +-- | Sized byte array with fixed length in bytes type BytesN n = SizedByteArray n Bytes instance (n <= 32) => AbiType (BytesN n) where diff --git a/src/Data/Solidity/Prim/Int.hs b/src/Data/Solidity/Prim/Int.hs index aa6f7ae9..e779b6e0 100644 --- a/src/Data/Solidity/Prim/Int.hs +++ b/src/Data/Solidity/Prim/Int.hs @@ -8,8 +8,8 @@ {-# LANGUAGE TypeOperators #-} -- | --- Module : Network.Ethereum.Encoding.Prim.Int --- Copyright : Alexander Krupenkin 2016-2018 +-- Module : Data.Solidity.Prim.Int +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -19,12 +19,18 @@ -- Ethereum Abi intN and uintN types. -- -module Data.Solidity.Prim.Int ( - IntN - , UIntN - , getWord256 - , putWord256 - ) where +module Data.Solidity.Prim.Int + ( + -- * The @IntN@ type + IntN + + -- * The @UIntN@ type + , UIntN + + -- * @Word256@ serializers + , getWord256 + , putWord256 + ) where import qualified Basement.Numerical.Number as Basement (toInteger) import Basement.Types.Word256 (Word256 (Word256)) @@ -45,6 +51,7 @@ instance Integral Word256 where toInteger = Basement.toInteger quotRem a b = (Basement.quot a b, Basement.rem a b) +-- | Unsigned integer with fixed length in bits newtype UIntN (n :: Nat) = UIntN { unUIntN :: Word256 } deriving (Eq, Ord, Enum, Num, Bits, Generic) @@ -71,7 +78,7 @@ instance (n <= 256) => AbiGet (UIntN n) where instance (n <= 256) => AbiPut (UIntN n) where abiPut = putWord256 . unUIntN --- TODO: Signed data type +-- Signed integer with fixed length in bits newtype IntN (n :: Nat) = IntN { unIntN :: Word256 } deriving (Eq, Ord, Enum, Bits, Generic) diff --git a/src/Data/Solidity/Prim/List.hs b/src/Data/Solidity/Prim/List.hs index 542fbd3c..327620ef 100644 --- a/src/Data/Solidity/Prim/List.hs +++ b/src/Data/Solidity/Prim/List.hs @@ -4,7 +4,7 @@ -- | -- Module : Data.Solidity.Prim.List --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -14,9 +14,11 @@ -- Ethereum Abi dynamic and static size vectors based on linked lists. -- -module Data.Solidity.Prim.List ( - ListN - ) where +module Data.Solidity.Prim.List + ( + -- * Fixed size linked list + ListN + ) where import Basement.Nat (NatWithinBound) import Basement.Sized.List (ListN, toListN_, unListN) diff --git a/src/Data/Solidity/Prim/String.hs b/src/Data/Solidity/Prim/String.hs index 242e5fdf..d712b67d 100644 --- a/src/Data/Solidity/Prim/String.hs +++ b/src/Data/Solidity/Prim/String.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.Solidity.Prim.String --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -10,7 +10,11 @@ -- Ethereum Abi UTF8-encoded string type. -- -module Data.Solidity.Prim.String () where +module Data.Solidity.Prim.String + ( + -- * The strict @Text@ type + Text + ) where import Data.Text (Text) import Data.Text.Encoding (decodeUtf8, encodeUtf8) diff --git a/src/Data/Solidity/Prim/Tagged.hs b/src/Data/Solidity/Prim/Tagged.hs index b14627b4..ae2ba7ba 100644 --- a/src/Data/Solidity/Prim/Tagged.hs +++ b/src/Data/Solidity/Prim/Tagged.hs @@ -3,19 +3,21 @@ -- | -- Module : Data.Solidity.Prim.Tagged --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me -- Stability : experimental -- Portability : noportable -- --- Ethereum Abi UTF8-encoded tagged types. +-- Ethereum Abi tagged types. -- -module Data.Solidity.Prim.Tagged ( - Tagged - ) where +module Data.Solidity.Prim.Tagged + ( + -- * The @Tagged@ type + Tagged + ) where import Data.Proxy (Proxy (..)) import Data.Tagged (Tagged (..)) diff --git a/src/Data/Solidity/Prim/Tuple.hs b/src/Data/Solidity/Prim/Tuple.hs index f933fb23..25835af9 100644 --- a/src/Data/Solidity/Prim/Tuple.hs +++ b/src/Data/Solidity/Prim/Tuple.hs @@ -5,7 +5,7 @@ -- | -- Module : Data.Solidity.Prim.Tuple --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -15,9 +15,11 @@ -- Tuple type abi encoding instances. -- -module Data.Solidity.Prim.Tuple ( - Singleton(..) - ) where +module Data.Solidity.Prim.Tuple + ( + -- * The @Singleton@ type + Singleton(..) + ) where import Data.Proxy (Proxy (..)) import Generics.SOP (Generic) @@ -27,7 +29,7 @@ import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Abi.Generic () import Data.Solidity.Prim.Tuple.TH (tupleDecs) --- | The type for one-tuples +-- | The type for single element tuples newtype Singleton a = Singleton { unSingleton :: a } deriving GHC.Generic diff --git a/src/Data/String/Extra.hs b/src/Data/String/Extra.hs index c697d12c..646d262b 100644 --- a/src/Data/String/Extra.hs +++ b/src/Data/String/Extra.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.String.Extra --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- -- Maintainer : mail@akru.me diff --git a/src/Language/Solidity/Abi.hs b/src/Language/Solidity/Abi.hs index f8d91910..f538cafc 100644 --- a/src/Language/Solidity/Abi.hs +++ b/src/Language/Solidity/Abi.hs @@ -3,7 +3,7 @@ -- | -- Module : Data.Solidity.Abi.Json --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -13,17 +13,23 @@ -- JSON encoded contract ABI parsers. -- -module Language.Solidity.Abi ( - ContractAbi(..) - , Declaration(..) - , FunctionArg(..) - , EventArg(..) - , signature - , methodId - , eventId - , SolidityType(..) - , parseSolidityType - ) where +module Language.Solidity.Abi + ( + -- * Contract ABI declarations + ContractAbi(..) + , Declaration(..) + , FunctionArg(..) + , EventArg(..) + + -- * Method/Event id encoder + , signature + , methodId + , eventId + + -- * Solidity type parser + , SolidityType(..) + , parseSolidityType + ) where import Control.Monad (void) import Crypto.Hash (Digest, Keccak_256, hash) diff --git a/src/Network/Ethereum/Account.hs b/src/Network/Ethereum/Account.hs index 4097f364..7fd14d30 100644 --- a/src/Network/Ethereum/Account.hs +++ b/src/Network/Ethereum/Account.hs @@ -7,18 +7,32 @@ -- Stability : experimental -- Portability : unportable -- +-- In Etereun there are two types of accounts: +-- * Externally owned account (EOAs): an account controlled by a private key, and if you own the private key associated with the EOA you have the ability to send ether and messages from it. +-- * Contract: an account that has its own code, and is controlled by code. +-- +-- This module exports different kinds of EOAs: default, node managed and local. Node managed accounts +-- use 'Personal' JSON-RPC API for signing transactions. Local account sign transaction locally and +-- use 'sendRawTransaction' method to export transaction to Ethereum network. +-- -module Network.Ethereum.Account ( +module Network.Ethereum.Account + ( + -- * The @Account@ type Account(..) + -- * Default node account , DefaultAccount + -- * Unlockable node account , PersonalAccount , Personal(..) + -- * Local key account , PrivateKeyAccount , PrivateKey(..) + -- * Transaction paramitrization function and lenses , withParam , to , value @@ -26,12 +40,11 @@ module Network.Ethereum.Account ( , gasPrice , block , account - , (&) , (.~) ) where -import Lens.Micro ((&), (.~)) +import Lens.Micro ((.~)) import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Account.Default (DefaultAccount) diff --git a/src/Network/Ethereum/Account/Class.hs b/src/Network/Ethereum/Account/Class.hs index 3eaf0e24..9fb2615c 100644 --- a/src/Network/Ethereum/Account/Class.hs +++ b/src/Network/Ethereum/Account/Class.hs @@ -11,6 +11,8 @@ -- Stability : experimental -- Portability : unportable -- +-- Ethereum external owned account abstraction. +-- module Network.Ethereum.Account.Class where diff --git a/src/Network/Ethereum/Account/Default.hs b/src/Network/Ethereum/Account/Default.hs index 61ee82d7..672e157c 100644 --- a/src/Network/Ethereum/Account/Default.hs +++ b/src/Network/Ethereum/Account/Default.hs @@ -13,6 +13,8 @@ -- Stability : experimental -- Portability : unportable -- +-- Default node managed account (typically the first of accounts list). +-- module Network.Ethereum.Account.Default where diff --git a/src/Network/Ethereum/Account/Internal.hs b/src/Network/Ethereum/Account/Internal.hs index 67beb7cb..846a36ae 100644 --- a/src/Network/Ethereum/Account/Internal.hs +++ b/src/Network/Ethereum/Account/Internal.hs @@ -14,6 +14,8 @@ -- Stability : experimental -- Portability : unportable -- +-- Internal types and functions of 'Account' module. +-- module Network.Ethereum.Account.Internal where @@ -37,7 +39,7 @@ import Network.JsonRpc.TinyClient (JsonRpcM) -- | Account is needed to send transactions to blockchain --- | TODO +-- | Transaction parametrization data type data CallParam p = CallParam { _to :: Maybe Address -- ^ Transaction recepient @@ -53,25 +55,31 @@ data CallParam p = CallParam -- ^ Account params to sign transaction } deriving Eq +-- | Transaction recipient lens to :: Lens' (CallParam p) Address to = lens (maybe def id . _to) $ \a b -> a { _to = Just b } +-- | Transaction value lens value :: Unit value => Lens' (CallParam p) value value = lens (fromWei . _value) $ \a b -> a { _value = toWei b } +-- | Transaction gas limit lens gasLimit :: Lens' (CallParam p) (Maybe Integer) gasLimit = lens _gasLimit $ \a b -> a { _gasLimit = b } +-- | Transaction gas price lens gasPrice :: Unit gasprice => Lens' (CallParam p) (Maybe gasprice) gasPrice = lens (fmap fromWei . _gasPrice) $ \a b -> a { _gasPrice = toWei <$> b } +-- | Call execution block lens block :: Lens' (CallParam p) DefaultBlock block = lens _block $ \a b -> a { _block = b } +-- | EOA params lens account :: Lens' (CallParam p) p account = lens _account $ \a b -> a { _account = b } --- | TODO +-- | Monad transformer for sending parametrized transactions from account newtype AccountT p m a = AccountT { runAccountT :: StateT (CallParam p) m a } deriving (Functor, Applicative, Monad, MonadTrans) @@ -80,6 +88,14 @@ instance Monad m => MonadState (CallParam p) (AccountT p m) where get = AccountT get put = AccountT . put +-- | @withParam@ is very similar to @withStateT@ function, it's used +-- to set parameters of transaction locally and revert params after out of scope. +-- +-- @ +-- withAccount () $ +-- withParam (to .~ tokenAddress) $ +-- transfer alice 42 +-- @ withParam :: Account p (AccountT p) => (CallParam p -> CallParam p) -> AccountT p m a @@ -107,7 +123,7 @@ getReceipt tx = do Just receipt -> return receipt Nothing -> do liftIO $ threadDelay 100000 - -- | TODO: avoid inifinite loop + -- TODO: avoid inifinite loop getReceipt tx updateReceipt :: JsonRpcM m => TxReceipt -> m TxReceipt diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs index 0e177708..d6d4cf9f 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/src/Network/Ethereum/Account/Personal.hs @@ -14,6 +14,9 @@ -- Stability : experimental -- Portability : unportable -- +-- Node managed unlockable account. Typically to send transaction from this account +-- password is required. +-- module Network.Ethereum.Account.Personal where @@ -36,6 +39,7 @@ import qualified Network.Ethereum.Api.Personal as Personal (sendTransaction) import Network.Ethereum.Api.Types (Call (callData, callFrom, callGas)) import Network.Ethereum.Contract.Method (selector) +-- | Unlockable node managed account params data Personal = Personal { personalAddress :: !Address , personalPassphrase :: !Passphrase diff --git a/src/Network/Ethereum/Account/PrivateKey.hs b/src/Network/Ethereum/Account/PrivateKey.hs index 8ea0148e..d6863bff 100644 --- a/src/Network/Ethereum/Account/PrivateKey.hs +++ b/src/Network/Ethereum/Account/PrivateKey.hs @@ -16,10 +16,7 @@ -- Portability : unportable -- -module Network.Ethereum.Account.PrivateKey ( - PrivateKey(..) - , PrivateKeyAccount -) where +module Network.Ethereum.Account.PrivateKey where import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) @@ -51,6 +48,7 @@ import Network.Ethereum.Chain (foundation) import Network.Ethereum.Contract.Method (selector) import Network.Ethereum.Unit (Shannon, toWei) +-- | Local EOA params data PrivateKey = PrivateKey { privateKey :: !SecKey , privateKeyChain :: !Integer diff --git a/src/Network/Ethereum/Account/Safe.hs b/src/Network/Ethereum/Account/Safe.hs index 01fd4582..1c29a11f 100644 --- a/src/Network/Ethereum/Account/Safe.hs +++ b/src/Network/Ethereum/Account/Safe.hs @@ -9,6 +9,7 @@ -- Stability : experimental -- Portability : unportable -- +-- Safe sending of Ethereum transaction. -- module Network.Ethereum.Account.Safe where @@ -25,7 +26,6 @@ import Network.Ethereum.Contract.Method (Method) import Network.JsonRpc.TinyClient (JsonRpcM) -- | Safe version of 'send' function of 'Account' typeclass --- -- Waiting for some blocks of transaction confirmation before return safeSend :: (Account p t, JsonRpcM m, Method args, Monad (t m)) => Integer diff --git a/src/Network/Ethereum/Contract.hs b/src/Network/Ethereum/Contract.hs index 7192433f..1457a42b 100644 --- a/src/Network/Ethereum/Contract.hs +++ b/src/Network/Ethereum/Contract.hs @@ -15,7 +15,9 @@ -- Stability : experimental -- Portability : unportable -- --- +-- Smart contract type class and utils. A contract in the sense of Solidity +-- is a collection of code (its functions) and data (its state) that resides +-- at a specific address on the Ethereum blockchain. -- module Network.Ethereum.Contract where @@ -31,6 +33,7 @@ import Network.Ethereum.Api.Types (receiptContractAddress) import Network.Ethereum.Contract.Method (Method) import Network.JsonRpc.TinyClient (JsonRpcM) +-- | Contract description type clase class Contract a where -- | Contract Solidity ABI -- https://solidity.readthedocs.io/en/latest/abi-spec.html @@ -39,7 +42,7 @@ class Contract a where -- | Contract bytecode as hex string bytecode :: Proxy a -> HexString --- | Create new contract on blockchain +-- | Create new smart contract on blockchain new :: (Account p t, JsonRpcM m, Method a, Monad (t m)) => a -- ^ Contract constructor diff --git a/src/Network/Ethereum/Contract/Event.hs b/src/Network/Ethereum/Contract/Event.hs index 83746dea..c5e99797 100644 --- a/src/Network/Ethereum/Contract/Event.hs +++ b/src/Network/Ethereum/Contract/Event.hs @@ -11,10 +11,11 @@ -- module Network.Ethereum.Contract.Event - ( module Network.Ethereum.Contract.Event.Common - , module Network.Ethereum.Contract.Event.SingleFilter - , module Network.Ethereum.Contract.Event.MultiFilter - ) where + ( + module Network.Ethereum.Contract.Event.Common + , module Network.Ethereum.Contract.Event.SingleFilter + , module Network.Ethereum.Contract.Event.MultiFilter + ) where import Network.Ethereum.Contract.Event.Common import Network.Ethereum.Contract.Event.MultiFilter diff --git a/src/Network/Ethereum/Contract/Event/Common.hs b/src/Network/Ethereum/Contract/Event/Common.hs index a4293130..bea5400b 100644 --- a/src/Network/Ethereum/Contract/Event/Common.hs +++ b/src/Network/Ethereum/Contract/Event/Common.hs @@ -8,6 +8,18 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} +-- | +-- Module : Network.Ethereum.Contract.Event.Common +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Common event manipulation functions. +-- + module Network.Ethereum.Contract.Event.Common where import Control.Concurrent (threadDelay) diff --git a/src/Network/Ethereum/Contract/Event/MultiFilter.hs b/src/Network/Ethereum/Contract/Event/MultiFilter.hs index 74a888cc..7a17474f 100644 --- a/src/Network/Ethereum/Contract/Event/MultiFilter.hs +++ b/src/Network/Ethereum/Contract/Event/MultiFilter.hs @@ -13,27 +13,41 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} - -module Network.Ethereum.Contract.Event.MultiFilter -- * MultiEventMonitors - ( MultiFilter(..) - , minStartBlock - , minEndBlock - , modifyMultiFilter - -- * With geth filters - , multiEvent - , multiEvent' - , multiEventMany' - - -- * Without geth filters - , multiEventNoFilter - , multiEventNoFilter' - , multiEventManyNoFilter' - - -- * ReExports - , Handlers - , Handler(..) - , Rec(..) - ) where +-- | +-- Module : Network.Ethereum.Contract.Event.MultiFilter +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Support for parallel multiple event filters. +-- + +module Network.Ethereum.Contract.Event.MultiFilter + ( + -- * The @MultiFilter@ type + MultiFilter(..) + , minStartBlock + , minEndBlock + , modifyMultiFilter + + -- * With geth filters + , multiEvent + , multiEvent' + , multiEventMany' + + -- * Without geth filters + , multiEventNoFilter + , multiEventNoFilter' + , multiEventManyNoFilter' + + -- * Re-exports + , Handlers + , Handler(..) + , Rec(..) + ) where import Control.Concurrent (threadDelay) import Control.Concurrent.Async (Async) @@ -64,6 +78,7 @@ import Network.Ethereum.Api.Types (Change (..), DefaultBlock (..), Filter (..), Quantity) import Network.Ethereum.Contract.Event.Common + -------------------------------------------------------------------------------- -- | MultiFilters -------------------------------------------------------------------------------- diff --git a/src/Network/Ethereum/Contract/Event/SingleFilter.hs b/src/Network/Ethereum/Contract/Event/SingleFilter.hs index 51b4bc04..953de950 100644 --- a/src/Network/Ethereum/Contract/Event/SingleFilter.hs +++ b/src/Network/Ethereum/Contract/Event/SingleFilter.hs @@ -13,16 +13,27 @@ {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} -module Network.Ethereum.Contract.Event.SingleFilter - ( event - , event' - , eventMany' - , eventNoFilter - , eventNoFilter' - , eventManyNoFilter' - ) +-- | +-- Module : Network.Ethereum.Contract.Event.SingleFilter +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Simple contract event filter support. +-- - where +module Network.Ethereum.Contract.Event.SingleFilter + ( + event + , event' + , eventMany' + , eventNoFilter + , eventNoFilter' + , eventManyNoFilter' + ) where import Control.Concurrent (threadDelay) import Control.Concurrent.Async (Async) diff --git a/src/Network/Ethereum/Contract/Method.hs b/src/Network/Ethereum/Contract/Method.hs index 22b85bb3..f1773ffb 100644 --- a/src/Network/Ethereum/Contract/Method.hs +++ b/src/Network/Ethereum/Contract/Method.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE ScopedTypeVariables #-} - -- | -- Module : Network.Ethereum.Contract.Method -- Copyright : Alexander Krupenkin 2016-2018 @@ -19,7 +17,10 @@ import Data.Solidity.Abi (AbiPut, AbiType (..)) import Data.Solidity.Abi.Generic () import Data.Solidity.Prim.Bytes (Bytes) +-- | Smart contract method encoding class AbiPut a => Method a where + -- | Solidity function selector + -- https://solidity.readthedocs.io/en/latest/abi-spec.html#function-selector-and-argument-encoding selector :: Proxy a -> Bytes instance AbiType () where diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 85cad613..56a75bb0 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -36,10 +36,12 @@ -- Full code example available in examples folder. -- -module Network.Ethereum.Contract.TH ( - abi - , abiFrom -) where +module Network.Ethereum.Contract.TH + ( + -- * The contract quasiquoters + abi + , abiFrom + ) where import Control.Applicative ((<|>)) import Control.Monad (replicateM, (<=<)) diff --git a/src/Network/Ethereum/Ens.hs b/src/Network/Ethereum/Ens.hs index f8b8640d..c621da3d 100644 --- a/src/Network/Ethereum/Ens.hs +++ b/src/Network/Ethereum/Ens.hs @@ -35,7 +35,10 @@ import Network.JsonRpc.TinyClient (JsonRpcM) -- | Namehash algorithm -- http://docs.ens.domains/en/latest/implementers.html#algorithm -namehash :: ByteString -> BytesN 32 +namehash :: ByteString + -- ^ Domain name + -> BytesN 32 + -- ^ Associated ENS node namehash = unsafeFromByteArrayAccess . foldr algo (zero 32) . split '.' where @@ -44,7 +47,11 @@ namehash = sha3 bs = convert (hash bs :: Digest Keccak_256) -- | Get address of ENS domain -resolve :: (JsonRpcM m, Account p (AccountT p)) => ByteString -> AccountT p m Address +resolve :: (JsonRpcM m, Account p (AccountT p)) + => ByteString + -- ^ Domain name + -> AccountT p m Address + -- ^ Associated address resolve name = do r <- ensRegistry $ Reg.resolver node withParam (to .~ r) $ Resolver.addr node diff --git a/src/Network/Ethereum/Unit.hs b/src/Network/Ethereum/Unit.hs index 629ed4d8..1429607d 100644 --- a/src/Network/Ethereum/Unit.hs +++ b/src/Network/Ethereum/Unit.hs @@ -47,18 +47,21 @@ -- @ -- -module Network.Ethereum.Unit ( - Unit(..) - , UnitSpec(..) - , Wei - , Babbage - , Lovelace - , Shannon - , Szabo - , Finney - , Ether - , KEther - ) where +module Network.Ethereum.Unit + ( + -- * The @Unit@ type class + Unit(..) + + -- * Ethereum value metrics + , Wei + , Babbage + , Lovelace + , Shannon + , Szabo + , Finney + , Ether + , KEther + ) where import Data.Proxy (Proxy (..)) import Data.Text.Lazy (Text, unpack) @@ -72,6 +75,7 @@ import qualified Text.Read.Lex as L class (Read a, Show a, UnitSpec a, Fractional a) => Unit a where -- | Make a value from integer wei fromWei :: Integer -> a + -- | Convert a value to integer wei toWei :: a -> Integer diff --git a/src/Network/Ethereum/Web3.hs b/src/Network/Ethereum/Web3.hs index f9f71232..bbe257a1 100644 --- a/src/Network/Ethereum/Web3.hs +++ b/src/Network/Ethereum/Web3.hs @@ -17,31 +17,28 @@ -- Web3 Haskell library currently use JSON-RPC over HTTP to access node functionality. -- -module Network.Ethereum.Web3 ( +module Network.Ethereum.Web3 + ( + -- * Base monad for any Ethereum node communication + Web3 + , runWeb3 - -- ** Monad as base of any Ethereum node communication - Web3 - , runWeb3 + -- * Basic transaction sending + , module Account - -- ** Basic transaction sending - , module Network.Ethereum.Account + -- * Basic event listening + , EventAction(..) + , event - -- ** Basic event listening - , EventAction(..) - , event - , event' + -- * Primitive data types + , module Prim - -- ** Primitive data types - , module Data.Solidity.Prim + -- * Metric unit system + , module Unit + ) where - -- ** Metric unit system - , module Network.Ethereum.Unit - - ) where - -import Data.Solidity.Prim -import Network.Ethereum.Account +import Data.Solidity.Prim as Prim +import Network.Ethereum.Account as Account import Network.Ethereum.Api.Provider (Web3, runWeb3) -import Network.Ethereum.Contract.Event (EventAction (..), event, - event') -import Network.Ethereum.Unit +import Network.Ethereum.Contract.Event (EventAction (..), event) +import Network.Ethereum.Unit as Unit diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index 5c300f9c..7bd1622b 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -45,17 +45,25 @@ -- @ -- -module Network.JsonRpc.TinyClient ( - JsonRpcException(..) - , defaultSettings - , JsonRpcClient - , jsonRpcServer - , jsonRpcManager - , RpcError(..) - , MethodName - , JsonRpcM - , remote - ) where +module Network.JsonRpc.TinyClient + ( + -- * The JSON-RPC interaction monad + JsonRpcM + + -- * JSON-RPC client settings + , JsonRpcClient + , defaultSettings + , jsonRpcServer + , jsonRpcManager + + -- * Error handling + , JsonRpcException(..) + , RpcError(..) + + -- * Remote method call + , remote + , MethodName + ) where import Control.Applicative ((<|>)) import Control.Exception (Exception) From 737ab7d5e132071988dbb1393418f171e60abbd8 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 17 Oct 2018 16:58:38 +0300 Subject: [PATCH 020/237] Using OneTuple library replacing Singleton type --- examples/{ => token}/ERC20.hs | 0 examples/{ => token}/ERC20.json | 0 examples/{TokenInfo.hs => token/Main.hs} | 0 package.yaml | 20 ++-- src/Data/Solidity/Prim.hs | 3 +- src/Data/Solidity/Prim/String.hs | 6 +- src/Data/Solidity/Prim/Tuple.hs | 22 ++-- src/Network/Ethereum/Contract/TH.hs | 5 +- test-support/.gitignore | 11 -- test-support/Makefile | 23 ---- test-support/abis/ERC20.json | 110 ------------------ test-support/bower.json | 12 -- test-support/chanterelle.json | 19 --- test-support/compile/Compile.purs | 20 ---- test-support/contracts/ComplexStorage.sol | 34 ------ test-support/contracts/Linearization.sol | 35 ------ test-support/contracts/Migrations.sol | 23 ---- test-support/contracts/Registry.sol | 10 -- test-support/contracts/SimpleStorage.sol | 12 -- test-support/inject-contract-addresses.sh | 26 ----- test-support/package.json | 18 --- test-support/src/ContractConfig.purs | 46 -------- test-support/src/Main.purs | 44 ------- unit/Data/Solidity/Test/EncodingSpec.hs | 5 +- .../Ethereum/Web3/Test/MethodDumpSpec.hs | 2 +- 25 files changed, 25 insertions(+), 481 deletions(-) rename examples/{ => token}/ERC20.hs (100%) rename examples/{ => token}/ERC20.json (100%) rename examples/{TokenInfo.hs => token/Main.hs} (100%) delete mode 100644 test-support/.gitignore delete mode 100644 test-support/Makefile delete mode 100644 test-support/abis/ERC20.json delete mode 100644 test-support/bower.json delete mode 100644 test-support/chanterelle.json delete mode 100644 test-support/compile/Compile.purs delete mode 100644 test-support/contracts/ComplexStorage.sol delete mode 100644 test-support/contracts/Linearization.sol delete mode 100644 test-support/contracts/Migrations.sol delete mode 100644 test-support/contracts/Registry.sol delete mode 100644 test-support/contracts/SimpleStorage.sol delete mode 100755 test-support/inject-contract-addresses.sh delete mode 100644 test-support/package.json delete mode 100644 test-support/src/ContractConfig.purs delete mode 100644 test-support/src/Main.purs diff --git a/examples/ERC20.hs b/examples/token/ERC20.hs similarity index 100% rename from examples/ERC20.hs rename to examples/token/ERC20.hs diff --git a/examples/ERC20.json b/examples/token/ERC20.json similarity index 100% rename from examples/ERC20.json rename to examples/token/ERC20.json diff --git a/examples/TokenInfo.hs b/examples/token/Main.hs similarity index 100% rename from examples/TokenInfo.hs rename to examples/token/Main.hs diff --git a/package.yaml b/package.yaml index 1f12e778..801b4c89 100644 --- a/package.yaml +++ b/package.yaml @@ -13,16 +13,13 @@ category: Network extra-source-files: - README.md - CHANGELOG.md -- test-support/contracts/Migrations.sol -- test-support/contracts/SimpleStorage.sol -- test-support/truffle.js -- test-support/migrations/1_initial_migration.js -- test-support/migrations/2_deploy_contracts.js -- test-support/convertAbi.sh -- test-support/inject-contract-addresses.sh -- examples/ERC20.hs -- examples/ERC20.json -- examples/TokenInfo.hs +- examples/token/ERC20.hs +- examples/token/ERC20.json +- examples/token/Main.hs +- test/contracts/Registry.json +- test/contracts/SimpleStorage.json +- test/contracts/ComplexStorage.json +- test/contracts/Linearization.json dependencies: - base >4.9 && <4.12 @@ -39,9 +36,10 @@ dependencies: - cryptonite ==0.25.* - exceptions - secp256k1 -- relapse - basement >=0.0.7 && <0.1 - machines >=0.6.3 && <0.7 +- OneTuple +- relapse - tagged >=0.8.5 && <0.9 - parsec >=3.1.13.0 && <3.2 - memory >=0.14.16 && <0.15 diff --git a/src/Data/Solidity/Prim.hs b/src/Data/Solidity/Prim.hs index b60751d4..38764b5b 100644 --- a/src/Data/Solidity/Prim.hs +++ b/src/Data/Solidity/Prim.hs @@ -18,7 +18,6 @@ module Data.Solidity.Prim , IntN , UIntN , ListN - , Singleton(..) ) where import Data.Solidity.Prim.Address (Address) @@ -28,4 +27,4 @@ import Data.Solidity.Prim.Int (IntN, UIntN) import Data.Solidity.Prim.List (ListN) import Data.Solidity.Prim.String () import Data.Solidity.Prim.Tagged () -import Data.Solidity.Prim.Tuple (Singleton (..)) +import Data.Solidity.Prim.Tuple () diff --git a/src/Data/Solidity/Prim/String.hs b/src/Data/Solidity/Prim/String.hs index d712b67d..8a3e2be3 100644 --- a/src/Data/Solidity/Prim/String.hs +++ b/src/Data/Solidity/Prim/String.hs @@ -10,11 +10,7 @@ -- Ethereum Abi UTF8-encoded string type. -- -module Data.Solidity.Prim.String - ( - -- * The strict @Text@ type - Text - ) where +module Data.Solidity.Prim.String where import Data.Text (Text) import Data.Text.Encoding (decodeUtf8, encodeUtf8) diff --git a/src/Data/Solidity/Prim/Tuple.hs b/src/Data/Solidity/Prim/Tuple.hs index 25835af9..6ecee399 100644 --- a/src/Data/Solidity/Prim/Tuple.hs +++ b/src/Data/Solidity/Prim/Tuple.hs @@ -15,13 +15,10 @@ -- Tuple type abi encoding instances. -- -module Data.Solidity.Prim.Tuple - ( - -- * The @Singleton@ type - Singleton(..) - ) where +module Data.Solidity.Prim.Tuple where import Data.Proxy (Proxy (..)) +import Data.Tuple.OneTuple (OneTuple (..)) import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) @@ -29,18 +26,13 @@ import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Abi.Generic () import Data.Solidity.Prim.Tuple.TH (tupleDecs) --- | The type for single element tuples -newtype Singleton a = Singleton { unSingleton :: a } - deriving GHC.Generic +deriving instance GHC.Generic (OneTuple a) +instance Generic (OneTuple a) -deriving instance Eq a => Eq (Singleton a) -deriving instance Show a => Show (Singleton a) -instance Generic (Singleton a) - -instance AbiType a => AbiType (Singleton a) where +instance AbiType a => AbiType (OneTuple a) where isDynamic _ = isDynamic (Proxy :: Proxy a) -instance AbiGet a => AbiGet (Singleton a) -instance AbiPut a => AbiPut (Singleton a) +instance AbiGet a => AbiGet (OneTuple a) +instance AbiPut a => AbiPut (OneTuple a) $(fmap concat $ sequence $ map tupleDecs [2..20]) diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 56a75bb0..497c3b2d 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -57,6 +57,7 @@ import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Lazy as LT import qualified Data.Text.Lazy.Encoding as LT +import Data.Tuple.OneTuple (only) import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) import Language.Haskell.TH @@ -67,7 +68,7 @@ import Lens.Micro.Aeson (key, _JSON, _String) import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Event (IndexedEvent (..)) import Data.Solidity.Prim (Address, Bytes, BytesN, IntN, - ListN, Singleton (..), UIntN) + ListN, UIntN) import Data.String.Extra (toLowerFirst, toUpperFirst) import Language.Solidity.Abi (ContractAbi (..), Declaration (..), @@ -173,7 +174,7 @@ funWrapper c name dname args result = do |] , if c then funD' name (varP <$> vars) $ case result of - Just [_] -> [|unSingleton <$> call $(params)|] + Just [_] -> [|only <$> call $(params)|] _ -> [|call $(params)|] else funD' name (varP <$> vars) $ [|send $(params)|] ] diff --git a/test-support/.gitignore b/test-support/.gitignore deleted file mode 100644 index 8028e1c8..00000000 --- a/test-support/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -/bower_components/ -/node_modules/ -/.pulp-cache/ -/output/ -/generated-docs/ -/.psc-package/ -/.psc* -/.purs* -/.psa* -package-lock.json -src/Contracts diff --git a/test-support/Makefile b/test-support/Makefile deleted file mode 100644 index 74aa7146..00000000 --- a/test-support/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -.PHONY: install build compile-contracts deploy test - -help: ## Ask for help! - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' - -all: install - @echo prereqs that are newer than install: $? - -install: ## Install all dependencies - npm install; - bower install - -build: ## Builds the application - ./node_modules/.bin/pulp build - -compile-contracts: ## Compile contracts - ./node_modules/.bin/pulp build --src-path compile -m Compile --to compile.js && node compile.js --log-level info; rm -f compile.js - -deploy: compile-contracts build ## Deploy contracts - ./node_modules/.bin/pulp run - -test: compile-contracts ## Test contracts - ./node_modules/.bin/pulp test diff --git a/test-support/abis/ERC20.json b/test-support/abis/ERC20.json deleted file mode 100644 index d0d773a8..00000000 --- a/test-support/abis/ERC20.json +++ /dev/null @@ -1,110 +0,0 @@ -[ - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "balances", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "balance", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } -] diff --git a/test-support/bower.json b/test-support/bower.json deleted file mode 100644 index 7360b12f..00000000 --- a/test-support/bower.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "test-support", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "output" - ], - "devDependencies": { - "purescript-chanterelle": "f-o-a-m/chanterelle#v0.11.0" - } -} diff --git a/test-support/chanterelle.json b/test-support/chanterelle.json deleted file mode 100644 index 9f2c342d..00000000 --- a/test-support/chanterelle.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "hs-web3-test-support", - "version": "0.0.1", - "source-dir": "contracts", - "artifacts-dir": "build/contracts/abis", - "modules": [ "ComplexStorage" - , "SimpleStorage" - , "Linearization" - , "Registry" - ], - "dependencies": [], - "extra-abis": "abis", - "libraries": { - }, - "purescript-generator": { - "output-path": "src", - "module-prefix": "Contracts" - } -} diff --git a/test-support/compile/Compile.purs b/test-support/compile/Compile.purs deleted file mode 100644 index 7259016b..00000000 --- a/test-support/compile/Compile.purs +++ /dev/null @@ -1,20 +0,0 @@ -module Compile where - -import Prelude -import Chanterelle (compileMain) -import Control.Monad.Aff.Console (CONSOLE) -import Control.Monad.Eff (Eff) -import Control.Monad.Eff.Exception (EXCEPTION) -import Node.FS.Aff (FS) -import Node.Process (PROCESS) - -main :: forall eff. - Eff - ( console :: CONSOLE - , fs :: FS - , process :: PROCESS - , exception :: EXCEPTION - | eff - ) - Unit -main = compileMain diff --git a/test-support/contracts/ComplexStorage.sol b/test-support/contracts/ComplexStorage.sol deleted file mode 100644 index 97d0420f..00000000 --- a/test-support/contracts/ComplexStorage.sol +++ /dev/null @@ -1,34 +0,0 @@ -pragma solidity ^0.4.13; - -contract ComplexStorage { - uint public uintVal; - int public intVal; - bool public boolVal; - int224 public int224Val; - bool[2] public boolVectorVal; - int[] public intListVal; - string public stringVal; - bytes16 public bytes16Val; - bytes2[4][] public bytes2VectorListVal; - - event ValsSet(uint a, int b, bool c, int224 d, bool[2] e, int[] f, string g, bytes16 h, bytes2[4][] i); - - function setValues(uint _uintVal, int _intVal, bool _boolVal, int224 _int224Val, bool[2] _boolVectorVal, int[] _intListVal, string _stringVal, bytes16 _bytes16Val, bytes2[4][] _bytes2VectorListVal) public { - uintVal = _uintVal; - intVal = _intVal; - boolVal = _boolVal; - int224Val = _int224Val; - boolVectorVal = _boolVectorVal; - intListVal = _intListVal; - stringVal = _stringVal; - bytes16Val = _bytes16Val; - bytes2VectorListVal = _bytes2VectorListVal; - - ValsSet(_uintVal, _intVal, _boolVal, _int224Val, _boolVectorVal, _intListVal, _stringVal, _bytes16Val, _bytes2VectorListVal); - } - - function getVals () constant public returns (uint, int, bool, int224, bool[2], int[], string, bytes16, bytes2[4][]) { - return (uintVal, intVal, boolVal, int224Val, boolVectorVal, intListVal, stringVal, bytes16Val, bytes2VectorListVal); - } - -} diff --git a/test-support/contracts/Linearization.sol b/test-support/contracts/Linearization.sol deleted file mode 100644 index a5bd9803..00000000 --- a/test-support/contracts/Linearization.sol +++ /dev/null @@ -1,35 +0,0 @@ -pragma solidity ^0.4.22; - -contract Linearization { - - event E1(address sender, uint amount); - event E2(string tag, bytes4 uuid); - event E3(address txOrigin, uint blockNumber); - event E4(bytes4 sig, bytes32 blockHash); - - function e12() public { - emit E1(msg.sender, 0); - emit E2("hello", 0xdeadbeef); - } - - function e21() public { - emit E2("hello", 0xdeadbeef); - emit E1(msg.sender, 0); - } - - function e1() public { - emit E1(msg.sender, 0); - } - - function e2() public { - emit E2("hello", 0xdeadbeef); - } - - function e3() public { - emit E3(tx.origin, block.number); - } - - function e4() public { - emit E4(msg.sig, blockhash(block.number)); - } -} \ No newline at end of file diff --git a/test-support/contracts/Migrations.sol b/test-support/contracts/Migrations.sol deleted file mode 100644 index 7e7fe8d4..00000000 --- a/test-support/contracts/Migrations.sol +++ /dev/null @@ -1,23 +0,0 @@ -pragma solidity ^0.4.4; - -contract Migrations { - address public owner; - uint public last_completed_migration; - - modifier restricted() { - if (msg.sender == owner) _; - } - - function Migrations() { - owner = msg.sender; - } - - function setCompleted(uint completed) restricted { - last_completed_migration = completed; - } - - function upgrade(address new_address) restricted { - Migrations upgraded = Migrations(new_address); - upgraded.setCompleted(last_completed_migration); - } -} diff --git a/test-support/contracts/Registry.sol b/test-support/contracts/Registry.sol deleted file mode 100644 index d08547eb..00000000 --- a/test-support/contracts/Registry.sol +++ /dev/null @@ -1,10 +0,0 @@ -pragma solidity ^0.4.22; - -contract Registry { - - - event A(bytes32 indexed listingHash); - event B(address indexed sender, bytes32 listingHash); - event C(address dog, bytes32 cat); - -} diff --git a/test-support/contracts/SimpleStorage.sol b/test-support/contracts/SimpleStorage.sol deleted file mode 100644 index d77b1f5c..00000000 --- a/test-support/contracts/SimpleStorage.sol +++ /dev/null @@ -1,12 +0,0 @@ -pragma solidity ^0.4.15; - -contract SimpleStorage { - uint public count; - - event _CountSet(uint _count); - - function setCount(uint _count) { - count = _count; - _CountSet(_count); - } -} diff --git a/test-support/inject-contract-addresses.sh b/test-support/inject-contract-addresses.sh deleted file mode 100755 index 69b3ef33..00000000 --- a/test-support/inject-contract-addresses.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -EXPORT_STORE=${EXPORT_STORE:-/tmp/detected-vars} -SEARCH_DIRECTORY=${SEARCH_DIRECTORY:-build/contracts} - -function detect_contract_addresses() { - for file in $(find $SEARCH_DIRECTORY -maxdepth 1 -type f -name '*.json'); do - maybe_address=`jq -r .networks[].address $file | grep -v null | head -n 1` - if [ -z "${maybe_address}" ]; then - echo no addresses detected for $file >&2 - else - contract_name=`echo $file | sed -e 's@'$SEARCH_DIRECTORY'/@@g' -e 's/.json//g'` - echo found address "${maybe_address}" for "${contract_name}" >&2 - contract_var=`echo $contract_name | tr '[:lower:]' '[:upper:]'`_CONTRACT_ADDRESS - echo the var for "${contract_name}" is "${contract_var}" >&2 - echo "export ${contract_var}=`echo ${maybe_address}`" - fi - done -} - -detect_contract_addresses 2>/dev/null >$EXPORT_STORE - -source $EXPORT_STORE -$@ diff --git a/test-support/package.json b/test-support/package.json deleted file mode 100644 index 52c5e566..00000000 --- a/test-support/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "hs-web3-test-support", - "private": true, - "devDependencies": { - "bower": "^1.8.2", - "pulp": "^12.0.1", - "purescript": "^0.11.7", - "solc": "^0.4.22", - "crypto-js": "^3.1.8", - "ethjs-provider-http": "^0.1.6", - "keccak": "^1.4.0", - "mkdirp": "^0.5.1", - "rlp": "^2.0.0", - "secp256k1": "^3.5.0", - "zeppelin-solidity": "^1.7.0" - }, - "dependencies": {} -} diff --git a/test-support/src/ContractConfig.purs b/test-support/src/ContractConfig.purs deleted file mode 100644 index d142ae2b..00000000 --- a/test-support/src/ContractConfig.purs +++ /dev/null @@ -1,46 +0,0 @@ -module ContractConfig - ( simpleStorageConfig - , complexStorageConfig - , linearizationConfig - ) where - -import Chanterelle.Internal.Types (ContractConfig, NoArgs, noArgs, constructorNoArgs) - --------------------------------------------------------------------------------- --- | SimpleStorage --------------------------------------------------------------------------------- - -simpleStorageConfig - :: ContractConfig NoArgs -simpleStorageConfig = - { filepath : "build/contracts/abis/SimpleStorage.json" - , name : "SimpleStorage" - , constructor : constructorNoArgs - , unvalidatedArgs : noArgs - } - --------------------------------------------------------------------------------- --- | Linearization --------------------------------------------------------------------------------- - -linearizationConfig - :: ContractConfig NoArgs -linearizationConfig = - { filepath : "build/contracts/abis/Linearization.json" - , name : "Linearization" - , constructor : constructorNoArgs - , unvalidatedArgs : noArgs - } - --------------------------------------------------------------------------------- --- | ComplexStorage --------------------------------------------------------------------------------- - -complexStorageConfig - :: ContractConfig NoArgs -complexStorageConfig = - { filepath : "build/contracts/abis/ComplexStorage.json" - , name : "ComplexStorage" - , constructor : constructorNoArgs - , unvalidatedArgs : noArgs - } diff --git a/test-support/src/Main.purs b/test-support/src/Main.purs deleted file mode 100644 index 12c541f0..00000000 --- a/test-support/src/Main.purs +++ /dev/null @@ -1,44 +0,0 @@ -module Main where - -import Prelude - -import Chanterelle (deployMain) -import Chanterelle.Deploy (deployContract) -import Chanterelle.Internal.Types (DeployM, DeployConfig(..)) -import ContractConfig (simpleStorageConfig, complexStorageConfig, linearizationConfig) -import Control.Monad.Eff (Eff) -import Control.Monad.Eff.Console (CONSOLE) -import Control.Monad.Eff.Exception (EXCEPTION) -import Control.Monad.Reader.Class (ask) -import Data.Lens ((?~)) -import Data.Maybe (fromJust) -import Network.Ethereum.Web3 (Address, ETH, _from, _gas, defaultTransactionOptions) -import Network.Ethereum.Core.BigNumber (parseBigNumber, decimal) -import Node.FS.Aff (FS) -import Node.Process (PROCESS) -import Partial.Unsafe (unsafePartial) - -main :: forall e. Eff (console :: CONSOLE, eth :: ETH, fs :: FS, process :: PROCESS, exception :: EXCEPTION | e) Unit -main = deployMain deployScript - - - -type DeployResults = - ( simpleStorage :: Address - , complexStorage :: Address - , linearization :: Address - ) - -deployScript :: forall eff. DeployM eff (Record DeployResults) -deployScript = do - deployCfg@(DeployConfig {primaryAccount}) <- ask - let bigGasLimit = unsafePartial fromJust $ parseBigNumber decimal "4712388" - txOpts = defaultTransactionOptions # _from ?~ primaryAccount - # _gas ?~ bigGasLimit - simpleStorage <- deployContract txOpts simpleStorageConfig - complexStorage <- deployContract txOpts complexStorageConfig - linearization <- deployContract txOpts linearizationConfig - pure { simpleStorage: simpleStorage.deployAddress - , complexStorage: complexStorage.deployAddress - , linearization: linearization.deployAddress - } diff --git a/unit/Data/Solidity/Test/EncodingSpec.hs b/unit/Data/Solidity/Test/EncodingSpec.hs index 3e0c3d83..5b0bb8af 100644 --- a/unit/Data/Solidity/Test/EncodingSpec.hs +++ b/unit/Data/Solidity/Test/EncodingSpec.hs @@ -8,6 +8,7 @@ module Data.Solidity.Test.EncodingSpec where import Data.Monoid ((<>)) import Data.Text (Text) +import Data.Tuple.OneTuple (OneTuple (..)) import Generics.SOP (Generic, Rep) import Test.Hspec @@ -16,7 +17,7 @@ import Data.Solidity.Abi (AbiGet, AbiPut, GenericAbiGet, GenericAbiPut) import Data.Solidity.Abi.Codec (decode, decode', encode, encode') import Data.Solidity.Prim (Address, Bytes, BytesN, IntN, - ListN, Singleton (..), UIntN) + ListN, UIntN) import Data.Solidity.Prim.Address (fromHexString, toHexString) spec :: Spec @@ -150,7 +151,7 @@ tuplesTest = in roundTripGeneric decoded encoded it "can encode 1-tuples with dynamic arg" $ do - let decoded = Singleton ([True, False] :: [Bool]) + let decoded = OneTuple ([True, False] :: [Bool]) encoded = "0x0000000000000000000000000000000000000000000000000000000000000020" <> "0x0000000000000000000000000000000000000000000000000000000000000002" <> "0x0000000000000000000000000000000000000000000000000000000000000001" diff --git a/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs b/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs index 8abe8da3..16ce0a5f 100644 --- a/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs +++ b/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs @@ -9,5 +9,5 @@ import Test.Hspec spec :: Spec spec = describe "methodDump" $ it "can dump an ABI" $ do - let theApiDump = [abiFrom|examples/ERC20.json|] + let theApiDump = [abiFrom|examples/token/ERC20.json|] in theApiDump `shouldNotBe` "" From 413571beb9f7497d69fc414c9a1de136334424bb Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 17 Oct 2018 17:09:43 +0300 Subject: [PATCH 021/237] Using AbiGet class based deconing of event params Not all primitive types have `Generic` instance (`Bytes` for example). For this reason in some cases (indexed bytes) event cannot be decoded. But all primitive types have `AbiGet` instance and for TH generated types instance created via default generic based implementation. --- src/Data/Solidity/Event.hs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Data/Solidity/Event.hs b/src/Data/Solidity/Event.hs index b2e748fd..bce0a51c 100644 --- a/src/Data/Solidity/Event.hs +++ b/src/Data/Solidity/Event.hs @@ -35,8 +35,8 @@ import Data.Proxy (Proxy (..)) import Generics.SOP (Generic, I (..), NP (..), NS (..), Rep, SOP (..), from, to) -import Data.Solidity.Abi (GenericAbiGet) -import Data.Solidity.Abi.Codec (decode') +import Data.Solidity.Abi (AbiGet) +import Data.Solidity.Abi.Codec (decode) import Data.Solidity.Event.Internal import Network.Ethereum.Api.Types (Change (..)) @@ -51,11 +51,11 @@ class ArrayParser a where instance ArrayParser (NP f '[]) where arrayParser _ = Right Nil -instance (ArrayParser (NP I as), Generic a, Rep a ~ rep, GenericAbiGet rep) +instance (ArrayParser (NP I as), AbiGet a) => ArrayParser (NP I (a : as)) where arrayParser [] = Left "Empty" arrayParser (a : as) = do - a' <- decode' a + a' <- decode a as' <- arrayParser as return $ I a' :* as' @@ -81,16 +81,14 @@ data Event i ni = Event i ni parseChange :: ( Generic i , Rep i ~ irep , ArrayParser irep - , Generic ni - , Rep ni ~ nirep - , GenericAbiGet nirep + , AbiGet ni ) => Change -> Bool -- ^ is anonymous event -> Either String (Event i ni) parseChange change anonymous = - Event <$> genericArrayParser topics <*> decode' data_ + Event <$> genericArrayParser topics <*> decode data_ where topics | anonymous = changeTopics change | otherwise = tail (changeTopics change) @@ -130,12 +128,12 @@ class DecodeEvent i ni e | e -> i ni where instance ( IndexedEvent i ni e , Generic i , Rep i ~ SOP I '[hli] + , AbiGet ni , Generic ni , Rep ni ~ SOP I '[hlni] , Generic e , Rep e ~ SOP I '[hle] , CombineChange i ni e - , GenericAbiGet (SOP I '[hlni]) , ArrayParser (SOP I '[hli]) ) => DecodeEvent i ni e where decodeEvent change = do From 960e8e19da2125441bb55e745db6dd190a1ee5fa Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 18 Oct 2018 12:37:47 +0300 Subject: [PATCH 022/237] Fix TH to create contract constructor without arguments too --- src/Network/Ethereum/Contract/TH.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 497c3b2d..782385d3 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -50,7 +50,6 @@ import Data.ByteArray (convert) import qualified Data.Char as Char import Data.Default (Default (..)) import Data.List (group, sort, uncons) -import Data.Maybe (listToMaybe) import Data.Monoid ((<>)) import Data.Tagged (Tagged) import Data.Text (Text) @@ -308,14 +307,18 @@ isKeyword = flip elem [ "as", "case", "of", "class" constructorSpec :: String -> Maybe (Text, Text, Text, Declaration) constructorSpec str = do - name <- str ^? key "contractName" . _String + name <- str ^? key "contractName" . _String abiValue <- str ^? key "abi" bytecode <- str ^? key "bytecode" . _String - decl <- listToMaybe =<< (filter isContructor . unAbi <$> str ^? key "abi" . _JSON) - return (name, LT.toStrict $ LT.decodeUtf8 $ Aeson.encode abiValue, bytecode, decl) + decl <- filter isContructor . unAbi <$> str ^? key "abi" . _JSON + return (name, jsonEncode abiValue, bytecode, toConstructor decl) where + jsonEncode = LT.toStrict . LT.decodeUtf8 . Aeson.encode isContructor (DConstructor _) = True isContructor _ = False + toConstructor [] = DConstructor [] + toConstructor [a] = a + toConstructor _ = error "Broken ABI: more that one constructor" -- | Abi to declarations converter quoteAbiDec :: String -> DecsQ From e1f8602c8089215bd040db1526af7ba84f5174f7 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 18 Oct 2018 16:00:08 +0300 Subject: [PATCH 023/237] Live tests upgrades & fixes, added local account test spec --- package.yaml | 1 + .../Ethereum/Web3/Test/ComplexStorageSpec.hs | 102 +- test/Network/Ethereum/Web3/Test/ERC20Spec.hs | 23 +- .../Ethereum/Web3/Test/LinearizationSpec.hs | 247 +- .../Ethereum/Web3/Test/RegistrySpec.hs | 15 +- .../Ethereum/Web3/Test/SimpleStorageSpec.hs | 213 +- test/Network/Ethereum/Web3/Test/Utils.hs | 173 +- test/contracts/ComplexStorage.json | 4533 +++++++++++++++++ test/contracts/Linearization.json | 2716 ++++++++++ test/contracts/Registry.json | 506 ++ test/contracts/SimpleStorage.json | 600 +++ unit/Language/Solidity/Test/CompilerSpec.hs | 4 +- unit/Network/Ethereum/Web3/Test/EventSpec.hs | 19 +- .../Ethereum/Web3/Test/LocalAccountSpec.hs | 26 + 14 files changed, 8744 insertions(+), 434 deletions(-) create mode 100644 test/contracts/ComplexStorage.json create mode 100644 test/contracts/Linearization.json create mode 100644 test/contracts/Registry.json create mode 100644 test/contracts/SimpleStorage.json create mode 100644 unit/Network/Ethereum/Web3/Test/LocalAccountSpec.hs diff --git a/package.yaml b/package.yaml index 801b4c89..9648a74f 100644 --- a/package.yaml +++ b/package.yaml @@ -133,6 +133,7 @@ tests: - hspec-contrib >=0.4.0 && <0.6 - hspec >=2.4.8 && <2.6 - split >=0.2.3 && <0.3 + - random - time - stm >=2.4.5 && <2.5 - web3 diff --git a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs b/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs index 38a9f28a..e1886f9d 100644 --- a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs +++ b/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns #-} @@ -34,22 +35,30 @@ import Data.Default import Data.Either (isRight) import Data.Maybe import Data.String (fromString) +import System.IO.Unsafe (unsafePerformIO) + import qualified Network.Ethereum.Api.Eth as Eth import Network.Ethereum.Api.Types (Call (..), Filter (..)) +import Network.Ethereum.Contract (new) import Network.Ethereum.Contract.TH import Network.Ethereum.Web3 hiding (convert) import Network.Ethereum.Web3.Test.Utils -import System.IO.Unsafe (unsafePerformIO) import Test.Hspec -[abiFrom|test-support/build/contracts/abis/ComplexStorage.json|] +[abiFrom|test/contracts/ComplexStorage.json|] + +deploy :: IO Address +deploy = do + Just address <- web3 $ withAccount () $ withParam id $ new ComplexStorageContract + putStrLn $ "ComplexStorage: " ++ show address + return address spec :: Spec -spec = makeEnv `before` complexStorageSpec +spec = deploy `before` complexStorageSpec -complexStorageSpec :: SpecWith (ContractsEnv, Address) +complexStorageSpec :: SpecWith Address complexStorageSpec = do describe "can interact with a ComplexStorage contract" $ do -- todo: these should ideally be arbitrary! @@ -65,27 +74,25 @@ complexStorageSpec = do sByte2sVec = [sByte2sElem, sByte2sElem, sByte2sElem, sByte2sElem] sByte2s = [sByte2sVec, sByte2sVec] - it "can set the values of a ComplexStorage and validate them with an event" $ - \(ContractsEnv{complexStorage}, primaryAccount) -> do - let theCall = callFromTo primaryAccount complexStorage - fltr = (def :: Filter ValsSet) { filterAddress = Just [complexStorage] } + it "can set the values of a ComplexStorage and validate them with an event" $ \storage -> do + let fltr = (def :: Filter ValsSet) { filterAddress = Just [storage] } -- kick off listening for the ValsSet event vals <- newEmptyMVar - fiber <- runWeb3Configured' $ + fiber <- web3 $ event fltr $ \vs -> do liftIO $ putMVar vals vs pure TerminateEvent -- kick off tx - ret <- runWeb3Configured $ setValues theCall - sUint - sInt - sBool - sInt224 - sBools - sInts - sString - sBytes16 - sByte2s + _ <- contract storage $ setValues + sUint + sInt + sBool + sInt224 + sBools + sInts + sString + sBytes16 + sByte2s -- wait for its ValsSet event wait fiber (ValsSet vsA vsB vsC vsD vsE vsF vsG vsH vsI) <- takeMVar vals @@ -99,19 +106,31 @@ complexStorageSpec = do vsH `shouldBe` sBytes16 vsI `shouldBe` sByte2s - it "can verify that it set the values correctly" $ \(ContractsEnv{complexStorage}, primaryAccount) -> do - let theCall = callFromTo primaryAccount complexStorage - runGetterCall f = runWeb3Configured (f theCall) - -- there really has to be a better way to do this - uintVal' <- runWeb3Configured $ uintVal theCall Latest - intVal' <- runWeb3Configured $ intVal theCall Latest - boolVal' <- runWeb3Configured $ boolVal theCall Latest - int224Val' <- runWeb3Configured $ int224Val theCall Latest - boolsVal <- runWeb3Configured $ boolVectorVal theCall Latest 0 - intsVal <- runWeb3Configured $ intListVal theCall Latest 0 - stringVal' <- runWeb3Configured $ stringVal theCall Latest - bytes16Val' <- runWeb3Configured $ bytes16Val theCall Latest - bytes2s <- runWeb3Configured $ bytes2VectorListVal theCall Latest 0 0 + it "can verify that it set the values correctly" $ \storage -> do + -- Write a values + _ <- contract storage $ setValues + sUint + sInt + sBool + sInt224 + sBools + sInts + sString + sBytes16 + sByte2s + -- Read a couple of values + (uintVal', intVal', boolVal', int224Val', boolsVal, intsVal, stringVal', bytes16Val', bytes2s) + <- contract storage $ (,,,,,,,,) + <$> uintVal + <*> intVal + <*> boolVal + <*> int224Val + <*> boolVectorVal 0 + <*> intListVal 0 + <*> stringVal + <*> bytes16Val + <*> bytes2VectorListVal 0 0 + uintVal' `shouldBe` sUint intVal' `shouldBe` sInt boolVal' `shouldBe` sBool @@ -120,9 +139,20 @@ complexStorageSpec = do intsVal `shouldBe` sInts Prelude.!! 0 stringVal' `shouldBe` sString bytes16Val' `shouldBe` sBytes16 - bytes2s `shouldBe` sByte2sElem + bytes2s `shouldBe` sByte2sElem - it "can decode a complicated value correctly" $ \(ContractsEnv{complexStorage}, primaryAccount) -> do - let theCall = callFromTo primaryAccount complexStorage - allVals <- runWeb3Configured $ getVals theCall Latest + it "can decode a complicated value correctly" $ \storage -> do + -- Write a values + _ <- contract storage $ setValues + sUint + sInt + sBool + sInt224 + sBools + sInts + sString + sBytes16 + sByte2s + -- Read a all values + allVals <- contract storage getVals allVals `shouldBe` (sUint, sInt, sBool, sInt224, sBools, sInts, sString, sBytes16, sByte2s) diff --git a/test/Network/Ethereum/Web3/Test/ERC20Spec.hs b/test/Network/Ethereum/Web3/Test/ERC20Spec.hs index 0f1cbb87..c208a810 100644 --- a/test/Network/Ethereum/Web3/Test/ERC20Spec.hs +++ b/test/Network/Ethereum/Web3/Test/ERC20Spec.hs @@ -1,27 +1,24 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE TemplateHaskell #-} - module Network.Ethereum.Web3.Test.ERC20Spec where -import Data.Default -import Network.Ethereum.Contract.TH -import Network.Ethereum.Web3 -import Network.Ethereum.Web3.Types - - import Test.Hspec -[abiFrom|test-support/abis/ERC20.json|] +import Network.Ethereum.Contract.TH (abiFrom) +import Network.Ethereum.Web3 (Account, UIntN) +import Network.JsonRpc.TinyClient (JsonRpcM) +[abiFrom|examples/token/ERC20.json|] + +-- this spec is just to test compilation spec :: Spec spec = return () - -getBalance :: Web3 (UIntN 256) -getBalance = balanceOf def Latest ("0x1234567890123456789011234567890234567890" :: Address) +getBalance :: (JsonRpcM m, Account p t, Functor (t m)) + => t m (UIntN 256) +getBalance = balanceOf "0x1234567890123456789011234567890234567890" diff --git a/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs b/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs index 6003df7a..ef41bbc5 100644 --- a/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs +++ b/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs @@ -42,22 +42,31 @@ import Data.Default import Data.Either import Data.List (sort) import Data.Maybe (fromJust) -import Network.Ethereum.Contract.Event -import Network.Ethereum.Contract.TH -import Network.Ethereum.Web3 hiding (convert) -import qualified Network.Ethereum.Web3.Eth as Eth -import Network.Ethereum.Web3.Test.Utils -import Network.Ethereum.Web3.Types import System.Environment (getEnv) import System.Random (randomRIO) import Test.Hspec -[abiFrom|test-support/build/contracts/abis/Linearization.json|] +import qualified Network.Ethereum.Api.Eth as Eth +import Network.Ethereum.Api.Types (Change (..), Filter (..), + TxReceipt, unQuantity) +import Network.Ethereum.Contract (new) +import Network.Ethereum.Contract.Event +import Network.Ethereum.Contract.TH (abiFrom) +import Network.Ethereum.Web3 +import Network.Ethereum.Web3.Test.Utils + +[abiFrom|test/contracts/Linearization.json|] + +deploy :: IO Address +deploy = do + Just address <- web3 $ withAccount () $ withParam id $ new LinearizationContract + putStrLn $ "Linearization: " ++ show address + return address spec :: Spec spec = do - makeEnv `before` linearizationSpec - makeEnv `before` floodSpec + deploy `before` linearizationSpec + deploy `before` floodSpec floodCount :: Int floodCount = 200 @@ -68,128 +77,124 @@ floodCount = 200 floodSemCount :: Int floodSemCount = -(floodCount - 1) -linearizationSpec :: SpecWith (ContractsEnv, Address) -linearizationSpec = describe "can bundle and linearize events" $ do - it "can call e12" $ \(ContractsEnv{linearization}, primaryAccount) -> do - let theCall = callFromTo primaryAccount linearization - var <- monitorE1OrE2 linearization - _ <- runWeb3Configured' (e12 theCall) - res <- takeMVar var - res `shouldSatisfy` isLeft - it "can call e21" $ \(ContractsEnv{linearization}, primaryAccount) -> do - -- wait on the next block - runWeb3Configured Eth.blockNumber >>= \bn -> awaitBlock (bn + 1) - let theCall = callFromTo primaryAccount linearization - var <- monitorE1OrE2 linearization - _ <- runWeb3Configured' (e21 theCall) - res <- takeMVar var - res `shouldSatisfy` isRight - -singleFlood :: forall m. (MonadIO m) => Address -> Address -> m Hash -singleFlood from to = liftIO $ do - rando :: Int <- randomRIO (1, 4) - let theCall = callFromTo from to - fnToCall = case rando of - 1 -> e1 - 2 -> e2 - 3 -> e3 - 4 -> e4 - _ -> error "got a number outside of (1,4) after randomR (1,4)" - runWeb3Configured' (fnToCall theCall) - -floodSpec :: SpecWith (ContractsEnv, Address) +linearizationSpec :: SpecWith Address +linearizationSpec = + describe "can bundle and linearize events" $ do + it "can call e12" $ \linearization -> do + var <- monitorE1OrE2 linearization + _ <- contract linearization e12 + res <- takeMVar var + res `shouldSatisfy` isLeft + + it "can call e21" $ \linearization -> do + -- wait on the next block + web3 Eth.blockNumber >>= \bn -> awaitBlock (bn + 1) + var <- monitorE1OrE2 linearization + _ <- contract linearization e21 + res <- takeMVar var + res `shouldSatisfy` isRight + +singleFlood :: forall m. (MonadIO m) => Address -> m TxReceipt +singleFlood linearization = liftIO $ do + rando :: Int <- randomRIO (1, 4) + contract linearization $ + case rando of + 1 -> e1 + 2 -> e2 + 3 -> e3 + 4 -> e4 + _ -> error "got a number outside of (1,4) after randomR (1,4)" + +floodSpec :: SpecWith Address floodSpec = describe "can correctly demonstrate the difference between `multiEvent` and multiple `event'`s" $ do - it "properly linearizes with `multiEvent` when flooded and doesn't with multiple `event`s" $ - \(ContractsEnv{linearization}, primaryAccount) -> do - multiQ <- monitorAllFourMulti linearization - parQ <- monitorAllFourPar linearization - sleepBlocks 10 -- to let the filter settle so we dont block indefinitely on missing events? - - -- flood em and wait for all to finish - void . forM [1..floodCount] . const $ singleFlood primaryAccount linearization - sleepBlocks 10 -- to let the event listeners catch up - - -- wait for all multiEvents to be received and flush em out - multiReceivedEvents <- liftIO . atomically $ flushTQueue multiQ - parReceivedEvents <- liftIO . atomically $ flushTQueue parQ - - -- did we get at least 1/4 of the events? (this is a gotcha when flooding, sometimes nonces get repeated) - length multiReceivedEvents `shouldSatisfy` (>= (floodCount `div` 4)) - length parReceivedEvents `shouldSatisfy` (>= (floodCount `div` 4)) - - -- did both listeners see the same amount of events? - length multiReceivedEvents `shouldBe` length parReceivedEvents - - -- the events pushed into the multi TQueue should already be sorted if they happened in the right order - sort multiReceivedEvents `shouldBe` multiReceivedEvents - -- the events pushed into the TQueue should not be sorted if they didnt come in in the right order - sort parReceivedEvents `shouldNotBe` parReceivedEvents - - -monitorE1OrE2 - :: Address - -> IO (MVar (Either E1 E2)) + it "properly linearizes with `multiEvent` when flooded and doesn't with multiple `event`s" $ \linearization -> do + multiQ <- monitorAllFourMulti linearization + parQ <- monitorAllFourPar linearization + -- to let the filter settle so we dont block indefinitely on missing events? + sleepBlocks 10 + + -- flood em and wait for all to finish + void . forM [1..floodCount] . const . liftIO $ singleFlood linearization + -- to let the event listeners catch up + sleepBlocks 10 + + -- wait for all multiEvents to be received and flush em out + multiReceivedEvents <- liftIO . atomically $ flushTQueue multiQ + parReceivedEvents <- liftIO . atomically $ flushTQueue parQ + + -- did we get at least 1/4 of the events? (this is a gotcha when flooding, sometimes nonces get repeated) + length multiReceivedEvents `shouldSatisfy` (>= (floodCount `div` 4)) + length parReceivedEvents `shouldSatisfy` (>= (floodCount `div` 4)) + + -- did both listeners see the same amount of events? + length multiReceivedEvents `shouldBe` length parReceivedEvents + + -- the events pushed into the multi TQueue should already be sorted if they happened in the right order + sort multiReceivedEvents `shouldBe` multiReceivedEvents + -- the events pushed into the TQueue should not be sorted if they didnt come in in the right order + sort parReceivedEvents `shouldNotBe` parReceivedEvents + +monitorE1OrE2 :: Address -> IO (MVar (Either E1 E2)) monitorE1OrE2 addr = do - var <- newEmptyMVar - let fltr1 = (def :: Filter E1) { filterAddress = Just [addr] } - fltr2 = (def :: Filter E2) { filterAddress = Just [addr] } - filters = fltr1 :? fltr2 :? NilFilters - handler1 e1 = do - liftIO $ putMVar var (Left e1) - pure TerminateEvent - handler2 e2 = do - liftIO $ putMVar var (Right e2) - pure TerminateEvent - handlers = H handler1 :& H handler2 :& RNil - _ <- runWeb3Configured' $ multiEvent filters handlers - pure var + var <- newEmptyMVar + let fltr1 = (def :: Filter E1) { filterAddress = Just [addr] } + fltr2 = (def :: Filter E2) { filterAddress = Just [addr] } + filters = fltr1 :? fltr2 :? NilFilters + handler1 e1 = do + liftIO $ putMVar var (Left e1) + return TerminateEvent + handler2 e2 = do + liftIO $ putMVar var (Right e2) + return TerminateEvent + handlers = H handler1 :& H handler2 :& RNil + _ <- web3 $ multiEvent filters handlers + return var data EventTag = ETE1 | ETE2 | ETE3 | ETE4 - deriving (Eq, Read, Show) + deriving (Eq, Read, Show) instance {-# OVERLAPPING #-} Ord (EventTag, Integer, Integer) where - (_, b1, t1) `compare` (_, b2, t2) = - let bCmp = b1 `compare` b2 - in if bCmp == EQ - then t1 `compare` t2 - else bCmp - -monitorAllFourMulti - :: Address - -> IO (TQueue (EventTag, Integer, Integer)) -- (EventTag, BlockNumber, LogIndex) + (_, b1, t1) `compare` (_, b2, t2) = + let bCmp = b1 `compare` b2 + in if bCmp == EQ then t1 `compare` t2 + else bCmp + +monitorAllFourMulti :: Address + -> IO (TQueue (EventTag, Integer, Integer)) monitorAllFourMulti addr = do - q <- newTQueueIO - let f :: forall a. Default (Filter a) => Filter a - f = defFilter addr - h = enqueueingHandler q - filters = f @E1 :? f @E2 :? f @E3 :? f @E4 :? NilFilters - handlers = h ETE1 :& h ETE2 :& h ETE3 :& h ETE4 :& RNil - void . runWeb3Configured' $ multiEvent filters handlers - return q - -monitorAllFourPar - :: Address - -> IO (TQueue (EventTag, Integer, Integer)) -- (EventTag, BlockNumber, LogIndex) + q <- newTQueueIO + let f :: forall a. Default (Filter a) => Filter a + f = defFilter addr + h = enqueueingHandler q + filters = f @E1 :? f @E2 :? f @E3 :? f @E4 :? NilFilters + handlers = h ETE1 :& h ETE2 :& h ETE3 :& h ETE4 :& RNil + void . web3 $ multiEvent filters handlers + return q + +monitorAllFourPar :: Address + -> IO (TQueue (EventTag, Integer, Integer)) monitorAllFourPar addr = do - q <- newTQueueIO - let f :: forall a. Default (Filter a) => Filter a - f = defFilter addr - h = enqueueingHandler q - unH (H h) = h - - void . forkIO . runWeb3Configured' $ event' (f @E1) (unH $ h ETE1) - void . forkIO . runWeb3Configured' $ event' (f @E2) (unH $ h ETE2) - void . forkIO . runWeb3Configured' $ event' (f @E3) (unH $ h ETE3) - void . forkIO . runWeb3Configured' $ event' (f @E4) (unH $ h ETE4) - return q + q <- newTQueueIO + let f :: forall a. Default (Filter a) => Filter a + f = defFilter addr + h = enqueueingHandler q + unH (H h) = h + + void . forkIO . web3 $ event' (f @E1) (unH $ h ETE1) + void . forkIO . web3 $ event' (f @E2) (unH $ h ETE2) + void . forkIO . web3 $ event' (f @E3) (unH $ h ETE3) + void . forkIO . web3 $ event' (f @E4) (unH $ h ETE4) + return q defFilter :: forall a. Default (Filter a) => Address -> Filter a defFilter addr = (def :: Filter a) { filterAddress = Just [addr] } -enqueueingHandler :: forall a. TQueue (EventTag, Integer, Integer) -> EventTag -> Handler (ReaderT Change Web3 EventAction) a +enqueueingHandler :: forall a. TQueue (EventTag, Integer, Integer) + -> EventTag + -> Handler (ReaderT Change Web3 EventAction) a enqueueingHandler q tag = H . const $ do - Change{..} <- ask - let bn = unQuantity $ fromJust changeBlockNumber - li = unQuantity $ fromJust changeLogIndex - liftIO . atomically $ writeTQueue q (tag, bn, li) - pure ContinueEvent + Change{..} <- ask + let bn = unQuantity $ fromJust changeBlockNumber + li = unQuantity $ fromJust changeLogIndex + liftIO . atomically $ writeTQueue q (tag, bn, li) + return ContinueEvent diff --git a/test/Network/Ethereum/Web3/Test/RegistrySpec.hs b/test/Network/Ethereum/Web3/Test/RegistrySpec.hs index a7265db0..a2186377 100644 --- a/test/Network/Ethereum/Web3/Test/RegistrySpec.hs +++ b/test/Network/Ethereum/Web3/Test/RegistrySpec.hs @@ -9,21 +9,20 @@ module Network.Ethereum.Web3.Test.RegistrySpec where -import Data.Default -import Network.Ethereum.Contract.TH -import Network.Ethereum.Web3 -import Network.Ethereum.Web3.Types +import Data.Default (def) +import Test.Hspec (Spec) +import Network.Ethereum.Api.Types (Filter) +import Network.Ethereum.Contract.TH (abiFrom) +import Network.Ethereum.Web3 (EventAction (TerminateEvent), + Web3, event) -import Test.Hspec - -[abiFrom|test-support/build/contracts/abis/Registry.json|] +[abiFrom|test/contracts/Registry.json|] -- this spec is just to test compilation spec :: Spec spec = return () - monitor :: Web3 () monitor = do let fltr1 = def :: Filter A diff --git a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs index 5244aa59..b58bc833 100644 --- a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs +++ b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} @@ -21,160 +22,146 @@ -- SimpleStorage is a Solidity contract which stores a uint256. -- The point of this test is to test function calls to update and -- read the value, as well as an event monitor. +-- module Network.Ethereum.Web3.Test.SimpleStorageSpec where -import Control.Concurrent (threadDelay) import Control.Concurrent.Async (wait) import Control.Concurrent.MVar -import Control.Monad (void) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Reader (ask) -import Data.ByteString (ByteString) import Data.Default -import Data.Either (isRight) -import Data.Foldable (forM_) import Data.List (sort) -import Data.Maybe -import Data.Monoid -import Data.String (fromString) -import qualified Data.Text as T -import Data.Traversable (for) -import GHC.TypeLits +import Test.Hspec import qualified Network.Ethereum.Api.Eth as Eth import Network.Ethereum.Api.Provider (forkWeb3) import Network.Ethereum.Api.Types +import Network.Ethereum.Contract (new) +import Network.Ethereum.Contract.Event (event') import Network.Ethereum.Contract.TH -import Network.Ethereum.Web3 hiding (convert) +import Network.Ethereum.Web3 -import Numeric (showHex) -import System.Environment (getEnv) -import System.IO.Unsafe (unsafePerformIO) -import Test.Hspec import Network.Ethereum.Web3.Test.Utils -[abiFrom|test-support/build/contracts/abis/SimpleStorage.json|] +[abiFrom|test/contracts/SimpleStorage.json|] unEvT_CountSet :: EvT_CountSet -> UIntN 256 unEvT_CountSet (EvT_CountSet n) = n +deploy :: IO Address +deploy = do + Just address <- web3 $ withAccount () $ withParam id $ new SimpleStorageContract + putStrLn $ "SimpleStorage: " ++ show address + return address + spec :: Spec -spec = makeEnv `before` do +spec = deploy `before` do interactions events -interactions :: SpecWith (ContractsEnv, Address) +interactions :: SpecWith Address interactions = describe "can interact with a SimpleStorage contract" $ do -- todo: this should ideally be arbitrary! let theValue = 12345 - it "can set the value of a SimpleStorage contract" $ \(ContractsEnv{simpleStorage}, primaryAccount) -> do - let theCall = callFromTo primaryAccount simpleStorage - ret <- runWeb3Configured $ setCount theCall theValue - True `shouldBe` True -- we need to get this far - - it "can read the value back" $ \(ContractsEnv{simpleStorage}, primaryAccount) -> do - let theCall = callFromTo primaryAccount simpleStorage - now <- runWeb3Configured Eth.blockNumber - let later = now + 3 - awaitBlock later - v <- runWeb3Configured (count theCall Latest) - v `shouldBe` theValue -events :: SpecWith (ContractsEnv, Address) -events = describe "can interact with a SimpleStorage contract across block intervals" $ do - it "can stream events starting and ending in the future, unbounded" $ \(ContractsEnv{simpleStorage}, primaryAccount) -> do - var <- newMVar [] - let theCall = callFromTo primaryAccount simpleStorage - theSets = [1, 2, 3] - print "Setting up the filter..." - fiber <- runWeb3Configured' $ do - let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [simpleStorage] } - forkWeb3 $ processUntil' var fltr ((3 ==) . length) - print "Setting the values..." - setValues theCall theSets - wait fiber - print "Filter caught 3 values..." - vals <- takeMVar var - sort (unEvT_CountSet <$> vals) `shouldBe` sort theSets + it "can set the value of a SimpleStorage contract and read the value back" $ \storage -> do + _ <- contract storage $ setCount theValue - it "can stream events starting and ending in the future, bounded" $ \(ContractsEnv{simpleStorage}, primaryAccount) -> do - runWeb3Configured Eth.blockNumber >>= \bn -> awaitBlock (bn + 1) - var <- newMVar [] - let theCall = callFromTo primaryAccount simpleStorage - theSets = [13, 14, 15] - start <- runWeb3Configured Eth.blockNumber - let later = BlockWithNumber (start + 3) - latest = BlockWithNumber (start + 8) - fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [simpleStorage] - , filterFromBlock = later - , filterToBlock = latest - } - print "Setting up the filter..." - fiber <- runWeb3Configured' $ - forkWeb3 $ processUntil' var fltr ((3 ==) . length) - awaitBlock (start + 3) - print "Setting the values..." - setValues theCall theSets - wait fiber - print "Filter caught 3 values..." - vals <- takeMVar var - sort (unEvT_CountSet <$> vals) `shouldBe` sort theSets + now <- web3 Eth.blockNumber + let later = now + 3 + awaitBlock later - it "can stream events starting in the past and ending in the future" $ \(ContractsEnv{simpleStorage}, primaryAccount) -> do - runWeb3Configured Eth.blockNumber >>= \bn -> awaitBlock (bn + 1) - var <- newMVar [] - blockNumberVar <- newEmptyMVar - let theCall = callFromTo primaryAccount simpleStorage - theSets1 = [7, 8, 9] - theSets2 = [10, 11, 12] - start <- runWeb3Configured Eth.blockNumber - let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [simpleStorage] } - fiber <- runWeb3Configured' $ do - forkWeb3 $ processUntil var fltr ((3 ==) . length) (liftIO . putMVar blockNumberVar . changeBlockNumber) - print "Running first transactions as past transactions..." - setValues theCall theSets1 - wait fiber - print "All past transactions succeeded... " - Just end <- takeMVar blockNumberVar - awaitBlock $ end + 1 -- make past transactions definitively in past - var' <- newMVar [] - fiber <- runWeb3Configured' $ do - let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [simpleStorage - ] - , filterFromBlock = BlockWithNumber start} - forkWeb3 $ processUntil' var' fltr ((6 ==) . length) - print "Setting more values" - setValues theCall theSets2 - wait fiber - print "All new values have ben set" - vals <- takeMVar var' - sort (unEvT_CountSet <$> vals) `shouldBe` sort (theSets1 <> theSets2) + v <- contract storage count + v `shouldBe` theValue - it "can stream events starting and ending in the past, bounded" $ \(ContractsEnv{simpleStorage}, primaryAccount) -> do - runWeb3Configured Eth.blockNumber >>= \bn -> awaitBlock (bn + 1) +events :: SpecWith Address +events = do + describe "can interact with a SimpleStorage contract across block intervals" $ do + it "can stream events starting and ending in the future, unbounded" $ \storage -> do + var <- newMVar [] + let theSets = [1, 2, 3] + putStrLn "Setting up the filter..." + fiber <- web3 $ do + let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] } + forkWeb3 $ processUntil' var fltr ((3 ==) . length) + putStrLn "Setting the values..." + setValues storage theSets + wait fiber + putStrLn "Filter caught 3 values..." + vals <- takeMVar var + sort (unEvT_CountSet <$> vals) `shouldBe` sort theSets + + it "can stream events starting and ending in the future, bounded" $ \storage -> do + var <- newMVar [] + let theSets = [13, 14, 15] + start <- web3 Eth.blockNumber + let later = BlockWithNumber (start + 3) + latest = BlockWithNumber (start + 8) + fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] + , filterFromBlock = later + , filterToBlock = latest + } + putStrLn "Setting up the filter..." + fiber <- web3 $ + forkWeb3 $ processUntil' var fltr ((3 ==) . length) + awaitBlock (start + 3) + putStrLn "Setting the values..." + setValues storage theSets + wait fiber + putStrLn "Filter caught 3 values..." + vals <- takeMVar var + sort (unEvT_CountSet <$> vals) `shouldBe` init (sort theSets) + + it "can stream events starting in the past and ending in the future" $ \storage -> do + var <- newMVar [] + blockNumberVar <- newEmptyMVar + let theSets1 = [7, 8, 9] + theSets2 = [10, 11, 12] + start <- web3 Eth.blockNumber + let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] } + fiber <- web3 $ do + forkWeb3 $ processUntil var fltr ((3 ==) . length) (liftIO . putMVar blockNumberVar . changeBlockNumber) + putStrLn "Running first transactions as past transactions..." + setValues storage theSets1 + wait fiber + putStrLn "All past transactions succeeded... " + Just end <- takeMVar blockNumberVar + awaitBlock $ end + 1 -- make past transactions definitively in past + var' <- newMVar [] + fiber <- web3 $ do + let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] + , filterFromBlock = BlockWithNumber start} + forkWeb3 $ processUntil' var' fltr ((6 ==) . length) + putStrLn "Setting more values" + setValues storage theSets2 + wait fiber + putStrLn "All new values have ben set" + vals <- takeMVar var' + sort (unEvT_CountSet <$> vals) `shouldBe` sort (theSets1 <> theSets2) + + it "can stream events starting and ending in the past, bounded" $ \storage -> do var <- newMVar [] - let theCall = callFromTo primaryAccount simpleStorage - theSets = [4, 5, 6] - start <- runWeb3Configured Eth.blockNumber + let theSets = [4, 5, 6] + start <- web3 Eth.blockNumber blockNumberVar <- newEmptyMVar - let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [simpleStorage] } - print "Setting up filter for past transactions..." - fiber <- runWeb3Configured' $ do + let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] } + putStrLn "Setting up filter for past transactions..." + fiber <- web3 $ do forkWeb3 $ processUntil var fltr ((3 ==) . length) (liftIO . putMVar blockNumberVar . changeBlockNumber) - print "Setting values" - setValues theCall theSets + putStrLn "Setting values" + setValues storage theSets wait fiber - print "All values have been set" + putStrLn "All values have been set" Just end <- takeMVar blockNumberVar var' <- newMVar [] let fltr' = fltr { filterFromBlock = BlockWithNumber start , filterToBlock = BlockWithNumber end } awaitBlock $ end + 1 -- make it definitively in the past - runWeb3Configured $ processUntil' var' fltr' ((3 ==) . length) + web3 $ processUntil' var' fltr' ((3 ==) . length) vals <- takeMVar var' sort (unEvT_CountSet <$> vals) `shouldBe` sort theSets @@ -199,7 +186,5 @@ processUntil' :: MVar [EvT_CountSet] -> Web3 () processUntil' var filter predicate = processUntil var filter predicate (const $ return ()) -setValues :: Call -> [UIntN 256] -> IO () -setValues theCall theSets = forM_ theSets $ \v -> do - runWeb3Configured (setCount theCall v) - threadDelay 1000000 +setValues :: Address -> [UIntN 256] -> IO () +setValues storage = mapM_ (contract storage . setCount) diff --git a/test/Network/Ethereum/Web3/Test/Utils.hs b/test/Network/Ethereum/Web3/Test/Utils.hs index 1c693b7e..41025752 100644 --- a/test/Network/Ethereum/Web3/Test/Utils.hs +++ b/test/Network/Ethereum/Web3/Test/Utils.hs @@ -3,80 +3,30 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -module Network.Ethereum.Web3.Test.Utils - ( makeEnv - , ContractsEnv(..) - , runWeb3Configured - , runWeb3Configured' - , retryWeb3Configured - , withAccounts - , withPrimaryEthereumAccount - , callFromTo - , sleepSeconds - , microtime - , awaitBlock - , awaitTxMined - , sleepBlocks - ) where - -import Control.Concurrent (MVar, threadDelay, - tryTakeMVar) -import Control.Monad.IO.Class (liftIO) -import Data.Default -import Data.Either (isRight) -import Data.List.Split (splitOn) -import Data.Maybe (fromMaybe) -import Data.Ratio (numerator) -import Data.String (IsString, fromString) -import qualified Data.Text as T -import Data.Time.Clock.POSIX (getPOSIXTime) -import Data.Traversable (for) - -import Control.Concurrent (MVar, threadDelay, - tryTakeMVar) -import Control.Exception (SomeException, catch, - handle, throwIO) -import Control.Lens ((^?)) -import Control.Monad.IO.Class (liftIO) -import Data.Aeson (FromJSON, eitherDecode) -import Data.Aeson.Lens (key, _JSON, _Object) -import Data.Aeson.Types (Value (..)) -import qualified Data.ByteString.Lazy as BSL -import Data.Default -import Data.Either (isRight) -import Data.List.Split (splitOn) -import Data.Maybe (fromMaybe, isJust) -import Data.Ratio (numerator) -import Data.Solidity.Prim.Address (Address) -import Data.String (IsString, fromString) -import qualified Data.Text as T -import Data.Time.Clock.POSIX (getPOSIXTime) -import Data.Traversable (for) -import GHC.Generics (Generic) -import Network.Ethereum.ABI.Prim.Address (Address) -import Network.Ethereum.Api.Eth (accounts, blockNumber) -import Network.Ethereum.Api.Provider (Provider (..), Web3, - Web3Error, runWeb3') -import Network.Ethereum.Api.Types (Call (..), Quantity) -import Network.Ethereum.Web3.Eth (accounts, blockNumber, - getTransactionReceipt) -import Network.Ethereum.Web3.Net as Net -import Network.Ethereum.Web3.Provider (JsonRpcProvider (..), - Provider (..), Web3, - Web3Error, runWeb3With) -import Network.Ethereum.Web3.Types (Call (..), Hash, Quantity, - TxReceipt (..)) -import Network.HTTP.Client (Manager, ManagerSettings, - defaultManagerSettings, - managerConnCount, - managerRawConnection, - managerRetryableException, - newManager) -import System.Environment (lookupEnv, setEnv) -import System.Environment (lookupEnv, setEnv) -import System.IO.Unsafe (unsafePerformIO) -import Test.Hspec.Expectations (shouldSatisfy) -import Test.Hspec.Expectations (shouldSatisfy) +module Network.Ethereum.Web3.Test.Utils where + +import Control.Concurrent (threadDelay) +import Control.Exception (SomeException, catch) +import Control.Monad.IO.Class (liftIO) +import Data.Maybe (fromMaybe) +import Data.Ratio (numerator) +import Data.Time.Clock.POSIX (getPOSIXTime) +import Lens.Micro ((.~)) +import Network.HTTP.Client (Manager, defaultManagerSettings, + managerConnCount, + managerRawConnection, + managerRetryableException, + newManager) +import System.Environment (lookupEnv) +import System.IO.Unsafe (unsafePerformIO) + +import Data.Solidity.Prim.Address (Address) +import Network.Ethereum.Account (DefaultAccount, to, withAccount, + withParam) +import Network.Ethereum.Api.Eth (accounts, blockNumber) +import Network.Ethereum.Api.Provider (Provider (..), Web3, + runWeb3With) +import Network.Ethereum.Api.Types (Quantity) -- shared manager used throughout the helpers here to prevent hammering geth from ruining everything -- this also retrys on ALL exceptions, including ConnectionResetByPeer and stuff like that @@ -91,68 +41,28 @@ sharedManager = unsafePerformIO $ newManager defaultManagerSettings fixRawConnection f = f `catch` (\(_ :: SomeException) -> fixRawConnection f) {-# NOINLINE sharedManager #-} -makeEnv :: IO (ContractsEnv, Address) -makeEnv = do - cenv <- makeContractsEnv - a <- withPrimaryEthereumAccount - pure (cenv, a) - rpcUri :: IO String -rpcUri = liftIO (fromMaybe "http://localhost:8545" <$> lookupEnv "WEB3_PROVIDER") +rpcUri = liftIO (fromMaybe "http://localhost:8545" <$> lookupEnv "WEB3_PROVIDER") -data ContractsEnv = - ContractsEnv { simpleStorage :: Address - , complexStorage :: Address - , linearization :: Address - } +contract :: Address + -> DefaultAccount Web3 a + -> IO a +contract a = web3 . withAccount () . withParam (to .~ a) -makeContractsEnv :: IO ContractsEnv -makeContractsEnv = do - net <- runWeb3Configured' Net.version - ss <- grabAddress net <$> BSL.readFile "test-support/build/contracts/abis/SimpleStorage.json" - cs <- grabAddress net <$> BSL.readFile "test-support/build/contracts/abis/ComplexStorage.json" - lin <- grabAddress net <$> BSL.readFile "test-support/build/contracts/abis/Linearization.json" - pure $ ContractsEnv ss cs lin - where - grabAddress :: T.Text -> BSL.ByteString -> Address - grabAddress nid bs = case eitherDecode bs :: Either String Value of - Right val -> fromMaybe (error "address key missing") (val ^? key "networks" . key nid . key "address" . _JSON) - Left e -> error e - -runWeb3Configured :: Show a => Web3 a -> IO a -runWeb3Configured f = do +web3 :: Web3 a -> IO a +web3 ma = do provider <- HttpProvider <$> rpcUri - v <- runWeb3With sharedManager provider f - v `shouldSatisfy` isRight - let Right a = v in return a - -runWeb3Configured' :: Web3 a -> IO a -runWeb3Configured' f = do - provider <- HttpProvider <$> rpcUri - Right v <- runWeb3With sharedManager provider f - return v - -retryWeb3Configured :: Web3 a -> IO a -retryWeb3Configured f = do - provider <- (flip Provider Nothing . HttpProvider) <$> rpcUri - v <- runWeb3With sharedManager provider f + v <- runWeb3With sharedManager provider ma case v of - Left _ -> threadDelay 1000000 >> retryWeb3Configured f - Right v -> return v + Left e -> print e >> threadDelay 1000000 >> web3 ma + Right v' -> return v' withAccounts :: ([Address] -> IO a) -> IO a -withAccounts f = runWeb3Configured accounts >>= f +withAccounts f = web3 accounts >>= f withPrimaryEthereumAccount :: IO Address withPrimaryEthereumAccount = withAccounts (pure . head) -callFromTo :: Address -> Address -> Call -callFromTo from to = - def { callFrom = Just from - , callTo = Just to - , callGasPrice = Just 4000000000 - } - sleepSeconds :: Int -> IO () sleepSeconds = threadDelay . (* 1000000) @@ -161,7 +71,7 @@ microtime = numerator . toRational . (* 1000000) <$> getPOSIXTime awaitBlock :: Quantity -> IO () awaitBlock bn = do - bn' <- retryWeb3Configured blockNumber + bn' <- web3 blockNumber -- putStrLn $ "awaiting block " ++ show bn ++ ", currently " ++ show bn' if bn' >= bn then return () @@ -169,14 +79,5 @@ awaitBlock bn = do sleepBlocks :: Int -> IO () sleepBlocks n = do - now <- retryWeb3Configured blockNumber + now <- web3 blockNumber awaitBlock $ now + (fromIntegral n) - -awaitTxMined :: Hash -> IO TxReceipt -awaitTxMined hash = do - mReceipt <- retryWeb3Configured $ getTransactionReceipt hash - case mReceipt of - Nothing -> threadDelay 1000000 >> awaitTxMined hash - Just receipt -> if isJust (receiptBlockHash receipt) - then return receipt - else threadDelay 1000000 >> awaitTxMined hash diff --git a/test/contracts/ComplexStorage.json b/test/contracts/ComplexStorage.json new file mode 100644 index 00000000..06c638e9 --- /dev/null +++ b/test/contracts/ComplexStorage.json @@ -0,0 +1,4533 @@ +{ + "contractName": "ComplexStorage", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "boolVal", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "stringVal", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "intVal", + "outputs": [ + { + "name": "", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "intListVal", + "outputs": [ + { + "name": "", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "uintVal", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "int224Val", + "outputs": [ + { + "name": "", + "type": "int224" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bytes16Val", + "outputs": [ + { + "name": "", + "type": "bytes16" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "boolVectorVal", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + } + ], + "name": "bytes2VectorListVal", + "outputs": [ + { + "name": "", + "type": "bytes2" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "a", + "type": "uint256" + }, + { + "indexed": false, + "name": "b", + "type": "int256" + }, + { + "indexed": false, + "name": "c", + "type": "bool" + }, + { + "indexed": false, + "name": "d", + "type": "int224" + }, + { + "indexed": false, + "name": "e", + "type": "bool[2]" + }, + { + "indexed": false, + "name": "f", + "type": "int256[]" + }, + { + "indexed": false, + "name": "g", + "type": "string" + }, + { + "indexed": false, + "name": "h", + "type": "bytes16" + }, + { + "indexed": false, + "name": "i", + "type": "bytes2[4][]" + } + ], + "name": "ValsSet", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_uintVal", + "type": "uint256" + }, + { + "name": "_intVal", + "type": "int256" + }, + { + "name": "_boolVal", + "type": "bool" + }, + { + "name": "_int224Val", + "type": "int224" + }, + { + "name": "_boolVectorVal", + "type": "bool[2]" + }, + { + "name": "_intListVal", + "type": "int256[]" + }, + { + "name": "_stringVal", + "type": "string" + }, + { + "name": "_bytes16Val", + "type": "bytes16" + }, + { + "name": "_bytes2VectorListVal", + "type": "bytes2[4][]" + } + ], + "name": "setValues", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getVals", + "outputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "int256" + }, + { + "name": "", + "type": "bool" + }, + { + "name": "", + "type": "int224" + }, + { + "name": "", + "type": "bool[2]" + }, + { + "name": "", + "type": "int256[]" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "bytes16" + }, + { + "name": "", + "type": "bytes2[4][]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506111be806100206000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631aadfbdb146100b45780632316afea14610258578063579c738a14610287578063614ac7911461031757806382a35c77146104dc5780638ba27dca146105075780639a0283ed146105485780639d49a304146105735780639eb7a6b2146105a4578063c84a4100146105f5578063f4f67ad71461063a575b600080fd5b3480156100c057600080fd5b5061025660048036038101908080359060200190929190803590602001909291908035151590602001909291908035601b0b9060200190929190806040019060028060200260405190810160405280929190826002602002808284378201915050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929080356fffffffffffffffffffffffffffffffff1916906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156102445784848390506080020160048060200260405190810160405280929190826004602002808284378201915050505050815260200190600101906101ff565b505050505091929192905050506106c7565b005b34801561026457600080fd5b5061026d6109b9565b604051808215151515815260200191505060405180910390f35b34801561029357600080fd5b5061029c6109cc565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102dc5780820151818401526020810190506102c1565b50505050905090810190601f1680156103095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032357600080fd5b5061032c610a6a565b604051808a81526020018981526020018815151515815260200187601b0b601b0b815260200186600260200280838360005b8381101561037957808201518184015260208101905061035e565b505050509050018060200180602001856fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200180602001848103845288818151815260200191508051906020019060200280838360005b838110156103f35780820151818401526020810190506103d8565b50505050905001848103835287818151815260200191508051906020019080838360005b83811015610432578082015181840152602081019050610417565b50505050905090810190601f16801561045f5780820380516001836020036101000a031916815260200191505b508481038252858181518152602001915080516000925b818410156104c157828490602001906020020151600460200280838360005b838110156104b0578082015181840152602081019050610495565b505050509050019260010192610476565b925050509c5050505050505050505050505060405180910390f35b3480156104e857600080fd5b506104f1610d24565b6040518082815260200191505060405180910390f35b34801561051357600080fd5b5061053260048036038101908080359060200190929190505050610d2a565b6040518082815260200191505060405180910390f35b34801561055457600080fd5b5061055d610d4d565b6040518082815260200191505060405180910390f35b34801561057f57600080fd5b50610588610d53565b6040518082601b0b601b0b815260200191505060405180910390f35b3480156105b057600080fd5b506105b9610d66565b60405180826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b34801561060157600080fd5b5061062060048036038101908080359060200190929190505050610d89565b604051808215151515815260200191505060405180910390f35b34801561064657600080fd5b5061066f6004803603810190808035906020019092919080359060200190929190505050610db2565b60405180827dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b886000819055508760018190555086600260006101000a81548160ff02191690831515021790555085600260016101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff0219169083601b0b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550846003906002610754929190610e16565b50836004908051906020019061076b929190610eaf565b508260059080519060200190610782929190610efc565b5081600660006101000a8154816fffffffffffffffffffffffffffffffff02191690837001000000000000000000000000000000009004021790555080600790805190602001906107d4929190610f7c565b507f88d23351ad32a937b11ca10530404f8297d29803e94709336b48c1f82c15b3cc898989898989898989604051808a81526020018981526020018815151515815260200187601b0b601b0b815260200186600260200280838360005b8381101561084c578082015181840152602081019050610831565b505050509050018060200180602001856fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200180602001848103845288818151815260200191508051906020019060200280838360005b838110156108c65780820151818401526020810190506108ab565b50505050905001848103835287818151815260200191508051906020019080838360005b838110156109055780820151818401526020810190506108ea565b50505050905090810190601f1680156109325780820380516001836020036101000a031916815260200191505b508481038252858181518152602001915080516000925b8184101561099457828490602001906020020151600460200280838360005b83811015610983578082015181840152602081019050610968565b505050509050019260010192610949565b925050509c5050505050505050505050505060405180910390a1505050505050505050565b600260009054906101000a900460ff1681565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a625780601f10610a3757610100808354040283529160200191610a62565b820191906000526020600020905b815481529060010190602001808311610a4557829003601f168201915b505050505081565b600080600080610a78610fd7565b60608060006060600054600154600260009054906101000a900460ff16600260019054906101000a9004601b0b600360046005600660009054906101000a900470010000000000000000000000000000000002600784600280602002604051908101604052809291908260028015610b2a576020028201916000905b82829054906101000a900460ff16151581526020019060010190602082600001049283019260010382029150808411610af45790505b5050505050945083805480602002602001604051908101604052809291908181526020018280548015610b7c57602002820191906000526020600020905b815481526020019060010190808311610b68575b50505050509350828054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c185780601f10610bed57610100808354040283529160200191610c18565b820191906000526020600020905b815481529060010190602001808311610bfb57829003601f168201915b5050505050925080805480602002602001604051908101604052809291908181526020016000905b82821015610d0157838290600052602060002001600480602002604051908101604052809291908260048015610ced576020028201916000905b82829054906101000a90047e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019060020190602082600101049283019260010382029150808411610c7a5790505b505050505081526020019060010190610c40565b505050509050985098509850985098509850985098509850909192939495969798565b60015481565b600481815481101515610d3957fe5b906000526020600020016000915090505481565b60005481565b600260019054906101000a9004601b0b81565b600660009054906101000a90047001000000000000000000000000000000000281565b600381600281101515610d9857fe5b60209182820401919006915054906101000a900460ff1681565b600782815481101515610dc157fe5b9060005260206000200181600481101515610dd857fe5b60109182820401919006600202915091509054906101000a90047e010000000000000000000000000000000000000000000000000000000000000281565b826002601f01602090048101928215610e9e5791602002820160005b83821115610e6f57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302610e32565b8015610e9c5782816101000a81549060ff0219169055600101602081600001049283019260010302610e6f565b505b509050610eab9190610ff9565b5090565b828054828255906000526020600020908101928215610eeb579160200282015b82811115610eea578251825591602001919060010190610ecf565b5b509050610ef89190611029565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610f3d57805160ff1916838001178555610f6b565b82800160010185558215610f6b579182015b82811115610f6a578251825591602001919060010190610f4f565b5b509050610f78919061104e565b5090565b828054828255906000526020600020908101928215610fc6579160200282015b82811115610fc557825182906004610fb5929190611073565b5091602001919060010190610f9c565b5b509050610fd3919061112e565b5090565b6040805190810160405280600290602082028038833980820191505090505090565b61102691905b8082111561102257600081816101000a81549060ff021916905550600101610fff565b5090565b90565b61104b91905b8082111561104757600081600090555060010161102f565b5090565b90565b61107091905b8082111561106c576000816000905550600101611054565b5090565b90565b826004600f0160109004810192821561111d5791602002820160005b838211156110ed57835183826101000a81548161ffff02191690837e0100000000000000000000000000000000000000000000000000000000000090040217905550926020019260020160208160010104928301926001030261108f565b801561111b5782816101000a81549061ffff02191690556002016020816001010492830192600103026110ed565b505b50905061112a919061115a565b5090565b61115791905b80821115611153576000818161114a919061118b565b50600101611134565b5090565b90565b61118891905b8082111561118457600081816101000a81549061ffff021916905550600101611160565b5090565b90565b50600090555600a165627a7a7230582011b9a8b2fe6341272836fb36535a5f03b46544a58a14b17b7d49405a8247b7d10029", + "deployedBytecode": "0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631aadfbdb146100b45780632316afea14610258578063579c738a14610287578063614ac7911461031757806382a35c77146104dc5780638ba27dca146105075780639a0283ed146105485780639d49a304146105735780639eb7a6b2146105a4578063c84a4100146105f5578063f4f67ad71461063a575b600080fd5b3480156100c057600080fd5b5061025660048036038101908080359060200190929190803590602001909291908035151590602001909291908035601b0b9060200190929190806040019060028060200260405190810160405280929190826002602002808284378201915050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929080356fffffffffffffffffffffffffffffffff1916906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156102445784848390506080020160048060200260405190810160405280929190826004602002808284378201915050505050815260200190600101906101ff565b505050505091929192905050506106c7565b005b34801561026457600080fd5b5061026d6109b9565b604051808215151515815260200191505060405180910390f35b34801561029357600080fd5b5061029c6109cc565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102dc5780820151818401526020810190506102c1565b50505050905090810190601f1680156103095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032357600080fd5b5061032c610a6a565b604051808a81526020018981526020018815151515815260200187601b0b601b0b815260200186600260200280838360005b8381101561037957808201518184015260208101905061035e565b505050509050018060200180602001856fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200180602001848103845288818151815260200191508051906020019060200280838360005b838110156103f35780820151818401526020810190506103d8565b50505050905001848103835287818151815260200191508051906020019080838360005b83811015610432578082015181840152602081019050610417565b50505050905090810190601f16801561045f5780820380516001836020036101000a031916815260200191505b508481038252858181518152602001915080516000925b818410156104c157828490602001906020020151600460200280838360005b838110156104b0578082015181840152602081019050610495565b505050509050019260010192610476565b925050509c5050505050505050505050505060405180910390f35b3480156104e857600080fd5b506104f1610d24565b6040518082815260200191505060405180910390f35b34801561051357600080fd5b5061053260048036038101908080359060200190929190505050610d2a565b6040518082815260200191505060405180910390f35b34801561055457600080fd5b5061055d610d4d565b6040518082815260200191505060405180910390f35b34801561057f57600080fd5b50610588610d53565b6040518082601b0b601b0b815260200191505060405180910390f35b3480156105b057600080fd5b506105b9610d66565b60405180826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b34801561060157600080fd5b5061062060048036038101908080359060200190929190505050610d89565b604051808215151515815260200191505060405180910390f35b34801561064657600080fd5b5061066f6004803603810190808035906020019092919080359060200190929190505050610db2565b60405180827dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b886000819055508760018190555086600260006101000a81548160ff02191690831515021790555085600260016101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff0219169083601b0b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550846003906002610754929190610e16565b50836004908051906020019061076b929190610eaf565b508260059080519060200190610782929190610efc565b5081600660006101000a8154816fffffffffffffffffffffffffffffffff02191690837001000000000000000000000000000000009004021790555080600790805190602001906107d4929190610f7c565b507f88d23351ad32a937b11ca10530404f8297d29803e94709336b48c1f82c15b3cc898989898989898989604051808a81526020018981526020018815151515815260200187601b0b601b0b815260200186600260200280838360005b8381101561084c578082015181840152602081019050610831565b505050509050018060200180602001856fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200180602001848103845288818151815260200191508051906020019060200280838360005b838110156108c65780820151818401526020810190506108ab565b50505050905001848103835287818151815260200191508051906020019080838360005b838110156109055780820151818401526020810190506108ea565b50505050905090810190601f1680156109325780820380516001836020036101000a031916815260200191505b508481038252858181518152602001915080516000925b8184101561099457828490602001906020020151600460200280838360005b83811015610983578082015181840152602081019050610968565b505050509050019260010192610949565b925050509c5050505050505050505050505060405180910390a1505050505050505050565b600260009054906101000a900460ff1681565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a625780601f10610a3757610100808354040283529160200191610a62565b820191906000526020600020905b815481529060010190602001808311610a4557829003601f168201915b505050505081565b600080600080610a78610fd7565b60608060006060600054600154600260009054906101000a900460ff16600260019054906101000a9004601b0b600360046005600660009054906101000a900470010000000000000000000000000000000002600784600280602002604051908101604052809291908260028015610b2a576020028201916000905b82829054906101000a900460ff16151581526020019060010190602082600001049283019260010382029150808411610af45790505b5050505050945083805480602002602001604051908101604052809291908181526020018280548015610b7c57602002820191906000526020600020905b815481526020019060010190808311610b68575b50505050509350828054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c185780601f10610bed57610100808354040283529160200191610c18565b820191906000526020600020905b815481529060010190602001808311610bfb57829003601f168201915b5050505050925080805480602002602001604051908101604052809291908181526020016000905b82821015610d0157838290600052602060002001600480602002604051908101604052809291908260048015610ced576020028201916000905b82829054906101000a90047e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019060020190602082600101049283019260010382029150808411610c7a5790505b505050505081526020019060010190610c40565b505050509050985098509850985098509850985098509850909192939495969798565b60015481565b600481815481101515610d3957fe5b906000526020600020016000915090505481565b60005481565b600260019054906101000a9004601b0b81565b600660009054906101000a90047001000000000000000000000000000000000281565b600381600281101515610d9857fe5b60209182820401919006915054906101000a900460ff1681565b600782815481101515610dc157fe5b9060005260206000200181600481101515610dd857fe5b60109182820401919006600202915091509054906101000a90047e010000000000000000000000000000000000000000000000000000000000000281565b826002601f01602090048101928215610e9e5791602002820160005b83821115610e6f57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302610e32565b8015610e9c5782816101000a81549060ff0219169055600101602081600001049283019260010302610e6f565b505b509050610eab9190610ff9565b5090565b828054828255906000526020600020908101928215610eeb579160200282015b82811115610eea578251825591602001919060010190610ecf565b5b509050610ef89190611029565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610f3d57805160ff1916838001178555610f6b565b82800160010185558215610f6b579182015b82811115610f6a578251825591602001919060010190610f4f565b5b509050610f78919061104e565b5090565b828054828255906000526020600020908101928215610fc6579160200282015b82811115610fc557825182906004610fb5929190611073565b5091602001919060010190610f9c565b5b509050610fd3919061112e565b5090565b6040805190810160405280600290602082028038833980820191505090505090565b61102691905b8082111561102257600081816101000a81549060ff021916905550600101610fff565b5090565b90565b61104b91905b8082111561104757600081600090555060010161102f565b5090565b90565b61107091905b8082111561106c576000816000905550600101611054565b5090565b90565b826004600f0160109004810192821561111d5791602002820160005b838211156110ed57835183826101000a81548161ffff02191690837e0100000000000000000000000000000000000000000000000000000000000090040217905550926020019260020160208160010104928301926001030261108f565b801561111b5782816101000a81549061ffff02191690556002016020816001010492830192600103026110ed565b505b50905061112a919061115a565b5090565b61115791905b80821115611153576000818161114a919061118b565b50600101611134565b5090565b90565b61118891905b8082111561118457600081816101000a81549061ffff021916905550600101611160565b5090565b90565b50600090555600a165627a7a7230582011b9a8b2fe6341272836fb36535a5f03b46544a58a14b17b7d49405a8247b7d10029", + "sourceMap": "26:1413:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:1413:0;;;;;;;", + "deployedSourceMap": "26:1413:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;439:742;;8:9:-1;5:2;;;30:1;27;20:12;5:2;439:742:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;104:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;104:19:0;;;;;;;;;;;;;;;;;;;;;;;;;;;221:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;221:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;221:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1187:246;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;81:17:0;;;;;;;;;;;;;;;;;;;;;;;192:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;192:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;56:19:0;;;;;;;;;;;;;;;;;;;;;;;129:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;129:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;250:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;250:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;158:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;158:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;281:38;;8:9:-1;5:2;;;30:1;27;20:12;5:2;281:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;439:742;675:8;655:7;:28;;;;714:7;694:6;:27;;;;752:8;732:7;;:28;;;;;;;;;;;;;;;;;;791:10;771:9;;:30;;;;;;;;;;;;;;;;;;;;832:14;812:13;:34;;;;;;;:::i;:::-;;877:11;857:10;:31;;;;;;;;;;;;:::i;:::-;;919:10;899:9;:30;;;;;;;;;;;;:::i;:::-;;960:11;940:10;;:31;;;;;;;;;;;;;;;;;;;1004:20;982:19;:42;;;;;;;;;;;;:::i;:::-;;1050:124;1058:8;1068:7;1077:8;1087:10;1099:14;1115:11;1128:10;1140:11;1153:20;1050:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1050:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1050:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1050:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1050:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;439:742;;;;;;;;;:::o;104:19::-;;;;;;;;;;;;;:::o;221:23::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1187:246::-;1232:4;1238:3;1243:4;1249:6;1257:7;;:::i;:::-;1266:5;1273:6;1281:7;1290:11;1319:7;;1328:6;;1336:7;;;;;;;;;;;1345:9;;;;;;;;;;;1356:13;1371:10;1383:9;1394:10;;;;;;;;;;;1406:19;1311:115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1187:246;;;;;;;;;:::o;81:17::-;;;;:::o;192:23::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;56:19::-;;;;:::o;129:23::-;;;;;;;;;;;;;:::o;250:25::-;;;;;;;;;;;;;:::o;158:28::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;281:38::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;26:1413::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;26:1413:0;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;:::o", + "source": "pragma solidity ^0.4.13;\n\ncontract ComplexStorage {\n uint public uintVal;\n int public intVal;\n bool public boolVal;\n int224 public int224Val;\n bool[2] public boolVectorVal;\n int[] public intListVal;\n string public stringVal;\n bytes16 public bytes16Val;\n bytes2[4][] public bytes2VectorListVal;\n\n event ValsSet(uint a, int b, bool c, int224 d, bool[2] e, int[] f, string g, bytes16 h, bytes2[4][] i);\n \n function setValues(uint _uintVal, int _intVal, bool _boolVal, int224 _int224Val, bool[2] _boolVectorVal, int[] _intListVal, string _stringVal, bytes16 _bytes16Val, bytes2[4][] _bytes2VectorListVal) public {\n uintVal = _uintVal;\n intVal = _intVal;\n boolVal = _boolVal;\n int224Val = _int224Val;\n boolVectorVal = _boolVectorVal;\n intListVal = _intListVal;\n stringVal = _stringVal;\n bytes16Val = _bytes16Val;\n bytes2VectorListVal = _bytes2VectorListVal;\n \n emit ValsSet(_uintVal, _intVal, _boolVal, _int224Val, _boolVectorVal, _intListVal, _stringVal, _bytes16Val, _bytes2VectorListVal);\n }\n\n function getVals () constant public returns (uint, int, bool, int224, bool[2], int[], string, bytes16, bytes2[4][]) {\n return (uintVal, intVal, boolVal, int224Val, boolVectorVal, intListVal, stringVal, bytes16Val, bytes2VectorListVal);\n }\n \n}\n", + "sourcePath": "/home/akru/hsweb3test/contracts/ComplexStorage.sol", + "ast": { + "absolutePath": "/home/akru/hsweb3test/contracts/ComplexStorage.sol", + "exportedSymbols": { + "ComplexStorage": [ + 167 + ] + }, + "id": 168, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 167, + "linearizedBaseContracts": [ + 167 + ], + "name": "ComplexStorage", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "uintVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "56:19:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "56:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 5, + "name": "intVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "81:17:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 4, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "81:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 7, + "name": "boolVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "104:19:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "104:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 9, + "name": "int224Val", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "129:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 8, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "129:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 13, + "name": "boolVectorVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "158:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage", + "typeString": "bool[2]" + }, + "typeName": { + "baseType": { + "id": 10, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "158:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 11, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "163:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", + "typeString": "bool[2]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 16, + "name": "intListVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "192:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 14, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "192:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 15, + "length": null, + "nodeType": "ArrayTypeName", + "src": "192:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 18, + "name": "stringVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "221:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 17, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "221:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 20, + "name": "bytes16Val", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "250:25:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 19, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "250:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 25, + "name": "bytes2VectorListVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "281:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", + "typeString": "bytes2[4][]" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 21, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "281:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "id": 23, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "288:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "281:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", + "typeString": "bytes2[4]" + } + }, + "id": 24, + "length": null, + "nodeType": "ArrayTypeName", + "src": "281:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", + "typeString": "bytes2[4][]" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 51, + "name": "ValsSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27, + "indexed": false, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "340:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 26, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "340:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 29, + "indexed": false, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "348:5:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 28, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "348:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 31, + "indexed": false, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "355:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 30, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "355:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 33, + "indexed": false, + "name": "d", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "363:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 32, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "363:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 37, + "indexed": false, + "name": "e", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "373:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2]" + }, + "typeName": { + "baseType": { + "id": 34, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "373:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 36, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "378:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", + "typeString": "bool[2]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 40, + "indexed": false, + "name": "f", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "384:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 38, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "384:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 39, + "length": null, + "nodeType": "ArrayTypeName", + "src": "384:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 42, + "indexed": false, + "name": "g", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "393:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 41, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "393:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 44, + "indexed": false, + "name": "h", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "403:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 43, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "403:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 49, + "indexed": false, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "414:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4][]" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 45, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "414:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "id": 47, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "421:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "414:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", + "typeString": "bytes2[4]" + } + }, + "id": 48, + "length": null, + "nodeType": "ArrayTypeName", + "src": "414:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", + "typeString": "bytes2[4][]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "339:89:0" + }, + "src": "326:103:0" + }, + { + "body": { + "id": 126, + "nodeType": "Block", + "src": "644:537:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 80, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 78, + "name": "uintVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "655:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 79, + "name": "_uintVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "675:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "655:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 81, + "nodeType": "ExpressionStatement", + "src": "655:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 82, + "name": "intVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "694:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 83, + "name": "_intVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "714:7:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "694:27:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 85, + "nodeType": "ExpressionStatement", + "src": "694:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 86, + "name": "boolVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "732:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 87, + "name": "_boolVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "752:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "732:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 89, + "nodeType": "ExpressionStatement", + "src": "732:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 90, + "name": "int224Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "771:9:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 91, + "name": "_int224Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "791:10:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "src": "771:30:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "id": 93, + "nodeType": "ExpressionStatement", + "src": "771:30:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 94, + "name": "boolVectorVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "812:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage", + "typeString": "bool[2] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 95, + "name": "_boolVectorVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "832:14:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2] memory" + } + }, + "src": "812:34:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage", + "typeString": "bool[2] storage ref" + } + }, + "id": 97, + "nodeType": "ExpressionStatement", + "src": "812:34:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 98, + "name": "intListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "857:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage", + "typeString": "int256[] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 99, + "name": "_intListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "877:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "src": "857:31:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage", + "typeString": "int256[] storage ref" + } + }, + "id": 101, + "nodeType": "ExpressionStatement", + "src": "857:31:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 102, + "name": "stringVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "899:9:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 103, + "name": "_stringVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "919:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "899:30:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 105, + "nodeType": "ExpressionStatement", + "src": "899:30:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 106, + "name": "bytes16Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "940:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 107, + "name": "_bytes16Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "960:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "940:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 109, + "nodeType": "ExpressionStatement", + "src": "940:31:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 110, + "name": "bytes2VectorListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "982:19:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", + "typeString": "bytes2[4] storage ref[] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 111, + "name": "_bytes2VectorListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1004:20:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4] memory[] memory" + } + }, + "src": "982:42:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", + "typeString": "bytes2[4] storage ref[] storage ref" + } + }, + "id": 113, + "nodeType": "ExpressionStatement", + "src": "982:42:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 115, + "name": "_uintVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1058:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 116, + "name": "_intVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1068:7:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 117, + "name": "_boolVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1077:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 118, + "name": "_int224Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + { + "argumentTypes": null, + "id": 119, + "name": "_boolVectorVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "1099:14:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2] memory" + } + }, + { + "argumentTypes": null, + "id": 120, + "name": "_intListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "1115:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + { + "argumentTypes": null, + "id": 121, + "name": "_stringVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "1128:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 122, + "name": "_bytes16Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "1140:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + { + "argumentTypes": null, + "id": 123, + "name": "_bytes2VectorListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1153:20:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4] memory[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2] memory" + }, + { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4] memory[] memory" + } + ], + "id": 114, + "name": "ValsSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "1050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_int256_$_t_bool_$_t_int224_$_t_array$_t_bool_$2_memory_ptr_$_t_array$_t_int256_$dyn_memory_ptr_$_t_string_memory_ptr_$_t_bytes16_$_t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr_$returns$__$", + "typeString": "function (uint256,int256,bool,int224,bool[2] memory,int256[] memory,string memory,bytes16,bytes2[4] memory[] memory)" + } + }, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1050:124:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 125, + "nodeType": "EmitStatement", + "src": "1045:129:0" + } + ] + }, + "documentation": null, + "id": 127, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setValues", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 53, + "name": "_uintVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "458:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 52, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "458:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "_intVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "473:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 54, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "name": "_boolVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "486:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 56, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "486:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "_int224Val", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "501:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 58, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "501:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 63, + "name": "_boolVectorVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "520:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2]" + }, + "typeName": { + "baseType": { + "id": 60, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "520:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "525:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "520:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", + "typeString": "bool[2]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "name": "_intListVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "544:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 64, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "544:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 65, + "length": null, + "nodeType": "ArrayTypeName", + "src": "544:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 68, + "name": "_stringVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "563:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 67, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 70, + "name": "_bytes16Val", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "582:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 69, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "582:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 75, + "name": "_bytes2VectorListVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "603:32:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4][]" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 71, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "603:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "id": 73, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "610:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "603:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", + "typeString": "bytes2[4]" + } + }, + "id": 74, + "length": null, + "nodeType": "ArrayTypeName", + "src": "603:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", + "typeString": "bytes2[4][]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "457:179:0" + }, + "payable": false, + "returnParameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "644:0:0" + }, + "scope": 167, + "src": "439:742:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 165, + "nodeType": "Block", + "src": "1303:130:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 154, + "name": "uintVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "1319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 155, + "name": "intVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "1328:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 156, + "name": "boolVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "1336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 157, + "name": "int224Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "1345:9:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + { + "argumentTypes": null, + "id": 158, + "name": "boolVectorVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1356:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage", + "typeString": "bool[2] storage ref" + } + }, + { + "argumentTypes": null, + "id": 159, + "name": "intListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1371:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage", + "typeString": "int256[] storage ref" + } + }, + { + "argumentTypes": null, + "id": 160, + "name": "stringVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "1383:9:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 161, + "name": "bytes16Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1394:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + { + "argumentTypes": null, + "id": 162, + "name": "bytes2VectorListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1406:19:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", + "typeString": "bytes2[4] storage ref[] storage ref" + } + } + ], + "id": 163, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1318:108:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_int256_$_t_bool_$_t_int224_$_t_array$_t_bool_$2_storage_$_t_array$_t_int256_$dyn_storage_$_t_string_storage_$_t_bytes16_$_t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_$", + "typeString": "tuple(uint256,int256,bool,int224,bool[2] storage ref,int256[] storage ref,string storage ref,bytes16,bytes2[4] storage ref[] storage ref)" + } + }, + "functionReturnParameters": 153, + "id": 164, + "nodeType": "Return", + "src": "1311:115:0" + } + ] + }, + "documentation": null, + "id": 166, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getVals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1204:2:0" + }, + "payable": false, + "returnParameters": { + "id": 153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 130, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1232:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 129, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1232:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 132, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1238:3:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 131, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1238:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1243:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 133, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1243:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 136, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1249:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 135, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "1249:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 140, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1257:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2]" + }, + "typeName": { + "baseType": { + "id": 137, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1257:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 139, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1262:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "1257:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", + "typeString": "bool[2]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 143, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1266:5:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 141, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1266:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 142, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1266:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 145, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1273:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 144, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1273:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 147, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1281:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 146, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "1281:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 152, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1290:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4][]" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 148, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "1290:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "id": 150, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1297:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "1290:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", + "typeString": "bytes2[4]" + } + }, + "id": 151, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1290:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", + "typeString": "bytes2[4][]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1231:71:0" + }, + "scope": 167, + "src": "1187:246:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 168, + "src": "26:1413:0" + } + ], + "src": "0:1440:0" + }, + "legacyAST": { + "absolutePath": "/home/akru/hsweb3test/contracts/ComplexStorage.sol", + "exportedSymbols": { + "ComplexStorage": [ + 167 + ] + }, + "id": 168, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".13" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 167, + "linearizedBaseContracts": [ + 167 + ], + "name": "ComplexStorage", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "uintVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "56:19:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "56:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 5, + "name": "intVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "81:17:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 4, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "81:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 7, + "name": "boolVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "104:19:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "104:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 9, + "name": "int224Val", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "129:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 8, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "129:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 13, + "name": "boolVectorVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "158:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage", + "typeString": "bool[2]" + }, + "typeName": { + "baseType": { + "id": 10, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "158:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 11, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "163:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", + "typeString": "bool[2]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 16, + "name": "intListVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "192:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 14, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "192:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 15, + "length": null, + "nodeType": "ArrayTypeName", + "src": "192:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 18, + "name": "stringVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "221:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 17, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "221:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 20, + "name": "bytes16Val", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "250:25:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 19, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "250:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 25, + "name": "bytes2VectorListVal", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "281:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", + "typeString": "bytes2[4][]" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 21, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "281:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "id": 23, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "288:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "281:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", + "typeString": "bytes2[4]" + } + }, + "id": 24, + "length": null, + "nodeType": "ArrayTypeName", + "src": "281:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", + "typeString": "bytes2[4][]" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 51, + "name": "ValsSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27, + "indexed": false, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "340:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 26, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "340:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 29, + "indexed": false, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "348:5:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 28, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "348:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 31, + "indexed": false, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "355:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 30, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "355:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 33, + "indexed": false, + "name": "d", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "363:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 32, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "363:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 37, + "indexed": false, + "name": "e", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "373:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2]" + }, + "typeName": { + "baseType": { + "id": 34, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "373:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 36, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "378:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", + "typeString": "bool[2]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 40, + "indexed": false, + "name": "f", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "384:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 38, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "384:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 39, + "length": null, + "nodeType": "ArrayTypeName", + "src": "384:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 42, + "indexed": false, + "name": "g", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "393:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 41, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "393:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 44, + "indexed": false, + "name": "h", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "403:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 43, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "403:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 49, + "indexed": false, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "414:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4][]" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 45, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "414:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "id": 47, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "421:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "414:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", + "typeString": "bytes2[4]" + } + }, + "id": 48, + "length": null, + "nodeType": "ArrayTypeName", + "src": "414:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", + "typeString": "bytes2[4][]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "339:89:0" + }, + "src": "326:103:0" + }, + { + "body": { + "id": 126, + "nodeType": "Block", + "src": "644:537:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 80, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 78, + "name": "uintVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "655:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 79, + "name": "_uintVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "675:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "655:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 81, + "nodeType": "ExpressionStatement", + "src": "655:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 82, + "name": "intVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "694:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 83, + "name": "_intVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "714:7:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "694:27:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 85, + "nodeType": "ExpressionStatement", + "src": "694:27:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 86, + "name": "boolVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "732:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 87, + "name": "_boolVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "752:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "732:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 89, + "nodeType": "ExpressionStatement", + "src": "732:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 90, + "name": "int224Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "771:9:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 91, + "name": "_int224Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "791:10:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "src": "771:30:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "id": 93, + "nodeType": "ExpressionStatement", + "src": "771:30:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 94, + "name": "boolVectorVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "812:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage", + "typeString": "bool[2] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 95, + "name": "_boolVectorVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "832:14:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2] memory" + } + }, + "src": "812:34:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage", + "typeString": "bool[2] storage ref" + } + }, + "id": 97, + "nodeType": "ExpressionStatement", + "src": "812:34:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 98, + "name": "intListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "857:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage", + "typeString": "int256[] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 99, + "name": "_intListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "877:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "src": "857:31:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage", + "typeString": "int256[] storage ref" + } + }, + "id": 101, + "nodeType": "ExpressionStatement", + "src": "857:31:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 102, + "name": "stringVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "899:9:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 103, + "name": "_stringVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "919:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "899:30:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 105, + "nodeType": "ExpressionStatement", + "src": "899:30:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 106, + "name": "bytes16Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "940:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 107, + "name": "_bytes16Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "960:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "940:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 109, + "nodeType": "ExpressionStatement", + "src": "940:31:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 110, + "name": "bytes2VectorListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "982:19:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", + "typeString": "bytes2[4] storage ref[] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 111, + "name": "_bytes2VectorListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1004:20:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4] memory[] memory" + } + }, + "src": "982:42:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", + "typeString": "bytes2[4] storage ref[] storage ref" + } + }, + "id": 113, + "nodeType": "ExpressionStatement", + "src": "982:42:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 115, + "name": "_uintVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 53, + "src": "1058:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 116, + "name": "_intVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "1068:7:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 117, + "name": "_boolVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "1077:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 118, + "name": "_int224Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "1087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + { + "argumentTypes": null, + "id": 119, + "name": "_boolVectorVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "1099:14:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2] memory" + } + }, + { + "argumentTypes": null, + "id": 120, + "name": "_intListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "1115:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + { + "argumentTypes": null, + "id": 121, + "name": "_stringVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "1128:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 122, + "name": "_bytes16Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "1140:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + { + "argumentTypes": null, + "id": 123, + "name": "_bytes2VectorListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1153:20:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4] memory[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2] memory" + }, + { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4] memory[] memory" + } + ], + "id": 114, + "name": "ValsSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "1050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_int256_$_t_bool_$_t_int224_$_t_array$_t_bool_$2_memory_ptr_$_t_array$_t_int256_$dyn_memory_ptr_$_t_string_memory_ptr_$_t_bytes16_$_t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr_$returns$__$", + "typeString": "function (uint256,int256,bool,int224,bool[2] memory,int256[] memory,string memory,bytes16,bytes2[4] memory[] memory)" + } + }, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1050:124:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 125, + "nodeType": "EmitStatement", + "src": "1045:129:0" + } + ] + }, + "documentation": null, + "id": 127, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setValues", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 53, + "name": "_uintVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "458:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 52, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "458:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "_intVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "473:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 54, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 57, + "name": "_boolVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "486:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 56, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "486:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "_int224Val", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "501:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 58, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "501:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 63, + "name": "_boolVectorVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "520:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2]" + }, + "typeName": { + "baseType": { + "id": 60, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "520:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 62, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "525:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "520:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", + "typeString": "bool[2]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 66, + "name": "_intListVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "544:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 64, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "544:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 65, + "length": null, + "nodeType": "ArrayTypeName", + "src": "544:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 68, + "name": "_stringVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "563:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 67, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 70, + "name": "_bytes16Val", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "582:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 69, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "582:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 75, + "name": "_bytes2VectorListVal", + "nodeType": "VariableDeclaration", + "scope": 127, + "src": "603:32:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4][]" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 71, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "603:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "id": 73, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "610:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "603:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", + "typeString": "bytes2[4]" + } + }, + "id": 74, + "length": null, + "nodeType": "ArrayTypeName", + "src": "603:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", + "typeString": "bytes2[4][]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "457:179:0" + }, + "payable": false, + "returnParameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "644:0:0" + }, + "scope": 167, + "src": "439:742:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 165, + "nodeType": "Block", + "src": "1303:130:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 154, + "name": "uintVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "1319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 155, + "name": "intVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "1328:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 156, + "name": "boolVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "1336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 157, + "name": "int224Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "1345:9:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + { + "argumentTypes": null, + "id": 158, + "name": "boolVectorVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1356:13:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage", + "typeString": "bool[2] storage ref" + } + }, + { + "argumentTypes": null, + "id": 159, + "name": "intListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16, + "src": "1371:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage", + "typeString": "int256[] storage ref" + } + }, + { + "argumentTypes": null, + "id": 160, + "name": "stringVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "1383:9:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 161, + "name": "bytes16Val", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1394:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + { + "argumentTypes": null, + "id": 162, + "name": "bytes2VectorListVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1406:19:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", + "typeString": "bytes2[4] storage ref[] storage ref" + } + } + ], + "id": 163, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1318:108:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_int256_$_t_bool_$_t_int224_$_t_array$_t_bool_$2_storage_$_t_array$_t_int256_$dyn_storage_$_t_string_storage_$_t_bytes16_$_t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_$", + "typeString": "tuple(uint256,int256,bool,int224,bool[2] storage ref,int256[] storage ref,string storage ref,bytes16,bytes2[4] storage ref[] storage ref)" + } + }, + "functionReturnParameters": 153, + "id": 164, + "nodeType": "Return", + "src": "1311:115:0" + } + ] + }, + "documentation": null, + "id": 166, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getVals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1204:2:0" + }, + "payable": false, + "returnParameters": { + "id": 153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 130, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1232:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 129, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1232:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 132, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1238:3:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 131, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1238:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1243:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 133, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1243:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 136, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1249:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 135, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "1249:6:0", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 140, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1257:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", + "typeString": "bool[2]" + }, + "typeName": { + "baseType": { + "id": 137, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1257:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 139, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1262:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "1257:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", + "typeString": "bool[2]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 143, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1266:5:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 141, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1266:3:0", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 142, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1266:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 145, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1273:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 144, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1273:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 147, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1281:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 146, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "1281:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 152, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1290:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", + "typeString": "bytes2[4][]" + }, + "typeName": { + "baseType": { + "baseType": { + "id": 148, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "1290:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "id": 150, + "length": { + "argumentTypes": null, + "hexValue": "34", + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1297:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "4" + }, + "nodeType": "ArrayTypeName", + "src": "1290:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", + "typeString": "bytes2[4]" + } + }, + "id": 151, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1290:11:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", + "typeString": "bytes2[4][]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1231:71:0" + }, + "scope": 167, + "src": "1187:246:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 168, + "src": "26:1413:0" + } + ], + "src": "0:1440:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-17T08:28:45.994Z" +} \ No newline at end of file diff --git a/test/contracts/Linearization.json b/test/contracts/Linearization.json new file mode 100644 index 00000000..bd275ba3 --- /dev/null +++ b/test/contracts/Linearization.json @@ -0,0 +1,2716 @@ +{ + "contractName": "Linearization", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "E1", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "tag", + "type": "string" + }, + { + "indexed": false, + "name": "uuid", + "type": "bytes4" + } + ], + "name": "E2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "txOrigin", + "type": "address" + }, + { + "indexed": false, + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "E3", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "sig", + "type": "bytes4" + }, + { + "indexed": false, + "name": "blockHash", + "type": "bytes32" + } + ], + "name": "E4", + "type": "event" + }, + { + "constant": false, + "inputs": [], + "name": "e12", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "e21", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "e1", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "e2", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "e3", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "e4", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506105ad806100206000396000f300608060405260043610610077576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062def0b21461007c57806356800b521461009357806379e5f054146100aa5780639b31f9e8146100c1578063a0f29798146100d8578063a2c2d666146100ef575b600080fd5b34801561008857600080fd5b50610091610106565b005b34801561009f57600080fd5b506100a8610226565b005b3480156100b657600080fd5b506100bf610293565b005b3480156100cd57600080fd5b506100d661033f565b005b3480156100e457600080fd5b506100ed6103f3565b005b3480156100fb57600080fd5b50610104610513565b005b7f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a17fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a1565b7fe86793c401899b62baf9c8e9b8a8803ece6ace1021d056fe8634d1f59a0410c13243604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1565b7fd8f3042e770b7de0dc534d3accbe98fba747e05ada6febe1a03d1e098521edc26000357fffffffff0000000000000000000000000000000000000000000000000000000016434060405180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200182600019166000191681526020019250505060405180910390a1565b7fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a1565b7fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a17f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1565b7f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15600a165627a7a72305820be9afa4ce385da787f13197a249b8d9d1c557381e3c46f9bbada45913eee79870029", + "deployedBytecode": "0x608060405260043610610077576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062def0b21461007c57806356800b521461009357806379e5f054146100aa5780639b31f9e8146100c1578063a0f29798146100d8578063a2c2d666146100ef575b600080fd5b34801561008857600080fd5b50610091610106565b005b34801561009f57600080fd5b506100a8610226565b005b3480156100b657600080fd5b506100bf610293565b005b3480156100cd57600080fd5b506100d661033f565b005b3480156100e457600080fd5b506100ed6103f3565b005b3480156100fb57600080fd5b50610104610513565b005b7f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a17fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a1565b7fe86793c401899b62baf9c8e9b8a8803ece6ace1021d056fe8634d1f59a0410c13243604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1565b7fd8f3042e770b7de0dc534d3accbe98fba747e05ada6febe1a03d1e098521edc26000357fffffffff0000000000000000000000000000000000000000000000000000000016434060405180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200182600019166000191681526020019250505060405180910390a1565b7fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a1565b7fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a17f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1565b7f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15600a165627a7a72305820be9afa4ce385da787f13197a249b8d9d1c557381e3c46f9bbada45913eee79870029", + "sourceMap": "26:649:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:649:1;;;;;;;", + "deployedSourceMap": "26:649:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;224:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;224:89:1;;;;;;532:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;532:64:1;;;;;;600:73;;8:9:-1;5:2;;;30:1;27;20:12;5:2;600:73:1;;;;;;468:60;;8:9:-1;5:2;;;30:1;27;20:12;5:2;468:60:1;;;;;;317:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;317:89:1;;;;;;410:54;;8:9:-1;5:2;;;30:1;27;20:12;5:2;410:54:1;;;;;;224:89;257:17;260:10;272:1;257:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;285:23;297:10;285:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;224:89::o;532:64::-;564:27;567:9;578:12;564:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;532:64::o;600:73::-;632:36;635:7;;;;654:12;644:23;632:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;600:73::o;468:60::-;500:23;512:10;500:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;468:60::o;317:89::-;350:23;362:10;350:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;384:17;387:10;399:1;384:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;317:89::o;410:54::-;442:17;445:10;457:1;442:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;410:54::o", + "source": "pragma solidity ^0.4.22;\n\ncontract Linearization {\n\n event E1(address sender, uint amount);\n event E2(string tag, bytes4 uuid);\n event E3(address txOrigin, uint blockNumber);\n event E4(bytes4 sig, bytes32 blockHash);\n\n function e12() public {\n emit E1(msg.sender, 0);\n emit E2(\"hello\", 0xdeadbeef);\n }\n\n function e21() public {\n emit E2(\"hello\", 0xdeadbeef);\n emit E1(msg.sender, 0);\n }\n\n function e1() public {\n emit E1(msg.sender, 0);\n }\n\n function e2() public {\n emit E2(\"hello\", 0xdeadbeef);\n }\n\n function e3() public {\n emit E3(tx.origin, block.number);\n }\n\n function e4() public {\n emit E4(msg.sig, blockhash(block.number));\n }\n}", + "sourcePath": "/home/akru/hsweb3test/contracts/Linearization.sol", + "ast": { + "absolutePath": "/home/akru/hsweb3test/contracts/Linearization.sol", + "exportedSymbols": { + "Linearization": [ + 267 + ] + }, + "id": 268, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 169, + "literals": [ + "solidity", + "^", + "0.4", + ".22" + ], + "nodeType": "PragmaDirective", + "src": "0:24:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 267, + "linearizedBaseContracts": [ + 267 + ], + "name": "Linearization", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 175, + "name": "E1", + "nodeType": "EventDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 171, + "indexed": false, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "63:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 170, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "63:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 173, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "79:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 172, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "79:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62:29:1" + }, + "src": "54:38:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 181, + "name": "E2", + "nodeType": "EventDefinition", + "parameters": { + "id": 180, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "indexed": false, + "name": "tag", + "nodeType": "VariableDeclaration", + "scope": 181, + "src": "104:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "104:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 179, + "indexed": false, + "name": "uuid", + "nodeType": "VariableDeclaration", + "scope": 181, + "src": "116:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 178, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "116:6:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "103:25:1" + }, + "src": "95:34:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 187, + "name": "E3", + "nodeType": "EventDefinition", + "parameters": { + "id": 186, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 183, + "indexed": false, + "name": "txOrigin", + "nodeType": "VariableDeclaration", + "scope": 187, + "src": "141:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "141:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 185, + "indexed": false, + "name": "blockNumber", + "nodeType": "VariableDeclaration", + "scope": 187, + "src": "159:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 184, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "159:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "140:36:1" + }, + "src": "132:45:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 193, + "name": "E4", + "nodeType": "EventDefinition", + "parameters": { + "id": 192, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 189, + "indexed": false, + "name": "sig", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "189:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 188, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "189:6:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 191, + "indexed": false, + "name": "blockHash", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "201:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 190, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "201:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "188:31:1" + }, + "src": "180:40:1" + }, + { + "body": { + "id": 207, + "nodeType": "Block", + "src": "246:67:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 197, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 381, + "src": "260:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "260:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "272:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 196, + "name": "E1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "257:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "257:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 201, + "nodeType": "EmitStatement", + "src": "252:22:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "68656c6c6f", + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "288:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + "value": "hello" + }, + { + "argumentTypes": null, + "hexValue": "30786465616462656566", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "297:10:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + }, + "value": "0xdeadbeef" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + } + ], + "id": 202, + "name": "E2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "285:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", + "typeString": "function (string memory,bytes4)" + } + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "285:23:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 206, + "nodeType": "EmitStatement", + "src": "280:28:1" + } + ] + }, + "documentation": null, + "id": 208, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [], + "src": "236:2:1" + }, + "payable": false, + "returnParameters": { + "id": 195, + "nodeType": "ParameterList", + "parameters": [], + "src": "246:0:1" + }, + "scope": 267, + "src": "224:89:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 222, + "nodeType": "Block", + "src": "339:67:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "68656c6c6f", + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "353:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + "value": "hello" + }, + { + "argumentTypes": null, + "hexValue": "30786465616462656566", + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "362:10:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + }, + "value": "0xdeadbeef" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + } + ], + "id": 211, + "name": "E2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "350:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", + "typeString": "function (string memory,bytes4)" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "350:23:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 215, + "nodeType": "EmitStatement", + "src": "345:28:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 381, + "src": "387:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "387:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "399:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 216, + "name": "E1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "384:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "384:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 221, + "nodeType": "EmitStatement", + "src": "379:22:1" + } + ] + }, + "documentation": null, + "id": 223, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 209, + "nodeType": "ParameterList", + "parameters": [], + "src": "329:2:1" + }, + "payable": false, + "returnParameters": { + "id": 210, + "nodeType": "ParameterList", + "parameters": [], + "src": "339:0:1" + }, + "scope": 267, + "src": "317:89:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 232, + "nodeType": "Block", + "src": "431:33:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 227, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 381, + "src": "445:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "445:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "457:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 226, + "name": "E1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "442:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "442:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 231, + "nodeType": "EmitStatement", + "src": "437:22:1" + } + ] + }, + "documentation": null, + "id": 233, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 224, + "nodeType": "ParameterList", + "parameters": [], + "src": "421:2:1" + }, + "payable": false, + "returnParameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [], + "src": "431:0:1" + }, + "scope": 267, + "src": "410:54:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 241, + "nodeType": "Block", + "src": "489:39:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "68656c6c6f", + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "503:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + "value": "hello" + }, + { + "argumentTypes": null, + "hexValue": "30786465616462656566", + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "512:10:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + }, + "value": "0xdeadbeef" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + } + ], + "id": 236, + "name": "E2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "500:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", + "typeString": "function (string memory,bytes4)" + } + }, + "id": 239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "500:23:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 240, + "nodeType": "EmitStatement", + "src": "495:28:1" + } + ] + }, + "documentation": null, + "id": 242, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 234, + "nodeType": "ParameterList", + "parameters": [], + "src": "479:2:1" + }, + "payable": false, + "returnParameters": { + "id": 235, + "nodeType": "ParameterList", + "parameters": [], + "src": "489:0:1" + }, + "scope": 267, + "src": "468:60:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 252, + "nodeType": "Block", + "src": "553:43:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 246, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 393, + "src": "567:2:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "567:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 248, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 371, + "src": "578:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "578:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 245, + "name": "E3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "564:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "564:27:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 251, + "nodeType": "EmitStatement", + "src": "559:32:1" + } + ] + }, + "documentation": null, + "id": 253, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 243, + "nodeType": "ParameterList", + "parameters": [], + "src": "543:2:1" + }, + "payable": false, + "returnParameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [], + "src": "553:0:1" + }, + "scope": 267, + "src": "532:64:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 265, + "nodeType": "Block", + "src": "621:52:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 257, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 381, + "src": "635:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sig", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "635:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 260, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 371, + "src": "654:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "654:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 259, + "name": "blockhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "644:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "644:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 256, + "name": "E4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "632:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes4_$_t_bytes32_$returns$__$", + "typeString": "function (bytes4,bytes32)" + } + }, + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "632:36:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 264, + "nodeType": "EmitStatement", + "src": "627:41:1" + } + ] + }, + "documentation": null, + "id": 266, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 254, + "nodeType": "ParameterList", + "parameters": [], + "src": "611:2:1" + }, + "payable": false, + "returnParameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [], + "src": "621:0:1" + }, + "scope": 267, + "src": "600:73:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 268, + "src": "26:649:1" + } + ], + "src": "0:675:1" + }, + "legacyAST": { + "absolutePath": "/home/akru/hsweb3test/contracts/Linearization.sol", + "exportedSymbols": { + "Linearization": [ + 267 + ] + }, + "id": 268, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 169, + "literals": [ + "solidity", + "^", + "0.4", + ".22" + ], + "nodeType": "PragmaDirective", + "src": "0:24:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 267, + "linearizedBaseContracts": [ + 267 + ], + "name": "Linearization", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 175, + "name": "E1", + "nodeType": "EventDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 171, + "indexed": false, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "63:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 170, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "63:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 173, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "79:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 172, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "79:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62:29:1" + }, + "src": "54:38:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 181, + "name": "E2", + "nodeType": "EventDefinition", + "parameters": { + "id": 180, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "indexed": false, + "name": "tag", + "nodeType": "VariableDeclaration", + "scope": 181, + "src": "104:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "104:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 179, + "indexed": false, + "name": "uuid", + "nodeType": "VariableDeclaration", + "scope": 181, + "src": "116:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 178, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "116:6:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "103:25:1" + }, + "src": "95:34:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 187, + "name": "E3", + "nodeType": "EventDefinition", + "parameters": { + "id": 186, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 183, + "indexed": false, + "name": "txOrigin", + "nodeType": "VariableDeclaration", + "scope": 187, + "src": "141:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "141:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 185, + "indexed": false, + "name": "blockNumber", + "nodeType": "VariableDeclaration", + "scope": 187, + "src": "159:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 184, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "159:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "140:36:1" + }, + "src": "132:45:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 193, + "name": "E4", + "nodeType": "EventDefinition", + "parameters": { + "id": 192, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 189, + "indexed": false, + "name": "sig", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "189:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 188, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "189:6:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 191, + "indexed": false, + "name": "blockHash", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "201:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 190, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "201:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "188:31:1" + }, + "src": "180:40:1" + }, + { + "body": { + "id": 207, + "nodeType": "Block", + "src": "246:67:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 197, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 381, + "src": "260:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "260:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "272:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 196, + "name": "E1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "257:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "257:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 201, + "nodeType": "EmitStatement", + "src": "252:22:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "68656c6c6f", + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "288:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + "value": "hello" + }, + { + "argumentTypes": null, + "hexValue": "30786465616462656566", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "297:10:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + }, + "value": "0xdeadbeef" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + } + ], + "id": 202, + "name": "E2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "285:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", + "typeString": "function (string memory,bytes4)" + } + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "285:23:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 206, + "nodeType": "EmitStatement", + "src": "280:28:1" + } + ] + }, + "documentation": null, + "id": 208, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [], + "src": "236:2:1" + }, + "payable": false, + "returnParameters": { + "id": 195, + "nodeType": "ParameterList", + "parameters": [], + "src": "246:0:1" + }, + "scope": 267, + "src": "224:89:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 222, + "nodeType": "Block", + "src": "339:67:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "68656c6c6f", + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "353:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + "value": "hello" + }, + { + "argumentTypes": null, + "hexValue": "30786465616462656566", + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "362:10:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + }, + "value": "0xdeadbeef" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + } + ], + "id": 211, + "name": "E2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "350:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", + "typeString": "function (string memory,bytes4)" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "350:23:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 215, + "nodeType": "EmitStatement", + "src": "345:28:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 381, + "src": "387:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "387:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "399:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 216, + "name": "E1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "384:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "384:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 221, + "nodeType": "EmitStatement", + "src": "379:22:1" + } + ] + }, + "documentation": null, + "id": 223, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 209, + "nodeType": "ParameterList", + "parameters": [], + "src": "329:2:1" + }, + "payable": false, + "returnParameters": { + "id": 210, + "nodeType": "ParameterList", + "parameters": [], + "src": "339:0:1" + }, + "scope": 267, + "src": "317:89:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 232, + "nodeType": "Block", + "src": "431:33:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 227, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 381, + "src": "445:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "445:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "457:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 226, + "name": "E1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "442:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "442:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 231, + "nodeType": "EmitStatement", + "src": "437:22:1" + } + ] + }, + "documentation": null, + "id": 233, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 224, + "nodeType": "ParameterList", + "parameters": [], + "src": "421:2:1" + }, + "payable": false, + "returnParameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [], + "src": "431:0:1" + }, + "scope": 267, + "src": "410:54:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 241, + "nodeType": "Block", + "src": "489:39:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "68656c6c6f", + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "503:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + "value": "hello" + }, + { + "argumentTypes": null, + "hexValue": "30786465616462656566", + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "512:10:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + }, + "value": "0xdeadbeef" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", + "typeString": "literal_string \"hello\"" + }, + { + "typeIdentifier": "t_rational_3735928559_by_1", + "typeString": "int_const 3735928559" + } + ], + "id": 236, + "name": "E2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 181, + "src": "500:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", + "typeString": "function (string memory,bytes4)" + } + }, + "id": 239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "500:23:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 240, + "nodeType": "EmitStatement", + "src": "495:28:1" + } + ] + }, + "documentation": null, + "id": 242, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 234, + "nodeType": "ParameterList", + "parameters": [], + "src": "479:2:1" + }, + "payable": false, + "returnParameters": { + "id": 235, + "nodeType": "ParameterList", + "parameters": [], + "src": "489:0:1" + }, + "scope": 267, + "src": "468:60:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 252, + "nodeType": "Block", + "src": "553:43:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 246, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 393, + "src": "567:2:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "567:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 248, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 371, + "src": "578:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "578:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 245, + "name": "E3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "564:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "564:27:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 251, + "nodeType": "EmitStatement", + "src": "559:32:1" + } + ] + }, + "documentation": null, + "id": 253, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e3", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 243, + "nodeType": "ParameterList", + "parameters": [], + "src": "543:2:1" + }, + "payable": false, + "returnParameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [], + "src": "553:0:1" + }, + "scope": 267, + "src": "532:64:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 265, + "nodeType": "Block", + "src": "621:52:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 257, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 381, + "src": "635:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sig", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "635:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 260, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 371, + "src": "654:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "654:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 259, + "name": "blockhash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "644:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "644:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 256, + "name": "E4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "632:2:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes4_$_t_bytes32_$returns$__$", + "typeString": "function (bytes4,bytes32)" + } + }, + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "632:36:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 264, + "nodeType": "EmitStatement", + "src": "627:41:1" + } + ] + }, + "documentation": null, + "id": 266, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "e4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 254, + "nodeType": "ParameterList", + "parameters": [], + "src": "611:2:1" + }, + "payable": false, + "returnParameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [], + "src": "621:0:1" + }, + "scope": 267, + "src": "600:73:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 268, + "src": "26:649:1" + } + ], + "src": "0:675:1" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-17T08:27:57.791Z" +} \ No newline at end of file diff --git a/test/contracts/Registry.json b/test/contracts/Registry.json new file mode 100644 index 00000000..0a65b5b5 --- /dev/null +++ b/test/contracts/Registry.json @@ -0,0 +1,506 @@ +{ + "contractName": "Registry", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "listingHash", + "type": "bytes32" + } + ], + "name": "A", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "name": "listingHash", + "type": "bytes32" + } + ], + "name": "B", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "dog", + "type": "address" + }, + { + "indexed": false, + "name": "cat", + "type": "bytes32" + } + ], + "name": "C", + "type": "event" + } + ], + "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a7230582033480aa8fef567c80a4f8afd205add18d07c6a0f6991c2a4b0c2c20b8220f89b0029", + "deployedBytecode": "0x6080604052600080fd00a165627a7a7230582033480aa8fef567c80a4f8afd205add18d07c6a0f6991c2a4b0c2c20b8220f89b0029", + "sourceMap": "26:163:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:163:3;;;;;;;", + "deployedSourceMap": "26:163:3:-;;;;;", + "source": "pragma solidity ^0.4.22;\n\ncontract Registry {\n\n\n event A(bytes32 indexed listingHash);\n event B(address indexed sender, bytes32 listingHash);\n event C(address dog, bytes32 cat);\n\n}\n", + "sourcePath": "/home/akru/hsweb3test/contracts/Registry.sol", + "ast": { + "absolutePath": "/home/akru/hsweb3test/contracts/Registry.sol", + "exportedSymbols": { + "Registry": [ + 343 + ] + }, + "id": 344, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 326, + "literals": [ + "solidity", + "^", + "0.4", + ".22" + ], + "nodeType": "PragmaDirective", + "src": "0:24:3" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 343, + "linearizedBaseContracts": [ + 343 + ], + "name": "Registry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 330, + "name": "A", + "nodeType": "EventDefinition", + "parameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 328, + "indexed": true, + "name": "listingHash", + "nodeType": "VariableDeclaration", + "scope": 330, + "src": "60:27:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 327, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "60:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59:29:3" + }, + "src": "52:37:3" + }, + { + "anonymous": false, + "documentation": null, + "id": 336, + "name": "B", + "nodeType": "EventDefinition", + "parameters": { + "id": 335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 332, + "indexed": true, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 336, + "src": "102:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 331, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "102:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 334, + "indexed": false, + "name": "listingHash", + "nodeType": "VariableDeclaration", + "scope": 336, + "src": "126:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 333, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "126:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "101:45:3" + }, + "src": "94:53:3" + }, + { + "anonymous": false, + "documentation": null, + "id": 342, + "name": "C", + "nodeType": "EventDefinition", + "parameters": { + "id": 341, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 338, + "indexed": false, + "name": "dog", + "nodeType": "VariableDeclaration", + "scope": 342, + "src": "160:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 337, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "160:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 340, + "indexed": false, + "name": "cat", + "nodeType": "VariableDeclaration", + "scope": 342, + "src": "173:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 339, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "173:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "159:26:3" + }, + "src": "152:34:3" + } + ], + "scope": 344, + "src": "26:163:3" + } + ], + "src": "0:190:3" + }, + "legacyAST": { + "absolutePath": "/home/akru/hsweb3test/contracts/Registry.sol", + "exportedSymbols": { + "Registry": [ + 343 + ] + }, + "id": 344, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 326, + "literals": [ + "solidity", + "^", + "0.4", + ".22" + ], + "nodeType": "PragmaDirective", + "src": "0:24:3" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 343, + "linearizedBaseContracts": [ + 343 + ], + "name": "Registry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 330, + "name": "A", + "nodeType": "EventDefinition", + "parameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 328, + "indexed": true, + "name": "listingHash", + "nodeType": "VariableDeclaration", + "scope": 330, + "src": "60:27:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 327, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "60:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "59:29:3" + }, + "src": "52:37:3" + }, + { + "anonymous": false, + "documentation": null, + "id": 336, + "name": "B", + "nodeType": "EventDefinition", + "parameters": { + "id": 335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 332, + "indexed": true, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 336, + "src": "102:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 331, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "102:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 334, + "indexed": false, + "name": "listingHash", + "nodeType": "VariableDeclaration", + "scope": 336, + "src": "126:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 333, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "126:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "101:45:3" + }, + "src": "94:53:3" + }, + { + "anonymous": false, + "documentation": null, + "id": 342, + "name": "C", + "nodeType": "EventDefinition", + "parameters": { + "id": 341, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 338, + "indexed": false, + "name": "dog", + "nodeType": "VariableDeclaration", + "scope": 342, + "src": "160:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 337, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "160:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 340, + "indexed": false, + "name": "cat", + "nodeType": "VariableDeclaration", + "scope": 342, + "src": "173:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 339, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "173:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "159:26:3" + }, + "src": "152:34:3" + } + ], + "scope": 344, + "src": "26:163:3" + } + ], + "src": "0:190:3" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-17T08:27:57.792Z" +} \ No newline at end of file diff --git a/test/contracts/SimpleStorage.json b/test/contracts/SimpleStorage.json new file mode 100644 index 00000000..1414362d --- /dev/null +++ b/test/contracts/SimpleStorage.json @@ -0,0 +1,600 @@ +{ + "contractName": "SimpleStorage", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "count", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_count", + "type": "uint256" + } + ], + "name": "_CountSet", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_count", + "type": "uint256" + } + ], + "name": "setCount", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610113806100206000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14604e578063d14e62b8146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b806000819055507f23420683cdbc4b73b0779e0325c497f5b72b3e8a92f3882a5a754c1b9eb734ec816040518082815260200191505060405180910390a1505600a165627a7a72305820a2e06ca2fff9366521c668d197df2b9e7164abd3974f3b0d54e6690ca00798400029", + "deployedBytecode": "0x6080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14604e578063d14e62b8146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b806000819055507f23420683cdbc4b73b0779e0325c497f5b72b3e8a92f3882a5a754c1b9eb734ec816040518082815260200191505060405180910390a1505600a165627a7a72305820a2e06ca2fff9366521c668d197df2b9e7164abd3974f3b0d54e6690ca00798400029", + "sourceMap": "26:201:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:201:1;;;;;;;", + "deployedSourceMap": "26:201:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;55:17:1;;;;;;;;;;;;;;;;;;;;;;;122:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;122:103:1;;;;;;;;;;;;;;;;;;;;;;;;;;55:17;;;;:::o;122:103::-;180:6;172:5;:14;;;;201:17;211:6;201:17;;;;;;;;;;;;;;;;;;122:103;:::o", + "source": "pragma solidity ^0.4.15;\n\ncontract SimpleStorage {\n uint public count;\n \n event _CountSet(uint _count);\n \n function setCount(uint _count) external {\n count = _count;\n emit _CountSet(_count);\n }\n}\n", + "sourcePath": "/home/akru/hsweb3test/contracts/SimpleStorage.sol", + "ast": { + "absolutePath": "/home/akru/hsweb3test/contracts/SimpleStorage.sol", + "exportedSymbols": { + "SimpleStorage": [ + 190 + ] + }, + "id": 191, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 169, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 190, + "linearizedBaseContracts": [ + 190 + ], + "name": "SimpleStorage", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 171, + "name": "count", + "nodeType": "VariableDeclaration", + "scope": 190, + "src": "55:17:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 170, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "55:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 175, + "name": "_CountSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "indexed": false, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "99:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 172, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "99:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "98:13:1" + }, + "src": "83:29:1" + }, + { + "body": { + "id": 188, + "nodeType": "Block", + "src": "162:63:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 180, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "172:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 181, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "180:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "172:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 183, + "nodeType": "ExpressionStatement", + "src": "172:14:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 185, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "211:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 184, + "name": "_CountSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "201:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "201:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 187, + "nodeType": "EmitStatement", + "src": "196:22:1" + } + ] + }, + "documentation": null, + "id": 189, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 189, + "src": "140:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 176, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "140:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "139:13:1" + }, + "payable": false, + "returnParameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [], + "src": "162:0:1" + }, + "scope": 190, + "src": "122:103:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 191, + "src": "26:201:1" + } + ], + "src": "0:228:1" + }, + "legacyAST": { + "absolutePath": "/home/akru/hsweb3test/contracts/SimpleStorage.sol", + "exportedSymbols": { + "SimpleStorage": [ + 190 + ] + }, + "id": 191, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 169, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 190, + "linearizedBaseContracts": [ + 190 + ], + "name": "SimpleStorage", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 171, + "name": "count", + "nodeType": "VariableDeclaration", + "scope": 190, + "src": "55:17:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 170, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "55:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 175, + "name": "_CountSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "indexed": false, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 175, + "src": "99:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 172, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "99:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "98:13:1" + }, + "src": "83:29:1" + }, + { + "body": { + "id": 188, + "nodeType": "Block", + "src": "162:63:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 180, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "172:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 181, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "180:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "172:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 183, + "nodeType": "ExpressionStatement", + "src": "172:14:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 185, + "name": "_count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "211:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 184, + "name": "_CountSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "201:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "201:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 187, + "nodeType": "EmitStatement", + "src": "196:22:1" + } + ] + }, + "documentation": null, + "id": 189, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "setCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "name": "_count", + "nodeType": "VariableDeclaration", + "scope": 189, + "src": "140:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 176, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "140:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "139:13:1" + }, + "payable": false, + "returnParameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [], + "src": "162:0:1" + }, + "scope": 190, + "src": "122:103:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 191, + "src": "26:201:1" + } + ], + "src": "0:228:1" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "2.0.1", + "updatedAt": "2018-10-17T08:28:45.992Z" +} \ No newline at end of file diff --git a/unit/Language/Solidity/Test/CompilerSpec.hs b/unit/Language/Solidity/Test/CompilerSpec.hs index 89941376..460fadb9 100644 --- a/unit/Language/Solidity/Test/CompilerSpec.hs +++ b/unit/Language/Solidity/Test/CompilerSpec.hs @@ -11,7 +11,7 @@ spec :: Spec spec = describe "solidity" $ do it "can compile empty contract" $ do compile (Sources [("A", "contract A {}")] [] True) - `shouldBe` Right [("A", ("[]\n", "6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a723058206a08beaeb7393045de3d83f44db8e6d34b1b53821a3bc6647f641e5fbbdd679a0029"))] + `shouldBe` Right [("A", ("[]\n", "6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a72305820613b8f0a4aab50fea86c1e4943bcddad6d753778395309a4e055efcda614b0690029"))] it "can handle broken contract" $ do compile (Sources [("Fail", "contract Fail {")] [] True) @@ -19,4 +19,4 @@ spec = describe "solidity" $ do it "can compile simple contract" $ do compile (Sources [("SimpleStorage", "contract SimpleStorage { uint256 public a; function set(uint256 _a) { a = _a; } }")] [] True) - `shouldBe` Right [("SimpleStorage", ("[\n\t{\n\t\t\"constant\" : true,\n\t\t\"inputs\" : [],\n\t\t\"name\" : \"a\",\n\t\t\"outputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"view\",\n\t\t\"type\" : \"function\"\n\t},\n\t{\n\t\t\"constant\" : false,\n\t\t\"inputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"_a\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"name\" : \"set\",\n\t\t\"outputs\" : [],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"nonpayable\",\n\t\t\"type\" : \"function\"\n\t}\n]\n","608060405234801561001057600080fd5b5060dc8061001f6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dbe671f14604e57806360fe47b1146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b80600081905550505600a165627a7a72305820cfdbfa82d208da59706665bcf45431cdd8824420e1e3f68d74da826c1221bab10029"))] + `shouldBe` Right [("SimpleStorage", ("[\n\t{\n\t\t\"constant\" : true,\n\t\t\"inputs\" : [],\n\t\t\"name\" : \"a\",\n\t\t\"outputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"view\",\n\t\t\"type\" : \"function\"\n\t},\n\t{\n\t\t\"constant\" : false,\n\t\t\"inputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"_a\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"name\" : \"set\",\n\t\t\"outputs\" : [],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"nonpayable\",\n\t\t\"type\" : \"function\"\n\t}\n]\n", "608060405234801561001057600080fd5b5060dc8061001f6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dbe671f14604e57806360fe47b1146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b80600081905550505600a165627a7a7230582053764f3cc73b0960abb0d97899a8133bee5eb98c131978821f7add85f33d4f2e0029"))] diff --git a/unit/Network/Ethereum/Web3/Test/EventSpec.hs b/unit/Network/Ethereum/Web3/Test/EventSpec.hs index 115c7c19..31a108ec 100644 --- a/unit/Network/Ethereum/Web3/Test/EventSpec.hs +++ b/unit/Network/Ethereum/Web3/Test/EventSpec.hs @@ -10,11 +10,9 @@ import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) import Test.Hspec (Spec, describe, it, shouldBe) +import Data.Solidity.Abi (AbiGet, AbiType (..)) import Data.Solidity.Event (IndexedEvent (..), decodeEvent) -import Data.Solidity.Prim.Address (Address) -import Data.Solidity.Prim.Bytes () -import Data.Solidity.Prim.Int (UIntN) -import Data.Solidity.Prim.Tagged () +import Data.Solidity.Prim (Address, UIntN) import Network.Ethereum.Api.Types (Change (..)) @@ -57,11 +55,18 @@ eventTest = data NewCount = NewCount (UIntN 256) deriving (Eq, Show, GHC.Generic) instance Generic NewCount + data NewCountIndexed = NewCountIndexed deriving (Eq, Show, GHC.Generic) instance Generic NewCountIndexed +instance AbiType NewCountIndexed where + isDynamic = const False +instance AbiGet NewCountIndexed data NewCountNonIndexed = NewCountNonIndexed (Tagged 1 (UIntN 256)) deriving (Eq, Show, GHC.Generic) instance Generic NewCountNonIndexed +instance AbiType NewCountNonIndexed where + isDynamic = const False +instance AbiGet NewCountNonIndexed instance IndexedEvent NewCountIndexed NewCountNonIndexed NewCount where isAnonymous = const False @@ -72,9 +77,15 @@ instance Generic Transfer data TransferIndexed = TransferIndexed (Tagged 1 Address) (Tagged 3 Address) deriving (Eq, Show, GHC.Generic) instance Generic TransferIndexed +instance AbiType TransferIndexed where + isDynamic = const False +instance AbiGet TransferIndexed data TransferNonIndexed = TransferNonIndexed (Tagged 2 (UIntN 256)) deriving (Eq, Show, GHC.Generic) instance Generic TransferNonIndexed +instance AbiType TransferNonIndexed where + isDynamic = const False +instance AbiGet TransferNonIndexed instance IndexedEvent TransferIndexed TransferNonIndexed Transfer where isAnonymous = const False diff --git a/unit/Network/Ethereum/Web3/Test/LocalAccountSpec.hs b/unit/Network/Ethereum/Web3/Test/LocalAccountSpec.hs new file mode 100644 index 00000000..1cf92a09 --- /dev/null +++ b/unit/Network/Ethereum/Web3/Test/LocalAccountSpec.hs @@ -0,0 +1,26 @@ +{-# LANGUAGE OverloadedStrings #-} + +module Network.Ethereum.Web3.Test.LocalAccountSpec where + +import Crypto.Ethereum (SecKey) +import Test.Hspec + +import Network.Ethereum.Account.PrivateKey (signTransaction) +import Network.Ethereum.Api.Types (Call (..), Quantity (..)) + +-- using same example as in this blog post: +-- https://medium.com/@codetractio/walkthrough-of-an-ethereum-improvement-proposal-eip-6fda3966d171 +spec :: Spec +spec = describe "transaction signing" $ do + let testCall = Call Nothing + (Just "0x3535353535353535353535353535353535353535") + (Just . Quantity $ 21000) + (Just . Quantity $ 20000000000) + (Just . Quantity $ 1000000000000000000) + Nothing + (Just 9) + privKey = "4646464646464646464646464646464646464646464646464646464646464646" :: SecKey + correctSignedTx = "0xf86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83" + + it "can create valid raw transaction" $ + signTransaction testCall 1 privKey `shouldBe` correctSignedTx From bce9eaa7720c39571d9650c24fd670e9e9f96a5e Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 19 Oct 2018 18:18:16 +0300 Subject: [PATCH 024/237] Added `JsonRpc` typeclass instead `JsonRpcM` constraint --- src/Network/Ethereum/Account.hs | 3 - src/Network/Ethereum/Account/Class.hs | 8 +- src/Network/Ethereum/Account/Internal.hs | 6 +- src/Network/Ethereum/Account/Safe.hs | 4 +- src/Network/Ethereum/Api/Eth.hs | 82 ++++++++++---------- src/Network/Ethereum/Api/Net.hs | 8 +- src/Network/Ethereum/Api/Personal.hs | 18 ++--- src/Network/Ethereum/Api/Provider.hs | 11 +-- src/Network/Ethereum/Api/Web3.hs | 6 +- src/Network/Ethereum/Contract.hs | 4 +- src/Network/Ethereum/Contract/TH.hs | 4 +- src/Network/Ethereum/Ens.hs | 4 +- src/Network/JsonRpc/TinyClient.hs | 75 +++++++++--------- test/Network/Ethereum/Web3/Test/ERC20Spec.hs | 4 +- 14 files changed, 117 insertions(+), 120 deletions(-) diff --git a/src/Network/Ethereum/Account.hs b/src/Network/Ethereum/Account.hs index 7fd14d30..988eeb12 100644 --- a/src/Network/Ethereum/Account.hs +++ b/src/Network/Ethereum/Account.hs @@ -40,12 +40,9 @@ module Network.Ethereum.Account , gasPrice , block , account - , (.~) ) where -import Lens.Micro ((.~)) - import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Account.Default (DefaultAccount) import Network.Ethereum.Account.Internal (account, block, gasLimit, diff --git a/src/Network/Ethereum/Account/Class.hs b/src/Network/Ethereum/Account/Class.hs index 9fb2615c..a009a3ce 100644 --- a/src/Network/Ethereum/Account/Class.hs +++ b/src/Network/Ethereum/Account/Class.hs @@ -21,7 +21,7 @@ import Control.Monad.Trans (MonadTrans) import Data.Solidity.Abi (AbiGet) import Network.Ethereum.Api.Types (TxReceipt) import Network.Ethereum.Contract.Method (Method) -import Network.JsonRpc.TinyClient (JsonRpcM) +import Network.JsonRpc.TinyClient (JsonRpc) -- | Account is needed for sending transactions to blockchain -- @@ -32,7 +32,7 @@ import Network.JsonRpc.TinyClient (JsonRpcM) class MonadTrans t => Account a t | t -> a where -- | Run computation with given account credentials - withAccount :: JsonRpcM m + withAccount :: JsonRpc m => a -- ^ Account params (like a password or private key) -> t m b @@ -41,14 +41,14 @@ class MonadTrans t => Account a t | t -> a where -- ^ Json-rpc monad -- | Send transaction to contract, like a 'write' command - send :: (JsonRpcM m, Method args) + send :: (JsonRpc m, Method args) => args -- ^ Contract method arguments -> t m TxReceipt -- ^ Receipt of sended transaction -- | Call constant method of contract, like a 'read' command - call :: (JsonRpcM m, Method args, AbiGet result) + call :: (JsonRpc m, Method args, AbiGet result) => args -- ^ Contact method arguments -> t m result diff --git a/src/Network/Ethereum/Account/Internal.hs b/src/Network/Ethereum/Account/Internal.hs index 846a36ae..cf43d905 100644 --- a/src/Network/Ethereum/Account/Internal.hs +++ b/src/Network/Ethereum/Account/Internal.hs @@ -35,7 +35,7 @@ import Network.Ethereum.Api.Types (Call (..), DefaultBlock (Latest), TxReceipt (receiptTransactionHash)) import Network.Ethereum.Unit (Unit (..)) -import Network.JsonRpc.TinyClient (JsonRpcM) +import Network.JsonRpc.TinyClient (JsonRpc) -- | Account is needed to send transactions to blockchain @@ -116,7 +116,7 @@ getCall = do , callGasPrice = fromInteger <$> _gasPrice } -getReceipt :: JsonRpcM m => HexString -> m TxReceipt +getReceipt :: JsonRpc m => HexString -> m TxReceipt getReceipt tx = do mbreceipt <- Eth.getTransactionReceipt tx case mbreceipt of @@ -126,6 +126,6 @@ getReceipt tx = do -- TODO: avoid inifinite loop getReceipt tx -updateReceipt :: JsonRpcM m => TxReceipt -> m TxReceipt +updateReceipt :: JsonRpc m => TxReceipt -> m TxReceipt {-# INLINE updateReceipt #-} updateReceipt = getReceipt . receiptTransactionHash diff --git a/src/Network/Ethereum/Account/Safe.hs b/src/Network/Ethereum/Account/Safe.hs index 1c29a11f..8baee202 100644 --- a/src/Network/Ethereum/Account/Safe.hs +++ b/src/Network/Ethereum/Account/Safe.hs @@ -23,11 +23,11 @@ import Network.Ethereum.Account.Internal (updateReceipt) import qualified Network.Ethereum.Api.Eth as Eth import Network.Ethereum.Api.Types (TxReceipt (receiptBlockNumber)) import Network.Ethereum.Contract.Method (Method) -import Network.JsonRpc.TinyClient (JsonRpcM) +import Network.JsonRpc.TinyClient (JsonRpc) -- | Safe version of 'send' function of 'Account' typeclass -- Waiting for some blocks of transaction confirmation before return -safeSend :: (Account p t, JsonRpcM m, Method args, Monad (t m)) +safeSend :: (Account p t, JsonRpc m, Method args, Monad (t m)) => Integer -- ^ Confirmation in blocks -> args diff --git a/src/Network/Ethereum/Api/Eth.hs b/src/Network/Ethereum/Api/Eth.hs index d55c053b..e48cd158 100644 --- a/src/Network/Ethereum/Api/Eth.hs +++ b/src/Network/Ethereum/Api/Eth.hs @@ -21,212 +21,212 @@ import Data.Text (Text) import Network.Ethereum.Api.Types (Block, Call, Change, DefaultBlock, Filter, Quantity, SyncingState, Transaction, TxReceipt) -import Network.JsonRpc.TinyClient (JsonRpcM, remote) +import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Returns the current ethereum protocol version. -protocolVersion :: JsonRpcM m => m Text +protocolVersion :: JsonRpc m => m Text {-# INLINE protocolVersion #-} protocolVersion = remote "eth_protocolVersion" -- | Returns an object with data about the sync status or false. -syncing :: JsonRpcM m => m SyncingState +syncing :: JsonRpc m => m SyncingState {-# INLINE syncing #-} syncing = remote "eth_syncing" -- | Returns the client coinbase address. -coinbase :: JsonRpcM m => m Address +coinbase :: JsonRpc m => m Address {-# INLINE coinbase #-} coinbase = remote "eth_coinbase" -- | Returns true if client is actively mining new blocks. -mining :: JsonRpcM m => m Bool +mining :: JsonRpc m => m Bool {-# INLINE mining #-} mining = remote "eth_mining" -- | Returns the number of hashes per second that the node is mining with. -hashrate :: JsonRpcM m => m Quantity +hashrate :: JsonRpc m => m Quantity {-# INLINE hashrate #-} hashrate = remote "eth_hashrate" -- | Returns the value from a storage position at a given address. -getStorageAt :: JsonRpcM m => Address -> Quantity -> DefaultBlock -> m HexString +getStorageAt :: JsonRpc m => Address -> Quantity -> DefaultBlock -> m HexString {-# INLINE getStorageAt #-} getStorageAt = remote "eth_getStorageAt" -- | Returns the number of transactions sent from an address. -getTransactionCount :: JsonRpcM m => Address -> DefaultBlock -> m Quantity +getTransactionCount :: JsonRpc m => Address -> DefaultBlock -> m Quantity {-# INLINE getTransactionCount #-} getTransactionCount = remote "eth_getTransactionCount" -- | Returns the number of transactions in a block from a block matching the given block hash. -getBlockTransactionCountByHash :: JsonRpcM m => HexString -> m Quantity +getBlockTransactionCountByHash :: JsonRpc m => HexString -> m Quantity {-# INLINE getBlockTransactionCountByHash #-} getBlockTransactionCountByHash = remote "eth_getBlockTransactionCountByHash" -- | Returns the number of transactions in a block matching the -- given block number. -getBlockTransactionCountByNumber :: JsonRpcM m => Quantity -> m Quantity +getBlockTransactionCountByNumber :: JsonRpc m => Quantity -> m Quantity {-# INLINE getBlockTransactionCountByNumber #-} getBlockTransactionCountByNumber = remote "eth_getBlockTransactionCountByNumber" -- | Returns the number of uncles in a block from a block matching the given -- block hash. -getUncleCountByBlockHash :: JsonRpcM m => HexString -> m Quantity +getUncleCountByBlockHash :: JsonRpc m => HexString -> m Quantity {-# INLINE getUncleCountByBlockHash #-} getUncleCountByBlockHash = remote "eth_getUncleCountByBlockHash" -- | Returns the number of uncles in a block from a block matching the given -- block number. -getUncleCountByBlockNumber :: JsonRpcM m => Quantity -> m Quantity +getUncleCountByBlockNumber :: JsonRpc m => Quantity -> m Quantity {-# INLINE getUncleCountByBlockNumber #-} getUncleCountByBlockNumber = remote "eth_getUncleCountByBlockNumber" -- | Returns code at a given address. -getCode :: JsonRpcM m => Address -> DefaultBlock -> m HexString +getCode :: JsonRpc m => Address -> DefaultBlock -> m HexString {-# INLINE getCode #-} getCode = remote "eth_getCode" -- | Returns an Ethereum specific signature with: -- sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))). -sign :: JsonRpcM m => Address -> HexString -> m HexString +sign :: JsonRpc m => Address -> HexString -> m HexString {-# INLINE sign #-} sign = remote "eth_sign" -- | Creates new message call transaction or a contract creation, -- if the data field contains code. -sendTransaction :: JsonRpcM m => Call -> m HexString +sendTransaction :: JsonRpc m => Call -> m HexString {-# INLINE sendTransaction #-} sendTransaction = remote "eth_sendTransaction" -- | Creates new message call transaction or a contract creation for signed -- transactions. -sendRawTransaction :: JsonRpcM m => HexString -> m HexString +sendRawTransaction :: JsonRpc m => HexString -> m HexString {-# INLINE sendRawTransaction #-} sendRawTransaction = remote "eth_sendRawTransaction" -- | Returns the balance of the account of given address. -getBalance :: JsonRpcM m => Address -> DefaultBlock -> m Quantity +getBalance :: JsonRpc m => Address -> DefaultBlock -> m Quantity {-# INLINE getBalance #-} getBalance = remote "eth_getBalance" -- | Creates a filter object, based on filter options, to notify when the -- state changes (logs). To check if the state has changed, call -- 'getFilterChanges'. -newFilter :: JsonRpcM m => Filter e -> m Quantity +newFilter :: JsonRpc m => Filter e -> m Quantity {-# INLINE newFilter #-} newFilter = remote "eth_newFilter" -- | Polling method for a filter, which returns an array of logs which -- occurred since last poll. -getFilterChanges :: JsonRpcM m => Quantity -> m [Change] +getFilterChanges :: JsonRpc m => Quantity -> m [Change] {-# INLINE getFilterChanges #-} getFilterChanges = remote "eth_getFilterChanges" -- | Uninstalls a filter with given id. -- Should always be called when watch is no longer needed. -uninstallFilter :: JsonRpcM m => Quantity -> m Bool +uninstallFilter :: JsonRpc m => Quantity -> m Bool {-# INLINE uninstallFilter #-} uninstallFilter = remote "eth_uninstallFilter" -- | Returns an array of all logs matching a given filter object. -getLogs :: JsonRpcM m => Filter e -> m [Change] +getLogs :: JsonRpc m => Filter e -> m [Change] {-# INLINE getLogs #-} getLogs = remote "eth_getLogs" -- | Executes a new message call immediately without creating a -- transaction on the block chain. -call :: JsonRpcM m => Call -> DefaultBlock -> m HexString +call :: JsonRpc m => Call -> DefaultBlock -> m HexString {-# INLINE call #-} call = remote "eth_call" -- | Makes a call or transaction, which won't be added to the blockchain and -- returns the used gas, which can be used for estimating the used gas. -estimateGas :: JsonRpcM m => Call -> m Quantity +estimateGas :: JsonRpc m => Call -> m Quantity {-# INLINE estimateGas #-} estimateGas = remote "eth_estimateGas" -- | Returns information about a block by hash. -getBlockByHash :: JsonRpcM m => HexString -> m Block +getBlockByHash :: JsonRpc m => HexString -> m Block {-# INLINE getBlockByHash #-} getBlockByHash = flip (remote "eth_getBlockByHash") True -- | Returns information about a block by block number. -getBlockByNumber :: JsonRpcM m => Quantity -> m Block +getBlockByNumber :: JsonRpc m => Quantity -> m Block {-# INLINE getBlockByNumber #-} getBlockByNumber = flip (remote "eth_getBlockByNumber") True -- | Returns the information about a transaction requested by transaction hash. -getTransactionByHash :: JsonRpcM m => HexString -> m (Maybe Transaction) +getTransactionByHash :: JsonRpc m => HexString -> m (Maybe Transaction) {-# INLINE getTransactionByHash #-} getTransactionByHash = remote "eth_getTransactionByHash" -- | Returns information about a transaction by block hash and transaction index position. -getTransactionByBlockHashAndIndex :: JsonRpcM m => HexString -> Quantity -> m (Maybe Transaction) +getTransactionByBlockHashAndIndex :: JsonRpc m => HexString -> Quantity -> m (Maybe Transaction) {-# INLINE getTransactionByBlockHashAndIndex #-} getTransactionByBlockHashAndIndex = remote "eth_getTransactionByBlockHashAndIndex" -- | Returns information about a transaction by block number and transaction -- index position. -getTransactionByBlockNumberAndIndex :: JsonRpcM m => DefaultBlock -> Quantity -> m (Maybe Transaction) +getTransactionByBlockNumberAndIndex :: JsonRpc m => DefaultBlock -> Quantity -> m (Maybe Transaction) {-# INLINE getTransactionByBlockNumberAndIndex #-} getTransactionByBlockNumberAndIndex = remote "eth_getTransactionByBlockNumberAndIndex" -- | Returns the receipt of a transaction by transaction hash. -getTransactionReceipt :: JsonRpcM m => HexString -> m (Maybe TxReceipt) +getTransactionReceipt :: JsonRpc m => HexString -> m (Maybe TxReceipt) {-# INLINE getTransactionReceipt #-} getTransactionReceipt = remote "eth_getTransactionReceipt" -- | Returns a list of addresses owned by client. -accounts :: JsonRpcM m => m [Address] +accounts :: JsonRpc m => m [Address] {-# INLINE accounts #-} accounts = remote "eth_accounts" -- | Creates a filter in the node, to notify when a new block arrives. -newBlockFilter :: JsonRpcM m => m Quantity +newBlockFilter :: JsonRpc m => m Quantity {-# INLINE newBlockFilter #-} newBlockFilter = remote "eth_newBlockFilter" -- | Polling method for a block filter, which returns an array of block hashes -- occurred since last poll. -getBlockFilterChanges :: JsonRpcM m => Quantity -> m [HexString] +getBlockFilterChanges :: JsonRpc m => Quantity -> m [HexString] {-# INLINE getBlockFilterChanges #-} getBlockFilterChanges = remote "eth_getFilterChanges" -- | Returns the number of most recent block. -blockNumber :: JsonRpcM m => m Quantity +blockNumber :: JsonRpc m => m Quantity {-# INLINE blockNumber #-} blockNumber = remote "eth_blockNumber" -- | Returns the current price per gas in wei. -gasPrice :: JsonRpcM m => m Quantity +gasPrice :: JsonRpc m => m Quantity {-# INLINE gasPrice #-} gasPrice = remote "eth_gasPrice" -- | Returns information about a uncle of a block by hash and uncle index -- position. -getUncleByBlockHashAndIndex :: JsonRpcM m => HexString -> Quantity -> m Block +getUncleByBlockHashAndIndex :: JsonRpc m => HexString -> Quantity -> m Block {-# INLINE getUncleByBlockHashAndIndex #-} getUncleByBlockHashAndIndex = remote "eth_getUncleByBlockHashAndIndex" -- | Returns information about a uncle of a block by number and uncle index -- position. -getUncleByBlockNumberAndIndex :: JsonRpcM m => DefaultBlock -> Quantity -> m Block +getUncleByBlockNumberAndIndex :: JsonRpc m => DefaultBlock -> Quantity -> m Block {-# INLINE getUncleByBlockNumberAndIndex #-} getUncleByBlockNumberAndIndex = remote "eth_getUncleByBlockNumberAndIndex" -- | Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call getFilterChanges. Returns a FilterId. -newPendingTransactionFilter :: JsonRpcM m => m Quantity +newPendingTransactionFilter :: JsonRpc m => m Quantity {-# INLINE newPendingTransactionFilter #-} newPendingTransactionFilter = remote "eth_newPendingTransactionFilter" -- | Returns an array of all logs matching filter with given id. -getFilterLogs :: JsonRpcM m => Quantity -> m [Change] +getFilterLogs :: JsonRpc m => Quantity -> m [Change] {-# INLINE getFilterLogs #-} getFilterLogs = remote "eth_getFilterLogs" -- | Returns the hash of the current block, the seedHash, and the boundary -- condition to be met ("target"). -getWork :: JsonRpcM m => m [HexString] +getWork :: JsonRpc m => m [HexString] {-# INLINE getWork #-} getWork = remote "eth_getWork" @@ -235,7 +235,7 @@ getWork = remote "eth_getWork" -- 1. DATA, 8 Bytes - The nonce found (64 bits) -- 2. DATA, 32 Bytes - The header's pow-hash (256 bits) -- 3. DATA, 32 Bytes - The mix digest (256 bits) -submitWork :: JsonRpcM m => HexString -> HexString -> HexString -> m Bool +submitWork :: JsonRpc m => HexString -> HexString -> HexString -> m Bool {-# INLINE submitWork #-} submitWork = remote "eth_submitWork" @@ -243,6 +243,6 @@ submitWork = remote "eth_submitWork" -- Parameters: -- 1. Hashrate, a hexadecimal string representation (32 bytes) of the hash rate -- 2. ID, String - A random hexadecimal(32 bytes) ID identifying the client -submitHashrate :: JsonRpcM m => HexString -> HexString -> m Bool +submitHashrate :: JsonRpc m => HexString -> HexString -> m Bool {-# INLINE submitHashrate #-} submitHashrate = remote "eth_submitHashrate" diff --git a/src/Network/Ethereum/Api/Net.hs b/src/Network/Ethereum/Api/Net.hs index 83e1066f..4383e6f0 100644 --- a/src/Network/Ethereum/Api/Net.hs +++ b/src/Network/Ethereum/Api/Net.hs @@ -17,19 +17,19 @@ module Network.Ethereum.Api.Net where import Data.Text (Text) import Network.Ethereum.Api.Types (Quantity) -import Network.JsonRpc.TinyClient (JsonRpcM, remote) +import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Returns the current network id. -version :: JsonRpcM m => m Text +version :: JsonRpc m => m Text {-# INLINE version #-} version = remote "net_version" -- | Returns true if client is actively listening for network connections. -listening :: JsonRpcM m => m Bool +listening :: JsonRpc m => m Bool {-# INLINE listening #-} listening = remote "net_listening" -- | Returns number of peers currently connected to the client. -peerCount :: JsonRpcM m => m Quantity +peerCount :: JsonRpc m => m Quantity {-# INLINE peerCount #-} peerCount = remote "net_peerCount" diff --git a/src/Network/Ethereum/Api/Personal.hs b/src/Network/Ethereum/Api/Personal.hs index 8e732c54..34ef3f3a 100644 --- a/src/Network/Ethereum/Api/Personal.hs +++ b/src/Network/Ethereum/Api/Personal.hs @@ -19,7 +19,7 @@ import Data.HexString (HexString) import Data.Solidity.Prim.Address (Address) import Data.Text (Text) import Network.Ethereum.Api.Types (Call) -import Network.JsonRpc.TinyClient (JsonRpcM, remote) +import Network.JsonRpc.TinyClient (JsonRpc (..)) type Passphrase = Text @@ -32,23 +32,23 @@ type Passphrase = Text -- 2. passphrase -- -- Returns: address of new account -importRawKey :: JsonRpcM m => HexString -> Passphrase -> m Address +importRawKey :: JsonRpc m => HexString -> Passphrase -> m Address {-# INLINE importRawKey #-} importRawKey = remote "personal_importRawKey" -- | Returns all the Ethereum account addresses of all keys in the key store. -listAccounts :: JsonRpcM m => m [Address] +listAccounts :: JsonRpc m => m [Address] {-# INLINE listAccounts #-} listAccounts = remote "personal_listAccounts" -- | Removes the private key with given address from memory. The account can no longer be used to send transactions. -lockAccount :: JsonRpcM m => Address -> m Bool +lockAccount :: JsonRpc m => Address -> m Bool {-# INLINE lockAccount #-} lockAccount = remote "personal_lockAccount" -- | Generates a new private key and stores it in the key store directory. The key file is encrypted with the given -- passphrase. Returns the address of the new account. -newAccount :: JsonRpcM m => Passphrase -> m Address +newAccount :: JsonRpc m => Passphrase -> m Address {-# INLINE newAccount #-} newAccount = remote "personal_newAccount" @@ -57,7 +57,7 @@ newAccount = remote "personal_newAccount" -- The unencrypted key will be held in memory until it is locked again -- -- The account can be used with eth_sign and eth_sendTransaction while it is unlocked. -unlockAccount :: JsonRpcM m => Address -> Passphrase -> m Bool +unlockAccount :: JsonRpc m => Address -> Passphrase -> m Bool {-# INLINE unlockAccount #-} unlockAccount = remote "personal_unlockAccount" @@ -66,7 +66,7 @@ unlockAccount = remote "personal_unlockAccount" -- The transaction is the same argument as for eth_sendTransaction and contains the from address. If the passphrase can -- be used to decrypt the private key belonging to the transaction 'callFrom', the transaction is verified, signed and -- send onto the network. The account is not unlocked globally in the node and cannot be used in other RPC calls. -sendTransaction :: JsonRpcM m => Call -> Passphrase -> m HexString +sendTransaction :: JsonRpc m => Call -> Passphrase -> m HexString {-# INLINE sendTransaction #-} sendTransaction = remote "personal_sendTransaction" @@ -75,7 +75,7 @@ sendTransaction = remote "personal_sendTransaction" -- sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))). -- -- when given a passphrase to decrypt the account's private key -sign :: JsonRpcM m => HexString -> Address -> Passphrase -> m HexString +sign :: JsonRpc m => HexString -> Address -> Passphrase -> m HexString {-# INLINE sign #-} sign = remote "personal_sign" @@ -88,6 +88,6 @@ sign = remote "personal_sign" -- 2. signature: DATA, 65 bytes -- -- Returns: Address -ecRecover :: JsonRpcM m => HexString -> HexString -> m Address +ecRecover :: JsonRpc m => HexString -> HexString -> m Address {-# INLINE ecRecover #-} ecRecover = remote "personal_ecRecover" diff --git a/src/Network/Ethereum/Api/Provider.hs b/src/Network/Ethereum/Api/Provider.hs index a7a2f63c..988ec562 100644 --- a/src/Network/Ethereum/Api/Provider.hs +++ b/src/Network/Ethereum/Api/Provider.hs @@ -28,17 +28,14 @@ import GHC.Generics (Generic) import Lens.Micro.Mtl ((.=)) import Network.HTTP.Client (Manager) -import Network.JsonRpc.TinyClient (JsonRpcClient, defaultSettings, - jsonRpcManager) +import Network.JsonRpc.TinyClient (JsonRpc, JsonRpcClient, + defaultSettings, jsonRpcManager) -- | Any communication with Ethereum node wrapped with 'Web3' monad newtype Web3 a = Web3 { unWeb3 :: StateT JsonRpcClient IO a } - deriving (Functor, Applicative, Monad, MonadIO, MonadThrow) + deriving (Functor, Applicative, Monad, MonadIO, MonadThrow, MonadState JsonRpcClient) -instance MonadState JsonRpcClient Web3 where - get = Web3 get - put = Web3 . put - state = Web3 . state +instance JsonRpc Web3 -- | Some peace of error response data Web3Error diff --git a/src/Network/Ethereum/Api/Web3.hs b/src/Network/Ethereum/Api/Web3.hs index fcc06cd4..74f3634e 100644 --- a/src/Network/Ethereum/Api/Web3.hs +++ b/src/Network/Ethereum/Api/Web3.hs @@ -17,14 +17,14 @@ module Network.Ethereum.Api.Web3 where import Data.HexString (HexString) import Data.Text (Text) -import Network.JsonRpc.TinyClient (JsonRpcM, remote) +import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Returns current node version string. -clientVersion :: JsonRpcM m => m Text +clientVersion :: JsonRpc m => m Text {-# INLINE clientVersion #-} clientVersion = remote "web3_clientVersion" -- | Returns Keccak-256 (not the standardized SHA3-256) of the given data. -sha3 :: JsonRpcM m => HexString -> m HexString +sha3 :: JsonRpc m => HexString -> m HexString {-# INLINE sha3 #-} sha3 = remote "web3_sha3" diff --git a/src/Network/Ethereum/Contract.hs b/src/Network/Ethereum/Contract.hs index 1457a42b..17eeb3a5 100644 --- a/src/Network/Ethereum/Contract.hs +++ b/src/Network/Ethereum/Contract.hs @@ -31,7 +31,7 @@ import Network.Ethereum.Account.Class (Account) import Network.Ethereum.Account.Safe (safeConfirmations, safeSend) import Network.Ethereum.Api.Types (receiptContractAddress) import Network.Ethereum.Contract.Method (Method) -import Network.JsonRpc.TinyClient (JsonRpcM) +import Network.JsonRpc.TinyClient (JsonRpc) -- | Contract description type clase class Contract a where @@ -43,7 +43,7 @@ class Contract a where bytecode :: Proxy a -> HexString -- | Create new smart contract on blockchain -new :: (Account p t, JsonRpcM m, Method a, Monad (t m)) +new :: (Account p t, JsonRpc m, Method a, Monad (t m)) => a -- ^ Contract constructor -> t m (Maybe Address) diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 782385d3..caf46212 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -80,7 +80,7 @@ import Network.Ethereum.Api.Types (DefaultBlock (..), Filter (..), TxReceipt) import qualified Network.Ethereum.Contract as Contract (Contract (..)) import Network.Ethereum.Contract.Method (Method (..)) -import Network.JsonRpc.TinyClient (JsonRpcM) +import Network.JsonRpc.TinyClient (JsonRpc) -- | Read contract Abi from file abiFrom :: QuasiQuoter @@ -168,7 +168,7 @@ funWrapper c name dname args result = do sequence [ sigD name $ [t| - (JsonRpcM $m, Account $a $t, Functor ($t $m)) => + (JsonRpc $m, Account $a $t, Functor ($t $m)) => $(arrowing $ inputT ++ [if c then outputT else [t|$t $m TxReceipt|]]) |] , if c diff --git a/src/Network/Ethereum/Ens.hs b/src/Network/Ethereum/Ens.hs index c621da3d..3ac075b1 100644 --- a/src/Network/Ethereum/Ens.hs +++ b/src/Network/Ethereum/Ens.hs @@ -31,7 +31,7 @@ import Network.Ethereum.Account.Class (Account) import Network.Ethereum.Account.Internal (AccountT, to, withParam) import qualified Network.Ethereum.Ens.PublicResolver as Resolver import qualified Network.Ethereum.Ens.Registry as Reg -import Network.JsonRpc.TinyClient (JsonRpcM) +import Network.JsonRpc.TinyClient (JsonRpc) -- | Namehash algorithm -- http://docs.ens.domains/en/latest/implementers.html#algorithm @@ -47,7 +47,7 @@ namehash = sha3 bs = convert (hash bs :: Digest Keccak_256) -- | Get address of ENS domain -resolve :: (JsonRpcM m, Account p (AccountT p)) +resolve :: (JsonRpc m, Account p (AccountT p)) => ByteString -- ^ Domain name -> AccountT p m Address diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index 7bd1622b..575431db 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -31,7 +31,9 @@ -- @ -- newtype MyMonad a = ... -- --- foo :: Int -> Bool -> Mymonad Text +-- instance JsonRpc MyMonad +-- +-- foo :: Mymonad Text -- foo = remote "foo" -- @ -- @@ -40,15 +42,16 @@ -- Example: -- -- @ --- myMethod :: JsonRpcM m => Int -> Bool -> m String +-- myMethod :: JsonRpc m => Int -> Bool -> m String -- myMethod = remote "myMethod" -- @ -- module Network.JsonRpc.TinyClient ( - -- * The JSON-RPC interaction monad - JsonRpcM + -- * The JSON-RPC remote call monad + JsonRpc(..) + , MethodName -- * JSON-RPC client settings , JsonRpcClient @@ -59,17 +62,13 @@ module Network.JsonRpc.TinyClient -- * Error handling , JsonRpcException(..) , RpcError(..) - - -- * Remote method call - , remote - , MethodName ) where import Control.Applicative ((<|>)) import Control.Exception (Exception) import Control.Monad ((<=<)) -import Control.Monad.Catch (MonadThrow, throwM) -import Control.Monad.IO.Class (MonadIO, liftIO) +import Control.Monad.Catch (MonadThrow (..)) +import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.State (MonadState) import Crypto.Number.Generate (generateMax) import Data.Aeson (FromJSON (..), ToJSON (..), @@ -90,25 +89,20 @@ import Network.HTTP.Client.TLS (tlsManagerSettings) import Network.HTTP.Client (defaultManagerSettings) #endif --- | Name of called method. -type MethodName = Text - --- | Remote call monad constrait +-- | JSON-RPC monad constrait. type JsonRpcM m = (MonadIO m, MonadThrow m, MonadState JsonRpcClient m) --- | JSON-RPC client state vars +-- | JSON-RPC client state vars. data JsonRpcClient = JsonRpcClient - { _jsonRpcManager :: Manager - -- ^ HTTP connection manager - , _jsonRpcServer :: String - -- ^ Remote server URI - } + { _jsonRpcManager :: Manager -- ^ HTTP connection manager. + , _jsonRpcServer :: String -- ^ Remote server URI. + } $(makeLenses ''JsonRpcClient) +-- | Create default 'JsonRpcClient' settings. defaultSettings :: MonadIO m - => String - -- ^ JSON-RPC server URI + => String -- ^ JSON-RPC server URI -> m JsonRpcClient defaultSettings srv = liftIO $ JsonRpcClient #ifdef TLS_MANAGER @@ -122,20 +116,23 @@ instance Show JsonRpcClient where show JsonRpcClient{..} = "JsonRpcClient<" ++ _jsonRpcServer ++ ">" -- | JSON-RPC request. -data Request = Request { rqMethod :: !Text - , rqId :: !Int - , rqParams :: !Value } +data Request = Request + { rqMethod :: !Text + , rqId :: !Int + , rqParams :: !Value + } deriving (Eq, Show) instance ToJSON Request where toJSON rq = object [ "jsonrpc" .= String "2.0" , "method" .= rqMethod rq , "params" .= rqParams rq - , "id" .= rqId rq ] + , "id" .= rqId rq + ] -- | JSON-RPC response. data Response = Response - { rsResult :: !(Either RpcError Value) - } deriving (Eq, Show) + { rsResult :: !(Either RpcError Value) + } deriving (Eq, Show) instance FromJSON Response where parseJSON = @@ -145,10 +142,10 @@ instance FromJSON Response where -- | JSON-RPC error message data RpcError = RpcError - { errCode :: !Int - , errMessage :: !Text - , errData :: !(Maybe Value) - } deriving Eq + { errCode :: !Int + , errMessage :: !Text + , errData :: !(Maybe Value) + } deriving Eq instance Show RpcError where show (RpcError code msg dat) = @@ -164,7 +161,7 @@ instance FromJSON RpcError where data JsonRpcException = ParsingException String | CallException RpcError - deriving (Eq, Show) + deriving (Show, Eq) instance Exception JsonRpcException @@ -177,9 +174,15 @@ instance (ToJSON a, Remote m b) => Remote m (a -> b) where instance {-# INCOHERENT #-} (JsonRpcM m, FromJSON b) => Remote m (m b) where remote' f = decodeResponse =<< f [] --- | Remote call of JSON-RPC method. -remote :: Remote m a => MethodName -> a -remote = remote' . call +-- | Name of called method. +type MethodName = Text + +-- | JSON-RPC call monad. +class JsonRpcM m => JsonRpc m where + -- | Remote call of JSON-RPC method. + remote :: Remote m a => MethodName -> a + {-# INLINE remote #-} + remote = remote' . call call :: JsonRpcM m => MethodName diff --git a/test/Network/Ethereum/Web3/Test/ERC20Spec.hs b/test/Network/Ethereum/Web3/Test/ERC20Spec.hs index c208a810..d1da2f94 100644 --- a/test/Network/Ethereum/Web3/Test/ERC20Spec.hs +++ b/test/Network/Ethereum/Web3/Test/ERC20Spec.hs @@ -11,7 +11,7 @@ import Test.Hspec import Network.Ethereum.Contract.TH (abiFrom) import Network.Ethereum.Web3 (Account, UIntN) -import Network.JsonRpc.TinyClient (JsonRpcM) +import Network.JsonRpc.TinyClient (JsonRpc) [abiFrom|examples/token/ERC20.json|] @@ -19,6 +19,6 @@ import Network.JsonRpc.TinyClient (JsonRpcM) spec :: Spec spec = return () -getBalance :: (JsonRpcM m, Account p t, Functor (t m)) +getBalance :: (JsonRpc m, Account p t, Functor (t m)) => t m (UIntN 256) getBalance = balanceOf "0x1234567890123456789011234567890234567890" From ce366e18fb71d525a74dc7bbd9d0dcf43ffbff33 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 19 Oct 2018 19:19:49 +0300 Subject: [PATCH 025/237] Added user documentation skeleton --- .gitignore | 1 - README.md | 73 ++++++++------------- docs/Makefile | 19 ++++++ docs/conf.py | 127 +++++++++++++++++++++++++++++++++++++ docs/contributing.rst | 20 ++++++ docs/ethereum_node_api.rst | 2 + docs/getting_started.rst | 43 +++++++++++++ docs/index.rst | 18 ++++++ docs/smart_contracts.rst | 21 ++++++ docs/testing.rst | 12 ++++ package.yaml | 10 ++- 11 files changed, 296 insertions(+), 50 deletions(-) create mode 100644 docs/Makefile create mode 100644 docs/conf.py create mode 100644 docs/contributing.rst create mode 100644 docs/ethereum_node_api.rst create mode 100644 docs/getting_started.rst create mode 100644 docs/index.rst create mode 100644 docs/smart_contracts.rst create mode 100644 docs/testing.rst diff --git a/.gitignore b/.gitignore index c67b087d..fedb4e0e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .stack-work *.swp -.detected-contract-addresses .DS_Store build/ dist/ diff --git a/README.md b/README.md index a8cea1e8..e828644f 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,48 @@ -## Ethereum Haskell API +Ethereum API for Haskell +======================== -This is the Ethereum compatible Haskell API which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC) spec. +The Haskell Ethereum API which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC). -[![Build Status](https://travis-ci.org/f-o-a-m/hs-web3.svg?branch=master)](https://travis-ci.org/f-o-a-m/hs-web3) +[![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) +[![Build Status](https://travis-ci.org/airalab/hs-web3.svg?branch=master)](https://travis-ci.org/airalab/hs-web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) ![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg) ![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg) [![Code Triagers Badge](https://www.codetriage.com/airalab/hs-web3/badges/users.svg)](https://www.codetriage.com/airalab/hs-web3) -### Installation +Installation +------------ - $ git clone https://github.com/airalab/hs-web3 && cd hs-web3 - $ stack setup - $ stack ghci +Using [Stackage](https://docs.haskellstack.org): -> This library runs only paired with [geth](https://github.com/ethereum/go-ethereum) -> or [parity](https://github.com/ethcore/parity) Ethereum node, -> please start node first before using the library. + stack install web3 -### Web3 monad +Quick start +----------- -Any Ethereum node communication wrapped with `Web3` monadic type. - - > import Network.Ethereum.Web3.Web3 - > :t clientVersion - clientVersion :: Web3 Text - -To run this computation used `runWeb3'` or `runWeb3` functions. +Lets import library entrypoint modules using `ghci`: > import Network.Ethereum.Web3 - > runWeb3 clientVersion - Right "Parity//v1.4.5-beta-a028d04-20161126/x86_64-linux-gnu/rustc1.13.0" + > import qualified Network.Ethereum.Api.Web3 as Web3 -Function `runWeb3` use default `Web3` provider at `localhost:8545`. +> We recomends to import `Network.Ethereun.Api.Web3` as **qualified**, because it has name similar to their prefix in JSON-RPC API. - > :t runWeb3 - runWeb3 - :: MonadIO m => Web3 a -> m (Either Web3Error a) +Looks anything in `Web3` API: -### TemplateHaskell generator + > :t Web3.clientVersion + Web3.clientVersion :: JsonRpc m => m Text -[Quasiquotation](https://wiki.haskell.org/Quasiquotation) is used to parse contract ABI or load from JSON file. [TemplateHaskell](https://wiki.haskell.org/Template_Haskell) driven Haskell contract API generator can automatical create ABI encoding instances and contract method helpers. +To run it use `Web3` provider monad: - > :set -XQuasiQuotes - > import Network.Ethereum.Contract.TH - > putStr [abiFrom|data/sample.json|] - Contract: - Events: - Action1(address,uint256) - Action2(string,uint256) - Methods: - 0x03de48b3 runA1() - 0x90126c7a runA2(string,uint256) - -Use `-ddump-splices` to see generated code during compilation or in GHCi. See `examples` folder for more use cases. + > :t runWeb3 + runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a) -### Testing + > runWeb3 Web3.clientVersion + Right "Parity-Ethereum//v2.0.3-unstable/x86_64-linux-gnu/rustc1.29.0" -Testing the `web3` is split up into two suites: `unit` and `live`. -The `unit` suite tests internal library facilities, while the `live` tests that -the library adequately interacts with a Web3 provider. +> Function `runWeb3` use default provider at `http://localhost:8545`, for using custom providers try `runweb3'`. -One may simply run `stack test` to run both suites, or `stack test web3:unit` or `stack test web3:live` -to run the test suites individually. +--- -The `unit` suite has no external dependencies, while the `live` suite requires some npm dependencies. There is a `Makefile` in the `test-support` directory to help. +See [documentation](https://hs-web3.readthedocs.io) for other examples. -The `live` suite also requires a Web3 provider with Ethereum capabilities, as well as -an unlocked account with ether to send transactions from. It uses Chanterelle to deploy testing contracts, -generating ABIs for them in the process, then using said ABIs as part of a TemplateHaskell step in the suite. diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..298ea9e2 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,19 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..76017035 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# +# Configuration file for the Sphinx documentation builder. +# +# This file does only contain a selection of the most common options. For a +# full list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'hs-web3' +copyright = 'Alexander Krupenkin 2018-2016' +author = 'Alexander Krupenkin' + +# The short X.Y version +version = '0.8' +# The full version, including alpha/beta/rc tags +release = '0.8-rc1' + + +# -- General configuration --------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = None + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# The default sidebars (for documents that don't match any pattern) are +# defined by theme itself. Builtin themes are using these templates by +# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', +# 'searchbox.html']``. +# +# html_sidebars = {} + + +# -- Options for HTMLHelp output --------------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = 'hs-web3-doc' + +# -- Options for manual page output ------------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'hs-web3', 'Haskell Web3 Documentation', [author], 1) +] + +# -- Options for Epub output ------------------------------------------------- + +# Bibliographic Dublin Core info. +epub_title = project + +# The unique identifier of the text. This can be a ISBN number +# or the project homepage. +# +# epub_identifier = '' + +# A unique identification for the text. +# +# epub_uid = '' + +# A list of files that should not be packed into the epub file. +epub_exclude_files = ['search.html'] diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 00000000..b31b2f72 --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1,20 @@ +Contributing +============ + +Did you find a bug? +~~~~~~~~~~~~~~~~~~~ + +* **Ensure the bug was not already reported** by searching on GitHub under `Issues `_. + +* If you're unable to find an open issue addressing the problem, `open a new one `_. Be sure to include a **title and clear description**, as much relevant information as possible. + +Also you can open an issue if you have a proposal for an improvements. + +Did you write a patch that fixes a bug? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* Open a new GitHub pull request with the patch. + +* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable. + +Thanks! diff --git a/docs/ethereum_node_api.rst b/docs/ethereum_node_api.rst new file mode 100644 index 00000000..b7e76bc0 --- /dev/null +++ b/docs/ethereum_node_api.rst @@ -0,0 +1,2 @@ +Ethereum node interaction +========================= diff --git a/docs/getting_started.rst b/docs/getting_started.rst new file mode 100644 index 00000000..6199ed2a --- /dev/null +++ b/docs/getting_started.rst @@ -0,0 +1,43 @@ +Getting started +=============== + +Installation +~~~~~~~~~~~~ + +Using `Stackage `_ + + stack install web3 + +Quick start +~~~~~~~~~~~ + +Lets import library entrypoint modules using `ghci`: + +.. code-block:: haskell + + > import Network.Ethereum.Web3 + > import qualified Network.Ethereum.Api.Web3 as Web3 + +.. note:: + + We recomends to import `Network.Ethereun.Api.Web3` as **qualified**, because it has name similar to their prefix in JSON-RPC API. + +Looks anything in `Web3` API: + +.. code-block:: haskell + + > :t Web3.clientVersion + Web3.clientVersion :: JsonRpc m => m Text + +To run it use `Web3` provider monad: + +.. code-block:: haskell + + > :t runWeb3 + runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a) + + > runWeb3 Web3.clientVersion + Right "Parity-Ethereum//v2.0.3-unstable/x86_64-linux-gnu/rustc1.29.0" + +.. note:: + Function ``runWeb3`` use default provider at **http://localhost:8545**, for using custom providers try ``runWeb3'``. diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..d65a536f --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,18 @@ +Haskell Web3 Documentation +========================== + +The Haskell Ethereum API which implements the `Generic JSON RPC `_. + +.. toctree:: + :caption: User documentation + + getting_started + ethereum_node_api + smart_contracts + +.. toctree:: + :caption: Developer documentation + + contributing + testing + diff --git a/docs/smart_contracts.rst b/docs/smart_contracts.rst new file mode 100644 index 00000000..f8826014 --- /dev/null +++ b/docs/smart_contracts.rst @@ -0,0 +1,21 @@ +Smart contracts +=============== + +`Quasiquotation `_ is used to parse contract ABI or load from JSON file. `TemplateHaskell `_ driven Haskell contract API generator can automatical create ABI encoding instances and contract method helpers. + +.. code-block:: haskell + + > :set -XQuasiQuotes + > import Network.Ethereum.Contract.TH + > putStr [abiFrom|data/sample.json|] + Contract: + Events: + Action1(address,uint256) + Action2(string,uint256) + Methods: + 0x03de48b3 runA1() + 0x90126c7a runA2(string,uint256) + +.. note:: + + Use ``-ddump-splices`` to see generated code during compilation or in GHCi. See `examples `_ for more use cases. diff --git a/docs/testing.rst b/docs/testing.rst new file mode 100644 index 00000000..7d24687d --- /dev/null +++ b/docs/testing.rst @@ -0,0 +1,12 @@ +Testing +======= + +Testing the **web3** is split up into two suites: **unit** and **live**. + +- The unit suite tests internal library facilities. +- The live tests that the library adequately interacts with a Web3 provider. + +One may simply run ``stack test`` to run both suites, or ``stack test web3:unit`` or ``stack test web3:live`` to run the test suites individually. + +.. note:: + The live suite also requires a Web3 provider with Ethereum capabilities, as well as an unlocked account with ether to send transactions from. diff --git a/package.yaml b/package.yaml index 9648a74f..c4d65442 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 0.7.3.0 +version: 0.8.0.0 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" @@ -20,6 +20,14 @@ extra-source-files: - test/contracts/SimpleStorage.json - test/contracts/ComplexStorage.json - test/contracts/Linearization.json +- docs/Makefile +- docs/conf.py +- docs/index.rst +- docs/testing.rst +- docs/contributing.rst +- docs/getting_started.rst +- docs/smart_contracts.rst +- docs/ethereum_node_api.rst dependencies: - base >4.9 && <4.12 From b1bf585246092900a4082f394b0f25eaeeb71bff Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 21 Oct 2018 16:59:00 +0300 Subject: [PATCH 026/237] Upgrade TravisCI build script --- .travis.yml | 209 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 162 insertions(+), 47 deletions(-) diff --git a/.travis.yml b/.travis.yml index 01db77a0..ecef43db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,57 +1,172 @@ -sudo: required -language: haskell +# Use new container infrastructure to enable caching. +sudo: false -services: -- docker +# Do not choose a language; we provide our own build tools. +language: generic + +# Caching so the next build will be fast too. +cache: + directories: + - $HOME/.ghc + - $HOME/.cabal + - $HOME/.stack + - $TRAVIS_BUILD_DIR/.stack-work + +# Install external dependencies. +addons: + apt: + packages: + - libsecp256k1-dev + +# The different configurations we want to test. We have BUILD=cabal which uses +# cabal-install, and BUILD=stack which uses Stack. More documentation on each +# of those below. +matrix: + include: + # We grab the appropriate GHC and cabal-install versions from hvr's PPA. See: + - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7 + compiler: ": #GHC 8.0.2" + addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} + - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7 + compiler: ": #GHC 8.2.2" + addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} + - env: BUILD=cabal GHCVER=8.4.3 CABALVER=2.2 HAPPYVER=1.19.5 ALEXVER=3.1.7 + compiler: ": #GHC 8.4.3" + addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} + + # The Stack builds. We can pass in arbitrary Stack arguments via the ARGS + # variable, such as using --stack-yaml to point to a different file. + - env: BUILD=stack ARGS="" + compiler: ": #stack default" + addons: {apt: {packages: [libgmp-dev]}} + + - env: BUILD=stack ARGS="--resolver lts-9" + compiler: ": #stack 8.0.2" + addons: {apt: {packages: [libgmp-dev]}} + + - env: BUILD=stack ARGS="--resolver lts-11" + compiler: ": #stack 8.2.2" + addons: {apt: {packages: [libgmp-dev]}} + + - env: BUILD=stack ARGS="--resolver lts-12" + compiler: ": #stack 8.4.3" + addons: {apt: {packages: [libgmp-dev]}} + + # Nightly builds are allowed to fail + - env: BUILD=stack ARGS="--resolver nightly" + compiler: ": #stack nightly" + addons: {apt: {packages: [libgmp-dev]}} + + # Build on macOS in addition to Linux + - env: BUILD=stack ARGS="" + compiler: ": #stack default osx" + os: osx + + - env: BUILD=stack ARGS="--resolver lts-9" + compiler: ": #stack 8.0.2 osx" + os: osx + + - env: BUILD=stack ARGS="--resolver lts-11" + compiler: ": #stack 8.2.2 osx" + os: osx + + - env: BUILD=stack ARGS="--resolver lts-12" + compiler: ": #stack 8.4.3 osx" + os: osx + + - env: BUILD=stack ARGS="--resolver nightly" + compiler: ": #stack nightly osx" + os: osx before_install: -- nvm install 8.9.4 -- nvm use 8.9.4 -- npm i -g purescript@0.11.7 bower pulp -- if [ $STACK ]; then mkdir -p ~/.local/bin; export PATH=$HOME/.local/bin:$PATH; - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; - else export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH; +# Using compiler above sets CC to an invalid value, so unset it +- unset CC + +# We want to always allow newer versions of packages when building on GHC HEAD +- CABALARGS="" +- if [ "x$GHCVER" = "xhead" ]; then CABALARGS=--allow-newer; fi + +# Download and unpack the stack executable +- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:/opt/alex/$ALEXVER/bin:/opt/happy/$HAPPYVER/bin:$HOME/.cabal/bin:$PATH +- mkdir -p ~/.local/bin +- | + if [ `uname` = "Darwin" ] + then + travis_retry curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin + else + travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' fi + # Use the more reliable S3 mirror of Hackage + mkdir -p $HOME/.cabal + echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config + echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config + + install: -- $STACK || if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ]; then zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz - > $HOME/.cabal/packages/hackage.haskell.org/00-index.tar; ls -l $HOME/.cabal/packages/hackage.haskell.org/; - fi; cabal update; sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config; if [ -n "$CABALCONFIG" - ]; then cp $CABALCONFIG cabal.config; fi; if [ -n "$STACKAGESNAPSHOT" ]; then curl - --silent https://www.stackage.org/$STACKAGESNAPSHOT/cabal.config | grep -v "$(cabal - info . -v0 | head -n 1 | awk '{ print $2 }' | sed -E 's/-[0-9]+(\.[0-9]+)+//') ==" - > cabal.config; fi; cabal install --only-dependencies --enable-tests $CABALCONFOPTS --dry -v > - installplan.txt; sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt; - if diff -u $HOME/.cabsnap/installplan.txt installplan.txt; then echo "cabal build-cache - HIT"; rm -rfv .ghc; cp -av $HOME/.cabsnap/ghc $HOME/.ghc; cp -av $HOME/.cabsnap/lib - $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/; else echo "cabal build-cache - MISS"; rm -rf $HOME/.cabsnap; mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share - $HOME/.cabal/bin; cabal install --only-dependencies --enable-tests $CABALCONFOPTS; fi; if [ ! -d - $HOME/.cabsnap ]; then echo "snapshotting package-db to build-cache"; mkdir $HOME/.cabsnap; - cp -av $HOME/.ghc $HOME/.cabsnap/ghc; cp -av $HOME/.cabal/lib $HOME/.cabal/share - $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/; fi; +- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" +- if [ -f configure.ac ]; then autoreconf -i; fi +- | + set -ex + case "$BUILD" in + stack) + # Add in extra-deps for older snapshots, as necessary + # + # This is disabled by default, as relying on the solver like this can + # make builds unreliable. Instead, if you have this situation, it's + # recommended that you maintain multiple stack-lts-X.yaml files. -script: -- docker run --rm -d -p 8545:8545 foamspace/cliquebait:latest && sleep 15 -- cd test-support && make install && make compile-contracts && make deploy && cd .. -- if [ $STACK ]; then stack -j2 --no-terminal --install-ghc test --test-arguments="--skip=multiEvent"; - else cabal update && cabal install --only-dependencies --enable-tests $CABALCONFOPTS && cabal configure --enable-tests $CABALCONFOPTS -v2 && cabal build web3 $CABALBUILDOPTS && cabal test --test-option="--skip=multiEvent"; - fi + #stack --no-terminal --install-ghc $ARGS test --bench --dry-run || ( \ + # stack --no-terminal $ARGS build cabal-install && \ + # stack --no-terminal $ARGS solver --update-config) -matrix: - include: -# - env: GHCVER=8.2.2 CABALVER=2.0 -# addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}} -# - env: GHCVER=8.4.2 CABALVER=2.2 -# addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.2], sources: [hvr-ghc]}} - - env: STACK=YES + # Build the dependencies + stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies + ;; + cabal) + cabal --version + travis_retry cabal update -before_cache: - - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log - - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar + # Get the list of packages from the stack.yaml file. Note that + # this will also implicitly run hpack as necessary to generate + # the .cabal files needed by cabal-install. + PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@') -cache: - directories: - - $HOME/.stack - - $HOME/.cabsnap - - $HOME/.cabal/packages + cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES + ;; + esac + set +ex + +script: +- | + set -ex + case "$BUILD" in + stack) + stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps + ;; + cabal) + cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES + + ORIGDIR=$(pwd) + for dir in $PACKAGES + do + cd $dir + cabal check || [ "$CABALVER" == "1.16" ] + cabal sdist + PKGVER=$(cabal info . | awk '{print $2;exit}') + SRC_TGZ=$PKGVER.tar.gz + cd dist + tar zxfv "$SRC_TGZ" + cd "$PKGVER" + cabal configure --enable-tests --ghc-options -O0 + cabal build + if [ "$CABALVER" = "1.16" ] || [ "$CABALVER" = "1.18" ]; then + cabal test + else + cabal test --show-details=streaming --log=/dev/stdout + fi + cd $ORIGDIR + done + ;; + esac + set +ex From d75d133acc4c7fb3443d42218f054faafc89886e Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 21 Oct 2018 17:25:04 +0300 Subject: [PATCH 027/237] Dependencies bound fixes * Using 'secp256k1-haskell' instead of deprecated * Fix bound of all dependencies according to LTS-9 -> LTS-12 --- .travis.yml | 21 ++++++++++----------- package.yaml | 46 +++++++++++++++++++++++----------------------- stack.yaml | 2 +- 3 files changed, 34 insertions(+), 35 deletions(-) diff --git a/.travis.yml b/.travis.yml index ecef43db..75986caf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,12 +12,6 @@ cache: - $HOME/.stack - $TRAVIS_BUILD_DIR/.stack-work -# Install external dependencies. -addons: - apt: - packages: - - libsecp256k1-dev - # The different configurations we want to test. We have BUILD=cabal which uses # cabal-install, and BUILD=stack which uses Stack. More documentation on each # of those below. @@ -38,44 +32,49 @@ matrix: # variable, such as using --stack-yaml to point to a different file. - env: BUILD=stack ARGS="" compiler: ": #stack default" - addons: {apt: {packages: [libgmp-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} - env: BUILD=stack ARGS="--resolver lts-9" compiler: ": #stack 8.0.2" - addons: {apt: {packages: [libgmp-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} - env: BUILD=stack ARGS="--resolver lts-11" compiler: ": #stack 8.2.2" - addons: {apt: {packages: [libgmp-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} - env: BUILD=stack ARGS="--resolver lts-12" compiler: ": #stack 8.4.3" - addons: {apt: {packages: [libgmp-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} # Nightly builds are allowed to fail - env: BUILD=stack ARGS="--resolver nightly" compiler: ": #stack nightly" - addons: {apt: {packages: [libgmp-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} # Build on macOS in addition to Linux - env: BUILD=stack ARGS="" compiler: ": #stack default osx" + addons: {homebrew: {packages: [libsecp256k1]}} os: osx - env: BUILD=stack ARGS="--resolver lts-9" compiler: ": #stack 8.0.2 osx" + addons: {homebrew: {packages: [libsecp256k1]}} os: osx - env: BUILD=stack ARGS="--resolver lts-11" compiler: ": #stack 8.2.2 osx" + addons: {homebrew: {packages: [libsecp256k1]}} os: osx - env: BUILD=stack ARGS="--resolver lts-12" compiler: ": #stack 8.4.3 osx" + addons: {homebrew: {packages: [libsecp256k1]}} os: osx - env: BUILD=stack ARGS="--resolver nightly" compiler: ": #stack nightly osx" + addons: {homebrew: {packages: [libsecp256k1]}} os: osx before_install: diff --git a/package.yaml b/package.yaml index c4d65442..89b9d958 100644 --- a/package.yaml +++ b/package.yaml @@ -31,32 +31,32 @@ extra-source-files: dependencies: - base >4.9 && <4.12 -- template-haskell >=2.12.0.0 && <2.14 -- microlens-aeson -- microlens-mtl -- microlens-th -- microlens +- secp256k1-haskell >=0.1.3 && <0.2 +- template-haskell >=2.11.1.0 && <2.14 +- microlens-aeson >=2.2.0.2 && <2.4 +- microlens-mtl >=0.1.11.0 && <0.2 +- microlens-th >=0.4.1.1 && <0.5 +- microlens >=0.4.8.1 && <0.5 - data-default >=0.7.1.1 && <0.8 -- generics-sop >=0.3.2.0 && <0.4 +- generics-sop >=0.3.1.0 && <0.4 - transformers >=0.5.2.0 && <0.6 -- http-client >=0.5.12.1 && <0.6 -- bytestring >=0.10.8.2 && <0.11 -- cryptonite ==0.25.* -- exceptions -- secp256k1 -- basement >=0.0.7 && <0.1 +- http-client >=0.5.7.1 && <0.6 +- bytestring >=0.10.8.1 && <0.11 +- cryptonite >=0.23.0.0 && <0.26 +- exceptions >=0.8.3 && <0.11 +- basement >=0.0.4 && <0.1 - machines >=0.6.3 && <0.7 -- OneTuple -- relapse +- OneTuple >=0.2.1 && <0.3 +- relapse >=1.0.0.0 && <2.0 - tagged >=0.8.5 && <0.9 -- parsec >=3.1.13.0 && <3.2 -- memory >=0.14.16 && <0.15 -- cereal >=0.5.5.0 && <0.6 -- aeson >=1.2.4.0 && <1.5 -- vinyl >=0.8.1.0 && <0.9 +- parsec >=3.1.11.0 && <3.2 +- memory >=0.14.11 && <0.15 +- cereal >=0.5.4.0 && <0.6 +- aeson >=1.1.2.0 && <1.5 +- vinyl >=0.5.3.0 && <0.9 - async >=2.1.1.1 && <2.3 -- text >=1.2.3.0 && <1.3 -- mtl >=2.2.2 && <2.3 +- text >=1.2.2.2 && <1.3 +- mtl >=2.2.1 && <2.3 ghc-options: - -funbox-strict-fields @@ -141,8 +141,8 @@ tests: - hspec-contrib >=0.4.0 && <0.6 - hspec >=2.4.8 && <2.6 - split >=0.2.3 && <0.3 - - random - - time + - random >=1.1 && <1.2 + - time >=1.6.0 && <1.7 - stm >=2.4.5 && <2.5 - web3 ghc-options: diff --git a/stack.yaml b/stack.yaml index d673c66c..91f4dce5 100644 --- a/stack.yaml +++ b/stack.yaml @@ -7,7 +7,7 @@ packages: # Extra package dependencies extra-deps: -- secp256k1-1.1.2 +- secp256k1-haskell-0.1.3 - relapse-1.0.0.0 # Dependencies bounds From 0cc807259a0b37533f02777ae6f595254a8a47a3 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 21 Oct 2018 17:47:28 +0300 Subject: [PATCH 028/237] Added secp256k1 ppa to TravisCI --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 75986caf..60873b54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,36 +20,36 @@ matrix: # We grab the appropriate GHC and cabal-install versions from hvr's PPA. See: - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7 compiler: ": #GHC 8.0.2" - addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7,libsecp256k1], sources: [hvr-ghc,ppa:tah83/secp256k1]}} - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7 compiler: ": #GHC 8.2.2" - addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7,libsecp256k1], sources: [hvr-ghc,ppa:tah83/secp256k1]}} - env: BUILD=cabal GHCVER=8.4.3 CABALVER=2.2 HAPPYVER=1.19.5 ALEXVER=3.1.7 compiler: ": #GHC 8.4.3" - addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3,happy-1.19.5,alex-3.1.7,libsecp256k1], sources: [hvr-ghc,ppa:tah83/secp256k1]}} # The Stack builds. We can pass in arbitrary Stack arguments via the ARGS # variable, such as using --stack-yaml to point to a different file. - env: BUILD=stack ARGS="" compiler: ": #stack default" - addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} - env: BUILD=stack ARGS="--resolver lts-9" compiler: ": #stack 8.0.2" - addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} - env: BUILD=stack ARGS="--resolver lts-11" compiler: ": #stack 8.2.2" - addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} - env: BUILD=stack ARGS="--resolver lts-12" compiler: ": #stack 8.4.3" - addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} # Nightly builds are allowed to fail - env: BUILD=stack ARGS="--resolver nightly" compiler: ": #stack nightly" - addons: {apt: {packages: [libgmp-dev,libsecp256k1-dev]}} + addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} # Build on macOS in addition to Linux - env: BUILD=stack ARGS="" From c0d56905481154f95e4bacc3ded909416152dc74 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 21 Oct 2018 18:12:09 +0300 Subject: [PATCH 029/237] Added windows platoform to TravisCI --- .travis.yml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60873b54..a8084b86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,25 +57,10 @@ matrix: addons: {homebrew: {packages: [libsecp256k1]}} os: osx - - env: BUILD=stack ARGS="--resolver lts-9" - compiler: ": #stack 8.0.2 osx" - addons: {homebrew: {packages: [libsecp256k1]}} - os: osx - - - env: BUILD=stack ARGS="--resolver lts-11" - compiler: ": #stack 8.2.2 osx" - addons: {homebrew: {packages: [libsecp256k1]}} - os: osx - - - env: BUILD=stack ARGS="--resolver lts-12" - compiler: ": #stack 8.4.3 osx" - addons: {homebrew: {packages: [libsecp256k1]}} - os: osx - - - env: BUILD=stack ARGS="--resolver nightly" - compiler: ": #stack nightly osx" - addons: {homebrew: {packages: [libsecp256k1]}} - os: osx + # Build on Windows in addition to Linux + - env: BUILD=stack ARGS="" + compiler: ": #stack default windows" + os: windows before_install: # Using compiler above sets CC to an invalid value, so unset it From 0d44a5b10992a5411fe06d729785952594294707 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 22 Oct 2018 15:08:13 +0300 Subject: [PATCH 030/237] Added hlint and stylish-haskell to stack nix packages --- stack.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stack.yaml b/stack.yaml index 91f4dce5..2deb9912 100644 --- a/stack.yaml +++ b/stack.yaml @@ -22,3 +22,5 @@ nix: - solc - solc.dev - secp256k1 + - haskellPackages.hlint + - haskellPackages.stylish-haskell From ae51f485f797bc1f8b8be66b7f7e678023678888 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 22 Oct 2018 18:03:14 +0300 Subject: [PATCH 031/237] Unsigned integer bounds fix #72 --- src/Data/Solidity/Prim/Int.hs | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/Data/Solidity/Prim/Int.hs b/src/Data/Solidity/Prim/Int.hs index e779b6e0..d2ef0121 100644 --- a/src/Data/Solidity/Prim/Int.hs +++ b/src/Data/Solidity/Prim/Int.hs @@ -35,7 +35,7 @@ module Data.Solidity.Prim.Int import qualified Basement.Numerical.Number as Basement (toInteger) import Basement.Types.Word256 (Word256 (Word256)) import qualified Basement.Types.Word256 as Basement (quot, rem) -import Data.Bits (Bits (testBit)) +import Data.Bits (Bits (testBit), (.&.)) import Data.Proxy (Proxy (..)) import Data.Serialize (Get, Putter, Serialize (get, put)) import GHC.Generics (Generic) @@ -53,14 +53,27 @@ instance Integral Word256 where -- | Unsigned integer with fixed length in bits newtype UIntN (n :: Nat) = UIntN { unUIntN :: Word256 } - deriving (Eq, Ord, Enum, Num, Bits, Generic) + deriving (Eq, Ord, Enum, Bits, Generic) + +instance (KnownNat n, n <= 256) => Num (UIntN n) where + a + b = fromInteger (toInteger a + toInteger b) + a - b = fromInteger (toInteger a - toInteger b) + a * b = fromInteger (toInteger a * toInteger b) + abs = fromInteger . abs . toInteger + negate = fromInteger . negate . toInteger + signum = fromInteger . signum . toInteger + fromInteger x + | x >= 0 = mask $ UIntN (fromInteger x) + | otherwise = mask $ UIntN (fromInteger $ 2 ^ 256 + x) + where + mask = (maxBound .&.) :: UIntN n -> UIntN n instance (KnownNat n, n <= 256) => Show (UIntN n) where show = show . unUIntN instance (KnownNat n, n <= 256) => Bounded (UIntN n) where - minBound = 0 - maxBound = 2 ^ (natVal (Proxy :: Proxy n)) - 1 + minBound = UIntN 0 + maxBound = UIntN $ 2 ^ natVal (Proxy :: Proxy n) - 1 instance (KnownNat n, n <= 256) => Real (UIntN n) where toRational = toRational . toInteger @@ -86,8 +99,8 @@ instance (KnownNat n, n <= 256) => Show (IntN n) where show = show . toInteger instance (KnownNat n, n <= 256) => Bounded (IntN n) where - minBound = negate $ 2 ^ (natVal (Proxy :: Proxy (n :: Nat)) - 1) - maxBound = 2 ^ (natVal (Proxy :: Proxy (n :: Nat)) - 1) - 1 + minBound = IntN $ negate $ 2 ^ (natVal (Proxy :: Proxy (n :: Nat)) - 1) + maxBound = IntN $ 2 ^ (natVal (Proxy :: Proxy (n :: Nat)) - 1) - 1 instance (KnownNat n, n <= 256) => Num (IntN n) where a + b = fromInteger (toInteger a + toInteger b) @@ -97,8 +110,10 @@ instance (KnownNat n, n <= 256) => Num (IntN n) where negate = fromInteger . negate . toInteger signum = fromInteger . signum . toInteger fromInteger x - | x >= 0 = IntN (fromInteger x) - | otherwise = IntN (fromInteger $ 2 ^ 256 + x) + | x >= 0 = mask $ IntN (fromInteger x) + | otherwise = mask $ IntN (fromInteger $ 2 ^ 256 + x) + where + mask = (maxBound .&.) :: IntN n -> IntN n instance (KnownNat n, n <= 256) => Real (IntN n) where toRational = toRational . toInteger From d98412045a855992ada9c9841d029198cb42f8b8 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 22 Oct 2018 18:27:08 +0300 Subject: [PATCH 032/237] Added test for #72 --- package.yaml | 2 +- src/Data/Solidity/Prim/Int.hs | 6 ++--- unit/Data/Solidity/Test/EncodingSpec.hs | 3 +-- unit/Data/Solidity/Test/IntSpec.hs | 33 +++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 unit/Data/Solidity/Test/IntSpec.hs diff --git a/package.yaml b/package.yaml index 89b9d958..265956dd 100644 --- a/package.yaml +++ b/package.yaml @@ -142,7 +142,7 @@ tests: - hspec >=2.4.8 && <2.6 - split >=0.2.3 && <0.3 - random >=1.1 && <1.2 - - time >=1.6.0 && <1.7 + - time >=1.6.0 && <1.9 - stm >=2.4.5 && <2.5 - web3 ghc-options: diff --git a/src/Data/Solidity/Prim/Int.hs b/src/Data/Solidity/Prim/Int.hs index d2ef0121..09e5e86e 100644 --- a/src/Data/Solidity/Prim/Int.hs +++ b/src/Data/Solidity/Prim/Int.hs @@ -110,10 +110,8 @@ instance (KnownNat n, n <= 256) => Num (IntN n) where negate = fromInteger . negate . toInteger signum = fromInteger . signum . toInteger fromInteger x - | x >= 0 = mask $ IntN (fromInteger x) - | otherwise = mask $ IntN (fromInteger $ 2 ^ 256 + x) - where - mask = (maxBound .&.) :: IntN n -> IntN n + | x >= 0 = IntN (fromInteger x) + | otherwise = IntN (fromInteger $ 2 ^ 256 + x) instance (KnownNat n, n <= 256) => Real (IntN n) where toRational = toRational . toInteger diff --git a/unit/Data/Solidity/Test/EncodingSpec.hs b/unit/Data/Solidity/Test/EncodingSpec.hs index 5b0bb8af..07a1985e 100644 --- a/unit/Data/Solidity/Test/EncodingSpec.hs +++ b/unit/Data/Solidity/Test/EncodingSpec.hs @@ -6,6 +6,7 @@ module Data.Solidity.Test.EncodingSpec where +import Control.Exception (evaluate) import Data.Monoid ((<>)) import Data.Text (Text) import Data.Tuple.OneTuple (OneTuple (..)) @@ -100,11 +101,9 @@ bytesNTest = expected = "0x68656c6c6f000000" :: BytesN 8 literal `shouldBe` expected -{- it "fails on too long literals" $ do let literal = "hello" :: BytesN 4 evaluate literal `shouldThrow` errorCall "Invalid Size" --} vectorTest :: Spec vectorTest = diff --git a/unit/Data/Solidity/Test/IntSpec.hs b/unit/Data/Solidity/Test/IntSpec.hs new file mode 100644 index 00000000..b7a7f24c --- /dev/null +++ b/unit/Data/Solidity/Test/IntSpec.hs @@ -0,0 +1,33 @@ +{-# LANGUAGE DataKinds #-} +module Data.Solidity.Test.IntSpec where + +import Test.Hspec + +import Data.Solidity.Prim.Int + +spec :: Spec +spec = do + describe "Unsigned integer overflow" $ do + it "UIntN 256" $ do + (0 - 1 :: UIntN 256) `shouldBe` 115792089237316195423570985008687907853269984665640564039457584007913129639935 + (maxBound + 1 :: UIntN 256) `shouldBe` 0 + + it "UIntN 128" $ do + (0 - 1 :: UIntN 128) `shouldBe` 340282366920938463463374607431768211455 + (maxBound + 1 :: UIntN 128) `shouldBe` 0 + + it "UIntN 64" $ do + (0 - 1 :: UIntN 64) `shouldBe` 18446744073709551615 + (maxBound + 1 :: UIntN 64) `shouldBe` 0 + + it "UIntN 32" $ do + (0 - 1 :: UIntN 32) `shouldBe` 4294967295 + (maxBound + 1 :: UIntN 32) `shouldBe` 0 + + it "UIntN 16" $ do + (0 - 1 :: UIntN 16) `shouldBe` 65535 + (maxBound + 1 :: UIntN 16) `shouldBe` 0 + + it "UIntN 8" $ do + (0 - 1 :: UIntN 8) `shouldBe` 255 + (maxBound + 1 :: UIntN 8) `shouldBe` 0 From 4e0c9a31483c74bce46aa63af0c469976bf3f132 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 22 Oct 2018 20:25:41 +0300 Subject: [PATCH 033/237] Fix hlint issues --- .hlint.yaml | 1 + src/Data/Solidity/Prim/Bytes.hs | 8 +++---- src/Data/Solidity/Prim/Tuple.hs | 2 +- src/Language/Solidity/Abi.hs | 10 ++++----- src/Language/Solidity/Compiler.hs | 2 ++ src/Network/Ethereum/Account/Internal.hs | 5 ++--- src/Network/Ethereum/Account/Personal.hs | 6 +++--- src/Network/Ethereum/Account/PrivateKey.hs | 4 ++-- src/Network/Ethereum/Contract.hs | 2 -- src/Network/Ethereum/Contract/Event/Common.hs | 21 +++++++++---------- .../Ethereum/Contract/Event/MultiFilter.hs | 11 +++++----- .../Ethereum/Contract/Event/SingleFilter.hs | 4 +--- src/Network/Ethereum/Contract/TH.hs | 8 +++---- src/Network/JsonRpc/TinyClient.hs | 9 ++++---- .../Ethereum/Web3/Test/ComplexStorageSpec.hs | 2 +- test/Network/Ethereum/Web3/Test/Utils.hs | 4 +--- unit/Data/Solidity/Test/EncodingSpec.hs | 2 +- unit/Data/Solidity/Test/IntSpec.hs | 12 +++++------ unit/Language/Solidity/Test/CompilerSpec.hs | 1 - 19 files changed, 51 insertions(+), 63 deletions(-) diff --git a/.hlint.yaml b/.hlint.yaml index fb57b973..1e22fcd2 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -71,6 +71,7 @@ - ignore: {name: Use .} - ignore: {name: Use asks} - ignore: {name: Use newtype instead of data} +- ignore: {name: Use camelCase} # - ignore: {name: Use const, within: SpecialModule} # Only within certain modules diff --git a/src/Data/Solidity/Prim/Bytes.hs b/src/Data/Solidity/Prim/Bytes.hs index 762d7f7b..31a6a731 100644 --- a/src/Data/Solidity/Prim/Bytes.hs +++ b/src/Data/Solidity/Prim/Bytes.hs @@ -114,11 +114,9 @@ instance (KnownNat n, n <= 32) => ToJSON (BytesN n) where abiGetByteString :: Get ByteString abiGetByteString = do len <- fromIntegral <$> getWord256 - if len == 0 then - return "" - else do - ba <- getBytes len - return ba + if len == 0 + then return "" + else getBytes len abiPutByteString :: Putter ByteString abiPutByteString bs = do diff --git a/src/Data/Solidity/Prim/Tuple.hs b/src/Data/Solidity/Prim/Tuple.hs index 6ecee399..704d8fc5 100644 --- a/src/Data/Solidity/Prim/Tuple.hs +++ b/src/Data/Solidity/Prim/Tuple.hs @@ -35,4 +35,4 @@ instance AbiType a => AbiType (OneTuple a) where instance AbiGet a => AbiGet (OneTuple a) instance AbiPut a => AbiPut (OneTuple a) -$(fmap concat $ sequence $ map tupleDecs [2..20]) +$(concat <$> mapM tupleDecs [2..20]) diff --git a/src/Language/Solidity/Abi.hs b/src/Language/Solidity/Abi.hs index f538cafc..3a02838b 100644 --- a/src/Language/Solidity/Abi.hs +++ b/src/Language/Solidity/Abi.hs @@ -217,14 +217,12 @@ numberParser = read <$> many1 digit parseUint :: Parser SolidityType parseUint = do _ <- string "uint" - n <- numberParser - pure $ SolidityUint n + SolidityUint <$> numberParser parseInt :: Parser SolidityType parseInt = do _ <- string "int" - n <- numberParser - pure $ SolidityInt n + SolidityInt <$> numberParser parseBool :: Parser SolidityType parseBool = string "bool" >> pure SolidityBool @@ -254,7 +252,7 @@ solidityBasicTypeParser = parseVector :: Parser SolidityType parseVector = do s <- solidityBasicTypeParser - ns <- many1Till lengthParser ((lookAhead $ void (string "[]")) <|> eof) + ns <- many1Till lengthParser (lookAhead (void $ string "[]") <|> eof) pure $ SolidityVector ns s where many1Till :: Parser Int -> Parser () -> Parser [Int] @@ -271,7 +269,7 @@ parseVector = do parseArray :: Parser SolidityType parseArray = do - s <- (try $ parseVector <* string "[]") <|> (solidityBasicTypeParser <* string "[]") + s <- try (parseVector <* string "[]") <|> (solidityBasicTypeParser <* string "[]") pure $ SolidityArray s diff --git a/src/Language/Solidity/Compiler.hs b/src/Language/Solidity/Compiler.hs index 85c68626..42719911 100644 --- a/src/Language/Solidity/Compiler.hs +++ b/src/Language/Solidity/Compiler.hs @@ -1,5 +1,7 @@ {-# LANGUAGE CPP #-} +#ifdef SOLIDITY_COMPILER {-# LANGUAGE RecordWildCards #-} +#endif -- | -- Module : Language.Solidity.Compiler diff --git a/src/Network/Ethereum/Account/Internal.hs b/src/Network/Ethereum/Account/Internal.hs index cf43d905..b5978643 100644 --- a/src/Network/Ethereum/Account/Internal.hs +++ b/src/Network/Ethereum/Account/Internal.hs @@ -1,8 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | @@ -25,6 +23,7 @@ import Control.Monad.State.Strict (MonadState (..), StateT (..), withStateT) import Control.Monad.Trans (MonadTrans (..)) import Data.Default (Default (..)) +import Data.Maybe (fromMaybe) import Lens.Micro (Lens', lens) import Data.HexString (HexString) @@ -57,7 +56,7 @@ data CallParam p = CallParam -- | Transaction recipient lens to :: Lens' (CallParam p) Address -to = lens (maybe def id . _to) $ \a b -> a { _to = Just b } +to = lens (fromMaybe def . _to) $ \a b -> a { _to = Just b } -- | Transaction value lens value :: Unit value => Lens' (CallParam p) value diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs index d6d4cf9f..f0a5405b 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/src/Network/Ethereum/Account/Personal.hs @@ -29,9 +29,9 @@ import Data.Proxy (Proxy (..)) import Data.Solidity.Abi.Codec (decode, encode) import Data.Solidity.Prim.Address (Address) import Network.Ethereum.Account.Class (Account (..)) -import Network.Ethereum.Account.Internal (CallParam (..), - defaultCallParam) -import Network.Ethereum.Account.Internal (AccountT (..), getCall, +import Network.Ethereum.Account.Internal (AccountT (..), + CallParam (..), + defaultCallParam, getCall, getReceipt) import qualified Network.Ethereum.Api.Eth as Eth (call, estimateGas) import Network.Ethereum.Api.Personal (Passphrase) diff --git a/src/Network/Ethereum/Account/PrivateKey.hs b/src/Network/Ethereum/Account/PrivateKey.hs index d6863bff..5b4f76a4 100644 --- a/src/Network/Ethereum/Account/PrivateKey.hs +++ b/src/Network/Ethereum/Account/PrivateKey.hs @@ -97,10 +97,10 @@ encodeTransaction :: Call -> Either Integer (Integer, ByteString, ByteString) -> HexString encodeTransaction Call{..} vrs = do - let (to :: ByteString) = fromMaybe mempty (toBytes . toHexString <$> callTo) + let (to :: ByteString) = maybe mempty (toBytes . toHexString) callTo (value :: Integer) = unQuantity $ fromJust callValue (nonce :: Integer) = unQuantity $ fromJust callNonce - (gasPrice :: Integer) = fromMaybe defaultGasPrice $ fmap unQuantity callGasPrice + (gasPrice :: Integer) = maybe defaultGasPrice unQuantity callGasPrice (gasLimit :: Integer) = unQuantity $ fromJust callGas (input :: ByteString) = convert $ fromMaybe mempty callData diff --git a/src/Network/Ethereum/Contract.hs b/src/Network/Ethereum/Contract.hs index 17eeb3a5..9d8a1714 100644 --- a/src/Network/Ethereum/Contract.hs +++ b/src/Network/Ethereum/Contract.hs @@ -1,9 +1,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} -- | diff --git a/src/Network/Ethereum/Contract/Event/Common.hs b/src/Network/Ethereum/Contract/Event/Common.hs index bea5400b..03d3120e 100644 --- a/src/Network/Ethereum/Contract/Event/Common.hs +++ b/src/Network/Ethereum/Contract/Event/Common.hs @@ -1,16 +1,15 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE FunctionalDependencies #-} -{-# LANGUAGE GADTs #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE UndecidableInstances #-} -- | -- Module : Network.Ethereum.Contract.Event.Common --- Copyright : Alexander Krupenkin 2018 +-- Copyright : FOAM team 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -56,7 +55,7 @@ mkFilterChanges changes = let eChanges = map (\c@Change{..} -> FilterChange c <$> decodeEvent c) changes ls = lefts eChanges rs = rights eChanges - in if ls /= [] then throwIO (EventParseFailure $ (show ls)) else pure rs + in if ls /= [] then throwIO (EventParseFailure $ show ls) else pure rs data FilterStreamState e = diff --git a/src/Network/Ethereum/Contract/Event/MultiFilter.hs b/src/Network/Ethereum/Contract/Event/MultiFilter.hs index 7a17474f..75dbad7d 100644 --- a/src/Network/Ethereum/Contract/Event/MultiFilter.hs +++ b/src/Network/Ethereum/Contract/Event/MultiFilter.hs @@ -1,7 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} @@ -15,7 +14,7 @@ -- | -- Module : Network.Ethereum.Contract.Event.MultiFilter --- Copyright : Alexander Krupenkin 2018 +-- Copyright : FOAM team 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -106,7 +105,7 @@ modifyMultiFilter -> MultiFilter es -> MultiFilter es modifyMultiFilter _ NilFilters = NilFilters -modifyMultiFilter h (f :? fs) = (h f :? modifyMultiFilter h fs) +modifyMultiFilter h (f :? fs) = h f :? modifyMultiFilter h fs multiEvent @@ -254,11 +253,11 @@ instance , MapHandlers m es es' ) => MapHandlers m (e : es) (FilterChange e : es') where - mapHandlers ((H f) :& fs) = - let f' = \FilterChange{..} -> do + mapHandlers (H f :& fs) = + let f' FilterChange{..} = do act <- runReaderT (f filterChangeEvent) filterChangeRawChange return ((,) act <$> changeBlockNumber filterChangeRawChange) - in (H f') :& mapHandlers fs + in H f' :& mapHandlers fs reduceMultiEventStream diff --git a/src/Network/Ethereum/Contract/Event/SingleFilter.hs b/src/Network/Ethereum/Contract/Event/SingleFilter.hs index 953de950..e00f34a1 100644 --- a/src/Network/Ethereum/Contract/Event/SingleFilter.hs +++ b/src/Network/Ethereum/Contract/Event/SingleFilter.hs @@ -1,13 +1,11 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE TypeOperators #-} @@ -15,7 +13,7 @@ -- | -- Module : Network.Ethereum.Contract.Event.SingleFilter --- Copyright : Alexander Krupenkin 2018 +-- Copyright : FOAM team 2018 -- License : BSD3 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index caf46212..46380f99 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -125,9 +125,9 @@ toHSType s = case s of expandVector :: [Int] -> SolidityType -> TypeQ expandVector ns a = case uncons ns of Just (n, rest) -> - if length rest == 0 - then (conT ''ListN) `appT` numLit n `appT` toHSType a - else (conT ''ListN) `appT` numLit n `appT` expandVector rest a + if null rest + then conT ''ListN `appT` numLit n `appT` toHSType a + else conT ''ListN `appT` numLit n `appT` expandVector rest a _ -> error $ "Impossible Nothing branch in `expandVector`: " ++ show ns ++ " " ++ show a typeQ :: Text -> TypeQ @@ -279,7 +279,7 @@ escape :: [Declaration] -> [Declaration] escape = escapeEqualNames . fmap escapeReservedNames escapeEqualNames :: [Declaration] -> [Declaration] -escapeEqualNames = concat . fmap go . group . sort +escapeEqualNames = concatMap go . group . sort where go [] = [] go (x : xs) = x : zipWith appendToName xs hats hats = [T.replicate n "'" | n <- [1..]] diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index 575431db..ba92c0f4 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -79,14 +79,13 @@ import Data.Text (Text, unpack) import Lens.Micro.Mtl (use) import Lens.Micro.TH (makeLenses) import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), - httpLbs, method, newManager, - parseRequest, requestBody, - requestHeaders, responseBody) + defaultManagerSettings, httpLbs, + method, newManager, parseRequest, + requestBody, requestHeaders, + responseBody) #ifdef TLS_MANAGER import Network.HTTP.Client.TLS (tlsManagerSettings) -#else -import Network.HTTP.Client (defaultManagerSettings) #endif -- | JSON-RPC monad constrait. diff --git a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs b/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs index e1886f9d..c9a0ccc3 100644 --- a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs +++ b/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs @@ -136,7 +136,7 @@ complexStorageSpec = do boolVal' `shouldBe` sBool int224Val' `shouldBe` sInt224 boolsVal `shouldBe` True - intsVal `shouldBe` sInts Prelude.!! 0 + intsVal `shouldBe` head sInts stringVal' `shouldBe` sString bytes16Val' `shouldBe` sBytes16 bytes2s `shouldBe` sByte2sElem diff --git a/test/Network/Ethereum/Web3/Test/Utils.hs b/test/Network/Ethereum/Web3/Test/Utils.hs index 41025752..69e4da1c 100644 --- a/test/Network/Ethereum/Web3/Test/Utils.hs +++ b/test/Network/Ethereum/Web3/Test/Utils.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -80,4 +78,4 @@ awaitBlock bn = do sleepBlocks :: Int -> IO () sleepBlocks n = do now <- web3 blockNumber - awaitBlock $ now + (fromIntegral n) + awaitBlock $ now + fromIntegral n diff --git a/unit/Data/Solidity/Test/EncodingSpec.hs b/unit/Data/Solidity/Test/EncodingSpec.hs index 07a1985e..eac9995e 100644 --- a/unit/Data/Solidity/Test/EncodingSpec.hs +++ b/unit/Data/Solidity/Test/EncodingSpec.hs @@ -177,7 +177,7 @@ tuplesTest = bool = True int224 = 221 :: IntN 224 bools = [True, False] :: ListN 2 Bool - ints = [1, (-1), 3] :: [IntN 32] + ints = [1, -1, 3] :: [IntN 32] string = "hello" :: Text bytes16 = "0x12345678123456781234567812345678" :: BytesN 16 elem1 = "0x1234" :: BytesN 2 diff --git a/unit/Data/Solidity/Test/IntSpec.hs b/unit/Data/Solidity/Test/IntSpec.hs index b7a7f24c..1a3d5e85 100644 --- a/unit/Data/Solidity/Test/IntSpec.hs +++ b/unit/Data/Solidity/Test/IntSpec.hs @@ -9,25 +9,25 @@ spec :: Spec spec = do describe "Unsigned integer overflow" $ do it "UIntN 256" $ do - (0 - 1 :: UIntN 256) `shouldBe` 115792089237316195423570985008687907853269984665640564039457584007913129639935 + (negate 1 :: UIntN 256) `shouldBe` 115792089237316195423570985008687907853269984665640564039457584007913129639935 (maxBound + 1 :: UIntN 256) `shouldBe` 0 it "UIntN 128" $ do - (0 - 1 :: UIntN 128) `shouldBe` 340282366920938463463374607431768211455 + (negate 1 :: UIntN 128) `shouldBe` 340282366920938463463374607431768211455 (maxBound + 1 :: UIntN 128) `shouldBe` 0 it "UIntN 64" $ do - (0 - 1 :: UIntN 64) `shouldBe` 18446744073709551615 + (negate 1 :: UIntN 64) `shouldBe` 18446744073709551615 (maxBound + 1 :: UIntN 64) `shouldBe` 0 it "UIntN 32" $ do - (0 - 1 :: UIntN 32) `shouldBe` 4294967295 + (negate 1 :: UIntN 32) `shouldBe` 4294967295 (maxBound + 1 :: UIntN 32) `shouldBe` 0 it "UIntN 16" $ do - (0 - 1 :: UIntN 16) `shouldBe` 65535 + (negate 1 :: UIntN 16) `shouldBe` 65535 (maxBound + 1 :: UIntN 16) `shouldBe` 0 it "UIntN 8" $ do - (0 - 1 :: UIntN 8) `shouldBe` 255 + (negate 1 :: UIntN 8) `shouldBe` 255 (maxBound + 1 :: UIntN 8) `shouldBe` 0 diff --git a/unit/Language/Solidity/Test/CompilerSpec.hs b/unit/Language/Solidity/Test/CompilerSpec.hs index 460fadb9..fbbf3ba1 100644 --- a/unit/Language/Solidity/Test/CompilerSpec.hs +++ b/unit/Language/Solidity/Test/CompilerSpec.hs @@ -1,6 +1,5 @@ {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} module Language.Solidity.Test.CompilerSpec where From ccf335410922812efb4e3ba44e3e2501154c5b3c Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 23 Oct 2018 17:10:55 +0300 Subject: [PATCH 034/237] HexString module move and compiler warning fixes * To prevent conflicts with `hexstring` library `HexString` was moved * Use TLS default manager for JSON-RPC connections * Fix warnings in tests --- package.yaml | 10 +- src/Data/{ => ByteArray}/HexString.hs | 26 +++--- src/Data/Solidity/Prim/Address.hs | 92 +++++++++---------- src/Network/Ethereum/Account/Internal.hs | 2 +- src/Network/Ethereum/Account/PrivateKey.hs | 2 +- src/Network/Ethereum/Api/Eth.hs | 2 +- src/Network/Ethereum/Api/Personal.hs | 2 +- src/Network/Ethereum/Api/Types.hs | 2 +- src/Network/Ethereum/Api/Web3.hs | 2 +- src/Network/Ethereum/Contract.hs | 2 +- src/Network/JsonRpc/TinyClient.hs | 14 +-- .../Ethereum/Web3/Test/ComplexStorageSpec.hs | 14 +-- .../Ethereum/Web3/Test/LinearizationSpec.hs | 26 ++---- .../Ethereum/Web3/Test/SimpleStorageSpec.hs | 14 +-- unit/Crypto/Ethereum/Test/EcdsaSpec.hs | 2 +- unit/Data/Solidity/Test/EncodingSpec.hs | 7 +- 16 files changed, 96 insertions(+), 123 deletions(-) rename src/Data/{ => ByteArray}/HexString.hs (73%) diff --git a/package.yaml b/package.yaml index 265956dd..70933ac0 100644 --- a/package.yaml +++ b/package.yaml @@ -32,6 +32,7 @@ extra-source-files: dependencies: - base >4.9 && <4.12 - secp256k1-haskell >=0.1.3 && <0.2 +- http-client-tls >=0.3.5.1 && <0.4 - template-haskell >=2.11.1.0 && <2.14 - microlens-aeson >=2.2.0.2 && <2.4 - microlens-mtl >=0.1.11.0 && <0.2 @@ -85,11 +86,6 @@ ghc-options: - -Wtabs flags: - tls: - description: Enable TLS support - default: True - manual: True - debug: description: Enable debug compiler options default: False @@ -103,10 +99,6 @@ flags: library: source-dirs: src when: - - condition: flag(tls) - cpp-options: -DTLS_MANAGER - dependencies: http-client-tls - - condition: flag(debug) ghc-options: -ddump-splices diff --git a/src/Data/HexString.hs b/src/Data/ByteArray/HexString.hs similarity index 73% rename from src/Data/HexString.hs rename to src/Data/ByteArray/HexString.hs index 6f1324ee..f90f5583 100644 --- a/src/Data/HexString.hs +++ b/src/Data/ByteArray/HexString.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Data.HexString +-- Module : Data.ByteArray.HexString -- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- @@ -13,20 +13,20 @@ -- Hex string data type and useful functions. -- -module Data.HexString where +module Data.ByteArray.HexString where import Data.Aeson (FromJSON (..), ToJSON (..), Value (String), withText) import Data.ByteArray (ByteArray, ByteArrayAccess, convert) +import qualified Data.ByteArray as BA (drop, take) import Data.ByteArray.Encoding (Base (Base16), convertFromBase, convertToBase) import Data.ByteString (ByteString) -import qualified Data.ByteString as BS (drop, take) import Data.Monoid (Monoid, (<>)) import Data.Semigroup (Semigroup) import Data.String (IsString (..)) import Data.Text (Text) -import qualified Data.Text.Encoding as TE (decodeUtf8, encodeUtf8) +import Data.Text.Encoding (decodeUtf8, encodeUtf8) -- | Represents a Hex string. Guarantees that all characters it contains -- are valid hex characters. @@ -37,22 +37,26 @@ instance Show HexString where show = ("HexString " ++) . show . toText instance IsString HexString where - fromString = either error id . hexString . fromString + fromString = hexString' . fromString + where + hexString' :: ByteString -> HexString + hexString' = either error id . hexString instance FromJSON HexString where - parseJSON = withText "HexString" $ either fail pure . hexString . TE.encodeUtf8 + parseJSON = withText "HexString" $ either fail pure . hexString . encodeUtf8 instance ToJSON HexString where toJSON = String . toText -- | Smart constructor which validates that all the text are actually -- have `0x` prefix, hexadecimal characters and length is even. -hexString :: ByteString -> Either String HexString +hexString :: ByteArray ba => ba -> Either String HexString hexString bs - | BS.take 2 bs == "0x" = HexString <$> bs' - | otherwise = Left $ "Hex string should be '0x' prefixed: " ++ show bs + | BA.take 2 bs == hexStart = HexString <$> bs' + | otherwise = Left "Hex string should start from '0x'" where - bs' = convertFromBase Base16 (BS.drop 2 bs) + hexStart = convert ("0x" :: ByteString) + bs' = convertFromBase Base16 (BA.drop 2 bs) -- | Reads a raw bytes and converts to hex representation. fromBytes :: ByteArrayAccess ba => ba -> HexString @@ -64,4 +68,4 @@ toBytes = convert . unHexString -- | Access to a 'Text' representation of the 'HexString' toText :: HexString -> Text -toText = ("0x" <>) . TE.decodeUtf8 . convertToBase Base16 . unHexString +toText = ("0x" <>) . decodeUtf8 . convertToBase Base16 . unHexString diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs index 99c44753..9b087805 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/src/Data/Solidity/Prim/Address.hs @@ -31,30 +31,30 @@ module Data.Solidity.Prim.Address , verifyChecksum ) where -import Control.Monad ((<=<)) -import Crypto.Hash (Keccak_256 (..), hashWith) -import Crypto.Secp256k1 (PubKey, exportPubKey) -import Data.Aeson (FromJSON (..), ToJSON (..)) -import Data.Bits ((.&.)) -import Data.Bool (bool) -import Data.ByteArray (convert, zero) -import qualified Data.ByteArray as BA (drop) -import Data.ByteString (ByteString) -import qualified Data.ByteString as BS (take, unpack) -import qualified Data.ByteString.Char8 as C8 (drop, length, pack, unpack) -import qualified Data.Char as C (toLower, toUpper) -import Data.Default (Default (..)) -import Data.String (IsString (..)) -import Data.Text.Encoding as T (encodeUtf8) -import Generics.SOP (Generic) -import qualified GHC.Generics as GHC (Generic) - -import Data.HexString (HexString, fromBytes, hexString, - toBytes, toText) -import Data.Solidity.Abi (AbiGet (..), AbiPut (..), - AbiType (..)) -import Data.Solidity.Abi.Codec (decode, encode) -import Data.Solidity.Prim.Int (UIntN) +import Control.Monad ((<=<)) +import Crypto.Hash (Keccak_256 (..), hashWith) +import Crypto.Secp256k1 (PubKey, exportPubKey) +import Data.Aeson (FromJSON (..), ToJSON (..)) +import Data.Bits ((.&.)) +import Data.Bool (bool) +import Data.ByteArray (convert, zero) +import qualified Data.ByteArray as BA (drop) +import Data.ByteString (ByteString) +import qualified Data.ByteString as BS (take, unpack) +import qualified Data.ByteString.Char8 as C8 (drop, length, pack, unpack) +import qualified Data.Char as C (toLower, toUpper) +import Data.Default (Default (..)) +import Data.String (IsString (..)) +import Data.Text.Encoding as T (encodeUtf8) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) + +import Data.ByteArray.HexString (HexString, fromBytes, toBytes, + toText) +import Data.Solidity.Abi (AbiGet (..), AbiPut (..), + AbiType (..)) +import Data.Solidity.Abi.Codec (decode, encode) +import Data.Solidity.Prim.Int (UIntN) -- | Ethereum account address newtype Address = Address { unAddress :: UIntN 160 } @@ -65,12 +65,33 @@ instance Generic Address instance Default Address where def = Address 0 +instance Show Address where + show = show . toChecksum . T.encodeUtf8 . toText . toHexString + +instance IsString Address where + fromString = either error id . fromHexString . fromString + +instance AbiType Address where + isDynamic _ = False + +instance AbiGet Address where + abiGet = Address <$> abiGet + +instance AbiPut Address where + abiPut = abiPut . unAddress + +instance FromJSON Address where + parseJSON = (either fail pure . fromHexString) <=< parseJSON + +instance ToJSON Address where + toJSON = toJSON . toHexString + -- | Derive address from secp256k1 public key fromPubKey :: PubKey -> Address fromPubKey key = case decode $ zero 12 <> BA.drop 12 (sha3 key) of Right a -> a - Left e -> error e + Left e -> error $ "Impossible error: " ++ e where sha3 :: PubKey -> ByteString sha3 = convert . hashWith Keccak_256 . BA.drop 1 . exportPubKey False @@ -99,24 +120,3 @@ toChecksum addr = ("0x" <>) . C8.pack $ zipWith ($) upcaseVector lower -- https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md verifyChecksum :: ByteString -> Bool verifyChecksum = toChecksum >>= (==) - -instance Show Address where - show = show . toChecksum . T.encodeUtf8 . toText . toHexString - -instance IsString Address where - fromString = either error id . (fromHexString <=< hexString) . fromString - -instance AbiType Address where - isDynamic _ = False - -instance AbiGet Address where - abiGet = Address <$> abiGet - -instance AbiPut Address where - abiPut = abiPut . unAddress - -instance FromJSON Address where - parseJSON = (either fail pure . fromHexString) <=< parseJSON - -instance ToJSON Address where - toJSON = toJSON . toHexString diff --git a/src/Network/Ethereum/Account/Internal.hs b/src/Network/Ethereum/Account/Internal.hs index b5978643..6f34281d 100644 --- a/src/Network/Ethereum/Account/Internal.hs +++ b/src/Network/Ethereum/Account/Internal.hs @@ -26,7 +26,7 @@ import Data.Default (Default (..)) import Data.Maybe (fromMaybe) import Lens.Micro (Lens', lens) -import Data.HexString (HexString) +import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim (Address) import Network.Ethereum.Account.Class (Account) import qualified Network.Ethereum.Api.Eth as Eth (getTransactionReceipt) diff --git a/src/Network/Ethereum/Account/PrivateKey.hs b/src/Network/Ethereum/Account/PrivateKey.hs index 5b4f76a4..bd2b89fc 100644 --- a/src/Network/Ethereum/Account/PrivateKey.hs +++ b/src/Network/Ethereum/Account/PrivateKey.hs @@ -32,7 +32,7 @@ import Data.Proxy (Proxy (..)) import Data.RLP (packRLP, rlpEncode) import Crypto.Ethereum (ecsign) -import Data.HexString (HexString, toBytes) +import Data.ByteArray.HexString (HexString, toBytes) import Data.Solidity.Abi.Codec (decode, encode) import Data.Solidity.Prim.Address (fromPubKey, toHexString) import Network.Ethereum.Account.Class (Account (..)) diff --git a/src/Network/Ethereum/Api/Eth.hs b/src/Network/Ethereum/Api/Eth.hs index e48cd158..534dc773 100644 --- a/src/Network/Ethereum/Api/Eth.hs +++ b/src/Network/Ethereum/Api/Eth.hs @@ -15,7 +15,7 @@ module Network.Ethereum.Api.Eth where -import Data.HexString (HexString) +import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address (Address) import Data.Text (Text) import Network.Ethereum.Api.Types (Block, Call, Change, DefaultBlock, diff --git a/src/Network/Ethereum/Api/Personal.hs b/src/Network/Ethereum/Api/Personal.hs index 34ef3f3a..4a17bc00 100644 --- a/src/Network/Ethereum/Api/Personal.hs +++ b/src/Network/Ethereum/Api/Personal.hs @@ -15,7 +15,7 @@ module Network.Ethereum.Api.Personal where -import Data.HexString (HexString) +import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address (Address) import Data.Text (Text) import Network.Ethereum.Api.Types (Call) diff --git a/src/Network/Ethereum/Api/Types.hs b/src/Network/Ethereum/Api/Types.hs index e672a2c8..5803e837 100644 --- a/src/Network/Ethereum/Api/Types.hs +++ b/src/Network/Ethereum/Api/Types.hs @@ -32,7 +32,7 @@ import qualified Data.Text.Lazy.Builder.Int as B (hexadecimal) import qualified Data.Text.Read as R (decimal, hexadecimal) import GHC.Generics (Generic) -import Data.HexString (HexString) +import Data.ByteArray.HexString (HexString) import Data.String.Extra (toLowerFirst) -- | Should be viewed as type to representing QUANTITY in Web3 JSON RPC docs diff --git a/src/Network/Ethereum/Api/Web3.hs b/src/Network/Ethereum/Api/Web3.hs index 74f3634e..7f7d8369 100644 --- a/src/Network/Ethereum/Api/Web3.hs +++ b/src/Network/Ethereum/Api/Web3.hs @@ -15,7 +15,7 @@ module Network.Ethereum.Api.Web3 where -import Data.HexString (HexString) +import Data.ByteArray.HexString (HexString) import Data.Text (Text) import Network.JsonRpc.TinyClient (JsonRpc (..)) diff --git a/src/Network/Ethereum/Contract.hs b/src/Network/Ethereum/Contract.hs index 9d8a1714..c95ffe98 100644 --- a/src/Network/Ethereum/Contract.hs +++ b/src/Network/Ethereum/Contract.hs @@ -23,7 +23,7 @@ module Network.Ethereum.Contract where import Data.Proxy (Proxy) import Data.Text (Text) -import Data.HexString (HexString) +import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address (Address) import Network.Ethereum.Account.Class (Account) import Network.Ethereum.Account.Safe (safeConfirmations, safeSend) diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index ba92c0f4..b0341f45 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -79,14 +79,10 @@ import Data.Text (Text, unpack) import Lens.Micro.Mtl (use) import Lens.Micro.TH (makeLenses) import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), - defaultManagerSettings, httpLbs, - method, newManager, parseRequest, - requestBody, requestHeaders, - responseBody) - -#ifdef TLS_MANAGER + httpLbs, method, newManager, + parseRequest, requestBody, + requestHeaders, responseBody) import Network.HTTP.Client.TLS (tlsManagerSettings) -#endif -- | JSON-RPC monad constrait. type JsonRpcM m = (MonadIO m, MonadThrow m, MonadState JsonRpcClient m) @@ -104,11 +100,7 @@ defaultSettings :: MonadIO m => String -- ^ JSON-RPC server URI -> m JsonRpcClient defaultSettings srv = liftIO $ JsonRpcClient -#ifdef TLS_MANAGER <$> newManager tlsManagerSettings -#else - <$> newManager defaultManagerSettings -#endif <*> pure srv instance Show JsonRpcClient where diff --git a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs b/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs index c9a0ccc3..123a1694 100644 --- a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs +++ b/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs @@ -27,18 +27,12 @@ module Network.Ethereum.Web3.Test.ComplexStorageSpec where import Control.Concurrent.Async (wait) -import Control.Concurrent.MVar +import Control.Concurrent.MVar (newEmptyMVar, putMVar, + takeMVar) import Control.Monad.IO.Class (liftIO) -import Data.ByteArray (convert) -import Data.ByteString (ByteString) -import Data.Default -import Data.Either (isRight) -import Data.Maybe -import Data.String (fromString) -import System.IO.Unsafe (unsafePerformIO) +import Data.Default (def) -import qualified Network.Ethereum.Api.Eth as Eth -import Network.Ethereum.Api.Types (Call (..), Filter (..)) +import Network.Ethereum.Api.Types (Filter (..)) import Network.Ethereum.Contract (new) import Network.Ethereum.Contract.TH import Network.Ethereum.Web3 hiding (convert) diff --git a/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs b/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs index ef41bbc5..4c9ed615 100644 --- a/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs +++ b/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs @@ -28,21 +28,18 @@ module Network.Ethereum.Web3.Test.LinearizationSpec where import Control.Concurrent (forkIO) -import Control.Concurrent.Async (Async, async, wait) +import Control.Concurrent.Async (forConcurrently_) import Control.Concurrent.MVar import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TQueue (TQueue, flushTQueue, newTQueueIO, writeTQueue) -import Control.Concurrent.STM.TSem (TSem, newTSem, signalTSem, - waitTSem) -import Control.Monad (forM, void) -import Control.Monad.IO.Class (MonadIO, liftIO) +import Control.Monad (void) +import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.Trans.Reader (ReaderT, ask) import Data.Default import Data.Either import Data.List (sort) import Data.Maybe (fromJust) -import System.Environment (getEnv) import System.Random (randomRIO) import Test.Hspec @@ -71,12 +68,6 @@ spec = do floodCount :: Int floodCount = 200 --- waitTSem will block until the counter is positive (i.e., > 0) --- so if there's -(floodCount - 1), that means when the floodCount `signalTSem`s are done --- there will be 1 unit left in the TSem for the waitTSem at the end of a test -floodSemCount :: Int -floodSemCount = -(floodCount - 1) - linearizationSpec :: SpecWith Address linearizationSpec = describe "can bundle and linearize events" $ do @@ -114,7 +105,8 @@ floodSpec = describe "can correctly demonstrate the difference between `multiEve sleepBlocks 10 -- flood em and wait for all to finish - void . forM [1..floodCount] . const . liftIO $ singleFlood linearization + liftIO . forConcurrently_ [1..floodCount] . const $ singleFlood linearization + -- to let the event listeners catch up sleepBlocks 10 @@ -140,11 +132,11 @@ monitorE1OrE2 addr = do let fltr1 = (def :: Filter E1) { filterAddress = Just [addr] } fltr2 = (def :: Filter E2) { filterAddress = Just [addr] } filters = fltr1 :? fltr2 :? NilFilters - handler1 e1 = do - liftIO $ putMVar var (Left e1) + handler1 ev1 = do + liftIO $ putMVar var (Left ev1) return TerminateEvent - handler2 e2 = do - liftIO $ putMVar var (Right e2) + handler2 ev2 = do + liftIO $ putMVar var (Right ev2) return TerminateEvent handlers = H handler1 :& H handler2 :& RNil _ <- web3 $ multiEvent filters handlers diff --git a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs index b58bc833..f45371d2 100644 --- a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs +++ b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs @@ -131,13 +131,13 @@ events = do Just end <- takeMVar blockNumberVar awaitBlock $ end + 1 -- make past transactions definitively in past var' <- newMVar [] - fiber <- web3 $ do - let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] + fiber' <- web3 $ do + let fltr' = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] , filterFromBlock = BlockWithNumber start} - forkWeb3 $ processUntil' var' fltr ((6 ==) . length) + forkWeb3 $ processUntil' var' fltr' ((6 ==) . length) putStrLn "Setting more values" setValues storage theSets2 - wait fiber + wait fiber' putStrLn "All new values have ben set" vals <- takeMVar var' sort (unEvT_CountSet <$> vals) `shouldBe` sort (theSets1 <> theSets2) @@ -170,8 +170,8 @@ processUntil :: MVar [EvT_CountSet] -> ([EvT_CountSet] -> Bool) -- TODO: make it work for any event -> (Change -> Web3 ()) -> Web3 () -processUntil var filter predicate action = do - event' filter $ \(ev :: EvT_CountSet) -> do +processUntil var fltr predicate action = do + event' fltr $ \(ev :: EvT_CountSet) -> do newV <- liftIO $ modifyMVar var $ \v -> return (ev:v, ev:v) if predicate newV then do @@ -184,7 +184,7 @@ processUntil' :: MVar [EvT_CountSet] -> Filter EvT_CountSet -> ([EvT_CountSet] -> Bool) -> Web3 () -processUntil' var filter predicate = processUntil var filter predicate (const $ return ()) +processUntil' var fltr predicate = processUntil var fltr predicate (const $ return ()) setValues :: Address -> [UIntN 256] -> IO () setValues storage = mapM_ (contract storage . setCount) diff --git a/unit/Crypto/Ethereum/Test/EcdsaSpec.hs b/unit/Crypto/Ethereum/Test/EcdsaSpec.hs index 8d12083f..21744535 100644 --- a/unit/Crypto/Ethereum/Test/EcdsaSpec.hs +++ b/unit/Crypto/Ethereum/Test/EcdsaSpec.hs @@ -9,7 +9,7 @@ import Test.Hspec import Test.Hspec.QuickCheck import Crypto.Ethereum -import Data.HexString (HexString) +import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address (fromPubKey) spec :: Spec diff --git a/unit/Data/Solidity/Test/EncodingSpec.hs b/unit/Data/Solidity/Test/EncodingSpec.hs index eac9995e..d08ec996 100644 --- a/unit/Data/Solidity/Test/EncodingSpec.hs +++ b/unit/Data/Solidity/Test/EncodingSpec.hs @@ -13,7 +13,6 @@ import Data.Tuple.OneTuple (OneTuple (..)) import Generics.SOP (Generic, Rep) import Test.Hspec -import Data.HexString (hexString) import Data.Solidity.Abi (AbiGet, AbiPut, GenericAbiGet, GenericAbiPut) import Data.Solidity.Abi.Codec (decode, decode', encode, encode') @@ -231,10 +230,10 @@ addressTest = `shouldBe` "0x4af013afbadb22d8a88c92d68fc96b033b9ebb8a" it "fails for invalid address length" $ do - (fromHexString =<< hexString "0x0") - `shouldBe` Left "base16: input: invalid length" + evaluate (fromHexString "0x0") + `shouldThrow` errorCall "base16: input: invalid length" - (fromHexString =<< hexString "0x4af013AfBAdb22D8A88c92D68Fc96B033b9Ebb8a00") + fromHexString "0x4af013AfBAdb22D8A88c92D68Fc96B033b9Ebb8a00" `shouldBe` Left "Incorrect address length: 21" -- | Run encoded/decoded comaration From 884ba7a93055e9bd3162b3914d9b1eb511ec6da0 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 24 Oct 2018 23:33:32 +0300 Subject: [PATCH 035/237] Stackage only TravisCI build --- .travis.yml | 154 +++++++-------------------------------------------- package.yaml | 28 ++++------ 2 files changed, 31 insertions(+), 151 deletions(-) diff --git a/.travis.yml b/.travis.yml index a8084b86..fb087fb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,12 @@ # Use new container infrastructure to enable caching. sudo: false -# Do not choose a language; we provide our own build tools. -language: generic +# Use nix build environment. +language: nix # Caching so the next build will be fast too. cache: directories: - - $HOME/.ghc - - $HOME/.cabal - $HOME/.stack - $TRAVIS_BUILD_DIR/.stack-work @@ -17,140 +15,30 @@ cache: # of those below. matrix: include: - # We grab the appropriate GHC and cabal-install versions from hvr's PPA. See: - - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7 + # Build with different GHC versions + - env: RESOLVER=lts-9.21 compiler: ": #GHC 8.0.2" - addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7,libsecp256k1], sources: [hvr-ghc,ppa:tah83/secp256k1]}} - - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7 + - env: RESOLVER=lts-11.22 compiler: ": #GHC 8.2.2" - addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7,libsecp256k1], sources: [hvr-ghc,ppa:tah83/secp256k1]}} - - env: BUILD=cabal GHCVER=8.4.3 CABALVER=2.2 HAPPYVER=1.19.5 ALEXVER=3.1.7 + - env: RESOLVER=lts-12.14 compiler: ": #GHC 8.4.3" - addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3,happy-1.19.5,alex-3.1.7,libsecp256k1], sources: [hvr-ghc,ppa:tah83/secp256k1]}} - - # The Stack builds. We can pass in arbitrary Stack arguments via the ARGS - # variable, such as using --stack-yaml to point to a different file. - - env: BUILD=stack ARGS="" - compiler: ": #stack default" - addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} - - - env: BUILD=stack ARGS="--resolver lts-9" - compiler: ": #stack 8.0.2" - addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} - - - env: BUILD=stack ARGS="--resolver lts-11" - compiler: ": #stack 8.2.2" - addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} - - - env: BUILD=stack ARGS="--resolver lts-12" - compiler: ": #stack 8.4.3" - addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} - - # Nightly builds are allowed to fail - - env: BUILD=stack ARGS="--resolver nightly" - compiler: ": #stack nightly" - addons: {apt: {packages: [libgmp-dev,libsecp256k1], sources: [ppa:tah83/secp256k1]}} + - env: RESOLVER=nightly + compiler: ": #GHC 8.6.1" # Build on macOS in addition to Linux - - env: BUILD=stack ARGS="" - compiler: ": #stack default osx" - addons: {homebrew: {packages: [libsecp256k1]}} + - env: RESOLVER=lts-9.21 + compiler: ": #GHC 8.0.2" + os: osx + - env: RESOLVER=lts-11.22 + compiler: ": #GHC 8.2.2" + os: osx + - env: RESOLVER=lts-12.14 + compiler: ": #GHC 8.4.3" + os: osx + - env: RESOLVER=nightly + compiler: ": #GHC 8.6.1" os: osx - - # Build on Windows in addition to Linux - - env: BUILD=stack ARGS="" - compiler: ": #stack default windows" - os: windows - -before_install: -# Using compiler above sets CC to an invalid value, so unset it -- unset CC - -# We want to always allow newer versions of packages when building on GHC HEAD -- CABALARGS="" -- if [ "x$GHCVER" = "xhead" ]; then CABALARGS=--allow-newer; fi - -# Download and unpack the stack executable -- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:/opt/alex/$ALEXVER/bin:/opt/happy/$HAPPYVER/bin:$HOME/.cabal/bin:$PATH -- mkdir -p ~/.local/bin -- | - if [ `uname` = "Darwin" ] - then - travis_retry curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin - else - travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' - fi - - # Use the more reliable S3 mirror of Hackage - mkdir -p $HOME/.cabal - echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config - echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config - - -install: -- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" -- if [ -f configure.ac ]; then autoreconf -i; fi -- | - set -ex - case "$BUILD" in - stack) - # Add in extra-deps for older snapshots, as necessary - # - # This is disabled by default, as relying on the solver like this can - # make builds unreliable. Instead, if you have this situation, it's - # recommended that you maintain multiple stack-lts-X.yaml files. - - #stack --no-terminal --install-ghc $ARGS test --bench --dry-run || ( \ - # stack --no-terminal $ARGS build cabal-install && \ - # stack --no-terminal $ARGS solver --update-config) - - # Build the dependencies - stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies - ;; - cabal) - cabal --version - travis_retry cabal update - - # Get the list of packages from the stack.yaml file. Note that - # this will also implicitly run hpack as necessary to generate - # the .cabal files needed by cabal-install. - PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@') - - cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES - ;; - esac - set +ex script: -- | - set -ex - case "$BUILD" in - stack) - stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps - ;; - cabal) - cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES - - ORIGDIR=$(pwd) - for dir in $PACKAGES - do - cd $dir - cabal check || [ "$CABALVER" == "1.16" ] - cabal sdist - PKGVER=$(cabal info . | awk '{print $2;exit}') - SRC_TGZ=$PKGVER.tar.gz - cd dist - tar zxfv "$SRC_TGZ" - cd "$PKGVER" - cabal configure --enable-tests --ghc-options -O0 - cabal build - if [ "$CABALVER" = "1.16" ] || [ "$CABALVER" = "1.18" ]; then - cabal test - else - cabal test --show-details=streaming --log=/dev/stdout - fi - cd $ORIGDIR - done - ;; - esac - set +ex +- nix-shell -p stack --run \ + "stack test web3:unit --flag web3:solidity --nix --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER" diff --git a/package.yaml b/package.yaml index 70933ac0..db622aaa 100644 --- a/package.yaml +++ b/package.yaml @@ -20,20 +20,12 @@ extra-source-files: - test/contracts/SimpleStorage.json - test/contracts/ComplexStorage.json - test/contracts/Linearization.json -- docs/Makefile -- docs/conf.py -- docs/index.rst -- docs/testing.rst -- docs/contributing.rst -- docs/getting_started.rst -- docs/smart_contracts.rst -- docs/ethereum_node_api.rst dependencies: -- base >4.9 && <4.12 +- base >4.9 && <4.13 - secp256k1-haskell >=0.1.3 && <0.2 - http-client-tls >=0.3.5.1 && <0.4 -- template-haskell >=2.11.1.0 && <2.14 +- template-haskell >=2.11.1.0 && <2.15 - microlens-aeson >=2.2.0.2 && <2.4 - microlens-mtl >=0.1.11.0 && <0.2 - microlens-th >=0.4.1.1 && <0.5 @@ -43,18 +35,18 @@ dependencies: - transformers >=0.5.2.0 && <0.6 - http-client >=0.5.7.1 && <0.6 - bytestring >=0.10.8.1 && <0.11 -- cryptonite >=0.23.0.0 && <0.26 +- cryptonite >=0.23 && <0.26 - exceptions >=0.8.3 && <0.11 - basement >=0.0.4 && <0.1 - machines >=0.6.3 && <0.7 - OneTuple >=0.2.1 && <0.3 - relapse >=1.0.0.0 && <2.0 - tagged >=0.8.5 && <0.9 -- parsec >=3.1.11.0 && <3.2 +- parsec >=3.1.11 && <3.2 - memory >=0.14.11 && <0.15 - cereal >=0.5.4.0 && <0.6 - aeson >=1.1.2.0 && <1.5 -- vinyl >=0.5.3.0 && <0.9 +- vinyl >=0.5.3 && <0.11 - async >=2.1.1.1 && <2.3 - text >=1.2.2.2 && <1.3 - mtl >=2.2.1 && <2.3 @@ -115,9 +107,9 @@ tests: source-dirs: unit dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.8 && <2.6 + - hspec-discover >=2.4.4 && <2.6 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.8 && <2.6 + - hspec >=2.4.4 && <2.6 - web3 ghc-options: - -threaded @@ -129,13 +121,13 @@ tests: source-dirs: test dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.8 && <2.6 + - hspec-discover >=2.4.4 && <2.6 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.8 && <2.6 + - hspec >=2.4.4 && <2.6 - split >=0.2.3 && <0.3 - random >=1.1 && <1.2 - time >=1.6.0 && <1.9 - - stm >=2.4.5 && <2.5 + - stm >=2.4.4 && <2.6 - web3 ghc-options: - -threaded From e14c2c61554bd274f12d2ea47e326b0d283bd2cd Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 25 Oct 2018 23:02:38 +0300 Subject: [PATCH 036/237] Fix build on stackage nightly & lts-11 --- .travis.yml | 12 ++- CHANGELOG.md | 1 + README.md | 77 +++++++++++++------ package.yaml | 10 ++- src/Data/Solidity/Prim/Address.hs | 1 + src/Language/Solidity/Compiler.hs | 2 + src/Network/Ethereum/Account/Default.hs | 1 + src/Network/Ethereum/Account/Personal.hs | 1 + src/Network/Ethereum/Account/PrivateKey.hs | 2 +- src/Network/Ethereum/Contract/Event/Common.hs | 1 + .../Ethereum/Contract/Event/MultiFilter.hs | 17 ++-- .../Ethereum/Contract/Event/SingleFilter.hs | 1 + src/Network/Ethereum/Ens.hs | 1 + src/Network/Ethereum/Unit.hs | 8 +- stack.yaml | 5 +- .../Ethereum/Web3/Test/SimpleStorageSpec.hs | 3 +- 16 files changed, 96 insertions(+), 47 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb087fb7..54af299b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,6 @@ cache: matrix: include: # Build with different GHC versions - - env: RESOLVER=lts-9.21 - compiler: ": #GHC 8.0.2" - env: RESOLVER=lts-11.22 compiler: ": #GHC 8.2.2" - env: RESOLVER=lts-12.14 @@ -26,9 +24,6 @@ matrix: compiler: ": #GHC 8.6.1" # Build on macOS in addition to Linux - - env: RESOLVER=lts-9.21 - compiler: ": #GHC 8.0.2" - os: osx - env: RESOLVER=lts-11.22 compiler: ": #GHC 8.2.2" os: osx @@ -39,6 +34,9 @@ matrix: compiler: ": #GHC 8.6.1" os: osx +install: +- curl -sSL https://get.haskellstack.org/ | sh -s - -d . +- ./stack --version + script: -- nix-shell -p stack --run \ - "stack test web3:unit --flag web3:solidity --nix --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER" +- ./stack test web3:unit --flag web3:solidity --nix --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER diff --git a/CHANGELOG.md b/CHANGELOG.md index 7be16b26..65d4d707 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file. - Solidity related data types and codecs moved to Data.Solidity - Solidity related parsers and compiler moved to Language.Solidity - Modules in Network.Ethereum.Web3 moved to Network.Ethereum.Api +- fromWei/toWei from `Unit` typeclass now operates over `Integral` ### Removed - `convert` function from `Unit` typeclass diff --git a/README.md b/README.md index e828644f..3f2f24e3 100644 --- a/README.md +++ b/README.md @@ -6,43 +6,74 @@ The Haskell Ethereum API which implements the [Generic JSON RPC](https://github. [![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://travis-ci.org/airalab/hs-web3.svg?branch=master)](https://travis-ci.org/airalab/hs-web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) -![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg) +[![LTS-12](http://stackage.org/package/web3/badge/lts-12)](http://stackage.org/lts-12/package/web3) +[![nightly](http://stackage.org/package/web3/badge/nightly)](http://stackage.org/nightly/package/web3) +[![Code Triagers](https://www.codetriage.com/airalab/hs-web3/badges/users.svg)](https://www.codetriage.com/airalab/hs-web3) ![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg) -[![Code Triagers Badge](https://www.codetriage.com/airalab/hs-web3/badges/users.svg)](https://www.codetriage.com/airalab/hs-web3) -Installation ------------- +Install +------- -Using [Stackage](https://docs.haskellstack.org): +`stack install web3` - stack install web3 +Usage +----- -Quick start ------------ +```haskell +{-# LANGUAGE OverloadedStrings #-} +module Main where -Lets import library entrypoint modules using `ghci`: +-- Basic imports +import Network.Ethereum.Web3 - > import Network.Ethereum.Web3 - > import qualified Network.Ethereum.Api.Web3 as Web3 +-- Eth API support +import qualified Network.Ethereum.Api.Eth as Eth +import Network.Ethereum.Api.Types -> We recomends to import `Network.Ethereun.Api.Web3` as **qualified**, because it has name similar to their prefix in JSON-RPC API. +-- ENS support +import qualified Network.Ethereum.Ens as Ens -Looks anything in `Web3` API: +-- Lens to simple param setting +import Lens.Micro ((.~)) - > :t Web3.clientVersion - Web3.clientVersion :: JsonRpc m => m Text +main :: IO () +main = do + -- Use default provider on http://localhost:8545 + ret <- runWeb3 $ do -To run it use `Web3` provider monad: + -- Get address of default account + me <- head <$> Eth.accounts - > :t runWeb3 - runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a) + -- Get balance of default account on latest block + myBalance <- Eth.getBalance me Latest - > runWeb3 Web3.clientVersion - Right "Parity-Ethereum//v2.0.3-unstable/x86_64-linux-gnu/rustc1.29.0" + -- Get half of balance + let halfBalance = fromWei (myBalance / 2) -> Function `runWeb3` use default provider at `http://localhost:8545`, for using custom providers try `runweb3'`. + -- Use default account + withAccount () $ do + -- Get Ethereum address via ENS + alice <- Ens.resolve "alice.address.on.eth" + bob <- Ens.resolve "bob.address.on.eth" ---- + -- Send transaction with value + withParam (value .~ halfBalance) $ do + + -- Send transaction to alice account + withParam (to .~ alice) $ send () + + -- Send transaction to bob account + withParam (to .~ bob) $ send () -See [documentation](https://hs-web3.readthedocs.io) for other examples. + -- Return sended value + return halfBalance + + -- Web3 error handling + case ret of + Left e -> error $ show e + Right v -> print (v :: Ether) -- Print returned value in ethers +``` + +--- +Read more in the [documentation on ReadTheDocs](https://hs-web3.readthedocs.io). diff --git a/package.yaml b/package.yaml index db622aaa..d3053e91 100644 --- a/package.yaml +++ b/package.yaml @@ -3,7 +3,7 @@ version: 0.8.0.0 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" -license: BSD3 +license: BSD-3-Clause license-file: LICENSE author: Alexander Krupenkin maintainer: mail@akru.me @@ -13,6 +13,7 @@ category: Network extra-source-files: - README.md - CHANGELOG.md +- stack.yaml - examples/token/ERC20.hs - examples/token/ERC20.json - examples/token/Main.hs @@ -23,7 +24,7 @@ extra-source-files: dependencies: - base >4.9 && <4.13 -- secp256k1-haskell >=0.1.3 && <0.2 +- secp256k1-haskell >=0.1.4 && <0.2 - http-client-tls >=0.3.5.1 && <0.4 - template-haskell >=2.11.1.0 && <2.15 - microlens-aeson >=2.2.0.2 && <2.4 @@ -46,7 +47,7 @@ dependencies: - memory >=0.14.11 && <0.15 - cereal >=0.5.4.0 && <0.6 - aeson >=1.1.2.0 && <1.5 -- vinyl >=0.5.3 && <0.11 +- vinyl >=0.5.3 && <0.10 - async >=2.1.1.1 && <2.3 - text >=1.2.2.2 && <1.3 - mtl >=2.2.1 && <2.3 @@ -98,7 +99,8 @@ library: cpp-options: -DSOLIDITY_COMPILER dependencies: containers extra-libraries: solidity - c-sources: ./cbits/solidity_lite.cpp + cxx-options: -std=c++14 + cxx-sources: ./cbits/solidity_lite.cpp include-dirs: ./cbits tests: diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs index 9b087805..cd1a7a17 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/src/Data/Solidity/Prim/Address.hs @@ -44,6 +44,7 @@ import qualified Data.ByteString as BS (take, unpack) import qualified Data.ByteString.Char8 as C8 (drop, length, pack, unpack) import qualified Data.Char as C (toLower, toUpper) import Data.Default (Default (..)) +import Data.Monoid ((<>)) import Data.String (IsString (..)) import Data.Text.Encoding as T (encodeUtf8) import Generics.SOP (Generic) diff --git a/src/Language/Solidity/Compiler.hs b/src/Language/Solidity/Compiler.hs index 42719911..47e59075 100644 --- a/src/Language/Solidity/Compiler.hs +++ b/src/Language/Solidity/Compiler.hs @@ -21,6 +21,7 @@ module Language.Solidity.Compiler where import Data.ByteString (ByteString) import Data.Map (Map) +import Data.Semigroup (Semigroup (..)) import qualified Language.Solidity.Compiler.Foreign as FFI import System.IO.Unsafe (unsafePerformIO) @@ -40,6 +41,7 @@ instance Semigroup Sources where (optimization a || optimization b) instance Monoid Sources where + mappend = (<>) mempty = Sources mempty mempty False type Compiled = Map ByteString (ByteString, ByteString) diff --git a/src/Network/Ethereum/Account/Default.hs b/src/Network/Ethereum/Account/Default.hs index 672e157c..0ff9dedd 100644 --- a/src/Network/Ethereum/Account/Default.hs +++ b/src/Network/Ethereum/Account/Default.hs @@ -23,6 +23,7 @@ import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (MonadTrans (..)) import qualified Data.ByteArray as BA (convert) import Data.Maybe (listToMaybe) +import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) import Data.Solidity.Abi.Codec (decode, encode) diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs index f0a5405b..b97a84fe 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/src/Network/Ethereum/Account/Personal.hs @@ -24,6 +24,7 @@ import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) import qualified Data.ByteArray as BA (convert) import Data.Default (Default (..)) +import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) import Data.Solidity.Abi.Codec (decode, encode) diff --git a/src/Network/Ethereum/Account/PrivateKey.hs b/src/Network/Ethereum/Account/PrivateKey.hs index bd2b89fc..f7c83e9c 100644 --- a/src/Network/Ethereum/Account/PrivateKey.hs +++ b/src/Network/Ethereum/Account/PrivateKey.hs @@ -27,7 +27,7 @@ import Data.ByteString (ByteString) import Data.ByteString.Short (fromShort) import Data.Default (Default (..)) import Data.Maybe (fromJust, fromMaybe) -import Data.Monoid (mempty) +import Data.Monoid (mempty, (<>)) import Data.Proxy (Proxy (..)) import Data.RLP (packRLP, rlpEncode) diff --git a/src/Network/Ethereum/Contract/Event/Common.hs b/src/Network/Ethereum/Contract/Event/Common.hs index 03d3120e..f13cfc8c 100644 --- a/src/Network/Ethereum/Contract/Event/Common.hs +++ b/src/Network/Ethereum/Contract/Event/Common.hs @@ -25,6 +25,7 @@ import Control.Concurrent (threadDelay) import Control.Exception (Exception, throwIO) import Control.Monad.IO.Class (liftIO) import Data.Either (lefts, rights) + import Data.Solidity.Event (DecodeEvent (..)) import qualified Network.Ethereum.Api.Eth as Eth import Network.Ethereum.Api.Provider (Web3) diff --git a/src/Network/Ethereum/Contract/Event/MultiFilter.hs b/src/Network/Ethereum/Contract/Event/MultiFilter.hs index 75dbad7d..6ebed107 100644 --- a/src/Network/Ethereum/Contract/Event/MultiFilter.hs +++ b/src/Network/Ethereum/Contract/Event/MultiFilter.hs @@ -65,12 +65,19 @@ import Data.Maybe (catMaybes, fromJust, listToMaybe) import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) +import Data.Tagged (Tagged (..)) +import Data.Vinyl (Rec ((:&), RNil), + RecApplicative) +import Data.Vinyl.CoRec (CoRec (..), Field, + FoldRec, Handler (H), + Handlers, coRecToRec, + firstField, match, + onField) +import Data.Vinyl.Functor (Compose (..), + Identity (..)) +import Data.Vinyl.TypeLevel (AllAllSat) + import Data.Solidity.Event (DecodeEvent (..)) -import Data.Tagged -import Data.Vinyl -import Data.Vinyl.CoRec -import Data.Vinyl.Functor -import Data.Vinyl.TypeLevel import qualified Network.Ethereum.Api.Eth as Eth import Network.Ethereum.Api.Provider (Web3, forkWeb3) import Network.Ethereum.Api.Types (Change (..), diff --git a/src/Network/Ethereum/Contract/Event/SingleFilter.hs b/src/Network/Ethereum/Contract/Event/SingleFilter.hs index e00f34a1..64b487cf 100644 --- a/src/Network/Ethereum/Contract/Event/SingleFilter.hs +++ b/src/Network/Ethereum/Contract/Event/SingleFilter.hs @@ -46,6 +46,7 @@ import Data.Machine (MachineT, asParts, unfoldPlan, (~>)) import Data.Machine.Plan (PlanT, stop, yield) import Data.Maybe (catMaybes, listToMaybe) + import Data.Solidity.Event (DecodeEvent (..)) import qualified Network.Ethereum.Api.Eth as Eth import Network.Ethereum.Api.Provider (Web3, forkWeb3) diff --git a/src/Network/Ethereum/Ens.hs b/src/Network/Ethereum/Ens.hs index 3ac075b1..6cb9bf3c 100644 --- a/src/Network/Ethereum/Ens.hs +++ b/src/Network/Ethereum/Ens.hs @@ -24,6 +24,7 @@ import Data.ByteArray (convert, zero) import Data.ByteArray.Sized (unsafeFromByteArrayAccess) import Data.ByteString (ByteString) import Data.ByteString.Char8 (split) +import Data.Monoid ((<>)) import Lens.Micro ((.~)) import Data.Solidity.Prim (Address, BytesN) diff --git a/src/Network/Ethereum/Unit.hs b/src/Network/Ethereum/Unit.hs index 1429607d..51af38a6 100644 --- a/src/Network/Ethereum/Unit.hs +++ b/src/Network/Ethereum/Unit.hs @@ -74,10 +74,10 @@ import qualified Text.Read.Lex as L -- | Ethereum value unit class (Read a, Show a, UnitSpec a, Fractional a) => Unit a where -- | Make a value from integer wei - fromWei :: Integer -> a + fromWei :: Integral b => b -> a -- | Convert a value to integer wei - toWei :: a -> Integer + toWei :: Integral b => a -> b -- | Unit specification class UnitSpec a where @@ -92,8 +92,8 @@ mkValue :: forall a b . (UnitSpec a, RealFrac b) => b -> Value a mkValue = MkValue . round . (* divider (Proxy :: Proxy a)) instance UnitSpec a => Unit (Value a) where - fromWei = MkValue - toWei = unValue + fromWei = MkValue . toInteger + toWei = fromInteger . unValue instance UnitSpec a => UnitSpec (Value a) where divider = const $ divider (Proxy :: Proxy a) diff --git a/stack.yaml b/stack.yaml index 2deb9912..44954202 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-12.12 +resolver: lts-12.14 # User packages to be built. packages: @@ -7,8 +7,9 @@ packages: # Extra package dependencies extra-deps: -- secp256k1-haskell-0.1.3 +- secp256k1-haskell-0.1.4 - relapse-1.0.0.0 +- vinyl-0.9.3 # Dependencies bounds pvp-bounds: both diff --git a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs index f45371d2..6e05ffda 100644 --- a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs +++ b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs @@ -31,8 +31,9 @@ import Control.Concurrent.MVar import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Reader (ask) -import Data.Default +import Data.Default (def) import Data.List (sort) +import Data.Monoid ((<>)) import Test.Hspec import qualified Network.Ethereum.Api.Eth as Eth From 217a9d6cb785c6907cc125095632a212faaf4925 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 26 Oct 2018 11:44:54 +0300 Subject: [PATCH 037/237] Temporary disable macOS build in TravisCI --- .travis.yml | 30 ++++++++++++------------------ package.yaml | 3 +-- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54af299b..0f107479 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,4 @@ -# Use new container infrastructure to enable caching. -sudo: false - -# Use nix build environment. +sudo: false language: nix # Caching so the next build will be fast too. @@ -24,19 +21,16 @@ matrix: compiler: ": #GHC 8.6.1" # Build on macOS in addition to Linux - - env: RESOLVER=lts-11.22 - compiler: ": #GHC 8.2.2" - os: osx - - env: RESOLVER=lts-12.14 - compiler: ": #GHC 8.4.3" - os: osx - - env: RESOLVER=nightly - compiler: ": #GHC 8.6.1" - os: osx - -install: -- curl -sSL https://get.haskellstack.org/ | sh -s - -d . -- ./stack --version + # - env: RESOLVER=lts-11.22 + # compiler: ": #GHC 8.2.2" + # os: osx + # - env: RESOLVER=lts-12.14 + # compiler: ": #GHC 8.4.3" + # os: osx + # - env: RESOLVER=nightly + # compiler: ": #GHC 8.6.1" + # os: osx script: -- ./stack test web3:unit --flag web3:solidity --nix --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER +- nix-shell -p stack --run \ + "stack test web3:unit --flag web3:solidity --nix --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER" diff --git a/package.yaml b/package.yaml index d3053e91..acae08e7 100644 --- a/package.yaml +++ b/package.yaml @@ -99,8 +99,7 @@ library: cpp-options: -DSOLIDITY_COMPILER dependencies: containers extra-libraries: solidity - cxx-options: -std=c++14 - cxx-sources: ./cbits/solidity_lite.cpp + c-sources: ./cbits/solidity_lite.cpp include-dirs: ./cbits tests: From f315cfd07fa6f63520d80ce9f5ce3dbae248e256 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 26 Oct 2018 13:06:50 +0300 Subject: [PATCH 038/237] Release 0.8.0.0 --- CHANGELOG.md | 2 +- package.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65d4d707..092a029e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog All notable changes to this project will be documented in this file. -## [0.8.0.0] 2018-10-** +## [0.8.0.0] 2018-10-26 ### Added - Support for Ethereum cryptography - Local private key transaction signer diff --git a/package.yaml b/package.yaml index acae08e7..5ca491d1 100644 --- a/package.yaml +++ b/package.yaml @@ -3,7 +3,7 @@ version: 0.8.0.0 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" -license: BSD-3-Clause +license: BSD3 license-file: LICENSE author: Alexander Krupenkin maintainer: mail@akru.me From a955e0f757470ce73280c6712b5f975380ec78c9 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 28 Oct 2018 23:44:40 +0300 Subject: [PATCH 039/237] Added "Ethereum node API" page to docs --- .gitignore | 1 + docs/Makefile | 1 + docs/conf.py | 70 +++++++++++++++++++++---------- docs/ethereum_accounts.rst | 2 + docs/ethereum_node_api.rst | 86 +++++++++++++++++++++++++++++++++++++- docs/getting_started.rst | 37 ++++++++++------ docs/index.rst | 3 +- 7 files changed, 164 insertions(+), 36 deletions(-) create mode 100644 docs/ethereum_accounts.rst diff --git a/.gitignore b/.gitignore index fedb4e0e..47bc7850 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ .DS_Store build/ dist/ +docs/_build web3.cabal diff --git a/docs/Makefile b/docs/Makefile index 298ea9e2..c704c6f4 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -4,6 +4,7 @@ # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build +SPHINXPROJ = hs-web3 SOURCEDIR = . BUILDDIR = _build diff --git a/docs/conf.py b/docs/conf.py index 76017035..400c85e8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,13 +20,13 @@ # -- Project information ----------------------------------------------------- project = 'hs-web3' -copyright = 'Alexander Krupenkin 2018-2016' +copyright = '2018, Alexander Krupenkin' author = 'Alexander Krupenkin' # The short X.Y version version = '0.8' # The full version, including alpha/beta/rc tags -release = '0.8-rc1' +release = '0.8.0.0' # -- General configuration --------------------------------------------------- @@ -38,7 +38,8 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = [ +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -61,11 +62,12 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. +# This pattern also affects html_static_path and html_extra_path . exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = None +pygments_style = 'sphinx' + # -- Options for HTML output ------------------------------------------------- @@ -99,29 +101,55 @@ # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'hs-web3-doc' +htmlhelp_basename = 'hs-web3doc' + + +# -- Options for LaTeX output ------------------------------------------------ + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'hs-web3.tex', 'hs-web3 Documentation', + 'Alexander Krupenkin', 'manual'), +] + # -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'hs-web3', 'Haskell Web3 Documentation', [author], 1) + (master_doc, 'hs-web3', 'hs-web3 Documentation', + [author], 1) ] -# -- Options for Epub output ------------------------------------------------- - -# Bibliographic Dublin Core info. -epub_title = project -# The unique identifier of the text. This can be a ISBN number -# or the project homepage. -# -# epub_identifier = '' - -# A unique identification for the text. -# -# epub_uid = '' +# -- Options for Texinfo output ---------------------------------------------- -# A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'hs-web3', 'hs-web3 Documentation', + author, 'hs-web3', 'One line description of project.', + 'Miscellaneous'), +] diff --git a/docs/ethereum_accounts.rst b/docs/ethereum_accounts.rst new file mode 100644 index 00000000..5d8811cd --- /dev/null +++ b/docs/ethereum_accounts.rst @@ -0,0 +1,2 @@ +Ethereum accounts +================= diff --git a/docs/ethereum_node_api.rst b/docs/ethereum_node_api.rst index b7e76bc0..c7422933 100644 --- a/docs/ethereum_node_api.rst +++ b/docs/ethereum_node_api.rst @@ -1,2 +1,84 @@ -Ethereum node interaction -========================= +Ethereum node API +================= + +Any Ethereum node can export their `Generic JSON-RPC `_. For connection with node **hs-web3** use internal tiny JSON-RPC client. + +.. note:: + + Tiny client library placed at ``Network.JsonRpc.TinyClient``. It exports special monad ``JsonRpc`` and function ``remote`` to define JSON-RPC methods. When developing tiny client I was inspired `HaXR library `_. + +Providers +~~~~~~~~~ + +To handle connection with Ethereum node some thing named **provider** is required. ``Provider`` data type define the endpoint of Ethereum node API. Module that export this type placed at ``Network.Ethereum.Api.Provider``. + +.. code-block:: haskell + + data Provider = HttpProvider String + +.. note:: + + Currently **hs-web3** support HTTP(S) providers only. + +Another interesting thing in this module is ``Web3`` type. + +.. code-block:: haskell + + newtype Web3 a = ... + instance Monad Web3 + instance JsonRpc Web3 + +As you can see ``Web3`` is monad that can handle JSON-RPC. It's very important because it can be used for any Ethereum node communication. + +.. note:: + + ``Web3`` is a `state monad `_ with ``JsonRpcClient`` type as a state. This is mean that you can modify JSON-RPC server URI in runtime using `MTL lenses `_ for example. + +Finally provider module exports ``runWeb3`` and party functions. + +.. code-block:: haskell + + runWeb3' :: MonadIO m => Provider -> Web3 a -> m (Either Web3Error a) + + runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a) + runWeb3 = runWeb3' def + +.. note:: + + Function ``runWeb3`` run default provider at **http://localhost:8545**. + +Lets try to call custom Ethereum node URI with ``runWeb3'`` function using ``ghci``. + +.. code-block:: haskell + + > import Network.Ethereum.Api.Provider + > import qualified Network.Ethereum.Api.Eth as Eth + > runWeb3' (HttpProvider "http://localhost:9545") Eth.blockNumber + +It can be useful to define function with custom Ethereum node endpoint location. + +.. code-block:: haskell + + myNode :: Web3 a -> Either Web3Error a + myNode = runWeb3' (HttpProvider "http://my-host-name:8545") + +API Reference +~~~~~~~~~~~~~ + +Currently implemented the following Ethereum APIs in modules: + + =============== ================ + Method prefix Implementation + =============== ================ + ``eth_*`` `Network.Ethereum.Api.Eth `_ + ``net_*`` `Network.Ethereum.Api.Net `_ + ``web3_*`` `Network.Ethereum.Api.Web3 `_ + ``personal_*`` `Network.Ethereum.Api.Personal `_ + =============== ================ + +All modules use descriptive types according to official Ethereum specification. It placed at `Network.Ethereum.Api.Types `_. + +.. note:: + + See classic API reference at `Hackage web3 page `_. + diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 6199ed2a..8e1cab32 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -1,43 +1,56 @@ Getting started =============== +.. note:: + **hs-web3** is a Haskell library. Of course you should have some knowledge about Haskell and platform tools like a `cabal` or `stack`. If you have not - `Real World Haskell `_ and `Learn You a Haskell for Great Good `_ is a good point to begin. + Installation ~~~~~~~~~~~~ -Using `Stackage `_ +**Simplest way** is using `Stackage `_ with `Nix `_ integration. + +.. code-block:: bash + + stack install web3 --nix - stack install web3 +Dependencies for building from source without Nix: + +- `zlib `_ +- `secp256k1 `_ +- optional: `solidity `_ Quick start ~~~~~~~~~~~ -Lets import library entrypoint modules using `ghci`: +Lets import library entrypoint modules using ``ghci``: .. code-block:: haskell > import Network.Ethereum.Web3 - > import qualified Network.Ethereum.Api.Web3 as Web3 + > import qualified Network.Ethereum.Api.Eth as Eth .. note:: - We recomends to import `Network.Ethereun.Api.Web3` as **qualified**, because it has name similar to their prefix in JSON-RPC API. + I recomend to import `Network.Ethereun.Api.Eth` as **qualified**, because it has name similar to their prefix in JSON-RPC API. -Looks anything in `Web3` API: +Looks anything in ``Eth`` API: .. code-block:: haskell - > :t Web3.clientVersion - Web3.clientVersion :: JsonRpc m => m Text + > :t Eth.blockNumber + Eth.blockNumber :: JsonRpc m => m Quantity -To run it use `Web3` provider monad: +To run it use ``runWeb3`` function: .. code-block:: haskell > :t runWeb3 runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a) - > runWeb3 Web3.clientVersion - Right "Parity-Ethereum//v2.0.3-unstable/x86_64-linux-gnu/rustc1.29.0" + > runWeb3 Eth.blockNumber + Right 6601059 .. note:: - Function ``runWeb3`` use default provider at **http://localhost:8545**, for using custom providers try ``runWeb3'``. + + Function ``runWeb3`` run default provider at **http://localhost:8545**, for using custom providers try to use ``runWeb3'``. + diff --git a/docs/index.rst b/docs/index.rst index d65a536f..8b3e04c7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,13 +1,14 @@ Haskell Web3 Documentation ========================== -The Haskell Ethereum API which implements the `Generic JSON RPC `_. +**hs-web3** is a Haskell library for interacting with Ethereum. It implements `Generic JSON-RPC `_ client for most popular Ethereum nodes: `parity-ethereum `_ and `go-ethereum `_. .. toctree:: :caption: User documentation getting_started ethereum_node_api + ethereum_accounts smart_contracts .. toctree:: From 10201e5cb8d68890387f877eaf2872ec8987f802 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 29 Oct 2018 14:15:48 +0300 Subject: [PATCH 040/237] Added vinyl-0.10 support --- .travis.yml | 18 +++---- package.yaml | 2 +- .../Ethereum/Contract/Event/MultiFilter.hs | 51 ++++++++++++++++++- stack.yaml | 1 - 4 files changed, 59 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f107479..f7a54ff4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,25 +7,23 @@ cache: - $HOME/.stack - $TRAVIS_BUILD_DIR/.stack-work -# The different configurations we want to test. We have BUILD=cabal which uses -# cabal-install, and BUILD=stack which uses Stack. More documentation on each -# of those below. +# The different configurations we want to test. matrix: include: - # Build with different GHC versions - - env: RESOLVER=lts-11.22 + # Build with different GHC versions and stable package sets + - env: RESOLVER=lts-11 compiler: ": #GHC 8.2.2" - - env: RESOLVER=lts-12.14 - compiler: ": #GHC 8.4.3" + - env: RESOLVER=lts-12 + compiler: ": #GHC 8.4.4" - env: RESOLVER=nightly compiler: ": #GHC 8.6.1" # Build on macOS in addition to Linux - # - env: RESOLVER=lts-11.22 + # - env: RESOLVER=lts-11 # compiler: ": #GHC 8.2.2" # os: osx - # - env: RESOLVER=lts-12.14 - # compiler: ": #GHC 8.4.3" + # - env: RESOLVER=lts-12 + # compiler: ": #GHC 8.4.4" # os: osx # - env: RESOLVER=nightly # compiler: ": #GHC 8.6.1" diff --git a/package.yaml b/package.yaml index 5ca491d1..b2185271 100644 --- a/package.yaml +++ b/package.yaml @@ -47,7 +47,7 @@ dependencies: - memory >=0.14.11 && <0.15 - cereal >=0.5.4.0 && <0.6 - aeson >=1.1.2.0 && <1.5 -- vinyl >=0.5.3 && <0.10 +- vinyl >=0.5.3 && <0.11 - async >=2.1.1.1 && <2.3 - text >=1.2.2.2 && <1.3 - mtl >=2.2.1 && <2.3 diff --git a/src/Network/Ethereum/Contract/Event/MultiFilter.hs b/src/Network/Ethereum/Contract/Event/MultiFilter.hs index 6ebed107..699476aa 100644 --- a/src/Network/Ethereum/Contract/Event/MultiFilter.hs +++ b/src/Network/Ethereum/Contract/Event/MultiFilter.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} @@ -64,7 +65,6 @@ import Data.Machine.Plan (PlanT, stop, yield) import Data.Maybe (catMaybes, fromJust, listToMaybe) import Data.Monoid ((<>)) -import Data.Proxy (Proxy (..)) import Data.Tagged (Tagged (..)) import Data.Vinyl (Rec ((:&), RNil), RecApplicative) @@ -75,7 +75,12 @@ import Data.Vinyl.CoRec (CoRec (..), Field, onField) import Data.Vinyl.Functor (Compose (..), Identity (..)) +#if MIN_VERSION_vinyl(0,10,0) +import Data.Vinyl (RPureConstrained) +#else +import Data.Proxy (Proxy (..)) import Data.Vinyl.TypeLevel (AllAllSat) +#endif import Data.Solidity.Event (DecodeEvent (..)) import qualified Network.Ethereum.Api.Eth as Eth @@ -119,7 +124,11 @@ multiEvent :: ( PollFilters es , QueryAllLogs es , MapHandlers Web3 es (WithChange es) +#if MIN_VERSION_vinyl(0,10,0) + , RPureConstrained HasLogIndex (WithChange es) +#else , AllAllSat '[HasLogIndex] (WithChange es) +#endif , RecApplicative (WithChange es) ) => MultiFilter es @@ -131,7 +140,11 @@ multiEvent' :: ( PollFilters es , QueryAllLogs es , MapHandlers Web3 es (WithChange es) +#if MIN_VERSION_vinyl(0,10,0) + , RPureConstrained HasLogIndex (WithChange es) +#else , AllAllSat '[HasLogIndex] (WithChange es) +#endif , RecApplicative (WithChange es) ) => MultiFilter es @@ -150,7 +163,11 @@ multiEventMany' :: ( PollFilters es , QueryAllLogs es , MapHandlers Web3 es (WithChange es) +#if MIN_VERSION_vinyl(0,10,0) + , RPureConstrained HasLogIndex (WithChange es) +#else , AllAllSat '[HasLogIndex] (WithChange es) +#endif , RecApplicative (WithChange es) ) => MultiFilter es @@ -238,13 +255,21 @@ instance HasLogIndex (FilterChange e) where (,) <$> changeBlockNumber filterChangeRawChange <*> changeLogIndex filterChangeRawChange sortChanges +#if MIN_VERSION_vinyl(0,10,0) + :: ( RPureConstrained HasLogIndex es +#else :: ( AllAllSat '[HasLogIndex] es +#endif , RecApplicative es ) => [Field es] -> [Field es] sortChanges changes = +#if MIN_VERSION_vinyl(0,10,0) + let sorterProj change = onField @HasLogIndex getLogIndex change +#else let sorterProj change = onField (Proxy @'[HasLogIndex]) getLogIndex change +#endif in sortOn sorterProj changes class MapHandlers m es es' where @@ -293,7 +318,11 @@ reduceMultiEventStream filterChanges handlers = fmap listToMaybe . runT $ playMultiLogs :: forall es k. ( QueryAllLogs es +#if MIN_VERSION_vinyl(0,10,0) + , RPureConstrained HasLogIndex (WithChange es) +#else , AllAllSat '[HasLogIndex] (WithChange es) +#endif , RecApplicative (WithChange es) ) => MultiFilterStreamState es @@ -342,7 +371,11 @@ instance forall e i ni es. pollMultiFilter :: ( PollFilters es , RecApplicative (WithChange es) +#if MIN_VERSION_vinyl(0,10,0) + , RPureConstrained HasLogIndex (WithChange es) +#else , AllAllSat '[HasLogIndex] (WithChange es) +#endif ) => TaggedFilterIds es -> DefaultBlock @@ -368,7 +401,11 @@ pollMultiFilter is = construct . pollPlan is multiEventNoFilter :: ( QueryAllLogs es , MapHandlers Web3 es (WithChange es) +#if MIN_VERSION_vinyl(0,10,0) + , RPureConstrained HasLogIndex (WithChange es) +#else , AllAllSat '[HasLogIndex] (WithChange es) +#endif , RecApplicative (WithChange es) ) => MultiFilter es @@ -379,7 +416,11 @@ multiEventNoFilter fltrs = forkWeb3 . multiEventNoFilter' fltrs multiEventNoFilter' :: ( QueryAllLogs es , MapHandlers Web3 es (WithChange es) +#if MIN_VERSION_vinyl(0,10,0) + , RPureConstrained HasLogIndex (WithChange es) +#else , AllAllSat '[HasLogIndex] (WithChange es) +#endif , RecApplicative (WithChange es) ) => MultiFilter es @@ -391,7 +432,11 @@ multiEventNoFilter' fltrs = multiEventManyNoFilter' fltrs 0 multiEventManyNoFilter' :: ( QueryAllLogs es , MapHandlers Web3 es (WithChange es) +#if MIN_VERSION_vinyl(0,10,0) + , RPureConstrained HasLogIndex (WithChange es) +#else , AllAllSat '[HasLogIndex] (WithChange es) +#endif , RecApplicative (WithChange es) ) => MultiFilter es @@ -447,7 +492,11 @@ newMultiFilterStream initialPlan = do playNewMultiLogs :: forall es k. ( QueryAllLogs es +#if MIN_VERSION_vinyl(0,10,0) + , RPureConstrained HasLogIndex (WithChange es) +#else , AllAllSat '[HasLogIndex] (WithChange es) +#endif , RecApplicative (WithChange es) ) => MultiFilterStreamState es diff --git a/stack.yaml b/stack.yaml index 44954202..bea0f6d1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -9,7 +9,6 @@ packages: extra-deps: - secp256k1-haskell-0.1.4 - relapse-1.0.0.0 -- vinyl-0.9.3 # Dependencies bounds pvp-bounds: both From badc8ea95d3bbf8ecefe9b9f7700163bcb84cba1 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 29 Oct 2018 14:16:25 +0300 Subject: [PATCH 041/237] Fix compiler test when compiler is not enabled --- unit/Language/Solidity/Test/CompilerSpec.hs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/unit/Language/Solidity/Test/CompilerSpec.hs b/unit/Language/Solidity/Test/CompilerSpec.hs index fbbf3ba1..e6056026 100644 --- a/unit/Language/Solidity/Test/CompilerSpec.hs +++ b/unit/Language/Solidity/Test/CompilerSpec.hs @@ -1,11 +1,15 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} module Language.Solidity.Test.CompilerSpec where -import Language.Solidity.Compiler import Test.Hspec +#ifdef SOLIDITY_COMPILER + +import Language.Solidity.Compiler + spec :: Spec spec = describe "solidity" $ do it "can compile empty contract" $ do @@ -19,3 +23,10 @@ spec = describe "solidity" $ do it "can compile simple contract" $ do compile (Sources [("SimpleStorage", "contract SimpleStorage { uint256 public a; function set(uint256 _a) { a = _a; } }")] [] True) `shouldBe` Right [("SimpleStorage", ("[\n\t{\n\t\t\"constant\" : true,\n\t\t\"inputs\" : [],\n\t\t\"name\" : \"a\",\n\t\t\"outputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"view\",\n\t\t\"type\" : \"function\"\n\t},\n\t{\n\t\t\"constant\" : false,\n\t\t\"inputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"_a\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"name\" : \"set\",\n\t\t\"outputs\" : [],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"nonpayable\",\n\t\t\"type\" : \"function\"\n\t}\n]\n", "608060405234801561001057600080fd5b5060dc8061001f6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dbe671f14604e57806360fe47b1146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b80600081905550505600a165627a7a7230582053764f3cc73b0960abb0d97899a8133bee5eb98c131978821f7add85f33d4f2e0029"))] + +#else + +spec :: Spec +spec = describe "solidity compiler is not enabled" $ return () + +#endif From 973f64fab4a2832716c19e63f026fc4b942e232a Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 29 Oct 2018 14:17:34 +0300 Subject: [PATCH 042/237] Release 0.8.1.0 --- CHANGELOG.md | 4 ++++ package.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 092a029e..9b3e4fd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.8.1.0] 2018-10-29 +### Added +- Support vinyl-0.10 in `MultiFilter` module + ## [0.8.0.0] 2018-10-26 ### Added - Support for Ethereum cryptography diff --git a/package.yaml b/package.yaml index b2185271..e53e4e5e 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 0.8.0.0 +version: 0.8.1.0 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" From 0fef9207b87df6b55b065953fb002ab49bb7c419 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 3 Nov 2018 11:10:24 +0300 Subject: [PATCH 043/237] Added "ENS" and "Ethereum accounts" doc pages --- docs/ens.rst | 24 +++++++ docs/ethereum_accounts.rst | 142 +++++++++++++++++++++++++++++++++++++ docs/ethereum_node_api.rst | 10 +-- docs/index.rst | 1 + 4 files changed, 172 insertions(+), 5 deletions(-) create mode 100644 docs/ens.rst diff --git a/docs/ens.rst b/docs/ens.rst new file mode 100644 index 00000000..26534a2c --- /dev/null +++ b/docs/ens.rst @@ -0,0 +1,24 @@ +Ethereum Name Service +===================== + +`ENS `_ offers a secure & decentralised way to address resources both on and off the blockchain using simple, human-readable names. + +.. note:: + + Experimental ENS on Ethereum mainnet added in release ``0.8``. + +For resolving addresses from ENS names please use ``resolve`` function from `Network.Ethereum.Ens `_. + +.. code-block:: haskell + + import qualified Network.Ethereum.Ens as Ens + import Network.Ethereum.Web3 + import Lens.Micro ((.~)) + + main = runWeb3 $ withAccount () $ do + alice <- Ens.resolve "aliceaccount.eth" + + withParam (to .~ alice) $ + withParam (value .~ (1 :: Ether)) $ + send () + diff --git a/docs/ethereum_accounts.rst b/docs/ethereum_accounts.rst index 5d8811cd..35297dfa 100644 --- a/docs/ethereum_accounts.rst +++ b/docs/ethereum_accounts.rst @@ -1,2 +1,144 @@ Ethereum accounts ================= + +.. note:: + + `Ethereum whitepaper `_ mention two types of accounts: smart contract and external owned account (EOA). But EOA only can send transaction to network. In this page EOA managing and generalized transaction sending is described. + +**hs-web3** support a few kinds of EOA described in table below. + + ============== ======================================================================= + Type Description + ============== ======================================================================= + Default_ typically first of node accounts list, **should be unlocked** + Personal_ available via ``personal_*`` JSON-RPC, **password required** + PrivateKey_ derived from secp256k1 private key, use JSON-RPC `sendRawTransaction` + ============== ======================================================================= + +.. _Default: http://hackage.haskell.org/package/web3-0.8.1.0/docs/Network-Ethereum-Account-Default.html +.. _Personal: http://hackage.haskell.org/package/web3-0.8.1.0/docs/Network-Ethereum-Account-Personal.html +.. _PrivateKey: http://hackage.haskell.org/package/web3-0.8.1.0/docs/Network-Ethereum-Account-PrivateKey.html + +All of them has an instance for `Account `_ typeclass. + +.. code-block:: haskell + + class MonadTrans t => Account a t | t -> a where + -- | Run computation with given account credentials + withAccount :: JsonRpc m => a -> t m b -> m b + + -- | Send transaction to contract, like a 'write' command + send :: (JsonRpc m, Method args) => args -> t m TxReceipt + + -- | Call constant method of contract, like a 'read' command + call :: (JsonRpc m, Method args, AbiGet result) => args -> t m result + +The ``Account`` is a `multi-parameter typeclass `_ that define most important EOA actions. + +Account managing +~~~~~~~~~~~~~~~~ + +The first parameter of ``Account`` typeclass is an account internal params presended as independent data type. + +.. code-block:: haskell + + -- | Unlockable node managed account params + data Personal = Personal + { personalAddress :: !Address + , personalPassphrase :: !Passphrase + } deriving (Eq, Show) + +In this example ``Personal`` data contains of two params: personal account address and password. For using account credentials ``Account`` typeclass provide special function ``withAccount``. + +.. code-block:: haskell + + -- | Run computation with given account credentials + withAccount :: JsonRpc m => a -> t m b -> m b + +``withAccount`` function takes two arguments: account initialization parameters (some credentials like a password or private key) and computation to run it in given account context. Finally it returns ``JsonRpc`` computation that can be runned using any web3 provider. + +.. code-block:: haskell + + runWeb3 $ do + + -- Run with default account context + withAccount () $ ... + + -- Run with personal account context + withAccount (Personal "0x..." "password") $ ... + + +Transaction sending +~~~~~~~~~~~~~~~~~~~ + + +The second parameter of ``Account`` typeclass is transaction parametrization monad. This monad do one thing - prepare transaction parameters before call. + +.. note:: + + Transaction sending diagram by layer looks like ``provider -> account -> transaction``, provider at low level, account at middle layer and transaction former at high level. + +``withParam`` is a special function, it behaviour is very similar to ``withStateT`` function. It used to set parameters of transaction locally and revert params after out of scope. + +.. code-block:: haskell + + withParam :: Account p (AccountT p) + => (CallParam p -> CallParam p) + -> AccountT p m a + -> AccountT p m a + +The first argument of ``withParam`` function is state transition function, second - the computation to run in context of changed state. ``CallParam`` helps to parametrize transaction sending, `lenses `_ is very useful for this purpose. + +.. code-block:: haskell + + runWeb3 $ + withAccount () $ + withParam (to .~ alice) $ + ... + +Where lens ``to`` is used for setting transaction recipient address. All transaction parametrization lenses presended in table below. + + ============================================================================================================ ====================== + Lens Description + ============================================================================================================ ====================== + `to `_ Recipient address + `value `_ Transaction value + `gasLimit `_ Execution gas limit + `gasPrice `_ Gas price + `block `_ Execution block (for call only) + `account `_ Account credentials + ============================================================================================================ ====================== + +.. note:: + + By default transaction gas limit estimated according to transaction input but it also can be set manually. + +Finally for sending transactions ``Account`` typeclass provide two functions: + +.. code-block:: haskell + + -- | Send transaction to contract, like a 'write' command + send :: (JsonRpc m, Method args) => args -> t m TxReceipt + + -- | Call constant method of contract, like a 'read' command + call :: (JsonRpc m, Method args, AbiGet result) => args -> t m result + +.. note:: + + Functions above can be run in account context only and transaction parameters should be set before. + +Safe transactions +~~~~~~~~~~~~~~~~~ + +Default behaviour of ``send`` function is send transaction and waiting for transaction receipt. It does mean that transaction is already in blockchain when execution flow get back. But finalization in Ethereum is probabilistic. For this reason waiting for some count of confirmation is a good practics for safe transaction sending. + +.. note:: + + Vitalik Buterin `blog post `_ describe how much confirmation is required for high probability of transaction finality. For using this value import ``safeConfirmations`` from ``Network.Ethereum.Account.Safe`` module. + +Module ``Network.Ethereum.Account.Safe`` implements function ``safeSend``. It very similar to ``send`` but take count of transaction confirmation as first argument. + +.. code-block:: haskell + + send = safeSend 0 + diff --git a/docs/ethereum_node_api.rst b/docs/ethereum_node_api.rst index c7422933..bc3bc2b2 100644 --- a/docs/ethereum_node_api.rst +++ b/docs/ethereum_node_api.rst @@ -70,13 +70,13 @@ Currently implemented the following Ethereum APIs in modules: =============== ================ Method prefix Implementation =============== ================ - ``eth_*`` `Network.Ethereum.Api.Eth `_ - ``net_*`` `Network.Ethereum.Api.Net `_ - ``web3_*`` `Network.Ethereum.Api.Web3 `_ - ``personal_*`` `Network.Ethereum.Api.Personal `_ + ``eth_*`` `Network.Ethereum.Api.Eth `_ + ``net_*`` `Network.Ethereum.Api.Net `_ + ``web3_*`` `Network.Ethereum.Api.Web3 `_ + ``personal_*`` `Network.Ethereum.Api.Personal `_ =============== ================ -All modules use descriptive types according to official Ethereum specification. It placed at `Network.Ethereum.Api.Types `_. +All modules use descriptive types according to official Ethereum specification. It placed at `Network.Ethereum.Api.Types `_. .. note:: diff --git a/docs/index.rst b/docs/index.rst index 8b3e04c7..b0a77a22 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,7 @@ Haskell Web3 Documentation ethereum_node_api ethereum_accounts smart_contracts + ens .. toctree:: :caption: Developer documentation From ac6c127227c0a5a301505c12aef4aecb3a0bbd7a Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 7 Nov 2018 13:38:37 +0300 Subject: [PATCH 044/237] Disable transaction gas estimation when limit is set, fix #89 --- src/Network/Ethereum/Account/Default.hs | 7 +++++-- src/Network/Ethereum/Account/Internal.hs | 8 ++++---- src/Network/Ethereum/Account/Personal.hs | 7 +++++-- src/Network/Ethereum/Account/PrivateKey.hs | 7 +++++-- test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs | 12 ++++++++++++ 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/Network/Ethereum/Account/Default.hs b/src/Network/Ethereum/Account/Default.hs index 0ff9dedd..3da87f59 100644 --- a/src/Network/Ethereum/Account/Default.hs +++ b/src/Network/Ethereum/Account/Default.hs @@ -53,8 +53,11 @@ instance Account () DefaultAccount where params = c { callData = Just $ BA.convert dat , callFrom = listToMaybe accounts } - gasLimit <- Eth.estimateGas params - let params' = params { callGas = Just gasLimit } + params' <- case callGas params of + Just _ -> return params + Nothing -> do + gasLimit <- Eth.estimateGas params + return $ params { callGas = Just gasLimit } getReceipt =<< Eth.sendTransaction params' diff --git a/src/Network/Ethereum/Account/Internal.hs b/src/Network/Ethereum/Account/Internal.hs index 6f34281d..a88c2e3d 100644 --- a/src/Network/Ethereum/Account/Internal.hs +++ b/src/Network/Ethereum/Account/Internal.hs @@ -63,12 +63,12 @@ value :: Unit value => Lens' (CallParam p) value value = lens (fromWei . _value) $ \a b -> a { _value = toWei b } -- | Transaction gas limit lens -gasLimit :: Lens' (CallParam p) (Maybe Integer) -gasLimit = lens _gasLimit $ \a b -> a { _gasLimit = b } +gasLimit :: Lens' (CallParam p) Integer +gasLimit = lens (fromMaybe def . _gasLimit) $ \a b -> a { _gasLimit = Just b } -- | Transaction gas price lens -gasPrice :: Unit gasprice => Lens' (CallParam p) (Maybe gasprice) -gasPrice = lens (fmap fromWei . _gasPrice) $ \a b -> a { _gasPrice = toWei <$> b } +gasPrice :: Unit gasprice => Lens' (CallParam p) gasprice +gasPrice = lens (fromWei . fromMaybe def . _gasPrice) $ \a b -> a { _gasPrice = Just (toWei b) } -- | Call execution block lens block :: Lens' (CallParam p) DefaultBlock diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs index b97a84fe..fe76a381 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/src/Network/Ethereum/Account/Personal.hs @@ -63,8 +63,11 @@ instance Account Personal PersonalAccount where params = c { callFrom = Just $ personalAddress _account , callData = Just $ BA.convert dat } - gasLimit <- Eth.estimateGas params - let params' = params { callGas = Just gasLimit } + params' <- case callGas params of + Just _ -> return params + Nothing -> do + gasLimit <- Eth.estimateGas params + return $ params { callGas = Just gasLimit } getReceipt =<< Personal.sendTransaction params' (personalPassphrase _account) diff --git a/src/Network/Ethereum/Account/PrivateKey.hs b/src/Network/Ethereum/Account/PrivateKey.hs index f7c83e9c..15f2fce9 100644 --- a/src/Network/Ethereum/Account/PrivateKey.hs +++ b/src/Network/Ethereum/Account/PrivateKey.hs @@ -75,8 +75,11 @@ instance Account PrivateKey PrivateKeyAccount where , callNonce = Just nonce , callData = Just $ convert dat } - gasLimit <- lift $ Eth.estimateGas params - let params' = params { callGas = Just gasLimit } + params' <- case callGas params of + Just _ -> return params + Nothing -> do + gasLimit <- lift $ Eth.estimateGas params + return $ params { callGas = Just gasLimit } let signed = signTransaction params' (privateKeyChain _account) (privateKey _account) lift $ getReceipt =<< Eth.sendRawTransaction signed diff --git a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs index 6e05ffda..6605a334 100644 --- a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs +++ b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs @@ -8,6 +8,7 @@ {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} +{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} @@ -34,6 +35,7 @@ import Control.Monad.Trans.Reader (ask) import Data.Default (def) import Data.List (sort) import Data.Monoid ((<>)) +import Lens.Micro ((.~)) import Test.Hspec import qualified Network.Ethereum.Api.Eth as Eth @@ -78,6 +80,16 @@ interactions = describe "can interact with a SimpleStorage contract" $ do v <- contract storage count v `shouldBe` theValue + it "can set transaction gas limit" $ \storage -> do + TxReceipt{..} <- contract storage $ withParam (gasLimit .~ 500000) $ setCount theValue + Just Transaction{..} <- web3 $ Eth.getTransactionByHash receiptTransactionHash + txGas `shouldBe` 500000 + + it "can estimate transaction gas limit" $ \storage -> do + TxReceipt{..} <- contract storage $ setCount theValue + Just Transaction{..} <- web3 $ Eth.getTransactionByHash receiptTransactionHash + txGas `shouldBe` 42822 + events :: SpecWith Address events = do describe "can interact with a SimpleStorage contract across block intervals" $ do From b28c046c5cb2e9fd3321653645193f80225a3dba Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 11 Nov 2018 15:40:04 +0300 Subject: [PATCH 045/237] Bump version --- CHANGELOG.md | 5 +++++ package.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b3e4fd2..d2b31f97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.8.2.0] 2018-11-07 +### Changed +- Gas estimation runs when gas limit is not set before + ## [0.8.1.0] 2018-10-29 ### Added - Support vinyl-0.10 in `MultiFilter` module @@ -15,6 +19,7 @@ All notable changes to this project will be documented in this file. - Experimental support for solidity compiler (disabled by default) - Support for Ethereum mainnet ENS resolver - Contract typeclass with api/bytecode getters +- Gas estimation for sending transactions - Contract typeclass TH generator - Function for creating contracts - Event single/multi filters diff --git a/package.yaml b/package.yaml index e53e4e5e..b90c2667 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 0.8.1.0 +version: 0.8.2.0 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" From 67db0c6d67c14ad27c80a072ffd4c5933bfefdc0 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 12 Nov 2018 12:36:43 +0300 Subject: [PATCH 046/237] Added smart contract doc page; Added stack.yaml to build token example --- docs/smart_contracts.rst | 92 ++++++++++++++++++++++++++++++++----- examples/token/ERC20.hs | 2 +- examples/token/Main.hs | 7 ++- examples/token/package.yaml | 25 ++++++++++ examples/token/stack.yaml | 71 ++++++++++++++++++++++++++++ stack.yaml | 2 +- 6 files changed, 181 insertions(+), 18 deletions(-) create mode 100644 examples/token/package.yaml create mode 100644 examples/token/stack.yaml diff --git a/docs/smart_contracts.rst b/docs/smart_contracts.rst index f8826014..361805c5 100644 --- a/docs/smart_contracts.rst +++ b/docs/smart_contracts.rst @@ -1,21 +1,89 @@ Smart contracts =============== -`Quasiquotation `_ is used to parse contract ABI or load from JSON file. `TemplateHaskell `_ driven Haskell contract API generator can automatical create ABI encoding instances and contract method helpers. +If Ethereum is a World Computer then smart contract is a program for that. **hs-web3** provide functions and abstractions to compile, deploy and interact with smart contracts. + +.. note:: + + Currently **Solidity** is de facto standard for Ethereum smart contract development. Please read `intro `_ to get more knowledge about Solidity smart contracts. + +Contract ABI +~~~~~~~~~~~~ + +One of the most important thing that Solidity introduce is a `contract Application Binary Interface `_. ABI is a standard for smart contract communication, both from outside the Ethereum and for contract-to-contract interaction. In hs-web3 `Quasiquotation `_ is used to parse contract JSON ABI or load from file. `TemplateHaskell `_ driven generator creates ABI encoding instances and contract method helpers automatically. + +.. code-block:: haskell + + {-# LANGUAGE DataKinds #-} + {-# LANGUAGE DeriveGeneric #-} + {-# LANGUAGE FlexibleContexts #-} + {-# LANGUAGE FlexibleInstances #-} + {-# LANGUAGE MultiParamTypeClasses #-} + {-# LANGUAGE OverloadedStrings #-} + {-# LANGUAGE QuasiQuotes #-} + module ERC20 where + + import Network.Ethereum.Contract.TH + + [abiFrom|ERC20.json|] + +Using Solidity contract ABI generator creates helper functions like a ``transfer`` and ``balanceOf``. .. code-block:: haskell - > :set -XQuasiQuotes - > import Network.Ethereum.Contract.TH - > putStr [abiFrom|data/sample.json|] - Contract: - Events: - Action1(address,uint256) - Action2(string,uint256) - Methods: - 0x03de48b3 runA1() - 0x90126c7a runA2(string,uint256) + transfer :: (JsonRpc m, Account a t, Functor (t m)) => Address -> UIntN 256 -> t m TxReceipt + balanceOf :: (JsonRpc m, Account a t, Functor (t m)) => Address -> t m (UIntN 256) + .. note:: - Use ``-ddump-splices`` to see generated code during compilation or in GHCi. See `examples `_ for more use cases. + Use ``-ddump-splices`` to see generated code during compilation or in GHCi. + +Helper functions wraps building and sending transaction with given argument and `function selector `_. This behaviour is very similar to `web3.js contract object `_. + +ABI encoding +~~~~~~~~~~~~ + +To build transaction input from Solidity method call special encoding is used. **hs-web3** implements Solidity ABI encoding for `primitive `_ and composed types. Codecs are placed at ``Data.Solidity.Abi.Codec``. + +.. code-block:: haskell + + encode :: (AbiPut a, ByteArray ba) => a -> ba + + decode :: (ByteArrayAccess ba, AbiGet a) => ba -> Either String a + +.. note:: + + When I develop codecs I was inspired by `cereal `_ library. As result ``AbiGet`` and ``AbiPut`` classes are analogue to cereal ``Serialize``. + +Primitive solidity types are placed at ``Data.Solidity.Prim``, this module exports types like an ``Address`` or ``UIntN``. + +.. code-block:: haskell + + > import Data.Solidity.Prim + > import Data.Solidity.Abi.Codec + > encode (42 :: UIntN 128) :: HexString + HexString "0x000000000000000000000000000000000000000000000000000000000000002a" + > encode (42 :: IntN 256, "Hello" :: Text) :: HexString + HexString "0x000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000" + +Contract deployment +~~~~~~~~~~~~~~~~~~~ + +To deploy smart contract special function with name ``new`` is used. + +.. code-block:: haskell + + -- | Create new smart contract on blockchain + new :: (Account p t, JsonRpc m, Method a, Monad (t m)) + => a + -- ^ Contract constructor + -> t m (Maybe Address) + -- ^ Address of deployed contract when transaction success + +This function use ``Method`` instance of contract constructor (``*Contract`` data type) to encode transaction input and send it without destination to create new contract. + +.. code-block:: haskell + + Just address <- runWeb3 $ withAccount () $ withParam id $ new SimpleStorageContract + diff --git a/examples/token/ERC20.hs b/examples/token/ERC20.hs index 75c1a11f..418f7bf7 100644 --- a/examples/token/ERC20.hs +++ b/examples/token/ERC20.hs @@ -9,4 +9,4 @@ module ERC20 where import Network.Ethereum.Contract.TH -[abiFrom|examples/ERC20.json|] +[abiFrom|ERC20.json|] diff --git a/examples/token/Main.hs b/examples/token/Main.hs index 0fc675fd..76f20859 100644 --- a/examples/token/Main.hs +++ b/examples/token/Main.hs @@ -5,6 +5,7 @@ import Data.Default (def) import Data.Text (unpack) import Text.Printf (printf) +import Lens.Micro ((.~)) import Network.Ethereum.Account import Network.Ethereum.Web3 hiding (name) @@ -14,14 +15,12 @@ main :: IO () main = do result <- runWeb3 $ withAccount () $ - airaToken $ do + withParam (to .~ "0xA2f4FCb0FDe2dD59f7a1873e121bc5623e3164Eb") $ do n <- name s <- symbol d <- decimals return $ printf "Token %s with symbol %s and decimals %d" (unpack n) (unpack s) (fromIntegral d :: Int) case result of - Left err -> error err + Left err -> error (show err) Right info -> putStrLn info - where - airaToken = withParam $ to .~ "0xA2f4FCb0FDe2dD59f7a1873e121bc5623e3164Eb" diff --git a/examples/token/package.yaml b/examples/token/package.yaml new file mode 100644 index 00000000..7fdd32f0 --- /dev/null +++ b/examples/token/package.yaml @@ -0,0 +1,25 @@ +name: example-erc20 +version: 0.0.0.0 +synopsis: ERC20 token example +github: "airalab/hs-web3" +license: BSD3 +author: Alexander Krupenkin +maintainer: mail@akru.me +copyright: "(c) Alexander Krupenkin 2016" +category: Network + +dependencies: +- base +- data-default +- microlens +- text +- web3 + +executables: + example-erc20: + main: Main.hs + source-dirs: ./ + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/examples/token/stack.yaml b/examples/token/stack.yaml new file mode 100644 index 00000000..75233df9 --- /dev/null +++ b/examples/token/stack.yaml @@ -0,0 +1,71 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# https://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# +# The location of a snapshot can be provided as a file or url. Stack assumes +# a snapshot provided as a file might change, whereas a url resource does not. +# +# resolver: ./custom-snapshot.yaml +# resolver: https://example.com/snapshots/2018-01-01.yaml +resolver: lts-12.17 + +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# - location: +# git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# subdirs: +# - auto-update +# - wai +packages: +- . +- ../.. +# Dependency packages to be pulled from upstream that are not in the resolver +# using the same syntax as the packages field. +# (e.g., acme-missiles-0.3) +extra-deps: +- relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c +- secp256k1-haskell-0.1.4@sha256:6eaf6a0909293be49e7de1c9b2a9ad1cc7eed8f3d2829ea23dc4771d81bcef57 + +# Override default flag values for local packages and extra-deps +# flags: {} + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=1.9" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor +nix: + packages: + - zlib + - secp256k1 diff --git a/stack.yaml b/stack.yaml index bea0f6d1..b580a737 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-12.14 +resolver: lts-12.17 # User packages to be built. packages: From 2417b1a857710bbc59e4581dea694dfb40894366 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 13 Nov 2018 01:55:12 +0300 Subject: [PATCH 047/237] Fix generics-sop bounds for commercialhaskell/stackage#4127 --- package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.yaml b/package.yaml index b90c2667..4399121e 100644 --- a/package.yaml +++ b/package.yaml @@ -32,7 +32,7 @@ dependencies: - microlens-th >=0.4.1.1 && <0.5 - microlens >=0.4.8.1 && <0.5 - data-default >=0.7.1.1 && <0.8 -- generics-sop >=0.3.1.0 && <0.4 +- generics-sop >=0.3.1.0 && <0.5 - transformers >=0.5.2.0 && <0.6 - http-client >=0.5.7.1 && <0.6 - bytestring >=0.10.8.1 && <0.11 From 9d7fcffc98cf20e13e1dfeecef1cc8f4078c7e5e Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 13 Nov 2018 17:47:11 +0300 Subject: [PATCH 048/237] Updated TravisCI config --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f7a54ff4..a1cb85b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ matrix: - env: RESOLVER=lts-12 compiler: ": #GHC 8.4.4" - env: RESOLVER=nightly - compiler: ": #GHC 8.6.1" + compiler: ": #GHC 8.6.2" # Build on macOS in addition to Linux # - env: RESOLVER=lts-11 @@ -26,7 +26,7 @@ matrix: # compiler: ": #GHC 8.4.4" # os: osx # - env: RESOLVER=nightly - # compiler: ": #GHC 8.6.1" + # compiler: ": #GHC 8.6.2" # os: osx script: From 6554709ad0783b70eae946db10606872672948e9 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 19 Nov 2018 13:21:43 +0300 Subject: [PATCH 049/237] Fix hspec bounds for commercialhaskell/stackage#4139 --- package.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.yaml b/package.yaml index 4399121e..077d38ae 100644 --- a/package.yaml +++ b/package.yaml @@ -108,9 +108,9 @@ tests: source-dirs: unit dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.6 + - hspec-discover >=2.4.4 && <2.7 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.6 + - hspec >=2.4.4 && <2.7 - web3 ghc-options: - -threaded @@ -122,9 +122,9 @@ tests: source-dirs: test dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.6 + - hspec-discover >=2.4.4 && <2.7 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.6 + - hspec >=2.4.4 && <2.7 - split >=0.2.3 && <0.3 - random >=1.1 && <1.2 - time >=1.6.0 && <1.9 From 27d7804e689da5c71d417d30f762dc5be27a96ce Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 19 Nov 2018 13:22:34 +0300 Subject: [PATCH 050/237] Version bump --- package.yaml | 2 +- stack.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.yaml b/package.yaml index 077d38ae..8cc179f8 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 0.8.2.0 +version: 0.8.2.1 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" diff --git a/stack.yaml b/stack.yaml index b580a737..a504e20a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-12.17 +resolver: lts-12.19 # User packages to be built. packages: From e7670179ee3cab064e902d0d297b708672a0db15 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 13 Dec 2018 23:58:39 +0300 Subject: [PATCH 051/237] Added support for web3 secret storage --- src/Crypto/Ethereum/Keyfile.hs | 227 ++++++++++++++++++++++++++++ src/Network/Ethereum/Contract/TH.hs | 2 +- 2 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 src/Crypto/Ethereum/Keyfile.hs diff --git a/src/Crypto/Ethereum/Keyfile.hs b/src/Crypto/Ethereum/Keyfile.hs new file mode 100644 index 00000000..042d348d --- /dev/null +++ b/src/Crypto/Ethereum/Keyfile.hs @@ -0,0 +1,227 @@ +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +-- | +-- Module : Crypto.Ethereum.Keyfile +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Web3 Secret Storage implementation. +-- Spec https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition. +-- + +module Crypto.Ethereum.Keyfile + ( + -- * Encrypted Ethereum private key + EncryptedKey(..) + , Cipher(..) + , Kdf(..) + + -- * Secret storage packers + , decrypt + , encrypt + ) where + +import Crypto.Cipher.AES (AES128) +import Crypto.Cipher.Types (IV, cipherInit, ctrCombine, makeIV) +import Crypto.Error (throwCryptoError) +import qualified Crypto.KDF.PBKDF2 as Pbkdf2 (Parameters (..), + fastPBKDF2_SHA256) +import qualified Crypto.KDF.Scrypt as Scrypt (Parameters (..), generate) +import Crypto.Random (MonadRandom (getRandomBytes)) +import Data.Aeson (FromJSON (..), ToJSON (..), Value, + object, withObject, (.:), (.=)) +import Data.Aeson.Types (Parser) +import Data.ByteArray (ByteArray, ByteArrayAccess, convert) +import qualified Data.ByteArray as BA (drop, take, unpack) +import Data.Maybe (fromJust) +import Data.Text (Text) +import Data.UUID.Types (UUID) +import Data.UUID.Types.Internal (buildFromBytes) + +import Crypto.Ethereum.Utils (sha3) +import Data.ByteArray.HexString (HexString) + +data Kdf = Pbkdf2 !Pbkdf2.Parameters !HexString + | Scrypt !Scrypt.Parameters !HexString + +data Cipher = Aes128Ctr + { cipherIv :: !(IV AES128), cipherText :: !HexString } + +-- | Secret Storage representation on memory. +data EncryptedKey = EncryptedKey + { encryptedKeyId :: !UUID -- ^ Random key ID + , encryptedKeyVersion :: !Int -- ^ Version (suppoted version 3 only) + , encryptedKeyCipher :: !Cipher -- ^ Cipher (supported AES-128-CTR only) + , encryptedKeyKdf :: !Kdf -- ^ Key derivation function + , encryptedKeyMac :: !HexString -- ^ MAC + } + +instance Eq EncryptedKey where + a == b = encryptedKeyId a == encryptedKeyId b + +instance Show EncryptedKey where + show EncryptedKey{..} = "EncryptedKey " ++ show encryptedKeyId + +instance FromJSON EncryptedKey where + parseJSON = encryptedKeyParser + +instance ToJSON EncryptedKey where + toJSON = encryptedKeyBuilder + +encryptedKeyBuilder :: EncryptedKey -> Value +encryptedKeyBuilder EncryptedKey{..} = object + [ "id" .= encryptedKeyId + , "version" .= encryptedKeyVersion + , "crypto" .= object + [ "cipher" .= cipherName encryptedKeyCipher + , "cipherparams" .= cipherParams encryptedKeyCipher + , "ciphertext" .= cipherText encryptedKeyCipher + , "kdf" .= kdfName encryptedKeyKdf + , "kdfparams" .= kdfParams encryptedKeyKdf + , "mac" .= encryptedKeyMac + ] + ] + where + cipherName :: Cipher -> Text + cipherName Aes128Ctr{..} = "aes-128-ctr" + + cipherParams :: Cipher -> Value + cipherParams Aes128Ctr{..} = object [ "iv" .= (convert cipherIv :: HexString) ] + + kdfName :: Kdf -> Text + kdfName = \case + Pbkdf2 _ _ -> "pbkdf2" + Scrypt _ _ -> "scrypt" + + kdfParams :: Kdf -> Value + kdfParams = \case + Pbkdf2 params salt -> + object [ "salt" .= salt + , "dklen" .= Pbkdf2.outputLength params + , "c" .= Pbkdf2.iterCounts params + ] + Scrypt params salt -> + object [ "salt" .= salt + , "dklen" .= Scrypt.outputLength params + , "p" .= Scrypt.p params + , "r" .= Scrypt.r params + , "n" .= Scrypt.n params + ] + +encryptedKeyParser :: Value -> Parser EncryptedKey +encryptedKeyParser = withObject "EncryptedKey" $ \v -> do + uuid <- v .: "id" + version <- v .: "version" + crypto <- v .: "crypto" + cipher <- parseCipher crypto + kdf <- parseKdf crypto + mac <- withObject "Crypto" (.: "mac") crypto + return $ EncryptedKey uuid version cipher kdf mac + +parseCipher :: Value -> Parser Cipher +parseCipher = withObject "Cipher" $ \v -> do + name <- v .: "cipher" + case name :: Text of + "aes-128-ctr" -> do + params <- v .: "cipherparams" + hexiv <- params .: "iv" + text <- v .: "ciphertext" + case makeIV (hexiv :: HexString) of + Just iv -> return (Aes128Ctr iv text) + Nothing -> fail $ "Unable to make IV from " ++ show hexiv + _ -> fail $ show name ++ " not implemented yet" + +parseKdf :: Value -> Parser Kdf +parseKdf = withObject "Kdf" $ \v -> do + name <- v .: "kdf" + params <- v .: "kdfparams" + dklen <- params .: "dklen" + salt <- params .: "salt" + case name :: Text of + "pbkdf2" -> do + iterations <- params .: "c" + prf <- params .: "prf" + case prf :: Text of + "hmac-sha256" -> return $ Pbkdf2 (Pbkdf2.Parameters iterations dklen) salt + _ -> fail $ show prf ++ " not implemented yet" + "scrypt" -> do + p <- params .: "p" + r <- params .: "r" + n <- params .: "n" + return $ Scrypt (Scrypt.Parameters n r p dklen) salt + _ -> fail $ show name ++ " not implemented yet" + +defaultKdf :: HexString -> Kdf +defaultKdf = Scrypt (Scrypt.Parameters n r p dklen) + where + dklen = 32 + n = 262144 + r = 1 + p = 8 + +deriveKey :: (ByteArrayAccess password, ByteArray ba) => Kdf -> password -> ba +deriveKey kdf password = + case kdf of + Pbkdf2 params salt -> Pbkdf2.fastPBKDF2_SHA256 params password salt + Scrypt params salt -> Scrypt.generate params password salt + + +-- | Decrypt Ethereum private key. +-- +-- Typically Web3 Secret Storage is JSON-encoded. 'EncryptedKey' data type has 'FromJSON' instance +-- to helps decode it from JSON-encoded string or file. +-- +-- @ +-- let decryptJSON pass = flip decrypt pass <=< decode +-- @ +-- +decrypt :: (ByteArrayAccess password, ByteArray privateKey) + => EncryptedKey + -> password + -> Maybe privateKey +decrypt EncryptedKey{..} password + | mac == encryptedKeyMac = Just (convert privateKey) + | otherwise = Nothing + where + privateKey = ctrCombine cipher iv ciphertext + cipher = throwCryptoError $ cipherInit (BA.take 16 derivedKey) :: AES128 + derivedKey = deriveKey encryptedKeyKdf password + ciphertext = cipherText encryptedKeyCipher + mac = sha3 (BA.drop 16 derivedKey <> ciphertext) + iv = cipherIv encryptedKeyCipher + +-- | Encrypt Ethereum private key. +-- +-- @ +-- let encryptJSON pass key = encode <$> encrypt key pass +-- @ +encrypt :: (ByteArray privateKey, ByteArrayAccess password, MonadRandom m) + => privateKey + -> password + -> m EncryptedKey +encrypt privateKey password = do + kdf <- defaultKdf <$> getRandomBytes 16 + iv <- randomIV + let derivedKey = deriveKey kdf password + cipher = throwCryptoError $ cipherInit (BA.take 16 derivedKey) :: AES128 + ciphertext = ctrCombine cipher iv privateKey + mac = sha3 (BA.drop 16 derivedKey <> ciphertext) + uuid <- randomUUID + return $ EncryptedKey uuid 3 (Aes128Ctr iv $ convert ciphertext) kdf mac + where + randomUUID = do + uuid <- getRandomBytes 16 + let bs = BA.unpack (uuid :: HexString) + return $ buildFromBytes 4 + (head bs) (bs !! 1) (bs !! 2) (bs !! 3) + (bs !! 4) (bs !! 5) (bs !! 6) (bs !! 7) + (bs !! 8) (bs !! 9) (bs !! 10) (bs !! 11) + (bs !! 12) (bs !! 13) (bs !! 14) (bs !! 15) + randomIV = do + iv <- getRandomBytes 16 + return $ fromJust $ makeIV (iv :: HexString) diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 46380f99..99f8bdf5 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -193,7 +193,7 @@ mkDecl ev@(DEvent uncheckedName inputs anonymous) = sequence , instanceD' nonIndexedName (conT ''Generic) [] , instanceD' nonIndexedName (conT ''AbiType) [funD' 'isDynamic [] [|const False|]] , instanceD' nonIndexedName (conT ''AbiGet) [] - , dataD' allName (recC allName (map (\(n, a) -> ((\(b,t) -> return (n,b,t)) <=< toBang <=< typeQ $ a)) allArgs)) derivingD + , dataD' allName (recC allName (map (\(n, a) -> (\(b,t) -> return (n,b,t)) <=< toBang <=< typeQ $ a) allArgs)) derivingD , instanceD' allName (conT ''Generic) [] , instanceD (cxt []) (pure $ ConT ''IndexedEvent `AppT` ConT indexedName `AppT` ConT nonIndexedName `AppT` ConT allName) From cb425dff5d53ed97bf21dfebf059157190145a1a Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 14 Dec 2018 00:00:00 +0300 Subject: [PATCH 052/237] Pure haskell secp256k1 replacement --- .gitignore | 2 +- package.yaml | 4 +- src/Crypto/Ethereum.hs | 56 ++----- src/Crypto/Ethereum/Signature.hs | 150 ++++++++++++++++++ src/Crypto/Ethereum/Utils.hs | 52 ++++++ src/Crypto/Random/HmacDrbg.hs | 67 ++++++++ src/Data/ByteArray/HexString.hs | 10 +- src/Data/Solidity/Prim/Address.hs | 18 +-- src/Network/Ethereum/Account.hs | 22 +-- src/Network/Ethereum/Account/PrivateKey.hs | 60 ++----- src/Network/Ethereum/Transaction.hs | 56 +++++++ stack.yaml | 3 +- unit/Crypto/Ethereum/Test/EcdsaSpec.hs | 32 ---- unit/Crypto/Ethereum/Test/KeyfileSpec.hs | 99 ++++++++++++ unit/Crypto/Ethereum/Test/SignatureSpec.hs | 65 ++++++++ unit/Crypto/Random/Test/HmacDrbgSpec.hs | 24 +++ unit/Data/Solidity/Test/AddressSpec.hs | 19 +-- .../Ethereum/Web3/Test/LocalAccountSpec.hs | 26 --- 18 files changed, 576 insertions(+), 189 deletions(-) create mode 100644 src/Crypto/Ethereum/Signature.hs create mode 100644 src/Crypto/Ethereum/Utils.hs create mode 100644 src/Crypto/Random/HmacDrbg.hs create mode 100644 src/Network/Ethereum/Transaction.hs delete mode 100644 unit/Crypto/Ethereum/Test/EcdsaSpec.hs create mode 100644 unit/Crypto/Ethereum/Test/KeyfileSpec.hs create mode 100644 unit/Crypto/Ethereum/Test/SignatureSpec.hs create mode 100644 unit/Crypto/Random/Test/HmacDrbgSpec.hs delete mode 100644 unit/Network/Ethereum/Web3/Test/LocalAccountSpec.hs diff --git a/.gitignore b/.gitignore index 47bc7850..1b94246b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ build/ dist/ docs/_build -web3.cabal +*.cabal diff --git a/package.yaml b/package.yaml index 8cc179f8..074909f7 100644 --- a/package.yaml +++ b/package.yaml @@ -24,9 +24,8 @@ extra-source-files: dependencies: - base >4.9 && <4.13 -- secp256k1-haskell >=0.1.4 && <0.2 -- http-client-tls >=0.3.5.1 && <0.4 - template-haskell >=2.11.1.0 && <2.15 +- http-client-tls >=0.3.5.1 && <0.4 - microlens-aeson >=2.2.0.2 && <2.4 - microlens-mtl >=0.1.11.0 && <0.2 - microlens-th >=0.4.1.1 && <0.5 @@ -35,6 +34,7 @@ dependencies: - generics-sop >=0.3.1.0 && <0.5 - transformers >=0.5.2.0 && <0.6 - http-client >=0.5.7.1 && <0.6 +- uuid-types >=1.0.3 && <1.1 - bytestring >=0.10.8.1 && <0.11 - cryptonite >=0.23 && <0.26 - exceptions >=0.8.3 && <0.11 diff --git a/src/Crypto/Ethereum.hs b/src/Crypto/Ethereum.hs index ede81a0e..9b00f746 100644 --- a/src/Crypto/Ethereum.hs +++ b/src/Crypto/Ethereum.hs @@ -7,53 +7,25 @@ -- Stability : experimental -- Portability : unportable -- --- Ethereum ECDSA based on secp256k1 bindings. +-- Ethereum ECC support module. -- module Crypto.Ethereum ( - -- * Ethereum ECDSA sign/recover - hashMessage - , ecsign - , ecrecover - - -- * Re-export useful Secp256k1 functions - , SecKey + -- * Ethereum crypto key ops + PrivateKey + , PublicKey + , importKey , derivePubKey - )where - -import Crypto.Hash (Keccak_256 (..), hashWith) -import Crypto.Secp256k1 (CompactRecSig, Msg, SecKey, - derivePubKey, exportCompactRecSig, - importCompactRecSig, msg, recover, - signRecMsg) -import Data.ByteArray (ByteArrayAccess, convert) -import Data.Maybe (fromJust) - -import Data.Solidity.Prim.Address (Address, fromPubKey) --- | SHA3 hash of argument -hashMessage :: ByteArrayAccess ba => ba -> Msg -hashMessage = fromJust . msg . convert . hashWith Keccak_256 + -- * Digital Signature Algorithm + , signMessage + , recover --- | Sign message with Ethereum private key -ecsign :: ByteArrayAccess message - => SecKey - -- ^ Private key - -> message - -- ^ Message content - -> CompactRecSig - -- ^ Signature -ecsign key = exportCompactRecSig . signRecMsg key . hashMessage + -- * Hash function + , sha3 + ) where --- | Recover message signer Ethereum address -ecrecover :: ByteArrayAccess message - => CompactRecSig - -- ^ Signature - -> message - -- ^ Message content - -> Maybe Address - -- ^ Message signer address -ecrecover sig message = do - sig' <- importCompactRecSig sig - fromPubKey <$> recover sig' (hashMessage message) +import Crypto.Ethereum.Signature (recover, signMessage) +import Crypto.Ethereum.Utils (derivePubKey, importKey, sha3) +import Crypto.PubKey.ECC.ECDSA (PrivateKey, PublicKey) diff --git a/src/Crypto/Ethereum/Signature.hs b/src/Crypto/Ethereum/Signature.hs new file mode 100644 index 00000000..a9abc9e7 --- /dev/null +++ b/src/Crypto/Ethereum/Signature.hs @@ -0,0 +1,150 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Crypto.Ethereum +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Recoverable ECC signature support. +-- + +module Crypto.Ethereum.Signature + ( + hashMessage + , signMessage + , signTransaction + , recover + , pack + , unpack + ) where + +import Control.Monad (when) +import Crypto.Hash (Digest, Keccak_256 (..), SHA256, + hashWith) + +import Crypto.Number.Generate (generateBetween) +import Crypto.Number.ModArithmetic (inverse) +import Crypto.Number.Serialize (i2osp, os2ip) +import Crypto.PubKey.ECC.ECDSA (PrivateKey (..)) +import Crypto.PubKey.ECC.Prim (pointMul) +import Crypto.PubKey.ECC.Types (CurveCommon (ecc_g, ecc_n), + Point (..), common_curve) +import Crypto.Random (MonadRandom, withDRG) +import Crypto.Random.HmacDrbg (HmacDrbg, initialize) +import Data.Bits (xor, (.|.)) +import Data.ByteArray (ByteArray, ByteArrayAccess, + convert, singleton, takeView, + view) +import qualified Data.ByteArray as BA (length, unpack) +import Data.ByteString.Builder (intDec, toLazyByteString) +import qualified Data.ByteString.Lazy as LBS (toStrict) +import Data.Word (Word8) + +import Crypto.Ethereum.Utils (exportKey) +import Data.ByteArray.HexString (HexString) +import Data.Solidity.Prim.Address (Address) + +-- | Make Ethereum standard signature. +-- +-- The message is before enveloped as follows: +-- "\x19Ethereum Signed Message:\n" + message.length + message +-- +-- /WARNING:/ Vulnerable to timing attacks. +signMessage :: (ByteArrayAccess message, ByteArray rsv) + => PrivateKey + -> message + -> rsv +{-# INLINE signMessage #-} +signMessage pk = pack . sign pk . hashMessage + +-- | Ethereum standard hashed message. +-- +-- The data will be UTF-8 HEX decoded and enveloped as follows: +-- "\x19Ethereum Signed Message:\n" + message.length + message and hashed using keccak256. +hashMessage :: ByteArrayAccess message => message -> Digest Keccak_256 +hashMessage msg = hashWith Keccak_256 prefixed + where + len = LBS.toStrict . toLazyByteString . intDec . BA.length + prefixed = "\x19" <> "Ethereum Signed Message:\n" <> len msg <> convert msg + +-- | Sign Ethereum transaction. +-- +-- /WARNING:/ Vulnerable to timing attacks. +signTransaction :: ByteArray ba + => (Maybe (Integer, Integer, Word8) -> ba) + -- ^ Two way transaction packer (unsigned and signed) + -> PrivateKey + -- ^ Private key + -> ba + -- ^ Encoded transaction +signTransaction encode key = encode $ Just signed + where + unsigned = encode Nothing + signed = sign key (hashWith Keccak_256 unsigned) + +-- | Sign arbitrary data by given private key. +-- +-- /WARNING:/ Vulnerable to timing attacks. +sign :: ByteArrayAccess bin + => PrivateKey + -> bin + -> (Integer, Integer, Word8) +sign pk bin = fst $ withDRG hmac_drbg $ ecsign pk (os2ip truncated) + where + hmac_drbg :: HmacDrbg SHA256 + hmac_drbg = initialize $ exportKey pk <> truncated + truncated = convert $ takeView bin 32 :: HexString + +ecsign :: MonadRandom m + => PrivateKey + -> Integer + -> m (Integer, Integer, Word8) +ecsign pk@(PrivateKey curve d) z = do + k <- generateBetween 0 (n - 1) + case trySign k of + Nothing -> ecsign pk z + Just rsv -> return rsv + where + n = ecc_n (common_curve curve) + g = ecc_g (common_curve curve) + recoveryParam x y r = fromIntegral $ + fromEnum (odd y) .|. if x /= r then 2 else 0 + trySign k = do + (kpX, kpY) <- case pointMul curve k g of + PointO -> Nothing + Point x y -> return (x, y) + let r = kpX `mod` n + kInv <- inverse k n + let s = kInv * (z + r * d) `mod` n + when (r == 0 || s == 0) Nothing + -- Recovery param + let v = recoveryParam kpX kpY r + -- Use complement of s if it > n / 2 + let (s', v') | s > n `div` 2 = (n - s, v `xor` 1) + | otherwise = (s, v) + return $ (r, s', v' + 27) + +-- | Recover message signer Ethereum address. +recover :: (ByteArrayAccess msg, ByteArrayAccess rsv) + => msg + -> rsv + -> Address +recover = undefined + +-- | Unpack recoverable signature from byte array. +-- +-- Input array should have 65 byte length. +unpack :: ByteArrayAccess rsv => rsv -> (Integer, Integer, Word8) +unpack vrs = (r, s, v) + where + r = os2ip (view vrs 1 33) + s = os2ip (view vrs 33 65) + v = head (BA.unpack vrs) + +-- | Pack recoverable signature as byte array (65 byte length). +pack :: ByteArray rsv => (Integer, Integer, Word8) -> rsv +pack (r, s, v) = i2osp r <> i2osp s <> singleton v diff --git a/src/Crypto/Ethereum/Utils.hs b/src/Crypto/Ethereum/Utils.hs new file mode 100644 index 00000000..66b53905 --- /dev/null +++ b/src/Crypto/Ethereum/Utils.hs @@ -0,0 +1,52 @@ +-- | +-- Module : Crypto.Ethereum.Utils +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- EC cryptography on Secp256k1 curve. +-- + +module Crypto.Ethereum.Utils where + +import Crypto.Hash (Keccak_256 (..), hashWith) +import Crypto.Number.Serialize (i2osp, os2ip) +import Crypto.PubKey.ECC.ECDSA (PrivateKey (..), PublicKey (..)) +import Crypto.PubKey.ECC.Generate (generateQ) +import Crypto.PubKey.ECC.Types (CurveName (SEC_p256k1), Point (..), + getCurveByName) +import Data.ByteArray (ByteArray, ByteArrayAccess, + convert) + +-- | Import Ethereum private key from byte array. +-- +-- Input array should have 32 byte length. +importKey :: ByteArrayAccess privateKey => privateKey -> PrivateKey +{-# INLINE importKey #-} +importKey = PrivateKey (getCurveByName SEC_p256k1) . os2ip + +-- | Export private key to byte array (32 byte length). +exportKey :: ByteArray privateKey => PrivateKey -> privateKey +{-# INLINE exportKey #-} +exportKey (PrivateKey _ key) = i2osp key + +-- | Get public key appropriate to private key. +-- +-- /WARNING:/ Vulnerable to timing attacks. +derivePubKey :: PrivateKey -> PublicKey +{-# INLINE derivePubKey #-} +derivePubKey (PrivateKey curve p) = PublicKey curve (generateQ curve p) + +-- | Export public key to byte array (64 byte length). +exportPubKey :: ByteArray publicKey => PublicKey -> publicKey +{-# INLINE exportPubKey #-} +exportPubKey (PublicKey _ (Point x y)) = i2osp x <> i2osp y +exportPubKey (PublicKey _ PointO) = mempty + +-- | Keccak 256 hash function. +sha3 :: (ByteArrayAccess bin, ByteArray bout) => bin -> bout +{-# INLINE sha3 #-} +sha3 = convert . hashWith Keccak_256 diff --git a/src/Crypto/Random/HmacDrbg.hs b/src/Crypto/Random/HmacDrbg.hs new file mode 100644 index 00000000..6a7c8832 --- /dev/null +++ b/src/Crypto/Random/HmacDrbg.hs @@ -0,0 +1,67 @@ +-- | +-- Module : Crypto.Random.HmacDrbg +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- NIST standardized number-theoretically secure random number generator. +-- https://csrc.nist.gov/csrc/media/events/random-number-generation-workshop-2004/documents/hashblockcipherdrbg.pdf +-- +-- XXX: This algorithm requires reseed after 2^48 iterations. +-- +-- > Inspired by https://github.com/TomMD/DRBG and https://github.com/indutny/hmac-drbg. +-- + +module Crypto.Random.HmacDrbg + ( + HmacDrbg + , initialize + ) where + + +import Crypto.Hash (HashAlgorithm, digestFromByteString, + hashDigestSize) +import Crypto.MAC.HMAC (HMAC (..), hmac) +import Crypto.Random (DRG (..)) +import Data.ByteArray (ByteArray, convert, singleton) +import qualified Data.ByteArray as BA (null, take) +import qualified Data.ByteString as B (replicate) +import Data.Maybe (fromJust) +import Data.Word (Word8) + +-- | HMAC Deterministic Random Bytes Generator. +newtype HmacDrbg a = HmacDrbg (HMAC a, HMAC a) + deriving Eq + +instance HashAlgorithm a => DRG (HmacDrbg a) where + randomBytesGenerate = generate + +update :: (ByteArray bin, HashAlgorithm a) + => bin + -> HmacDrbg a + -> HmacDrbg a +update input | BA.null input = go 0x00 + | otherwise = go 0x01 . go 0x00 + where + go :: HashAlgorithm a => Word8 -> HmacDrbg a -> HmacDrbg a + go c (HmacDrbg (k, v)) = let k' = hmac k (convert v <> singleton c <> input) + v' = hmac k' v + in HmacDrbg (k', v') + +-- | Initialize HMAC-DRBG by seed. +initialize :: (ByteArray seed, HashAlgorithm a) + => seed + -> HmacDrbg a +initialize = flip update $ HmacDrbg (hmac0 undefined 0x00, hmac0 undefined 0x01) + where + hmac0 :: HashAlgorithm a => a -> Word8 -> HMAC a + hmac0 a = HMAC . fromJust . digestFromByteString . B.replicate (hashDigestSize a) + +generate :: (HashAlgorithm a, ByteArray output) => Int -> HmacDrbg a -> (output, HmacDrbg a) +generate reqBytes (HmacDrbg (k, v)) = (output, HmacDrbg (k, vFinal)) + where + getV (u, rest) = let v' = hmac k u in (v', rest <> convert v') + (vFinal, output) = BA.take reqBytes <$> iterate getV (v, mempty) !! reqBytes diff --git a/src/Data/ByteArray/HexString.hs b/src/Data/ByteArray/HexString.hs index f90f5583..d7155a82 100644 --- a/src/Data/ByteArray/HexString.hs +++ b/src/Data/ByteArray/HexString.hs @@ -48,15 +48,13 @@ instance FromJSON HexString where instance ToJSON HexString where toJSON = String . toText --- | Smart constructor which validates that all the text are actually --- have `0x` prefix, hexadecimal characters and length is even. +-- | Smart constructor which trims '0x' and validates length is even. hexString :: ByteArray ba => ba -> Either String HexString -hexString bs - | BA.take 2 bs == hexStart = HexString <$> bs' - | otherwise = Left "Hex string should start from '0x'" +hexString bs = HexString <$> convertFromBase Base16 bs' where hexStart = convert ("0x" :: ByteString) - bs' = convertFromBase Base16 (BA.drop 2 bs) + bs' | BA.take 2 bs == hexStart = BA.drop 2 bs + | otherwise = bs -- | Reads a raw bytes and converts to hex representation. fromBytes :: ByteArrayAccess ba => ba -> HexString diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs index cd1a7a17..1e2f0815 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/src/Data/Solidity/Prim/Address.hs @@ -23,7 +23,7 @@ module Data.Solidity.Prim.Address , toHexString , fromHexString - -- * Public key to @Address@ convertor + -- * Derive address from public key , fromPubKey -- * EIP55 Mix-case checksum address encoding @@ -32,12 +32,11 @@ module Data.Solidity.Prim.Address ) where import Control.Monad ((<=<)) -import Crypto.Hash (Keccak_256 (..), hashWith) -import Crypto.Secp256k1 (PubKey, exportPubKey) +import Crypto.PubKey.ECC.ECDSA (PublicKey) import Data.Aeson (FromJSON (..), ToJSON (..)) import Data.Bits ((.&.)) import Data.Bool (bool) -import Data.ByteArray (convert, zero) +import Data.ByteArray (zero) import qualified Data.ByteArray as BA (drop) import Data.ByteString (ByteString) import qualified Data.ByteString as BS (take, unpack) @@ -50,6 +49,7 @@ import Data.Text.Encoding as T (encodeUtf8) import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) +import Crypto.Ethereum.Utils (exportPubKey, sha3) import Data.ByteArray.HexString (HexString, fromBytes, toBytes, toText) import Data.Solidity.Abi (AbiGet (..), AbiPut (..), @@ -88,14 +88,14 @@ instance ToJSON Address where toJSON = toJSON . toHexString -- | Derive address from secp256k1 public key -fromPubKey :: PubKey -> Address +fromPubKey :: PublicKey -> Address fromPubKey key = - case decode $ zero 12 <> BA.drop 12 (sha3 key) of + case decode $ zero 12 <> toAddress (exportPubKey key) of Right a -> a Left e -> error $ "Impossible error: " ++ e where - sha3 :: PubKey -> ByteString - sha3 = convert . hashWith Keccak_256 . BA.drop 1 . exportPubKey False + toAddress :: HexString -> HexString + toAddress = BA.drop 12 . sha3 -- | Decode address from hex string fromHexString :: HexString -> Either String Address @@ -113,7 +113,7 @@ toHexString = fromBytes . C8.drop 12 . encode toChecksum :: ByteString -> ByteString toChecksum addr = ("0x" <>) . C8.pack $ zipWith ($) upcaseVector lower where - upcaseVector = (>>= fourthBits) . BS.unpack . BS.take 20 . convert $ hashWith Keccak_256 (C8.pack lower) + upcaseVector = (>>= fourthBits) . BS.unpack . BS.take 20 $ sha3 (C8.pack lower) fourthBits n = bool id C.toUpper <$> [n .&. 0x80 /= 0, n .&. 0x08 /= 0] lower = drop 2 . fmap C.toLower . C8.unpack $ addr diff --git a/src/Network/Ethereum/Account.hs b/src/Network/Ethereum/Account.hs index 988eeb12..155eabfd 100644 --- a/src/Network/Ethereum/Account.hs +++ b/src/Network/Ethereum/Account.hs @@ -29,8 +29,8 @@ module Network.Ethereum.Account , Personal(..) -- * Local key account - , PrivateKeyAccount - , PrivateKey(..) + --, PrivateKeyAccount + --, PrivateKey(..) -- * Transaction paramitrization function and lenses , withParam @@ -43,12 +43,12 @@ module Network.Ethereum.Account ) where -import Network.Ethereum.Account.Class (Account (..)) -import Network.Ethereum.Account.Default (DefaultAccount) -import Network.Ethereum.Account.Internal (account, block, gasLimit, - gasPrice, to, value, - withParam) -import Network.Ethereum.Account.Personal (Personal (..), - PersonalAccount) -import Network.Ethereum.Account.PrivateKey (PrivateKey (..), - PrivateKeyAccount) +import Network.Ethereum.Account.Class (Account (..)) +import Network.Ethereum.Account.Default (DefaultAccount) +import Network.Ethereum.Account.Internal (account, block, gasLimit, + gasPrice, to, value, + withParam) +import Network.Ethereum.Account.Personal (Personal (..), + PersonalAccount) +--import Network.Ethereum.Account.PrivateKey (PrivateKey (..), +-- PrivateKeyAccount) diff --git a/src/Network/Ethereum/Account/PrivateKey.hs b/src/Network/Ethereum/Account/PrivateKey.hs index 15f2fce9..00dbe684 100644 --- a/src/Network/Ethereum/Account/PrivateKey.hs +++ b/src/Network/Ethereum/Account/PrivateKey.hs @@ -1,6 +1,5 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} @@ -20,21 +19,16 @@ module Network.Ethereum.Account.PrivateKey where import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) -import Crypto.Secp256k1 (CompactRecSig (..), SecKey, - derivePubKey) +import qualified Crypto.PubKey.ECC.ECDSA as EC (PrivateKey) import Data.ByteArray (convert) -import Data.ByteString (ByteString) -import Data.ByteString.Short (fromShort) +import Data.ByteString (empty) import Data.Default (Default (..)) -import Data.Maybe (fromJust, fromMaybe) -import Data.Monoid (mempty, (<>)) import Data.Proxy (Proxy (..)) -import Data.RLP (packRLP, rlpEncode) -import Crypto.Ethereum (ecsign) -import Data.ByteArray.HexString (HexString, toBytes) +import Crypto.Ethereum (derivePubKey, importKey) +import Crypto.Ethereum.Signature (signTransaction) import Data.Solidity.Abi.Codec (decode, encode) -import Data.Solidity.Prim.Address (fromPubKey, toHexString) +import Data.Solidity.Prim.Address (fromPubKey) import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Account.Internal (AccountT (..), CallParam (..), @@ -43,19 +37,19 @@ import Network.Ethereum.Account.Internal (AccountT (..), import qualified Network.Ethereum.Api.Eth as Eth (call, estimateGas, getTransactionCount, sendRawTransaction) -import Network.Ethereum.Api.Types (Call (..), unQuantity) +import Network.Ethereum.Api.Types (Call (..)) import Network.Ethereum.Chain (foundation) import Network.Ethereum.Contract.Method (selector) -import Network.Ethereum.Unit (Shannon, toWei) +import Network.Ethereum.Transaction (encodeTransaction) -- | Local EOA params data PrivateKey = PrivateKey - { privateKey :: !SecKey + { privateKey :: !EC.PrivateKey , privateKeyChain :: !Integer } deriving (Eq, Show) instance Default PrivateKey where - def = PrivateKey "" foundation + def = PrivateKey (importKey empty) foundation type PrivateKeyAccount = AccountT PrivateKey @@ -81,7 +75,8 @@ instance Account PrivateKey PrivateKeyAccount where gasLimit <- lift $ Eth.estimateGas params return $ params { callGas = Just gasLimit } - let signed = signTransaction params' (privateKeyChain _account) (privateKey _account) + let packer = encodeTransaction params' (privateKeyChain _account) + signed = signTransaction packer (privateKey _account) lift $ getReceipt =<< Eth.sendRawTransaction signed call (args :: a) = do @@ -95,36 +90,3 @@ instance Account PrivateKey PrivateKeyAccount where case decode res of Right r -> return r Left e -> fail e - -encodeTransaction :: Call - -> Either Integer (Integer, ByteString, ByteString) - -> HexString -encodeTransaction Call{..} vrs = do - let (to :: ByteString) = maybe mempty (toBytes . toHexString) callTo - (value :: Integer) = unQuantity $ fromJust callValue - (nonce :: Integer) = unQuantity $ fromJust callNonce - (gasPrice :: Integer) = maybe defaultGasPrice unQuantity callGasPrice - (gasLimit :: Integer) = unQuantity $ fromJust callGas - (input :: ByteString) = convert $ fromMaybe mempty callData - - rlp $ case vrs of - -- Unsigned transaction by EIP155 - Left chain_id -> (nonce, gasPrice, gasLimit, to, value, input, chain_id, mempty, mempty) - -- Signed transaction - Right (v, r, s) -> (nonce, gasPrice, gasLimit, to, value, input, v, s, r) - where - rlp = convert . packRLP . rlpEncode - defaultGasPrice = toWei (5 :: Shannon) - -signTransaction :: Call - -> Integer - -> SecKey - -> HexString -signTransaction c i key = encodeTransaction c $ Right (v', r, s) - where - unsigned = encodeTransaction c (Left i) - recSig = ecsign key unsigned - v = fromIntegral $ getCompactRecSigV recSig - r = fromShort $ getCompactRecSigR recSig - s = fromShort $ getCompactRecSigS recSig - v' = v + 35 + 2 * i -- Improved 'v' according to EIP155 diff --git a/src/Network/Ethereum/Transaction.hs b/src/Network/Ethereum/Transaction.hs new file mode 100644 index 00000000..6e328f68 --- /dev/null +++ b/src/Network/Ethereum/Transaction.hs @@ -0,0 +1,56 @@ +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} +module Network.Ethereum.Transaction where + +-- | +-- Module : Network.Ethereum.Transaction +-- Copyright : Alexander Krupenkin 2018 +-- Roy Blankman 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + +import Data.ByteArray (ByteArray, convert) +import Data.ByteString (ByteString) +import Data.Maybe (fromJust, fromMaybe) +import Data.RLP (packRLP, rlpEncode) +import Data.Word (Word8) + +import Data.ByteArray.HexString (toBytes) +import Data.Solidity.Prim.Address (toHexString) +import Network.Ethereum.Api.Types (Call (..), Quantity (unQuantity)) +import Network.Ethereum.Unit (Shannon, toWei) + +-- | Ethereum transaction codec. +-- +-- Two way RLP encoding of Ethereum transaction: for unsigned and signed. +-- Packing scheme described in https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md +encodeTransaction :: ByteArray ba + => Call + -- ^ Transaction call + -> Integer + -- ^ Chain ID + -> Maybe (Integer, Integer, Word8) + -- ^ Should contain signature when transaction signed + -> ba + -- ^ RLP encoded transaction +encodeTransaction Call{..} chain_id rsv = do + let (to :: ByteString) = maybe mempty (toBytes . toHexString) callTo + (value :: Integer) = unQuantity $ fromJust callValue + (nonce :: Integer) = unQuantity $ fromJust callNonce + (gasPrice :: Integer) = maybe defaultGasPrice unQuantity callGasPrice + (gasLimit :: Integer) = unQuantity $ fromJust callGas + (input :: ByteString) = convert $ fromMaybe mempty callData + + convert . packRLP $ case rsv of + -- Unsigned transaction by EIP155 + Nothing -> rlpEncode (nonce, gasPrice, gasLimit, to, value, input, chain_id, 0 :: Int, 0 :: Int) + -- Signed transaction + Just (r, s, v) -> + let v' = v + 8 + 2 * fromInteger chain_id -- Improved 'v' according to EIP155 + in rlpEncode (nonce, gasPrice, gasLimit, to, value, input, v', r, s) + where + defaultGasPrice = toWei (10 :: Shannon) diff --git a/stack.yaml b/stack.yaml index a504e20a..6e37a121 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-12.19 +resolver: lts-12.22 # User packages to be built. packages: @@ -21,6 +21,5 @@ nix: - jsoncpp - solc - solc.dev - - secp256k1 - haskellPackages.hlint - haskellPackages.stylish-haskell diff --git a/unit/Crypto/Ethereum/Test/EcdsaSpec.hs b/unit/Crypto/Ethereum/Test/EcdsaSpec.hs deleted file mode 100644 index 21744535..00000000 --- a/unit/Crypto/Ethereum/Test/EcdsaSpec.hs +++ /dev/null @@ -1,32 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -module Crypto.Ethereum.Test.EcdsaSpec where - -import Crypto.Secp256k1 (SecKey, derivePubKey) -import Data.ByteArray (convert) -import Data.ByteString (ByteString, pack) -import Data.Serialize (decode) -import Test.Hspec -import Test.Hspec.QuickCheck - -import Crypto.Ethereum -import Data.ByteArray.HexString (HexString) -import Data.Solidity.Prim.Address (fromPubKey) - -spec :: Spec -spec = do - describe "Ethereum signatures" $ do - let key = "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20" :: SecKey - address = fromPubKey (derivePubKey key) - message = "Hello World!" :: ByteString - sign = "0xd4a9620cd94387a31b9333935f1e76fbee8467c283d07c39c1606dc4e2af021e317293af09601dbb48f547e40f6b98fe8a67a23dcd1f7f8d054695a81521177001" :: HexString - sign' = either error id $ decode (convert sign) - - it "sign message by Ethereum private key" $ do - ecsign key message `shouldBe` sign' - - it "verify message by Ethereum public key" $ do - ecrecover sign' message `shouldBe` Just address - - prop "round robin sign/verify for random message" $ \chars -> - let msg = pack chars - in ecrecover (ecsign key msg) msg `shouldBe` Just address diff --git a/unit/Crypto/Ethereum/Test/KeyfileSpec.hs b/unit/Crypto/Ethereum/Test/KeyfileSpec.hs new file mode 100644 index 00000000..d86d9ea5 --- /dev/null +++ b/unit/Crypto/Ethereum/Test/KeyfileSpec.hs @@ -0,0 +1,99 @@ +{-# LANGUAGE OverloadedStrings #-} +module Crypto.Ethereum.Test.KeyfileSpec where + +import Data.Aeson (eitherDecode) +import Data.ByteString (ByteString) +import qualified Data.ByteString.Lazy as L (ByteString) +import Data.UUID.Types (UUID) +import Test.Hspec + +import Crypto.Ethereum.Keyfile +import Data.ByteArray.HexString (HexString) + +pbkdf2_test_keyfile :: L.ByteString +pbkdf2_test_keyfile = "\ +\{\ +\ \"crypto\" : {\ +\ \"cipher\" : \"aes-128-ctr\",\ +\ \"cipherparams\" : {\ +\ \"iv\" : \"6087dab2f9fdbbfaddc31a909735c1e6\"\ +\ },\ +\ \"ciphertext\" : \"5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46\",\ +\ \"kdf\" : \"pbkdf2\",\ +\ \"kdfparams\" : {\ +\ \"c\" : 262144,\ +\ \"dklen\" : 32,\ +\ \"prf\" : \"hmac-sha256\",\ +\ \"salt\" : \"ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd\"\ +\ },\ +\ \"mac\" : \"517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2\"\ +\ },\ +\ \"id\" : \"3198bc9c-6672-5ab3-d995-4942343ae5b6\",\ +\ \"version\" : 3\ +\}" + +scrypt_test_keyfile :: L.ByteString +scrypt_test_keyfile = "\ +\{\ +\ \"crypto\" : {\ +\ \"cipher\" : \"aes-128-ctr\",\ +\ \"cipherparams\" : {\ +\ \"iv\" : \"83dbcc02d8ccb40e466191a123791e0e\"\ +\ },\ +\ \"ciphertext\" : \"d172bf743a674da9cdad04534d56926ef8358534d458fffccd4e6ad2fbde479c\",\ +\ \"kdf\" : \"scrypt\",\ +\ \"kdfparams\" : {\ +\ \"dklen\" : 32,\ +\ \"n\" : 262144,\ +\ \"r\" : 1,\ +\ \"p\" : 8,\ +\ \"salt\" : \"ab0c7876052600dd703518d6fc3fe8984592145b591fc8fb5c6d43190334ba19\"\ +\ },\ +\ \"mac\" : \"2103ac29920d71da29f15d75b4a16dbe95cfd7ff8faea1056c33131d846e3097\"\ +\ },\ +\ \"id\" : \"3198bc9c-6672-5ab3-d995-4942343ae5b6\",\ +\ \"version\" : 3\ +\}" + +test_uuid :: UUID +test_uuid = read "3198bc9c-6672-5ab3-d995-4942343ae5b6" + +test_pbkdf2_mac :: HexString +test_pbkdf2_mac = "517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2" + +test_scrypt_mac :: HexString +test_scrypt_mac = "2103ac29920d71da29f15d75b4a16dbe95cfd7ff8faea1056c33131d846e3097" + +test_password :: ByteString +test_password = "testpassword" + +test_private :: HexString +test_private = "7a28b5ba57c53603b0b07b56bba752f7784bf506fa95edc395f5cf6c7514fe9d" + +spec :: Spec +spec = do + describe "AES-128-CTR and PBKDF2-SHA-256" $ do + it "can decode keyfile" $ + case eitherDecode pbkdf2_test_keyfile of + Left e -> error e + Right ekey -> do + encryptedKeyId ekey `shouldBe` test_uuid + encryptedKeyMac ekey `shouldBe` test_pbkdf2_mac + + it "can decrypt keyfile" $ do + case eitherDecode pbkdf2_test_keyfile of + Left e -> error e + Right ekey -> decrypt ekey test_password `shouldBe` Just test_private + + describe "AES-128-CTR and Scrypt" $ do + it "can decode keyfile" $ + case eitherDecode scrypt_test_keyfile of + Left e -> error e + Right ekey -> do + encryptedKeyId ekey `shouldBe` test_uuid + encryptedKeyMac ekey `shouldBe` test_scrypt_mac + + it "can decrypt keyfile" $ + case eitherDecode scrypt_test_keyfile of + Left e -> error e + Right ekey -> decrypt ekey test_password `shouldBe` Just test_private diff --git a/unit/Crypto/Ethereum/Test/SignatureSpec.hs b/unit/Crypto/Ethereum/Test/SignatureSpec.hs new file mode 100644 index 00000000..b6536599 --- /dev/null +++ b/unit/Crypto/Ethereum/Test/SignatureSpec.hs @@ -0,0 +1,65 @@ +{-# LANGUAGE OverloadedStrings #-} +module Crypto.Ethereum.Test.SignatureSpec where + +import Data.ByteArray (convert) +import Data.Foldable (for_) +import Test.Hspec +import Test.Hspec.QuickCheck + +import Crypto.Ethereum.Signature (hashMessage, signMessage, + signTransaction) +import Crypto.Ethereum.Utils (importKey) +import Data.ByteArray.HexString (HexString) +import Data.Solidity.Prim.Address (fromPubKey) +import Network.Ethereum.Api.Types (Call (..)) +import Network.Ethereum.Transaction (encodeTransaction) + +test_vector :: [(HexString, HexString, HexString)] +test_vector = [ + ("0xa8510b592963f52d2d8b3413ab5822111c68d45370f6104a869fe6e72c58952fe6b420115a9dfadaae2956ad761db2f113", "0x5cc3704a552b40515909a220d3cb91e850d4d6c6c0180424e433d00400612ed6", "0x3477bfac3621680c30cf3ad59da9288bc53e46773af4911592c6f3b2ba9029861fac19b0fa0cc543731133346eb817cd7f3aa4cabac5e613919567bc9704af861c"), + ("0x5680f1d195bbe2b0f1601a039ad23a6ad488c1f0949a68e84bffe398ad", "0xcaf03f0aa6862758e526dd76782a4afa7ad48533f00f8f9e8731d4a6b1656d9f", "0x659263cb4d54c653e5ef41550f959e15a71b01f19bce88750c8c3cad8ab293d12138db412f471df6c67575d49e9c25b6973a3405396a3e6985a3f391efee74751c"), + ("0x487f9a", "0xa13bf6fdb2e2a5790f4a80d822180c7851b227d16c1893de2359dc98b1e27756", "0x143da940f9e144218979074cfde306d0697b3ddaec4c5e464a5aa093733f957776ba158ec4492a6cdc9951c6e0c1b10040916cb503ad240ed3b76677f9ac4ad41c"), + ("0x958c2c5bafc5eb97004774f4c9b56aaecd37c06befac0042a93c67", "0x496b49cc02b63f927f2669a32dece10876e1a33dc0bd684f7643f849ecbe7c73", "0x34e768e959b89d305f16f796d0ff2da4e5923d6a6f33ba66b29471953e10be1a183743fb764f806ca8d97ad29dad94115d0368f374d5e085348267cc1c5bce411b"), + ("0x02e2", "0x0425c9ac326acac4b93ff871f22c1dfe69c05038c2ac5b9eadb7e09743baa603", "0xbf52108b598a02aeeea1f9ee84947300985953edcfd07351f038bfe0de4c62df5cf467caaa7a33c3c4ebdf4aeaf05b1f4674f6b82b27e87fbf8d2a0980e68f1d1b"), + ("0x74391586ff29f0638d7f7971640cefac3bfa3865ec5310e15a", "0x104432a31597e399f3f0f34e70b52a062feeb65aa3ad5383d2d7b90b0ab50126", "0x78c81fff1acdd1773badea5f35b0149e14b3dffe8de0e554b0edd80526acd55f1fc315b96afe5964df24f28b756f5651a6a52b2b9e0ffc87cda2a4a8f448a8951c"), + ("0xd3ba712ef9dd8f8b37d805a9d1c2b5ee92db66dda0fd8582d55cec1b2519d18dfff2333e29081e80544af7244f2f22", "0x330ee59f080c59252218d1245029d8689b48b021dcf2c438938264bbc61d05af", "0xcf96a0f05e40d05ebcedbff0af522a68e6c846e63b44245a1208592ddf03cc12136ad522656f08fd838c55ff78e093d387d23b30b88a57e467636e63c786e04e1c"), + ("0x1e99da3e7bb02e1f239bbf0b2ea113848673dd52da24c87f2f40", "0x52c58101fe861f9292fb6ad3df74551b5fb3feca9983b108645a5a9354bfbe99", "0x8eebcef599eb67e9379e7d6b074123628c1a65f1b754647704eb003fa61aff0a0e5c79fb022970fea80409e20a12bd4b8e1a79a787394a547fbc93c2d3c1e2dc1c"), + ("0x1e973d1b5b158acc7d710099700c793e702b215a1fa534317d5c44406000fc727c", "0x1280413acfcd88a97b759e72e60069a1dc4f0a595e815aad9a1a83fa73f81af2", "0x7a77a37f2f4378dab5a0ba7f55b858a2a116f885f2eeab30dcd0b6d1f7286fbb7cbdccbd52721ce68fbcf2448a2f450a6bc6bc7f0027906259821bb3800133181b"), + ("0x95da865540bd1336402a325a0435a920768f47d4b1ec0d89e0063f811872d1cb6423b5f4a4b931c9f41b216def", "0x0d537e54120ea923621225e3114b91a568a1abe7b7315b642017cad28cfad40b", "0xe04196529154ab89ceb598654f7d1ae178ecdcf73395aa8e8abb9200b504c39c58a93a6e502aaaddc2cbd712b436e9c9fb1010323927835ac54a7a77f11957f91c") + ] + +test_key :: HexString +test_key = "29461542faa1acbc968bcb332115e0537c023f8df416317602ca5d15ca12d02d" + +spec :: Spec +spec = do + describe "Ethereum ECDSA" $ do + it "can hash Ethereum prefixed message" $ for_ test_vector $ \(msg, msgHash, _) -> + convert (hashMessage msg) `shouldBe` msgHash + + it "can sign Ethereum prefixed message" $ for_ test_vector $ \(msg, _, msgSig) -> + signMessage (importKey test_key) msg `shouldBe` msgSig + + it "can create valid raw transaction" $ do + -- using same example as in this blog post: + -- https://medium.com/@codetractio/walkthrough-of-an-ethereum-improvement-proposal-eip-6fda3966d171 + let testCall = Call Nothing + (Just "0x3535353535353535353535353535353535353535") + (Just 21000) + (Just 20000000000) + (Just 1000000000000000000) + Nothing + (Just 9) + key = "4646464646464646464646464646464646464646464646464646464646464646" :: HexString + correctSignedTx = "f86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83" + signTransaction (encodeTransaction testCall 1) (importKey key) `shouldBe` (correctSignedTx :: HexString) + +{- + it "verify message by Ethereum public key" $ do + ecrecover sign' message `shouldBe` Just address + + prop "round robin sign/verify for random message" $ \chars -> + let msg = pack chars + in ecrecover (ecsign key msg) msg `shouldBe` Just address +-} + diff --git a/unit/Crypto/Random/Test/HmacDrbgSpec.hs b/unit/Crypto/Random/Test/HmacDrbgSpec.hs new file mode 100644 index 00000000..d5b1f7ab --- /dev/null +++ b/unit/Crypto/Random/Test/HmacDrbgSpec.hs @@ -0,0 +1,24 @@ +{-# LANGUAGE OverloadedStrings #-} +-- Inspired by https://github.com/indutny/hmac-drbg +module Crypto.Random.Test.HmacDrbgSpec where + +import Crypto.Hash.Algorithms (SHA256) +import Crypto.Random (randomBytesGenerate) +import Data.ByteString (ByteString) +import Test.Hspec + +import Crypto.Random.HmacDrbg +import Data.ByteArray.HexString (HexString) + +spec :: Spec +spec = do + describe "HMAC-DRBG-SHA256" $ do + it "indutny/hmac-drbg test vectors" $ do + let doDrbg :: ByteString -> HexString + doDrbg seed = fst (randomBytesGenerate 32 (initialize seed) :: (HexString, HmacDrbg SHA256)) + + doDrbg "totally random0123456789secret noncemy drbg" + `shouldBe` "018ec5f8e08c41e5ac974eb129ac297c5388ee1864324fa13d9b15cf98d9a157" + + doDrbg "totally random0123456789secret nonce" + `shouldBe` "ed5d61ecf0ef38258e62f03bbb49f19f2cd07ba5145a840d83b134d5963b3633" diff --git a/unit/Data/Solidity/Test/AddressSpec.hs b/unit/Data/Solidity/Test/AddressSpec.hs index 011805ee..9f986c2a 100644 --- a/unit/Data/Solidity/Test/AddressSpec.hs +++ b/unit/Data/Solidity/Test/AddressSpec.hs @@ -1,22 +1,23 @@ {-# LANGUAGE OverloadedStrings #-} module Data.Solidity.Test.AddressSpec where -import Crypto.Secp256k1 (SecKey, derivePubKey) import Data.ByteString (ByteString) import Data.ByteString.Char8 (unpack) import Data.Foldable (for_) import Data.Monoid ((<>)) import Test.Hspec +import Crypto.Ethereum.Utils (derivePubKey, importKey) +import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address spec :: Spec spec = do - describe "EIP55 Test Vectors" $ for_ checksummedAddrs (\addr -> - it (unpack addr <> " should be checksummed") $ verifyChecksum addr `shouldBe` True) + describe "EIP55 Test Vectors" $ for_ checksummedAddrs $ \addr -> + it (unpack addr <> " should be checksummed") $ verifyChecksum addr `shouldBe` True - describe "EIP55 Test Vectors Tampered" $ for_ unchecksummedAddrs (\addr -> - it (unpack addr <> " should not be checksummed") $ verifyChecksum addr `shouldBe` False) + describe "EIP55 Test Vectors Tampered" $ for_ unchecksummedAddrs $ \addr -> + it (unpack addr <> " should not be checksummed") $ verifyChecksum addr `shouldBe` False describe "Conversion from/to hex string" $ do it "should convert from/to on valid hex" $ do @@ -31,10 +32,10 @@ spec = do `shouldBe` Left "Incorrect address length: 1" - describe "Conversion from Secp256k1 keys" $ do - it "derivation from private key" $ do - let key = "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20" :: SecKey - fromPubKey (derivePubKey key) + describe "Conversion from ECC keys" $ do + it "can derive address from public key" $ do + let key = "0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20" :: HexString + fromPubKey (derivePubKey $ importKey key) `shouldBe` "0x6370eF2f4Db3611D657b90667De398a2Cc2a370C" checksummedAddrs :: [ByteString] diff --git a/unit/Network/Ethereum/Web3/Test/LocalAccountSpec.hs b/unit/Network/Ethereum/Web3/Test/LocalAccountSpec.hs deleted file mode 100644 index 1cf92a09..00000000 --- a/unit/Network/Ethereum/Web3/Test/LocalAccountSpec.hs +++ /dev/null @@ -1,26 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - -module Network.Ethereum.Web3.Test.LocalAccountSpec where - -import Crypto.Ethereum (SecKey) -import Test.Hspec - -import Network.Ethereum.Account.PrivateKey (signTransaction) -import Network.Ethereum.Api.Types (Call (..), Quantity (..)) - --- using same example as in this blog post: --- https://medium.com/@codetractio/walkthrough-of-an-ethereum-improvement-proposal-eip-6fda3966d171 -spec :: Spec -spec = describe "transaction signing" $ do - let testCall = Call Nothing - (Just "0x3535353535353535353535353535353535353535") - (Just . Quantity $ 21000) - (Just . Quantity $ 20000000000) - (Just . Quantity $ 1000000000000000000) - Nothing - (Just 9) - privKey = "4646464646464646464646464646464646464646464646464646464646464646" :: SecKey - correctSignedTx = "0xf86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83" - - it "can create valid raw transaction" $ - signTransaction testCall 1 privKey `shouldBe` correctSignedTx From e819a753b0be64c86f6a6161d2f4b856e91d54d5 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 14 Dec 2018 02:22:52 +0300 Subject: [PATCH 053/237] PrivateKeyAccount -> LocalKeyAccount; Added local account test --- src/Network/Ethereum/Account.hs | 8 +-- .../Account/{PrivateKey.hs => LocalKey.hs} | 31 ++++++----- src/Network/Ethereum/Transaction.hs | 6 +-- .../Ethereum/Web3/Test/ComplexStorageSpec.hs | 2 +- .../Ethereum/Web3/Test/LinearizationSpec.hs | 5 +- .../Ethereum/Web3/Test/LocalAccountSpec.hs | 52 +++++++++++++++++++ .../Ethereum/Web3/Test/SimpleStorageSpec.hs | 2 +- 7 files changed, 79 insertions(+), 27 deletions(-) rename src/Network/Ethereum/Account/{PrivateKey.hs => LocalKey.hs} (77%) create mode 100644 test/Network/Ethereum/Web3/Test/LocalAccountSpec.hs diff --git a/src/Network/Ethereum/Account.hs b/src/Network/Ethereum/Account.hs index 155eabfd..cb1d6162 100644 --- a/src/Network/Ethereum/Account.hs +++ b/src/Network/Ethereum/Account.hs @@ -29,8 +29,8 @@ module Network.Ethereum.Account , Personal(..) -- * Local key account - --, PrivateKeyAccount - --, PrivateKey(..) + , LocalKeyAccount + , LocalKey(..) -- * Transaction paramitrization function and lenses , withParam @@ -48,7 +48,7 @@ import Network.Ethereum.Account.Default (DefaultAccount) import Network.Ethereum.Account.Internal (account, block, gasLimit, gasPrice, to, value, withParam) +import Network.Ethereum.Account.LocalKey (LocalKey (..), + LocalKeyAccount) import Network.Ethereum.Account.Personal (Personal (..), PersonalAccount) ---import Network.Ethereum.Account.PrivateKey (PrivateKey (..), --- PrivateKeyAccount) diff --git a/src/Network/Ethereum/Account/PrivateKey.hs b/src/Network/Ethereum/Account/LocalKey.hs similarity index 77% rename from src/Network/Ethereum/Account/PrivateKey.hs rename to src/Network/Ethereum/Account/LocalKey.hs index 00dbe684..4d1b0b8a 100644 --- a/src/Network/Ethereum/Account/PrivateKey.hs +++ b/src/Network/Ethereum/Account/LocalKey.hs @@ -5,7 +5,7 @@ {-# LANGUAGE TypeSynonymInstances #-} -- | --- Module : Network.Ethereum.Account.PrivateKey +-- Module : Network.Ethereum.Account.LocalKey -- Copyright : Alexander Krupenkin 2018 -- Roy Blankman 2018 -- License : BSD3 @@ -14,12 +14,15 @@ -- Stability : experimental -- Portability : unportable -- +-- Using ECC for singing transactions locally, e.g. out of Ethereum node. +-- Transaction will send using 'eth_sendRawTransacion' JSON-RPC method. +-- -module Network.Ethereum.Account.PrivateKey where +module Network.Ethereum.Account.LocalKey where import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) -import qualified Crypto.PubKey.ECC.ECDSA as EC (PrivateKey) +import Crypto.PubKey.ECC.ECDSA (PrivateKey) import Data.ByteArray (convert) import Data.ByteString (empty) import Data.Default (Default (..)) @@ -43,17 +46,17 @@ import Network.Ethereum.Contract.Method (selector) import Network.Ethereum.Transaction (encodeTransaction) -- | Local EOA params -data PrivateKey = PrivateKey - { privateKey :: !EC.PrivateKey - , privateKeyChain :: !Integer +data LocalKey = LocalKey + { localKeyPrivate :: !PrivateKey + , localKeyChainId :: !Integer } deriving (Eq, Show) -instance Default PrivateKey where - def = PrivateKey (importKey empty) foundation +instance Default LocalKey where + def = LocalKey (importKey empty) foundation -type PrivateKeyAccount = AccountT PrivateKey +type LocalKeyAccount = AccountT LocalKey -instance Account PrivateKey PrivateKeyAccount where +instance Account LocalKey LocalKeyAccount where withAccount a = fmap fst . flip runStateT (defaultCallParam a) . runAccountT @@ -62,7 +65,7 @@ instance Account PrivateKey PrivateKeyAccount where c <- getCall let dat = selector (Proxy :: Proxy a) <> encode args - address = fromPubKey (derivePubKey $ privateKey _account) + address = fromPubKey (derivePubKey $ localKeyPrivate _account) nonce <- lift $ Eth.getTransactionCount address _block let params = c { callFrom = Just address @@ -75,15 +78,15 @@ instance Account PrivateKey PrivateKeyAccount where gasLimit <- lift $ Eth.estimateGas params return $ params { callGas = Just gasLimit } - let packer = encodeTransaction params' (privateKeyChain _account) - signed = signTransaction packer (privateKey _account) + let packer = encodeTransaction params' (localKeyChainId _account) + signed = signTransaction packer (localKeyPrivate _account) lift $ getReceipt =<< Eth.sendRawTransaction signed call (args :: a) = do CallParam{..} <- get c <- getCall let dat = selector (Proxy :: Proxy a) <> encode args - address = fromPubKey (derivePubKey $ privateKey _account) + address = fromPubKey (derivePubKey $ localKeyPrivate _account) params = c { callFrom = Just address, callData = Just $ convert dat } res <- lift $ Eth.call params _block diff --git a/src/Network/Ethereum/Transaction.hs b/src/Network/Ethereum/Transaction.hs index 6e328f68..d7b16983 100644 --- a/src/Network/Ethereum/Transaction.hs +++ b/src/Network/Ethereum/Transaction.hs @@ -14,7 +14,7 @@ module Network.Ethereum.Transaction where -- import Data.ByteArray (ByteArray, convert) -import Data.ByteString (ByteString) +import Data.ByteString (ByteString, empty) import Data.Maybe (fromJust, fromMaybe) import Data.RLP (packRLP, rlpEncode) import Data.Word (Word8) @@ -47,10 +47,10 @@ encodeTransaction Call{..} chain_id rsv = do convert . packRLP $ case rsv of -- Unsigned transaction by EIP155 - Nothing -> rlpEncode (nonce, gasPrice, gasLimit, to, value, input, chain_id, 0 :: Int, 0 :: Int) + Nothing -> rlpEncode (nonce, gasPrice, gasLimit, to, value, input, chain_id, empty, empty) -- Signed transaction Just (r, s, v) -> - let v' = v + 8 + 2 * fromInteger chain_id -- Improved 'v' according to EIP155 + let v' = fromIntegral v + 8 + 2 * chain_id -- Improved 'v' according to EIP155 in rlpEncode (nonce, gasPrice, gasLimit, to, value, input, v', r, s) where defaultGasPrice = toWei (10 :: Shannon) diff --git a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs b/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs index 123a1694..97a95a88 100644 --- a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs +++ b/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs @@ -10,7 +10,7 @@ {-# LANGUAGE TemplateHaskell #-} -- | --- Module : Network.Ethereum.Web3.Test.ComplexStorage +-- Module : Network.Ethereum.Web3.Test.ComplexStorageSpec -- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- diff --git a/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs b/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs index 4c9ed615..ed958102 100644 --- a/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs +++ b/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs @@ -13,7 +13,7 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} --- Module : Network.Ethereum.Web3.Test.SimpleStorage +-- Module : Network.Ethereum.Web3.Test.LinearizationSpec -- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- @@ -21,9 +21,6 @@ -- Stability : experimental -- Portability : unportable -- --- SimpleStorage is a Solidity contract which stores a uint256. --- The point of this test is to test function calls to update and --- read the value, as well as an event monitor. module Network.Ethereum.Web3.Test.LinearizationSpec where diff --git a/test/Network/Ethereum/Web3/Test/LocalAccountSpec.hs b/test/Network/Ethereum/Web3/Test/LocalAccountSpec.hs new file mode 100644 index 00000000..f003a528 --- /dev/null +++ b/test/Network/Ethereum/Web3/Test/LocalAccountSpec.hs @@ -0,0 +1,52 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- Module : Network.Ethereum.Web3.Test.LocalAccountSpec +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Simple local account transaction test. +-- + +module Network.Ethereum.Web3.Test.LocalAccountSpec where + +import Lens.Micro ((.~)) +import Lens.Micro.Mtl ((.=)) +import Test.Hspec + +import Crypto.Ethereum.Utils (derivePubKey, importKey) +import Data.ByteArray.HexString (HexString) +import Data.Solidity.Prim.Address (fromPubKey) +import Network.Ethereum.Account (LocalKey (..), send, to, + value, withAccount, + withParam) +import Network.Ethereum.Api.Eth (getBalance) +import Network.Ethereum.Api.Types (DefaultBlock (Pending)) +import Network.Ethereum.Unit (Ether, toWei) +import Network.Ethereum.Web3.Test.Utils (web3) + +spec :: Spec +spec = describe "Local account transactions" $ do + it "should send value" $ do + let key = "0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20" :: HexString + local = LocalKey (importKey key) 420123 + localAddress = fromPubKey (derivePubKey $ importKey key) + dest = "0x0000000000000000000000000000000000000042" + + -- Prepare + web3 $ withAccount () $ + withParam (to .~ localAddress) $ do + value .= (1 :: Ether) + send () + + balance <- web3 $ do + withAccount local $ + withParam (to .~ dest) $ do + value .= (0.5 :: Ether) + send () + getBalance dest Pending + + fromIntegral balance `shouldBe` toWei (0.5 :: Ether) diff --git a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs index 6605a334..677f6bf8 100644 --- a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs +++ b/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs @@ -12,7 +12,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} --- Module : Network.Ethereum.Web3.Test.SimpleStorage +-- Module : Network.Ethereum.Web3.Test.SimpleStorageSpec -- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- From 9b724537cee213e0294ea176f29b5499b3ed7e38 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 20 Dec 2018 20:50:28 +0300 Subject: [PATCH 054/237] TravisCI: added macOS and windows builds --- .travis.yml | 45 +++++++++++++++++++++++++++++---------------- stack.yaml | 3 +-- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index a1cb85b2..23cda5dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ sudo: false -language: nix +language: cpp # Caching so the next build will be fast too. cache: @@ -12,23 +12,36 @@ matrix: include: # Build with different GHC versions and stable package sets - env: RESOLVER=lts-11 - compiler: ": #GHC 8.2.2" + compiler: ": #GHC 8.2" - env: RESOLVER=lts-12 - compiler: ": #GHC 8.4.4" + compiler: ": #GHC 8.4" - env: RESOLVER=nightly - compiler: ": #GHC 8.6.2" + compiler: ": #GHC 8.6" - # Build on macOS in addition to Linux - # - env: RESOLVER=lts-11 - # compiler: ": #GHC 8.2.2" - # os: osx - # - env: RESOLVER=lts-12 - # compiler: ": #GHC 8.4.4" - # os: osx - # - env: RESOLVER=nightly - # compiler: ": #GHC 8.6.2" - # os: osx + # Build on macOS + - env: RESOLVER=lts-11 + compiler: ": #GHC 8.2" + os: osx + - env: RESOLVER=lts-12 + compiler: ": #GHC 8.4" + os: osx + - env: RESOLVER=nightly + compiler: ": #GHC 8.6" + os: osx + + # Build on windows + - env: RESOLVER=lts-11 + compiler: ": #GHC 8.2" + os: windows + - env: RESOLVER=lts-12 + compiler: ": #GHC 8.4" + os: windows + - env: RESOLVER=nightly + compiler: ": #GHC 8.6" + os: windows + +install: +- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then wget https://get.haskellstack.org/stable/windows-x86_64-installer.exe && ./windows-x86_64-installer.exe; else curl -sSL https://get.haskellstack.org/ | sh; fi script: -- nix-shell -p stack --run \ - "stack test web3:unit --flag web3:solidity --nix --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER" +- stack test web3:unit --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER diff --git a/stack.yaml b/stack.yaml index 6e37a121..bae3fb87 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-12.22 +resolver: lts-12.24 # User packages to be built. packages: @@ -7,7 +7,6 @@ packages: # Extra package dependencies extra-deps: -- secp256k1-haskell-0.1.4 - relapse-1.0.0.0 # Dependencies bounds From 34fd829f78833af30cd83c716310f620cdc79657 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 20 Dec 2018 22:28:43 +0300 Subject: [PATCH 055/237] Docs improvements and build fixes --- .travis.yml | 2 +- src/Crypto/Ethereum/Keyfile.hs | 2 ++ src/Data/Solidity/Prim/Int.hs | 6 ++++-- src/Network/Ethereum/Chain.hs | 1 + src/Network/Ethereum/Transaction.hs | 11 +++++++---- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 23cda5dc..70647607 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ matrix: os: windows install: -- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then wget https://get.haskellstack.org/stable/windows-x86_64-installer.exe && ./windows-x86_64-installer.exe; else curl -sSL https://get.haskellstack.org/ | sh; fi + - if [[ $TRAVIS_OS_NAME == 'windows' ]]; then curl -sS -ostack.zip -L --insecure https://get.haskellstack.org/stable/windows-i386.zip && 7z x stack.zip stack.exe; else curl -sSL https://get.haskellstack.org/ | sh; fi script: - stack test web3:unit --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER diff --git a/src/Crypto/Ethereum/Keyfile.hs b/src/Crypto/Ethereum/Keyfile.hs index 042d348d..38b98bf0 100644 --- a/src/Crypto/Ethereum/Keyfile.hs +++ b/src/Crypto/Ethereum/Keyfile.hs @@ -46,9 +46,11 @@ import Data.UUID.Types.Internal (buildFromBytes) import Crypto.Ethereum.Utils (sha3) import Data.ByteArray.HexString (HexString) +-- | Key derivation function parameters and salt. data Kdf = Pbkdf2 !Pbkdf2.Parameters !HexString | Scrypt !Scrypt.Parameters !HexString +-- | Cipher parameters. data Cipher = Aes128Ctr { cipherIv :: !(IV AES128), cipherText :: !HexString } diff --git a/src/Data/Solidity/Prim/Int.hs b/src/Data/Solidity/Prim/Int.hs index 09e5e86e..8245bc53 100644 --- a/src/Data/Solidity/Prim/Int.hs +++ b/src/Data/Solidity/Prim/Int.hs @@ -51,7 +51,7 @@ instance Integral Word256 where toInteger = Basement.toInteger quotRem a b = (Basement.quot a b, Basement.rem a b) --- | Unsigned integer with fixed length in bits +-- | Unsigned integer with fixed length in bits. newtype UIntN (n :: Nat) = UIntN { unUIntN :: Word256 } deriving (Eq, Ord, Enum, Bits, Generic) @@ -91,7 +91,7 @@ instance (n <= 256) => AbiGet (UIntN n) where instance (n <= 256) => AbiPut (UIntN n) where abiPut = putWord256 . unUIntN --- Signed integer with fixed length in bits +-- | Signed integer with fixed length in bits. newtype IntN (n :: Nat) = IntN { unIntN :: Word256 } deriving (Eq, Ord, Enum, Bits, Generic) @@ -131,9 +131,11 @@ instance (n <= 256) => AbiGet (IntN n) where instance (n <= 256) => AbiPut (IntN n) where abiPut = putWord256 . unIntN +-- | Serialize 256 bit unsigned integer. putWord256 :: Putter Word256 putWord256 (Word256 a3 a2 a1 a0) = put a3 >> put a2 >> put a1 >> put a0 +-- | Deserialize 256 bit unsigned integer. getWord256 :: Get Word256 getWord256 = Word256 <$> get <*> get <*> get <*> get diff --git a/src/Network/Ethereum/Chain.hs b/src/Network/Ethereum/Chain.hs index e54d89ef..69325da7 100644 --- a/src/Network/Ethereum/Chain.hs +++ b/src/Network/Ethereum/Chain.hs @@ -7,6 +7,7 @@ -- Stability : experimental -- Portability : unportable -- +-- Ethereum chain IDs. -- module Network.Ethereum.Chain where diff --git a/src/Network/Ethereum/Transaction.hs b/src/Network/Ethereum/Transaction.hs index d7b16983..7f62acc3 100644 --- a/src/Network/Ethereum/Transaction.hs +++ b/src/Network/Ethereum/Transaction.hs @@ -1,6 +1,5 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -module Network.Ethereum.Transaction where -- | -- Module : Network.Ethereum.Transaction @@ -12,6 +11,10 @@ module Network.Ethereum.Transaction where -- Stability : experimental -- Portability : unportable -- +-- Transaction managing utils. +-- + +module Network.Ethereum.Transaction where import Data.ByteArray (ByteArray, convert) import Data.ByteString (ByteString, empty) @@ -24,7 +27,7 @@ import Data.Solidity.Prim.Address (toHexString) import Network.Ethereum.Api.Types (Call (..), Quantity (unQuantity)) import Network.Ethereum.Unit (Shannon, toWei) --- | Ethereum transaction codec. +-- | Ethereum transaction packer. -- -- Two way RLP encoding of Ethereum transaction: for unsigned and signed. -- Packing scheme described in https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md @@ -37,7 +40,7 @@ encodeTransaction :: ByteArray ba -- ^ Should contain signature when transaction signed -> ba -- ^ RLP encoded transaction -encodeTransaction Call{..} chain_id rsv = do +encodeTransaction Call{..} chain_id rsv = let (to :: ByteString) = maybe mempty (toBytes . toHexString) callTo (value :: Integer) = unQuantity $ fromJust callValue (nonce :: Integer) = unQuantity $ fromJust callNonce @@ -45,7 +48,7 @@ encodeTransaction Call{..} chain_id rsv = do (gasLimit :: Integer) = unQuantity $ fromJust callGas (input :: ByteString) = convert $ fromMaybe mempty callData - convert . packRLP $ case rsv of + in convert . packRLP $ case rsv of -- Unsigned transaction by EIP155 Nothing -> rlpEncode (nonce, gasPrice, gasLimit, to, value, input, chain_id, empty, empty) -- Signed transaction From db421d91f57a17216662f75e940cf6a56f65b335 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 20 Dec 2018 23:12:20 +0300 Subject: [PATCH 056/237] LTS-11 build fixes --- .travis.yml | 4 ++-- src/Crypto/Ethereum/Keyfile.hs | 1 + src/Crypto/Ethereum/Signature.hs | 2 +- src/Crypto/Ethereum/Utils.hs | 1 + src/Crypto/Random/HmacDrbg.hs | 1 + src/Network/Ethereum/Account/LocalKey.hs | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 70647607..33a0430a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ matrix: os: windows install: - - if [[ $TRAVIS_OS_NAME == 'windows' ]]; then curl -sS -ostack.zip -L --insecure https://get.haskellstack.org/stable/windows-i386.zip && 7z x stack.zip stack.exe; else curl -sSL https://get.haskellstack.org/ | sh; fi +- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then curl -sS -ostack.zip -L --insecure https://get.haskellstack.org/stable/windows-i386.zip && 7z x stack.zip stack.exe; else curl -sSL https://get.haskellstack.org/ | sh; fi script: -- stack test web3:unit --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER +- stack`if [[ $TRAVIS_OS_NAME == 'windows' ]]; then echo ".exe"; fi` test web3:unit --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER diff --git a/src/Crypto/Ethereum/Keyfile.hs b/src/Crypto/Ethereum/Keyfile.hs index 38b98bf0..ac4db55e 100644 --- a/src/Crypto/Ethereum/Keyfile.hs +++ b/src/Crypto/Ethereum/Keyfile.hs @@ -39,6 +39,7 @@ import Data.Aeson.Types (Parser) import Data.ByteArray (ByteArray, ByteArrayAccess, convert) import qualified Data.ByteArray as BA (drop, take, unpack) import Data.Maybe (fromJust) +import Data.Monoid ((<>)) import Data.Text (Text) import Data.UUID.Types (UUID) import Data.UUID.Types.Internal (buildFromBytes) diff --git a/src/Crypto/Ethereum/Signature.hs b/src/Crypto/Ethereum/Signature.hs index a9abc9e7..bd5d6bed 100644 --- a/src/Crypto/Ethereum/Signature.hs +++ b/src/Crypto/Ethereum/Signature.hs @@ -25,7 +25,6 @@ module Crypto.Ethereum.Signature import Control.Monad (when) import Crypto.Hash (Digest, Keccak_256 (..), SHA256, hashWith) - import Crypto.Number.Generate (generateBetween) import Crypto.Number.ModArithmetic (inverse) import Crypto.Number.Serialize (i2osp, os2ip) @@ -42,6 +41,7 @@ import Data.ByteArray (ByteArray, ByteArrayAccess, import qualified Data.ByteArray as BA (length, unpack) import Data.ByteString.Builder (intDec, toLazyByteString) import qualified Data.ByteString.Lazy as LBS (toStrict) +import Data.Monoid ((<>)) import Data.Word (Word8) import Crypto.Ethereum.Utils (exportKey) diff --git a/src/Crypto/Ethereum/Utils.hs b/src/Crypto/Ethereum/Utils.hs index 66b53905..2e9cfbfa 100644 --- a/src/Crypto/Ethereum/Utils.hs +++ b/src/Crypto/Ethereum/Utils.hs @@ -20,6 +20,7 @@ import Crypto.PubKey.ECC.Types (CurveName (SEC_p256k1), Point (..), getCurveByName) import Data.ByteArray (ByteArray, ByteArrayAccess, convert) +import Data.Monoid ((<>)) -- | Import Ethereum private key from byte array. -- diff --git a/src/Crypto/Random/HmacDrbg.hs b/src/Crypto/Random/HmacDrbg.hs index 6a7c8832..ffc9d36f 100644 --- a/src/Crypto/Random/HmacDrbg.hs +++ b/src/Crypto/Random/HmacDrbg.hs @@ -30,6 +30,7 @@ import Data.ByteArray (ByteArray, convert, singleton) import qualified Data.ByteArray as BA (null, take) import qualified Data.ByteString as B (replicate) import Data.Maybe (fromJust) +import Data.Monoid ((<>)) import Data.Word (Word8) -- | HMAC Deterministic Random Bytes Generator. diff --git a/src/Network/Ethereum/Account/LocalKey.hs b/src/Network/Ethereum/Account/LocalKey.hs index 4d1b0b8a..7927dfcd 100644 --- a/src/Network/Ethereum/Account/LocalKey.hs +++ b/src/Network/Ethereum/Account/LocalKey.hs @@ -26,6 +26,7 @@ import Crypto.PubKey.ECC.ECDSA (PrivateKey) import Data.ByteArray (convert) import Data.ByteString (empty) import Data.Default (Default (..)) +import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) import Crypto.Ethereum (derivePubKey, importKey) From fcabb59fa0c1362b97d8ffbb98a4faff8d8166c0 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 23 Dec 2018 00:12:59 +0300 Subject: [PATCH 057/237] Optimized TravisCI build --- .travis.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33a0430a..c8634930 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ cache: # The different configurations we want to test. matrix: - include: # Build with different GHC versions and stable package sets + include: - env: RESOLVER=lts-11 compiler: ": #GHC 8.2" - env: RESOLVER=lts-12 @@ -18,30 +18,28 @@ matrix: - env: RESOLVER=nightly compiler: ": #GHC 8.6" - # Build on macOS - env: RESOLVER=lts-11 compiler: ": #GHC 8.2" - os: osx + os: osx - env: RESOLVER=lts-12 compiler: ": #GHC 8.4" - os: osx + os: osx - env: RESOLVER=nightly compiler: ": #GHC 8.6" - os: osx + os: osx - # Build on windows - env: RESOLVER=lts-11 compiler: ": #GHC 8.2" - os: windows + os: windows - env: RESOLVER=lts-12 compiler: ": #GHC 8.4" - os: windows + os: windows - env: RESOLVER=nightly compiler: ": #GHC 8.6" - os: windows + os: windows install: -- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then curl -sS -ostack.zip -L --insecure https://get.haskellstack.org/stable/windows-i386.zip && 7z x stack.zip stack.exe; else curl -sSL https://get.haskellstack.org/ | sh; fi +- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then choco install haskell-stack; else curl -sSL https://get.haskellstack.org/ | sh; fi script: -- stack`if [[ $TRAVIS_OS_NAME == 'windows' ]]; then echo ".exe"; fi` test web3:unit --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER +- stack test web3:unit --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER From bfc4b554c15097e5d0eaaaaf70f0a8bc44ba5d09 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 23 Dec 2018 01:57:42 +0300 Subject: [PATCH 058/237] Fixed solidity compiler build and move it sources to separate dir --- CHANGELOG.md | 4 +++ .../Language/Solidity/Compiler.hs | 0 .../Language/Solidity/Compiler/Foreign.hsc | 0 {cbits => compiler/cbits}/solidity_lite.cpp | 3 +- {cbits => compiler/cbits}/solidity_lite.h | 0 package.yaml | 34 +++++++++++-------- unit/Language/Solidity/Test/CompilerSpec.hs | 8 ++--- 7 files changed, 29 insertions(+), 20 deletions(-) rename {src => compiler}/Language/Solidity/Compiler.hs (100%) rename {src => compiler}/Language/Solidity/Compiler/Foreign.hsc (100%) rename {cbits => compiler/cbits}/solidity_lite.cpp (96%) rename {cbits => compiler/cbits}/solidity_lite.h (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2b31f97..496f6dc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.8.2.1] 2018-11-19 +### Changed +- Fixed dependencies bounds for stackage distribution + ## [0.8.2.0] 2018-11-07 ### Changed - Gas estimation runs when gas limit is not set before diff --git a/src/Language/Solidity/Compiler.hs b/compiler/Language/Solidity/Compiler.hs similarity index 100% rename from src/Language/Solidity/Compiler.hs rename to compiler/Language/Solidity/Compiler.hs diff --git a/src/Language/Solidity/Compiler/Foreign.hsc b/compiler/Language/Solidity/Compiler/Foreign.hsc similarity index 100% rename from src/Language/Solidity/Compiler/Foreign.hsc rename to compiler/Language/Solidity/Compiler/Foreign.hsc diff --git a/cbits/solidity_lite.cpp b/compiler/cbits/solidity_lite.cpp similarity index 96% rename from cbits/solidity_lite.cpp rename to compiler/cbits/solidity_lite.cpp index c3fce361..a93d6d95 100644 --- a/cbits/solidity_lite.cpp +++ b/compiler/cbits/solidity_lite.cpp @@ -1,8 +1,9 @@ #include #include -#include +#include using namespace dev::solidity; +using namespace langutil; using namespace std; struct Solidity { diff --git a/cbits/solidity_lite.h b/compiler/cbits/solidity_lite.h similarity index 100% rename from cbits/solidity_lite.h rename to compiler/cbits/solidity_lite.h diff --git a/package.yaml b/package.yaml index 074909f7..c00da47b 100644 --- a/package.yaml +++ b/package.yaml @@ -84,34 +84,37 @@ flags: default: False manual: True - solidity: + compiler: description: Enable Solidity compiler default: False manual: True +when: +- condition: flag(debug) + ghc-options: -ddump-splices + +- condition: flag(compiler) + source-dirs: compiler + cpp-options: -DSOLIDITY_COMPILER + dependencies: containers + extra-libraries: solidity + c-sources: ./compiler/cbits/solidity_lite.cpp + include-dirs: ./compiler/cbits + library: source-dirs: src - when: - - condition: flag(debug) - ghc-options: -ddump-splices - - - condition: flag(solidity) - cpp-options: -DSOLIDITY_COMPILER - dependencies: containers - extra-libraries: solidity - c-sources: ./cbits/solidity_lite.cpp - include-dirs: ./cbits tests: unit: main: Spec.hs - source-dirs: unit + source-dirs: + - unit + - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - hspec-discover >=2.4.4 && <2.7 - hspec-contrib >=0.4.0 && <0.6 - hspec >=2.4.4 && <2.7 - - web3 ghc-options: - -threaded - -rtsopts @@ -119,7 +122,9 @@ tests: live: main: Spec.hs - source-dirs: test + source-dirs: + - test + - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - hspec-discover >=2.4.4 && <2.7 @@ -129,7 +134,6 @@ tests: - random >=1.1 && <1.2 - time >=1.6.0 && <1.9 - stm >=2.4.4 && <2.6 - - web3 ghc-options: - -threaded - -rtsopts diff --git a/unit/Language/Solidity/Test/CompilerSpec.hs b/unit/Language/Solidity/Test/CompilerSpec.hs index e6056026..ac2af75b 100644 --- a/unit/Language/Solidity/Test/CompilerSpec.hs +++ b/unit/Language/Solidity/Test/CompilerSpec.hs @@ -11,18 +11,18 @@ import Test.Hspec import Language.Solidity.Compiler spec :: Spec -spec = describe "solidity" $ do +spec = describe "solidity compiler" $ do it "can compile empty contract" $ do compile (Sources [("A", "contract A {}")] [] True) - `shouldBe` Right [("A", ("[]\n", "6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a72305820613b8f0a4aab50fea86c1e4943bcddad6d753778395309a4e055efcda614b0690029"))] + `shouldBe` Right [("A", ("[]\n", "6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfea165627a7a7230582055975a3cf5eb9a652c2154ede405cdb2137a09e47088fb89162c336da0b415c40029"))] it "can handle broken contract" $ do compile (Sources [("Fail", "contract Fail {")] [] True) `shouldBe` Left "Fail:1:16: Error: Function, variable, struct or modifier declaration expected.\ncontract Fail {\n ^\n" it "can compile simple contract" $ do - compile (Sources [("SimpleStorage", "contract SimpleStorage { uint256 public a; function set(uint256 _a) { a = _a; } }")] [] True) - `shouldBe` Right [("SimpleStorage", ("[\n\t{\n\t\t\"constant\" : true,\n\t\t\"inputs\" : [],\n\t\t\"name\" : \"a\",\n\t\t\"outputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"view\",\n\t\t\"type\" : \"function\"\n\t},\n\t{\n\t\t\"constant\" : false,\n\t\t\"inputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"_a\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"name\" : \"set\",\n\t\t\"outputs\" : [],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"nonpayable\",\n\t\t\"type\" : \"function\"\n\t}\n]\n", "608060405234801561001057600080fd5b5060dc8061001f6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dbe671f14604e57806360fe47b1146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b80600081905550505600a165627a7a7230582053764f3cc73b0960abb0d97899a8133bee5eb98c131978821f7add85f33d4f2e0029"))] + compile (Sources [("SimpleStorage", "contract SimpleStorage { uint256 public a; function set(uint256 _a) public { a = _a; } }")] [] True) + `shouldBe` Right [("SimpleStorage", ("[\n\t{\n\t\t\"constant\" : true,\n\t\t\"inputs\" : [],\n\t\t\"name\" : \"a\",\n\t\t\"outputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"view\",\n\t\t\"type\" : \"function\"\n\t},\n\t{\n\t\t\"constant\" : false,\n\t\t\"inputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"_a\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"name\" : \"set\",\n\t\t\"outputs\" : [],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"nonpayable\",\n\t\t\"type\" : \"function\"\n\t}\n]\n", "608060405234801561001057600080fd5b5060e38061001f6000396000f3fe6080604052600436106043576000357c0100000000000000000000000000000000000000000000000000000000900480630dbe671f14604857806360fe47b1146070575b600080fd5b348015605357600080fd5b50605a60a7565b6040518082815260200191505060405180910390f35b348015607b57600080fd5b5060a560048036036020811015609057600080fd5b810190808035906020019092919050505060ad565b005b60005481565b806000819055505056fea165627a7a7230582077f3d0f8c042c028ca18fb49065c0091b05c6b70dd5aee2b8a4388f7ecaa308f0029"))] #else From a3761e9e6a3a10e6dadaa801b5b6b97b6c8547b5 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 29 Dec 2018 11:04:42 +0300 Subject: [PATCH 059/237] Adding build for LTS-13 --- .travis.yml | 45 ++++++++++++++++++++++++++++----------------- README.md | 2 +- stack.yaml | 2 +- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index c8634930..14060854 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,34 +12,45 @@ matrix: # Build with different GHC versions and stable package sets include: - env: RESOLVER=lts-11 - compiler: ": #GHC 8.2" + compiler: "LTS11" - env: RESOLVER=lts-12 - compiler: ": #GHC 8.4" + compiler: "LTS12" + - env: RESOLVER=lts-13 + compiler: "LTS13" - env: RESOLVER=nightly - compiler: ": #GHC 8.6" + compiler: "nightly" - env: RESOLVER=lts-11 - compiler: ": #GHC 8.2" - os: osx + compiler: "LTS11" + os: osx - env: RESOLVER=lts-12 - compiler: ": #GHC 8.4" - os: osx + compiler: "LTS12" + os: osx + - env: RESOLVER=lts-13 + compiler: "LTS13" + os: osx - env: RESOLVER=nightly - compiler: ": #GHC 8.6" - os: osx + compiler: "nightly" + os: osx - env: RESOLVER=lts-11 - compiler: ": #GHC 8.2" - os: windows + compiler: "LTS11" + os: windows - env: RESOLVER=lts-12 - compiler: ": #GHC 8.4" - os: windows + compiler: "LTS12" + os: windows + - env: RESOLVER=lts-13 + compiler: "LTS13" + os: windows - env: RESOLVER=nightly - compiler: ": #GHC 8.6" - os: windows + compiler: "nightly" + os: windows -install: +before_install: - if [[ $TRAVIS_OS_NAME == 'windows' ]]; then choco install haskell-stack; else curl -sSL https://get.haskellstack.org/ | sh; fi +install: +- travis_wait 30 stack build --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER + script: -- stack test web3:unit --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER +- stack test web3:unit --no-terminal --resolver $RESOLVER diff --git a/README.md b/README.md index 3f2f24e3..a1e67502 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The Haskell Ethereum API which implements the [Generic JSON RPC](https://github. [![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://travis-ci.org/airalab/hs-web3.svg?branch=master)](https://travis-ci.org/airalab/hs-web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) -[![LTS-12](http://stackage.org/package/web3/badge/lts-12)](http://stackage.org/lts-12/package/web3) +[![LTS-13](http://stackage.org/package/web3/badge/lts-13)](http://stackage.org/lts-13/package/web3) [![nightly](http://stackage.org/package/web3/badge/nightly)](http://stackage.org/nightly/package/web3) [![Code Triagers](https://www.codetriage.com/airalab/hs-web3/badges/users.svg)](https://www.codetriage.com/airalab/hs-web3) ![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg) diff --git a/stack.yaml b/stack.yaml index bae3fb87..90c50734 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-12.24 +resolver: lts-13.0 # User packages to be built. packages: From a2a9ee201307e4a3c78f2a9fa2cc86a7e14e0ca4 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 4 Jan 2019 18:54:47 +0300 Subject: [PATCH 060/237] Increased TravisCI build timeout --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 14060854..9ef2c9d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ before_install: - if [[ $TRAVIS_OS_NAME == 'windows' ]]; then choco install haskell-stack; else curl -sSL https://get.haskellstack.org/ | sh; fi install: -- travis_wait 30 stack build --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER +- travis_wait 60 stack build --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER script: - stack test web3:unit --no-terminal --resolver $RESOLVER From 517f7cbf81c0e90d1f4be0636a2a2e6c6beb2b7e Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 9 Jan 2019 11:06:45 +0300 Subject: [PATCH 061/237] Bump version --- CHANGELOG.md | 5 +++++ package.yaml | 6 +++--- src/Crypto/Ethereum.hs | 3 +-- src/Crypto/Ethereum/Signature.hs | 8 -------- stack.yaml | 2 +- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 496f6dc6..7c375c03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.8.3.0] 2019-01-09 +### Changed +- Cryptonite based ECC signer for messages and transactions, it removes secp256k1 dependency +- Fixed dependencies bounds for stackage LTS-13 + ## [0.8.2.1] 2018-11-19 ### Changed - Fixed dependencies bounds for stackage distribution diff --git a/package.yaml b/package.yaml index c00da47b..9a628ca0 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 0.8.2.1 +version: 0.8.3.0 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" @@ -33,7 +33,7 @@ dependencies: - data-default >=0.7.1.1 && <0.8 - generics-sop >=0.3.1.0 && <0.5 - transformers >=0.5.2.0 && <0.6 -- http-client >=0.5.7.1 && <0.6 +- http-client >=0.5.7.1 && <0.7 - uuid-types >=1.0.3 && <1.1 - bytestring >=0.10.8.1 && <0.11 - cryptonite >=0.23 && <0.26 @@ -47,7 +47,7 @@ dependencies: - memory >=0.14.11 && <0.15 - cereal >=0.5.4.0 && <0.6 - aeson >=1.1.2.0 && <1.5 -- vinyl >=0.5.3 && <0.11 +- vinyl >=0.5.3 && <0.12 - async >=2.1.1.1 && <2.3 - text >=1.2.2.2 && <1.3 - mtl >=2.2.1 && <2.3 diff --git a/src/Crypto/Ethereum.hs b/src/Crypto/Ethereum.hs index 9b00f746..94a4a08b 100644 --- a/src/Crypto/Ethereum.hs +++ b/src/Crypto/Ethereum.hs @@ -20,12 +20,11 @@ module Crypto.Ethereum -- * Digital Signature Algorithm , signMessage - , recover -- * Hash function , sha3 ) where -import Crypto.Ethereum.Signature (recover, signMessage) +import Crypto.Ethereum.Signature (signMessage) import Crypto.Ethereum.Utils (derivePubKey, importKey, sha3) import Crypto.PubKey.ECC.ECDSA (PrivateKey, PublicKey) diff --git a/src/Crypto/Ethereum/Signature.hs b/src/Crypto/Ethereum/Signature.hs index bd5d6bed..02eaa1e4 100644 --- a/src/Crypto/Ethereum/Signature.hs +++ b/src/Crypto/Ethereum/Signature.hs @@ -17,7 +17,6 @@ module Crypto.Ethereum.Signature hashMessage , signMessage , signTransaction - , recover , pack , unpack ) where @@ -128,13 +127,6 @@ ecsign pk@(PrivateKey curve d) z = do | otherwise = (s, v) return $ (r, s', v' + 27) --- | Recover message signer Ethereum address. -recover :: (ByteArrayAccess msg, ByteArrayAccess rsv) - => msg - -> rsv - -> Address -recover = undefined - -- | Unpack recoverable signature from byte array. -- -- Input array should have 65 byte length. diff --git a/stack.yaml b/stack.yaml index 90c50734..91666fff 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-13.0 +resolver: lts-13.2 # User packages to be built. packages: From d63d4841470edb772d7b07ee4c3c9fd0413ff99f Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 10 Jan 2019 13:07:43 +0300 Subject: [PATCH 062/237] Updated changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c375c03..cb65abe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. ## [0.8.3.0] 2019-01-09 +### Added +- Web3 secret storage v3 support + ### Changed - Cryptonite based ECC signer for messages and transactions, it removes secp256k1 dependency - Fixed dependencies bounds for stackage LTS-13 From d7a534907cb4b58c56ecd2e4db7bb7aa4e9849d5 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 21 Jan 2019 16:30:15 +0300 Subject: [PATCH 063/237] Fixed dependencies bounds --- package.yaml | 12 ++++++------ stack.yaml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.yaml b/package.yaml index 9a628ca0..abc42da0 100644 --- a/package.yaml +++ b/package.yaml @@ -23,8 +23,8 @@ extra-source-files: - test/contracts/Linearization.json dependencies: -- base >4.9 && <4.13 -- template-haskell >=2.11.1.0 && <2.15 +- base >4.10 && <4.13 +- template-haskell >=2.12 && <2.15 - http-client-tls >=0.3.5.1 && <0.4 - microlens-aeson >=2.2.0.2 && <2.4 - microlens-mtl >=0.1.11.0 && <0.2 @@ -112,9 +112,9 @@ tests: - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.7 + - hspec-discover >=2.4.4 && <2.8 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.7 + - hspec >=2.4.4 && <2.8 ghc-options: - -threaded - -rtsopts @@ -127,9 +127,9 @@ tests: - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.7 + - hspec-discover >=2.4.4 && <2.8 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.7 + - hspec >=2.4.4 && <2.8 - split >=0.2.3 && <0.3 - random >=1.1 && <1.2 - time >=1.6.0 && <1.9 diff --git a/stack.yaml b/stack.yaml index 91666fff..237a98e9 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-13.2 +resolver: lts-13.4 # User packages to be built. packages: From 9d53e40433b1f06770fc09a7a8efb600a0b87fc0 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 21 Jan 2019 16:30:33 +0300 Subject: [PATCH 064/237] Bump version --- package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.yaml b/package.yaml index abc42da0..8b7112ac 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 0.8.3.0 +version: 0.8.3.1 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" From 81cc62595bfb68c339a1c70e5123d8cdba685568 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 21 Jan 2019 16:33:18 +0300 Subject: [PATCH 065/237] Added Hackage Matrix badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a1e67502..dec6f9e7 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ The Haskell Ethereum API which implements the [Generic JSON RPC](https://github. [![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://travis-ci.org/airalab/hs-web3.svg?branch=master)](https://travis-ci.org/airalab/hs-web3) +[![Hackage Matrix](https://matrix.hackage.haskell.org/api/v2/packages/web3/badge)](https://matrix.hackage.haskell.org/package/web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) [![LTS-13](http://stackage.org/package/web3/badge/lts-13)](http://stackage.org/lts-13/package/web3) [![nightly](http://stackage.org/package/web3/badge/nightly)](http://stackage.org/nightly/package/web3) From 8106aa46b1cc013a3a387221bd70ad52e40f9635 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 21 Jan 2019 18:15:48 +0300 Subject: [PATCH 066/237] Increased TravisCI build timeout --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9ef2c9d3..47d3ff59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ before_install: - if [[ $TRAVIS_OS_NAME == 'windows' ]]; then choco install haskell-stack; else curl -sSL https://get.haskellstack.org/ | sh; fi install: -- travis_wait 60 stack build --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER +- travis_wait 120 stack build --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER script: - stack test web3:unit --no-terminal --resolver $RESOLVER From 7ef6f6af11ad59143da475124680098d9d4fa062 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 13 May 2019 12:51:18 +0300 Subject: [PATCH 067/237] Fixed out of bounds (commercialhaskell/stackage#4533, commercialhaskell/stackage#4527) --- .travis.yml | 2 +- package.yaml | 4 ++-- stack.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 47d3ff59..0fcb3ea9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ before_install: - if [[ $TRAVIS_OS_NAME == 'windows' ]]; then choco install haskell-stack; else curl -sSL https://get.haskellstack.org/ | sh; fi install: -- travis_wait 120 stack build --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER +- travis_wait 180 stack build --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER script: - stack test web3:unit --no-terminal --resolver $RESOLVER diff --git a/package.yaml b/package.yaml index 8b7112ac..11a9da4b 100644 --- a/package.yaml +++ b/package.yaml @@ -31,7 +31,7 @@ dependencies: - microlens-th >=0.4.1.1 && <0.5 - microlens >=0.4.8.1 && <0.5 - data-default >=0.7.1.1 && <0.8 -- generics-sop >=0.3.1.0 && <0.5 +- generics-sop >=0.3.1.0 && <0.6 - transformers >=0.5.2.0 && <0.6 - http-client >=0.5.7.1 && <0.7 - uuid-types >=1.0.3 && <1.1 @@ -39,7 +39,7 @@ dependencies: - cryptonite >=0.23 && <0.26 - exceptions >=0.8.3 && <0.11 - basement >=0.0.4 && <0.1 -- machines >=0.6.3 && <0.7 +- machines >=0.6.3 && <0.8 - OneTuple >=0.2.1 && <0.3 - relapse >=1.0.0.0 && <2.0 - tagged >=0.8.5 && <0.9 diff --git a/stack.yaml b/stack.yaml index 237a98e9..9b424cff 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-13.4 +resolver: lts-13.21 # User packages to be built. packages: @@ -7,7 +7,7 @@ packages: # Extra package dependencies extra-deps: -- relapse-1.0.0.0 +- relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c # Dependencies bounds pvp-bounds: both From 2a5ec0ca37326e4d4f941e4576a0464e36a5d017 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 13 May 2019 13:04:42 +0300 Subject: [PATCH 068/237] Optimized pragmas --- src/Data/Solidity/Event.hs | 1 - src/Data/Solidity/Event/Internal.hs | 1 - src/Data/Solidity/Prim/Int.hs | 1 - src/Network/Ethereum/Account/Class.hs | 1 - src/Network/Ethereum/Account/Default.hs | 1 - src/Network/Ethereum/Account/LocalKey.hs | 1 - src/Network/Ethereum/Account/Personal.hs | 1 - src/Network/Ethereum/Contract.hs | 1 - src/Network/Ethereum/Contract/Event/MultiFilter.hs | 1 - src/Network/Ethereum/Contract/Event/SingleFilter.hs | 1 - src/Network/Ethereum/Unit.hs | 9 ++++----- src/Network/JsonRpc/TinyClient.hs | 1 - 12 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/Data/Solidity/Event.hs b/src/Data/Solidity/Event.hs index bce0a51c..d658fa8a 100644 --- a/src/Data/Solidity/Event.hs +++ b/src/Data/Solidity/Event.hs @@ -2,7 +2,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} -{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Solidity/Event/Internal.hs b/src/Data/Solidity/Event/Internal.hs index 06067f1b..355f037e 100644 --- a/src/Data/Solidity/Event/Internal.hs +++ b/src/Data/Solidity/Event/Internal.hs @@ -3,7 +3,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-} -{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Solidity/Prim/Int.hs b/src/Data/Solidity/Prim/Int.hs index 8245bc53..4034a732 100644 --- a/src/Data/Solidity/Prim/Int.hs +++ b/src/Data/Solidity/Prim/Int.hs @@ -2,7 +2,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} diff --git a/src/Network/Ethereum/Account/Class.hs b/src/Network/Ethereum/Account/Class.hs index a009a3ce..d8cce656 100644 --- a/src/Network/Ethereum/Account/Class.hs +++ b/src/Network/Ethereum/Account/Class.hs @@ -1,6 +1,5 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FunctionalDependencies #-} -{-# LANGUAGE MultiParamTypeClasses #-} -- | -- Module : Network.Ethereum.Account.Class diff --git a/src/Network/Ethereum/Account/Default.hs b/src/Network/Ethereum/Account/Default.hs index 3da87f59..d68e13f1 100644 --- a/src/Network/Ethereum/Account/Default.hs +++ b/src/Network/Ethereum/Account/Default.hs @@ -2,7 +2,6 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeSynonymInstances #-} -- | -- Module : Network.Ethereum.Account.Default diff --git a/src/Network/Ethereum/Account/LocalKey.hs b/src/Network/Ethereum/Account/LocalKey.hs index 7927dfcd..419234df 100644 --- a/src/Network/Ethereum/Account/LocalKey.hs +++ b/src/Network/Ethereum/Account/LocalKey.hs @@ -2,7 +2,6 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeSynonymInstances #-} -- | -- Module : Network.Ethereum.Account.LocalKey diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs index fe76a381..a5c6b58c 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/src/Network/Ethereum/Account/Personal.hs @@ -3,7 +3,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeSynonymInstances #-} -- | -- Module : Network.Ethereum.Account.Personal diff --git a/src/Network/Ethereum/Contract.hs b/src/Network/Ethereum/Contract.hs index c95ffe98..94158542 100644 --- a/src/Network/Ethereum/Contract.hs +++ b/src/Network/Ethereum/Contract.hs @@ -2,7 +2,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeSynonymInstances #-} -- | -- Module : Network.Ethereum.Contract diff --git a/src/Network/Ethereum/Contract/Event/MultiFilter.hs b/src/Network/Ethereum/Contract/Event/MultiFilter.hs index 699476aa..c03228af 100644 --- a/src/Network/Ethereum/Contract/Event/MultiFilter.hs +++ b/src/Network/Ethereum/Contract/Event/MultiFilter.hs @@ -8,7 +8,6 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} -{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} diff --git a/src/Network/Ethereum/Contract/Event/SingleFilter.hs b/src/Network/Ethereum/Contract/Event/SingleFilter.hs index 64b487cf..311b53cb 100644 --- a/src/Network/Ethereum/Contract/Event/SingleFilter.hs +++ b/src/Network/Ethereum/Contract/Event/SingleFilter.hs @@ -6,7 +6,6 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} diff --git a/src/Network/Ethereum/Unit.hs b/src/Network/Ethereum/Unit.hs index 51af38a6..91e9b629 100644 --- a/src/Network/Ethereum/Unit.hs +++ b/src/Network/Ethereum/Unit.hs @@ -1,8 +1,7 @@ -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeSynonymInstances #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} -- | -- Module : Network.Ethereum.Unit diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index b0341f45..186f9a34 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -3,7 +3,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} -{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} From 1db0092b4e3a7f31e6fa1a4a613e6c91328cad7f Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 13 May 2019 13:05:01 +0300 Subject: [PATCH 069/237] Bump version --- package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.yaml b/package.yaml index 11a9da4b..f96e6cbe 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 0.8.3.1 +version: 0.8.3.2 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" From 7afb9836c8460f636b440792448f8fc2fc96a4c9 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 13 May 2019 13:13:39 +0300 Subject: [PATCH 070/237] Updated changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb65abe4..179dd696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.8.3.2] 2019-05-13 +### Changed +- Fixed dependencies bounds for stackage distribution +- Optimized LANGUAGE pragmas + +## [0.8.3.1] 2019-01-21 +### Changed +- Fixed dependencies bounds for stackage distribution + ## [0.8.3.0] 2019-01-09 ### Added - Web3 secret storage v3 support From ed7f597aac5e3ae1c2d1277c67d18b562b643879 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 21 May 2019 19:10:11 +0300 Subject: [PATCH 071/237] Fix cryptonite bounds (commercialhaskell/stackage#4569) --- package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.yaml b/package.yaml index f96e6cbe..402f478b 100644 --- a/package.yaml +++ b/package.yaml @@ -36,7 +36,7 @@ dependencies: - http-client >=0.5.7.1 && <0.7 - uuid-types >=1.0.3 && <1.1 - bytestring >=0.10.8.1 && <0.11 -- cryptonite >=0.23 && <0.26 +- cryptonite >=0.23 && <0.27 - exceptions >=0.8.3 && <0.11 - basement >=0.0.4 && <0.1 - machines >=0.6.3 && <0.8 From a5e27b0074f933fa08bd6183aae176a9d24200ec Mon Sep 17 00:00:00 2001 From: Artyom Kazak Date: Sat, 15 Jun 2019 08:44:42 +0200 Subject: [PATCH 072/237] Fix aeson bounds (#91) SumEncoding is not exported until aeson-1.2.2.0 --- package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.yaml b/package.yaml index 402f478b..f05f7f0f 100644 --- a/package.yaml +++ b/package.yaml @@ -46,7 +46,7 @@ dependencies: - parsec >=3.1.11 && <3.2 - memory >=0.14.11 && <0.15 - cereal >=0.5.4.0 && <0.6 -- aeson >=1.1.2.0 && <1.5 +- aeson >=1.2.2.0 && <1.5 - vinyl >=0.5.3 && <0.12 - async >=2.1.1.1 && <2.3 - text >=1.2.2.2 && <1.3 From 170e143a51a3ff0ff66c3c4ff82f7afdf8cbf051 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 24 Jun 2019 23:29:26 +0530 Subject: [PATCH 073/237] Added runWeb3WS and included websockets in dependencies --- package.yaml | 1 + src/Network/Ethereum/Api/Provider.hs | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/package.yaml b/package.yaml index f05f7f0f..d7fc3755 100644 --- a/package.yaml +++ b/package.yaml @@ -51,6 +51,7 @@ dependencies: - async >=2.1.1.1 && <2.3 - text >=1.2.2.2 && <1.3 - mtl >=2.2.1 && <2.3 +- websockets >=0.12.5.3 && <0.13 ghc-options: - -funbox-strict-fields diff --git a/src/Network/Ethereum/Api/Provider.hs b/src/Network/Ethereum/Api/Provider.hs index 988ec562..8e06441f 100644 --- a/src/Network/Ethereum/Api/Provider.hs +++ b/src/Network/Ethereum/Api/Provider.hs @@ -23,7 +23,6 @@ import Control.Monad.Catch (MonadThrow) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.State (MonadState (..)) import Control.Monad.Trans.State (StateT, evalStateT) -import Data.Default (Default (..)) import GHC.Generics (Generic) import Lens.Micro.Mtl ((.=)) import Network.HTTP.Client (Manager) @@ -51,11 +50,11 @@ instance Exception Web3Error --TODO: Change to `HttpProvider ServerUri | IpcProvider FilePath` to support IPC -- | Web3 Provider -data Provider = HttpProvider String +data Provider = HttpProvider String | WSProvider String deriving (Show, Eq, Generic) -instance Default Provider where - def = HttpProvider "http://localhost:8545" +defaultHttpPovider = HttpProvider "http://localhost:8545" +defaultWSPovider = WSProvider "ws://127.0.0.1:8546" -- | 'Web3' monad runner, using the supplied Manager runWeb3With :: MonadIO m @@ -75,12 +74,19 @@ runWeb3' (HttpProvider uri) f = do cfg <- defaultSettings uri liftIO . try . flip evalStateT cfg . unWeb3 $ f --- | 'Web3' runner for default provider +-- | 'Web3' runner for default http provider runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a) {-# INLINE runWeb3 #-} -runWeb3 = runWeb3' def +runWeb3 = runWeb3' defaultHttpPovider + +-- | 'Web3' runner for default WS provider +runWeb3WS :: MonadIO m + => Web3 a + -> m (Either Web3Error a) +{-# INLINE runWeb3WS #-} +runWeb3WS = runWeb3' defaultWSPovider -- | Fork 'Web3' with the same 'Provider' and 'Manager' forkWeb3 :: Web3 a -> Web3 (Async a) From 68465379cebcc856669756f3618affd27c519065 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Thu, 27 Jun 2019 01:46:04 +0530 Subject: [PATCH 074/237] Extending JsonRpcClient to also hold JsonRpcWSClient and replacing microlens functions in Connection and runWeb3With --- src/Network/Ethereum/Api/Provider.hs | 9 +++--- src/Network/JsonRpc/TinyClient.hs | 44 +++++++++++++++------------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/src/Network/Ethereum/Api/Provider.hs b/src/Network/Ethereum/Api/Provider.hs index 8e06441f..225ef9cf 100644 --- a/src/Network/Ethereum/Api/Provider.hs +++ b/src/Network/Ethereum/Api/Provider.hs @@ -22,9 +22,8 @@ import Control.Exception (Exception, try) import Control.Monad.Catch (MonadThrow) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.State (MonadState (..)) -import Control.Monad.Trans.State (StateT, evalStateT) +import Control.Monad.Trans.State (StateT, evalStateT, withStateT) import GHC.Generics (Generic) -import Lens.Micro.Mtl ((.=)) import Network.HTTP.Client (Manager) import Network.JsonRpc.TinyClient (JsonRpc, JsonRpcClient, @@ -62,8 +61,10 @@ runWeb3With :: MonadIO m -> Provider -> Web3 a -> m (Either Web3Error a) -runWeb3With manager provider f = - runWeb3' provider $ jsonRpcManager .= manager >> f +runWeb3With manager provider f = do + runWeb3' provider Web3{ unWeb3 = withStateT changeManager $ unWeb3 f} + where + changeManager jsonRpc = jsonRpc {jsonRpcManager = manager} -- | 'Web3' monad runner runWeb3' :: MonadIO m diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index 186f9a34..cae005b8 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -65,45 +65,48 @@ module Network.JsonRpc.TinyClient import Control.Applicative ((<|>)) import Control.Exception (Exception) -import Control.Monad ((<=<)) +import Control.Monad ((<=<),forever, unless) import Control.Monad.Catch (MonadThrow (..)) import Control.Monad.IO.Class (MonadIO (..)) -import Control.Monad.State (MonadState) +import Control.Monad.State (MonadState,get) import Crypto.Number.Generate (generateMax) import Data.Aeson (FromJSON (..), ToJSON (..), Value (String), eitherDecode, encode, object, withObject, (.:), (.:?), (.=)) import Data.ByteString.Lazy (ByteString) import Data.Text (Text, unpack) -import Lens.Micro.Mtl (use) -import Lens.Micro.TH (makeLenses) import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), httpLbs, method, newManager, parseRequest, requestBody, requestHeaders, responseBody) import Network.HTTP.Client.TLS (tlsManagerSettings) +import Network.WebSockets (Connection) -- | JSON-RPC monad constrait. type JsonRpcM m = (MonadIO m, MonadThrow m, MonadState JsonRpcClient m) -- | JSON-RPC client state vars. -data JsonRpcClient = JsonRpcClient - { _jsonRpcManager :: Manager -- ^ HTTP connection manager. - , _jsonRpcServer :: String -- ^ Remote server URI. - } +data JsonRpcClient = JsonRpcHTTPClient + { jsonRpcManager :: Manager -- ^ HTTP connection manager. + , jsonRpcServer :: String -- ^ Remote server URI. + } | JsonRpcWSClient + { jsonRpcWSConn :: Connection -- ^ WS connection. + , jsonRpcWSServer :: String -- ^ Remote server URI. + } -$(makeLenses ''JsonRpcClient) +-- $(makeLensesFor [("_jsonRpcManager", "jsonRpcManager"), ("_jsonRpcServer", "jsonRpcServer")] ''JsonRpcClient) -- | Create default 'JsonRpcClient' settings. defaultSettings :: MonadIO m => String -- ^ JSON-RPC server URI -> m JsonRpcClient -defaultSettings srv = liftIO $ JsonRpcClient +defaultSettings srv = liftIO $ JsonRpcHTTPClient <$> newManager tlsManagerSettings <*> pure srv instance Show JsonRpcClient where - show JsonRpcClient{..} = "JsonRpcClient<" ++ _jsonRpcServer ++ ">" + show JsonRpcHTTPClient{..} = "JsonRpcClient<" ++ jsonRpcServer ++ ">" + show JsonRpcWSClient{..} = "JsonRpcClient<" ++ jsonRpcWSServer ++ ">" -- | JSON-RPC request. data Request = Request @@ -184,15 +187,16 @@ call m r = do where maxInt = toInteger (maxBound :: Int) connection body = do - serverUri <- use jsonRpcServer - request <- parseRequest serverUri - let request' = request - { requestBody = RequestBodyLBS body - , requestHeaders = [("Content-Type", "application/json")] - , method = "POST" - } - manager <- use jsonRpcManager - responseBody <$> liftIO (httpLbs request' manager) + jsonRpcInstance <- get + case jsonRpcInstance of { JsonRpcHTTPClient{..} -> do + request <- parseRequest jsonRpcServer + let request' = request + { requestBody = RequestBodyLBS body + , requestHeaders = [("Content-Type", "application/json")] + , method = "POST" + } + responseBody <$> liftIO (httpLbs request' jsonRpcManager) } + decodeResponse :: (MonadThrow m, FromJSON a) => ByteString From 47d6404acea708f2a80cf629e9d5d8b1d79409e4 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Fri, 28 Jun 2019 01:27:41 +0530 Subject: [PATCH 075/237] Pattern matching in Connection function to add the code for webSocket connection --- package.yaml | 1 + src/Network/JsonRpc/TinyClient.hs | 79 ++++++++++++++++--------------- 2 files changed, 43 insertions(+), 37 deletions(-) diff --git a/package.yaml b/package.yaml index d7fc3755..8ff41aeb 100644 --- a/package.yaml +++ b/package.yaml @@ -52,6 +52,7 @@ dependencies: - text >=1.2.2.2 && <1.3 - mtl >=2.2.1 && <2.3 - websockets >=0.12.5.3 && <0.13 +- network >=2.8.0.1 && <2.9 ghc-options: - -funbox-strict-fields diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index cae005b8..6d2e2296 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -53,49 +53,46 @@ module Network.JsonRpc.TinyClient , MethodName -- * JSON-RPC client settings - , JsonRpcClient + , JsonRpcClient(..) , defaultSettings - , jsonRpcServer - , jsonRpcManager -- * Error handling , JsonRpcException(..) , RpcError(..) ) where -import Control.Applicative ((<|>)) -import Control.Exception (Exception) -import Control.Monad ((<=<),forever, unless) -import Control.Monad.Catch (MonadThrow (..)) -import Control.Monad.IO.Class (MonadIO (..)) -import Control.Monad.State (MonadState,get) -import Crypto.Number.Generate (generateMax) -import Data.Aeson (FromJSON (..), ToJSON (..), - Value (String), eitherDecode, encode, - object, withObject, (.:), (.:?), (.=)) -import Data.ByteString.Lazy (ByteString) -import Data.Text (Text, unpack) -import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), - httpLbs, method, newManager, - parseRequest, requestBody, - requestHeaders, responseBody) -import Network.HTTP.Client.TLS (tlsManagerSettings) -import Network.WebSockets (Connection) +import Control.Applicative ((<|>)) +import Control.Exception (Exception) +import Control.Monad ((<=<)) +import Control.Monad.Catch (MonadThrow (..)) +import Control.Monad.IO.Class (MonadIO (..)) +import Control.Monad.State (MonadState,get) +import Crypto.Number.Generate (generateMax) +import Data.Aeson (FromJSON (..), ToJSON (..), + Value (String), eitherDecode, encode, + object, withObject, (.:), (.:?), (.=)) +import Data.ByteString.Lazy (ByteString) +import Data.Text (Text, unpack) +import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), + httpLbs, method, newManager, + parseRequest, requestBody, + requestHeaders, responseBody) +import Network.HTTP.Client.TLS (tlsManagerSettings) +import qualified Network.WebSockets as WS (Connection, sendTextData, receiveData) -- | JSON-RPC monad constrait. type JsonRpcM m = (MonadIO m, MonadThrow m, MonadState JsonRpcClient m) -- | JSON-RPC client state vars. data JsonRpcClient = JsonRpcHTTPClient - { jsonRpcManager :: Manager -- ^ HTTP connection manager. - , jsonRpcServer :: String -- ^ Remote server URI. + { jsonRpcManager :: Manager -- ^ HTTP connection manager. + , jsonRpcServer :: String -- ^ Remote server URI. } | JsonRpcWSClient - { jsonRpcWSConn :: Connection -- ^ WS connection. - , jsonRpcWSServer :: String -- ^ Remote server URI. + { jsonRpcWSConn :: WS.Connection -- ^ WS connection. + , jsonRpcWSHost :: String -- ^ Remote Host. + , jsonRpcWSPort :: Int -- ^ Port } --- $(makeLensesFor [("_jsonRpcManager", "jsonRpcManager"), ("_jsonRpcServer", "jsonRpcServer")] ''JsonRpcClient) - -- | Create default 'JsonRpcClient' settings. defaultSettings :: MonadIO m => String -- ^ JSON-RPC server URI @@ -105,8 +102,8 @@ defaultSettings srv = liftIO $ JsonRpcHTTPClient <*> pure srv instance Show JsonRpcClient where - show JsonRpcHTTPClient{..} = "JsonRpcClient<" ++ jsonRpcServer ++ ">" - show JsonRpcWSClient{..} = "JsonRpcClient<" ++ jsonRpcWSServer ++ ">" + show JsonRpcHTTPClient{..} = "JsonRpcHTTPClient<" ++ jsonRpcServer ++ ">" + show JsonRpcWSClient{..} = "JsonRpcWSClient<" ++ jsonRpcWSHost ++ ":" ++ (show jsonRpcWSPort ) ++ ">" -- | JSON-RPC request. data Request = Request @@ -188,14 +185,22 @@ call m r = do maxInt = toInteger (maxBound :: Int) connection body = do jsonRpcInstance <- get - case jsonRpcInstance of { JsonRpcHTTPClient{..} -> do - request <- parseRequest jsonRpcServer - let request' = request - { requestBody = RequestBodyLBS body - , requestHeaders = [("Content-Type", "application/json")] - , method = "POST" - } - responseBody <$> liftIO (httpLbs request' jsonRpcManager) } + case jsonRpcInstance of + JsonRpcHTTPClient{..} -> do + request <- parseRequest jsonRpcServer + let request' = request + { requestBody = RequestBodyLBS body + , requestHeaders = [("Content-Type", "application/json")] + , method = "POST" + } + responseBody <$> liftIO (httpLbs request' jsonRpcManager) + + JsonRpcWSClient{..} -> do + liftIO $ app jsonRpcWSConn + where + app conn = do WS.sendTextData conn body + WS.receiveData conn + decodeResponse :: (MonadThrow m, FromJSON a) From 8c2363a8e3d31be6f3d0f62d4ad7839dadcada8c Mon Sep 17 00:00:00 2001 From: amany9000 Date: Fri, 28 Jun 2019 01:29:48 +0530 Subject: [PATCH 076/237] Pattern Matching on runWeb3', WebSocket Code Implementation in runWeb3' and adding getConnection function --- src/Network/Ethereum/Api/Provider.hs | 59 ++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/src/Network/Ethereum/Api/Provider.hs b/src/Network/Ethereum/Api/Provider.hs index 225ef9cf..42d9915b 100644 --- a/src/Network/Ethereum/Api/Provider.hs +++ b/src/Network/Ethereum/Api/Provider.hs @@ -25,8 +25,13 @@ import Control.Monad.State (MonadState (..)) import Control.Monad.Trans.State (StateT, evalStateT, withStateT) import GHC.Generics (Generic) import Network.HTTP.Client (Manager) +import qualified Network.Socket as S +import qualified Network.WebSockets.Stream as Stream +import qualified Network.WebSockets as WS ( Connection, + newClientConnection, + defaultConnectionOptions) -import Network.JsonRpc.TinyClient (JsonRpc, JsonRpcClient, +import Network.JsonRpc.TinyClient (JsonRpc, JsonRpcClient(..), defaultSettings, jsonRpcManager) -- | Any communication with Ethereum node wrapped with 'Web3' monad @@ -49,11 +54,14 @@ instance Exception Web3Error --TODO: Change to `HttpProvider ServerUri | IpcProvider FilePath` to support IPC -- | Web3 Provider -data Provider = HttpProvider String | WSProvider String +data Provider = HttpProvider String | WSProvider String Int deriving (Show, Eq, Generic) -defaultHttpPovider = HttpProvider "http://localhost:8545" -defaultWSPovider = WSProvider "ws://127.0.0.1:8546" +defaultHttpPovider :: Provider +defaultHttpPovider = HttpProvider "http://localhost:8545" -- | Default HTTP Provider URI + +defaultWSPovider :: Provider +defaultWSPovider = WSProvider "127.0.0.1" 8546 -- | Default WS Provider URI -- | 'Web3' monad runner, using the supplied Manager runWeb3With :: MonadIO m @@ -66,7 +74,7 @@ runWeb3With manager provider f = do where changeManager jsonRpc = jsonRpc {jsonRpcManager = manager} --- | 'Web3' monad runner +-- | 'Web3' monad runner for http runWeb3' :: MonadIO m => Provider -> Web3 a @@ -75,6 +83,14 @@ runWeb3' (HttpProvider uri) f = do cfg <- defaultSettings uri liftIO . try . flip evalStateT cfg . unWeb3 $ f +runWeb3' (WSProvider host port) f = do + currentConnection <- liftIO $ getConnection host port "/" + let currentClient = JsonRpcWSClient { + jsonRpcWSConn = currentConnection + , jsonRpcWSHost = host + , jsonRpcWSPort = port} + liftIO . try . flip evalStateT currentClient . unWeb3 $ f + -- | 'Web3' runner for default http provider runWeb3 :: MonadIO m => Web3 a @@ -84,11 +100,40 @@ runWeb3 = runWeb3' defaultHttpPovider -- | 'Web3' runner for default WS provider runWeb3WS :: MonadIO m - => Web3 a - -> m (Either Web3Error a) + => Web3 a + -> m (Either Web3Error a) {-# INLINE runWeb3WS #-} runWeb3WS = runWeb3' defaultWSPovider -- | Fork 'Web3' with the same 'Provider' and 'Manager' forkWeb3 :: Web3 a -> Web3 (Async a) forkWeb3 f = liftIO . async . evalStateT (unWeb3 f) =<< get + +getConnection :: (Eq a, Num a, Show a) + => S.HostName + -> a + -> [Char] + -> IO WS.Connection +{-# INLINE getConnection #-} +getConnection host port path = do + -- Create and connect socket + let hints = S.defaultHints + {S.addrSocketType = S.Stream} + + -- Correct host and path. + fullHost = if port == 80 then host else (host ++ ":" ++ show port) + path0 = if null path then "/" else path + + addr:_ <- S.getAddrInfo (Just hints) (Just host) (Just $ show port) + sock <- S.socket (S.addrFamily addr) S.Stream S.defaultProtocol + S.setSocketOption sock S.NoDelay 1 + + -- Connect WebSocket and run client + + res <- ( S.connect sock (S.addrAddress addr) >> + Stream.makeSocketStream sock) >>= + (\stream -> + WS.newClientConnection stream fullHost + path0 WS.defaultConnectionOptions [] ) + -- Clean up + return res \ No newline at end of file From 30c9546c83b179697f3620dd5aa38e9104512c4a Mon Sep 17 00:00:00 2001 From: amany9000 Date: Fri, 28 Jun 2019 18:32:52 +0530 Subject: [PATCH 077/237] Added WS.sendClose to close WebSocket Connection --- src/Network/Ethereum/Api/Provider.hs | 23 +++++++++++++---------- src/Network/JsonRpc/TinyClient.hs | 10 +++++----- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Network/Ethereum/Api/Provider.hs b/src/Network/Ethereum/Api/Provider.hs index 42d9915b..e4fc691b 100644 --- a/src/Network/Ethereum/Api/Provider.hs +++ b/src/Network/Ethereum/Api/Provider.hs @@ -2,6 +2,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Network.Ethereum.Api.Provider @@ -18,6 +19,7 @@ module Network.Ethereum.Api.Provider where import Control.Concurrent.Async (Async, async) +import Data.Text (Text) import Control.Exception (Exception, try) import Control.Monad.Catch (MonadThrow) import Control.Monad.IO.Class (MonadIO (..)) @@ -27,8 +29,8 @@ import GHC.Generics (Generic) import Network.HTTP.Client (Manager) import qualified Network.Socket as S import qualified Network.WebSockets.Stream as Stream -import qualified Network.WebSockets as WS ( Connection, - newClientConnection, +import qualified Network.WebSockets as WS ( Connection, sendClose, + newClientConnection, defaultConnectionOptions) import Network.JsonRpc.TinyClient (JsonRpc, JsonRpcClient(..), @@ -58,10 +60,10 @@ data Provider = HttpProvider String | WSProvider String Int deriving (Show, Eq, Generic) defaultHttpPovider :: Provider -defaultHttpPovider = HttpProvider "http://localhost:8545" -- | Default HTTP Provider URI +defaultHttpPovider = HttpProvider "http://localhost:8545" -- ^ Default HTTP Provider URI defaultWSPovider :: Provider -defaultWSPovider = WSProvider "127.0.0.1" 8546 -- | Default WS Provider URI +defaultWSPovider = WSProvider "127.0.0.1" 8546 -- ^ Default WS Provider URI -- | 'Web3' monad runner, using the supplied Manager runWeb3With :: MonadIO m @@ -89,7 +91,9 @@ runWeb3' (WSProvider host port) f = do jsonRpcWSConn = currentConnection , jsonRpcWSHost = host , jsonRpcWSPort = port} - liftIO . try . flip evalStateT currentClient . unWeb3 $ f + response <- liftIO $ try . flip evalStateT currentClient . unWeb3 $ f + liftIO $ WS.sendClose currentConnection ("Bye-" :: Text) + return response -- | 'Web3' runner for default http provider runWeb3 :: MonadIO m @@ -109,10 +113,10 @@ runWeb3WS = runWeb3' defaultWSPovider forkWeb3 :: Web3 a -> Web3 (Async a) forkWeb3 f = liftIO . async . evalStateT (unWeb3 f) =<< get -getConnection :: (Eq a, Num a, Show a) - => S.HostName - -> a - -> [Char] +-- | Returns a WebSocket Connection Instance +getConnection :: String -- ^ Host + -> Int -- ^ Port + -> String -- ^ Path -> IO WS.Connection {-# INLINE getConnection #-} getConnection host port path = do @@ -135,5 +139,4 @@ getConnection host port path = do (\stream -> WS.newClientConnection stream fullHost path0 WS.defaultConnectionOptions [] ) - -- Clean up return res \ No newline at end of file diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index 6d2e2296..cd621705 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -85,12 +85,12 @@ type JsonRpcM m = (MonadIO m, MonadThrow m, MonadState JsonRpcClient m) -- | JSON-RPC client state vars. data JsonRpcClient = JsonRpcHTTPClient - { jsonRpcManager :: Manager -- ^ HTTP connection manager. - , jsonRpcServer :: String -- ^ Remote server URI. + { jsonRpcManager :: Manager -- ^ HTTP connection manager. + , jsonRpcServer :: String -- ^ Remote server URI. } | JsonRpcWSClient - { jsonRpcWSConn :: WS.Connection -- ^ WS connection. - , jsonRpcWSHost :: String -- ^ Remote Host. - , jsonRpcWSPort :: Int -- ^ Port + { jsonRpcWSConn :: WS.Connection -- ^ WS connection. + , jsonRpcWSHost :: String -- ^ Remote Host. + , jsonRpcWSPort :: Int -- ^ Port } -- | Create default 'JsonRpcClient' settings. From ef094f2a58d5670c9fa5ee0dbb6d858a5562f7ff Mon Sep 17 00:00:00 2001 From: amany9000 Date: Fri, 26 Jul 2019 18:54:46 +0530 Subject: [PATCH 078/237] Added Api.hs in src/Network/Ipfs/Api/ --- src/Network/Ipfs/Api/Api.hs | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/Network/Ipfs/Api/Api.hs diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs new file mode 100644 index 00000000..9b21b850 --- /dev/null +++ b/src/Network/Ipfs/Api/Api.hs @@ -0,0 +1,54 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE MultiParamTypeClasses #-} + +-- | +-- Module : Network.Ipfs.Api.Api +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Ipfs API provider. +-- + +module Network.Ipfs.Api.Api where + +import Control.Arrow (left) +import Data.ByteString.Lazy (fromStrict, toStrict) +import Data.Proxy +import Data.Typeable +import Network.HTTP.Client (newManager, defaultManagerSettings) +import Servant.API +import Servant.Client +import qualified Data.ByteString.Lazy.Char8 as BC +import qualified Data.Text as TextS +import qualified Data.Text.Encoding as TextS +import qualified Network.HTTP.Media as M ((//), (/:)) + + +type IpfsReturnType = TextS.Text + + +-- | Defining a content type same as PlainText without charset +data IpfsText deriving Typeable + +instance Servant.API.Accept IpfsText where + contentType _ = "text" M.// "plain" + +-- | @left show . TextS.decodeUtf8' . toStrict@ +instance MimeUnrender IpfsText TextS.Text where + mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict + + +type IpfsApi = "cat" :> Capture "cid" String :> Get '[IpfsText] IpfsReturnType + +ipfsApi :: Proxy IpfsApi +ipfsApi = Proxy + +_cat :: String -> ClientM IpfsReturnType +_cat = client ipfsApi \ No newline at end of file From 76cd63f08be3e6497d40b3ac364657e8e1a63f56 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Fri, 26 Jul 2019 18:55:41 +0530 Subject: [PATCH 079/237] Added Ipfs.hs in src/Network/Ipfs/Api and implemented ipfs cat --- package.yaml | 3 +++ src/Network/Ipfs/Api/Ipfs.hs | 44 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/Network/Ipfs/Api/Ipfs.hs diff --git a/package.yaml b/package.yaml index 8ff41aeb..8eca2b60 100644 --- a/package.yaml +++ b/package.yaml @@ -53,6 +53,9 @@ dependencies: - mtl >=2.2.1 && <2.3 - websockets >=0.12.5.3 && <0.13 - network >=2.8.0.1 && <2.9 +- servant-client >= 0.15 && <0.36 +- servant >= 0.15 && <0.16 +- http-media >= 0.7 && <0.8 ghc-options: - -funbox-strict-fields diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs new file mode 100644 index 00000000..0994fbad --- /dev/null +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -0,0 +1,44 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE MultiParamTypeClasses #-} +-- | +-- Module : Network.Ipfs.Api.Ipfs +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Module containing Ipfs command functions. +-- + +module Network.Ipfs.Api.Ipfs where + +import Control.Arrow (left) +import Data.ByteString.Lazy (fromStrict, toStrict) +import Data.Proxy +import Data.Typeable +import Network.HTTP.Client (newManager, defaultManagerSettings) +import Servant.API +import Servant.Client +import qualified Data.ByteString.Lazy.Char8 as BC +import qualified Data.Text as TextS +import qualified Data.Text.Encoding as TextS +import qualified Network.HTTP.Media as M ((//), (/:)) +import Network.Ipfs.Api.Api (IpfsReturnType, _cat) + +call :: ClientM a -> IO (Either ServantError a) +call func = do + manager' <- newManager defaultManagerSettings + runClientM func (mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) + + +cat :: String -> IO () +cat hash = do + res <- call $ _cat hash + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v \ No newline at end of file From c2902c2a0c394a36009f588114e685e8d54e3fac Mon Sep 17 00:00:00 2001 From: amany9000 Date: Fri, 26 Jul 2019 22:08:53 +0530 Subject: [PATCH 080/237] Added ipfs ls --- src/Network/Ipfs/Api/Api.hs | 30 +++++++++++++++++++++++++----- src/Network/Ipfs/Api/Ipfs.hs | 18 +++++++++++++----- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 9b21b850..082bad62 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -19,20 +19,37 @@ module Network.Ipfs.Api.Api where import Control.Arrow (left) +import Data.Aeson (FromJSON, parseJSON, Object(..)) +import Data.Int import Data.ByteString.Lazy (fromStrict, toStrict) +import qualified Data.ByteString.Lazy.Char8 as BC import Data.Proxy +import qualified Data.Text as TextS +import qualified Data.Text.Encoding as TextS import Data.Typeable import Network.HTTP.Client (newManager, defaultManagerSettings) +import qualified Network.HTTP.Media as M ((//), (/:)) import Servant.API import Servant.Client -import qualified Data.ByteString.Lazy.Char8 as BC -import qualified Data.Text as TextS -import qualified Data.Text.Encoding as TextS -import qualified Network.HTTP.Media as M ((//), (/:)) type IpfsReturnType = TextS.Text +data DirContent = DirContent + { name :: String + , hash :: String + , size :: Int64 + , contentType :: Int + , target :: String + } deriving (Eq, Show) + +instance FromJSON DirContent where + parseJSON (Object o) = + UserSummary <$> o .: "name" + <*> o .: "hash" + <*> o .: "size" + <*> o .: "contentType" + <*> o .: "target" -- | Defining a content type same as PlainText without charset data IpfsText deriving Typeable @@ -46,9 +63,12 @@ instance MimeUnrender IpfsText TextS.Text where type IpfsApi = "cat" :> Capture "cid" String :> Get '[IpfsText] IpfsReturnType + :<|> "ls" :> Capture "cid" String :> Get '[JSON] [DirContent] ipfsApi :: Proxy IpfsApi ipfsApi = Proxy _cat :: String -> ClientM IpfsReturnType -_cat = client ipfsApi \ No newline at end of file +_ls :: String -> ClientM [DirContent] + +_cat :<|> _ls = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 0994fbad..62201de1 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -19,16 +19,17 @@ module Network.Ipfs.Api.Ipfs where import Control.Arrow (left) import Data.ByteString.Lazy (fromStrict, toStrict) +import qualified Data.ByteString.Lazy.Char8 as BC import Data.Proxy +import qualified Data.Text as TextS +import qualified Data.Text.Encoding as TextS import Data.Typeable import Network.HTTP.Client (newManager, defaultManagerSettings) +import qualified Network.HTTP.Media as M ((//), (/:)) import Servant.API import Servant.Client -import qualified Data.ByteString.Lazy.Char8 as BC -import qualified Data.Text as TextS -import qualified Data.Text.Encoding as TextS -import qualified Network.HTTP.Media as M ((//), (/:)) -import Network.Ipfs.Api.Api (IpfsReturnType, _cat) + +import Network.Ipfs.Api.Api (IpfsReturnType, _cat, _ls) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -39,6 +40,13 @@ call func = do cat :: String -> IO () cat hash = do res <- call $ _cat hash + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +ls :: String -> IO () +ls hash = do + res <- call $ _ls hash case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v \ No newline at end of file From 4ec8df545fd5240c62c54f4921398b37bad91140 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sat, 27 Jul 2019 17:14:17 +0530 Subject: [PATCH 081/237] Added Updated ls function and added refs and refsLocal functions --- package.yaml | 2 + src/Network/Ipfs/Api/Api.hs | 86 ++++++++++++++++++++++++++++-------- src/Network/Ipfs/Api/Ipfs.hs | 27 ++++++----- 3 files changed, 85 insertions(+), 30 deletions(-) diff --git a/package.yaml b/package.yaml index 8eca2b60..135036d3 100644 --- a/package.yaml +++ b/package.yaml @@ -56,6 +56,8 @@ dependencies: - servant-client >= 0.15 && <0.36 - servant >= 0.15 && <0.16 - http-media >= 0.7 && <0.8 +- vector >= 0.12 && <0.13 +- errors >= 2.2 && <2.4 ghc-options: - -funbox-strict-fields diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 082bad62..bdb4dd96 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -19,38 +19,78 @@ module Network.Ipfs.Api.Api where import Control.Arrow (left) -import Data.Aeson (FromJSON, parseJSON, Object(..)) +import Control.Error (fmapL) +import Control.Monad +import Data.Aeson import Data.Int -import Data.ByteString.Lazy (fromStrict, toStrict) -import qualified Data.ByteString.Lazy.Char8 as BC +import Data.ByteString.Lazy (toStrict) +import qualified Data.ByteString.Lazy.Char8() import Data.Proxy import qualified Data.Text as TextS import qualified Data.Text.Encoding as TextS import Data.Typeable -import Network.HTTP.Client (newManager, defaultManagerSettings) -import qualified Network.HTTP.Media as M ((//), (/:)) +import qualified Data.Vector as Vec (fromList,Vector) +import Network.HTTP.Client() +import qualified Network.HTTP.Media as M ((//)) import Servant.API import Servant.Client -type IpfsReturnType = TextS.Text +type CatReturnType = TextS.Text -data DirContent = DirContent + +data DirLink = DirLink { name :: String , hash :: String , size :: Int64 , contentType :: Int , target :: String - } deriving (Eq, Show) + } deriving (Show) + +data DirObject = DirObject + { objectHash :: String + , links :: [DirLink] + } deriving (Show) + +data LsObject = LsObject { objects :: [DirObject] } deriving (Show) + + +data RefsObject = RefsObject String deriving (Show) +{-- { error :: String + , ref :: String + } deriving (Show) +--} + +instance FromJSON DirLink where + parseJSON (Object o) = + DirLink <$> o .: "Name" + <*> o .: "Hash" + <*> o .: "Size" + <*> o .: "Type" + <*> o .: "Target" + + parseJSON _ = mzero + +instance FromJSON DirObject where + parseJSON (Object o) = + DirObject <$> o .: "Hash" + <*> o .: "Links" + + parseJSON _ = mzero + +instance FromJSON LsObject where + parseJSON (Object o) = + LsObject <$> o .: "Objects" -instance FromJSON DirContent where + parseJSON _ = mzero +{-- +instance FromJSON RefsObject where parseJSON (Object o) = - UserSummary <$> o .: "name" - <*> o .: "hash" - <*> o .: "size" - <*> o .: "contentType" - <*> o .: "target" + RefsObject <$> o .: "Err" + <*> o .: "Ref" + parseJSON _ = mzero +--} -- | Defining a content type same as PlainText without charset data IpfsText deriving Typeable @@ -61,14 +101,22 @@ instance Servant.API.Accept IpfsText where instance MimeUnrender IpfsText TextS.Text where mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict +instance {-# OVERLAPPING #-} MimeUnrender JSON (Vec.Vector RefsObject) where + mimeUnrender _ bs = do + t <- fmapL show (TextS.decodeUtf8' (toStrict bs)) + pure (Vec.fromList (map RefsObject (lines $ TextS.unpack t))) -type IpfsApi = "cat" :> Capture "cid" String :> Get '[IpfsText] IpfsReturnType - :<|> "ls" :> Capture "cid" String :> Get '[JSON] [DirContent] +type IpfsApi = "cat" :> Capture "cid" String :> Get '[IpfsText] CatReturnType + :<|> "ls" :> Capture "cid" String :> Get '[JSON] LsObject + :<|> "refs" :> Capture "cid" String :> Get '[JSON] (Vec.Vector RefsObject) + :<|> "refs" :> "local" :> Get '[JSON] (Vec.Vector RefsObject) ipfsApi :: Proxy IpfsApi ipfsApi = Proxy -_cat :: String -> ClientM IpfsReturnType -_ls :: String -> ClientM [DirContent] +_cat :: String -> ClientM CatReturnType +_ls :: String -> ClientM LsObject +_refs :: String -> ClientM (Vec.Vector RefsObject) +_refsLocal :: ClientM (Vec.Vector RefsObject) -_cat :<|> _ls = client ipfsApi +_cat :<|> _ls :<|> _refs :<|> _refsLocal = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 62201de1..1be084a4 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -17,19 +17,10 @@ module Network.Ipfs.Api.Ipfs where -import Control.Arrow (left) -import Data.ByteString.Lazy (fromStrict, toStrict) -import qualified Data.ByteString.Lazy.Char8 as BC -import Data.Proxy -import qualified Data.Text as TextS -import qualified Data.Text.Encoding as TextS -import Data.Typeable import Network.HTTP.Client (newManager, defaultManagerSettings) -import qualified Network.HTTP.Media as M ((//), (/:)) -import Servant.API import Servant.Client -import Network.Ipfs.Api.Api (IpfsReturnType, _cat, _ls) +import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -49,4 +40,18 @@ ls hash = do res <- call $ _ls hash case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v \ No newline at end of file + Right v -> print v + +refs :: String -> IO () +refs hash = do + res <- call $ _refs hash + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +refsLocal :: IO () +refsLocal = do + res <- call _refsLocal + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v \ No newline at end of file From d1ca53574bd27f5471cabf55228247339d608eae Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sun, 28 Jul 2019 03:41:06 +0530 Subject: [PATCH 082/237] Added swarmPeers --- src/Network/Ipfs/Api/Api.hs | 97 ++++++++++++++++++++++++++---------- src/Network/Ipfs/Api/Ipfs.hs | 11 +++- 2 files changed, 79 insertions(+), 29 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index bdb4dd96..d9311d4d 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -40,27 +40,41 @@ type CatReturnType = TextS.Text data DirLink = DirLink - { name :: String - , hash :: String - , size :: Int64 - , contentType :: Int - , target :: String + { name :: String + , hash :: String + , size :: Int64 + , contentType :: Int + , target :: String } deriving (Show) -data DirObject = DirObject - { objectHash :: String - , links :: [DirLink] +data DirObj = DirObj + { objHash :: String + , links :: [DirLink] } deriving (Show) -data LsObject = LsObject { objects :: [DirObject] } deriving (Show) +data LsObj = LsObj { objs :: [DirObj] } deriving (Show) -data RefsObject = RefsObject String deriving (Show) +data RefsObj = RefsObj String deriving (Show) {-- { error :: String , ref :: String } deriving (Show) --} +data SwarmStreamObj = SwarmStreamObj { protocol :: String } deriving (Show) + +data SwarmPeerObj = SwarmPeerObj + { address :: String + , direction :: Int + , latency :: String + , muxer :: String + , peer :: String + , streams :: Maybe [SwarmStreamObj] + } deriving (Show) + +data SwarmObj = SwarmObj { peers :: [SwarmPeerObj] } deriving (Show) + + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -71,26 +85,53 @@ instance FromJSON DirLink where parseJSON _ = mzero -instance FromJSON DirObject where +instance FromJSON DirObj where parseJSON (Object o) = - DirObject <$> o .: "Hash" - <*> o .: "Links" + DirObj <$> o .: "Hash" + <*> o .: "Links" parseJSON _ = mzero -instance FromJSON LsObject where +instance FromJSON LsObj where parseJSON (Object o) = - LsObject <$> o .: "Objects" + LsObj <$> o .: "Objects" parseJSON _ = mzero -{-- -instance FromJSON RefsObject where + + +instance FromJSON SwarmStreamObj where + parseJSON (Object o) = + SwarmStreamObj <$> o .: "Protocol" + + parseJSON _ = mzero + +instance FromJSON SwarmPeerObj where parseJSON (Object o) = - RefsObject <$> o .: "Err" + SwarmPeerObj <$> o .: "Addr" + <*> o .: "Direction" + <*> o .: "Latency" + <*> o .: "Muxer" + <*> o .: "Peer" + <*> o .: "Streams" + + parseJSON _ = mzero + +instance FromJSON SwarmObj where + parseJSON (Object o) = + SwarmObj <$> o .: "Peers" + + parseJSON _ = mzero + + +{-- +instance FromJSON RefsObj where + parseJSON (Objecto o) = + RefsObj <$> o .: "Err" <*> o .: "Ref" parseJSON _ = mzero --} + -- | Defining a content type same as PlainText without charset data IpfsText deriving Typeable @@ -101,22 +142,24 @@ instance Servant.API.Accept IpfsText where instance MimeUnrender IpfsText TextS.Text where mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict -instance {-# OVERLAPPING #-} MimeUnrender JSON (Vec.Vector RefsObject) where +instance {-# OVERLAPPING #-} MimeUnrender JSON (Vec.Vector RefsObj) where mimeUnrender _ bs = do t <- fmapL show (TextS.decodeUtf8' (toStrict bs)) - pure (Vec.fromList (map RefsObject (lines $ TextS.unpack t))) + pure (Vec.fromList (map RefsObj (lines $ TextS.unpack t))) type IpfsApi = "cat" :> Capture "cid" String :> Get '[IpfsText] CatReturnType - :<|> "ls" :> Capture "cid" String :> Get '[JSON] LsObject - :<|> "refs" :> Capture "cid" String :> Get '[JSON] (Vec.Vector RefsObject) - :<|> "refs" :> "local" :> Get '[JSON] (Vec.Vector RefsObject) + :<|> "ls" :> Capture "cid" String :> Get '[JSON] LsObj + :<|> "refs" :> Capture "cid" String :> Get '[JSON] (Vec.Vector RefsObj) + :<|> "refs" :> "local" :> Get '[JSON] (Vec.Vector RefsObj) + :<|> "swarm" :> "peers" :> Get '[JSON] SwarmObj ipfsApi :: Proxy IpfsApi ipfsApi = Proxy _cat :: String -> ClientM CatReturnType -_ls :: String -> ClientM LsObject -_refs :: String -> ClientM (Vec.Vector RefsObject) -_refsLocal :: ClientM (Vec.Vector RefsObject) +_ls :: String -> ClientM LsObj +_refs :: String -> ClientM (Vec.Vector RefsObj) +_refsLocal :: ClientM (Vec.Vector RefsObj) +_swarmPeers :: ClientM SwarmObj -_cat :<|> _ls :<|> _refs :<|> _refsLocal = client ipfsApi +_cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 1be084a4..cfda4393 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -20,7 +20,7 @@ module Network.Ipfs.Api.Ipfs where import Network.HTTP.Client (newManager, defaultManagerSettings) import Servant.Client -import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal) +import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, _swarmPeers) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -54,4 +54,11 @@ refsLocal = do res <- call _refsLocal case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v \ No newline at end of file + Right v -> print v + +swarmPeers :: IO () +swarmPeers = do + res <- call _swarmPeers + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v \ No newline at end of file From 953a4f73ee456d8b11e79dc22c02ca582f2991d5 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sun, 28 Jul 2019 20:50:02 +0530 Subject: [PATCH 083/237] Added bitswapWL and bitswapStat --- src/Network/Ipfs/Api/Api.hs | 52 +++++++++++++++++++++++++++++++++++- src/Network/Ipfs/Api/Ipfs.hs | 21 ++++++++++++--- 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index d9311d4d..0a690328 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -75,6 +75,23 @@ data SwarmPeerObj = SwarmPeerObj data SwarmObj = SwarmObj { peers :: [SwarmPeerObj] } deriving (Show) +data WantlistObj = WantlistObj { forSlash :: String } deriving (Show) + +data BitswapStatObj = BitswapStatObj + { blocksReceived :: Int64 + , blocksSent :: Int64 + , dataReceived :: Int64 + , dataSent :: Int64 + , dupBlksReceived :: Int64 + , dupDataReceived :: Int64 + , messagesReceived :: Int64 + , bitswapPeers :: [String] + , provideBufLen :: Int + , wantlist :: [WantlistObj] + } deriving (Show) + +data BitswapWLObj = BitswapWLObj { keys :: [WantlistObj] } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -123,6 +140,34 @@ instance FromJSON SwarmObj where parseJSON _ = mzero +instance FromJSON WantlistObj where + parseJSON (Object o) = + WantlistObj <$> o .: "/" + + parseJSON _ = mzero + +instance FromJSON BitswapStatObj where + parseJSON (Object o) = + BitswapStatObj <$> o .: "BlocksReceived" + <*> o .: "BlocksSent" + <*> o .: "DataReceived" + <*> o .: "DataSent" + <*> o .: "DupBlksReceived" + <*> o .: "DupDataReceived" + <*> o .: "MessagesReceived" + <*> o .: "Peers" + <*> o .: "ProvideBufLen" + <*> o .: "Wantlist" + + parseJSON _ = mzero + + +instance FromJSON BitswapWLObj where + parseJSON (Object o) = + BitswapWLObj <$> o .: "Keys" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -152,6 +197,8 @@ type IpfsApi = "cat" :> Capture "cid" String :> Get '[IpfsText] CatReturnType :<|> "refs" :> Capture "cid" String :> Get '[JSON] (Vec.Vector RefsObj) :<|> "refs" :> "local" :> Get '[JSON] (Vec.Vector RefsObj) :<|> "swarm" :> "peers" :> Get '[JSON] SwarmObj + :<|> "bitswap" :> "stat" :> Get '[JSON] BitswapStatObj + :<|> "bitswap" :> "wantlist" :> Get '[JSON] BitswapWLObj ipfsApi :: Proxy IpfsApi ipfsApi = Proxy @@ -161,5 +208,8 @@ _ls :: String -> ClientM LsObj _refs :: String -> ClientM (Vec.Vector RefsObj) _refsLocal :: ClientM (Vec.Vector RefsObj) _swarmPeers :: ClientM SwarmObj +_bitswapStat :: ClientM BitswapStatObj +_bitswapWL :: ClientM BitswapWLObj -_cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers = client ipfsApi +_cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> + _bitswapStat :<|> _bitswapWL = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index cfda4393..7b99d4b9 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -17,10 +17,11 @@ module Network.Ipfs.Api.Ipfs where -import Network.HTTP.Client (newManager, defaultManagerSettings) +import Network.HTTP.Client (newManager, defaultManagerSettings) import Servant.Client -import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, _swarmPeers) +import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, + _swarmPeers, _bitswapStat, _bitswapWL) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -61,4 +62,18 @@ swarmPeers = do res <- call _swarmPeers case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v \ No newline at end of file + Right v -> print v + +bitswapStat :: IO () +bitswapStat = do + res <- call _bitswapStat + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +bitswapWL :: IO () +bitswapWL = do + res <- call _bitswapWL + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v \ No newline at end of file From 48e688beb8bdeeee60a077143442b44782e7c0f5 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 29 Jul 2019 13:11:06 +0530 Subject: [PATCH 084/237] Added bitswapLedger, bitswapReprovide and cidBases functions --- src/Network/Ipfs/Api/Api.hs | 41 +++++++++++++++++++++++++++++++++++- src/Network/Ipfs/Api/Ipfs.hs | 26 +++++++++++++++++++++-- 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 0a690328..c33d7f59 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -37,6 +37,7 @@ import Servant.Client type CatReturnType = TextS.Text +type ReprovideReturnType = TextS.Text data DirLink = DirLink @@ -92,6 +93,20 @@ data BitswapStatObj = BitswapStatObj data BitswapWLObj = BitswapWLObj { keys :: [WantlistObj] } deriving (Show) +data BitswapLedgerObj = BitswapLedgerObj + { exchanged :: Int64 + , ledgerPeer :: String + , recv :: Int64 + , sent :: Int64 + , value :: Double + } deriving (Show) + +data CidBasesObj = CidBasesObj + { code :: Int + , baseName :: String + } deriving (Show) + + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -167,7 +182,24 @@ instance FromJSON BitswapWLObj where BitswapWLObj <$> o .: "Keys" parseJSON _ = mzero + +instance FromJSON BitswapLedgerObj where + parseJSON (Object o) = + BitswapLedgerObj <$> o .: "Exchanged" + <*> o .: "Peer" + <*> o .: "Recv" + <*> o .: "Sent" + <*> o .: "Value" + parseJSON _ = mzero + +instance FromJSON CidBasesObj where + parseJSON (Object o) = + CidBasesObj <$> o .: "Code" + <*> o .: "Name" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -199,6 +231,9 @@ type IpfsApi = "cat" :> Capture "cid" String :> Get '[IpfsText] CatReturnType :<|> "swarm" :> "peers" :> Get '[JSON] SwarmObj :<|> "bitswap" :> "stat" :> Get '[JSON] BitswapStatObj :<|> "bitswap" :> "wantlist" :> Get '[JSON] BitswapWLObj + :<|> "bitswap" :> "ledger" :> Capture "peerId" String :> Get '[JSON] BitswapLedgerObj + :<|> "bitswap" :> "reprovide" :> Get '[IpfsText] ReprovideReturnType + :<|> "cid" :> "bases" :> Get '[JSON] [CidBasesObj] ipfsApi :: Proxy IpfsApi ipfsApi = Proxy @@ -210,6 +245,10 @@ _refsLocal :: ClientM (Vec.Vector RefsObj) _swarmPeers :: ClientM SwarmObj _bitswapStat :: ClientM BitswapStatObj _bitswapWL :: ClientM BitswapWLObj +_bitswapLedger :: String -> ClientM BitswapLedgerObj +_bitswapReprovide :: ClientM ReprovideReturnType +_cidBases :: ClientM [CidBasesObj] _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> - _bitswapStat :<|> _bitswapWL = client ipfsApi + _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> + _cidBases = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 7b99d4b9..88c00bbd 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -21,7 +21,8 @@ import Network.HTTP.Client (newManager, defaultManagerSettings) import Servant.Client import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, - _swarmPeers, _bitswapStat, _bitswapWL) + _swarmPeers, _bitswapStat, _bitswapWL, + _bitswapLedger, _bitswapReprovide, _cidBases) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -76,4 +77,25 @@ bitswapWL = do res <- call _bitswapWL case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v \ No newline at end of file + Right v -> print v + +bitswapLedger :: String -> IO () +bitswapLedger peerId = do + res <- call $ _bitswapLedger peerId + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +bitswapReprovide :: IO () +bitswapReprovide = do + res <- call $ _bitswapReprovide + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +cidBases :: IO () +cidBases = do + res <- call $ _cidBases + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v \ No newline at end of file From 978bda513b86baf1041fcab71a3bb2fc70b71ad9 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Tue, 30 Jul 2019 12:15:46 +0530 Subject: [PATCH 085/237] Added cidCodecs, cidHashes and cidBase32 functions --- src/Network/Ipfs/Api/Api.hs | 47 ++++++++++++++++++++++++++++++++++-- src/Network/Ipfs/Api/Ipfs.hs | 26 ++++++++++++++++++-- 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index c33d7f59..3e4dade4 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -102,11 +102,26 @@ data BitswapLedgerObj = BitswapLedgerObj } deriving (Show) data CidBasesObj = CidBasesObj - { code :: Int + { baseCode :: Int , baseName :: String } deriving (Show) +data CidCodecsObj = CidCodecsObj + { codecCode :: Int + , codecName :: String + } deriving (Show) + +data CidHashesObj = CidHashesObj + { multihashCode :: Int + , multihashName :: String + } deriving (Show) +data CidBase32Obj = CidBase32Obj + { cidStr :: String + , errorMsg :: String + , formatted :: String + } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -200,6 +215,28 @@ instance FromJSON CidBasesObj where parseJSON _ = mzero +instance FromJSON CidCodecsObj where + parseJSON (Object o) = + CidCodecsObj <$> o .: "Code" + <*> o .: "Name" + + parseJSON _ = mzero + +instance FromJSON CidHashesObj where + parseJSON (Object o) = + CidHashesObj <$> o .: "Code" + <*> o .: "Name" + + parseJSON _ = mzero + +instance FromJSON CidBase32Obj where + parseJSON (Object o) = + CidBase32Obj <$> o .: "CidStr" + <*> o .: "ErrorMsg" + <*> o .: "Formatted" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -234,6 +271,9 @@ type IpfsApi = "cat" :> Capture "cid" String :> Get '[IpfsText] CatReturnType :<|> "bitswap" :> "ledger" :> Capture "peerId" String :> Get '[JSON] BitswapLedgerObj :<|> "bitswap" :> "reprovide" :> Get '[IpfsText] ReprovideReturnType :<|> "cid" :> "bases" :> Get '[JSON] [CidBasesObj] + :<|> "cid" :> "codecs" :> Get '[JSON] [CidCodecsObj] + :<|> "cid" :> "hashes" :> Get '[JSON] [CidHashesObj] + :<|> "cid" :> "base32" :> Capture "cid" String :> Get '[JSON] CidBase32Obj ipfsApi :: Proxy IpfsApi ipfsApi = Proxy @@ -248,7 +288,10 @@ _bitswapWL :: ClientM BitswapWLObj _bitswapLedger :: String -> ClientM BitswapLedgerObj _bitswapReprovide :: ClientM ReprovideReturnType _cidBases :: ClientM [CidBasesObj] +_cidCodecs :: ClientM [CidCodecsObj] +_cidHashes :: ClientM [CidHashesObj] +_cidBase32 :: String -> ClientM CidBase32Obj _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> - _cidBases = client ipfsApi + _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 88c00bbd..aedd6fb8 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -22,7 +22,8 @@ import Servant.Client import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, _swarmPeers, _bitswapStat, _bitswapWL, - _bitswapLedger, _bitswapReprovide, _cidBases) + _bitswapLedger, _bitswapReprovide, + _cidBases, _cidCodecs, _cidHashes, _cidBase32) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -98,4 +99,25 @@ cidBases = do res <- call $ _cidBases case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v \ No newline at end of file + Right v -> print v + +cidCodecs :: IO () +cidCodecs = do + res <- call $ _cidCodecs + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +cidHashes :: IO () +cidHashes = do + res <- call $ _cidHashes + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +cidBase32 :: String -> IO () +cidBase32 hash = do + res <- call $ _cidBase32 hash + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v \ No newline at end of file From 036cde843335c2e1d7497c774efcc8a83fddbe1a Mon Sep 17 00:00:00 2001 From: amany9000 Date: Thu, 1 Aug 2019 01:18:27 +0530 Subject: [PATCH 086/237] Added cidFormat and blockGet functions and changed String type to Text --- src/Network/Ipfs/Api/Api.hs | 36 +++++++++++++++++++++--------------- src/Network/Ipfs/Api/Ipfs.hs | 30 +++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 3e4dade4..36166280 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -38,7 +38,8 @@ import Servant.Client type CatReturnType = TextS.Text type ReprovideReturnType = TextS.Text - +type GetReturnType = TextS.Text +type BlockReturnType = TextS.Text data DirLink = DirLink { name :: String @@ -116,7 +117,7 @@ data CidHashesObj = CidHashesObj , multihashName :: String } deriving (Show) -data CidBase32Obj = CidBase32Obj +data CidObj = CidObj { cidStr :: String , errorMsg :: String , formatted :: String @@ -229,9 +230,9 @@ instance FromJSON CidHashesObj where parseJSON _ = mzero -instance FromJSON CidBase32Obj where +instance FromJSON CidObj where parseJSON (Object o) = - CidBase32Obj <$> o .: "CidStr" + CidObj <$> o .: "CidStr" <*> o .: "ErrorMsg" <*> o .: "Formatted" @@ -261,37 +262,42 @@ instance {-# OVERLAPPING #-} MimeUnrender JSON (Vec.Vector RefsObj) where t <- fmapL show (TextS.decodeUtf8' (toStrict bs)) pure (Vec.fromList (map RefsObj (lines $ TextS.unpack t))) -type IpfsApi = "cat" :> Capture "cid" String :> Get '[IpfsText] CatReturnType - :<|> "ls" :> Capture "cid" String :> Get '[JSON] LsObj - :<|> "refs" :> Capture "cid" String :> Get '[JSON] (Vec.Vector RefsObj) +type IpfsApi = "cat" :> Capture "cid" TextS.Text :> Get '[IpfsText] CatReturnType + :<|> "ls" :> Capture "cid" TextS.Text :> Get '[JSON] LsObj + :<|> "refs" :> Capture "cid" TextS.Text :> Get '[JSON] (Vec.Vector RefsObj) :<|> "refs" :> "local" :> Get '[JSON] (Vec.Vector RefsObj) :<|> "swarm" :> "peers" :> Get '[JSON] SwarmObj :<|> "bitswap" :> "stat" :> Get '[JSON] BitswapStatObj :<|> "bitswap" :> "wantlist" :> Get '[JSON] BitswapWLObj - :<|> "bitswap" :> "ledger" :> Capture "peerId" String :> Get '[JSON] BitswapLedgerObj + :<|> "bitswap" :> "ledger" :> Capture "peerId" TextS.Text :> Get '[JSON] BitswapLedgerObj :<|> "bitswap" :> "reprovide" :> Get '[IpfsText] ReprovideReturnType :<|> "cid" :> "bases" :> Get '[JSON] [CidBasesObj] :<|> "cid" :> "codecs" :> Get '[JSON] [CidCodecsObj] :<|> "cid" :> "hashes" :> Get '[JSON] [CidHashesObj] - :<|> "cid" :> "base32" :> Capture "cid" String :> Get '[JSON] CidBase32Obj + :<|> "cid" :> "base32" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj + :<|> "cid" :> "format" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj + :<|> "block" :> "get" :> Capture "cid" TextS.Text :> Get '[IpfsText] BlockReturnType ipfsApi :: Proxy IpfsApi ipfsApi = Proxy -_cat :: String -> ClientM CatReturnType -_ls :: String -> ClientM LsObj -_refs :: String -> ClientM (Vec.Vector RefsObj) +_cat :: TextS.Text -> ClientM CatReturnType +_ls :: TextS.Text -> ClientM LsObj +_refs :: TextS.Text -> ClientM (Vec.Vector RefsObj) _refsLocal :: ClientM (Vec.Vector RefsObj) _swarmPeers :: ClientM SwarmObj _bitswapStat :: ClientM BitswapStatObj _bitswapWL :: ClientM BitswapWLObj -_bitswapLedger :: String -> ClientM BitswapLedgerObj +_bitswapLedger :: TextS.Text -> ClientM BitswapLedgerObj _bitswapReprovide :: ClientM ReprovideReturnType _cidBases :: ClientM [CidBasesObj] _cidCodecs :: ClientM [CidCodecsObj] _cidHashes :: ClientM [CidHashesObj] -_cidBase32 :: String -> ClientM CidBase32Obj +_cidBase32 :: TextS.Text -> ClientM CidObj +_cidFormat :: TextS.Text -> ClientM CidObj +_blockGet :: TextS.Text -> ClientM BlockReturnType _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> - _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 = client ipfsApi + _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> + _blockGet = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index aedd6fb8..9f82e0c9 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -17,13 +17,15 @@ module Network.Ipfs.Api.Ipfs where +import Data.Text as TextS import Network.HTTP.Client (newManager, defaultManagerSettings) import Servant.Client import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, _swarmPeers, _bitswapStat, _bitswapWL, _bitswapLedger, _bitswapReprovide, - _cidBases, _cidCodecs, _cidHashes, _cidBase32) + _cidBases, _cidCodecs, _cidHashes, _cidBase32, + _cidFormat, _blockGet) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -31,21 +33,21 @@ call func = do runClientM func (mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) -cat :: String -> IO () +cat :: Text -> IO () cat hash = do res <- call $ _cat hash case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v -ls :: String -> IO () +ls :: Text -> IO () ls hash = do res <- call $ _ls hash case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v -refs :: String -> IO () +refs :: Text -> IO () refs hash = do res <- call $ _refs hash case res of @@ -80,7 +82,7 @@ bitswapWL = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v -bitswapLedger :: String -> IO () +bitswapLedger :: Text -> IO () bitswapLedger peerId = do res <- call $ _bitswapLedger peerId case res of @@ -115,9 +117,23 @@ cidHashes = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v -cidBase32 :: String -> IO () +cidBase32 :: Text -> IO () cidBase32 hash = do res <- call $ _cidBase32 hash case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v \ No newline at end of file + Right v -> print v + +cidFormat :: Text-> IO () +cidFormat hash = do + res <- call $ _cidFormat hash + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +blockGet :: Text -> IO () +blockGet hash = do + res <- call $ _blockGet hash + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v \ No newline at end of file From 29cfe115192bb4d0614a5180a0e0df948a031432 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Thu, 1 Aug 2019 12:29:02 +0530 Subject: [PATCH 087/237] Added blockStat, dagGet, dagResolve and configGet functions --- src/Network/Ipfs/Api/Api.hs | 63 +++++++++++++++++++++++++++++++++--- src/Network/Ipfs/Api/Ipfs.hs | 36 +++++++++++++++++++-- 2 files changed, 91 insertions(+), 8 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 36166280..496aa75b 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -40,6 +40,7 @@ type CatReturnType = TextS.Text type ReprovideReturnType = TextS.Text type GetReturnType = TextS.Text type BlockReturnType = TextS.Text +type DagReturnType = TextS.Text data DirLink = DirLink { name :: String @@ -122,7 +123,24 @@ data CidObj = CidObj , errorMsg :: String , formatted :: String } deriving (Show) - + +data BlockStatObj = BlockStatObj + { key :: String + , blockSize :: Int + } deriving (Show) + +data DagCidObj = DagCidObj { cidSlash :: String } deriving (Show) + +data DagResolveObj = DagResolveObj + { cid :: DagCidObj + , remPath :: String + } deriving (Show) + +data ConfigObj = ConfigObj + { configKey :: String + , configValue :: String + } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -233,8 +251,35 @@ instance FromJSON CidHashesObj where instance FromJSON CidObj where parseJSON (Object o) = CidObj <$> o .: "CidStr" - <*> o .: "ErrorMsg" - <*> o .: "Formatted" + <*> o .: "ErrorMsg" + <*> o .: "Formatted" + + parseJSON _ = mzero + +instance FromJSON BlockStatObj where + parseJSON (Object o) = + BlockStatObj <$> o .: "Key" + <*> o .: "Size" + + parseJSON _ = mzero + +instance FromJSON DagCidObj where + parseJSON (Object o) = + DagCidObj <$> o .: "/" + + parseJSON _ = mzero + +instance FromJSON DagResolveObj where + parseJSON (Object o) = + DagResolveObj <$> o .: "Cid" + <*> o .: "RemPath" + + parseJSON _ = mzero + +instance FromJSON ConfigObj where + parseJSON (Object o) = + ConfigObj <$> o .: "Key" + <*> o .: "Value" parseJSON _ = mzero @@ -276,7 +321,11 @@ type IpfsApi = "cat" :> Capture "cid" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "cid" :> "hashes" :> Get '[JSON] [CidHashesObj] :<|> "cid" :> "base32" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj :<|> "cid" :> "format" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj - :<|> "block" :> "get" :> Capture "cid" TextS.Text :> Get '[IpfsText] BlockReturnType + :<|> "block" :> "get" :> Capture "key" TextS.Text :> Get '[IpfsText] BlockReturnType + :<|> "block" :> "stat" :> Capture "key" TextS.Text :> Get '[JSON] BlockStatObj + :<|> "dag" :> "get" :> Capture "ref" TextS.Text :> Get '[JSON] DagReturnType + :<|> "dag" :> "resolve" :> Capture "ref" TextS.Text :> Get '[JSON] DagResolveObj + :<|> "config" :> Capture "ref" TextS.Text :> Get '[JSON] ConfigObj ipfsApi :: Proxy IpfsApi ipfsApi = Proxy @@ -296,8 +345,12 @@ _cidHashes :: ClientM [CidHashesObj] _cidBase32 :: TextS.Text -> ClientM CidObj _cidFormat :: TextS.Text -> ClientM CidObj _blockGet :: TextS.Text -> ClientM BlockReturnType +_blockStat :: TextS.Text -> ClientM BlockStatObj +_dagGet :: TextS.Text -> ClientM DagReturnType +_dagResolve :: TextS.Text -> ClientM DagResolveObj +_configGet :: TextS.Text -> ClientM ConfigObj _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> - _blockGet = client ipfsApi + _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 9f82e0c9..d857cedd 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -25,7 +25,8 @@ import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, _swarmPeers, _bitswapStat, _bitswapWL, _bitswapLedger, _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, - _cidFormat, _blockGet) + _cidFormat, _blockGet, _blockStat, _dagGet, + _configGet, _dagResolve) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -132,8 +133,37 @@ cidFormat hash = do Right v -> print v blockGet :: Text -> IO () -blockGet hash = do - res <- call $ _blockGet hash +blockGet key = do + res <- call $ _blockGet key + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + + +blockStat :: Text -> IO () +blockStat key = do + res <- call $ _blockStat key + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +dagGet :: Text -> IO () +dagGet ref = do + res <- call $ _dagGet ref + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +dagResolve :: Text -> IO () +dagResolve ref = do + res <- call $ _dagResolve ref + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +configGet :: Text -> IO () +configGet key = do + res <- call $ _configGet key case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v \ No newline at end of file From ebcf4ba39e951f66f1e6b4b11f39046cd14c4014 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Thu, 1 Aug 2019 18:54:31 +0530 Subject: [PATCH 088/237] Added configSet, objectData, objectNew, objectGetLinks, objectAddLink and objectGet --- src/Network/Ipfs/Api/Api.hs | 67 +++++++++++++++++++++++++++++++++++- src/Network/Ipfs/Api/Ipfs.hs | 46 ++++++++++++++++++++++++- 2 files changed, 111 insertions(+), 2 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 496aa75b..f417fb63 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -41,6 +41,7 @@ type ReprovideReturnType = TextS.Text type GetReturnType = TextS.Text type BlockReturnType = TextS.Text type DagReturnType = TextS.Text +type ObjectReturnType = TextS.Text data DirLink = DirLink { name :: String @@ -141,6 +142,26 @@ data ConfigObj = ConfigObj , configValue :: String } deriving (Show) +data ObjectLinkObj = ObjectLinkObj + { linkHash :: String + , linkName :: String + , linkSize :: Int64 + } deriving (Show) + +data ObjectNewObj = ObjectNewObj + { newObjectHash :: String + } deriving (Show) + +data ObjectLinksObj = ObjectLinksObj + { objectHash :: String + , objectLinks :: [ObjectLinkObj] + } deriving (Show) + +data ObjectGetObj = ObjectGetObj + { objectName :: String + , objectGetLinks :: [ObjectLinkObj] + } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -283,6 +304,34 @@ instance FromJSON ConfigObj where parseJSON _ = mzero +instance FromJSON ObjectLinkObj where + parseJSON (Object o) = + ObjectLinkObj <$> o .: "Hash" + <*> o .: "Name" + <*> o .: "Size" + + parseJSON _ = mzero + +instance FromJSON ObjectNewObj where + parseJSON (Object o) = + ObjectNewObj <$> o .: "Hash" + + parseJSON _ = mzero + +instance FromJSON ObjectLinksObj where + parseJSON (Object o) = + ObjectLinksObj <$> o .: "Hash" + <*> o .: "Links" + + parseJSON _ = mzero + +instance FromJSON ObjectGetObj where + parseJSON (Object o) = + ObjectGetObj <$> o .: "Data" + <*> o .: "Links" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -326,6 +375,14 @@ type IpfsApi = "cat" :> Capture "cid" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "dag" :> "get" :> Capture "ref" TextS.Text :> Get '[JSON] DagReturnType :<|> "dag" :> "resolve" :> Capture "ref" TextS.Text :> Get '[JSON] DagResolveObj :<|> "config" :> Capture "ref" TextS.Text :> Get '[JSON] ConfigObj + :<|> "config" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ConfigObj + :<|> "object" :> "data" :> Capture "ref" TextS.Text :> Get '[IpfsText] ObjectReturnType + :<|> "object" :> "new" :> Get '[JSON] ObjectNewObj + :<|> "object" :> "links" :> Capture "ref" TextS.Text :> Get '[JSON] ObjectLinksObj + :<|> "object" :> "patch" :> "add-link" :> Capture "arg" TextS.Text + :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text + :> Get '[JSON] ObjectLinksObj + :<|> "object" :> "get" :> Capture "arg" TextS.Text :> Get '[JSON] ObjectGetObj ipfsApi :: Proxy IpfsApi ipfsApi = Proxy @@ -349,8 +406,16 @@ _blockStat :: TextS.Text -> ClientM BlockStatObj _dagGet :: TextS.Text -> ClientM DagReturnType _dagResolve :: TextS.Text -> ClientM DagResolveObj _configGet :: TextS.Text -> ClientM ConfigObj +_configSet :: TextS.Text -> Maybe TextS.Text -> ClientM ConfigObj +_objectData :: TextS.Text -> ClientM ObjectReturnType +_objectNew :: ClientM ObjectNewObj +_objectGetLinks :: TextS.Text -> ClientM ObjectLinksObj +_objectAddLink :: TextS.Text -> Maybe TextS.Text -> Maybe TextS.Text -> ClientM ObjectLinksObj +_objectGet :: TextS.Text -> ClientM ObjectGetObj _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> - _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet = client ipfsApi + _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> + _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> + _objectGet = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index d857cedd..83b3d891 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -26,7 +26,9 @@ import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, _bitswapLedger, _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, _cidFormat, _blockGet, _blockStat, _dagGet, - _configGet, _dagResolve) + _dagResolve, _configGet, _configSet, _objectData, + _objectNew, _objectGetLinks, _objectAddLink, + _objectGet) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -164,6 +166,48 @@ dagResolve ref = do configGet :: Text -> IO () configGet key = do res <- call $ _configGet key + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +configSet :: Text -> Text -> IO () +configSet key value = do + res <- call $ _configSet key $ Just value + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +objectData :: Text -> IO () +objectData key = do + res <- call $ _objectData key + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +objectNew :: IO () +objectNew = do + res <- call _objectNew + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +objectGetLinks :: Text -> IO () +objectGetLinks key = do + res <- call $ _objectGetLinks key + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +objectAddLink :: Text -> Text -> Text -> IO () +objectAddLink hash name key = do + res <- call $ _objectAddLink hash (Just name) (Just key) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +objectGet :: Text -> IO () +objectGet key = do + res <- call $ _objectGet key case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v \ No newline at end of file From 50161dbede9d6c7e340246ec935bdf3830391acd Mon Sep 17 00:00:00 2001 From: amany9000 Date: Wed, 7 Aug 2019 12:07:22 +0530 Subject: [PATCH 089/237] Added objectStat, pinAdd, pinRemove, bootstrapAdd and bootstrapList functions --- src/Network/Ipfs/Api/Api.hs | 55 ++++++++++++++++++++++++++++++++---- src/Network/Ipfs/Api/Ipfs.hs | 41 +++++++++++++++++++++++++-- 2 files changed, 89 insertions(+), 7 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index f417fb63..0808e359 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -52,7 +52,7 @@ data DirLink = DirLink } deriving (Show) data DirObj = DirObj - { objHash :: String + { dirHash :: String , links :: [DirLink] } deriving (Show) @@ -148,9 +148,7 @@ data ObjectLinkObj = ObjectLinkObj , linkSize :: Int64 } deriving (Show) -data ObjectNewObj = ObjectNewObj - { newObjectHash :: String - } deriving (Show) +data ObjectNewObj = ObjectNewObj { newObjectHash :: String } deriving (Show) data ObjectLinksObj = ObjectLinksObj { objectHash :: String @@ -162,6 +160,19 @@ data ObjectGetObj = ObjectGetObj , objectGetLinks :: [ObjectLinkObj] } deriving (Show) +data ObjectStatObj = ObjectStatObj + { objBlockSize :: Int + , cumulativeSize :: Int + , dataSize :: Int + , objHash :: String + , linksSize :: Int + , numLinks :: Int + } deriving (Show) + +data PinObj = PinObj { pins :: [String] } deriving (Show) + +data BootstrapObj = BootstrapObj { bootstrapPeers :: [String] } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -332,6 +343,29 @@ instance FromJSON ObjectGetObj where parseJSON _ = mzero +instance FromJSON ObjectStatObj where + parseJSON (Object o) = + ObjectStatObj <$> o .: "BlockSize" + <*> o .: "CumulativeSize" + <*> o .: "DataSize" + <*> o .: "Hash" + <*> o .: "LinksSize" + <*> o .: "NumLinks" + + parseJSON _ = mzero + +instance FromJSON PinObj where + parseJSON (Object o) = + PinObj <$> o .: "Pins" + + parseJSON _ = mzero + +instance FromJSON BootstrapObj where + parseJSON (Object o) = + BootstrapObj <$> o .: "Peers" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -383,6 +417,11 @@ type IpfsApi = "cat" :> Capture "cid" TextS.Text :> Get '[IpfsText] CatReturnTyp :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ObjectLinksObj :<|> "object" :> "get" :> Capture "arg" TextS.Text :> Get '[JSON] ObjectGetObj + :<|> "object" :> "stat" :> Capture "arg" TextS.Text :> Get '[JSON] ObjectStatObj + :<|> "pin" :> "add" :> Capture "arg" TextS.Text :> Get '[JSON] PinObj + :<|> "pin" :> "rm" :> Capture "arg" TextS.Text :> Get '[JSON] PinObj + :<|> "bootstrap" :> "add" :> QueryParam "arg" TextS.Text :> Get '[JSON] BootstrapObj + :<|> "bootstrap" :> "list" :> Get '[JSON] BootstrapObj ipfsApi :: Proxy IpfsApi ipfsApi = Proxy @@ -412,10 +451,16 @@ _objectNew :: ClientM ObjectNewObj _objectGetLinks :: TextS.Text -> ClientM ObjectLinksObj _objectAddLink :: TextS.Text -> Maybe TextS.Text -> Maybe TextS.Text -> ClientM ObjectLinksObj _objectGet :: TextS.Text -> ClientM ObjectGetObj +_objectStat :: TextS.Text -> ClientM ObjectStatObj +_pinAdd :: TextS.Text -> ClientM PinObj +_pinRemove :: TextS.Text -> ClientM PinObj +_bootstrapAdd ::Maybe TextS.Text -> ClientM BootstrapObj +_bootstrapList ::ClientM BootstrapObj _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> - _objectGet = client ipfsApi + _objectGet :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> + _bootstrapList = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 83b3d891..ab47fa7b 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -28,7 +28,8 @@ import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, _cidFormat, _blockGet, _blockStat, _dagGet, _dagResolve, _configGet, _configSet, _objectData, _objectNew, _objectGetLinks, _objectAddLink, - _objectGet) + _objectGet, _objectStat, _pinAdd, _pinRemove, _bootstrapList, + _bootstrapAdd) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -210,4 +211,40 @@ objectGet key = do res <- call $ _objectGet key case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v \ No newline at end of file + Right v -> print v + +objectStat :: Text -> IO () +objectStat key = do + res <- call $ _objectStat key + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +pinAdd :: Text -> IO () +pinAdd path = do + res <- call $ _pinAdd path + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +pinRemove :: Text -> IO () +pinRemove path = do + res <- call $ _pinRemove path + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +bootstrapAdd :: Text -> IO () +bootstrapAdd peerId = do + res <- call $ _bootstrapAdd (Just peerId) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + + +bootstrapList :: IO () +bootstrapList = do + res <- call $ _bootstrapList + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v From 1c605c860f3574ff961fde926fbd4166e0640921 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sun, 11 Aug 2019 02:43:37 +0530 Subject: [PATCH 090/237] Added bootstrapRM, statsBw, statsRepo and version functions --- src/Network/Ipfs/Api/Api.hs | 104 ++++++++++++++++++++++++++++++----- src/Network/Ipfs/Api/Ipfs.hs | 33 ++++++++++- 2 files changed, 121 insertions(+), 16 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 0808e359..430a235a 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -18,20 +18,23 @@ module Network.Ipfs.Api.Api where -import Control.Arrow (left) -import Control.Error (fmapL) +import Control.Arrow (left) +import Control.Error (fmapL) import Control.Monad import Data.Aeson import Data.Int -import Data.ByteString.Lazy (toStrict) +import Data.ByteString.Lazy (toStrict) import qualified Data.ByteString.Lazy.Char8() +import qualified Data.HashMap.Strict as H +import Data.Map (Map) +import qualified Data.Map as Map import Data.Proxy -import qualified Data.Text as TextS -import qualified Data.Text.Encoding as TextS +import qualified Data.Text as TextS +import qualified Data.Text.Encoding as TextS import Data.Typeable -import qualified Data.Vector as Vec (fromList,Vector) +import qualified Data.Vector as Vec (fromList,Vector) import Network.HTTP.Client() -import qualified Network.HTTP.Media as M ((//)) +import qualified Network.HTTP.Media as M ((//)) import Servant.API import Servant.Client @@ -169,10 +172,40 @@ data ObjectStatObj = ObjectStatObj , numLinks :: Int } deriving (Show) -data PinObj = PinObj { pins :: [String] } deriving (Show) +data PinObj = WithoutProgress + { pins :: [String] } + + | WithProgress + { pins :: [String] + , progress :: Int + } deriving (Show) data BootstrapObj = BootstrapObj { bootstrapPeers :: [String] } deriving (Show) + +data StatsBwObj = StatsBwObj + { rateIn :: Double + , rateOut :: Double + , totalIn :: Int64 + , totalOut :: Int64 + } deriving (Show) + +data StatsRepoObj = StatsRepoObj + { numObjects :: Int64 + , repoPath :: String + , repoSize :: Int64 + , storageMax :: Int64 + , repoVersion :: String + } deriving (Show) + +data VersionObj = VersionObj + { commit :: String + , golang :: String + , repo :: String + , system :: String + , version :: String + } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -355,17 +388,54 @@ instance FromJSON ObjectStatObj where parseJSON _ = mzero instance FromJSON PinObj where - parseJSON (Object o) = - PinObj <$> o .: "Pins" + parseJSON (Object v) = + case H.lookup "Progress" v of + Just (_) -> WithProgress <$> v .: "Pins" + <*> v .: "Progress" + + Nothing -> + case H.lookup "Pins" v of + Just (_) -> WithoutProgress <$> v .: "Pins" + Nothing -> mzero - parseJSON _ = mzero + parseJSON _ = mzero instance FromJSON BootstrapObj where parseJSON (Object o) = BootstrapObj <$> o .: "Peers" parseJSON _ = mzero - + +instance FromJSON StatsBwObj where + parseJSON (Object o) = + StatsBwObj <$> o .: "RateIn" + <*> o .: "RateOut" + <*> o .: "TotalIn" + <*> o .: "TotalOut" + + parseJSON _ = mzero + + +instance FromJSON StatsRepoObj where + parseJSON (Object o) = + StatsRepoObj <$> o .: "NumObjects" + <*> o .: "RepoPath" + <*> o .: "RepoSize" + <*> o .: "StorageMax" + <*> o .: "Version" + + parseJSON _ = mzero + +instance FromJSON VersionObj where + parseJSON (Object o) = + VersionObj <$> o .: "Commit" + <*> o .: "Golang" + <*> o .: "Repo" + <*> o .: "System" + <*> o .: "Version" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -422,6 +492,10 @@ type IpfsApi = "cat" :> Capture "cid" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "pin" :> "rm" :> Capture "arg" TextS.Text :> Get '[JSON] PinObj :<|> "bootstrap" :> "add" :> QueryParam "arg" TextS.Text :> Get '[JSON] BootstrapObj :<|> "bootstrap" :> "list" :> Get '[JSON] BootstrapObj + :<|> "bootstrap" :> "rm" :> QueryParam "arg" TextS.Text :> Get '[JSON] BootstrapObj + :<|> "stats" :> "bw" :> Get '[JSON] StatsBwObj + :<|> "stats" :> "repo" :> Get '[JSON] StatsRepoObj + :<|> "version" :> Get '[JSON] VersionObj ipfsApi :: Proxy IpfsApi ipfsApi = Proxy @@ -456,6 +530,10 @@ _pinAdd :: TextS.Text -> ClientM PinObj _pinRemove :: TextS.Text -> ClientM PinObj _bootstrapAdd ::Maybe TextS.Text -> ClientM BootstrapObj _bootstrapList ::ClientM BootstrapObj +_bootstrapRM :: Maybe TextS.Text -> ClientM BootstrapObj +_statsBw ::ClientM StatsBwObj +_statsRepo ::ClientM StatsRepoObj +_version ::ClientM VersionObj _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> @@ -463,4 +541,4 @@ _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectGet :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> - _bootstrapList = client ipfsApi + _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index ab47fa7b..38349ea4 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -28,8 +28,8 @@ import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, _cidFormat, _blockGet, _blockStat, _dagGet, _dagResolve, _configGet, _configSet, _objectData, _objectNew, _objectGetLinks, _objectAddLink, - _objectGet, _objectStat, _pinAdd, _pinRemove, _bootstrapList, - _bootstrapAdd) + _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, + _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -241,10 +241,37 @@ bootstrapAdd peerId = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v - bootstrapList :: IO () bootstrapList = do res <- call $ _bootstrapList case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v + +bootstrapRM :: Text -> IO () +bootstrapRM peerId = do + res <- call $ _bootstrapRM (Just peerId) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +statsBw :: IO () +statsBw = do + res <- call $ _statsBw + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +statsRepo :: IO () +statsRepo = do + res <- call $ _statsRepo + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +version :: IO () +version = do + res <- call $ _version + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v From cc8f6fbdfb0a6edc553245554bbb07aeee30c45a Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 12 Aug 2019 00:47:45 +0530 Subject: [PATCH 091/237] Added id, idPeer, dns and shutdown functions --- src/Network/Ipfs/Api/Api.hs | 47 +++++++++++++++++++++++++++++++----- src/Network/Ipfs/Api/Ipfs.hs | 31 +++++++++++++++++++++++- 2 files changed, 71 insertions(+), 7 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 430a235a..fc5281a7 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -45,6 +45,7 @@ type GetReturnType = TextS.Text type BlockReturnType = TextS.Text type DagReturnType = TextS.Text type ObjectReturnType = TextS.Text +type ShutdownReturnType = TextS.Text data DirLink = DirLink { name :: String @@ -182,7 +183,6 @@ data PinObj = WithoutProgress data BootstrapObj = BootstrapObj { bootstrapPeers :: [String] } deriving (Show) - data StatsBwObj = StatsBwObj { rateIn :: Double , rateOut :: Double @@ -206,6 +206,16 @@ data VersionObj = VersionObj , version :: String } deriving (Show) +data IdObj = IdObj + { addresses :: [String] + , agentVersion :: String + , id :: String + , protocolVersion :: String + , publicKey :: String + } deriving (Show) + +data DnsObj = DnsObj { dnsPath :: String } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -436,6 +446,22 @@ instance FromJSON VersionObj where parseJSON _ = mzero +instance FromJSON IdObj where + parseJSON (Object o) = + IdObj <$> o .: "Addresses" + <*> o .: "AgentVersion" + <*> o .: "ID" + <*> o .: "ProtocolVersion" + <*> o .: "PublicKey" + + parseJSON _ = mzero + +instance FromJSON DnsObj where + parseJSON (Object o) = + DnsObj <$> o .: "Path" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -496,6 +522,10 @@ type IpfsApi = "cat" :> Capture "cid" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "stats" :> "bw" :> Get '[JSON] StatsBwObj :<|> "stats" :> "repo" :> Get '[JSON] StatsRepoObj :<|> "version" :> Get '[JSON] VersionObj + :<|> "id" :> Get '[JSON] IdObj + :<|> "id" :> Capture "arg" TextS.Text :> Get '[JSON] IdObj + :<|> "dns" :> Capture "arg" TextS.Text :> Get '[JSON] DnsObj + :<|> "shutdown" :> Get '[JSON] NoContent ipfsApi :: Proxy IpfsApi ipfsApi = Proxy @@ -529,11 +559,15 @@ _objectStat :: TextS.Text -> ClientM ObjectStatObj _pinAdd :: TextS.Text -> ClientM PinObj _pinRemove :: TextS.Text -> ClientM PinObj _bootstrapAdd ::Maybe TextS.Text -> ClientM BootstrapObj -_bootstrapList ::ClientM BootstrapObj +_bootstrapList :: ClientM BootstrapObj _bootstrapRM :: Maybe TextS.Text -> ClientM BootstrapObj -_statsBw ::ClientM StatsBwObj -_statsRepo ::ClientM StatsRepoObj -_version ::ClientM VersionObj +_statsBw :: ClientM StatsBwObj +_statsRepo :: ClientM StatsRepoObj +_version :: ClientM VersionObj +_id :: ClientM IdObj +_idPeer :: TextS.Text -> ClientM IdObj +_dns :: TextS.Text -> ClientM DnsObj +_shutdown :: ClientM NoContent _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> @@ -541,4 +575,5 @@ _cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectGet :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> - _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version = client ipfsApi + _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> + _dns :<|> _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 38349ea4..740002b1 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -29,7 +29,8 @@ import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, _dagResolve, _configGet, _configSet, _objectData, _objectNew, _objectGetLinks, _objectAddLink, _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, - _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version) + _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, + _id, _idPeer, _dns, _shutdown) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -275,3 +276,31 @@ version = do case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v + +id :: IO () +id = do + res <- call $ _id + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +idPeer :: Text -> IO () +idPeer peerId = do + res <- call $ _idPeer peerId + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +dns :: Text -> IO () +dns name = do + res <- call $ _dns name + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +shutdown :: IO () +shutdown = do + res <- call $ _shutdown + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print "The daemon has been shutdown, your welcome." \ No newline at end of file From 7bdcacf13b6a294713a2ade36aac7dde1dfdf8f6 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Fri, 16 Aug 2019 01:57:15 +0530 Subject: [PATCH 092/237] Added swarmConnect, swarmDisconnect and swarmFilterAdd functions --- src/Network/Ipfs/Api/Api.hs | 126 +++++++++++++++++++---------------- src/Network/Ipfs/Api/Ipfs.hs | 32 +++++++-- 2 files changed, 98 insertions(+), 60 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index fc5281a7..fedb82e6 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -37,6 +37,7 @@ import Network.HTTP.Client() import qualified Network.HTTP.Media as M ((//)) import Servant.API import Servant.Client +--import Servant.Multipart type CatReturnType = TextS.Text @@ -48,42 +49,43 @@ type ObjectReturnType = TextS.Text type ShutdownReturnType = TextS.Text data DirLink = DirLink - { name :: String - , hash :: String + { name :: TextS.Text + , hash :: TextS.Text , size :: Int64 , contentType :: Int - , target :: String + , target :: TextS.Text } deriving (Show) data DirObj = DirObj - { dirHash :: String + { dirHash :: TextS.Text , links :: [DirLink] } deriving (Show) data LsObj = LsObj { objs :: [DirObj] } deriving (Show) -data RefsObj = RefsObj String deriving (Show) -{-- { error :: String - , ref :: String +data RefsObj = RefsObj TextS.Text deriving (Show) +{-- { error :: TextS.Text + , ref :: TextS.Text } deriving (Show) --} -data SwarmStreamObj = SwarmStreamObj { protocol :: String } deriving (Show) +data SwarmStreamObj = SwarmStreamObj { protocol :: TextS.Text } deriving (Show) data SwarmPeerObj = SwarmPeerObj - { address :: String + { address :: TextS.Text , direction :: Int - , latency :: String - , muxer :: String - , peer :: String + , latency :: TextS.Text + , muxer :: TextS.Text + , peer :: TextS.Text , streams :: Maybe [SwarmStreamObj] } deriving (Show) -data SwarmObj = SwarmObj { peers :: [SwarmPeerObj] } deriving (Show) +data SwarmPeersObj = SwarmPeersObj { peers :: [SwarmPeerObj] } deriving (Show) +data SwarmObj = SwarmObj { strings :: [TextS.Text] } deriving (Show) -data WantlistObj = WantlistObj { forSlash :: String } deriving (Show) +data WantlistObj = WantlistObj { forSlash :: TextS.Text } deriving (Show) data BitswapStatObj = BitswapStatObj { blocksReceived :: Int64 @@ -93,7 +95,7 @@ data BitswapStatObj = BitswapStatObj , dupBlksReceived :: Int64 , dupDataReceived :: Int64 , messagesReceived :: Int64 - , bitswapPeers :: [String] + , bitswapPeers :: [TextS.Text] , provideBufLen :: Int , wantlist :: [WantlistObj] } deriving (Show) @@ -102,7 +104,7 @@ data BitswapWLObj = BitswapWLObj { keys :: [WantlistObj] } deriving (Show) data BitswapLedgerObj = BitswapLedgerObj { exchanged :: Int64 - , ledgerPeer :: String + , ledgerPeer :: TextS.Text , recv :: Int64 , sent :: Int64 , value :: Double @@ -110,57 +112,57 @@ data BitswapLedgerObj = BitswapLedgerObj data CidBasesObj = CidBasesObj { baseCode :: Int - , baseName :: String + , baseName :: TextS.Text } deriving (Show) data CidCodecsObj = CidCodecsObj { codecCode :: Int - , codecName :: String + , codecName :: TextS.Text } deriving (Show) data CidHashesObj = CidHashesObj { multihashCode :: Int - , multihashName :: String + , multihashName :: TextS.Text } deriving (Show) data CidObj = CidObj - { cidStr :: String - , errorMsg :: String - , formatted :: String + { cidStr :: TextS.Text + , errorMsg :: TextS.Text + , formatted :: TextS.Text } deriving (Show) data BlockStatObj = BlockStatObj - { key :: String + { key :: TextS.Text , blockSize :: Int } deriving (Show) -data DagCidObj = DagCidObj { cidSlash :: String } deriving (Show) +data DagCidObj = DagCidObj { cidSlash :: TextS.Text } deriving (Show) data DagResolveObj = DagResolveObj { cid :: DagCidObj - , remPath :: String + , remPath :: TextS.Text } deriving (Show) data ConfigObj = ConfigObj - { configKey :: String - , configValue :: String + { configKey :: TextS.Text + , configValue :: TextS.Text } deriving (Show) data ObjectLinkObj = ObjectLinkObj - { linkHash :: String - , linkName :: String + { linkHash :: TextS.Text + , linkName :: TextS.Text , linkSize :: Int64 } deriving (Show) -data ObjectNewObj = ObjectNewObj { newObjectHash :: String } deriving (Show) +data ObjectNewObj = ObjectNewObj { newObjectHash :: TextS.Text } deriving (Show) data ObjectLinksObj = ObjectLinksObj - { objectHash :: String + { objectHash :: TextS.Text , objectLinks :: [ObjectLinkObj] } deriving (Show) data ObjectGetObj = ObjectGetObj - { objectName :: String + { objectName :: TextS.Text , objectGetLinks :: [ObjectLinkObj] } deriving (Show) @@ -168,20 +170,20 @@ data ObjectStatObj = ObjectStatObj { objBlockSize :: Int , cumulativeSize :: Int , dataSize :: Int - , objHash :: String + , objHash :: TextS.Text , linksSize :: Int , numLinks :: Int } deriving (Show) data PinObj = WithoutProgress - { pins :: [String] } + { pins :: [TextS.Text] } | WithProgress - { pins :: [String] + { pins :: [TextS.Text] , progress :: Int } deriving (Show) -data BootstrapObj = BootstrapObj { bootstrapPeers :: [String] } deriving (Show) +data BootstrapObj = BootstrapObj { bootstrapPeers :: [TextS.Text] } deriving (Show) data StatsBwObj = StatsBwObj { rateIn :: Double @@ -192,29 +194,29 @@ data StatsBwObj = StatsBwObj data StatsRepoObj = StatsRepoObj { numObjects :: Int64 - , repoPath :: String + , repoPath :: TextS.Text , repoSize :: Int64 , storageMax :: Int64 - , repoVersion :: String + , repoVersion :: TextS.Text } deriving (Show) data VersionObj = VersionObj - { commit :: String - , golang :: String - , repo :: String - , system :: String - , version :: String + { commit :: TextS.Text + , golang :: TextS.Text + , repo :: TextS.Text + , system :: TextS.Text + , version :: TextS.Text } deriving (Show) data IdObj = IdObj - { addresses :: [String] - , agentVersion :: String - , id :: String - , protocolVersion :: String - , publicKey :: String + { addresses :: [TextS.Text] + , agentVersion :: TextS.Text + , id :: TextS.Text + , protocolVersion :: TextS.Text + , publicKey :: TextS.Text } deriving (Show) -data DnsObj = DnsObj { dnsPath :: String } deriving (Show) +data DnsObj = DnsObj { dnsPath :: TextS.Text } deriving (Show) instance FromJSON DirLink where parseJSON (Object o) = @@ -257,13 +259,19 @@ instance FromJSON SwarmPeerObj where parseJSON _ = mzero -instance FromJSON SwarmObj where +instance FromJSON SwarmPeersObj where parseJSON (Object o) = - SwarmObj <$> o .: "Peers" + SwarmPeersObj <$> o .: "Peers" parseJSON _ = mzero +instance FromJSON SwarmObj where + parseJSON (Object o) = + SwarmObj <$> o .: "Strings" + + parseJSON _ = mzero + instance FromJSON WantlistObj where parseJSON (Object o) = WantlistObj <$> o .: "/" @@ -484,13 +492,16 @@ instance MimeUnrender IpfsText TextS.Text where instance {-# OVERLAPPING #-} MimeUnrender JSON (Vec.Vector RefsObj) where mimeUnrender _ bs = do t <- fmapL show (TextS.decodeUtf8' (toStrict bs)) - pure (Vec.fromList (map RefsObj (lines $ TextS.unpack t))) + pure (Vec.fromList (map RefsObj (map TextS.pack (lines $ TextS.unpack t)))) type IpfsApi = "cat" :> Capture "cid" TextS.Text :> Get '[IpfsText] CatReturnType :<|> "ls" :> Capture "cid" TextS.Text :> Get '[JSON] LsObj :<|> "refs" :> Capture "cid" TextS.Text :> Get '[JSON] (Vec.Vector RefsObj) :<|> "refs" :> "local" :> Get '[JSON] (Vec.Vector RefsObj) - :<|> "swarm" :> "peers" :> Get '[JSON] SwarmObj + :<|> "swarm" :> "peers" :> Get '[JSON] SwarmPeersObj + :<|> "swarm" :> "connect" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "disconnect" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "filters" :> "add" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj :<|> "bitswap" :> "stat" :> Get '[JSON] BitswapStatObj :<|> "bitswap" :> "wantlist" :> Get '[JSON] BitswapWLObj :<|> "bitswap" :> "ledger" :> Capture "peerId" TextS.Text :> Get '[JSON] BitswapLedgerObj @@ -534,7 +545,10 @@ _cat :: TextS.Text -> ClientM CatReturnType _ls :: TextS.Text -> ClientM LsObj _refs :: TextS.Text -> ClientM (Vec.Vector RefsObj) _refsLocal :: ClientM (Vec.Vector RefsObj) -_swarmPeers :: ClientM SwarmObj +_swarmPeers :: ClientM SwarmPeersObj +_swarmConnect :: Maybe TextS.Text -> ClientM SwarmObj +_swarmDisconnect :: Maybe TextS.Text -> ClientM SwarmObj +_swarmFilterAdd :: Maybe TextS.Text -> ClientM SwarmObj _bitswapStat :: ClientM BitswapStatObj _bitswapWL :: ClientM BitswapWLObj _bitswapLedger :: TextS.Text -> ClientM BitswapLedgerObj @@ -569,8 +583,8 @@ _idPeer :: TextS.Text -> ClientM IdObj _dns :: TextS.Text -> ClientM DnsObj _shutdown :: ClientM NoContent -_cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> - _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> +_cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> + _swarmFilterAdd :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 740002b1..008d1cdc 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -22,15 +22,15 @@ import Network.HTTP.Client (newManager, defaultManagerSettings) import Servant.Client import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, - _swarmPeers, _bitswapStat, _bitswapWL, - _bitswapLedger, _bitswapReprovide, + _swarmPeers, _swarmConnect,_swarmDisconnect, _swarmFilterAdd, + _bitswapStat, _bitswapWL, _bitswapLedger, _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, _cidFormat, _blockGet, _blockStat, _dagGet, _dagResolve, _configGet, _configSet, _objectData, _objectNew, _objectGetLinks, _objectAddLink, _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, - _id, _idPeer, _dns, _shutdown) + _id, _idPeer, _dns, _shutdown,) call :: ClientM a -> IO (Either ServantError a) call func = do @@ -73,6 +73,30 @@ swarmPeers = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | peerId has to be of the format - /ipfs/id +swarmConnect :: Text -> IO () +swarmConnect peerId = do + res <- call $ _swarmConnect (Just peerId) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +-- | peerId has to be of the format - /ipfs/id +swarmDisconnect :: Text -> IO () +swarmDisconnect peerId = do + res <- call $ _swarmDisconnect (Just peerId) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +-- | peerId has to be of the format - /ip4/{IP of peer}/ipcidr/16 +swarmFilterAdd :: Text -> IO () +swarmFilterAdd filter = do + res <- call $ _swarmFilterAdd (Just filter) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + bitswapStat :: IO () bitswapStat = do res <- call _bitswapStat @@ -303,4 +327,4 @@ shutdown = do res <- call $ _shutdown case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print "The daemon has been shutdown, your welcome." \ No newline at end of file + Right _ -> print "The daemon has been shutdown, your welcome." From db99244ef2f392610cb4ac239b1f21456f8c80ee Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sun, 18 Aug 2019 02:54:35 +0530 Subject: [PATCH 093/237] Added swarmFilters, swarmFilterRm and get functions --- src/Network/Ipfs/Api/Api.hs | 18 ++++++++++------ src/Network/Ipfs/Api/Ipfs.hs | 42 ++++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index fedb82e6..20d29895 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -494,14 +494,17 @@ instance {-# OVERLAPPING #-} MimeUnrender JSON (Vec.Vector RefsObj) where t <- fmapL show (TextS.decodeUtf8' (toStrict bs)) pure (Vec.fromList (map RefsObj (map TextS.pack (lines $ TextS.unpack t)))) -type IpfsApi = "cat" :> Capture "cid" TextS.Text :> Get '[IpfsText] CatReturnType - :<|> "ls" :> Capture "cid" TextS.Text :> Get '[JSON] LsObj - :<|> "refs" :> Capture "cid" TextS.Text :> Get '[JSON] (Vec.Vector RefsObj) +type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnType + :<|> "ls" :> Capture "arg" TextS.Text :> Get '[JSON] LsObj + :<|> "get" :> Capture "arg" TextS.Text :> Get '[IpfsText] GetReturnType + :<|> "refs" :> Capture "arg" TextS.Text :> Get '[JSON] (Vec.Vector RefsObj) :<|> "refs" :> "local" :> Get '[JSON] (Vec.Vector RefsObj) :<|> "swarm" :> "peers" :> Get '[JSON] SwarmPeersObj :<|> "swarm" :> "connect" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj :<|> "swarm" :> "disconnect" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "filters" :> Get '[JSON] SwarmObj :<|> "swarm" :> "filters" :> "add" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "filters" :> "rm" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj :<|> "bitswap" :> "stat" :> Get '[JSON] BitswapStatObj :<|> "bitswap" :> "wantlist" :> Get '[JSON] BitswapWLObj :<|> "bitswap" :> "ledger" :> Capture "peerId" TextS.Text :> Get '[JSON] BitswapLedgerObj @@ -543,12 +546,15 @@ ipfsApi = Proxy _cat :: TextS.Text -> ClientM CatReturnType _ls :: TextS.Text -> ClientM LsObj +_get :: TextS.Text -> ClientM GetReturnType _refs :: TextS.Text -> ClientM (Vec.Vector RefsObj) _refsLocal :: ClientM (Vec.Vector RefsObj) _swarmPeers :: ClientM SwarmPeersObj _swarmConnect :: Maybe TextS.Text -> ClientM SwarmObj _swarmDisconnect :: Maybe TextS.Text -> ClientM SwarmObj +_swarmFilters :: ClientM SwarmObj _swarmFilterAdd :: Maybe TextS.Text -> ClientM SwarmObj +_swarmFilterRm :: Maybe TextS.Text -> ClientM SwarmObj _bitswapStat :: ClientM BitswapStatObj _bitswapWL :: ClientM BitswapWLObj _bitswapLedger :: TextS.Text -> ClientM BitswapLedgerObj @@ -583,9 +589,9 @@ _idPeer :: TextS.Text -> ClientM IdObj _dns :: TextS.Text -> ClientM DnsObj _shutdown :: ClientM NoContent -_cat :<|> _ls :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> - _swarmFilterAdd :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> - _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> +_cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> + _swarmFilters :<|> _swarmFilterAdd :<|> _swarmFilterRm :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> + _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectGet :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 008d1cdc..3591fc3e 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -17,14 +17,17 @@ module Network.Ipfs.Api.Ipfs where -import Data.Text as TextS +import qualified Codec.Archive.Tar as Tar +import Data.Text as TextS +import qualified Data.Text.Encoding as TextS +import qualified Data.ByteString.Lazy as BS import Network.HTTP.Client (newManager, defaultManagerSettings) import Servant.Client -import Network.Ipfs.Api.Api (_cat, _ls, _refs, _refsLocal, - _swarmPeers, _swarmConnect,_swarmDisconnect, _swarmFilterAdd, - _bitswapStat, _bitswapWL, _bitswapLedger, _bitswapReprovide, - _cidBases, _cidCodecs, _cidHashes, _cidBase32, +import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLocal, _swarmPeers, _swarmConnect, + _swarmDisconnect, _swarmFilterAdd, _swarmFilters, + _swarmFilterRm, _bitswapStat, _bitswapWL, _bitswapLedger, + _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, _cidFormat, _blockGet, _blockStat, _dagGet, _dagResolve, _configGet, _configSet, _objectData, _objectNew, _objectGetLinks, _objectAddLink, @@ -51,7 +54,14 @@ ls hash = do case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v - + +get :: Text -> IO () +get hash = do + res <- call $ _get hash + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ TextS.encodeUtf8 v + refs :: Text -> IO () refs hash = do res <- call $ _refs hash @@ -89,14 +99,28 @@ swarmDisconnect peerId = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v --- | peerId has to be of the format - /ip4/{IP of peer}/ipcidr/16 +swarmFilters :: IO () +swarmFilters = do + res <- call _swarmFilters + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +-- | peerId has to be of the format - /ip4/{IP addr of peer}/ipcidr/{ip network prefix} swarmFilterAdd :: Text -> IO () -swarmFilterAdd filter = do - res <- call $ _swarmFilterAdd (Just filter) +swarmFilterAdd filterParam = do + res <- call $ _swarmFilterAdd (Just filterParam) case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +swarmFilterRm :: Text -> IO () +swarmFilterRm filterParam = do + res <- call $ _swarmFilterRm (Just filterParam) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + bitswapStat :: IO () bitswapStat = do res <- call _bitswapStat From d7cab32e2e39fa22a277ab2315789bf32c7ce9b6 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 19 Aug 2019 04:30:11 +0530 Subject: [PATCH 094/237] Added Multipart.hs --- src/Network/Ipfs/Api/Multipart.hs | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/Network/Ipfs/Api/Multipart.hs diff --git a/src/Network/Ipfs/Api/Multipart.hs b/src/Network/Ipfs/Api/Multipart.hs new file mode 100644 index 00000000..cffeaca4 --- /dev/null +++ b/src/Network/Ipfs/Api/Multipart.hs @@ -0,0 +1,35 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ipfs.Api.Api +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Multipart datatypes provider. +-- + +module Network.Ipfs.Api.Multipart where + +import Control.Monad +import Data.Aeson (FromJSON (..), Value(Object), (.:)) +import qualified Data.Text as TextS + +data AddObj = AddObj + { name :: TextS.Text + , hash :: TextS.Text + , size :: TextS.Text + } deriving (Show) + +instance FromJSON AddObj where + parseJSON (Object o) = + AddObj <$> o .: "Name" + <*> o .: "Hash" + <*> o .: "Size" + + parseJSON _ = mzero From 865f62385ae3fcef801f334c34801587a4c135ed Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 19 Aug 2019 04:30:42 +0530 Subject: [PATCH 095/237] Added multipartCall, add and blockPut functions --- src/Network/Ipfs/Api/Api.hs | 15 ++++----- src/Network/Ipfs/Api/Ipfs.hs | 63 ++++++++++++++++++++++++------------ 2 files changed, 50 insertions(+), 28 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 20d29895..ee2e5bf7 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -26,8 +26,7 @@ import Data.Int import Data.ByteString.Lazy (toStrict) import qualified Data.ByteString.Lazy.Char8() import qualified Data.HashMap.Strict as H -import Data.Map (Map) -import qualified Data.Map as Map +import Data.Map() import Data.Proxy import qualified Data.Text as TextS import qualified Data.Text.Encoding as TextS @@ -131,7 +130,7 @@ data CidObj = CidObj , formatted :: TextS.Text } deriving (Show) -data BlockStatObj = BlockStatObj +data BlockObj = BlockObj { key :: TextS.Text , blockSize :: Int } deriving (Show) @@ -339,10 +338,10 @@ instance FromJSON CidObj where parseJSON _ = mzero -instance FromJSON BlockStatObj where +instance FromJSON BlockObj where parseJSON (Object o) = - BlockStatObj <$> o .: "Key" - <*> o .: "Size" + BlockObj <$> o .: "Key" + <*> o .: "Size" parseJSON _ = mzero @@ -515,7 +514,7 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "cid" :> "base32" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj :<|> "cid" :> "format" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj :<|> "block" :> "get" :> Capture "key" TextS.Text :> Get '[IpfsText] BlockReturnType - :<|> "block" :> "stat" :> Capture "key" TextS.Text :> Get '[JSON] BlockStatObj + :<|> "block" :> "stat" :> Capture "key" TextS.Text :> Get '[JSON] BlockObj :<|> "dag" :> "get" :> Capture "ref" TextS.Text :> Get '[JSON] DagReturnType :<|> "dag" :> "resolve" :> Capture "ref" TextS.Text :> Get '[JSON] DagResolveObj :<|> "config" :> Capture "ref" TextS.Text :> Get '[JSON] ConfigObj @@ -565,7 +564,7 @@ _cidHashes :: ClientM [CidHashesObj] _cidBase32 :: TextS.Text -> ClientM CidObj _cidFormat :: TextS.Text -> ClientM CidObj _blockGet :: TextS.Text -> ClientM BlockReturnType -_blockStat :: TextS.Text -> ClientM BlockStatObj +_blockStat :: TextS.Text -> ClientM BlockObj _dagGet :: TextS.Text -> ClientM DagReturnType _dagResolve :: TextS.Text -> ClientM DagResolveObj _configGet :: TextS.Text -> ClientM ConfigObj diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 3591fc3e..bebd14a8 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -17,29 +17,43 @@ module Network.Ipfs.Api.Ipfs where -import qualified Codec.Archive.Tar as Tar -import Data.Text as TextS -import qualified Data.Text.Encoding as TextS -import qualified Data.ByteString.Lazy as BS -import Network.HTTP.Client (newManager, defaultManagerSettings) +import qualified Codec.Archive.Tar as Tar +import Data.Aeson (decode) +import Data.Text as TextS +import qualified Data.Text.Encoding as TextS +import qualified Data.ByteString.Lazy as BS (ByteString, fromStrict) +import Network.HTTP.Client as Net hiding (Proxy) +import Network.HTTP.Client.MultipartFormData import Servant.Client -import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLocal, _swarmPeers, _swarmConnect, - _swarmDisconnect, _swarmFilterAdd, _swarmFilters, - _swarmFilterRm, _bitswapStat, _bitswapWL, _bitswapLedger, - _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, - _cidFormat, _blockGet, _blockStat, _dagGet, - _dagResolve, _configGet, _configSet, _objectData, - _objectNew, _objectGetLinks, _objectAddLink, - _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, - _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, - _id, _idPeer, _dns, _shutdown,) +import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLocal, _swarmPeers, _swarmConnect, + _swarmDisconnect, _swarmFilterAdd, _swarmFilters, + _swarmFilterRm, _bitswapStat, _bitswapWL, _bitswapLedger, + _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, + _cidFormat, _blockGet, _blockStat, _dagGet, + _dagResolve, _configGet, _configSet, _objectData, + _objectNew, _objectGetLinks, _objectAddLink, + _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, + _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, + _id, _idPeer, _dns, _shutdown, BlockObj) + +import Network.Ipfs.Api.Multipart (AddObj) call :: ClientM a -> IO (Either ServantError a) call func = do manager' <- newManager defaultManagerSettings runClientM func (mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) +multipartCall :: Text -> Text -> IO BS.ByteString +multipartCall uri filePath = do + reqManager <- newManager defaultManagerSettings + req <- parseRequest $ TextS.unpack uri + resp <- flip httpLbs reqManager =<< formDataBody form req + return (Net.responseBody resp) + + where form = [ partFileSource "file" $ TextS.unpack filePath ] + + cat :: Text -> IO () cat hash = do @@ -47,7 +61,12 @@ cat hash = do case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v - + +add :: Text -> IO() +add filePath = do + respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/add") filePath + print (decode (respBody) :: Maybe AddObj) + ls :: Text -> IO () ls hash = do res <- call $ _ls hash @@ -191,6 +210,10 @@ blockGet key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +blockPut :: Text -> IO() +blockPut filePath = do + respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/block/put") filePath + print (decode (respBody) :: Maybe BlockObj) blockStat :: Text -> IO () blockStat key = do @@ -270,15 +293,15 @@ objectStat key = do Right v -> print v pinAdd :: Text -> IO () -pinAdd path = do - res <- call $ _pinAdd path +pinAdd pinPath = do + res <- call $ _pinAdd pinPath case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v pinRemove :: Text -> IO () -pinRemove path = do - res <- call $ _pinRemove path +pinRemove pinPath = do + res <- call $ _pinRemove pinPath case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v From 0b8f04ae482ff9c9bba2a5fcd0dff290daa78fb0 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Tue, 20 Aug 2019 02:55:30 +0530 Subject: [PATCH 096/237] Added dagPut, objectPut and configReplace functions --- src/Network/Ipfs/Api/Api.hs | 20 +++++++++++++++----- src/Network/Ipfs/Api/Ipfs.hs | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index ee2e5bf7..805eb380 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -142,6 +142,10 @@ data DagResolveObj = DagResolveObj , remPath :: TextS.Text } deriving (Show) +data DagPutObj = DagPutObj + { putCid :: DagCidObj + } deriving (Show) + data ConfigObj = ConfigObj { configKey :: TextS.Text , configValue :: TextS.Text @@ -153,7 +157,7 @@ data ObjectLinkObj = ObjectLinkObj , linkSize :: Int64 } deriving (Show) -data ObjectNewObj = ObjectNewObj { newObjectHash :: TextS.Text } deriving (Show) +data ObjectObj = ObjectObj { newObjectHash :: TextS.Text } deriving (Show) data ObjectLinksObj = ObjectLinksObj { objectHash :: TextS.Text @@ -358,6 +362,12 @@ instance FromJSON DagResolveObj where parseJSON _ = mzero +instance FromJSON DagPutObj where + parseJSON (Object o) = + DagPutObj <$> o .: "Cid" + + parseJSON _ = mzero + instance FromJSON ConfigObj where parseJSON (Object o) = ConfigObj <$> o .: "Key" @@ -373,9 +383,9 @@ instance FromJSON ObjectLinkObj where parseJSON _ = mzero -instance FromJSON ObjectNewObj where +instance FromJSON ObjectObj where parseJSON (Object o) = - ObjectNewObj <$> o .: "Hash" + ObjectObj <$> o .: "Hash" parseJSON _ = mzero @@ -520,7 +530,7 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "config" :> Capture "ref" TextS.Text :> Get '[JSON] ConfigObj :<|> "config" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ConfigObj :<|> "object" :> "data" :> Capture "ref" TextS.Text :> Get '[IpfsText] ObjectReturnType - :<|> "object" :> "new" :> Get '[JSON] ObjectNewObj + :<|> "object" :> "new" :> Get '[JSON] ObjectObj :<|> "object" :> "links" :> Capture "ref" TextS.Text :> Get '[JSON] ObjectLinksObj :<|> "object" :> "patch" :> "add-link" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text @@ -570,7 +580,7 @@ _dagResolve :: TextS.Text -> ClientM DagResolveObj _configGet :: TextS.Text -> ClientM ConfigObj _configSet :: TextS.Text -> Maybe TextS.Text -> ClientM ConfigObj _objectData :: TextS.Text -> ClientM ObjectReturnType -_objectNew :: ClientM ObjectNewObj +_objectNew :: ClientM ObjectObj _objectGetLinks :: TextS.Text -> ClientM ObjectLinksObj _objectAddLink :: TextS.Text -> Maybe TextS.Text -> Maybe TextS.Text -> ClientM ObjectLinksObj _objectGet :: TextS.Text -> ClientM ObjectGetObj diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index bebd14a8..16e0d60a 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -35,7 +35,7 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca _objectNew, _objectGetLinks, _objectAddLink, _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, - _id, _idPeer, _dns, _shutdown, BlockObj) + _id, _idPeer, _dns, _shutdown, BlockObj, DagPutObj, ObjectObj) import Network.Ipfs.Api.Multipart (AddObj) @@ -236,6 +236,11 @@ dagResolve ref = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +dagPut :: Text -> IO() +dagPut filePath = do + respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/dag/put") filePath + print (decode (respBody) :: Maybe DagPutObj) + configGet :: Text -> IO () configGet key = do res <- call $ _configGet key @@ -250,6 +255,11 @@ configSet key value = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +configReplace :: Text -> IO() +configReplace filePath = do + respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/config/replace") filePath + print (decode (respBody) :: Maybe String) + objectData :: Text -> IO () objectData key = do res <- call $ _objectData key @@ -285,6 +295,11 @@ objectGet key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +objectPut :: Text -> IO() +objectPut filePath = do + respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/object/put") filePath + print (decode (respBody) :: Maybe ObjectObj) + objectStat :: Text -> IO () objectStat key = do res <- call $ _objectStat key From 0e0856d1353e0a5032222a53b81c0f87cae7f150 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Thu, 22 Aug 2019 01:31:30 +0530 Subject: [PATCH 097/237] Added objectDiff and updated configReplace and multipartCall functions --- src/Network/Ipfs/Api/Api.hs | 39 ++++++++++++++++++++++-- src/Network/Ipfs/Api/Ipfs.hs | 57 ++++++++++++++++++++++-------------- 2 files changed, 71 insertions(+), 25 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 805eb380..67a03d5e 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -45,7 +45,6 @@ type GetReturnType = TextS.Text type BlockReturnType = TextS.Text type DagReturnType = TextS.Text type ObjectReturnType = TextS.Text -type ShutdownReturnType = TextS.Text data DirLink = DirLink { name :: TextS.Text @@ -178,6 +177,17 @@ data ObjectStatObj = ObjectStatObj , numLinks :: Int } deriving (Show) +data DiffObj = DiffObj { diffSlash :: TextS.Text } deriving (Show) + +data ObjectChangeObj = ObjectChangeObj + { after :: Maybe DiffObj + , before :: DiffObj + , path :: TextS.Text + , diffType :: Int + } deriving (Show) + +data ObjectDiffObj = ObjectDiffObj { changes :: [ObjectChangeObj] } deriving (Show) + data PinObj = WithoutProgress { pins :: [TextS.Text] } @@ -414,6 +424,27 @@ instance FromJSON ObjectStatObj where parseJSON _ = mzero +instance FromJSON ObjectChangeObj where + parseJSON (Object o) = + ObjectChangeObj <$> o .: "After" + <*> o .: "Before" + <*> o .: "Path" + <*> o .: "Type" + + parseJSON _ = mzero + +instance FromJSON DiffObj where + parseJSON (Object o) = + DiffObj <$> o .: "/" + + parseJSON _ = mzero + +instance FromJSON ObjectDiffObj where + parseJSON (Object o) = + ObjectDiffObj <$> o .: "Changes" + + parseJSON _ = mzero + instance FromJSON PinObj where parseJSON (Object v) = case H.lookup "Progress" v of @@ -536,6 +567,7 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ObjectLinksObj :<|> "object" :> "get" :> Capture "arg" TextS.Text :> Get '[JSON] ObjectGetObj + :<|> "object" :> "diff" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ObjectDiffObj :<|> "object" :> "stat" :> Capture "arg" TextS.Text :> Get '[JSON] ObjectStatObj :<|> "pin" :> "add" :> Capture "arg" TextS.Text :> Get '[JSON] PinObj :<|> "pin" :> "rm" :> Capture "arg" TextS.Text :> Get '[JSON] PinObj @@ -584,6 +616,7 @@ _objectNew :: ClientM ObjectObj _objectGetLinks :: TextS.Text -> ClientM ObjectLinksObj _objectAddLink :: TextS.Text -> Maybe TextS.Text -> Maybe TextS.Text -> ClientM ObjectLinksObj _objectGet :: TextS.Text -> ClientM ObjectGetObj +_objectDiff :: TextS.Text -> Maybe TextS.Text -> ClientM ObjectDiffObj _objectStat :: TextS.Text -> ClientM ObjectStatObj _pinAdd :: TextS.Text -> ClientM PinObj _pinRemove :: TextS.Text -> ClientM PinObj @@ -601,8 +634,8 @@ _shutdown :: ClientM NoContent _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> _swarmFilters :<|> _swarmFilterAdd :<|> _swarmFilterRm :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> - _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> + _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> - _objectGet :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> + _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> _dns :<|> _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 16e0d60a..4ca95f78 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -21,16 +21,18 @@ import qualified Codec.Archive.Tar as Tar import Data.Aeson (decode) import Data.Text as TextS import qualified Data.Text.Encoding as TextS +import qualified Data.Text.IO as TextIO import qualified Data.ByteString.Lazy as BS (ByteString, fromStrict) import Network.HTTP.Client as Net hiding (Proxy) import Network.HTTP.Client.MultipartFormData +import Network.HTTP.Types (Status(..)) import Servant.Client import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLocal, _swarmPeers, _swarmConnect, _swarmDisconnect, _swarmFilterAdd, _swarmFilters, _swarmFilterRm, _bitswapStat, _bitswapWL, _bitswapLedger, _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, - _cidFormat, _blockGet, _blockStat, _dagGet, + _cidFormat, _blockGet, _objectDiff, _blockStat, _dagGet, _dagResolve, _configGet, _configSet, _objectData, _objectNew, _objectGetLinks, _objectAddLink, _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, @@ -39,33 +41,33 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca import Network.Ipfs.Api.Multipart (AddObj) + call :: ClientM a -> IO (Either ServantError a) call func = do manager' <- newManager defaultManagerSettings runClientM func (mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) -multipartCall :: Text -> Text -> IO BS.ByteString +multipartCall :: Text -> Text -> IO (Net.Response BS.ByteString) multipartCall uri filePath = do reqManager <- newManager defaultManagerSettings req <- parseRequest $ TextS.unpack uri resp <- flip httpLbs reqManager =<< formDataBody form req - return (Net.responseBody resp) + return (resp) where form = [ partFileSource "file" $ TextS.unpack filePath ] - cat :: Text -> IO () cat hash = do res <- call $ _cat hash case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v + Right v -> TextIO.putStr v add :: Text -> IO() add filePath = do - respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/add") filePath - print (decode (respBody) :: Maybe AddObj) + responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/add") filePath + print (decode (Net.responseBody responseVal) :: Maybe AddObj) ls :: Text -> IO () ls hash = do @@ -79,7 +81,8 @@ get hash = do res <- call $ _get hash case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ TextS.encodeUtf8 v + Right v -> do Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ TextS.encodeUtf8 v + print "The content has been stored in getResponseDirectory." refs :: Text -> IO () refs hash = do @@ -166,7 +169,7 @@ bitswapReprovide = do res <- call $ _bitswapReprovide case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v + Right v -> TextIO.putStr v cidBases :: IO () cidBases = do @@ -208,12 +211,12 @@ blockGet key = do res <- call $ _blockGet key case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v + Right v -> TextIO.putStr v blockPut :: Text -> IO() blockPut filePath = do - respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/block/put") filePath - print (decode (respBody) :: Maybe BlockObj) + responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/block/put") filePath + print (decode (Net.responseBody responseVal) :: Maybe BlockObj) blockStat :: Text -> IO () blockStat key = do @@ -227,7 +230,7 @@ dagGet ref = do res <- call $ _dagGet ref case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v + Right v -> TextIO.putStr v dagResolve :: Text -> IO () dagResolve ref = do @@ -238,15 +241,15 @@ dagResolve ref = do dagPut :: Text -> IO() dagPut filePath = do - respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/dag/put") filePath - print (decode (respBody) :: Maybe DagPutObj) + responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/dag/put") filePath + print (decode (Net.responseBody responseVal) :: Maybe DagPutObj) configGet :: Text -> IO () configGet key = do res <- call $ _configGet key case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v + Right v -> print v configSet :: Text -> Text -> IO () configSet key value = do @@ -257,15 +260,18 @@ configSet key value = do configReplace :: Text -> IO() configReplace filePath = do - respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/config/replace") filePath - print (decode (respBody) :: Maybe String) - + responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/config/replace") filePath + case statusCode $ Net.responseStatus responseVal of + 200 -> putStrLn "Config File Replaced Successfully with status code - " + _ -> putStrLn $ "Error occured with status code - " + print $ statusCode $ Net.responseStatus responseVal + objectData :: Text -> IO () objectData key = do res <- call $ _objectData key case res of Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v + Right v -> TextIO.putStr v objectNew :: IO () objectNew = do @@ -295,10 +301,17 @@ objectGet key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +objectDiff :: Text -> Text -> IO () +objectDiff firstKey secondKey = do + res <- call $ _objectDiff firstKey (Just secondKey) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + objectPut :: Text -> IO() objectPut filePath = do - respBody <- multipartCall (TextS.pack "http://localhost:5001/api/v0/object/put") filePath - print (decode (respBody) :: Maybe ObjectObj) + responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/object/put") filePath + print (decode ( Net.responseBody responseVal) :: Maybe ObjectObj) objectStat :: Text -> IO () objectStat key = do From 9330097711df7b9132e01e55d1083d039bc6246c Mon Sep 17 00:00:00 2001 From: amany9000 Date: Thu, 22 Aug 2019 21:05:51 +0530 Subject: [PATCH 098/237] Added objectRmLink, objectAppendData and objectSetData functions --- src/Network/Ipfs/Api/Api.hs | 29 +++++++++++++++++++---------- src/Network/Ipfs/Api/Ipfs.hs | 24 +++++++++++++++++++++--- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 67a03d5e..c97ec30d 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -158,10 +158,11 @@ data ObjectLinkObj = ObjectLinkObj data ObjectObj = ObjectObj { newObjectHash :: TextS.Text } deriving (Show) -data ObjectLinksObj = ObjectLinksObj +data ObjectLinksObj = WithLinks { objectHash :: TextS.Text , objectLinks :: [ObjectLinkObj] - } deriving (Show) + } + | WithoutLinks { objectHash :: TextS.Text } deriving (Show) data ObjectGetObj = ObjectGetObj { objectName :: TextS.Text @@ -190,7 +191,7 @@ data ObjectDiffObj = ObjectDiffObj { changes :: [ObjectChangeObj] } deriving (S data PinObj = WithoutProgress { pins :: [TextS.Text] } - + | WithProgress { pins :: [TextS.Text] , progress :: Int @@ -400,9 +401,15 @@ instance FromJSON ObjectObj where parseJSON _ = mzero instance FromJSON ObjectLinksObj where - parseJSON (Object o) = - ObjectLinksObj <$> o .: "Hash" - <*> o .: "Links" + parseJSON (Object v) = + case H.lookup "Links" v of + Just (_) -> WithLinks <$> v .: "Hash" + <*> v .: "Links" + + Nothing -> + case H.lookup "Hash" v of + Just (_) -> WithoutLinks <$> v .: "Hash" + Nothing -> mzero parseJSON _ = mzero @@ -449,7 +456,7 @@ instance FromJSON PinObj where parseJSON (Object v) = case H.lookup "Progress" v of Just (_) -> WithProgress <$> v .: "Pins" - <*> v .: "Progress" + <*> v .: "Progress" Nothing -> case H.lookup "Pins" v of @@ -564,8 +571,9 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "object" :> "new" :> Get '[JSON] ObjectObj :<|> "object" :> "links" :> Capture "ref" TextS.Text :> Get '[JSON] ObjectLinksObj :<|> "object" :> "patch" :> "add-link" :> Capture "arg" TextS.Text - :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text - :> Get '[JSON] ObjectLinksObj + :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ObjectLinksObj + :<|> "object" :> "patch" :> "rm-link" :> Capture "arg" TextS.Text + :> QueryParam "arg" TextS.Text :> Get '[JSON] ObjectLinksObj :<|> "object" :> "get" :> Capture "arg" TextS.Text :> Get '[JSON] ObjectGetObj :<|> "object" :> "diff" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ObjectDiffObj :<|> "object" :> "stat" :> Capture "arg" TextS.Text :> Get '[JSON] ObjectStatObj @@ -615,6 +623,7 @@ _objectData :: TextS.Text -> ClientM ObjectReturnType _objectNew :: ClientM ObjectObj _objectGetLinks :: TextS.Text -> ClientM ObjectLinksObj _objectAddLink :: TextS.Text -> Maybe TextS.Text -> Maybe TextS.Text -> ClientM ObjectLinksObj +_objectRmLink :: TextS.Text -> Maybe TextS.Text -> ClientM ObjectLinksObj _objectGet :: TextS.Text -> ClientM ObjectGetObj _objectDiff :: TextS.Text -> Maybe TextS.Text -> ClientM ObjectDiffObj _objectStat :: TextS.Text -> ClientM ObjectStatObj @@ -635,7 +644,7 @@ _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmC _swarmFilters :<|> _swarmFilterAdd :<|> _swarmFilterRm :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> - _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> + _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectRmLink :<|> _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> _dns :<|> _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 4ca95f78..912e5c07 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -34,10 +34,11 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, _cidFormat, _blockGet, _objectDiff, _blockStat, _dagGet, _dagResolve, _configGet, _configSet, _objectData, - _objectNew, _objectGetLinks, _objectAddLink, + _objectNew, _objectGetLinks, _objectAddLink, _objectRmLink, _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, - _id, _idPeer, _dns, _shutdown, BlockObj, DagPutObj, ObjectObj) + _id, _idPeer, _dns, _shutdown, BlockObj, DagPutObj, ObjectObj, + ObjectLinksObj) import Network.Ipfs.Api.Multipart (AddObj) @@ -293,7 +294,24 @@ objectAddLink hash name key = do case res of Left err -> putStrLn $ "Error: " ++ show err Right v -> print v - + +objectRmLink :: Text -> Text -> IO () +objectRmLink key name = do + res <- call $ _objectRmLink key (Just name) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +objectAppendData :: Text -> Text -> IO() +objectAppendData key filePath = do + responseVal <- multipartCall ( ( TextS.pack "http://localhost:5001/api/v0/object/patch/append-data?arg=" ) <> key) filePath + print (decode ( Net.responseBody responseVal) :: Maybe ObjectLinksObj) + +objectSetData :: Text -> Text -> IO() +objectSetData key filePath = do + responseVal <- multipartCall ( ( TextS.pack "http://localhost:5001/api/v0/object/patch/set-data?arg=" ) <>key) filePath + print (decode ( Net.responseBody responseVal) :: Maybe ObjectLinksObj) + objectGet :: Text -> IO () objectGet key = do res <- call $ _objectGet key From 01c633f488f14e07e5db7ff7627ffb22f93b4ad0 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Fri, 23 Aug 2019 17:28:28 +0530 Subject: [PATCH 099/237] Added Stream.hs and streamCall, ping and dhtFindPeer functions --- src/Network/Ipfs/Api/Api.hs | 14 +++++- src/Network/Ipfs/Api/Ipfs.hs | 18 +++++++- src/Network/Ipfs/Api/Stream.hs | 84 ++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 src/Network/Ipfs/Api/Stream.hs diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index c97ec30d..729f7ef2 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -36,7 +36,6 @@ import Network.HTTP.Client() import qualified Network.HTTP.Media as M ((//)) import Servant.API import Servant.Client ---import Servant.Multipart type CatReturnType = TextS.Text @@ -536,6 +535,17 @@ instance Servant.API.Accept IpfsText where instance MimeUnrender IpfsText TextS.Text where mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict + +-- | Defining a content type same as DagGetJSON +data DagGetJSON deriving Typeable + +instance Servant.API.Accept DagGetJSON where + contentType _ = "application" M.// "json" + +-- | @left show . TextS.decodeUtf8' . toStrict@ +instance MimeUnrender DagGetJSON TextS.Text where + mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict + instance {-# OVERLAPPING #-} MimeUnrender JSON (Vec.Vector RefsObj) where mimeUnrender _ bs = do t <- fmapL show (TextS.decodeUtf8' (toStrict bs)) @@ -563,7 +573,7 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "cid" :> "format" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj :<|> "block" :> "get" :> Capture "key" TextS.Text :> Get '[IpfsText] BlockReturnType :<|> "block" :> "stat" :> Capture "key" TextS.Text :> Get '[JSON] BlockObj - :<|> "dag" :> "get" :> Capture "ref" TextS.Text :> Get '[JSON] DagReturnType + :<|> "dag" :> "get" :> Capture "ref" TextS.Text :> Get '[DagGetJSON] DagReturnType :<|> "dag" :> "resolve" :> Capture "ref" TextS.Text :> Get '[JSON] DagResolveObj :<|> "config" :> Capture "ref" TextS.Text :> Get '[JSON] ConfigObj :<|> "config" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ConfigObj diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 912e5c07..fc080747 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} @@ -27,6 +28,8 @@ import Network.HTTP.Client as Net hiding (Proxy) import Network.HTTP.Client.MultipartFormData import Network.HTTP.Types (Status(..)) import Servant.Client +import qualified Servant.Client.Streaming as S +import Servant.Types.SourceT (SourceT, foreach) import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLocal, _swarmPeers, _swarmConnect, _swarmDisconnect, _swarmFilterAdd, _swarmFilters, @@ -41,6 +44,7 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca ObjectLinksObj) import Network.Ipfs.Api.Multipart (AddObj) +import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer) call :: ClientM a -> IO (Either ServantError a) @@ -48,6 +52,13 @@ call func = do manager' <- newManager defaultManagerSettings runClientM func (mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) +streamCall :: Show a => S.ClientM (SourceT IO a) -> IO() +streamCall func = do + manager' <- newManager defaultManagerSettings + S.withClientM func (S.mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) $ \e -> case e of + Left err -> putStrLn $ "Error: " ++ show err + Right rs -> foreach fail print rs + multipartCall :: Text -> Text -> IO (Net.Response BS.ByteString) multipartCall uri filePath = do reqManager <- newManager defaultManagerSettings @@ -57,7 +68,6 @@ multipartCall uri filePath = do where form = [ partFileSource "file" $ TextS.unpack filePath ] - cat :: Text -> IO () cat hash = do res <- call $ _cat hash @@ -415,6 +425,12 @@ dns name = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +ping :: Text -> IO () +ping cid = streamCall $ _ping cid + +dhtFindPeer :: Text -> IO () +dhtFindPeer cid = streamCall $ _dhtFindPeer cid + shutdown :: IO () shutdown = do res <- call $ _shutdown diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Stream.hs new file mode 100644 index 00000000..98daddcc --- /dev/null +++ b/src/Network/Ipfs/Api/Stream.hs @@ -0,0 +1,84 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE MultiParamTypeClasses #-} + +-- | +-- Module : Network.Ipfs.Api.Api +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Ipfs Stream API provider. +-- + +module Network.Ipfs.Api.Stream where + +import Control.Monad +import Data.Aeson +import Data.Int +import qualified Data.ByteString.Lazy.Char8() +import Data.Map() +import Data.Proxy +import qualified Data.Text as TextS +import Network.HTTP.Client() +import Servant.API +import Servant.Client.Streaming as S + +data PingObj = PingObj + { success :: Bool + , text :: TextS.Text + , time :: Int64 + } deriving (Show) + +data ResponseObj = ResponseObj + { addrs :: [TextS.Text] + , id :: TextS.Text + } deriving (Show) + +data DhtObj = DhtObj + { extra :: TextS.Text + , addid :: TextS.Text + , responses :: Maybe [ResponseObj] + , addrType :: Int + } deriving (Show) + +instance FromJSON PingObj where + parseJSON (Object o) = + PingObj <$> o .: "Success" + <*> o .: "Text" + <*> o .: "Time" + + parseJSON _ = mzero + +instance FromJSON DhtObj where + parseJSON (Object o) = + DhtObj <$> o .: "Extra" + <*> o .: "ID" + <*> o .: "Responses" + <*> o .: "Type" + + parseJSON _ = mzero + +instance FromJSON ResponseObj where + parseJSON (Object o) = + ResponseObj <$> o .: "Addrs" + <*> o .: "ID" + + parseJSON _ = mzero + + +type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO PingObj ) + :<|> "dht" :> "findpeer" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + +ipfsStreamApi :: Proxy IpfsStreamApi +ipfsStreamApi = Proxy + +_ping :: TextS.Text -> ClientM (SourceIO PingObj) +_dhtFindPeer :: TextS.Text -> ClientM (SourceIO DhtObj) + +_ping :<|> _dhtFindPeer = client ipfsStreamApi \ No newline at end of file From 84892c8156b67f2a8e93b3b3b9173c6a19417cdd Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sat, 24 Aug 2019 02:13:42 +0530 Subject: [PATCH 100/237] Added dhtFindProvs, dhtGet, dhtProvide, dhtQuery, pubsubLs and pubsubPeers functions --- src/Network/Ipfs/Api/Api.hs | 14 +++++++++++++- src/Network/Ipfs/Api/Ipfs.hs | 34 ++++++++++++++++++++++++++++++---- src/Network/Ipfs/Api/Stream.hs | 14 +++++++++++--- 3 files changed, 54 insertions(+), 8 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 729f7ef2..f9de58fa 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -231,6 +231,8 @@ data IdObj = IdObj data DnsObj = DnsObj { dnsPath :: TextS.Text } deriving (Show) +data PubsubObj = PubsubObj { pubsubStrings :: [TextS.Text] } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -516,6 +518,12 @@ instance FromJSON DnsObj where parseJSON _ = mzero +instance FromJSON PubsubObj where + parseJSON (Object o) = + PubsubObj <$> o .: "Strings" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -598,6 +606,8 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "id" :> Get '[JSON] IdObj :<|> "id" :> Capture "arg" TextS.Text :> Get '[JSON] IdObj :<|> "dns" :> Capture "arg" TextS.Text :> Get '[JSON] DnsObj + :<|> "pubsub" :> "ls" :> Get '[JSON] PubsubObj + :<|> "pubsub" :> "peers" :> Get '[JSON] PubsubObj :<|> "shutdown" :> Get '[JSON] NoContent ipfsApi :: Proxy IpfsApi @@ -648,6 +658,8 @@ _version :: ClientM VersionObj _id :: ClientM IdObj _idPeer :: TextS.Text -> ClientM IdObj _dns :: TextS.Text -> ClientM DnsObj +_pubsubLs :: ClientM PubsubObj +_pubsubPeers :: ClientM PubsubObj _shutdown :: ClientM NoContent _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> @@ -657,4 +669,4 @@ _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmC _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectRmLink :<|> _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> - _dns :<|> _shutdown = client ipfsApi + _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index fc080747..b2c4c377 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -40,11 +40,11 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca _objectNew, _objectGetLinks, _objectAddLink, _objectRmLink, _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, - _id, _idPeer, _dns, _shutdown, BlockObj, DagPutObj, ObjectObj, - ObjectLinksObj) + _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _shutdown, + BlockObj, DagPutObj, ObjectObj, ObjectLinksObj) import Network.Ipfs.Api.Multipart (AddObj) -import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer) +import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, _dhtQuery) call :: ClientM a -> IO (Either ServantError a) @@ -429,7 +429,33 @@ ping :: Text -> IO () ping cid = streamCall $ _ping cid dhtFindPeer :: Text -> IO () -dhtFindPeer cid = streamCall $ _dhtFindPeer cid +dhtFindPeer peerid = streamCall $ _dhtFindPeer peerid + +dhtFindProvs :: Text -> IO () +dhtFindProvs cid = streamCall $ _dhtFindProvs cid + +dhtGet :: Text -> IO () +dhtGet cid = streamCall $ _dhtGet cid + +dhtProvide :: Text -> IO () +dhtProvide cid = streamCall $ _dhtProvide cid + +dhtQuery :: Text -> IO () +dhtQuery peerId = streamCall $ _dhtQuery peerId + +pubsubLs :: IO () +pubsubLs = do + res <- call _pubsubLs + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +pubsubPeers :: IO () +pubsubPeers = do + res <- call _pubsubPeers + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v shutdown :: IO () shutdown = do diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Stream.hs index 98daddcc..8e67b4bc 100644 --- a/src/Network/Ipfs/Api/Stream.hs +++ b/src/Network/Ipfs/Api/Stream.hs @@ -36,13 +36,13 @@ data PingObj = PingObj } deriving (Show) data ResponseObj = ResponseObj - { addrs :: [TextS.Text] + { addrs :: Maybe [TextS.Text] , id :: TextS.Text } deriving (Show) data DhtObj = DhtObj { extra :: TextS.Text - , addid :: TextS.Text + , addrid :: TextS.Text , responses :: Maybe [ResponseObj] , addrType :: Int } deriving (Show) @@ -74,11 +74,19 @@ instance FromJSON ResponseObj where type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO PingObj ) :<|> "dht" :> "findpeer" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + :<|> "dht" :> "findprovs" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + :<|> "dht" :> "get" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + :<|> "dht" :> "provide" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + :<|> "dht" :> "query" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) ipfsStreamApi :: Proxy IpfsStreamApi ipfsStreamApi = Proxy _ping :: TextS.Text -> ClientM (SourceIO PingObj) _dhtFindPeer :: TextS.Text -> ClientM (SourceIO DhtObj) +_dhtFindProvs :: TextS.Text -> ClientM (SourceIO DhtObj) +_dhtGet :: TextS.Text -> ClientM (SourceIO DhtObj) +_dhtProvide :: TextS.Text -> ClientM (SourceIO DhtObj) +_dhtQuery :: TextS.Text -> ClientM (SourceIO DhtObj) -_ping :<|> _dhtFindPeer = client ipfsStreamApi \ No newline at end of file +_ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery = client ipfsStreamApi \ No newline at end of file From bfe72c14c7cb7fbd0736b8a26113c5fe7d73b94a Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sat, 24 Aug 2019 05:29:20 +0530 Subject: [PATCH 101/237] Added logLs, logLevel, logTail and repoVersion functions --- src/Network/Ipfs/Api/Api.hs | 34 ++++++++++++++++++++++++++++++++-- src/Network/Ipfs/Api/Ipfs.hs | 32 +++++++++++++++++++++++++++++--- src/Network/Ipfs/Api/Stream.hs | 8 +++++++- 3 files changed, 68 insertions(+), 6 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index f9de58fa..9f42c67c 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -231,7 +231,13 @@ data IdObj = IdObj data DnsObj = DnsObj { dnsPath :: TextS.Text } deriving (Show) -data PubsubObj = PubsubObj { pubsubStrings :: [TextS.Text] } deriving (Show) +data PubsubObj = PubsubObj { pubsubStrings :: [TextS.Text] } deriving (Show) + +data LogLsObj = LogLsObj { logLsStrings :: [TextS.Text] } deriving (Show) + +data LogLevelObj = LogLevelObj { message :: TextS.Text } deriving (Show) + +data RepoVersionObj = RepoVersionObj { repoVer :: TextS.Text } deriving (Show) instance FromJSON DirLink where parseJSON (Object o) = @@ -524,6 +530,24 @@ instance FromJSON PubsubObj where parseJSON _ = mzero +instance FromJSON LogLsObj where + parseJSON (Object o) = + LogLsObj <$> o .: "Strings" + + parseJSON _ = mzero + +instance FromJSON LogLevelObj where + parseJSON (Object o) = + LogLevelObj <$> o .: "Message" + + parseJSON _ = mzero + +instance FromJSON RepoVersionObj where + parseJSON (Object o) = + RepoVersionObj <$> o .: "Version" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -608,6 +632,9 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "dns" :> Capture "arg" TextS.Text :> Get '[JSON] DnsObj :<|> "pubsub" :> "ls" :> Get '[JSON] PubsubObj :<|> "pubsub" :> "peers" :> Get '[JSON] PubsubObj + :<|> "log" :> "ls" :> Get '[JSON] LogLsObj + :<|> "log" :> "level" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] LogLevelObj + :<|> "repo" :> "version" :> Get '[JSON] RepoVersionObj :<|> "shutdown" :> Get '[JSON] NoContent ipfsApi :: Proxy IpfsApi @@ -660,6 +687,9 @@ _idPeer :: TextS.Text -> ClientM IdObj _dns :: TextS.Text -> ClientM DnsObj _pubsubLs :: ClientM PubsubObj _pubsubPeers :: ClientM PubsubObj +_logLs :: ClientM LogLsObj +_logLevel :: TextS.Text -> Maybe TextS.Text -> ClientM LogLevelObj +_repoVersion :: ClientM RepoVersionObj _shutdown :: ClientM NoContent _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> @@ -669,4 +699,4 @@ _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmC _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectRmLink :<|> _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> - _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _shutdown = client ipfsApi + _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index b2c4c377..2340e063 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -40,11 +40,13 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca _objectNew, _objectGetLinks, _objectAddLink, _objectRmLink, _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, - _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _shutdown, - BlockObj, DagPutObj, ObjectObj, ObjectLinksObj) + _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _logLs, _logLevel, + _repoVersion, _shutdown, BlockObj, DagPutObj, ObjectObj, + ObjectLinksObj) import Network.Ipfs.Api.Multipart (AddObj) -import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, _dhtQuery) +import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, + _dhtQuery, _logTail) call :: ClientM a -> IO (Either ServantError a) @@ -457,6 +459,30 @@ pubsubPeers = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +logLs :: IO () +logLs = do + res <- call _logLs + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +logLevel :: Text -> Text -> IO () +logLevel subsystem level = do + res <- call $ _logLevel subsystem $ Just level + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +logTail :: IO () +logTail = streamCall $ _logTail + +repoVersion :: IO () +repoVersion = do + res <- call _repoVersion + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + shutdown :: IO () shutdown = do res <- call $ _shutdown diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Stream.hs index 8e67b4bc..7d823aa4 100644 --- a/src/Network/Ipfs/Api/Stream.hs +++ b/src/Network/Ipfs/Api/Stream.hs @@ -29,6 +29,10 @@ import Network.HTTP.Client() import Servant.API import Servant.Client.Streaming as S +import Network.Ipfs.Api.Api (IpfsText) + +type LogReturnType = TextS.Text + data PingObj = PingObj { success :: Bool , text :: TextS.Text @@ -78,6 +82,7 @@ type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFram :<|> "dht" :> "get" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) :<|> "dht" :> "provide" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) :<|> "dht" :> "query" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + :<|> "log" :> "tail" :> StreamGet NewlineFraming IpfsText ( SourceIO LogReturnType) ipfsStreamApi :: Proxy IpfsStreamApi ipfsStreamApi = Proxy @@ -88,5 +93,6 @@ _dhtFindProvs :: TextS.Text -> ClientM (SourceIO DhtObj) _dhtGet :: TextS.Text -> ClientM (SourceIO DhtObj) _dhtProvide :: TextS.Text -> ClientM (SourceIO DhtObj) _dhtQuery :: TextS.Text -> ClientM (SourceIO DhtObj) +_logTail :: ClientM (SourceIO LogReturnType) -_ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery = client ipfsStreamApi \ No newline at end of file +_ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery :<|> _logTail = client ipfsStreamApi \ No newline at end of file From ac1016b24ebafabc0909a89ad8442b6536c8a223 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sat, 24 Aug 2019 18:06:56 +0530 Subject: [PATCH 102/237] Added repoFsck, repoGc, repoVerify and keyList functions --- src/Network/Ipfs/Api/Api.hs | 38 ++++++++++++++++++++++++++++-- src/Network/Ipfs/Api/Ipfs.hs | 28 +++++++++++++++++++---- src/Network/Ipfs/Api/Stream.hs | 42 ++++++++++++++++++++++++++++++---- 3 files changed, 97 insertions(+), 11 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 9f42c67c..49adb9b3 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -97,7 +97,7 @@ data BitswapStatObj = BitswapStatObj , wantlist :: [WantlistObj] } deriving (Show) -data BitswapWLObj = BitswapWLObj { keys :: [WantlistObj] } deriving (Show) +data BitswapWLObj = BitswapWLObj { bitswapKeys :: [WantlistObj] } deriving (Show) data BitswapLedgerObj = BitswapLedgerObj { exchanged :: Int64 @@ -239,6 +239,15 @@ data LogLevelObj = LogLevelObj { message :: TextS.Text } deriving (Show) data RepoVersionObj = RepoVersionObj { repoVer :: TextS.Text } deriving (Show) +data RepoFsckObj = RepoFsckObj { repoMessage :: TextS.Text } deriving (Show) + +data KeyDetailsObj = KeyDetailsObj + { keyId :: TextS.Text + , keyName :: TextS.Text + } deriving (Show) + +data KeyObj = KeyObj { keys :: [KeyDetailsObj] } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -548,6 +557,26 @@ instance FromJSON RepoVersionObj where parseJSON _ = mzero +instance FromJSON RepoFsckObj where + parseJSON (Object o) = + RepoFsckObj <$> o .: "Message" + + parseJSON _ = mzero + + +instance FromJSON KeyDetailsObj where + parseJSON (Object o) = + KeyDetailsObj <$> o .: "Id" + <*> o .: "Name" + + parseJSON _ = mzero + +instance FromJSON KeyObj where + parseJSON (Object o) = + KeyObj <$> o .: "Keys" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -635,6 +664,8 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "log" :> "ls" :> Get '[JSON] LogLsObj :<|> "log" :> "level" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] LogLevelObj :<|> "repo" :> "version" :> Get '[JSON] RepoVersionObj + :<|> "repo" :> "fsck" :> Get '[JSON] RepoFsckObj + :<|> "key" :> "list" :> Get '[JSON] KeyObj :<|> "shutdown" :> Get '[JSON] NoContent ipfsApi :: Proxy IpfsApi @@ -690,6 +721,8 @@ _pubsubPeers :: ClientM PubsubObj _logLs :: ClientM LogLsObj _logLevel :: TextS.Text -> Maybe TextS.Text -> ClientM LogLevelObj _repoVersion :: ClientM RepoVersionObj +_repoFsck :: ClientM RepoFsckObj +_keyList :: ClientM KeyObj _shutdown :: ClientM NoContent _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> @@ -699,4 +732,5 @@ _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmC _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectRmLink :<|> _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> - _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> _shutdown = client ipfsApi + _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> + _repoFsck :<|> _keyList :<|> _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 2340e063..2a749af3 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -41,12 +41,12 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _logLs, _logLevel, - _repoVersion, _shutdown, BlockObj, DagPutObj, ObjectObj, - ObjectLinksObj) + _repoVersion, _repoFsck, _keyList, _shutdown, BlockObj, + DagPutObj, ObjectObj, ObjectLinksObj) import Network.Ipfs.Api.Multipart (AddObj) import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, - _dhtQuery, _logTail) + _dhtQuery, _logTail, _repoGc, _repoVerify) call :: ClientM a -> IO (Either ServantError a) @@ -474,7 +474,7 @@ logLevel subsystem level = do Right v -> print v logTail :: IO () -logTail = streamCall $ _logTail +logTail = streamCall _logTail repoVersion :: IO () repoVersion = do @@ -483,6 +483,26 @@ repoVersion = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +repoFsck :: IO () +repoFsck = do + res <- call _repoFsck + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +repoGc :: IO () +repoGc = streamCall _repoGc + +repoVerify :: IO () +repoVerify = streamCall _repoVerify + +keyList :: IO () +keyList = do + res <- call _keyList + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + shutdown :: IO () shutdown = do res <- call $ _shutdown diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Stream.hs index 7d823aa4..f821b8ae 100644 --- a/src/Network/Ipfs/Api/Stream.hs +++ b/src/Network/Ipfs/Api/Stream.hs @@ -45,10 +45,19 @@ data ResponseObj = ResponseObj } deriving (Show) data DhtObj = DhtObj - { extra :: TextS.Text - , addrid :: TextS.Text - , responses :: Maybe [ResponseObj] - , addrType :: Int + { extra :: TextS.Text + , addrid :: TextS.Text + , responses :: Maybe [ResponseObj] + , addrType :: Int + } deriving (Show) + +data RepoKeyObj = RepoKeyObj { repoSlash :: TextS.Text } deriving (Show) + +data RepoGcObj = RepoGcObj { repoKey :: RepoKeyObj } deriving (Show) + +data RepoVerifyObj = RepoVerifyObj + { msg :: TextS.Text + , progress :: Int } deriving (Show) instance FromJSON PingObj where @@ -75,6 +84,24 @@ instance FromJSON ResponseObj where parseJSON _ = mzero +instance FromJSON RepoKeyObj where + parseJSON (Object o) = + RepoKeyObj <$> o .: "/" + + parseJSON _ = mzero + +instance FromJSON RepoGcObj where + parseJSON (Object o) = + RepoGcObj <$> o .: "Key" + + parseJSON _ = mzero + +instance FromJSON RepoVerifyObj where + parseJSON (Object o) = + RepoVerifyObj <$> o .: "Msg" + <*> o .: "Progress" + + parseJSON _ = mzero type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO PingObj ) :<|> "dht" :> "findpeer" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) @@ -83,6 +110,8 @@ type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFram :<|> "dht" :> "provide" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) :<|> "dht" :> "query" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) :<|> "log" :> "tail" :> StreamGet NewlineFraming IpfsText ( SourceIO LogReturnType) + :<|> "repo" :> "gc" :> StreamGet NewlineFraming JSON ( SourceIO RepoGcObj) + :<|> "repo" :> "verify" :> StreamGet NewlineFraming JSON ( SourceIO RepoVerifyObj) ipfsStreamApi :: Proxy IpfsStreamApi ipfsStreamApi = Proxy @@ -94,5 +123,8 @@ _dhtGet :: TextS.Text -> ClientM (SourceIO DhtObj) _dhtProvide :: TextS.Text -> ClientM (SourceIO DhtObj) _dhtQuery :: TextS.Text -> ClientM (SourceIO DhtObj) _logTail :: ClientM (SourceIO LogReturnType) +_repoGc :: ClientM (SourceIO RepoGcObj) +_repoVerify :: ClientM (SourceIO RepoVerifyObj) -_ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery :<|> _logTail = client ipfsStreamApi \ No newline at end of file +_ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery :<|> + _logTail :<|> _repoGc :<|> _repoVerify = client ipfsStreamApi \ No newline at end of file From 841801f3d29ce2e87e333f63c6df19a985c3e4d2 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sun, 25 Aug 2019 05:07:58 +0530 Subject: [PATCH 103/237] Added keyGen, keyRename, keyRm and filesMkdir functions --- src/Network/Ipfs/Api/Api.hs | 37 +++++++++++++++++++++++++++++------- src/Network/Ipfs/Api/Ipfs.hs | 33 ++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 9 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 49adb9b3..d947fed2 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -248,6 +248,13 @@ data KeyDetailsObj = KeyDetailsObj data KeyObj = KeyObj { keys :: [KeyDetailsObj] } deriving (Show) +data KeyRenameObj = KeyRenameObj + { peerId :: TextS.Text + , now :: TextS.Text + , overwrite :: Bool + , was :: TextS.Text + } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -496,7 +503,6 @@ instance FromJSON StatsBwObj where parseJSON _ = mzero - instance FromJSON StatsRepoObj where parseJSON (Object o) = StatsRepoObj <$> o .: "NumObjects" @@ -577,6 +583,15 @@ instance FromJSON KeyObj where parseJSON _ = mzero +instance FromJSON KeyRenameObj where + parseJSON (Object o) = + KeyRenameObj <$> o .: "Id" + <*> o .: "Now" + <*> o .: "Overwrite" + <*> o .: "Was" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -597,14 +612,14 @@ instance MimeUnrender IpfsText TextS.Text where mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict --- | Defining a content type same as DagGetJSON -data DagGetJSON deriving Typeable +-- | Defining a content type same as IpfsJSON +data IpfsJSON deriving Typeable -instance Servant.API.Accept DagGetJSON where +instance Servant.API.Accept IpfsJSON where contentType _ = "application" M.// "json" -- | @left show . TextS.decodeUtf8' . toStrict@ -instance MimeUnrender DagGetJSON TextS.Text where +instance MimeUnrender IpfsJSON TextS.Text where mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict instance {-# OVERLAPPING #-} MimeUnrender JSON (Vec.Vector RefsObj) where @@ -634,7 +649,7 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "cid" :> "format" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj :<|> "block" :> "get" :> Capture "key" TextS.Text :> Get '[IpfsText] BlockReturnType :<|> "block" :> "stat" :> Capture "key" TextS.Text :> Get '[JSON] BlockObj - :<|> "dag" :> "get" :> Capture "ref" TextS.Text :> Get '[DagGetJSON] DagReturnType + :<|> "dag" :> "get" :> Capture "ref" TextS.Text :> Get '[IpfsJSON] DagReturnType :<|> "dag" :> "resolve" :> Capture "ref" TextS.Text :> Get '[JSON] DagResolveObj :<|> "config" :> Capture "ref" TextS.Text :> Get '[JSON] ConfigObj :<|> "config" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ConfigObj @@ -665,7 +680,11 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "log" :> "level" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] LogLevelObj :<|> "repo" :> "version" :> Get '[JSON] RepoVersionObj :<|> "repo" :> "fsck" :> Get '[JSON] RepoFsckObj + :<|> "key" :> "gen" :> Capture "arg" TextS.Text :> QueryParam "type" TextS.Text :> Get '[JSON] KeyDetailsObj :<|> "key" :> "list" :> Get '[JSON] KeyObj + :<|> "key" :> "rename" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] KeyRenameObj + :<|> "key" :> "rm" :> Capture "arg" TextS.Text :> Get '[JSON] KeyObj + :<|> "files" :> "mkdir" :> QueryParam "arg" TextS.Text :> Get '[IpfsJSON] NoContent :<|> "shutdown" :> Get '[JSON] NoContent ipfsApi :: Proxy IpfsApi @@ -722,7 +741,11 @@ _logLs :: ClientM LogLsObj _logLevel :: TextS.Text -> Maybe TextS.Text -> ClientM LogLevelObj _repoVersion :: ClientM RepoVersionObj _repoFsck :: ClientM RepoFsckObj +_keyGen :: TextS.Text -> (Maybe TextS.Text) -> ClientM KeyDetailsObj _keyList :: ClientM KeyObj +_keyRename :: TextS.Text -> (Maybe TextS.Text) -> ClientM KeyRenameObj +_keyRm :: TextS.Text -> ClientM KeyObj +_filesMkdir :: Maybe TextS.Text -> ClientM NoContent _shutdown :: ClientM NoContent _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> @@ -733,4 +756,4 @@ _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmC _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> - _repoFsck :<|> _keyList :<|> _shutdown = client ipfsApi + _repoFsck :<|> _keyGen :<|> _keyList :<|> _keyRename :<|> _keyRm :<|> _filesMkdir :<|> _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 2a749af3..8d237278 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -41,8 +41,9 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _logLs, _logLevel, - _repoVersion, _repoFsck, _keyList, _shutdown, BlockObj, - DagPutObj, ObjectObj, ObjectLinksObj) + _repoVersion, _repoFsck, _keyGen, _keyList, _keyRm, _keyRename, + _shutdown, _filesMkdir, BlockObj, DagPutObj, ObjectObj, + ObjectLinksObj) import Network.Ipfs.Api.Multipart (AddObj) import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, @@ -503,6 +504,34 @@ keyList = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +keyGen :: Text -> Text -> IO () +keyGen name keyType = do + res <- call $ _keyGen name (Just keyType) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +keyRename :: Text -> Text -> IO () +keyRename was now = do + res <- call $ _keyRename was $ Just now + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +keyRm :: Text -> IO () +keyRm name = do + res <- call $ _keyRm name + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +filesMkdir :: Text -> IO () +filesMkdir mfsPath = do + res <- call $ _filesMkdir $ Just mfsPath + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right _ -> print "The Directory has been created on the specified path." + shutdown :: IO () shutdown = do res <- call $ _shutdown From 320baae9fd5d1e20e7a67d189a826ae8d99bc20e Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sun, 25 Aug 2019 18:12:16 +0530 Subject: [PATCH 104/237] Added filesCp, filesRead, filesStat and filesRm functions --- src/Network/Ipfs/Api/Api.hs | 30 +++++++++++++++++++++++++++++- src/Network/Ipfs/Api/Ipfs.hs | 36 ++++++++++++++++++++++++++++++++---- 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index d947fed2..54568d5b 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -44,6 +44,7 @@ type GetReturnType = TextS.Text type BlockReturnType = TextS.Text type DagReturnType = TextS.Text type ObjectReturnType = TextS.Text +type FilesReadType = TextS.Text data DirLink = DirLink { name :: TextS.Text @@ -255,6 +256,14 @@ data KeyRenameObj = KeyRenameObj , was :: TextS.Text } deriving (Show) +data FilesStatObj = FilesStatObj + { fileObjectHash :: TextS.Text + , objectSize :: Int + , cumulativeObjectSize :: Int + , blocks :: Int + , objectType :: TextS.Text + } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -592,6 +601,16 @@ instance FromJSON KeyRenameObj where parseJSON _ = mzero +instance FromJSON FilesStatObj where + parseJSON (Object o) = + FilesStatObj <$> o .: "Hash" + <*> o .: "Size" + <*> o .: "CumulativeSize" + <*> o .: "Blocks" + <*> o .: "Type" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -684,7 +703,11 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "key" :> "list" :> Get '[JSON] KeyObj :<|> "key" :> "rename" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] KeyRenameObj :<|> "key" :> "rm" :> Capture "arg" TextS.Text :> Get '[JSON] KeyObj + :<|> "files" :> "cp" :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[IpfsJSON] NoContent :<|> "files" :> "mkdir" :> QueryParam "arg" TextS.Text :> Get '[IpfsJSON] NoContent + :<|> "files" :> "read" :> QueryParam "arg" TextS.Text :> Get '[IpfsText] FilesReadType + :<|> "files" :> "rm" :> QueryParam "arg" TextS.Text :> QueryParam "recursive" Bool :> Get '[JSON] NoContent + :<|> "files" :> "stat" :> QueryParam "arg" TextS.Text :> Get '[JSON] FilesStatObj :<|> "shutdown" :> Get '[JSON] NoContent ipfsApi :: Proxy IpfsApi @@ -745,7 +768,11 @@ _keyGen :: TextS.Text -> (Maybe TextS.Text) -> ClientM KeyDetailsObj _keyList :: ClientM KeyObj _keyRename :: TextS.Text -> (Maybe TextS.Text) -> ClientM KeyRenameObj _keyRm :: TextS.Text -> ClientM KeyObj +_filesCp :: Maybe TextS.Text -> Maybe TextS.Text -> ClientM NoContent _filesMkdir :: Maybe TextS.Text -> ClientM NoContent +_filesRead :: Maybe TextS.Text -> ClientM FilesReadType +_filesRm :: Maybe TextS.Text -> Maybe Bool -> ClientM NoContent +_filesStat :: Maybe TextS.Text -> ClientM FilesStatObj _shutdown :: ClientM NoContent _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> @@ -756,4 +783,5 @@ _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmC _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> - _repoFsck :<|> _keyGen :<|> _keyList :<|> _keyRename :<|> _keyRm :<|> _filesMkdir :<|> _shutdown = client ipfsApi + _repoFsck :<|> _keyGen :<|> _keyList :<|> _keyRename :<|> _keyRm :<|> _filesCp :<|> _filesMkdir :<|> + _filesRead :<|> _filesRm :<|> _filesStat :<|> _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 8d237278..993e7ad7 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -42,8 +42,8 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _logLs, _logLevel, _repoVersion, _repoFsck, _keyGen, _keyList, _keyRm, _keyRename, - _shutdown, _filesMkdir, BlockObj, DagPutObj, ObjectObj, - ObjectLinksObj) + _filesCp, _filesMkdir, _filesRead, _filesRm, _filesStat, _shutdown, BlockObj, DagPutObj, + ObjectObj, ObjectLinksObj) import Network.Ipfs.Api.Multipart (AddObj) import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, @@ -525,16 +525,44 @@ keyRm name = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +filesCp :: Text -> Text -> IO () +filesCp src dest = do + res <- call $ _filesCp (Just src) (Just dest) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right _ -> putStrLn "The object has been copied to the specified destination" + filesMkdir :: Text -> IO () filesMkdir mfsPath = do res <- call $ _filesMkdir $ Just mfsPath case res of Left err -> putStrLn $ "Error: " ++ show err - Right _ -> print "The Directory has been created on the specified path." + Right _ -> putStrLn "The Directory has been created on the specified path." + +filesRead :: Text -> IO () +filesRead mfsPath = do + res <- call $ _filesRead $ Just mfsPath + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> TextIO.putStr v + +filesStat :: Text -> IO () +filesStat mfsPath = do + res <- call $ _filesStat $ Just mfsPath + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +filesRm :: Text -> IO () +filesRm mfsPath = do + res <- call $ _filesRm (Just mfsPath) (Just True) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right _ -> putStrLn "The object has been removed." shutdown :: IO () shutdown = do res <- call $ _shutdown case res of Left err -> putStrLn $ "Error: " ++ show err - Right _ -> print "The daemon has been shutdown, your welcome." + Right _ -> putStrLn "The daemon has been shutdown, your welcome." From 5da2463ecadf28eb12a4423a1f8dbd808b1720fb Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 26 Aug 2019 02:10:36 +0530 Subject: [PATCH 105/237] Added filesChcidVer, filesFlush, filesLs, filesMv and filesWrite functions --- src/Network/Ipfs/Api/Api.hs | 49 +++++++++++++++++++++++++++++++++--- src/Network/Ipfs/Api/Ipfs.hs | 39 +++++++++++++++++++++++++++- 2 files changed, 83 insertions(+), 5 deletions(-) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 54568d5b..ce7ce4f1 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -264,6 +264,17 @@ data FilesStatObj = FilesStatObj , objectType :: TextS.Text } deriving (Show) +data FilesEntryObj = FilesEntryObj + { entryName :: TextS.Text + , entryType :: Int + , entrySize :: Int + , entryHash :: TextS.Text + } deriving (Show) + +data FilesLsObj = FilesLsObj { enteries :: [FilesEntryObj] } deriving (Show) + +data FilesFlushObj = FilesFlushObj { fileCid :: TextS.Text } deriving (Show) + instance FromJSON DirLink where parseJSON (Object o) = DirLink <$> o .: "Name" @@ -611,6 +622,27 @@ instance FromJSON FilesStatObj where parseJSON _ = mzero +instance FromJSON FilesEntryObj where + parseJSON (Object o) = + FilesEntryObj <$> o .: "Name" + <*> o .: "Type" + <*> o .: "Size" + <*> o .: "Hash" + + parseJSON _ = mzero + +instance FromJSON FilesLsObj where + parseJSON (Object o) = + FilesLsObj <$> o .: "Entries" + + parseJSON _ = mzero + +instance FromJSON FilesFlushObj where + parseJSON (Object o) = + FilesFlushObj <$> o .: "Cid" + + parseJSON _ = mzero + {-- instance FromJSON RefsObj where parseJSON (Objecto o) = @@ -703,8 +735,12 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "key" :> "list" :> Get '[JSON] KeyObj :<|> "key" :> "rename" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] KeyRenameObj :<|> "key" :> "rm" :> Capture "arg" TextS.Text :> Get '[JSON] KeyObj - :<|> "files" :> "cp" :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[IpfsJSON] NoContent - :<|> "files" :> "mkdir" :> QueryParam "arg" TextS.Text :> Get '[IpfsJSON] NoContent + :<|> "files" :> "chcid" :> QueryParam "arg" TextS.Text :> QueryParam "cid-version" Int :> Get '[JSON] NoContent + :<|> "files" :> "cp" :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] NoContent + :<|> "files" :> "flush" :> QueryParam "arg" TextS.Text :> Get '[JSON] FilesFlushObj + :<|> "files" :> "ls" :> QueryParam "arg" TextS.Text :> Get '[JSON] FilesLsObj + :<|> "files" :> "mkdir" :> QueryParam "arg" TextS.Text :> Get '[JSON] NoContent + :<|> "files" :> "mv" :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] NoContent :<|> "files" :> "read" :> QueryParam "arg" TextS.Text :> Get '[IpfsText] FilesReadType :<|> "files" :> "rm" :> QueryParam "arg" TextS.Text :> QueryParam "recursive" Bool :> Get '[JSON] NoContent :<|> "files" :> "stat" :> QueryParam "arg" TextS.Text :> Get '[JSON] FilesStatObj @@ -768,8 +804,12 @@ _keyGen :: TextS.Text -> (Maybe TextS.Text) -> ClientM KeyDetailsObj _keyList :: ClientM KeyObj _keyRename :: TextS.Text -> (Maybe TextS.Text) -> ClientM KeyRenameObj _keyRm :: TextS.Text -> ClientM KeyObj +_filesChcid :: Maybe TextS.Text -> Maybe Int -> ClientM NoContent _filesCp :: Maybe TextS.Text -> Maybe TextS.Text -> ClientM NoContent +_filesFlush :: Maybe TextS.Text -> ClientM FilesFlushObj +_filesLs :: Maybe TextS.Text -> ClientM FilesLsObj _filesMkdir :: Maybe TextS.Text -> ClientM NoContent +_filesMv :: Maybe TextS.Text -> Maybe TextS.Text -> ClientM NoContent _filesRead :: Maybe TextS.Text -> ClientM FilesReadType _filesRm :: Maybe TextS.Text -> Maybe Bool -> ClientM NoContent _filesStat :: Maybe TextS.Text -> ClientM FilesStatObj @@ -783,5 +823,6 @@ _cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmC _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> - _repoFsck :<|> _keyGen :<|> _keyList :<|> _keyRename :<|> _keyRm :<|> _filesCp :<|> _filesMkdir :<|> - _filesRead :<|> _filesRm :<|> _filesStat :<|> _shutdown = client ipfsApi + _repoFsck :<|> _keyGen :<|> _keyList :<|> _keyRename :<|> _keyRm :<|> _filesChcid :<|> _filesCp :<|> + _filesFlush :<|> _filesLs :<|> _filesMkdir :<|> _filesMv :<|> _filesRead :<|> _filesRm :<|> _filesStat :<|> + _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 993e7ad7..197cc88e 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -42,7 +42,7 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _logLs, _logLevel, _repoVersion, _repoFsck, _keyGen, _keyList, _keyRm, _keyRename, - _filesCp, _filesMkdir, _filesRead, _filesRm, _filesStat, _shutdown, BlockObj, DagPutObj, + _filesChcid, _filesCp, _filesFlush, _filesLs, _filesMkdir, _filesMv, _filesRead, _filesRm, _filesStat, _shutdown, BlockObj, DagPutObj, ObjectObj, ObjectLinksObj) import Network.Ipfs.Api.Multipart (AddObj) @@ -525,6 +525,13 @@ keyRm name = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +filesChcidVer :: Text -> Int -> IO () +filesChcidVer mfsPath cidVersion = do + res <- call $ _filesChcid (Just mfsPath) (Just cidVersion) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right _ -> putStrLn "The directory's cid version has been changed." + filesCp :: Text -> Text -> IO () filesCp src dest = do res <- call $ _filesCp (Just src) (Just dest) @@ -532,6 +539,20 @@ filesCp src dest = do Left err -> putStrLn $ "Error: " ++ show err Right _ -> putStrLn "The object has been copied to the specified destination" +filesFlush ::Text -> IO () +filesFlush mfsPath = do + res <- call $ _filesFlush $ Just mfsPath + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + +filesLs :: Text -> IO () +filesLs mfsPath = do + res <- call $ _filesLs $ Just mfsPath + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right v -> print v + filesMkdir :: Text -> IO () filesMkdir mfsPath = do res <- call $ _filesMkdir $ Just mfsPath @@ -539,6 +560,13 @@ filesMkdir mfsPath = do Left err -> putStrLn $ "Error: " ++ show err Right _ -> putStrLn "The Directory has been created on the specified path." +filesMv :: Text -> Text -> IO () +filesMv src dest = do + res <- call $ _filesMv (Just src) (Just dest) + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right _ -> putStrLn "The object has been moved to the specified destination" + filesRead :: Text -> IO () filesRead mfsPath = do res <- call $ _filesRead $ Just mfsPath @@ -560,6 +588,15 @@ filesRm mfsPath = do Left err -> putStrLn $ "Error: " ++ show err Right _ -> putStrLn "The object has been removed." +filesWrite :: Text -> Text -> Bool -> IO() +filesWrite mfsPath filePath toTruncate = do + responseVal <- multipartCall ((TextS.pack "http://localhost:5001/api/v0/files/write?arg=") + <> mfsPath <> (TextS.pack "&create=true") <> (TextS.pack "&truncate=") <> (TextS.pack $ show toTruncate) ) filePath + case statusCode $ Net.responseStatus responseVal of + 200 -> putStrLn "Config File Replaced Successfully with status code - " + _ -> putStrLn $ "Error occured with status code - " + print $ statusCode $ Net.responseStatus responseVal + shutdown :: IO () shutdown = do res <- call $ _shutdown From 23ba3b2e7206451de30dea9cbcbc449ea799d84a Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 26 Aug 2019 17:24:14 +0530 Subject: [PATCH 106/237] Updated refs and refsLocal functions and added function documentation --- package.yaml | 3 +- src/Network/Ethereum/Api/Provider.hs | 4 +- src/Network/Ipfs/Api/Api.hs | 30 +------ src/Network/Ipfs/Api/Ipfs.hs | 120 +++++++++++++++++++++------ src/Network/Ipfs/Api/Stream.hs | 20 ++++- 5 files changed, 119 insertions(+), 58 deletions(-) diff --git a/package.yaml b/package.yaml index 135036d3..51e798d7 100644 --- a/package.yaml +++ b/package.yaml @@ -58,7 +58,8 @@ dependencies: - http-media >= 0.7 && <0.8 - vector >= 0.12 && <0.13 - errors >= 2.2 && <2.4 - +- hspec >= 2.6 && <2.8 + ghc-options: - -funbox-strict-fields - -Wduplicate-exports diff --git a/src/Network/Ethereum/Api/Provider.hs b/src/Network/Ethereum/Api/Provider.hs index e4fc691b..d0e5eff2 100644 --- a/src/Network/Ethereum/Api/Provider.hs +++ b/src/Network/Ethereum/Api/Provider.hs @@ -76,7 +76,7 @@ runWeb3With manager provider f = do where changeManager jsonRpc = jsonRpc {jsonRpcManager = manager} --- | 'Web3' monad runner for http +-- | 'Web3' monad runner runWeb3' :: MonadIO m => Provider -> Web3 a @@ -95,7 +95,7 @@ runWeb3' (WSProvider host port) f = do liftIO $ WS.sendClose currentConnection ("Bye-" :: Text) return response --- | 'Web3' runner for default http provider +-- | 'Web3' runner for default Http provider runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index ce7ce4f1..8b3c4de8 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -19,7 +19,6 @@ module Network.Ipfs.Api.Api where import Control.Arrow (left) -import Control.Error (fmapL) import Control.Monad import Data.Aeson import Data.Int @@ -31,7 +30,6 @@ import Data.Proxy import qualified Data.Text as TextS import qualified Data.Text.Encoding as TextS import Data.Typeable -import qualified Data.Vector as Vec (fromList,Vector) import Network.HTTP.Client() import qualified Network.HTTP.Media as M ((//)) import Servant.API @@ -61,13 +59,6 @@ data DirObj = DirObj data LsObj = LsObj { objs :: [DirObj] } deriving (Show) - -data RefsObj = RefsObj TextS.Text deriving (Show) -{-- { error :: TextS.Text - , ref :: TextS.Text - } deriving (Show) ---} - data SwarmStreamObj = SwarmStreamObj { protocol :: TextS.Text } deriving (Show) data SwarmPeerObj = SwarmPeerObj @@ -643,15 +634,6 @@ instance FromJSON FilesFlushObj where parseJSON _ = mzero -{-- -instance FromJSON RefsObj where - parseJSON (Objecto o) = - RefsObj <$> o .: "Err" - <*> o .: "Ref" - - parseJSON _ = mzero ---} - -- | Defining a content type same as PlainText without charset data IpfsText deriving Typeable @@ -672,17 +654,11 @@ instance Servant.API.Accept IpfsJSON where -- | @left show . TextS.decodeUtf8' . toStrict@ instance MimeUnrender IpfsJSON TextS.Text where mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict - -instance {-# OVERLAPPING #-} MimeUnrender JSON (Vec.Vector RefsObj) where - mimeUnrender _ bs = do - t <- fmapL show (TextS.decodeUtf8' (toStrict bs)) - pure (Vec.fromList (map RefsObj (map TextS.pack (lines $ TextS.unpack t)))) + type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnType :<|> "ls" :> Capture "arg" TextS.Text :> Get '[JSON] LsObj :<|> "get" :> Capture "arg" TextS.Text :> Get '[IpfsText] GetReturnType - :<|> "refs" :> Capture "arg" TextS.Text :> Get '[JSON] (Vec.Vector RefsObj) - :<|> "refs" :> "local" :> Get '[JSON] (Vec.Vector RefsObj) :<|> "swarm" :> "peers" :> Get '[JSON] SwarmPeersObj :<|> "swarm" :> "connect" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj :<|> "swarm" :> "disconnect" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj @@ -752,8 +728,6 @@ ipfsApi = Proxy _cat :: TextS.Text -> ClientM CatReturnType _ls :: TextS.Text -> ClientM LsObj _get :: TextS.Text -> ClientM GetReturnType -_refs :: TextS.Text -> ClientM (Vec.Vector RefsObj) -_refsLocal :: ClientM (Vec.Vector RefsObj) _swarmPeers :: ClientM SwarmPeersObj _swarmConnect :: Maybe TextS.Text -> ClientM SwarmObj _swarmDisconnect :: Maybe TextS.Text -> ClientM SwarmObj @@ -815,7 +789,7 @@ _filesRm :: Maybe TextS.Text -> Maybe Bool -> ClientM NoContent _filesStat :: Maybe TextS.Text -> ClientM FilesStatObj _shutdown :: ClientM NoContent -_cat :<|> _ls :<|> _get :<|> _refs :<|> _refsLocal :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> +_cat :<|> _ls :<|> _get :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> _swarmFilters :<|> _swarmFilterAdd :<|> _swarmFilterRm :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 197cc88e..86672f14 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -31,7 +31,7 @@ import Servant.Client import qualified Servant.Client.Streaming as S import Servant.Types.SourceT (SourceT, foreach) -import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLocal, _swarmPeers, _swarmConnect, +import Network.Ipfs.Api.Api (_cat, _ls, _get, _swarmPeers, _swarmConnect, _swarmDisconnect, _swarmFilterAdd, _swarmFilters, _swarmFilterRm, _bitswapStat, _bitswapWL, _bitswapLedger, _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, @@ -42,19 +42,21 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _refs, _refsLoca _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _logLs, _logLevel, _repoVersion, _repoFsck, _keyGen, _keyList, _keyRm, _keyRename, - _filesChcid, _filesCp, _filesFlush, _filesLs, _filesMkdir, _filesMv, _filesRead, _filesRm, _filesStat, _shutdown, BlockObj, DagPutObj, - ObjectObj, ObjectLinksObj) + _filesChcid, _filesCp, _filesFlush, _filesLs, _filesMkdir, + _filesMv, _filesRead, _filesRm, _filesStat, _shutdown, + BlockObj, DagPutObj, ObjectObj, ObjectLinksObj, KeyDetailsObj) import Network.Ipfs.Api.Multipart (AddObj) import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, - _dhtQuery, _logTail, _repoGc, _repoVerify) - + _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal) +-- | Regular Call function call :: ClientM a -> IO (Either ServantError a) call func = do manager' <- newManager defaultManagerSettings runClientM func (mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) +-- | Call function for Streams. streamCall :: Show a => S.ClientM (SourceT IO a) -> IO() streamCall func = do manager' <- newManager defaultManagerSettings @@ -62,6 +64,7 @@ streamCall func = do Left err -> putStrLn $ "Error: " ++ show err Right rs -> foreach fail print rs +-- | Call function for ‘multipart/form-data’. multipartCall :: Text -> Text -> IO (Net.Response BS.ByteString) multipartCall uri filePath = do reqManager <- newManager defaultManagerSettings @@ -71,6 +74,7 @@ multipartCall uri filePath = do where form = [ partFileSource "file" $ TextS.unpack filePath ] +-- | Show IPFS object data. cat :: Text -> IO () cat hash = do res <- call $ _cat hash @@ -78,11 +82,13 @@ cat hash = do Left err -> putStrLn $ "Error: " ++ show err Right v -> TextIO.putStr v +-- | Add a file or directory to ipfs. add :: Text -> IO() add filePath = do responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/add") filePath print (decode (Net.responseBody responseVal) :: Maybe AddObj) +-- | List directory contents for Unix filesystem objects. ls :: Text -> IO () ls hash = do res <- call $ _ls hash @@ -90,6 +96,7 @@ ls hash = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Download IPFS objects. get :: Text -> IO () get hash = do res <- call $ _get hash @@ -98,20 +105,15 @@ get hash = do Right v -> do Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ TextS.encodeUtf8 v print "The content has been stored in getResponseDirectory." +-- | List links (references) from an object. refs :: Text -> IO () -refs hash = do - res <- call $ _refs hash - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +refs hash = streamCall $ _refs hash +-- | List all local references. refsLocal :: IO () -refsLocal = do - res <- call _refsLocal - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +refsLocal = streamCall _refsLocal +-- | List peers with open connections. swarmPeers :: IO () swarmPeers = do res <- call _swarmPeers @@ -119,7 +121,7 @@ swarmPeers = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v --- | peerId has to be of the format - /ipfs/id +-- | Open connection to a given address. 'peerId' has to be of the format - /ipfs/id swarmConnect :: Text -> IO () swarmConnect peerId = do res <- call $ _swarmConnect (Just peerId) @@ -127,7 +129,7 @@ swarmConnect peerId = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v --- | peerId has to be of the format - /ipfs/id +-- | Close connection to a given address. 'peerId' has to be of the format - /ipfs/id swarmDisconnect :: Text -> IO () swarmDisconnect peerId = do res <- call $ _swarmDisconnect (Just peerId) @@ -135,6 +137,7 @@ swarmDisconnect peerId = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Manipulate address filters. swarmFilters :: IO () swarmFilters = do res <- call _swarmFilters @@ -142,7 +145,7 @@ swarmFilters = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v --- | peerId has to be of the format - /ip4/{IP addr of peer}/ipcidr/{ip network prefix} +-- | Add an address filter. 'peerId' has to be of the format - /ip4/{IP addr of peer}/ipcidr/{ip network prefix} swarmFilterAdd :: Text -> IO () swarmFilterAdd filterParam = do res <- call $ _swarmFilterAdd (Just filterParam) @@ -150,6 +153,7 @@ swarmFilterAdd filterParam = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Remove an address filter. swarmFilterRm :: Text -> IO () swarmFilterRm filterParam = do res <- call $ _swarmFilterRm (Just filterParam) @@ -157,6 +161,7 @@ swarmFilterRm filterParam = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | 'Show some diagnostic information on the bitswap agent. bitswapStat :: IO () bitswapStat = do res <- call _bitswapStat @@ -164,6 +169,7 @@ bitswapStat = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Show blocks currently on the wantlist. bitswapWL :: IO () bitswapWL = do res <- call _bitswapWL @@ -171,6 +177,7 @@ bitswapWL = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Show the current ledger for a peer. bitswapLedger :: Text -> IO () bitswapLedger peerId = do res <- call $ _bitswapLedger peerId @@ -178,6 +185,7 @@ bitswapLedger peerId = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Trigger reprovider. bitswapReprovide :: IO () bitswapReprovide = do res <- call $ _bitswapReprovide @@ -185,6 +193,7 @@ bitswapReprovide = do Left err -> putStrLn $ "Error: " ++ show err Right v -> TextIO.putStr v +-- | List available multibase encodings. cidBases :: IO () cidBases = do res <- call $ _cidBases @@ -192,6 +201,7 @@ cidBases = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | List available CID codecs. cidCodecs :: IO () cidCodecs = do res <- call $ _cidCodecs @@ -199,6 +209,7 @@ cidCodecs = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | List available multihashes. cidHashes :: IO () cidHashes = do res <- call $ _cidHashes @@ -206,6 +217,7 @@ cidHashes = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Convert CIDs to Base32 CID version 1. cidBase32 :: Text -> IO () cidBase32 hash = do res <- call $ _cidBase32 hash @@ -213,6 +225,7 @@ cidBase32 hash = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Format and convert a CID in various useful ways. cidFormat :: Text-> IO () cidFormat hash = do res <- call $ _cidFormat hash @@ -220,6 +233,7 @@ cidFormat hash = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Get a raw IPFS block. blockGet :: Text -> IO () blockGet key = do res <- call $ _blockGet key @@ -227,11 +241,13 @@ blockGet key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> TextIO.putStr v +-- | Store input as an IPFS block. blockPut :: Text -> IO() blockPut filePath = do responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/block/put") filePath print (decode (Net.responseBody responseVal) :: Maybe BlockObj) +-- | Print information of a raw IPFS block. blockStat :: Text -> IO () blockStat key = do res <- call $ _blockStat key @@ -239,6 +255,7 @@ blockStat key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Get a dag node from ipfs. dagGet :: Text -> IO () dagGet ref = do res <- call $ _dagGet ref @@ -246,6 +263,7 @@ dagGet ref = do Left err -> putStrLn $ "Error: " ++ show err Right v -> TextIO.putStr v +-- | Resolve ipld block. dagResolve :: Text -> IO () dagResolve ref = do res <- call $ _dagResolve ref @@ -253,11 +271,13 @@ dagResolve ref = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Add a dag node to ipfs. dagPut :: Text -> IO() dagPut filePath = do responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/dag/put") filePath print (decode (Net.responseBody responseVal) :: Maybe DagPutObj) +-- | Get ipfs config values. configGet :: Text -> IO () configGet key = do res <- call $ _configGet key @@ -265,6 +285,7 @@ configGet key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Set ipfs config values. configSet :: Text -> Text -> IO () configSet key value = do res <- call $ _configSet key $ Just value @@ -272,6 +293,7 @@ configSet key value = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Replace the config with the file at . configReplace :: Text -> IO() configReplace filePath = do responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/config/replace") filePath @@ -280,6 +302,7 @@ configReplace filePath = do _ -> putStrLn $ "Error occured with status code - " print $ statusCode $ Net.responseStatus responseVal +-- | Output the raw bytes of an IPFS object. objectData :: Text -> IO () objectData key = do res <- call $ _objectData key @@ -287,6 +310,7 @@ objectData key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> TextIO.putStr v +-- | Create a new object from an ipfs template. objectNew :: IO () objectNew = do res <- call _objectNew @@ -294,6 +318,7 @@ objectNew = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Output the links pointed to by the specified object. objectGetLinks :: Text -> IO () objectGetLinks key = do res <- call $ _objectGetLinks key @@ -301,6 +326,7 @@ objectGetLinks key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Add a Merkle-link to the given object and return the hash of the result. objectAddLink :: Text -> Text -> Text -> IO () objectAddLink hash name key = do res <- call $ _objectAddLink hash (Just name) (Just key) @@ -308,6 +334,7 @@ objectAddLink hash name key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Remove a Merkle-link from the given object and return the hash of the result. objectRmLink :: Text -> Text -> IO () objectRmLink key name = do res <- call $ _objectRmLink key (Just name) @@ -315,16 +342,19 @@ objectRmLink key name = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Append data to what already exists in the data segment in the given object. objectAppendData :: Text -> Text -> IO() objectAppendData key filePath = do responseVal <- multipartCall ( ( TextS.pack "http://localhost:5001/api/v0/object/patch/append-data?arg=" ) <> key) filePath print (decode ( Net.responseBody responseVal) :: Maybe ObjectLinksObj) +-- | Set the data field of an IPFS object. objectSetData :: Text -> Text -> IO() objectSetData key filePath = do responseVal <- multipartCall ( ( TextS.pack "http://localhost:5001/api/v0/object/patch/set-data?arg=" ) <>key) filePath print (decode ( Net.responseBody responseVal) :: Maybe ObjectLinksObj) +-- | Get and serialize the DAG node named by key. objectGet :: Text -> IO () objectGet key = do res <- call $ _objectGet key @@ -332,6 +362,7 @@ objectGet key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | 'Display the diff between two ipfs objects. objectDiff :: Text -> Text -> IO () objectDiff firstKey secondKey = do res <- call $ _objectDiff firstKey (Just secondKey) @@ -339,11 +370,13 @@ objectDiff firstKey secondKey = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Store input as a DAG object, print its key. objectPut :: Text -> IO() objectPut filePath = do responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/object/put") filePath print (decode ( Net.responseBody responseVal) :: Maybe ObjectObj) +-- | Get stats for the DAG node named by key. objectStat :: Text -> IO () objectStat key = do res <- call $ _objectStat key @@ -351,6 +384,7 @@ objectStat key = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Pin objects to local storage. pinAdd :: Text -> IO () pinAdd pinPath = do res <- call $ _pinAdd pinPath @@ -358,6 +392,7 @@ pinAdd pinPath = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Remove pinned objects from local storage. pinRemove :: Text -> IO () pinRemove pinPath = do res <- call $ _pinRemove pinPath @@ -365,6 +400,7 @@ pinRemove pinPath = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Add peers to the bootstrap list. bootstrapAdd :: Text -> IO () bootstrapAdd peerId = do res <- call $ _bootstrapAdd (Just peerId) @@ -372,6 +408,7 @@ bootstrapAdd peerId = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Show peers in the bootstrap list. bootstrapList :: IO () bootstrapList = do res <- call $ _bootstrapList @@ -379,6 +416,7 @@ bootstrapList = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Remove peers from the bootstrap list. bootstrapRM :: Text -> IO () bootstrapRM peerId = do res <- call $ _bootstrapRM (Just peerId) @@ -386,6 +424,7 @@ bootstrapRM peerId = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Print ipfs bandwidth information. statsBw :: IO () statsBw = do res <- call $ _statsBw @@ -393,6 +432,7 @@ statsBw = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Get stats for the currently used repo. statsRepo :: IO () statsRepo = do res <- call $ _statsRepo @@ -400,6 +440,7 @@ statsRepo = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Show ipfs version information. version :: IO () version = do res <- call $ _version @@ -407,6 +448,7 @@ version = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Show ipfs node id info. id :: IO () id = do res <- call $ _id @@ -414,6 +456,7 @@ id = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Show ipfs node id info of the given peerId. idPeer :: Text -> IO () idPeer peerId = do res <- call $ _idPeer peerId @@ -421,6 +464,7 @@ idPeer peerId = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Resolve DNS links. dns :: Text -> IO () dns name = do res <- call $ _dns name @@ -428,24 +472,31 @@ dns name = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Send echo request packets to IPFS hosts. ping :: Text -> IO () ping cid = streamCall $ _ping cid +-- | Find the multiaddresses associated with the given peerId. dhtFindPeer :: Text -> IO () -dhtFindPeer peerid = streamCall $ _dhtFindPeer peerid +dhtFindPeer peerId = streamCall $ _dhtFindPeer peerId +-- | Find peers that can provide a specific value, given a key. dhtFindProvs :: Text -> IO () dhtFindProvs cid = streamCall $ _dhtFindProvs cid +-- | 'Given a key, query the routing system for its best value. dhtGet :: Text -> IO () dhtGet cid = streamCall $ _dhtGet cid +-- | 'Announce to the network that you are providing given values. dhtProvide :: Text -> IO () dhtProvide cid = streamCall $ _dhtProvide cid +-- | Find the closest Peer IDs to a given peerID by querying the DHT. dhtQuery :: Text -> IO () dhtQuery peerId = streamCall $ _dhtQuery peerId +-- | List subscribed topics by name. pubsubLs :: IO () pubsubLs = do res <- call _pubsubLs @@ -453,6 +504,7 @@ pubsubLs = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | List peers we are currently pubsubbing with. pubsubPeers :: IO () pubsubPeers = do res <- call _pubsubPeers @@ -460,6 +512,7 @@ pubsubPeers = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | List the logging subsystems. logLs :: IO () logLs = do res <- call _logLs @@ -467,6 +520,7 @@ logLs = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Change the logging level. logLevel :: Text -> Text -> IO () logLevel subsystem level = do res <- call $ _logLevel subsystem $ Just level @@ -474,9 +528,11 @@ logLevel subsystem level = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Read the event log. logTail :: IO () logTail = streamCall _logTail +-- | Show the repo version. repoVersion :: IO () repoVersion = do res <- call _repoVersion @@ -484,6 +540,7 @@ repoVersion = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Remove repo lockfiles. repoFsck :: IO () repoFsck = do res <- call _repoFsck @@ -491,12 +548,15 @@ repoFsck = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Perform a garbage collection sweep on the repo. repoGc :: IO () repoGc = streamCall _repoGc +-- | Verify all blocks in repo are not corrupted. repoVerify :: IO () repoVerify = streamCall _repoVerify +-- | 'List all local keypairs. keyList :: IO () keyList = do res <- call _keyList @@ -504,13 +564,11 @@ keyList = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v -keyGen :: Text -> Text -> IO () -keyGen name keyType = do - res <- call $ _keyGen name (Just keyType) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +-- | Create a new keypair. +keyGen :: Text -> Text -> IO (Either ServantError KeyDetailsObj) +keyGen name keyType = call $ _keyGen name (Just keyType) +-- | Rename a keypair. keyRename :: Text -> Text -> IO () keyRename was now = do res <- call $ _keyRename was $ Just now @@ -518,6 +576,7 @@ keyRename was now = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Remove a keypair. keyRm :: Text -> IO () keyRm name = do res <- call $ _keyRm name @@ -525,6 +584,7 @@ keyRm name = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Change the cid version or hash function of the root node of a given mfsPath. filesChcidVer :: Text -> Int -> IO () filesChcidVer mfsPath cidVersion = do res <- call $ _filesChcid (Just mfsPath) (Just cidVersion) @@ -532,6 +592,7 @@ filesChcidVer mfsPath cidVersion = do Left err -> putStrLn $ "Error: " ++ show err Right _ -> putStrLn "The directory's cid version has been changed." +-- | Copy files into mfs. filesCp :: Text -> Text -> IO () filesCp src dest = do res <- call $ _filesCp (Just src) (Just dest) @@ -539,6 +600,7 @@ filesCp src dest = do Left err -> putStrLn $ "Error: " ++ show err Right _ -> putStrLn "The object has been copied to the specified destination" +-- | Flush a given path's data to disk. filesFlush ::Text -> IO () filesFlush mfsPath = do res <- call $ _filesFlush $ Just mfsPath @@ -546,6 +608,7 @@ filesFlush mfsPath = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | List directories in the local mutable namespace. filesLs :: Text -> IO () filesLs mfsPath = do res <- call $ _filesLs $ Just mfsPath @@ -553,6 +616,7 @@ filesLs mfsPath = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Make directories. filesMkdir :: Text -> IO () filesMkdir mfsPath = do res <- call $ _filesMkdir $ Just mfsPath @@ -560,6 +624,7 @@ filesMkdir mfsPath = do Left err -> putStrLn $ "Error: " ++ show err Right _ -> putStrLn "The Directory has been created on the specified path." +-- | Move files. filesMv :: Text -> Text -> IO () filesMv src dest = do res <- call $ _filesMv (Just src) (Just dest) @@ -567,6 +632,7 @@ filesMv src dest = do Left err -> putStrLn $ "Error: " ++ show err Right _ -> putStrLn "The object has been moved to the specified destination" +-- | Read a file in a given mfs. filesRead :: Text -> IO () filesRead mfsPath = do res <- call $ _filesRead $ Just mfsPath @@ -574,6 +640,7 @@ filesRead mfsPath = do Left err -> putStrLn $ "Error: " ++ show err Right v -> TextIO.putStr v +-- | Display file status. filesStat :: Text -> IO () filesStat mfsPath = do res <- call $ _filesStat $ Just mfsPath @@ -581,6 +648,7 @@ filesStat mfsPath = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Remove a file. filesRm :: Text -> IO () filesRm mfsPath = do res <- call $ _filesRm (Just mfsPath) (Just True) @@ -588,6 +656,7 @@ filesRm mfsPath = do Left err -> putStrLn $ "Error: " ++ show err Right _ -> putStrLn "The object has been removed." +-- | Write to a mutable file in a given filesystem. filesWrite :: Text -> Text -> Bool -> IO() filesWrite mfsPath filePath toTruncate = do responseVal <- multipartCall ((TextS.pack "http://localhost:5001/api/v0/files/write?arg=") @@ -597,6 +666,7 @@ filesWrite mfsPath filePath toTruncate = do _ -> putStrLn $ "Error occured with status code - " print $ statusCode $ Net.responseStatus responseVal +-- | Shut down the ipfs daemon. shutdown :: IO () shutdown = do res <- call $ _shutdown diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Stream.hs index f821b8ae..76aefe4d 100644 --- a/src/Network/Ipfs/Api/Stream.hs +++ b/src/Network/Ipfs/Api/Stream.hs @@ -60,6 +60,11 @@ data RepoVerifyObj = RepoVerifyObj , progress :: Int } deriving (Show) +data RefsObj = RefsObj + { error :: TextS.Text + , ref :: TextS.Text + } deriving (Show) + instance FromJSON PingObj where parseJSON (Object o) = PingObj <$> o .: "Success" @@ -103,6 +108,13 @@ instance FromJSON RepoVerifyObj where parseJSON _ = mzero +instance FromJSON RefsObj where + parseJSON (Object o) = + RefsObj <$> o .: "Err" + <*> o .: "Ref" + + parseJSON _ = mzero + type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO PingObj ) :<|> "dht" :> "findpeer" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) :<|> "dht" :> "findprovs" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) @@ -112,7 +124,9 @@ type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFram :<|> "log" :> "tail" :> StreamGet NewlineFraming IpfsText ( SourceIO LogReturnType) :<|> "repo" :> "gc" :> StreamGet NewlineFraming JSON ( SourceIO RepoGcObj) :<|> "repo" :> "verify" :> StreamGet NewlineFraming JSON ( SourceIO RepoVerifyObj) - + :<|> "refs" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON (SourceIO RefsObj) + :<|> "refs" :> "local" :> StreamGet NewlineFraming JSON (SourceIO RefsObj) + ipfsStreamApi :: Proxy IpfsStreamApi ipfsStreamApi = Proxy @@ -125,6 +139,8 @@ _dhtQuery :: TextS.Text -> ClientM (SourceIO DhtObj) _logTail :: ClientM (SourceIO LogReturnType) _repoGc :: ClientM (SourceIO RepoGcObj) _repoVerify :: ClientM (SourceIO RepoVerifyObj) +_refs :: TextS.Text -> ClientM (SourceIO RefsObj) +_refsLocal :: ClientM (SourceIO RefsObj) _ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery :<|> - _logTail :<|> _repoGc :<|> _repoVerify = client ipfsStreamApi \ No newline at end of file + _logTail :<|> _repoGc :<|> _repoVerify :<|> _refs :<|> _refsLocal = client ipfsStreamApi \ No newline at end of file From 587abdc182ca6479e4dd437f418f84b4815421d8 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 26 Aug 2019 19:18:00 +0530 Subject: [PATCH 107/237] Updated Key functions and added tests for key functions --- src/Network/Ipfs/Api/Api.hs | 2 +- src/Network/Ipfs/Api/Ipfs.hs | 26 ++++---------- src/Network/Ipfs/Tests/IpfsTests.hs | 54 +++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 src/Network/Ipfs/Tests/IpfsTests.hs diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 8b3c4de8..a2f773d2 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -236,7 +236,7 @@ data RepoFsckObj = RepoFsckObj { repoMessage :: TextS.Text } deriving (Show) data KeyDetailsObj = KeyDetailsObj { keyId :: TextS.Text , keyName :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data KeyObj = KeyObj { keys :: [KeyDetailsObj] } deriving (Show) diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 86672f14..f1005631 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -44,7 +44,7 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _swarmPeers, _sw _repoVersion, _repoFsck, _keyGen, _keyList, _keyRm, _keyRename, _filesChcid, _filesCp, _filesFlush, _filesLs, _filesMkdir, _filesMv, _filesRead, _filesRm, _filesStat, _shutdown, - BlockObj, DagPutObj, ObjectObj, ObjectLinksObj, KeyDetailsObj) + BlockObj, DagPutObj, ObjectObj, ObjectLinksObj, KeyDetailsObj, KeyRenameObj, KeyObj) import Network.Ipfs.Api.Multipart (AddObj) import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, @@ -557,32 +557,20 @@ repoVerify :: IO () repoVerify = streamCall _repoVerify -- | 'List all local keypairs. -keyList :: IO () -keyList = do - res <- call _keyList - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +keyList :: IO (Either ServantError KeyObj) +keyList = call _keyList -- | Create a new keypair. keyGen :: Text -> Text -> IO (Either ServantError KeyDetailsObj) keyGen name keyType = call $ _keyGen name (Just keyType) -- | Rename a keypair. -keyRename :: Text -> Text -> IO () -keyRename was now = do - res <- call $ _keyRename was $ Just now - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +keyRename :: Text -> Text -> IO (Either ServantError KeyRenameObj) +keyRename was now = call $ _keyRename was $ Just now -- | Remove a keypair. -keyRm :: Text -> IO () -keyRm name = do - res <- call $ _keyRm name - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +keyRm :: Text -> IO (Either ServantError KeyObj) +keyRm name = call $ _keyRm name -- | Change the cid version or hash function of the root node of a given mfsPath. filesChcidVer :: Text -> Int -> IO () diff --git a/src/Network/Ipfs/Tests/IpfsTests.hs b/src/Network/Ipfs/Tests/IpfsTests.hs new file mode 100644 index 00000000..73d3e386 --- /dev/null +++ b/src/Network/Ipfs/Tests/IpfsTests.hs @@ -0,0 +1,54 @@ + +-- | +-- Module : Network.Ipfs.Test.IpfsTest.hs +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Module containing Ipfs command functions. +-- + +import Test.Hspec +import Test.QuickCheck +import Control.Exception (evaluate) +import Data.Text as TextS + +import Network.Ipfs.Api.Api (KeyDetailsObj(..), KeyObj(..)) +import Network.Ipfs.Api.Ipfs (keyGen, keyList, keyRm) + +main :: IO () +main = hspec $ do + describe "keyGen" $ do + it "should return the given key name in its response" $ do + res <- keyGen (pack "TestA") (pack "rsa") + ( case res of + Left err -> (pack ("Error: " ++ show err)) + Right v -> keyName v ) `shouldBe` (pack "TestA") + + it "KeyDetailsObj returned by KeyGen should be present in the KeyObj's list returned returned by KeyList" $ do + resGen <- keyGen (pack "TestB") (pack "rsa") + resList <- keyList + (case resList of + Left _ -> [KeyDetailsObj (pack "Incorrect") ((pack "Incorrect"))] + Right v -> keys v ) `shouldContain` ( case resGen of + Left _ -> [KeyDetailsObj (pack "More Incorrect") ((pack "MORE Incorrect"))] + Right v -> [v] ) + + describe "keyRm" $ do + it "should return the given key name in its response" $ do + res <- keyRm (pack "TestA") + ( case res of + Left err -> (pack ("Error: " ++ show err)) + Right v -> keyName $ Prelude.head $ keys v ) `shouldBe` (pack "TestA") + + it "KeyDetailsObj returned by KeyRm should not be present in the KeyObj's list returned returned by KeyList" $ do + resRm <- keyRm (pack "TestB") + resList <- keyList + (case resList of + Left _ -> [KeyDetailsObj (pack "Incorrect") ((pack "Incorrect"))] + Right v -> keys v ) `shouldNotContain` ( case resRm of + Left _ -> [KeyDetailsObj (pack "More Incorrect") ((pack "MORE Incorrect"))] + Right v -> keys v ) \ No newline at end of file From b4513660b378d130b7c7e283c6f732047e35bd80 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 26 Aug 2019 22:30:12 +0530 Subject: [PATCH 108/237] Updated Api.hs and added pubsubPublish and pubsubSubscribe functions --- package.yaml | 1 - src/Network/Ipfs/Api/Api.hs | 96 +++++++++++++++-------------- src/Network/Ipfs/Api/Ipfs.hs | 16 ++++- src/Network/Ipfs/Api/Multipart.hs | 2 +- src/Network/Ipfs/Api/Stream.hs | 37 ++++++++--- src/Network/Ipfs/Tests/IpfsTests.hs | 4 +- 6 files changed, 95 insertions(+), 61 deletions(-) diff --git a/package.yaml b/package.yaml index 51e798d7..45643234 100644 --- a/package.yaml +++ b/package.yaml @@ -56,7 +56,6 @@ dependencies: - servant-client >= 0.15 && <0.36 - servant >= 0.15 && <0.16 - http-media >= 0.7 && <0.8 -- vector >= 0.12 && <0.13 - errors >= 2.2 && <2.4 - hspec >= 2.6 && <2.8 diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index a2f773d2..84de63e1 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -50,16 +50,16 @@ data DirLink = DirLink , size :: Int64 , contentType :: Int , target :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data DirObj = DirObj { dirHash :: TextS.Text , links :: [DirLink] - } deriving (Show) + } deriving (Show, Eq) -data LsObj = LsObj { objs :: [DirObj] } deriving (Show) +data LsObj = LsObj { objs :: [DirObj] } deriving (Show, Eq) -data SwarmStreamObj = SwarmStreamObj { protocol :: TextS.Text } deriving (Show) +data SwarmStreamObj = SwarmStreamObj { protocol :: TextS.Text } deriving (Show, Eq) data SwarmPeerObj = SwarmPeerObj { address :: TextS.Text @@ -68,13 +68,13 @@ data SwarmPeerObj = SwarmPeerObj , muxer :: TextS.Text , peer :: TextS.Text , streams :: Maybe [SwarmStreamObj] - } deriving (Show) + } deriving (Show, Eq) -data SwarmPeersObj = SwarmPeersObj { peers :: [SwarmPeerObj] } deriving (Show) +data SwarmPeersObj = SwarmPeersObj { peers :: [SwarmPeerObj] } deriving (Show, Eq) -data SwarmObj = SwarmObj { strings :: [TextS.Text] } deriving (Show) +data SwarmObj = SwarmObj { strings :: [TextS.Text] } deriving (Show, Eq) -data WantlistObj = WantlistObj { forSlash :: TextS.Text } deriving (Show) +data WantlistObj = WantlistObj { forSlash :: TextS.Text } deriving (Show, Eq) data BitswapStatObj = BitswapStatObj { blocksReceived :: Int64 @@ -87,9 +87,9 @@ data BitswapStatObj = BitswapStatObj , bitswapPeers :: [TextS.Text] , provideBufLen :: Int , wantlist :: [WantlistObj] - } deriving (Show) + } deriving (Show, Eq) -data BitswapWLObj = BitswapWLObj { bitswapKeys :: [WantlistObj] } deriving (Show) +data BitswapWLObj = BitswapWLObj { bitswapKeys :: [WantlistObj] } deriving (Show, Eq) data BitswapLedgerObj = BitswapLedgerObj { exchanged :: Int64 @@ -97,68 +97,68 @@ data BitswapLedgerObj = BitswapLedgerObj , recv :: Int64 , sent :: Int64 , value :: Double - } deriving (Show) + } deriving (Show, Eq) data CidBasesObj = CidBasesObj { baseCode :: Int , baseName :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data CidCodecsObj = CidCodecsObj { codecCode :: Int , codecName :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data CidHashesObj = CidHashesObj { multihashCode :: Int , multihashName :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data CidObj = CidObj { cidStr :: TextS.Text , errorMsg :: TextS.Text , formatted :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data BlockObj = BlockObj { key :: TextS.Text , blockSize :: Int - } deriving (Show) + } deriving (Show, Eq) -data DagCidObj = DagCidObj { cidSlash :: TextS.Text } deriving (Show) +data DagCidObj = DagCidObj { cidSlash :: TextS.Text } deriving (Show, Eq) data DagResolveObj = DagResolveObj { cid :: DagCidObj , remPath :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data DagPutObj = DagPutObj { putCid :: DagCidObj - } deriving (Show) + } deriving (Show, Eq) data ConfigObj = ConfigObj { configKey :: TextS.Text , configValue :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data ObjectLinkObj = ObjectLinkObj { linkHash :: TextS.Text , linkName :: TextS.Text , linkSize :: Int64 - } deriving (Show) + } deriving (Show, Eq) -data ObjectObj = ObjectObj { newObjectHash :: TextS.Text } deriving (Show) +data ObjectObj = ObjectObj { newObjectHash :: TextS.Text } deriving (Show, Eq) data ObjectLinksObj = WithLinks { objectHash :: TextS.Text , objectLinks :: [ObjectLinkObj] } - | WithoutLinks { objectHash :: TextS.Text } deriving (Show) + | WithoutLinks { objectHash :: TextS.Text } deriving (Show, Eq) data ObjectGetObj = ObjectGetObj { objectName :: TextS.Text , objectGetLinks :: [ObjectLinkObj] - } deriving (Show) + } deriving (Show, Eq) data ObjectStatObj = ObjectStatObj { objBlockSize :: Int @@ -167,18 +167,18 @@ data ObjectStatObj = ObjectStatObj , objHash :: TextS.Text , linksSize :: Int , numLinks :: Int - } deriving (Show) + } deriving (Show, Eq) -data DiffObj = DiffObj { diffSlash :: TextS.Text } deriving (Show) +data DiffObj = DiffObj { diffSlash :: TextS.Text } deriving (Show, Eq) data ObjectChangeObj = ObjectChangeObj { after :: Maybe DiffObj , before :: DiffObj , path :: TextS.Text , diffType :: Int - } deriving (Show) + } deriving (Show, Eq) -data ObjectDiffObj = ObjectDiffObj { changes :: [ObjectChangeObj] } deriving (Show) +data ObjectDiffObj = ObjectDiffObj { changes :: [ObjectChangeObj] } deriving (Show, Eq) data PinObj = WithoutProgress { pins :: [TextS.Text] } @@ -186,16 +186,16 @@ data PinObj = WithoutProgress | WithProgress { pins :: [TextS.Text] , progress :: Int - } deriving (Show) + } deriving (Show, Eq) -data BootstrapObj = BootstrapObj { bootstrapPeers :: [TextS.Text] } deriving (Show) +data BootstrapObj = BootstrapObj { bootstrapPeers :: [TextS.Text] } deriving (Show, Eq) data StatsBwObj = StatsBwObj { rateIn :: Double , rateOut :: Double , totalIn :: Int64 , totalOut :: Int64 - } deriving (Show) + } deriving (Show, Eq) data StatsRepoObj = StatsRepoObj { numObjects :: Int64 @@ -203,7 +203,7 @@ data StatsRepoObj = StatsRepoObj , repoSize :: Int64 , storageMax :: Int64 , repoVersion :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data VersionObj = VersionObj { commit :: TextS.Text @@ -211,7 +211,7 @@ data VersionObj = VersionObj , repo :: TextS.Text , system :: TextS.Text , version :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data IdObj = IdObj { addresses :: [TextS.Text] @@ -219,33 +219,33 @@ data IdObj = IdObj , id :: TextS.Text , protocolVersion :: TextS.Text , publicKey :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) -data DnsObj = DnsObj { dnsPath :: TextS.Text } deriving (Show) +data DnsObj = DnsObj { dnsPath :: TextS.Text } deriving (Show, Eq) -data PubsubObj = PubsubObj { pubsubStrings :: [TextS.Text] } deriving (Show) +data PubsubObj = PubsubObj { pubsubStrings :: [TextS.Text] } deriving (Show, Eq) -data LogLsObj = LogLsObj { logLsStrings :: [TextS.Text] } deriving (Show) +data LogLsObj = LogLsObj { logLsStrings :: [TextS.Text] } deriving (Show, Eq) -data LogLevelObj = LogLevelObj { message :: TextS.Text } deriving (Show) +data LogLevelObj = LogLevelObj { message :: TextS.Text } deriving (Show, Eq) -data RepoVersionObj = RepoVersionObj { repoVer :: TextS.Text } deriving (Show) +data RepoVersionObj = RepoVersionObj { repoVer :: TextS.Text } deriving (Show, Eq) -data RepoFsckObj = RepoFsckObj { repoMessage :: TextS.Text } deriving (Show) +data RepoFsckObj = RepoFsckObj { repoMessage :: TextS.Text } deriving (Show, Eq) data KeyDetailsObj = KeyDetailsObj { keyId :: TextS.Text , keyName :: TextS.Text } deriving (Show, Eq) -data KeyObj = KeyObj { keys :: [KeyDetailsObj] } deriving (Show) +data KeyObj = KeyObj { keys :: [KeyDetailsObj] } deriving (Show, Eq) data KeyRenameObj = KeyRenameObj { peerId :: TextS.Text , now :: TextS.Text , overwrite :: Bool , was :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data FilesStatObj = FilesStatObj { fileObjectHash :: TextS.Text @@ -253,18 +253,18 @@ data FilesStatObj = FilesStatObj , cumulativeObjectSize :: Int , blocks :: Int , objectType :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data FilesEntryObj = FilesEntryObj { entryName :: TextS.Text , entryType :: Int , entrySize :: Int , entryHash :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) -data FilesLsObj = FilesLsObj { enteries :: [FilesEntryObj] } deriving (Show) +data FilesLsObj = FilesLsObj { enteries :: [FilesEntryObj] } deriving (Show, Eq) -data FilesFlushObj = FilesFlushObj { fileCid :: TextS.Text } deriving (Show) +data FilesFlushObj = FilesFlushObj { fileCid :: TextS.Text } deriving (Show, Eq) instance FromJSON DirLink where parseJSON (Object o) = @@ -703,6 +703,7 @@ type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnTyp :<|> "dns" :> Capture "arg" TextS.Text :> Get '[JSON] DnsObj :<|> "pubsub" :> "ls" :> Get '[JSON] PubsubObj :<|> "pubsub" :> "peers" :> Get '[JSON] PubsubObj + :<|> "pubsub" :> "pub" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] NoContent :<|> "log" :> "ls" :> Get '[JSON] LogLsObj :<|> "log" :> "level" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] LogLevelObj :<|> "repo" :> "version" :> Get '[JSON] RepoVersionObj @@ -770,6 +771,7 @@ _idPeer :: TextS.Text -> ClientM IdObj _dns :: TextS.Text -> ClientM DnsObj _pubsubLs :: ClientM PubsubObj _pubsubPeers :: ClientM PubsubObj +_pubsubPublish :: TextS.Text -> Maybe TextS.Text -> ClientM NoContent _logLs :: ClientM LogLsObj _logLevel :: TextS.Text -> Maybe TextS.Text -> ClientM LogLevelObj _repoVersion :: ClientM RepoVersionObj @@ -796,7 +798,7 @@ _cat :<|> _ls :<|> _get :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnec _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectRmLink :<|> _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> - _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> + _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _pubsubPublish :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> _repoFsck :<|> _keyGen :<|> _keyList :<|> _keyRename :<|> _keyRm :<|> _filesChcid :<|> _filesCp :<|> _filesFlush :<|> _filesLs :<|> _filesMkdir :<|> _filesMv :<|> _filesRead :<|> _filesRm :<|> _filesStat :<|> _shutdown = client ipfsApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index f1005631..208e542a 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -40,7 +40,7 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _swarmPeers, _sw _objectNew, _objectGetLinks, _objectAddLink, _objectRmLink, _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, - _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _logLs, _logLevel, + _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _pubsubPublish, _logLs, _logLevel, _repoVersion, _repoFsck, _keyGen, _keyList, _keyRm, _keyRename, _filesChcid, _filesCp, _filesFlush, _filesLs, _filesMkdir, _filesMv, _filesRead, _filesRm, _filesStat, _shutdown, @@ -48,7 +48,7 @@ import Network.Ipfs.Api.Api (_cat, _ls, _get, _swarmPeers, _sw import Network.Ipfs.Api.Multipart (AddObj) import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, - _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal) + _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal, _pubsubSubscribe) -- | Regular Call function call :: ClientM a -> IO (Either ServantError a) @@ -512,6 +512,18 @@ pubsubPeers = do Left err -> putStrLn $ "Error: " ++ show err Right v -> print v +-- | Publish a message to a given pubsub topic. +pubsubPublish :: Text -> Text -> IO () +pubsubPublish topic mssg = do + res <- call $ _pubsubPublish topic $ Just mssg + case res of + Left err -> putStrLn $ "Error: " ++ show err + Right _ -> putStrLn "The given message has been published." + +-- | Subscribe to messages on a given topic. +pubsubSubscribe :: Text -> IO () +pubsubSubscribe topic = streamCall $ _pubsubSubscribe topic + -- | List the logging subsystems. logLs :: IO () logLs = do diff --git a/src/Network/Ipfs/Api/Multipart.hs b/src/Network/Ipfs/Api/Multipart.hs index cffeaca4..003d8089 100644 --- a/src/Network/Ipfs/Api/Multipart.hs +++ b/src/Network/Ipfs/Api/Multipart.hs @@ -24,7 +24,7 @@ data AddObj = AddObj { name :: TextS.Text , hash :: TextS.Text , size :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) instance FromJSON AddObj where parseJSON (Object o) = diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Stream.hs index 76aefe4d..c6f1e3b0 100644 --- a/src/Network/Ipfs/Api/Stream.hs +++ b/src/Network/Ipfs/Api/Stream.hs @@ -25,6 +25,7 @@ import qualified Data.ByteString.Lazy.Char8() import Data.Map() import Data.Proxy import qualified Data.Text as TextS +import GHC.Generics import Network.HTTP.Client() import Servant.API import Servant.Client.Streaming as S @@ -37,33 +38,40 @@ data PingObj = PingObj { success :: Bool , text :: TextS.Text , time :: Int64 - } deriving (Show) + } deriving (Show, Eq) data ResponseObj = ResponseObj { addrs :: Maybe [TextS.Text] , id :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) data DhtObj = DhtObj { extra :: TextS.Text , addrid :: TextS.Text , responses :: Maybe [ResponseObj] , addrType :: Int - } deriving (Show) + } deriving (Show, Eq) -data RepoKeyObj = RepoKeyObj { repoSlash :: TextS.Text } deriving (Show) +data RepoKeyObj = RepoKeyObj { repoSlash :: TextS.Text } deriving (Show, Eq) -data RepoGcObj = RepoGcObj { repoKey :: RepoKeyObj } deriving (Show) +data RepoGcObj = RepoGcObj { repoKey :: RepoKeyObj } deriving (Show, Eq) data RepoVerifyObj = RepoVerifyObj { msg :: TextS.Text , progress :: Int - } deriving (Show) + } deriving (Show, Eq) data RefsObj = RefsObj { error :: TextS.Text , ref :: TextS.Text - } deriving (Show) + } deriving (Show, Eq) + +data PubsubSubObj = PubsubSubObj + { mssgdata :: TextS.Text + , from :: TextS.Text + , seqno :: TextS.Text + , topicIDs :: [TextS.Text] + } deriving (Show, Eq) instance FromJSON PingObj where parseJSON (Object o) = @@ -115,6 +123,15 @@ instance FromJSON RefsObj where parseJSON _ = mzero +instance FromJSON PubsubSubObj where + parseJSON (Object o) = + PubsubSubObj <$> o .: "data" + <*> o .: "from" + <*> o .: "seqno" + <*> o .: "topicIDs" + + parseJSON _ = mzero + type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO PingObj ) :<|> "dht" :> "findpeer" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) :<|> "dht" :> "findprovs" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) @@ -126,7 +143,8 @@ type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFram :<|> "repo" :> "verify" :> StreamGet NewlineFraming JSON ( SourceIO RepoVerifyObj) :<|> "refs" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON (SourceIO RefsObj) :<|> "refs" :> "local" :> StreamGet NewlineFraming JSON (SourceIO RefsObj) - + :<|> "pubsub" :> "sub" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO PubsubSubObj ) + ipfsStreamApi :: Proxy IpfsStreamApi ipfsStreamApi = Proxy @@ -141,6 +159,7 @@ _repoGc :: ClientM (SourceIO RepoGcObj) _repoVerify :: ClientM (SourceIO RepoVerifyObj) _refs :: TextS.Text -> ClientM (SourceIO RefsObj) _refsLocal :: ClientM (SourceIO RefsObj) +_pubsubSubscribe :: TextS.Text -> ClientM (SourceIO PubsubSubObj) _ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery :<|> - _logTail :<|> _repoGc :<|> _repoVerify :<|> _refs :<|> _refsLocal = client ipfsStreamApi \ No newline at end of file + _logTail :<|> _repoGc :<|> _repoVerify :<|> _refs :<|> _refsLocal :<|> _pubsubSubscribe = client ipfsStreamApi \ No newline at end of file diff --git a/src/Network/Ipfs/Tests/IpfsTests.hs b/src/Network/Ipfs/Tests/IpfsTests.hs index 73d3e386..6d005f6f 100644 --- a/src/Network/Ipfs/Tests/IpfsTests.hs +++ b/src/Network/Ipfs/Tests/IpfsTests.hs @@ -1,6 +1,6 @@ -- | --- Module : Network.Ipfs.Test.IpfsTest.hs +-- Module : Network.Ipfs.Tests.IpfsTest -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- @@ -11,6 +11,8 @@ -- Module containing Ipfs command functions. -- +module Network.Ipfs.Tests.IpfsTest where + import Test.Hspec import Test.QuickCheck import Control.Exception (evaluate) From 90cd6dd5524e95002c36ffa18b5eb614b2456e66 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 26 Aug 2019 23:25:41 +0530 Subject: [PATCH 109/237] Updated IpfsTests.hs and Added Multihash.hs --- package.yaml | 4 +- src/Network/Ipfs/Api/Multipart.hs | 2 +- src/Network/Ipfs/Api/Stream.hs | 3 +- src/Network/Ipfs/Tests/IpfsTests.hs | 10 ++-- src/Network/Ipfs/Types/Multihash.hs | 78 +++++++++++++++++++++++++++++ 5 files changed, 88 insertions(+), 9 deletions(-) create mode 100644 src/Network/Ipfs/Types/Multihash.hs diff --git a/package.yaml b/package.yaml index 45643234..04edeac3 100644 --- a/package.yaml +++ b/package.yaml @@ -58,7 +58,9 @@ dependencies: - http-media >= 0.7 && <0.8 - errors >= 2.2 && <2.4 - hspec >= 2.6 && <2.8 - +- base58string >= 0.10.0 && <0.11 +- tar >= 0.5 && <0.6 + ghc-options: - -funbox-strict-fields - -Wduplicate-exports diff --git a/src/Network/Ipfs/Api/Multipart.hs b/src/Network/Ipfs/Api/Multipart.hs index 003d8089..b69f5b17 100644 --- a/src/Network/Ipfs/Api/Multipart.hs +++ b/src/Network/Ipfs/Api/Multipart.hs @@ -3,7 +3,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Ipfs.Api.Api +-- Module : Network.Ipfs.Api.Multipart -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Stream.hs index c6f1e3b0..2c63b454 100644 --- a/src/Network/Ipfs/Api/Stream.hs +++ b/src/Network/Ipfs/Api/Stream.hs @@ -5,7 +5,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} -- | --- Module : Network.Ipfs.Api.Api +-- Module : Network.Ipfs.Api.Stream -- Copyright : Alexander Krupenkin 2016-2018 -- License : BSD3 -- @@ -25,7 +25,6 @@ import qualified Data.ByteString.Lazy.Char8() import Data.Map() import Data.Proxy import qualified Data.Text as TextS -import GHC.Generics import Network.HTTP.Client() import Servant.API import Servant.Client.Streaming as S diff --git a/src/Network/Ipfs/Tests/IpfsTests.hs b/src/Network/Ipfs/Tests/IpfsTests.hs index 6d005f6f..083bdbe6 100644 --- a/src/Network/Ipfs/Tests/IpfsTests.hs +++ b/src/Network/Ipfs/Tests/IpfsTests.hs @@ -11,12 +11,12 @@ -- Module containing Ipfs command functions. -- -module Network.Ipfs.Tests.IpfsTest where +module Network.Ipfs.Tests.IpfsTests where -import Test.Hspec -import Test.QuickCheck -import Control.Exception (evaluate) -import Data.Text as TextS +import Data.Text as TextS +import Control.Exception (evaluate) +import Test.Hspec +import Test.QuickCheck import Network.Ipfs.Api.Api (KeyDetailsObj(..), KeyObj(..)) import Network.Ipfs.Api.Ipfs (keyGen, keyList, keyRm) diff --git a/src/Network/Ipfs/Types/Multihash.hs b/src/Network/Ipfs/Types/Multihash.hs new file mode 100644 index 00000000..facdbcf3 --- /dev/null +++ b/src/Network/Ipfs/Types/Multihash.hs @@ -0,0 +1,78 @@ + +-- | +-- Module : Network.Ipfs.Types.Multihash +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Multihash Type Module +-- + +module Network.Ipfs.Types.Multihash where + +import Control.Applicative ((<$>)) +import Data.Attoparsec.ByteString (Parser, parseOnly) +import qualified Data.Attoparsec.ByteString as A +import qualified Data.ByteString as BS +import Data.ByteString.Builder (Builder, byteString, toLazyByteString) +import qualified Data.ByteString.Builder as BB +import qualified Data.ByteString.Lazy as BL +import Data.Monoid ((<>)) + +data MultihashDigest = MultihashDigest + { algorithm :: !HashAlgorithm + , length :: !Length + , digest :: !Digest + } deriving (Show, Eq) + +type Length = Int + +type Digest = BS.ByteString + +data HashAlgorithm + = SHA1 + | SHA256 + | SHA512 + | SHA3 + | BLAKE2B + | BLAKE2S + deriving (Show, Read, Eq, Enum, Bounded) + +fromCode :: Int -> HashAlgorithm +fromCode 0x11 = SHA1 +fromCode 0x12 = SHA256 +fromCode 0x13 = SHA512 +fromCode 0x14 = SHA3 +fromCode 0x40 = BLAKE2B +fromCode 0x41 = BLAKE2S +fromCode _ = error "Unknown hash function code" + +toCode :: HashAlgorithm -> Int +toCode SHA1 = 0x11 +toCode SHA256 = 0x12 +toCode SHA512 = 0x13 +toCode SHA3 = 0x14 +toCode BLAKE2B = 0x40 +toCode BLAKE2S = 0x41 + +encode :: HashAlgorithm -> Digest -> BL.ByteString +encode h d = toLazyByteString $ encoder h d + +encoder :: HashAlgorithm -> Digest -> Builder +encoder h d = + (BB.word8 . fromIntegral $ toCode h) <> + (BB.word8 . fromIntegral $ BS.length d) <> + byteString d + +decode :: BS.ByteString -> Either String MultihashDigest +decode = parseOnly decoder + +decoder :: Parser MultihashDigest +decoder = do + h <- (fromCode . fromIntegral <$> A.anyWord8) + l <- (fromIntegral <$> A.anyWord8) + d <- A.take l + return $ MultihashDigest h l d \ No newline at end of file From 6a932351a40a07bbb08c9da493483964568a6c07 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Thu, 29 Aug 2019 21:38:27 +0530 Subject: [PATCH 110/237] Updated Dependencies --- package.yaml | 3 ++ src/Network/Ipfs/Api/Api.hs | 1 - src/Network/Ipfs/Api/Ipfs.hs | 50 ++++++++++++++--------------- src/Network/Ipfs/Api/Stream.hs | 1 - src/Network/Ipfs/Tests/IpfsTests.hs | 7 ++-- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/package.yaml b/package.yaml index 04edeac3..42a56a92 100644 --- a/package.yaml +++ b/package.yaml @@ -60,6 +60,9 @@ dependencies: - hspec >= 2.6 && <2.8 - base58string >= 0.10.0 && <0.11 - tar >= 0.5 && <0.6 +- unordered-containers >= 0.2 && <0.3 +- http-types >= 0.12 && <0.14 +- attoparsec >=0.13.2.1 && <0.14 ghc-options: - -funbox-strict-fields diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 84de63e1..3dc36e71 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -25,7 +25,6 @@ import Data.Int import Data.ByteString.Lazy (toStrict) import qualified Data.ByteString.Lazy.Char8() import qualified Data.HashMap.Strict as H -import Data.Map() import Data.Proxy import qualified Data.Text as TextS import qualified Data.Text.Encoding as TextS diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 208e542a..be997aa6 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -18,33 +18,33 @@ module Network.Ipfs.Api.Ipfs where -import qualified Codec.Archive.Tar as Tar -import Data.Aeson (decode) -import Data.Text as TextS -import qualified Data.Text.Encoding as TextS -import qualified Data.Text.IO as TextIO -import qualified Data.ByteString.Lazy as BS (ByteString, fromStrict) -import Network.HTTP.Client as Net hiding (Proxy) +import qualified Codec.Archive.Tar as Tar +import Data.Aeson (decode) +import Data.Text as TextS +import qualified Data.Text.Encoding as TextS +import qualified Data.Text.IO as TextIO +import qualified Data.ByteString.Lazy as BS (ByteString, fromStrict) +import Network.HTTP.Client as Net hiding (Proxy) import Network.HTTP.Client.MultipartFormData -import Network.HTTP.Types (Status(..)) +import Network.HTTP.Types (Status(..)) import Servant.Client -import qualified Servant.Client.Streaming as S -import Servant.Types.SourceT (SourceT, foreach) - -import Network.Ipfs.Api.Api (_cat, _ls, _get, _swarmPeers, _swarmConnect, - _swarmDisconnect, _swarmFilterAdd, _swarmFilters, - _swarmFilterRm, _bitswapStat, _bitswapWL, _bitswapLedger, - _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, - _cidFormat, _blockGet, _objectDiff, _blockStat, _dagGet, - _dagResolve, _configGet, _configSet, _objectData, - _objectNew, _objectGetLinks, _objectAddLink, _objectRmLink, - _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, - _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, - _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _pubsubPublish, _logLs, _logLevel, - _repoVersion, _repoFsck, _keyGen, _keyList, _keyRm, _keyRename, - _filesChcid, _filesCp, _filesFlush, _filesLs, _filesMkdir, - _filesMv, _filesRead, _filesRm, _filesStat, _shutdown, - BlockObj, DagPutObj, ObjectObj, ObjectLinksObj, KeyDetailsObj, KeyRenameObj, KeyObj) +import qualified Servant.Client.Streaming as S +import Servant.Types.SourceT (SourceT, foreach) + +import Network.Ipfs.Api.Api (_cat, _ls, _get, _swarmPeers, _swarmConnect, + _swarmDisconnect, _swarmFilterAdd, _swarmFilters, + _swarmFilterRm, _bitswapStat, _bitswapWL, _bitswapLedger, + _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, + _cidFormat, _blockGet, _objectDiff, _blockStat, _dagGet, + _dagResolve, _configGet, _configSet, _objectData, + _objectNew, _objectGetLinks, _objectAddLink, _objectRmLink, + _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, + _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, + _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _pubsubPublish, _logLs, _logLevel, + _repoVersion, _repoFsck, _keyGen, _keyList, _keyRm, _keyRename, + _filesChcid, _filesCp, _filesFlush, _filesLs, _filesMkdir, + _filesMv, _filesRead, _filesRm, _filesStat, _shutdown, + BlockObj, DagPutObj, ObjectObj, ObjectLinksObj, KeyDetailsObj, KeyRenameObj, KeyObj) import Network.Ipfs.Api.Multipart (AddObj) import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Stream.hs index 2c63b454..b19f1aa1 100644 --- a/src/Network/Ipfs/Api/Stream.hs +++ b/src/Network/Ipfs/Api/Stream.hs @@ -22,7 +22,6 @@ import Control.Monad import Data.Aeson import Data.Int import qualified Data.ByteString.Lazy.Char8() -import Data.Map() import Data.Proxy import qualified Data.Text as TextS import Network.HTTP.Client() diff --git a/src/Network/Ipfs/Tests/IpfsTests.hs b/src/Network/Ipfs/Tests/IpfsTests.hs index 083bdbe6..89cc1b33 100644 --- a/src/Network/Ipfs/Tests/IpfsTests.hs +++ b/src/Network/Ipfs/Tests/IpfsTests.hs @@ -13,12 +13,11 @@ module Network.Ipfs.Tests.IpfsTests where -import Data.Text as TextS -import Control.Exception (evaluate) +import Data.Text as TextS +import Control.Exception() import Test.Hspec -import Test.QuickCheck -import Network.Ipfs.Api.Api (KeyDetailsObj(..), KeyObj(..)) +import Network.Ipfs.Api.Api (KeyDetailsObj(..), KeyObj(..)) import Network.Ipfs.Api.Ipfs (keyGen, keyList, keyRm) main :: IO () From bb5eed447a5105ae39f2144463c211b46a98e68f Mon Sep 17 00:00:00 2001 From: amany9000 Date: Sat, 31 Aug 2019 04:13:30 +0530 Subject: [PATCH 111/237] Added Monadic Abstraction for call function --- src/Network/Ipfs/Api/Api.hs | 1 - src/Network/Ipfs/Api/Ipfs.hs | 592 ++++++------------ .../Network/Ipfs/Api/Key.hs | 0 3 files changed, 194 insertions(+), 399 deletions(-) rename src/Network/Ipfs/Tests/IpfsTests.hs => test/Network/Ipfs/Api/Key.hs (100%) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index 3dc36e71..fc3a1182 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -34,7 +34,6 @@ import qualified Network.HTTP.Media as M ((//)) import Servant.API import Servant.Client - type CatReturnType = TextS.Text type ReprovideReturnType = TextS.Text type GetReturnType = TextS.Text diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index be997aa6..364e0af7 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -1,9 +1,11 @@ -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} + -- | -- Module : Network.Ipfs.Api.Ipfs -- Copyright : Alexander Krupenkin 2016-2018 @@ -19,6 +21,8 @@ module Network.Ipfs.Api.Ipfs where import qualified Codec.Archive.Tar as Tar +import Control.Monad.Except +import Control.Monad.Reader import Data.Aeson (decode) import Data.Text as TextS import qualified Data.Text.Encoding as TextS @@ -31,30 +35,45 @@ import Servant.Client import qualified Servant.Client.Streaming as S import Servant.Types.SourceT (SourceT, foreach) -import Network.Ipfs.Api.Api (_cat, _ls, _get, _swarmPeers, _swarmConnect, - _swarmDisconnect, _swarmFilterAdd, _swarmFilters, - _swarmFilterRm, _bitswapStat, _bitswapWL, _bitswapLedger, - _bitswapReprovide, _cidBases, _cidCodecs, _cidHashes, _cidBase32, - _cidFormat, _blockGet, _objectDiff, _blockStat, _dagGet, - _dagResolve, _configGet, _configSet, _objectData, - _objectNew, _objectGetLinks, _objectAddLink, _objectRmLink, - _objectGet, _objectStat, _pinAdd, _pinRemove,_bootstrapList, - _bootstrapAdd, _bootstrapRM, _statsBw, _statsRepo, _version, - _id, _idPeer, _dns, _pubsubLs, _pubsubPeers, _pubsubPublish, _logLs, _logLevel, - _repoVersion, _repoFsck, _keyGen, _keyList, _keyRm, _keyRename, - _filesChcid, _filesCp, _filesFlush, _filesLs, _filesMkdir, - _filesMv, _filesRead, _filesRm, _filesStat, _shutdown, - BlockObj, DagPutObj, ObjectObj, ObjectLinksObj, KeyDetailsObj, KeyRenameObj, KeyObj) - -import Network.Ipfs.Api.Multipart (AddObj) -import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, - _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal, _pubsubSubscribe) - --- | Regular Call function -call :: ClientM a -> IO (Either ServantError a) -call func = do - manager' <- newManager defaultManagerSettings - runClientM func (mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) +import qualified Network.Ipfs.Api.Api as Api + +import Network.Ipfs.Api.Multipart (AddObj) +import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, + _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal, _pubsubSubscribe) + +newtype IpfsT m a = IpfsT { unIpfs :: ReaderT (Manager, BaseUrl) (ExceptT ServantError m) a} + deriving ( Functor + , Applicative + , Monad + , MonadIO + , MonadReader (Manager, BaseUrl) + , MonadError ServantError + ) + +instance MonadTrans IpfsT where + lift = IpfsT . lift . lift + +type Ipfs a = IpfsT IO a + +runIpfs' :: BaseUrl -> Ipfs a -> IO () +runIpfs' url ipfs = do + manager <- liftIO $ newManager defaultManagerSettings + ret <- runExceptT (runReaderT (unIpfs ipfs) (manager, url)) + case ret of + Left err -> putStrLn $ "Error: " ++ show err + Right _ -> putStr "" + +runIpfs :: Ipfs a -> IO () +runIpfs = + runIpfs' (BaseUrl Http "localhost" 5001 "/api/v0") + +call :: (ClientM a) -> Ipfs a +call func = do + (manager, url) <- ask + resp <- lift (runClientM func (mkClientEnv manager url)) + case resp of + Left l -> throwError l + Right r -> pure r -- | Call function for Streams. streamCall :: Show a => S.ClientM (SourceT IO a) -> IO() @@ -75,12 +94,8 @@ multipartCall uri filePath = do where form = [ partFileSource "file" $ TextS.unpack filePath ] -- | Show IPFS object data. -cat :: Text -> IO () -cat hash = do - res <- call $ _cat hash - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> TextIO.putStr v +cat :: Text -> Ipfs Api.CatReturnType +cat hash = call $ Api._cat hash -- | Add a file or directory to ipfs. add :: Text -> IO() @@ -89,21 +104,15 @@ add filePath = do print (decode (Net.responseBody responseVal) :: Maybe AddObj) -- | List directory contents for Unix filesystem objects. -ls :: Text -> IO () -ls hash = do - res <- call $ _ls hash - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +ls :: Text -> Ipfs Api.LsObj +ls hash = call $ Api._ls hash -- | Download IPFS objects. -get :: Text -> IO () +get :: Text -> Ipfs Text get hash = do - res <- call $ _get hash - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> do Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ TextS.encodeUtf8 v - print "The content has been stored in getResponseDirectory." + ret <- call $ Api._get hash + do liftIO $ Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ TextS.encodeUtf8 ret + pure "The content has been stored in getResponseDirectory." -- | List links (references) from an object. refs :: Text -> IO () @@ -112,186 +121,103 @@ refs hash = streamCall $ _refs hash -- | List all local references. refsLocal :: IO () refsLocal = streamCall _refsLocal - + -- | List peers with open connections. -swarmPeers :: IO () -swarmPeers = do - res <- call _swarmPeers - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +swarmPeers :: Ipfs Api.SwarmPeersObj +swarmPeers = call Api._swarmPeers -- | Open connection to a given address. 'peerId' has to be of the format - /ipfs/id -swarmConnect :: Text -> IO () -swarmConnect peerId = do - res <- call $ _swarmConnect (Just peerId) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +swarmConnect :: Text -> Ipfs Api.SwarmObj +swarmConnect peerId = call $ Api._swarmConnect (Just peerId) + -- | Close connection to a given address. 'peerId' has to be of the format - /ipfs/id -swarmDisconnect :: Text -> IO () -swarmDisconnect peerId = do - res <- call $ _swarmDisconnect (Just peerId) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +swarmDisconnect :: Text -> Ipfs Api.SwarmObj +swarmDisconnect peerId = call $ Api._swarmDisconnect (Just peerId) -- | Manipulate address filters. -swarmFilters :: IO () -swarmFilters = do - res <- call _swarmFilters - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +swarmFilters :: Ipfs Api.SwarmObj +swarmFilters = call Api._swarmFilters -- | Add an address filter. 'peerId' has to be of the format - /ip4/{IP addr of peer}/ipcidr/{ip network prefix} -swarmFilterAdd :: Text -> IO () -swarmFilterAdd filterParam = do - res <- call $ _swarmFilterAdd (Just filterParam) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +swarmFilterAdd :: Text -> Ipfs Api.SwarmObj +swarmFilterAdd filterParam = call $ Api._swarmFilterAdd (Just filterParam) -- | Remove an address filter. -swarmFilterRm :: Text -> IO () -swarmFilterRm filterParam = do - res <- call $ _swarmFilterRm (Just filterParam) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +swarmFilterRm :: Text -> Ipfs Api.SwarmObj +swarmFilterRm filterParam = call $ Api._swarmFilterRm (Just filterParam) -- | 'Show some diagnostic information on the bitswap agent. -bitswapStat :: IO () -bitswapStat = do - res <- call _bitswapStat - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +bitswapStat :: Ipfs Api.BitswapStatObj +bitswapStat = call Api._bitswapStat -- | Show blocks currently on the wantlist. -bitswapWL :: IO () -bitswapWL = do - res <- call _bitswapWL - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +bitswapWL :: Ipfs Api.BitswapWLObj +bitswapWL = call Api._bitswapWL -- | Show the current ledger for a peer. -bitswapLedger :: Text -> IO () -bitswapLedger peerId = do - res <- call $ _bitswapLedger peerId - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +bitswapLedger :: Text -> Ipfs Api.BitswapLedgerObj +bitswapLedger peerId = call $ Api._bitswapLedger peerId -- | Trigger reprovider. -bitswapReprovide :: IO () -bitswapReprovide = do - res <- call $ _bitswapReprovide - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> TextIO.putStr v +bitswapReprovide :: Ipfs Api.ReprovideReturnType +bitswapReprovide = call $ Api._bitswapReprovide -- | List available multibase encodings. -cidBases :: IO () -cidBases = do - res <- call $ _cidBases - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +cidBases :: Ipfs [Api.CidBasesObj] +cidBases = call $ Api._cidBases -- | List available CID codecs. -cidCodecs :: IO () -cidCodecs = do - res <- call $ _cidCodecs - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +cidCodecs :: Ipfs [Api.CidCodecsObj] +cidCodecs = call $ Api._cidCodecs -- | List available multihashes. -cidHashes :: IO () -cidHashes = do - res <- call $ _cidHashes - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +cidHashes :: Ipfs [Api.CidHashesObj] +cidHashes = call $ Api._cidHashes -- | Convert CIDs to Base32 CID version 1. -cidBase32 :: Text -> IO () -cidBase32 hash = do - res <- call $ _cidBase32 hash - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +cidBase32 :: Text -> Ipfs Api.CidObj +cidBase32 hash = call $ Api._cidBase32 hash -- | Format and convert a CID in various useful ways. -cidFormat :: Text-> IO () -cidFormat hash = do - res <- call $ _cidFormat hash - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +cidFormat :: Text-> Ipfs Api.CidObj +cidFormat hash = call $ Api._cidFormat hash -- | Get a raw IPFS block. -blockGet :: Text -> IO () -blockGet key = do - res <- call $ _blockGet key - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> TextIO.putStr v +blockGet :: Text -> Ipfs Api.BlockReturnType +blockGet key = call $ Api._blockGet key -- | Store input as an IPFS block. blockPut :: Text -> IO() blockPut filePath = do responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/block/put") filePath - print (decode (Net.responseBody responseVal) :: Maybe BlockObj) + print (decode (Net.responseBody responseVal) :: Maybe Api.BlockObj) -- | Print information of a raw IPFS block. -blockStat :: Text -> IO () -blockStat key = do - res <- call $ _blockStat key - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +blockStat :: Text -> Ipfs Api.BlockObj +blockStat key = call $ Api._blockStat key -- | Get a dag node from ipfs. -dagGet :: Text -> IO () -dagGet ref = do - res <- call $ _dagGet ref - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> TextIO.putStr v +dagGet :: Text -> Ipfs Api.DagReturnType +dagGet ref = call $ Api._dagGet ref -- | Resolve ipld block. -dagResolve :: Text -> IO () -dagResolve ref = do - res <- call $ _dagResolve ref - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +dagResolve :: Text -> Ipfs Api.DagResolveObj +dagResolve ref = call $ Api._dagResolve ref -- | Add a dag node to ipfs. dagPut :: Text -> IO() dagPut filePath = do responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/dag/put") filePath - print (decode (Net.responseBody responseVal) :: Maybe DagPutObj) + print (decode (Net.responseBody responseVal) :: Maybe Api.DagPutObj) -- | Get ipfs config values. -configGet :: Text -> IO () -configGet key = do - res <- call $ _configGet key - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +configGet :: Text -> Ipfs Api.ConfigObj +configGet key = call $ Api._configGet key -- | Set ipfs config values. -configSet :: Text -> Text -> IO () -configSet key value = do - res <- call $ _configSet key $ Just value - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +configSet :: Text -> Text -> Ipfs Api.ConfigObj +configSet key value = call $ Api._configSet key $ Just value -- | Replace the config with the file at . configReplace :: Text -> IO() @@ -303,174 +229,98 @@ configReplace filePath = do print $ statusCode $ Net.responseStatus responseVal -- | Output the raw bytes of an IPFS object. -objectData :: Text -> IO () -objectData key = do - res <- call $ _objectData key - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> TextIO.putStr v +objectData :: Text -> Ipfs Api.ObjectReturnType +objectData key = call $ Api._objectData key -- | Create a new object from an ipfs template. -objectNew :: IO () -objectNew = do - res <- call _objectNew - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +objectNew :: Ipfs Api.ObjectObj +objectNew = call Api._objectNew -- | Output the links pointed to by the specified object. -objectGetLinks :: Text -> IO () -objectGetLinks key = do - res <- call $ _objectGetLinks key - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +objectGetLinks :: Text -> Ipfs Api.ObjectLinksObj +objectGetLinks key = call $ Api._objectGetLinks key -- | Add a Merkle-link to the given object and return the hash of the result. -objectAddLink :: Text -> Text -> Text -> IO () -objectAddLink hash name key = do - res <- call $ _objectAddLink hash (Just name) (Just key) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +objectAddLink :: Text -> Text -> Text -> Ipfs Api.ObjectLinksObj +objectAddLink hash name key = call $ Api._objectAddLink hash (Just name) (Just key) -- | Remove a Merkle-link from the given object and return the hash of the result. -objectRmLink :: Text -> Text -> IO () -objectRmLink key name = do - res <- call $ _objectRmLink key (Just name) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +objectRmLink :: Text -> Text -> Ipfs Api.ObjectLinksObj +objectRmLink key name = call $ Api._objectRmLink key (Just name) -- | Append data to what already exists in the data segment in the given object. objectAppendData :: Text -> Text -> IO() objectAppendData key filePath = do responseVal <- multipartCall ( ( TextS.pack "http://localhost:5001/api/v0/object/patch/append-data?arg=" ) <> key) filePath - print (decode ( Net.responseBody responseVal) :: Maybe ObjectLinksObj) + print (decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj) -- | Set the data field of an IPFS object. objectSetData :: Text -> Text -> IO() objectSetData key filePath = do responseVal <- multipartCall ( ( TextS.pack "http://localhost:5001/api/v0/object/patch/set-data?arg=" ) <>key) filePath - print (decode ( Net.responseBody responseVal) :: Maybe ObjectLinksObj) + print (decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj) -- | Get and serialize the DAG node named by key. -objectGet :: Text -> IO () -objectGet key = do - res <- call $ _objectGet key - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +objectGet :: Text -> Ipfs Api.ObjectGetObj +objectGet key = call $ Api._objectGet key -- | 'Display the diff between two ipfs objects. -objectDiff :: Text -> Text -> IO () -objectDiff firstKey secondKey = do - res <- call $ _objectDiff firstKey (Just secondKey) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +objectDiff :: Text -> Text -> Ipfs Api.ObjectDiffObj +objectDiff firstKey secondKey = call $ Api._objectDiff firstKey (Just secondKey) -- | Store input as a DAG object, print its key. objectPut :: Text -> IO() objectPut filePath = do responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/object/put") filePath - print (decode ( Net.responseBody responseVal) :: Maybe ObjectObj) + print (decode ( Net.responseBody responseVal) :: Maybe Api.ObjectObj) -- | Get stats for the DAG node named by key. -objectStat :: Text -> IO () -objectStat key = do - res <- call $ _objectStat key - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +objectStat :: Text -> Ipfs Api.ObjectStatObj +objectStat key = call $ Api._objectStat key -- | Pin objects to local storage. -pinAdd :: Text -> IO () -pinAdd pinPath = do - res <- call $ _pinAdd pinPath - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +pinAdd :: Text -> Ipfs Api.PinObj +pinAdd pinPath = call $ Api._pinAdd pinPath -- | Remove pinned objects from local storage. -pinRemove :: Text -> IO () -pinRemove pinPath = do - res <- call $ _pinRemove pinPath - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +pinRemove :: Text -> Ipfs Api.PinObj +pinRemove pinPath = call $ Api._pinRemove pinPath -- | Add peers to the bootstrap list. -bootstrapAdd :: Text -> IO () -bootstrapAdd peerId = do - res <- call $ _bootstrapAdd (Just peerId) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +bootstrapAdd :: Text -> Ipfs Api.BootstrapObj +bootstrapAdd peerId = call $ Api._bootstrapAdd (Just peerId) -- | Show peers in the bootstrap list. -bootstrapList :: IO () -bootstrapList = do - res <- call $ _bootstrapList - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +bootstrapList :: Ipfs Api.BootstrapObj +bootstrapList = call $ Api._bootstrapList -- | Remove peers from the bootstrap list. -bootstrapRM :: Text -> IO () -bootstrapRM peerId = do - res <- call $ _bootstrapRM (Just peerId) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +bootstrapRM :: Text -> Ipfs Api.BootstrapObj +bootstrapRM peerId = call $ Api._bootstrapRM (Just peerId) -- | Print ipfs bandwidth information. -statsBw :: IO () -statsBw = do - res <- call $ _statsBw - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +statsBw :: Ipfs Api.StatsBwObj +statsBw = call Api._statsBw -- | Get stats for the currently used repo. -statsRepo :: IO () -statsRepo = do - res <- call $ _statsRepo - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +statsRepo :: Ipfs Api.StatsRepoObj +statsRepo = call $ Api._statsRepo -- | Show ipfs version information. -version :: IO () -version = do - res <- call $ _version - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +version :: Ipfs Api.VersionObj +version = call $ Api._version -- | Show ipfs node id info. -id :: IO () -id = do - res <- call $ _id - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +id :: Ipfs Api.IdObj +id = call Api._id -- | Show ipfs node id info of the given peerId. -idPeer :: Text -> IO () -idPeer peerId = do - res <- call $ _idPeer peerId - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +idPeer :: Text -> Ipfs Api.IdObj +idPeer peerId = call $ Api._idPeer peerId -- | Resolve DNS links. -dns :: Text -> IO () -dns name = do - res <- call $ _dns name - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +dns :: Text -> Ipfs Api.DnsObj +dns name = call $ Api._dns name -- | Send echo request packets to IPFS hosts. ping :: Text -> IO () @@ -497,68 +347,42 @@ dhtQuery :: Text -> IO () dhtQuery peerId = streamCall $ _dhtQuery peerId -- | List subscribed topics by name. -pubsubLs :: IO () -pubsubLs = do - res <- call _pubsubLs - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +pubsubLs :: Ipfs Api.PubsubObj +pubsubLs = call Api._pubsubLs -- | List peers we are currently pubsubbing with. -pubsubPeers :: IO () -pubsubPeers = do - res <- call _pubsubPeers - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v - +pubsubPeers :: Ipfs Api.PubsubObj +pubsubPeers = call Api._pubsubPeers +--} -- | Publish a message to a given pubsub topic. -pubsubPublish :: Text -> Text -> IO () +pubsubPublish :: Text -> Text -> Ipfs Text pubsubPublish topic mssg = do - res <- call $ _pubsubPublish topic $ Just mssg - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right _ -> putStrLn "The given message has been published." + call $ Api._pubsubPublish topic $ Just mssg + pure "The given message has been published." -- | Subscribe to messages on a given topic. pubsubSubscribe :: Text -> IO () pubsubSubscribe topic = streamCall $ _pubsubSubscribe topic -- | List the logging subsystems. -logLs :: IO () -logLs = do - res <- call _logLs - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +logLs :: Ipfs Api.LogLsObj +logLs = call Api._logLs -- | Change the logging level. -logLevel :: Text -> Text -> IO () -logLevel subsystem level = do - res <- call $ _logLevel subsystem $ Just level - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +logLevel :: Text -> Text -> Ipfs Api.LogLevelObj +logLevel subsystem level = call $ Api._logLevel subsystem $ Just level -- | Read the event log. logTail :: IO () logTail = streamCall _logTail -- | Show the repo version. -repoVersion :: IO () -repoVersion = do - res <- call _repoVersion - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +repoVersion :: Ipfs Api.RepoVersionObj +repoVersion = call Api._repoVersion -- | Remove repo lockfiles. -repoFsck :: IO () -repoFsck = do - res <- call _repoFsck - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +repoFsck :: Ipfs Api.RepoFsckObj +repoFsck = call Api._repoFsck -- | Perform a garbage collection sweep on the repo. repoGc :: IO () @@ -569,92 +393,66 @@ repoVerify :: IO () repoVerify = streamCall _repoVerify -- | 'List all local keypairs. -keyList :: IO (Either ServantError KeyObj) -keyList = call _keyList +keyList :: Ipfs Api.KeyObj +keyList = call Api._keyList -- | Create a new keypair. -keyGen :: Text -> Text -> IO (Either ServantError KeyDetailsObj) -keyGen name keyType = call $ _keyGen name (Just keyType) +keyGen :: Text -> Text -> Ipfs Api.KeyDetailsObj +keyGen name keyType = call $ Api._keyGen name (Just keyType) -- | Rename a keypair. -keyRename :: Text -> Text -> IO (Either ServantError KeyRenameObj) -keyRename was now = call $ _keyRename was $ Just now +keyRename :: Text -> Text -> Ipfs Api.KeyRenameObj +keyRename was now = call $ Api._keyRename was $ Just now -- | Remove a keypair. -keyRm :: Text -> IO (Either ServantError KeyObj) -keyRm name = call $ _keyRm name +keyRm :: Text -> Ipfs Api.KeyObj +keyRm name = call $ Api._keyRm name -- | Change the cid version or hash function of the root node of a given mfsPath. -filesChcidVer :: Text -> Int -> IO () +filesChcidVer :: Text -> Int -> Ipfs Text filesChcidVer mfsPath cidVersion = do - res <- call $ _filesChcid (Just mfsPath) (Just cidVersion) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right _ -> putStrLn "The directory's cid version has been changed." + call $ Api._filesChcid (Just mfsPath) (Just cidVersion) + pure "The directory's cid version has been changed." -- | Copy files into mfs. -filesCp :: Text -> Text -> IO () +filesCp :: Text -> Text -> Ipfs Text filesCp src dest = do - res <- call $ _filesCp (Just src) (Just dest) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right _ -> putStrLn "The object has been copied to the specified destination" + call $ Api._filesCp (Just src) (Just dest) + pure "The object has been copied to the specified destination" -- | Flush a given path's data to disk. -filesFlush ::Text -> IO () -filesFlush mfsPath = do - res <- call $ _filesFlush $ Just mfsPath - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +filesFlush ::Text -> Ipfs Api.FilesFlushObj +filesFlush mfsPath = call $ Api._filesFlush $ Just mfsPath -- | List directories in the local mutable namespace. -filesLs :: Text -> IO () -filesLs mfsPath = do - res <- call $ _filesLs $ Just mfsPath - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +filesLs :: Text -> Ipfs Api.FilesLsObj +filesLs mfsPath = call $ Api._filesLs $ Just mfsPath -- | Make directories. -filesMkdir :: Text -> IO () +filesMkdir :: Text -> Ipfs Text filesMkdir mfsPath = do - res <- call $ _filesMkdir $ Just mfsPath - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right _ -> putStrLn "The Directory has been created on the specified path." + call $ Api._filesMkdir $ Just mfsPath + pure "The Directory has been created on the specified path." -- | Move files. -filesMv :: Text -> Text -> IO () +filesMv :: Text -> Text -> Ipfs Text filesMv src dest = do - res <- call $ _filesMv (Just src) (Just dest) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right _ -> putStrLn "The object has been moved to the specified destination" + call $ Api._filesMv (Just src) (Just dest) + pure "The object has been moved to the specified destination" -- | Read a file in a given mfs. -filesRead :: Text -> IO () -filesRead mfsPath = do - res <- call $ _filesRead $ Just mfsPath - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> TextIO.putStr v +filesRead :: Text -> Ipfs Api.FilesReadType +filesRead mfsPath = call $ Api._filesRead $ Just mfsPath -- | Display file status. -filesStat :: Text -> IO () -filesStat mfsPath = do - res <- call $ _filesStat $ Just mfsPath - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right v -> print v +filesStat :: Text -> Ipfs Api.FilesStatObj +filesStat mfsPath = call $ Api._filesStat $ Just mfsPath -- | Remove a file. -filesRm :: Text -> IO () +filesRm :: Text -> Ipfs Text filesRm mfsPath = do - res <- call $ _filesRm (Just mfsPath) (Just True) - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right _ -> putStrLn "The object has been removed." + call $ Api._filesRm (Just mfsPath) (Just True) + pure "The object has been removed." -- | Write to a mutable file in a given filesystem. filesWrite :: Text -> Text -> Bool -> IO() @@ -667,9 +465,7 @@ filesWrite mfsPath filePath toTruncate = do print $ statusCode $ Net.responseStatus responseVal -- | Shut down the ipfs daemon. -shutdown :: IO () +shutdown :: Ipfs Text shutdown = do - res <- call $ _shutdown - case res of - Left err -> putStrLn $ "Error: " ++ show err - Right _ -> putStrLn "The daemon has been shutdown, your welcome." + call $ Api._shutdown + pure "The daemon has been shutdown, your welcome." diff --git a/src/Network/Ipfs/Tests/IpfsTests.hs b/test/Network/Ipfs/Api/Key.hs similarity index 100% rename from src/Network/Ipfs/Tests/IpfsTests.hs rename to test/Network/Ipfs/Api/Key.hs From 3bfee6bb9bed8f3c9ce243e68db8332c2cec4720 Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 2 Sep 2019 03:42:29 +0530 Subject: [PATCH 112/237] Added Monadic Abstraction for multipartCall function and updated tests --- src/Network/Ipfs/Api/Ipfs.hs | 99 +++++++++++++++---------------- test/Network/Ipfs/Api/Key.hs | 55 ----------------- test/Network/Ipfs/Api/Test/Key.hs | 44 ++++++++++++++ 3 files changed, 93 insertions(+), 105 deletions(-) delete mode 100644 test/Network/Ipfs/Api/Key.hs create mode 100644 test/Network/Ipfs/Api/Test/Key.hs diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 364e0af7..7b005b39 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -26,7 +26,6 @@ import Control.Monad.Reader import Data.Aeson (decode) import Data.Text as TextS import qualified Data.Text.Encoding as TextS -import qualified Data.Text.IO as TextIO import qualified Data.ByteString.Lazy as BS (ByteString, fromStrict) import Network.HTTP.Client as Net hiding (Proxy) import Network.HTTP.Client.MultipartFormData @@ -41,12 +40,12 @@ import Network.Ipfs.Api.Multipart (AddObj) import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal, _pubsubSubscribe) -newtype IpfsT m a = IpfsT { unIpfs :: ReaderT (Manager, BaseUrl) (ExceptT ServantError m) a} +newtype IpfsT m a = IpfsT { unIpfs :: ReaderT (Manager, BaseUrl, String) (ExceptT ServantError m) a} deriving ( Functor , Applicative , Monad , MonadIO - , MonadReader (Manager, BaseUrl) + , MonadReader (Manager, BaseUrl, String) , MonadError ServantError ) @@ -55,22 +54,24 @@ instance MonadTrans IpfsT where type Ipfs a = IpfsT IO a +-- | 'IpfsT' monad runner. runIpfs' :: BaseUrl -> Ipfs a -> IO () runIpfs' url ipfs = do - manager <- liftIO $ newManager defaultManagerSettings - ret <- runExceptT (runReaderT (unIpfs ipfs) (manager, url)) + manager' <- liftIO $ newManager defaultManagerSettings + ret <- runExceptT (runReaderT (unIpfs ipfs) (manager', url, showBaseUrl url)) case ret of Left err -> putStrLn $ "Error: " ++ show err Right _ -> putStr "" +-- | 'IpfsT' monad runner with default arguments. runIpfs :: Ipfs a -> IO () -runIpfs = - runIpfs' (BaseUrl Http "localhost" 5001 "/api/v0") +runIpfs = runIpfs' (BaseUrl Http "localhost" 5001 "/api/v0") +-- | Regular Call function. call :: (ClientM a) -> Ipfs a call func = do - (manager, url) <- ask - resp <- lift (runClientM func (mkClientEnv manager url)) + (manager', url, _) <- ask + resp <- lift (runClientM func (mkClientEnv manager' url)) case resp of Left l -> throwError l Right r -> pure r @@ -84,12 +85,12 @@ streamCall func = do Right rs -> foreach fail print rs -- | Call function for ‘multipart/form-data’. -multipartCall :: Text -> Text -> IO (Net.Response BS.ByteString) -multipartCall uri filePath = do - reqManager <- newManager defaultManagerSettings - req <- parseRequest $ TextS.unpack uri - resp <- flip httpLbs reqManager =<< formDataBody form req - return (resp) +multipartCall :: Text -> Text -> Ipfs (Net.Response BS.ByteString) +multipartCall funcUri filePath = do + (reqManager, _, url) <- ask + req <- liftIO $ parseRequest $ TextS.unpack (( TextS.pack url ) <> (TextS.pack "/") <> funcUri ) + resp <- liftIO $ flip httpLbs reqManager =<< formDataBody form req + pure resp where form = [ partFileSource "file" $ TextS.unpack filePath ] @@ -98,11 +99,11 @@ cat :: Text -> Ipfs Api.CatReturnType cat hash = call $ Api._cat hash -- | Add a file or directory to ipfs. -add :: Text -> IO() -add filePath = do - responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/add") filePath - print (decode (Net.responseBody responseVal) :: Maybe AddObj) - +add :: Text -> Ipfs (Maybe AddObj) +add filePath = do + responseVal <- ( multipartCall (TextS.pack "add") filePath ) + pure (decode (Net.responseBody responseVal) :: Maybe AddObj) + -- | List directory contents for Unix filesystem objects. ls :: Text -> Ipfs Api.LsObj ls hash = call $ Api._ls hash @@ -188,11 +189,11 @@ blockGet :: Text -> Ipfs Api.BlockReturnType blockGet key = call $ Api._blockGet key -- | Store input as an IPFS block. -blockPut :: Text -> IO() +blockPut :: Text -> Ipfs (Maybe Api.BlockObj) blockPut filePath = do - responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/block/put") filePath - print (decode (Net.responseBody responseVal) :: Maybe Api.BlockObj) - + responseVal <- multipartCall (TextS.pack "block/put") filePath + pure (decode (Net.responseBody responseVal) :: Maybe Api.BlockObj) + -- | Print information of a raw IPFS block. blockStat :: Text -> Ipfs Api.BlockObj blockStat key = call $ Api._blockStat key @@ -206,10 +207,10 @@ dagResolve :: Text -> Ipfs Api.DagResolveObj dagResolve ref = call $ Api._dagResolve ref -- | Add a dag node to ipfs. -dagPut :: Text -> IO() +dagPut :: Text -> Ipfs (Maybe Api.DagPutObj) dagPut filePath = do - responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/dag/put") filePath - print (decode (Net.responseBody responseVal) :: Maybe Api.DagPutObj) + responseVal <- multipartCall (TextS.pack "dag/put") filePath + pure (decode (Net.responseBody responseVal) :: Maybe Api.DagPutObj) -- | Get ipfs config values. configGet :: Text -> Ipfs Api.ConfigObj @@ -220,13 +221,12 @@ configSet :: Text -> Text -> Ipfs Api.ConfigObj configSet key value = call $ Api._configSet key $ Just value -- | Replace the config with the file at . -configReplace :: Text -> IO() +configReplace :: Text -> Ipfs (Maybe Text) configReplace filePath = do - responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/config/replace") filePath - case statusCode $ Net.responseStatus responseVal of - 200 -> putStrLn "Config File Replaced Successfully with status code - " - _ -> putStrLn $ "Error occured with status code - " - print $ statusCode $ Net.responseStatus responseVal + responseVal <- multipartCall (TextS.pack "config/replace") filePath + pure $ case statusCode $ Net.responseStatus responseVal of + 200 -> Just $ "Config File Replaced Successfully with status code - " <> (TextS.pack "200") + _ -> Just $ "Error occured with status code - " <> (TextS.pack $ show (statusCode $ Net.responseStatus responseVal)) -- | Output the raw bytes of an IPFS object. objectData :: Text -> Ipfs Api.ObjectReturnType @@ -249,17 +249,17 @@ objectRmLink :: Text -> Text -> Ipfs Api.ObjectLinksObj objectRmLink key name = call $ Api._objectRmLink key (Just name) -- | Append data to what already exists in the data segment in the given object. -objectAppendData :: Text -> Text -> IO() +objectAppendData :: Text -> Text -> Ipfs (Maybe Api.ObjectLinksObj) objectAppendData key filePath = do - responseVal <- multipartCall ( ( TextS.pack "http://localhost:5001/api/v0/object/patch/append-data?arg=" ) <> key) filePath - print (decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj) + responseVal <- multipartCall ( ( TextS.pack "object/patch/append-data?arg=" ) <> key) filePath + pure ( decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj ) -- | Set the data field of an IPFS object. -objectSetData :: Text -> Text -> IO() +objectSetData :: Text -> Text -> Ipfs (Maybe Api.ObjectLinksObj) objectSetData key filePath = do - responseVal <- multipartCall ( ( TextS.pack "http://localhost:5001/api/v0/object/patch/set-data?arg=" ) <>key) filePath - print (decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj) - + responseVal <- multipartCall ( ( TextS.pack "object/patch/set-data?arg=" ) <> key) filePath + pure ( decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj ) + -- | Get and serialize the DAG node named by key. objectGet :: Text -> Ipfs Api.ObjectGetObj objectGet key = call $ Api._objectGet key @@ -269,12 +269,12 @@ objectDiff :: Text -> Text -> Ipfs Api.ObjectDiffObj objectDiff firstKey secondKey = call $ Api._objectDiff firstKey (Just secondKey) -- | Store input as a DAG object, print its key. -objectPut :: Text -> IO() +objectPut :: Text -> Ipfs ( Maybe Api.ObjectObj ) objectPut filePath = do - responseVal <- multipartCall (TextS.pack "http://localhost:5001/api/v0/object/put") filePath - print (decode ( Net.responseBody responseVal) :: Maybe Api.ObjectObj) + responseVal <- multipartCall (TextS.pack "object/put") filePath + pure (decode ( Net.responseBody responseVal) :: Maybe Api.ObjectObj) --- | Get stats for the DAG node named by key. + -- | Get stats for the DAG node named by key. objectStat :: Text -> Ipfs Api.ObjectStatObj objectStat key = call $ Api._objectStat key @@ -455,14 +455,13 @@ filesRm mfsPath = do pure "The object has been removed." -- | Write to a mutable file in a given filesystem. -filesWrite :: Text -> Text -> Bool -> IO() +filesWrite :: Text -> Text -> Bool -> Ipfs (Maybe Text) filesWrite mfsPath filePath toTruncate = do - responseVal <- multipartCall ((TextS.pack "http://localhost:5001/api/v0/files/write?arg=") + responseVal <- multipartCall ((TextS.pack "files/write?arg=") <> mfsPath <> (TextS.pack "&create=true") <> (TextS.pack "&truncate=") <> (TextS.pack $ show toTruncate) ) filePath - case statusCode $ Net.responseStatus responseVal of - 200 -> putStrLn "Config File Replaced Successfully with status code - " - _ -> putStrLn $ "Error occured with status code - " - print $ statusCode $ Net.responseStatus responseVal + pure $ case statusCode $ Net.responseStatus responseVal of + 200 -> Just $ "File has been written Successfully with status code - " <> (TextS.pack "200") + _ -> Just $ "Error occured with status code - " <> (TextS.pack $ show (statusCode $ Net.responseStatus responseVal)) -- | Shut down the ipfs daemon. shutdown :: Ipfs Text diff --git a/test/Network/Ipfs/Api/Key.hs b/test/Network/Ipfs/Api/Key.hs deleted file mode 100644 index 89cc1b33..00000000 --- a/test/Network/Ipfs/Api/Key.hs +++ /dev/null @@ -1,55 +0,0 @@ - --- | --- Module : Network.Ipfs.Tests.IpfsTest --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Module containing Ipfs command functions. --- - -module Network.Ipfs.Tests.IpfsTests where - -import Data.Text as TextS -import Control.Exception() -import Test.Hspec - -import Network.Ipfs.Api.Api (KeyDetailsObj(..), KeyObj(..)) -import Network.Ipfs.Api.Ipfs (keyGen, keyList, keyRm) - -main :: IO () -main = hspec $ do - describe "keyGen" $ do - it "should return the given key name in its response" $ do - res <- keyGen (pack "TestA") (pack "rsa") - ( case res of - Left err -> (pack ("Error: " ++ show err)) - Right v -> keyName v ) `shouldBe` (pack "TestA") - - it "KeyDetailsObj returned by KeyGen should be present in the KeyObj's list returned returned by KeyList" $ do - resGen <- keyGen (pack "TestB") (pack "rsa") - resList <- keyList - (case resList of - Left _ -> [KeyDetailsObj (pack "Incorrect") ((pack "Incorrect"))] - Right v -> keys v ) `shouldContain` ( case resGen of - Left _ -> [KeyDetailsObj (pack "More Incorrect") ((pack "MORE Incorrect"))] - Right v -> [v] ) - - describe "keyRm" $ do - it "should return the given key name in its response" $ do - res <- keyRm (pack "TestA") - ( case res of - Left err -> (pack ("Error: " ++ show err)) - Right v -> keyName $ Prelude.head $ keys v ) `shouldBe` (pack "TestA") - - it "KeyDetailsObj returned by KeyRm should not be present in the KeyObj's list returned returned by KeyList" $ do - resRm <- keyRm (pack "TestB") - resList <- keyList - (case resList of - Left _ -> [KeyDetailsObj (pack "Incorrect") ((pack "Incorrect"))] - Right v -> keys v ) `shouldNotContain` ( case resRm of - Left _ -> [KeyDetailsObj (pack "More Incorrect") ((pack "MORE Incorrect"))] - Right v -> keys v ) \ No newline at end of file diff --git a/test/Network/Ipfs/Api/Test/Key.hs b/test/Network/Ipfs/Api/Test/Key.hs new file mode 100644 index 00000000..068b9c56 --- /dev/null +++ b/test/Network/Ipfs/Api/Test/Key.hs @@ -0,0 +1,44 @@ + +-- | +-- Module : Network.Ipfs.Api.Test.Key +-- Copyright : Alexander Krupenkin 2016-2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Module containing Ipfs command functions. +-- + +module Network.Ipfs.Api.Test.Key where + +import Data.Text as TextS +import Control.Exception() +import Control.Monad.Trans +import Test.Hspec + +import Network.Ipfs.Api.Api (KeyDetailsObj(..), KeyObj(..)) +import Network.Ipfs.Api.Ipfs (keyGen, keyList, keyRm,runIpfs) + +main :: IO () +main = hspec $ do + describe "keyGen" $ do + it "should return the given key name in its response" $ runIpfs $ do + res <- keyGen (pack "TestA") (pack "rsa") + liftIO $ ( keyName res ) `shouldBe` (pack "TestA") + + it "KeyDetailsObj returned by KeyGen should be present in the KeyObj's list returned returned by KeyList" $ runIpfs $ do + resGen <- keyGen (pack "TestB") (pack "rsa") + resList <- keyList + liftIO $ (keys resList) `shouldContain` ( [resGen] ) + + describe "keyRm" $ do + it "should return the given key name in its response" $ runIpfs $ do + res <- keyRm (pack "TestA") + liftIO $ ( keyName $ Prelude.head $ keys res ) `shouldBe` (pack "TestA") + + it "KeyDetailsObj returned by KeyRm should not be present in the KeyObj's list returned returned by KeyList" $ runIpfs $ do + resRm <- keyRm (pack "TestB") + resList <- keyList + liftIO $ (keys resList) `shouldNotContain` (keys resRm) \ No newline at end of file From 8643f6a8023d5e3b47653e93bed614db10db679e Mon Sep 17 00:00:00 2001 From: Charles Crain Date: Fri, 7 Dec 2018 19:09:02 -0400 Subject: [PATCH 113/237] support tuples created by --- src/Language/Solidity/Abi.hs | 31 +++++++-- src/Network/Ethereum/Contract/TH.hs | 40 +++++++----- unit/Language/Solidity/Test/AbiSpec.hs | 63 +++++++++++++++++++ unit/Network/Ethereum/Contract/Test/THSpec.hs | 26 ++++++++ 4 files changed, 138 insertions(+), 22 deletions(-) create mode 100644 unit/Language/Solidity/Test/AbiSpec.hs create mode 100644 unit/Network/Ethereum/Contract/Test/THSpec.hs diff --git a/src/Language/Solidity/Abi.hs b/src/Language/Solidity/Abi.hs index 3a02838b..b39798eb 100644 --- a/src/Language/Solidity/Abi.hs +++ b/src/Language/Solidity/Abi.hs @@ -28,7 +28,8 @@ module Language.Solidity.Abi -- * Solidity type parser , SolidityType(..) - , parseSolidityType + , parseSolidityFunctionArgType + , parseSolidityEventArgType ) where import Control.Monad (void) @@ -54,6 +55,8 @@ data FunctionArg = FunctionArg -- ^ Argument name , funArgType :: Text -- ^ Argument type + , funArgComponents :: Maybe [FunctionArg] + -- ^ Argument components for tuples } deriving (Show, Eq, Ord) $(deriveJSON @@ -166,15 +169,22 @@ signature :: Declaration -> Text signature (DConstructor inputs) = "(" <> args inputs <> ")" where - args :: [FunctionArg] -> Text - args = T.dropEnd 1 . foldMap (<> ",") . fmap funArgType + args [] = "" + args [x] = funArgType x + args (x:xs) = case funArgComponents x of + Nothing -> funArgType x <> "," <> args xs + Just cmps -> "(" <> args cmps <> ")," <> args xs signature (DFallback _) = "()" signature (DFunction name _ inputs _) = name <> "(" <> args inputs <> ")" where args :: [FunctionArg] -> Text - args = T.dropEnd 1 . foldMap (<> ",") . fmap funArgType + args [] = "" + args [x] = funArgType x + args (x:xs) = case funArgComponents x of + Nothing -> funArgType x <> "," <> args xs + Just cmps -> "(" <> args cmps <> ")," <> args xs signature (DEvent name inputs _) = name <> "(" <> args inputs <> ")" where @@ -207,6 +217,7 @@ data SolidityType = | SolidityString | SolidityBytesN Int | SolidityBytes + | SolidityTuple Int [SolidityType] | SolidityVector [Int] SolidityType | SolidityArray SolidityType deriving (Eq, Show) @@ -280,5 +291,13 @@ solidityTypeParser = , solidityBasicTypeParser ] -parseSolidityType :: Text -> Either ParseError SolidityType -parseSolidityType = parse solidityTypeParser "Solidity" +parseSolidityFunctionArgType :: FunctionArg -> Either ParseError SolidityType +parseSolidityFunctionArgType (FunctionArg _ typ mcmps) = case mcmps of + Nothing -> parse solidityTypeParser "Solidity" typ + Just cmps -> + SolidityTuple (length cmps) + <$> mapM parseSolidityFunctionArgType cmps + + +parseSolidityEventArgType :: EventArg -> Either ParseError SolidityType +parseSolidityEventArgType (EventArg _ typ _) = parse solidityTypeParser "Solidity" typ diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 99f8bdf5..73d486d2 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -74,7 +74,7 @@ import Language.Solidity.Abi (ContractAbi (..), EventArg (..), FunctionArg (..), SolidityType (..), eventId, - methodId, parseSolidityType) + methodId, parseSolidityFunctionArgType, parseSolidityEventArgType) import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Api.Types (DefaultBlock (..), Filter (..), TxReceipt) @@ -118,6 +118,7 @@ toHSType s = case s of SolidityString -> conT ''Text SolidityBytesN n -> appT (conT ''BytesN) (numLit n) SolidityBytes -> conT ''Bytes + SolidityTuple n as -> foldl ( \b a -> appT b $ toHSType a ) ( tupleT n ) as SolidityVector ns a -> expandVector ns a SolidityArray a -> appT listT $ toHSType a where @@ -130,15 +131,21 @@ toHSType s = case s of else conT ''ListN `appT` numLit n `appT` expandVector rest a _ -> error $ "Impossible Nothing branch in `expandVector`: " ++ show ns ++ " " ++ show a -typeQ :: Text -> TypeQ -typeQ t = case parseSolidityType t of +typeFuncQ :: FunctionArg -> TypeQ +typeFuncQ t = case parseSolidityFunctionArgType t of Left e -> error $ "Unable to parse solidity type: " ++ show e Right ty -> toHSType ty +typeEventQ :: EventArg -> TypeQ +typeEventQ t = case parseSolidityEventArgType t of + Left e -> error $ "Unable to parse solidity type: " ++ show e + Right ty -> toHSType ty + + -- | Function argument to TH type funBangType :: FunctionArg -> BangTypeQ -funBangType (FunctionArg _ typ) = - bangType (bang sourceNoUnpack sourceStrict) (typeQ typ) +funBangType fa = + bangType (bang sourceNoUnpack sourceStrict) (typeFuncQ fa) funWrapper :: Bool -- ^ Is constant? @@ -159,11 +166,11 @@ funWrapper c name dname args result = do let params = appsE $ conE dname : fmap varE vars - inputT = fmap (typeQ . funArgType) args + inputT = fmap typeFuncQ args outputT = case result of Nothing -> [t|$t $m ()|] - Just [x] -> [t|$t $m $(typeQ $ funArgType x)|] - Just xs -> let outs = fmap (typeQ . funArgType) xs + Just [x] -> [t|$t $m $(typeFuncQ x)|] + Just xs -> let outs = fmap typeFuncQ xs in [t|$t $m $(foldl appT (tupleT (length xs)) outs)|] sequence [ @@ -193,7 +200,7 @@ mkDecl ev@(DEvent uncheckedName inputs anonymous) = sequence , instanceD' nonIndexedName (conT ''Generic) [] , instanceD' nonIndexedName (conT ''AbiType) [funD' 'isDynamic [] [|const False|]] , instanceD' nonIndexedName (conT ''AbiGet) [] - , dataD' allName (recC allName (map (\(n, a) -> (\(b,t) -> return (n,b,t)) <=< toBang <=< typeQ $ a) allArgs)) derivingD + , dataD' allName (recC allName (map (\(n, a) -> (\(b,t) -> return (n,b,t)) <=< toBang <=< typeEventQ $ a) allArgs)) derivingD , instanceD' allName (conT ''Generic) [] , instanceD (cxt []) (pure $ ConT ''IndexedEvent `AppT` ConT indexedName `AppT` ConT nonIndexedName `AppT` ConT allName) @@ -206,13 +213,14 @@ mkDecl ev@(DEvent uncheckedName inputs anonymous) = sequence name = if Char.toLower (T.head uncheckedName) == Char.toUpper (T.head uncheckedName) then "EvT" <> uncheckedName else uncheckedName topics = [Just (T.unpack $ eventId ev)] <> replicate (length indexedArgs) Nothing toBang ty = bangType (bang sourceNoUnpack sourceStrict) (return ty) - tag (n, ty) = AppT (AppT (ConT ''Tagged) (LitT $ NumTyLit n)) <$> typeQ ty + tag (n, ty) = AppT (AppT (ConT ''Tagged) (LitT $ NumTyLit n)) <$> typeEventQ ty labeledArgs = zip [1..] inputs - indexedArgs = map (\(n, ea) -> (n, eveArgType ea)) . filter (eveArgIndexed . snd) $ labeledArgs + indexedArgs = map (\(n, ea) -> (n, ea)) . filter (eveArgIndexed . snd) $ labeledArgs indexedName = mkName $ toUpperFirst (T.unpack name) <> "Indexed" - nonIndexedArgs = map (\(n, ea) -> (n, eveArgType ea)) . filter (not . eveArgIndexed . snd) $ labeledArgs + nonIndexedArgs = map (\(n, ea) -> (n, ea)) . filter (not . eveArgIndexed . snd) $ labeledArgs nonIndexedName = mkName $ toUpperFirst (T.unpack name) <> "NonIndexed" - allArgs = makeArgs name $ map (\i -> (eveArgName i, eveArgType i)) inputs + allArgs :: [(Name, EventArg)] + allArgs = makeArgs name $ map (\i -> (eveArgName i, i)) inputs allName = mkName $ toUpperFirst (T.unpack name) derivingD = [''Show, ''Eq, ''Ord, ''GHC.Generic] @@ -265,11 +273,11 @@ mkContractDecl _ _ _ _ = return [] -- | arg_name -> evArg_name -- | _argName -> evArgName -- | "" -> evi , for example Transfer(address, address uint256) ~> Transfer {transfer1 :: address, transfer2 :: address, transfer3 :: Integer} -makeArgs :: Text -> [(Text, Text)] -> [(Name, Text)] +makeArgs :: Text -> [(Text, EventArg)] -> [(Name, EventArg)] makeArgs prefix ns = go 1 ns where prefixStr = toLowerFirst . T.unpack $ prefix - go :: Int -> [(Text, Text)] -> [(Name, Text)] + go :: Int -> [(Text, EventArg)] -> [(Name, EventArg)] go _ [] = [] go i ((h, ty) : tail') | T.null h = (mkName $ prefixStr ++ show i, ty) : go (i + 1) tail' @@ -323,7 +331,7 @@ constructorSpec str = do -- | Abi to declarations converter quoteAbiDec :: String -> DecsQ quoteAbiDec str = - case str ^? _JSON <|> str ^? key "abi" . _JSON of + case str ^? _JSON <|> str ^? key "abi" . _JSON <|> str ^? key "compilerOutput" . key "abi" . _JSON of Nothing -> fail "Unable to decode contract ABI" Just (ContractAbi decs) -> do funEvDecs <- concat <$> mapM mkDecl (escape decs) diff --git a/unit/Language/Solidity/Test/AbiSpec.hs b/unit/Language/Solidity/Test/AbiSpec.hs new file mode 100644 index 00000000..db1ee6cb --- /dev/null +++ b/unit/Language/Solidity/Test/AbiSpec.hs @@ -0,0 +1,63 @@ +{-# LANGUAGE OverloadedStrings #-} +module Language.Solidity.Test.AbiSpec where + + +import Test.Hspec +import Data.Either (isLeft) +import Language.Solidity.Abi + + +spec :: Spec +spec = do + describe "parseSolidityType" $ + describe "tuple type" $ do + it "can parses a FunctionArg with tuple type" $ do + let maa = FunctionArg "makerAssetAmount" "uint256" Nothing + ma = FunctionArg "makeAddress" "address" Nothing + tupleFA = FunctionArg "order" "tuple" (Just [maa, ma]) + eRes = parseSolidityFunctionArgType tupleFA + eRes `shouldBe` Right (SolidityTuple 2 [SolidityUint 256, SolidityAddress]) + it "fails to parse a FunctionArg with invalid tuple" $ do + let tupleFA = FunctionArg "order" "tuple" Nothing + eRes = parseSolidityFunctionArgType tupleFA + isLeft eRes `shouldBe` True + describe "signature" $ + it "can generate signature for fillOrder" $ do + let fillOrderDec = buildFillOrderDec + expected = "fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)" + sig = signature fillOrderDec + sig `shouldBe` expected + describe "methodId" $ + it "can generate methodId for fillOrder" $ do + let fillOrderDec = buildFillOrderDec + expected = "0xb4be83d5" + mId = methodId fillOrderDec + mId `shouldBe` expected + +buildFillOrderDec :: Declaration +buildFillOrderDec = DFunction "fillOrder" False funInputs' funOutputs' + where + funInputs' = + [ makeTupleFuncArg ("order", "tuple") tupleComponents + , makeBasicFuncArg ("takerAssetFillAmount", "uint256") + , makeBasicFuncArg ("signature", "bytes") + ] + tupleComponents = + [ ("makerAddress", "address") + , ("takerAddress", "address") + , ("feeRecipientAddress", "address") + , ("senderAddress", "address") + , ("makerAssetAmount", "uint256") + , ("takerAssetAmount", "uint256") + , ("makerFee", "uint256") + , ("takerFee", "uint256") + , ("expirationTimeSeconds", "uint256") + , ("salt", "uint256") + , ("makerAssetData", "bytes") + , ("takerAssetData", "bytes") + ] + funOutputs' = Nothing + makeBasicFuncArg (n,t) = + FunctionArg n t Nothing + makeTupleFuncArg (n,t) cmps = + FunctionArg n t (Just $ map makeBasicFuncArg cmps) diff --git a/unit/Network/Ethereum/Contract/Test/THSpec.hs b/unit/Network/Ethereum/Contract/Test/THSpec.hs new file mode 100644 index 00000000..d9699262 --- /dev/null +++ b/unit/Network/Ethereum/Contract/Test/THSpec.hs @@ -0,0 +1,26 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} +module Network.Ethereum.Contract.Test.THSpec where + + +import Test.Hspec +import Network.Ethereum.Contract.TH + + +-- Contract with Tuples taken from: +-- https://raw.githubusercontent.com/0xProject/0x-monorepo/%400x/website%400.0.89/packages/contract-artifacts/artifacts/Exchange.json +[abiFrom|test/contracts/Exchange.json|] + +spec :: Spec +spec = + describe "quasi-quoter" $ + it "can compile contract with tuples" $ + True `shouldBe` True + + + From 41bb2abf4acf9e986c15e2e3df7749d3d9ac1d54 Mon Sep 17 00:00:00 2001 From: Charles Crain Date: Tue, 10 Sep 2019 09:37:45 -0700 Subject: [PATCH 114/237] test fixture --- test/contracts/Exchange.json | 1059 +++++++++++++++++ unit/Network/Ethereum/Contract/Test/THSpec.hs | 2 +- 2 files changed, 1060 insertions(+), 1 deletion(-) create mode 100644 test/contracts/Exchange.json diff --git a/test/contracts/Exchange.json b/test/contracts/Exchange.json new file mode 100644 index 00000000..7de41066 --- /dev/null +++ b/test/contracts/Exchange.json @@ -0,0 +1,1059 @@ +{ + "schemaVersion": "2.0.0", + "contractName": "Exchange", + "compilerOutput": { + "abi": [ + { + "constant": true, + "inputs": [{ "name": "", "type": "bytes32" }], + "name": "filled", + "outputs": [{ "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "orders", + "type": "tuple[]" + }, + { "name": "takerAssetFillAmounts", "type": "uint256[]" }, + { "name": "signatures", "type": "bytes[]" } + ], + "name": "batchFillOrders", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "totalFillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "", "type": "bytes32" }], + "name": "cancelled", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "hash", "type": "bytes32" }, + { "name": "signerAddress", "type": "address" }, + { "name": "signature", "type": "bytes" } + ], + "name": "preSign", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "leftOrder", + "type": "tuple" + }, + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "rightOrder", + "type": "tuple" + }, + { "name": "leftSignature", "type": "bytes" }, + { "name": "rightSignature", "type": "bytes" } + ], + "name": "matchOrders", + "outputs": [ + { + "components": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "left", + "type": "tuple" + }, + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "right", + "type": "tuple" + }, + { "name": "leftMakerAssetSpreadAmount", "type": "uint256" } + ], + "name": "matchedFillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "order", + "type": "tuple" + }, + { "name": "takerAssetFillAmount", "type": "uint256" }, + { "name": "signature", "type": "bytes" } + ], + "name": "fillOrderNoThrow", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "fillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "", "type": "bytes4" }], + "name": "assetProxies", + "outputs": [{ "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "orders", + "type": "tuple[]" + } + ], + "name": "batchCancelOrders", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "orders", + "type": "tuple[]" + }, + { "name": "takerAssetFillAmounts", "type": "uint256[]" }, + { "name": "signatures", "type": "bytes[]" } + ], + "name": "batchFillOrKillOrders", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "totalFillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "name": "targetOrderEpoch", "type": "uint256" }], + "name": "cancelOrdersUpTo", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "orders", + "type": "tuple[]" + }, + { "name": "takerAssetFillAmounts", "type": "uint256[]" }, + { "name": "signatures", "type": "bytes[]" } + ], + "name": "batchFillOrdersNoThrow", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "totalFillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "assetProxyId", "type": "bytes4" }], + "name": "getAssetProxy", + "outputs": [{ "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "", "type": "bytes32" }], + "name": "transactions", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "order", + "type": "tuple" + }, + { "name": "takerAssetFillAmount", "type": "uint256" }, + { "name": "signature", "type": "bytes" } + ], + "name": "fillOrKillOrder", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "fillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "name": "validatorAddress", "type": "address" }, { "name": "approval", "type": "bool" }], + "name": "setSignatureValidatorApproval", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "", "type": "address" }, { "name": "", "type": "address" }], + "name": "allowedValidators", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "orders", + "type": "tuple[]" + }, + { "name": "takerAssetFillAmount", "type": "uint256" }, + { "name": "signatures", "type": "bytes[]" } + ], + "name": "marketSellOrders", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "totalFillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "orders", + "type": "tuple[]" + } + ], + "name": "getOrdersInfo", + "outputs": [ + { + "components": [ + { "name": "orderStatus", "type": "uint8" }, + { "name": "orderHash", "type": "bytes32" }, + { "name": "orderTakerAssetFilledAmount", "type": "uint256" } + ], + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "", "type": "bytes32" }, { "name": "", "type": "address" }], + "name": "preSigned", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [{ "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "name": "hash", "type": "bytes32" }, + { "name": "signerAddress", "type": "address" }, + { "name": "signature", "type": "bytes" } + ], + "name": "isValidSignature", + "outputs": [{ "name": "isValid", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "orders", + "type": "tuple[]" + }, + { "name": "makerAssetFillAmount", "type": "uint256" }, + { "name": "signatures", "type": "bytes[]" } + ], + "name": "marketBuyOrdersNoThrow", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "totalFillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "order", + "type": "tuple" + }, + { "name": "takerAssetFillAmount", "type": "uint256" }, + { "name": "signature", "type": "bytes" } + ], + "name": "fillOrder", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "fillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "salt", "type": "uint256" }, + { "name": "signerAddress", "type": "address" }, + { "name": "data", "type": "bytes" }, + { "name": "signature", "type": "bytes" } + ], + "name": "executeTransaction", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "name": "assetProxy", "type": "address" }], + "name": "registerAssetProxy", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "order", + "type": "tuple" + } + ], + "name": "getOrderInfo", + "outputs": [ + { + "components": [ + { "name": "orderStatus", "type": "uint8" }, + { "name": "orderHash", "type": "bytes32" }, + { "name": "orderTakerAssetFilledAmount", "type": "uint256" } + ], + "name": "orderInfo", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "order", + "type": "tuple" + } + ], + "name": "cancelOrder", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "", "type": "address" }, { "name": "", "type": "address" }], + "name": "orderEpoch", + "outputs": [{ "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ZRX_ASSET_DATA", + "outputs": [{ "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "orders", + "type": "tuple[]" + }, + { "name": "takerAssetFillAmount", "type": "uint256" }, + { "name": "signatures", "type": "bytes[]" } + ], + "name": "marketSellOrdersNoThrow", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "totalFillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EIP712_DOMAIN_HASH", + "outputs": [{ "name": "", "type": "bytes32" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "makerAddress", "type": "address" }, + { "name": "takerAddress", "type": "address" }, + { "name": "feeRecipientAddress", "type": "address" }, + { "name": "senderAddress", "type": "address" }, + { "name": "makerAssetAmount", "type": "uint256" }, + { "name": "takerAssetAmount", "type": "uint256" }, + { "name": "makerFee", "type": "uint256" }, + { "name": "takerFee", "type": "uint256" }, + { "name": "expirationTimeSeconds", "type": "uint256" }, + { "name": "salt", "type": "uint256" }, + { "name": "makerAssetData", "type": "bytes" }, + { "name": "takerAssetData", "type": "bytes" } + ], + "name": "orders", + "type": "tuple[]" + }, + { "name": "makerAssetFillAmount", "type": "uint256" }, + { "name": "signatures", "type": "bytes[]" } + ], + "name": "marketBuyOrders", + "outputs": [ + { + "components": [ + { "name": "makerAssetFilledAmount", "type": "uint256" }, + { "name": "takerAssetFilledAmount", "type": "uint256" }, + { "name": "makerFeePaid", "type": "uint256" }, + { "name": "takerFeePaid", "type": "uint256" } + ], + "name": "totalFillResults", + "type": "tuple" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "currentContextAddress", + "outputs": [{ "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "VERSION", + "outputs": [{ "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "name": "_zrxAssetData", "type": "bytes" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "signerAddress", "type": "address" }, + { "indexed": true, "name": "validatorAddress", "type": "address" }, + { "indexed": false, "name": "approved", "type": "bool" } + ], + "name": "SignatureValidatorApproval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "makerAddress", "type": "address" }, + { "indexed": true, "name": "feeRecipientAddress", "type": "address" }, + { "indexed": false, "name": "takerAddress", "type": "address" }, + { "indexed": false, "name": "senderAddress", "type": "address" }, + { "indexed": false, "name": "makerAssetFilledAmount", "type": "uint256" }, + { "indexed": false, "name": "takerAssetFilledAmount", "type": "uint256" }, + { "indexed": false, "name": "makerFeePaid", "type": "uint256" }, + { "indexed": false, "name": "takerFeePaid", "type": "uint256" }, + { "indexed": true, "name": "orderHash", "type": "bytes32" }, + { "indexed": false, "name": "makerAssetData", "type": "bytes" }, + { "indexed": false, "name": "takerAssetData", "type": "bytes" } + ], + "name": "Fill", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "makerAddress", "type": "address" }, + { "indexed": true, "name": "feeRecipientAddress", "type": "address" }, + { "indexed": false, "name": "senderAddress", "type": "address" }, + { "indexed": true, "name": "orderHash", "type": "bytes32" }, + { "indexed": false, "name": "makerAssetData", "type": "bytes" }, + { "indexed": false, "name": "takerAssetData", "type": "bytes" } + ], + "name": "Cancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "makerAddress", "type": "address" }, + { "indexed": true, "name": "senderAddress", "type": "address" }, + { "indexed": false, "name": "orderEpoch", "type": "uint256" } + ], + "name": "CancelUpTo", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "name": "id", "type": "bytes4" }, + { "indexed": false, "name": "assetProxy", "type": "address" } + ], + "name": "AssetProxyRegistered", + "type": "event" + } + ], + "devdoc": { + "methods": { + "batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])": { + "details": "Synchronously cancels multiple orders in a single transaction.", + "params": { "orders": "Array of order specifications." } + }, + "batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])": { + "details": "Synchronously executes multiple calls of fillOrKill.", + "params": { + "orders": "Array of order specifications.", + "signatures": "Proofs that orders have been created by makers.", + "takerAssetFillAmounts": "Array of desired amounts of takerAsset to sell in orders." + }, + "return": "Amounts filled and fees paid by makers and taker. NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets." + }, + "batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])": { + "details": "Synchronously executes multiple calls of fillOrder.", + "params": { + "orders": "Array of order specifications.", + "signatures": "Proofs that orders have been created by makers.", + "takerAssetFillAmounts": "Array of desired amounts of takerAsset to sell in orders." + }, + "return": "Amounts filled and fees paid by makers and taker. NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets." + }, + "batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])": { + "details": "Fills an order with specified parameters and ECDSA signature. Returns false if the transaction would otherwise revert.", + "params": { + "orders": "Array of order specifications.", + "signatures": "Proofs that orders have been created by makers.", + "takerAssetFillAmounts": "Array of desired amounts of takerAsset to sell in orders." + }, + "return": "Amounts filled and fees paid by makers and taker. NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets." + }, + "cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))": { + "details": "After calling, the order can not be filled anymore. Throws if order is invalid or sender does not have permission to cancel.", + "params": { "order": "Order to cancel. Order must be OrderStatus.FILLABLE." } + }, + "cancelOrdersUpTo(uint256)": { + "details": "Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch and senderAddress equal to msg.sender (or null address if msg.sender == makerAddress).", + "params": { + "targetOrderEpoch": "Orders created with a salt less or equal to this value will be cancelled." + } + }, + "executeTransaction(uint256,address,bytes,bytes)": { + "details": "Executes an exchange method call in the context of signer.", + "params": { + "data": "AbiV2 encoded calldata.", + "salt": "Arbitrary number to ensure uniqueness of transaction hash.", + "signature": "Proof of signer transaction by signer.", + "signerAddress": "Address of transaction signer." + } + }, + "fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)": { + "details": "Fills the input order. Reverts if exact takerAssetFillAmount not filled.", + "params": { + "order": "Order struct containing order specifications.", + "signature": "Proof that order has been created by maker.", + "takerAssetFillAmount": "Desired amount of takerAsset to sell." + } + }, + "fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)": { + "details": "Fills the input order.", + "params": { + "order": "Order struct containing order specifications.", + "signature": "Proof that order has been created by maker.", + "takerAssetFillAmount": "Desired amount of takerAsset to sell." + }, + "return": "Amounts filled and fees paid by maker and taker." + }, + "fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)": { + "details": "Fills the input order. Returns false if the transaction would otherwise revert.", + "params": { + "order": "Order struct containing order specifications.", + "signature": "Proof that order has been created by maker.", + "takerAssetFillAmount": "Desired amount of takerAsset to sell." + }, + "return": "Amounts filled and fees paid by maker and taker." + }, + "getAssetProxy(bytes4)": { + "details": "Gets an asset proxy.", + "params": { "assetProxyId": "Id of the asset proxy." }, + "return": "The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered." + }, + "getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))": { + "details": "Gets information about an order: status, hash, and amount filled.", + "params": { "order": "Order to gather information on." }, + "return": "OrderInfo Information about the order and its state. See LibOrder.OrderInfo for a complete description." + }, + "getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])": { + "details": "Fetches information for all passed in orders.", + "params": { "orders": "Array of order specifications." }, + "return": "Array of OrderInfo instances that correspond to each order." + }, + "isValidSignature(bytes32,address,bytes)": { + "details": "Verifies that a hash has been signed by the given signer.", + "params": { + "hash": "Any 32 byte hash.", + "signature": "Proof that the hash has been signed by signer.", + "signerAddress": "Address that should have signed the given hash." + }, + "return": "True if the address recovered from the provided signature matches the input signer address." + }, + "marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])": { + "details": "Synchronously executes multiple calls of fillOrder until total amount of makerAsset is bought by taker.", + "params": { + "makerAssetFillAmount": "Desired amount of makerAsset to buy.", + "orders": "Array of order specifications.", + "signatures": "Proofs that orders have been signed by makers." + }, + "return": "Amounts filled and fees paid by makers and taker." + }, + "marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])": { + "details": "Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker. Returns false if the transaction would otherwise revert.", + "params": { + "makerAssetFillAmount": "Desired amount of makerAsset to buy.", + "orders": "Array of order specifications.", + "signatures": "Proofs that orders have been signed by makers." + }, + "return": "Amounts filled and fees paid by makers and taker." + }, + "marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])": { + "details": "Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker.", + "params": { + "orders": "Array of order specifications.", + "signatures": "Proofs that orders have been created by makers.", + "takerAssetFillAmount": "Desired amount of takerAsset to sell." + }, + "return": "Amounts filled and fees paid by makers and taker." + }, + "marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])": { + "details": "Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker. Returns false if the transaction would otherwise revert.", + "params": { + "orders": "Array of order specifications.", + "signatures": "Proofs that orders have been signed by makers.", + "takerAssetFillAmount": "Desired amount of takerAsset to sell." + }, + "return": "Amounts filled and fees paid by makers and taker." + }, + "matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)": { + "details": "Match two complementary orders that have a profitable spread. Each order is filled at their respective price point. However, the calculations are carried out as though the orders are both being filled at the right order's price point. The profit made by the left order goes to the taker (who matched the two orders).", + "params": { + "leftOrder": "First order to match.", + "leftSignature": "Proof that order was created by the left maker.", + "rightOrder": "Second order to match.", + "rightSignature": "Proof that order was created by the right maker." + }, + "return": "matchedFillResults Amounts filled and fees paid by maker and taker of matched orders." + }, + "preSign(bytes32,address,bytes)": { + "details": "Approves a hash on-chain using any valid signature type. After presigning a hash, the preSign signature type will become valid for that hash and signer.", + "params": { + "signature": "Proof that the hash has been signed by signer.", + "signerAddress": "Address that should have signed the given hash." + } + }, + "registerAssetProxy(address)": { + "details": "Registers an asset proxy to its asset proxy id. Once an asset proxy is registered, it cannot be unregistered.", + "params": { "assetProxy": "Address of new asset proxy to register." } + }, + "setSignatureValidatorApproval(address,bool)": { + "details": "Approves/unnapproves a Validator contract to verify signatures on signer's behalf.", + "params": { + "approval": "Approval or disapproval of Validator contract.", + "validatorAddress": "Address of Validator contract." + } + } + } + }, + "evm": { + "bytecode": { + "object": "0x60806040526000805460ff191690553480156200001b57600080fd5b5060405162005ec038038062005ec083398101806040526200004191908101906200044d565b80518190620000589060019060208401906200034c565b5050604080517f454950373132446f6d61696e28000000000000000000000000000000000000006020808301919091527f737472696e67206e616d652c0000000000000000000000000000000000000000602d8301527f737472696e672076657273696f6e2c000000000000000000000000000000000060398301527f6164647265737320766572696679696e67436f6e74726163740000000000000060488301527f2900000000000000000000000000000000000000000000000000000000000000606183015282516042818403018152606290920192839052815191929182918401908083835b60208310620001625780518252601f19909201916020918201910162000141565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208285018552600b8084527f30782050726f746f636f6c000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620001ec5780518252601f199092019160209182019101620001cb565b51815160209384036101000a600019018019909216911617905260408051929094018290038220828501855260018084527f3200000000000000000000000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620002765780518252601f19909201916020918201910162000255565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282019890985281840196909652606081019690965250306080808701919091528151808703909101815260a09095019081905284519093849350850191508083835b60208310620003015780518252601f199092019160209182019101620002e0565b5181516000196020949094036101000a939093019283169219169190911790526040519201829003909120600255505060038054600160a060020a03191633179055506200050f9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200038f57805160ff1916838001178555620003bf565b82800160010185558215620003bf579182015b82811115620003bf578251825591602001919060010190620003a2565b50620003cd929150620003d1565b5090565b620003ee91905b80821115620003cd5760008155600101620003d8565b90565b6000601f820183136200040357600080fd5b81516200041a6200041482620004b4565b6200048d565b915080825260208301602083018583830111156200043757600080fd5b62000444838284620004dc565b50505092915050565b6000602082840312156200046057600080fd5b81516001604060020a038111156200047757600080fd5b6200048584828501620003f1565b949350505050565b6040518181016001604060020a0381118282101715620004ac57600080fd5b604052919050565b60006001604060020a03821115620004cb57600080fd5b506020601f91909101601f19160190565b60005b83811015620004f9578181015183820152602001620004df565b8381111562000509576000848401525b50505050565b6159a1806200051f6000396000f3006080604052600436106101b65763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663288cdc9181146101bb578063297bb70b146101f15780632ac126221461021e5780633683ef8e1461024b5780633c28d8611461026d5780633e228bae1461029a5780633fd3c997146102ba5780634ac14782146102e75780634d0ae546146103075780634f9559b11461032757806350dde190146103475780636070410814610367578063642f2eaf1461039457806364a3bc15146103b457806377fcce68146103d45780637b8e3514146103f45780637e1d9808146104145780637e9d74dc1461043457806382c174d0146104615780638da5cb5b146104815780639363470214610496578063a3e20380146104b6578063b4be83d5146104d6578063bfc8bfce146104f6578063c585bb9314610516578063c75e0a8114610536578063d46b02c314610563578063d9bfa73e14610583578063db123b1a146105a3578063dd1c7d18146105c5578063e306f779146105e5578063e5fa431b146105fa578063eea086ba1461061a578063f2fde38b1461062f578063ffa1ad741461064f575b600080fd5b3480156101c757600080fd5b506101db6101d63660046148ee565b610664565b6040516101e89190615513565b60405180910390f35b3480156101fd57600080fd5b5061021161020c366004614811565b610676565b6040516101e891906157ed565b34801561022a57600080fd5b5061023e6102393660046148ee565b6107a1565b6040516101e89190615505565b34801561025757600080fd5b5061026b61026636600461492b565b6107b6565b005b34801561027957600080fd5b5061028d610288366004614a5f565b6108a3565b6040516101e891906157fb565b3480156102a657600080fd5b506102116102b5366004614b1f565b610a3a565b3480156102c657600080fd5b506102da6102d53660046149ee565b610a90565b6040516101e891906155cf565b3480156102f357600080fd5b5061026b6103023660046147dc565b610ab8565b34801561031357600080fd5b50610211610322366004614811565b610b85565b34801561033357600080fd5b5061026b6103423660046148ee565b610c75565b34801561035357600080fd5b50610211610362366004614811565b610e2a565b34801561037357600080fd5b506103876103823660046149ee565b610ebe565b6040516101e89190615425565b3480156103a057600080fd5b5061023e6103af3660046148ee565b610f0c565b3480156103c057600080fd5b506102116103cf366004614b1f565b610f21565b3480156103e057600080fd5b5061026b6103ef3660046147ac565b610fcc565b34801561040057600080fd5b5061023e61040f366004614772565b611106565b34801561042057600080fd5b5061021161042f3660046148a5565b611126565b34801561044057600080fd5b5061045461044f3660046147dc565b61128a565b6040516101e891906154f4565b34801561046d57600080fd5b5061023e61047c36600461490c565b61131f565b34801561048d57600080fd5b5061038761133f565b3480156104a257600080fd5b5061023e6104b1366004614993565b61135b565b3480156104c257600080fd5b506102116104d13660046148a5565b6118de565b3480156104e257600080fd5b506102116104f1366004614b1f565b6119f1565b34801561050257600080fd5b5061026b610511366004614b68565b611a6c565b34801561052257600080fd5b5061026b610531366004614754565b611d05565b34801561054257600080fd5b50610556610551366004614a2a565b611f30565b6040516101e8919061580a565b34801561056f57600080fd5b5061026b61057e366004614a2a565b61202a565b34801561058f57600080fd5b506101db61059e366004614772565b6120c6565b3480156105af57600080fd5b506105b86120e3565b6040516101e891906155be565b3480156105d157600080fd5b506102116105e03660046148a5565b61218e565b3480156105f157600080fd5b506101db612263565b34801561060657600080fd5b506102116106153660046148a5565b612269565b34801561062657600080fd5b506103876123db565b34801561063b57600080fd5b5061026b61064a366004614754565b6123f7565b34801561065b57600080fd5b506105b86124a8565b60046020526000908152604090205481565b61067e614386565b600080610689614386565b60005460ff16156106cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610758878381518110151561071957fe5b90602001906020020151878481518110151561073157fe5b90602001906020020151878581518110151561074957fe5b906020019060200201516124df565b9050610764848261257d565b600190910190610701565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509392505050565b60056020526000908152604090205460ff1681565b73ffffffffffffffffffffffffffffffffffffffff831633146108465761080e848484848080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515610846576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061569d565b5050600091825260076020908152604080842073ffffffffffffffffffffffffffffffffffffffff9093168452919052902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6108ab6143af565b6108b36143de565b6108bb6143de565b6000805460ff16156108f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561016080890151610140808a01919091528901519088015261094588611f30565b925061095087611f30565b915061095a6125df565b905061096888848389612611565b61097487838388612611565b61097e88886127a9565b610992888885604001518560400151612809565b8051602081015190519195506109ad918a9186918190612990565b6020808501519081015190516109c99189918591908190612990565b6109e28882856020015186604001518860000151612aa9565b6109fb8782846020015185604001518860200151612aa9565b610a0788888387612b55565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550949350505050565b610a42614386565b6060610a4f858585612d2d565b9050608081825160208401305af48015610a8657815183526020820151602084015260408201516040840152606082015160608401525b505b509392505050565b600b6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60008054819060ff1615610af8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558151905b808214610b5857610b508382815181101515610b4157fe5b90602001906020020151612eff565b600101610b29565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b610b8d614386565b600080610b98614386565b60005460ff1615610bd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610c5e8783815181101515610c1f57fe5b906020019060200201518784815181101515610c3757fe5b906020019060200201518785815181101515610c4f57fe5b90602001906020020151612f2a565b9050610c6a848261257d565b600190910190610c07565b6000805481908190819060ff1615610cb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610cec6125df565b935073ffffffffffffffffffffffffffffffffffffffff84163314610d115733610d14565b60005b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600660209081526040808320938516835292905220549093506001860192509050808211610d8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061572d565b73ffffffffffffffffffffffffffffffffffffffff80851660008181526006602090815260408083209488168084529490915290819020859055517f82af639571738f4ebd4268fb0363d8957ebe1bbb9e78dba5ebd69eed39b154f090610df3908690615513565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b610e32614386565b600080610e3d614386565b86519250600091505b818314610eb457610e9d8783815181101515610e5e57fe5b906020019060200201518784815181101515610e7657fe5b906020019060200201518785815181101515610e8e57fe5b90602001906020020151610a3a565b9050610ea9848261257d565b600190910190610e46565b5050509392505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff165b919050565b60096020526000908152604090205460ff1681565b610f29614386565b60005460ff1615610f66576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c848484612f2a565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055949350505050565b6000805460ff161561100a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561103d6125df565b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600860209081526040808320948916808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168715151790555192935090917fa8656e308026eeabce8f0bc18048433252318ab80ac79da0b3d3d8697dfba891906110d1908690615505565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b600860209081526000928352604080842090915290825290205460ff1681565b61112e614386565b6060600080600061113d614386565b60005460ff161561117a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815589518a919081106111b257fe5b906020019060200201516101600151945088519350600092505b828414611255578489848151811015156111e257fe5b906020019060200201516101600181905250611202888760200151612f7d565b915061122e898481518110151561121557fe5b9060200190602002015183898681518110151561074957fe5b905061123a868261257d565b6020860151881161124a57611255565b6001909201916111cc565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509195945050505050565b606060006060600084519250826040519080825280602002602001820160405280156112d057816020015b6112bd6143de565b8152602001906001900390816112b55790505b509150600090505b808314610a88576112ff85828151811015156112f057fe5b90602001906020020151611f30565b828281518110151561130d57fe5b602090810290910101526001016112d8565b600760209081526000928352604080842090915290825290205460ff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600080600080600089511115156113a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061571d565b6113ad89612fc4565b7f010000000000000000000000000000000000000000000000000000000000000090049650600760ff88161061140f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061563d565b8660ff16600781111561141e57fe5b9550600086600781111561142e57fe5b1415611466576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061570d565b600186600781111561147457fe5b14156114bc578851156114b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157dd565b600097506118d0565b60028660078111156114ca57fe5b141561160557885160411461150b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155dd565b88600081518110151561151a57fe5b01602001517f010000000000000000000000000000000000000000000000000000000000000090819004810204945061155a89600163ffffffff61308816565b935061156d89602163ffffffff61308816565b925060018b86868660405160008152602001604052604051611592949392919061556e565b60206040516020810390808403906000865af11580156115b6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff8c811690821614995092506118d09050565b600386600781111561161357fe5b14156117b9578851604114611654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155dd565b88600081518110151561166357fe5b01602001517f01000000000000000000000000000000000000000000000000000000000000009081900481020494506116a389600163ffffffff61308816565b93506116b689602163ffffffff61308816565b925060018b60405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061175757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161171a565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822060008352910192839052611592945092508991899150889061556e565b60048660078111156117c757fe5b14156117df576117d88b8b8b6130d3565b97506118d0565b60058660078111156117ed57fe5b1415611850576117fc89613228565b73ffffffffffffffffffffffffffffffffffffffff808c1660009081526008602090815260408083209385168352929052205490915060ff16151561184457600097506118d0565b6117d8818c8c8c6132a1565b600686600781111561185e57fe5b141561189e5760008b815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff8e16845290915290205460ff1697506118d0565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061563d565b505050505050509392505050565b6118e6614386565b60606000806000806118f6614386565b89600081518110151561190557fe5b906020019060200201516101400151955089519450600093505b8385146119e457858a8581518110151561193557fe5b6020908102909101015161014001528651611951908a90612f7d565b92506119948a8581518110151561196457fe5b9060200190602002015160a001518b8681518110151561198057fe5b9060200190602002015160800151856133fd565b91506119c08a858151811015156119a757fe5b90602001906020020151838a87815181101515610e8e57fe5b90506119cc878261257d565b865189116119d9576119e4565b60019093019261191f565b5050505050509392505050565b6119f9614386565b60005460ff1615611a36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c8484846124df565b600a5460009073ffffffffffffffffffffffffffffffffffffffff1615611abf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b611b02611afd888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843750613453945050505050565b613694565b60008181526009602052604090205490915060ff1615611b4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061568d565b73ffffffffffffffffffffffffffffffffffffffff86163314611c1f57611ba6818785858080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515611bde576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157cd565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88161790555b6000818152600960205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555130908690869080838380828437820191505092505050600060405180830381855af49150501515611cb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156bd565b73ffffffffffffffffffffffffffffffffffffffff86163314611cfc57600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b50505050505050565b6003546000908190819073ffffffffffffffffffffffffffffffffffffffff163314611d5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061577d565b8392508273ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611dc457600080fd5b505af1158015611dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dfc9190810190614a0c565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205490925073ffffffffffffffffffffffffffffffffffffffff1690508015611e81576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061561d565b7fffffffff0000000000000000000000000000000000000000000000000000000082166000908152600b60205260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c0319490611f2290849087906155a3565b60405180910390a150505050565b611f386143de565b611f41826136d1565b6020808301829052600091825260049052604090819020549082015260808201511515611f755760015b60ff168152610f07565b60a08201511515611f87576002611f6b565b60a0820151604082015110611f9d576005611f6b565b6101008201514210611fb0576004611f6b565b60208082015160009081526005909152604090205460ff1615611fd4576006611f6b565b610120820151825173ffffffffffffffffffffffffffffffffffffffff90811660009081526006602090815260408083206060880151909416835292905220541115612021576006611f6b565b60038152919050565b60005460ff1615612067576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561209b81612eff565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600660209081526000928352604080842090915290825290205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156121865780601f1061215b57610100808354040283529160200191612186565b820191906000526020600020905b81548152906001019060200180831161216957829003601f168201915b505050505081565b612196614386565b606060008060006121a5614386565b8860008151811015156121b457fe5b906020019060200201516101600151945088519350600092505b828414612257578489848151811015156121e457fe5b906020019060200201516101600181905250612204888760200151612f7d565b9150612230898481518110151561221757fe5b90602001906020020151838986815181101515610e8e57fe5b905061223c868261257d565b6020860151881161224c57612257565b6001909201916121ce565b50505050509392505050565b60025481565b612271614386565b6060600080600080612281614386565b60005460ff16156122be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558a518b919081106122f657fe5b906020019060200201516101400151955089519450600093505b8385146123a557858a8581518110151561232657fe5b6020908102909101015161014001528651612342908a90612f7d565b92506123558a8581518110151561196457fe5b91506123818a8581518110151561236857fe5b90602001906020020151838a8781518110151561074957fe5b905061238d878261257d565b8651891161239a576123a5565b600190930192612310565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550929695505050505050565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff163314612448576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061577d565b73ffffffffffffffffffffffffffffffffffffffff8116156124a557600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b60408051808201909152600581527f322e302e30000000000000000000000000000000000000000000000000000000602082015281565b6124e7614386565b6124ef6143de565b60008060006124fd88611f30565b93506125076125df565b925061251588858589612611565b6125278860a001518560400151612f7d565b915061253387836136df565b9050612546888589848960000151612990565b61255088826136f5565b945061256788848660200151876040015189612aa9565b612572888487613756565b505050509392505050565b8151815161258b9190613864565b8252602080830151908201516125a19190613864565b6020830152604080830151908201516125ba9190613864565b6040830152606080830151908201516125d39190613864565b60609092019190915250565b600a5460009073ffffffffffffffffffffffffffffffffffffffff16818115612608578161260a565b335b9392505050565b825160ff1660031461264f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061579d565b606084015173ffffffffffffffffffffffffffffffffffffffff16156126c257606084015173ffffffffffffffffffffffffffffffffffffffff1633146126c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157ad565b602084015173ffffffffffffffffffffffffffffffffffffffff161561274d578173ffffffffffffffffffffffffffffffffffffffff16846020015173ffffffffffffffffffffffffffffffffffffffff1614151561274d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155ed565b604083015115156127a35761276b836020015185600001518361135b565b15156127a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061565d565b50505050565b6127bb8260a001518260a001516138ae565b6127cd836080015183608001516138ae565b1015612805576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157bd565b5050565b6128116143af565b6000806000806128258960a0015188612f7d565b935061283a89608001518a60a0015186613909565b925061284a8860a0015187612f7d565b915061285f88608001518960a0015184613909565b90508084106128a25760208086018051839052805182018490525151865182015260808a015160a08b015187519092015161289a9290613909565b8551526128df565b845183905284516020908101859052855181015190860180519190915260a089015160808a01519151516128d69290613986565b60208087015101525b84515160208087015101516128f49190612f7d565b604086015284515160808a015160c08b0151612911929190613909565b85516040015284516020015160a08a015160e08b0151612932929190613909565b855160600152602085015151608089015160c08a0151612953929190613909565b8560200151604001818152505061297b8560200151602001518960a001518a60e00151613909565b60208601516060015250505050949350505050565b8215156129c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156dd565b82821115612a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156cd565b8460a00151612a16856040015184613864565b1115612a4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155fd565b612a5c8560800151836138ae565b612a6a828760a001516138ae565b1115612aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061575d565b5050505050565b612ab7828260200151613864565b600084815260046020908152604091829020929092558681015187518451938501518584015160608701516101408c01516101608d015196518b9873ffffffffffffffffffffffffffffffffffffffff9788169897909616967f0bcc4c97732e47d9946f229edb95f5b6323f601300e4690de719993f3c37112996612b46968f96339692959194909390615433565b60405180910390a45050505050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101008789161502019095169490940493840181900481028201810190925282815260609390929091830182828015612bfe5780601f10612bd357610100808354040283529160200191612bfe565b820191906000526020600020905b815481529060010190602001808311612be157829003601f168201915b50505050509050612c2685610140015186600001518660000151856020015160200151613a23565b61014084015184518651845160200151612c4293929190613a23565b612c5b8561014001518660000151858560400151613a23565b612c778186600001518760400151856000015160400151613a23565b612c938185600001518660400151856020015160400151613a23565b836040015173ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff161415612cfd57612cf881848760400151612cf3866000015160600151876020015160600151613864565b613a23565b612aa2565b612d1581848760400151856000015160600151613a23565b612aa281848660400151856020015160600151613a23565b604080517fb4be83d5000000000000000000000000000000000000000000000000000000006020808301919091526060602483018181528751608485019081528884015160a48601529488015160c48501529087015160e4840152608087015161010484015260a087015161012484015260c087015161014484015260e08701516101648401526101008701516101848401526101208701516101a4840152610140870180516101c485019081526101608901516101e4860152610180905251805161020485018190529394919384936044870192849261022489019291820191601f82010460005b81811015612e34578351855260209485019490930192600101612e16565b50505050818103610160808401919091528a0151805180835260209283019291820191601f82010460005b81811015612e7d578351855260209485019490930192600101612e5f565b50505089845250848103602093840190815288518083529093918201918981019190601f82010460005b81811015612ec5578351855260209485019490930192600101612ea7565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08883030188525060405250505050509392505050565b612f076143de565b612f1082611f30565b9050612f1c8282613bed565b612805828260200151613d04565b612f32614386565b612f3d8484846124df565b6020810151909150831461260a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061574d565b600082821115612fb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061560d565b508082035b92915050565b6000808251111515613002576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156fd565b815182907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061303257fe5b016020015182517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909252507f0100000000000000000000000000000000000000000000000000000000000000908190040290565b6000816020018351101515156130ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061562d565b50016020015190565b6040516000906060907f1626ba7e000000000000000000000000000000000000000000000000000000009061310e908790869060240161554e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093178352815191935090829081885afa8080156131ab576001811461321c57612572565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b50505195945050505050565b60006014825110151515613268576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061578d565b613276826014845103613dab565b82517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec019092525090565b6040516000906060907f9363470200000000000000000000000000000000000000000000000000000000906132de90879087908790602401615521565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931783528151919350908290818a5afa80801561337b57600181146133ec576133f1565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b825194505b50505050949350505050565b6000808311613438576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b61344b61344585846138ae565b84613e0c565b949350505050565b604080517f5a65726f45785472616e73616374696f6e2800000000000000000000000000006020808301919091527f75696e743235362073616c742c0000000000000000000000000000000000000060328301527f61646472657373207369676e6572416464726573732c00000000000000000000603f8301527f627974657320646174610000000000000000000000000000000000000000000060558301527f2900000000000000000000000000000000000000000000000000000000000000605f830152825180830384018152606090920192839052815160009384938493909282918401908083835b6020831061357c57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161353f565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260405191909301819003812089519097508995509093508392850191508083835b6020831061361257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016135d5565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822097825281019a909a525073ffffffffffffffffffffffffffffffffffffffff97909716968801969096525050606085015250506080909120919050565b600280546040517f190100000000000000000000000000000000000000000000000000000000000081529182015260228101919091526042902090565b6000612fbe611afd83613e23565b60008183106136ee578161260a565b5090919050565b6136fd614386565b6020810182905260a08301516080840151613719918491613909565b808252608084015160c0850151613731929190613909565b604082015260a083015160e084015161374b918491613909565b606082015292915050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156137ff5780601f106137d4576101008083540402835291602001916137ff565b820191906000526020600020905b8154815290600101906020018083116137e257829003601f168201915b5050505050905061381f8461014001518560000151858560000151613a23565b6138388461016001518486600001518560200151613a23565b61385081856000015186604001518560400151613a23565b6127a3818486604001518560600151613a23565b6000828201838110156138a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567d565b8091505b5092915050565b6000808315156138c157600091506138a7565b508282028284828115156138d157fe5b04146138a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567d565b6000808311613944576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b61394f84848461427c565b15613438576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ad565b60008083116139c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b6139cc848484614301565b15613a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ad565b61344b613445613a1386856138ae565b613a1e866001612f7d565b613864565b600080600083118015613a6257508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15613be5578551600310613aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061573d565b50506020848101517fffffffff00000000000000000000000000000000000000000000000000000000166000818152600b90925260409091205473ffffffffffffffffffffffffffffffffffffffff16801515613b2b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ed565b604051660fffffffffffe0603f885101168060840182017fa85e59e40000000000000000000000000000000000000000000000000000000083526080600484015273ffffffffffffffffffffffffffffffffffffffff8816602484015273ffffffffffffffffffffffffffffffffffffffff87166044840152856064840152608483015b81811015613bc757895181526020998a019901613baf565b61020084858403866000895af1801515613bdf573d85fd5b50505050505b505050505050565b805160009060ff16600314613c2e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061579d565b606083015173ffffffffffffffffffffffffffffffffffffffff1615613ca157606083015173ffffffffffffffffffffffffffffffffffffffff163314613ca1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157ad565b613ca96125df565b835190915073ffffffffffffffffffffffffffffffffffffffff808316911614613cff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061566d565b505050565b6000818152600560205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558281015183516101408501516101608601519351859473ffffffffffffffffffffffffffffffffffffffff9485169493909316927fdc47b3613d9fe400085f6dbdc99453462279057e6207385042827ed6b1a62cf792613d9f923392906154b7565b60405180910390a45050565b600081601401835110151515613ded576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061578d565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b6000808284811515613e1a57fe5b04949350505050565b604080517f4f726465722800000000000000000000000000000000000000000000000000006020808301919091527f61646472657373206d616b6572416464726573732c000000000000000000000060268301527f616464726573732074616b6572416464726573732c0000000000000000000000603b8301527f6164647265737320666565526563697069656e74416464726573732c0000000060508301527f616464726573732073656e646572416464726573732c00000000000000000000606c8301527f75696e74323536206d616b65724173736574416d6f756e742c0000000000000060828301527f75696e743235362074616b65724173736574416d6f756e742c00000000000000609b8301527f75696e74323536206d616b65724665652c00000000000000000000000000000060b48301527f75696e743235362074616b65724665652c00000000000000000000000000000060c58301527f75696e743235362065787069726174696f6e54696d655365636f6e64732c000060d68301527f75696e743235362073616c742c0000000000000000000000000000000000000060f48301527f6279746573206d616b65724173736574446174612c00000000000000000000006101018301527f62797465732074616b65724173736574446174610000000000000000000000006101168301527f290000000000000000000000000000000000000000000000000000000000000061012a830152825161010b81840301815261012b90920192839052815160009384938493849391929182918401908083835b602083106140ab57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161406e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101408b0151805191995095509093508392850191508083835b6020831061414657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101614109565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101608b0151805191985095509093508392850191508083835b602083106141e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016141a4565b5181516020939093036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909116921691909117905260405192018290039091207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0890180516101408b018051610160909c0180519a84529881529288526101a0822091529890525050509190525090919050565b6000808084116142b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b8215806142c3575084155b156142d15760009150610a88565b838015156142db57fe5b85840990506142ea85846138ae565b6142f66103e8836138ae565b101595945050505050565b60008080841161433d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b821580614348575084155b156143565760009150610a88565b8380151561436057fe5b8584099050836143708583612f7d565b81151561437957fe5b0690506142ea85846138ae565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b610120604051908101604052806143c4614386565b81526020016143d1614386565b8152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b600061260a82356158b0565b6000601f8201831361441b57600080fd5b813561442e6144298261583f565b615818565b81815260209384019390925082018360005b8381101561446c578135860161445688826145bc565b8452506020928301929190910190600101614440565b5050505092915050565b6000601f8201831361448757600080fd5b81356144956144298261583f565b81815260209384019390925082018360005b8381101561446c57813586016144bd888261460b565b84525060209283019291909101906001016144a7565b6000601f820183136144e457600080fd5b81356144f26144298261583f565b9150818183526020840193506020810190508385602084028201111561451757600080fd5b60005b8381101561446c578161452d888261454f565b845250602092830192919091019060010161451a565b600061260a82356158c9565b600061260a82356158ce565b600061260a82356158d1565b600061260a82516158d1565b600080601f8301841361458557600080fd5b50813567ffffffffffffffff81111561459d57600080fd5b6020830191508360018202830111156145b557600080fd5b9250929050565b6000601f820183136145cd57600080fd5b81356145db61442982615860565b915080825260208301602083018583830111156145f757600080fd5b614602838284615907565b50505092915050565b6000610180828403121561461e57600080fd5b614629610180615818565b9050600061463784846143fe565b8252506020614648848483016143fe565b602083015250604061465c848285016143fe565b6040830152506060614670848285016143fe565b60608301525060806146848482850161454f565b60808301525060a06146988482850161454f565b60a08301525060c06146ac8482850161454f565b60c08301525060e06146c08482850161454f565b60e0830152506101006146d58482850161454f565b610100830152506101206146eb8482850161454f565b6101208301525061014082013567ffffffffffffffff81111561470d57600080fd5b614719848285016145bc565b6101408301525061016082013567ffffffffffffffff81111561473b57600080fd5b614747848285016145bc565b6101608301525092915050565b60006020828403121561476657600080fd5b600061344b84846143fe565b6000806040838503121561478557600080fd5b600061479185856143fe565b92505060206147a2858286016143fe565b9150509250929050565b600080604083850312156147bf57600080fd5b60006147cb85856143fe565b92505060206147a285828601614543565b6000602082840312156147ee57600080fd5b813567ffffffffffffffff81111561480557600080fd5b61344b84828501614476565b60008060006060848603121561482657600080fd5b833567ffffffffffffffff81111561483d57600080fd5b61484986828701614476565b935050602084013567ffffffffffffffff81111561486657600080fd5b614872868287016144d3565b925050604084013567ffffffffffffffff81111561488f57600080fd5b61489b8682870161440a565b9150509250925092565b6000806000606084860312156148ba57600080fd5b833567ffffffffffffffff8111156148d157600080fd5b6148dd86828701614476565b93505060206148728682870161454f565b60006020828403121561490057600080fd5b600061344b848461454f565b6000806040838503121561491f57600080fd5b6000614791858561454f565b6000806000806060858703121561494157600080fd5b600061494d878761454f565b945050602061495e878288016143fe565b935050604085013567ffffffffffffffff81111561497b57600080fd5b61498787828801614573565b95989497509550505050565b6000806000606084860312156149a857600080fd5b60006149b4868661454f565b93505060206149c5868287016143fe565b925050604084013567ffffffffffffffff8111156149e257600080fd5b61489b868287016145bc565b600060208284031215614a0057600080fd5b600061344b848461455b565b600060208284031215614a1e57600080fd5b600061344b8484614567565b600060208284031215614a3c57600080fd5b813567ffffffffffffffff811115614a5357600080fd5b61344b8482850161460b565b60008060008060808587031215614a7557600080fd5b843567ffffffffffffffff811115614a8c57600080fd5b614a988782880161460b565b945050602085013567ffffffffffffffff811115614ab557600080fd5b614ac18782880161460b565b935050604085013567ffffffffffffffff811115614ade57600080fd5b614aea878288016145bc565b925050606085013567ffffffffffffffff811115614b0757600080fd5b614b13878288016145bc565b91505092959194509250565b600080600060608486031215614b3457600080fd5b833567ffffffffffffffff811115614b4b57600080fd5b614b578682870161460b565b93505060206149c58682870161454f565b60008060008060008060808789031215614b8157600080fd5b6000614b8d898961454f565b9650506020614b9e89828a016143fe565b955050604087013567ffffffffffffffff811115614bbb57600080fd5b614bc789828a01614573565b9450945050606087013567ffffffffffffffff811115614be657600080fd5b614bf289828a01614573565b92509250509295509295509295565b614c0a816158b0565b82525050565b6000614c1b826158ac565b808452602084019350614c2d836158a6565b60005b82811015614c5d57614c438683516153e5565b614c4c826158a6565b606096909601959150600101614c30565b5093949350505050565b614c0a816158c9565b614c0a816158ce565b614c0a816158d1565b6000614c8d826158ac565b808452614ca1816020860160208601615913565b614caa8161593f565b9093016020019392505050565b614c0a816158fc565b601281527f4c454e4754485f36355f52455155495245440000000000000000000000000000602082015260400190565b600d81527f494e56414c49445f54414b455200000000000000000000000000000000000000602082015260400190565b600e81527f4f524445525f4f56455246494c4c000000000000000000000000000000000000602082015260400190565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f414c52454144595f455849535453000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601581527f5349474e41545552455f554e535550504f525445440000000000000000000000602082015260400190565b601081527f4449564953494f4e5f42595f5a45524f00000000000000000000000000000000602082015260400190565b601781527f494e56414c49445f4f524445525f5349474e4154555245000000000000000000602082015260400190565b600d81527f494e56414c49445f4d414b455200000000000000000000000000000000000000602082015260400190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b600f81527f494e56414c49445f54585f484153480000000000000000000000000000000000602082015260400190565b601181527f494e56414c49445f5349474e4154555245000000000000000000000000000000602082015260400190565b600e81527f524f554e44494e475f4552524f52000000000000000000000000000000000000602082015260400190565b601081527f4641494c45445f455845435554494f4e00000000000000000000000000000000602082015260400190565b600d81527f54414b45525f4f56455250415900000000000000000000000000000000000000602082015260400190565b601481527f494e56414c49445f54414b45525f414d4f554e54000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f444f45535f4e4f545f4558495354000000000000602082015260400190565b602181527f475245415445525f5448414e5f5a45524f5f4c454e4754485f5245515549524560208201527f4400000000000000000000000000000000000000000000000000000000000000604082015260600190565b601181527f5349474e41545552455f494c4c4547414c000000000000000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f305f52455155495245440000602082015260400190565b601781527f494e56414c49445f4e45575f4f524445525f45504f4348000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f335f52455155495245440000602082015260400190565b601481527f434f4d504c4554455f46494c4c5f4641494c4544000000000000000000000000602082015260400190565b601281527f494e56414c49445f46494c4c5f50524943450000000000000000000000000000602082015260400190565b601281527f5245454e5452414e43595f494c4c4547414c0000000000000000000000000000602082015260400190565b601381527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f4f524445525f554e46494c4c41424c4500000000000000000000000000000000602082015260400190565b600e81527f494e56414c49445f53454e444552000000000000000000000000000000000000602082015260400190565b601881527f4e454741544956455f5350524541445f52455155495245440000000000000000602082015260400190565b601481527f494e56414c49445f54585f5349474e4154555245000000000000000000000000602082015260400190565b601181527f4c454e4754485f305f5245515549524544000000000000000000000000000000602082015260400190565b805160808301906153738482614c70565b5060208201516153866020850182614c70565b5060408201516153996040850182614c70565b5060608201516127a36060850182614c70565b80516101208301906153be8482615362565b5060208201516153d16080850182615362565b5060408201516127a3610100850182614c70565b805160608301906153f6848261541c565b5060208201516154096020850182614c70565b5060408201516127a36040850182614c70565b614c0a816158f6565b60208101612fbe8284614c01565b6101008101615442828b614c01565b61544f602083018a614c01565b61545c6040830189614c70565b6154696060830188614c70565b6154766080830187614c70565b61548360a0830186614c70565b81810360c08301526154958185614c82565b905081810360e08301526154a98184614c82565b9a9950505050505050505050565b606081016154c58286614c01565b81810360208301526154d78185614c82565b905081810360408301526154eb8184614c82565b95945050505050565b6020808252810161260a8184614c10565b60208101612fbe8284614c67565b60208101612fbe8284614c70565b6060810161552f8286614c70565b61553c6020830185614c01565b81810360408301526154eb8184614c82565b6040810161555c8285614c70565b818103602083015261344b8184614c82565b6080810161557c8287614c70565b615589602083018661541c565b6155966040830185614c70565b6154eb6060830184614c70565b604081016155b18285614c79565b61260a6020830184614c01565b6020808252810161260a8184614c82565b60208101612fbe8284614cb7565b60208082528101612fbe81614cc0565b60208082528101612fbe81614cf0565b60208082528101612fbe81614d20565b60208082528101612fbe81614d50565b60208082528101612fbe81614d80565b60208082528101612fbe81614db0565b60208082528101612fbe81614e06565b60208082528101612fbe81614e36565b60208082528101612fbe81614e66565b60208082528101612fbe81614e96565b60208082528101612fbe81614ec6565b60208082528101612fbe81614ef6565b60208082528101612fbe81614f26565b60208082528101612fbe81614f56565b60208082528101612fbe81614f86565b60208082528101612fbe81614fb6565b60208082528101612fbe81614fe6565b60208082528101612fbe81615016565b60208082528101612fbe81615046565b60208082528101612fbe8161509c565b60208082528101612fbe816150cc565b60208082528101612fbe816150fc565b60208082528101612fbe8161512c565b60208082528101612fbe8161515c565b60208082528101612fbe8161518c565b60208082528101612fbe816151bc565b60208082528101612fbe816151ec565b60208082528101612fbe8161521c565b60208082528101612fbe81615272565b60208082528101612fbe816152a2565b60208082528101612fbe816152d2565b60208082528101612fbe81615302565b60208082528101612fbe81615332565b60808101612fbe8284615362565b6101208101612fbe82846153ac565b60608101612fbe82846153e5565b60405181810167ffffffffffffffff8111828210171561583757600080fd5b604052919050565b600067ffffffffffffffff82111561585657600080fd5b5060209081020190565b600067ffffffffffffffff82111561587757600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b90565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b60ff1690565b6000612fbe826158b0565b82818337506000910152565b60005b8381101561592e578181015183820152602001615916565b838111156127a35750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a72305820d41ee66f45c4d1637cb6e5f109447c6d5d7fef3204a685dc442151c0f029b7da6c6578706572696d656e74616cf50037" + } + } + }, + "networks": {} +} \ No newline at end of file diff --git a/unit/Network/Ethereum/Contract/Test/THSpec.hs b/unit/Network/Ethereum/Contract/Test/THSpec.hs index d9699262..791a4466 100644 --- a/unit/Network/Ethereum/Contract/Test/THSpec.hs +++ b/unit/Network/Ethereum/Contract/Test/THSpec.hs @@ -12,7 +12,7 @@ import Test.Hspec import Network.Ethereum.Contract.TH --- Contract with Tuples taken from: +-- 0x Exchange Contract that includes Tuples taken from: -- https://raw.githubusercontent.com/0xProject/0x-monorepo/%400x/website%400.0.89/packages/contract-artifacts/artifacts/Exchange.json [abiFrom|test/contracts/Exchange.json|] From 7cad74b3994050e86f2dbbf861cbb5bdc5842282 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 16 Sep 2019 12:40:07 +0300 Subject: [PATCH 115/237] Fix memory package bounds (commercialhaskell/stackage#4799) --- package.yaml | 2 +- unit/Network/Ethereum/Contract/Test/THSpec.hs | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/package.yaml b/package.yaml index f05f7f0f..094219bb 100644 --- a/package.yaml +++ b/package.yaml @@ -44,7 +44,7 @@ dependencies: - relapse >=1.0.0.0 && <2.0 - tagged >=0.8.5 && <0.9 - parsec >=3.1.11 && <3.2 -- memory >=0.14.11 && <0.15 +- memory >=0.14.11 && <0.16 - cereal >=0.5.4.0 && <0.6 - aeson >=1.2.2.0 && <1.5 - vinyl >=0.5.3 && <0.12 diff --git a/unit/Network/Ethereum/Contract/Test/THSpec.hs b/unit/Network/Ethereum/Contract/Test/THSpec.hs index 791a4466..91967e18 100644 --- a/unit/Network/Ethereum/Contract/Test/THSpec.hs +++ b/unit/Network/Ethereum/Contract/Test/THSpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} @@ -7,20 +6,15 @@ {-# LANGUAGE QuasiQuotes #-} module Network.Ethereum.Contract.Test.THSpec where - -import Test.Hspec import Network.Ethereum.Contract.TH - +import Test.Hspec -- 0x Exchange Contract that includes Tuples taken from: -- https://raw.githubusercontent.com/0xProject/0x-monorepo/%400x/website%400.0.89/packages/contract-artifacts/artifacts/Exchange.json [abiFrom|test/contracts/Exchange.json|] spec :: Spec -spec = - describe "quasi-quoter" $ - it "can compile contract with tuples" $ +spec = + describe "quasi-quoter" $ + it "can compile contract with tuples" $ True `shouldBe` True - - - From b1ac6014c894e35b78abe54db75d7cbec1d828d1 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 16 Sep 2019 13:00:04 +0300 Subject: [PATCH 116/237] Strict field for JsonRpcClient data type (#95) Bump stack LTS version --- README.md | 2 +- src/Network/Ethereum/Api/Provider.hs | 1 - src/Network/JsonRpc/TinyClient.hs | 4 ++-- stack.yaml | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dec6f9e7..35651596 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The Haskell Ethereum API which implements the [Generic JSON RPC](https://github. [![Build Status](https://travis-ci.org/airalab/hs-web3.svg?branch=master)](https://travis-ci.org/airalab/hs-web3) [![Hackage Matrix](https://matrix.hackage.haskell.org/api/v2/packages/web3/badge)](https://matrix.hackage.haskell.org/package/web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) -[![LTS-13](http://stackage.org/package/web3/badge/lts-13)](http://stackage.org/lts-13/package/web3) +[![LTS-14](http://stackage.org/package/web3/badge/lts-14)](http://stackage.org/lts-14/package/web3) [![nightly](http://stackage.org/package/web3/badge/nightly)](http://stackage.org/nightly/package/web3) [![Code Triagers](https://www.codetriage.com/airalab/hs-web3/badges/users.svg)](https://www.codetriage.com/airalab/hs-web3) ![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg) diff --git a/src/Network/Ethereum/Api/Provider.hs b/src/Network/Ethereum/Api/Provider.hs index 988ec562..e2dfbacf 100644 --- a/src/Network/Ethereum/Api/Provider.hs +++ b/src/Network/Ethereum/Api/Provider.hs @@ -1,7 +1,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE MultiParamTypeClasses #-} -- | -- Module : Network.Ethereum.Api.Provider diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index 186f9a34..5afd11d2 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -88,8 +88,8 @@ type JsonRpcM m = (MonadIO m, MonadThrow m, MonadState JsonRpcClient m) -- | JSON-RPC client state vars. data JsonRpcClient = JsonRpcClient - { _jsonRpcManager :: Manager -- ^ HTTP connection manager. - , _jsonRpcServer :: String -- ^ Remote server URI. + { _jsonRpcManager :: !Manager -- ^ HTTP connection manager. + , _jsonRpcServer :: !String -- ^ Remote server URI. } $(makeLenses ''JsonRpcClient) diff --git a/stack.yaml b/stack.yaml index 9b424cff..dabb0287 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-13.21 +resolver: lts-14.6 # User packages to be built. packages: From 3d52b6dbd12d7a5accd00a02b5ec8a04a0d8a398 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 16 Sep 2019 13:19:39 +0300 Subject: [PATCH 117/237] Drop secp256k1 from dependencies --- docs/getting_started.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 8e1cab32..b94c20ca 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -16,7 +16,6 @@ Installation Dependencies for building from source without Nix: - `zlib `_ -- `secp256k1 `_ - optional: `solidity `_ Quick start From 79ef7883d6b24c60eabec8d9ac47203b144d06da Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 16 Sep 2019 13:24:55 +0300 Subject: [PATCH 118/237] Fix doc links --- docs/ethereum_accounts.rst | 26 +++++++++++++------------- docs/ethereum_node_api.rst | 8 ++++---- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/ethereum_accounts.rst b/docs/ethereum_accounts.rst index 35297dfa..6dbb3a58 100644 --- a/docs/ethereum_accounts.rst +++ b/docs/ethereum_accounts.rst @@ -15,11 +15,11 @@ Ethereum accounts PrivateKey_ derived from secp256k1 private key, use JSON-RPC `sendRawTransaction` ============== ======================================================================= -.. _Default: http://hackage.haskell.org/package/web3-0.8.1.0/docs/Network-Ethereum-Account-Default.html -.. _Personal: http://hackage.haskell.org/package/web3-0.8.1.0/docs/Network-Ethereum-Account-Personal.html -.. _PrivateKey: http://hackage.haskell.org/package/web3-0.8.1.0/docs/Network-Ethereum-Account-PrivateKey.html +.. _Default: http://hackage.haskell.org/package/web3/docs/Network-Ethereum-Account-Default.html +.. _Personal: http://hackage.haskell.org/package/web3/docs/Network-Ethereum-Account-Personal.html +.. _PrivateKey: http://hackage.haskell.org/package/web3/docs/Network-Ethereum-Account-PrivateKey.html -All of them has an instance for `Account `_ typeclass. +All of them has an instance for `Account `_ typeclass. .. code-block:: haskell @@ -98,16 +98,16 @@ The first argument of ``withParam`` function is state transition function, secon Where lens ``to`` is used for setting transaction recipient address. All transaction parametrization lenses presended in table below. - ============================================================================================================ ====================== + ==================================================================================================== ====================== Lens Description - ============================================================================================================ ====================== - `to `_ Recipient address - `value `_ Transaction value - `gasLimit `_ Execution gas limit - `gasPrice `_ Gas price - `block `_ Execution block (for call only) - `account `_ Account credentials - ============================================================================================================ ====================== + ==================================================================================================== ====================== + `to `_ Recipient address + `value `_ Transaction value + `gasLimit `_ Execution gas limit + `gasPrice `_ Gas price + `block `_ Execution block (for call only) + `account `_ Account credentials + ==================================================================================================== ======================= .. note:: diff --git a/docs/ethereum_node_api.rst b/docs/ethereum_node_api.rst index bc3bc2b2..302faace 100644 --- a/docs/ethereum_node_api.rst +++ b/docs/ethereum_node_api.rst @@ -70,10 +70,10 @@ Currently implemented the following Ethereum APIs in modules: =============== ================ Method prefix Implementation =============== ================ - ``eth_*`` `Network.Ethereum.Api.Eth `_ - ``net_*`` `Network.Ethereum.Api.Net `_ - ``web3_*`` `Network.Ethereum.Api.Web3 `_ - ``personal_*`` `Network.Ethereum.Api.Personal `_ + ``eth_*`` `Network.Ethereum.Api.Eth `_ + ``net_*`` `Network.Ethereum.Api.Net `_ + ``web3_*`` `Network.Ethereum.Api.Web3 `_ + ``personal_*`` `Network.Ethereum.Api.Personal `_ =============== ================ All modules use descriptive types according to official Ethereum specification. It placed at `Network.Ethereum.Api.Types `_. From 90034140b5d62e6c48eb07faa187acceda5f622b Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 16 Sep 2019 17:10:17 +0530 Subject: [PATCH 119/237] Added Documentation Page for Client Api and pubsubCall --- docs/index.rst | 1 + docs/ipfs_client_api.rst | 69 ++++++++++++++++++++++++++++++++++ src/Network/Ipfs/Api/Ipfs.hs | 73 +++++++++++++++++++++++++++--------- 3 files changed, 126 insertions(+), 17 deletions(-) create mode 100644 docs/ipfs_client_api.rst diff --git a/docs/index.rst b/docs/index.rst index b0a77a22..45dc76f9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,7 @@ Haskell Web3 Documentation ethereum_node_api ethereum_accounts smart_contracts + ipfs_client_api ens .. toctree:: diff --git a/docs/ipfs_client_api.rst b/docs/ipfs_client_api.rst new file mode 100644 index 00000000..0b328765 --- /dev/null +++ b/docs/ipfs_client_api.rst @@ -0,0 +1,69 @@ +Ipfs Client API +================= + +As many Ethereum Dapps use Ipfs for data storage, an `Ipfs Client Api `_ has been included. + +.. note:: + + The api client is placed at ``Network.Ipfs.Api``. ``Network.Ipfs.Api.Ipfs`` exports the api functions. + +Api Type +~~~~~~~~ + +The api type is defined in ``Network.Ipfs.Api.Api``. The client uses the `Servant `_ Library. + +.. code-block:: haskell + + ipfsApi :: Proxy IpfsApi + ipfsApi = Proxy + + _cat :<|> _ls ... :<|> _shutdown = client ipfsApi + +The aeson definitions of the data types returned by the api functions are also present in ``Network.Ipfs.Api.Api``. + +Monad Runner +~~~~~~~~~~~~ + +``Network.Ipfs.Api.Ipfs`` exports ``runIpfs`` monad runner and api functions. + +.. code-block:: haskell + + runIpfs' :: BaseUrl -> Ipfs a -> IO () + + runIpfs :: Ipfs a -> IO () + runIpfs = runIpfs' (BaseUrl Http "localhost" 5001 "/api/v0") + +.. note:: + + As you can see ``runIpfs`` uses the default BaseUrl at **http://localhost:5001/api/v0/** . + +You can create a `BaseUrl `_ instance for any other IPFS Api provider and pass it to **runIpfs'**. + +Example of calling functions (Non-Stream) with runIpfs : + +.. code-block:: haskell + + main = I.runIpfs $ do + ret <- I.cat + +Cid should be of the type Text. + +Call Functions +~~~~~~~~~~~~~~ + +There are three type of call functions: + + ================ ======================================================================= + Type Description + ================ ======================================================================= + call Regular Call function. + multipartCall Call function for ‘multipart/form-data’. + streamCall Call function for Streams. + ================ ======================================================================= + +As streamCall returns IO(), the API functions using it has to be called with **liftIO** (Specified in Function Documentation). + +.. code-block:: haskell + + main = I.runIpfs $ do + ret3 <- liftIO $ I.repoVerify diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 7b005b39..4cf915ed 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -26,19 +26,23 @@ import Control.Monad.Reader import Data.Aeson (decode) import Data.Text as TextS import qualified Data.Text.Encoding as TextS +import Data.Base58String.Bitcoin (fromBytes, toText) +import qualified Data.ByteString as BS'(ByteString, foldr) +import qualified Data.ByteArray.Encoding as Enc(convertFromBase, Base(..)) import qualified Data.ByteString.Lazy as BS (ByteString, fromStrict) import Network.HTTP.Client as Net hiding (Proxy) import Network.HTTP.Client.MultipartFormData import Network.HTTP.Types (Status(..)) +import Numeric (showInt) import Servant.Client +import Servant.Types.SourceT (SourceT(..), foreach) import qualified Servant.Client.Streaming as S -import Servant.Types.SourceT (SourceT, foreach) import qualified Network.Ipfs.Api.Api as Api - import Network.Ipfs.Api.Multipart (AddObj) import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, - _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal, _pubsubSubscribe) + _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal, + _pubsubSubscribe, PubsubSubObj(..)) newtype IpfsT m a = IpfsT { unIpfs :: ReaderT (Manager, BaseUrl, String) (ExceptT ServantError m) a} deriving ( Functor @@ -54,6 +58,8 @@ instance MonadTrans IpfsT where type Ipfs a = IpfsT IO a +------------------------------------------- Monad Runners --------------------------------------------------- + -- | 'IpfsT' monad runner. runIpfs' :: BaseUrl -> Ipfs a -> IO () runIpfs' url ipfs = do @@ -67,6 +73,9 @@ runIpfs' url ipfs = do runIpfs :: Ipfs a -> IO () runIpfs = runIpfs' (BaseUrl Http "localhost" 5001 "/api/v0") + +------------------------------------------- Call functions --------------------------------------------------- + -- | Regular Call function. call :: (ClientM a) -> Ipfs a call func = do @@ -74,7 +83,7 @@ call func = do resp <- lift (runClientM func (mkClientEnv manager' url)) case resp of Left l -> throwError l - Right r -> pure r + Right r -> pure r -- | Call function for Streams. streamCall :: Show a => S.ClientM (SourceT IO a) -> IO() @@ -84,6 +93,14 @@ streamCall func = do Left err -> putStrLn $ "Error: " ++ show err Right rs -> foreach fail print rs +-- | Call function for 'PubsubSubObj'. +pubsubCall :: S.ClientM (SourceT IO PubsubSubObj) -> IO() +pubsubCall func = do + manager' <- newManager defaultManagerSettings + S.withClientM func (S.mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) $ \e -> case e of + Left err -> putStrLn $ "Error: " ++ show err + Right rs -> foreach fail printPubsub rs + -- | Call function for ‘multipart/form-data’. multipartCall :: Text -> Text -> Ipfs (Net.Response BS.ByteString) multipartCall funcUri filePath = do @@ -94,6 +111,28 @@ multipartCall funcUri filePath = do where form = [ partFileSource "file" $ TextS.unpack filePath ] + +------------------------------------------- Print Functions --------------------------------------------------- + +-- | Print function for the Base64 decoded 'PubsubSubObj'. +printPubsub :: PubsubSubObj -> IO () +printPubsub PubsubSubObj {mssgdata = mssg, from = sender, seqno = num, topicIDs = topic } = + print $ PubsubSubObj (fromB64 mssg) (fromB64toB58 sender) (fromB64' num) topic + where fromB64toB58 val = case Enc.convertFromBase Enc.Base64 (TextS.encodeUtf8 val) of + Left e -> TextS.pack $ "Invalid input: " ++ e + Right decoded -> toText $ fromBytes (decoded :: BS'.ByteString) + + fromB64 val = case Enc.convertFromBase Enc.Base64 (TextS.encodeUtf8 val) of + Left e -> TextS.pack $ "Invalid input: " ++ e + Right decoded -> TextS.decodeUtf8 (decoded :: BS'.ByteString) + + fromB64' val = case Enc.convertFromBase Enc.Base64 (TextS.encodeUtf8 val) of + Left e -> TextS.pack $ "Invalid input: " ++ e + Right decoded -> TextS.pack $ BS'.foldr showInt "" (decoded :: BS'.ByteString) + + +------------------------------------------- Ipfs functions --------------------------------------------------- + -- | Show IPFS object data. cat :: Text -> Ipfs Api.CatReturnType cat hash = call $ Api._cat hash @@ -115,11 +154,11 @@ get hash = do do liftIO $ Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ TextS.encodeUtf8 ret pure "The content has been stored in getResponseDirectory." --- | List links (references) from an object. +-- | List links (references) from an object. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. refs :: Text -> IO () refs hash = streamCall $ _refs hash --- | List all local references. +-- | List all local references. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. refsLocal :: IO () refsLocal = streamCall _refsLocal @@ -322,27 +361,27 @@ idPeer peerId = call $ Api._idPeer peerId dns :: Text -> Ipfs Api.DnsObj dns name = call $ Api._dns name --- | Send echo request packets to IPFS hosts. +-- | Send echo request packets to IPFS hosts. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. ping :: Text -> IO () ping cid = streamCall $ _ping cid --- | Find the multiaddresses associated with the given peerId. +-- | Find the multiaddresses associated with the given peerId. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. dhtFindPeer :: Text -> IO () dhtFindPeer peerId = streamCall $ _dhtFindPeer peerId --- | Find peers that can provide a specific value, given a key. +-- | Find peers that can provide a specific value, given a key. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. dhtFindProvs :: Text -> IO () dhtFindProvs cid = streamCall $ _dhtFindProvs cid --- | 'Given a key, query the routing system for its best value. +-- | 'Given a key, query the routing system for its best value. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. dhtGet :: Text -> IO () dhtGet cid = streamCall $ _dhtGet cid --- | 'Announce to the network that you are providing given values. +-- | 'Announce to the network that you are providing given values. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. dhtProvide :: Text -> IO () dhtProvide cid = streamCall $ _dhtProvide cid --- | Find the closest Peer IDs to a given peerID by querying the DHT. +-- | Find the closest Peer IDs to a given peerID by querying the DHT. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. dhtQuery :: Text -> IO () dhtQuery peerId = streamCall $ _dhtQuery peerId @@ -360,9 +399,9 @@ pubsubPublish topic mssg = do call $ Api._pubsubPublish topic $ Just mssg pure "The given message has been published." --- | Subscribe to messages on a given topic. +-- | Subscribe to messages on a given topic. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. pubsubSubscribe :: Text -> IO () -pubsubSubscribe topic = streamCall $ _pubsubSubscribe topic +pubsubSubscribe topic = pubsubCall $ _pubsubSubscribe topic -- | List the logging subsystems. logLs :: Ipfs Api.LogLsObj @@ -372,7 +411,7 @@ logLs = call Api._logLs logLevel :: Text -> Text -> Ipfs Api.LogLevelObj logLevel subsystem level = call $ Api._logLevel subsystem $ Just level --- | Read the event log. +-- | Read the event log. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. logTail :: IO () logTail = streamCall _logTail @@ -384,11 +423,11 @@ repoVersion = call Api._repoVersion repoFsck :: Ipfs Api.RepoFsckObj repoFsck = call Api._repoFsck --- | Perform a garbage collection sweep on the repo. +-- | Perform a garbage collection sweep on the repo. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. repoGc :: IO () repoGc = streamCall _repoGc --- | Verify all blocks in repo are not corrupted. +-- | Verify all blocks in repo are not corrupted. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. repoVerify :: IO () repoVerify = streamCall _repoVerify From 109b078ca52c3e596362a073e1c1e551874f40bb Mon Sep 17 00:00:00 2001 From: amany9000 Date: Mon, 16 Sep 2019 22:45:02 +0530 Subject: [PATCH 120/237] Updated Provider.hs and removed qualified imports of Data.Text --- src/Network/Ethereum/Api/Provider.hs | 19 +- src/Network/Ipfs/Api/Api.hs | 326 +++++++++++++-------------- src/Network/Ipfs/Api/Ipfs.hs | 52 ++--- src/Network/Ipfs/Api/Multipart.hs | 8 +- src/Network/Ipfs/Api/Stream.hs | 62 ++--- test/Network/Ipfs/Api/Test/Key.hs | 2 +- 6 files changed, 235 insertions(+), 234 deletions(-) diff --git a/src/Network/Ethereum/Api/Provider.hs b/src/Network/Ethereum/Api/Provider.hs index d0e5eff2..4c52967b 100644 --- a/src/Network/Ethereum/Api/Provider.hs +++ b/src/Network/Ethereum/Api/Provider.hs @@ -2,7 +2,8 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} -- | -- Module : Network.Ethereum.Api.Provider @@ -25,6 +26,7 @@ import Control.Monad.Catch (MonadThrow) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.State (MonadState (..)) import Control.Monad.Trans.State (StateT, evalStateT, withStateT) +import Data.Default (Default (..)) import GHC.Generics (Generic) import Network.HTTP.Client (Manager) import qualified Network.Socket as S @@ -59,11 +61,8 @@ instance Exception Web3Error data Provider = HttpProvider String | WSProvider String Int deriving (Show, Eq, Generic) -defaultHttpPovider :: Provider -defaultHttpPovider = HttpProvider "http://localhost:8545" -- ^ Default HTTP Provider URI - -defaultWSPovider :: Provider -defaultWSPovider = WSProvider "127.0.0.1" 8546 -- ^ Default WS Provider URI +instance Default Provider where + def = HttpProvider "http://localhost:8545" -- ^ Default Provider URI -- | 'Web3' monad runner, using the supplied Manager runWeb3With :: MonadIO m @@ -74,7 +73,9 @@ runWeb3With :: MonadIO m runWeb3With manager provider f = do runWeb3' provider Web3{ unWeb3 = withStateT changeManager $ unWeb3 f} where - changeManager jsonRpc = jsonRpc {jsonRpcManager = manager} + changeManager jRpcClient = case jRpcClient of + JsonRpcHTTPClient{..} -> jRpcClient {jsonRpcManager = manager} + JsonRpcWSClient{..} -> jRpcClient -- | 'Web3' monad runner runWeb3' :: MonadIO m @@ -100,14 +101,14 @@ runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a) {-# INLINE runWeb3 #-} -runWeb3 = runWeb3' defaultHttpPovider +runWeb3 = runWeb3' def -- | 'Web3' runner for default WS provider runWeb3WS :: MonadIO m => Web3 a -> m (Either Web3Error a) {-# INLINE runWeb3WS #-} -runWeb3WS = runWeb3' defaultWSPovider +runWeb3WS = runWeb3' $ WSProvider "127.0.0.1" 8546 -- | Fork 'Web3' with the same 'Provider' and 'Manager' forkWeb3 :: Web3 a -> Web3 (Async a) diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Api.hs index fc3a1182..d107c593 100644 --- a/src/Network/Ipfs/Api/Api.hs +++ b/src/Network/Ipfs/Api/Api.hs @@ -26,53 +26,53 @@ import Data.ByteString.Lazy (toStrict) import qualified Data.ByteString.Lazy.Char8() import qualified Data.HashMap.Strict as H import Data.Proxy -import qualified Data.Text as TextS -import qualified Data.Text.Encoding as TextS +import Data.Text (Text) +import qualified Data.Text.Encoding as TextS import Data.Typeable import Network.HTTP.Client() import qualified Network.HTTP.Media as M ((//)) import Servant.API import Servant.Client -type CatReturnType = TextS.Text -type ReprovideReturnType = TextS.Text -type GetReturnType = TextS.Text -type BlockReturnType = TextS.Text -type DagReturnType = TextS.Text -type ObjectReturnType = TextS.Text -type FilesReadType = TextS.Text +type CatReturnType = Text +type ReprovideReturnType = Text +type GetReturnType = Text +type BlockReturnType = Text +type DagReturnType = Text +type ObjectReturnType = Text +type FilesReadType = Text data DirLink = DirLink - { name :: TextS.Text - , hash :: TextS.Text + { name :: Text + , hash :: Text , size :: Int64 , contentType :: Int - , target :: TextS.Text + , target :: Text } deriving (Show, Eq) data DirObj = DirObj - { dirHash :: TextS.Text + { dirHash :: Text , links :: [DirLink] } deriving (Show, Eq) data LsObj = LsObj { objs :: [DirObj] } deriving (Show, Eq) -data SwarmStreamObj = SwarmStreamObj { protocol :: TextS.Text } deriving (Show, Eq) +data SwarmStreamObj = SwarmStreamObj { protocol :: Text } deriving (Show, Eq) data SwarmPeerObj = SwarmPeerObj - { address :: TextS.Text + { address :: Text , direction :: Int - , latency :: TextS.Text - , muxer :: TextS.Text - , peer :: TextS.Text + , latency :: Text + , muxer :: Text + , peer :: Text , streams :: Maybe [SwarmStreamObj] } deriving (Show, Eq) data SwarmPeersObj = SwarmPeersObj { peers :: [SwarmPeerObj] } deriving (Show, Eq) -data SwarmObj = SwarmObj { strings :: [TextS.Text] } deriving (Show, Eq) +data SwarmObj = SwarmObj { strings :: [Text] } deriving (Show, Eq) -data WantlistObj = WantlistObj { forSlash :: TextS.Text } deriving (Show, Eq) +data WantlistObj = WantlistObj { forSlash :: Text } deriving (Show, Eq) data BitswapStatObj = BitswapStatObj { blocksReceived :: Int64 @@ -82,7 +82,7 @@ data BitswapStatObj = BitswapStatObj , dupBlksReceived :: Int64 , dupDataReceived :: Int64 , messagesReceived :: Int64 - , bitswapPeers :: [TextS.Text] + , bitswapPeers :: [Text] , provideBufLen :: Int , wantlist :: [WantlistObj] } deriving (Show, Eq) @@ -91,7 +91,7 @@ data BitswapWLObj = BitswapWLObj { bitswapKeys :: [WantlistObj] } deriving (Sho data BitswapLedgerObj = BitswapLedgerObj { exchanged :: Int64 - , ledgerPeer :: TextS.Text + , ledgerPeer :: Text , recv :: Int64 , sent :: Int64 , value :: Double @@ -99,35 +99,35 @@ data BitswapLedgerObj = BitswapLedgerObj data CidBasesObj = CidBasesObj { baseCode :: Int - , baseName :: TextS.Text + , baseName :: Text } deriving (Show, Eq) data CidCodecsObj = CidCodecsObj { codecCode :: Int - , codecName :: TextS.Text + , codecName :: Text } deriving (Show, Eq) data CidHashesObj = CidHashesObj { multihashCode :: Int - , multihashName :: TextS.Text + , multihashName :: Text } deriving (Show, Eq) data CidObj = CidObj - { cidStr :: TextS.Text - , errorMsg :: TextS.Text - , formatted :: TextS.Text + { cidStr :: Text + , errorMsg :: Text + , formatted :: Text } deriving (Show, Eq) data BlockObj = BlockObj - { key :: TextS.Text + { key :: Text , blockSize :: Int } deriving (Show, Eq) -data DagCidObj = DagCidObj { cidSlash :: TextS.Text } deriving (Show, Eq) +data DagCidObj = DagCidObj { cidSlash :: Text } deriving (Show, Eq) data DagResolveObj = DagResolveObj { cid :: DagCidObj - , remPath :: TextS.Text + , remPath :: Text } deriving (Show, Eq) data DagPutObj = DagPutObj @@ -135,26 +135,26 @@ data DagPutObj = DagPutObj } deriving (Show, Eq) data ConfigObj = ConfigObj - { configKey :: TextS.Text - , configValue :: TextS.Text + { configKey :: Text + , configValue :: Text } deriving (Show, Eq) data ObjectLinkObj = ObjectLinkObj - { linkHash :: TextS.Text - , linkName :: TextS.Text + { linkHash :: Text + , linkName :: Text , linkSize :: Int64 } deriving (Show, Eq) -data ObjectObj = ObjectObj { newObjectHash :: TextS.Text } deriving (Show, Eq) +data ObjectObj = ObjectObj { newObjectHash :: Text } deriving (Show, Eq) data ObjectLinksObj = WithLinks - { objectHash :: TextS.Text + { objectHash :: Text , objectLinks :: [ObjectLinkObj] } - | WithoutLinks { objectHash :: TextS.Text } deriving (Show, Eq) + | WithoutLinks { objectHash :: Text } deriving (Show, Eq) data ObjectGetObj = ObjectGetObj - { objectName :: TextS.Text + { objectName :: Text , objectGetLinks :: [ObjectLinkObj] } deriving (Show, Eq) @@ -162,31 +162,31 @@ data ObjectStatObj = ObjectStatObj { objBlockSize :: Int , cumulativeSize :: Int , dataSize :: Int - , objHash :: TextS.Text + , objHash :: Text , linksSize :: Int , numLinks :: Int } deriving (Show, Eq) -data DiffObj = DiffObj { diffSlash :: TextS.Text } deriving (Show, Eq) +data DiffObj = DiffObj { diffSlash :: Text } deriving (Show, Eq) data ObjectChangeObj = ObjectChangeObj { after :: Maybe DiffObj , before :: DiffObj - , path :: TextS.Text + , path :: Text , diffType :: Int } deriving (Show, Eq) data ObjectDiffObj = ObjectDiffObj { changes :: [ObjectChangeObj] } deriving (Show, Eq) data PinObj = WithoutProgress - { pins :: [TextS.Text] } + { pins :: [Text] } | WithProgress - { pins :: [TextS.Text] + { pins :: [Text] , progress :: Int } deriving (Show, Eq) -data BootstrapObj = BootstrapObj { bootstrapPeers :: [TextS.Text] } deriving (Show, Eq) +data BootstrapObj = BootstrapObj { bootstrapPeers :: [Text] } deriving (Show, Eq) data StatsBwObj = StatsBwObj { rateIn :: Double @@ -197,72 +197,72 @@ data StatsBwObj = StatsBwObj data StatsRepoObj = StatsRepoObj { numObjects :: Int64 - , repoPath :: TextS.Text + , repoPath :: Text , repoSize :: Int64 , storageMax :: Int64 - , repoVersion :: TextS.Text + , repoVersion :: Text } deriving (Show, Eq) data VersionObj = VersionObj - { commit :: TextS.Text - , golang :: TextS.Text - , repo :: TextS.Text - , system :: TextS.Text - , version :: TextS.Text + { commit :: Text + , golang :: Text + , repo :: Text + , system :: Text + , version :: Text } deriving (Show, Eq) data IdObj = IdObj - { addresses :: [TextS.Text] - , agentVersion :: TextS.Text - , id :: TextS.Text - , protocolVersion :: TextS.Text - , publicKey :: TextS.Text + { addresses :: [Text] + , agentVersion :: Text + , id :: Text + , protocolVersion :: Text + , publicKey :: Text } deriving (Show, Eq) -data DnsObj = DnsObj { dnsPath :: TextS.Text } deriving (Show, Eq) +data DnsObj = DnsObj { dnsPath :: Text } deriving (Show, Eq) -data PubsubObj = PubsubObj { pubsubStrings :: [TextS.Text] } deriving (Show, Eq) +data PubsubObj = PubsubObj { pubsubStrings :: [Text] } deriving (Show, Eq) -data LogLsObj = LogLsObj { logLsStrings :: [TextS.Text] } deriving (Show, Eq) +data LogLsObj = LogLsObj { logLsStrings :: [Text] } deriving (Show, Eq) -data LogLevelObj = LogLevelObj { message :: TextS.Text } deriving (Show, Eq) +data LogLevelObj = LogLevelObj { message :: Text } deriving (Show, Eq) -data RepoVersionObj = RepoVersionObj { repoVer :: TextS.Text } deriving (Show, Eq) +data RepoVersionObj = RepoVersionObj { repoVer :: Text } deriving (Show, Eq) -data RepoFsckObj = RepoFsckObj { repoMessage :: TextS.Text } deriving (Show, Eq) +data RepoFsckObj = RepoFsckObj { repoMessage :: Text } deriving (Show, Eq) data KeyDetailsObj = KeyDetailsObj - { keyId :: TextS.Text - , keyName :: TextS.Text + { keyId :: Text + , keyName :: Text } deriving (Show, Eq) data KeyObj = KeyObj { keys :: [KeyDetailsObj] } deriving (Show, Eq) data KeyRenameObj = KeyRenameObj - { peerId :: TextS.Text - , now :: TextS.Text + { peerId :: Text + , now :: Text , overwrite :: Bool - , was :: TextS.Text + , was :: Text } deriving (Show, Eq) data FilesStatObj = FilesStatObj - { fileObjectHash :: TextS.Text + { fileObjectHash :: Text , objectSize :: Int , cumulativeObjectSize :: Int , blocks :: Int - , objectType :: TextS.Text + , objectType :: Text } deriving (Show, Eq) data FilesEntryObj = FilesEntryObj - { entryName :: TextS.Text + { entryName :: Text , entryType :: Int , entrySize :: Int - , entryHash :: TextS.Text + , entryHash :: Text } deriving (Show, Eq) data FilesLsObj = FilesLsObj { enteries :: [FilesEntryObj] } deriving (Show, Eq) -data FilesFlushObj = FilesFlushObj { fileCid :: TextS.Text } deriving (Show, Eq) +data FilesFlushObj = FilesFlushObj { fileCid :: Text } deriving (Show, Eq) instance FromJSON DirLink where parseJSON (Object o) = @@ -639,7 +639,7 @@ instance Servant.API.Accept IpfsText where contentType _ = "text" M.// "plain" -- | @left show . TextS.decodeUtf8' . toStrict@ -instance MimeUnrender IpfsText TextS.Text where +instance MimeUnrender IpfsText Text where mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict @@ -650,143 +650,143 @@ instance Servant.API.Accept IpfsJSON where contentType _ = "application" M.// "json" -- | @left show . TextS.decodeUtf8' . toStrict@ -instance MimeUnrender IpfsJSON TextS.Text where +instance MimeUnrender IpfsJSON Text where mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict -type IpfsApi = "cat" :> Capture "arg" TextS.Text :> Get '[IpfsText] CatReturnType - :<|> "ls" :> Capture "arg" TextS.Text :> Get '[JSON] LsObj - :<|> "get" :> Capture "arg" TextS.Text :> Get '[IpfsText] GetReturnType +type IpfsApi = "cat" :> Capture "arg" Text :> Get '[IpfsText] CatReturnType + :<|> "ls" :> Capture "arg" Text :> Get '[JSON] LsObj + :<|> "get" :> Capture "arg" Text :> Get '[IpfsText] GetReturnType :<|> "swarm" :> "peers" :> Get '[JSON] SwarmPeersObj - :<|> "swarm" :> "connect" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj - :<|> "swarm" :> "disconnect" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "connect" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "disconnect" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj :<|> "swarm" :> "filters" :> Get '[JSON] SwarmObj - :<|> "swarm" :> "filters" :> "add" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj - :<|> "swarm" :> "filters" :> "rm" :> QueryParam "arg" TextS.Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "filters" :> "add" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "filters" :> "rm" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj :<|> "bitswap" :> "stat" :> Get '[JSON] BitswapStatObj :<|> "bitswap" :> "wantlist" :> Get '[JSON] BitswapWLObj - :<|> "bitswap" :> "ledger" :> Capture "peerId" TextS.Text :> Get '[JSON] BitswapLedgerObj + :<|> "bitswap" :> "ledger" :> Capture "peerId" Text :> Get '[JSON] BitswapLedgerObj :<|> "bitswap" :> "reprovide" :> Get '[IpfsText] ReprovideReturnType :<|> "cid" :> "bases" :> Get '[JSON] [CidBasesObj] :<|> "cid" :> "codecs" :> Get '[JSON] [CidCodecsObj] :<|> "cid" :> "hashes" :> Get '[JSON] [CidHashesObj] - :<|> "cid" :> "base32" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj - :<|> "cid" :> "format" :> Capture "cid" TextS.Text :> Get '[JSON] CidObj - :<|> "block" :> "get" :> Capture "key" TextS.Text :> Get '[IpfsText] BlockReturnType - :<|> "block" :> "stat" :> Capture "key" TextS.Text :> Get '[JSON] BlockObj - :<|> "dag" :> "get" :> Capture "ref" TextS.Text :> Get '[IpfsJSON] DagReturnType - :<|> "dag" :> "resolve" :> Capture "ref" TextS.Text :> Get '[JSON] DagResolveObj - :<|> "config" :> Capture "ref" TextS.Text :> Get '[JSON] ConfigObj - :<|> "config" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ConfigObj - :<|> "object" :> "data" :> Capture "ref" TextS.Text :> Get '[IpfsText] ObjectReturnType + :<|> "cid" :> "base32" :> Capture "cid" Text :> Get '[JSON] CidObj + :<|> "cid" :> "format" :> Capture "cid" Text :> Get '[JSON] CidObj + :<|> "block" :> "get" :> Capture "key" Text :> Get '[IpfsText] BlockReturnType + :<|> "block" :> "stat" :> Capture "key" Text :> Get '[JSON] BlockObj + :<|> "dag" :> "get" :> Capture "ref" Text :> Get '[IpfsJSON] DagReturnType + :<|> "dag" :> "resolve" :> Capture "ref" Text :> Get '[JSON] DagResolveObj + :<|> "config" :> Capture "ref" Text :> Get '[JSON] ConfigObj + :<|> "config" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ConfigObj + :<|> "object" :> "data" :> Capture "ref" Text :> Get '[IpfsText] ObjectReturnType :<|> "object" :> "new" :> Get '[JSON] ObjectObj - :<|> "object" :> "links" :> Capture "ref" TextS.Text :> Get '[JSON] ObjectLinksObj - :<|> "object" :> "patch" :> "add-link" :> Capture "arg" TextS.Text - :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ObjectLinksObj - :<|> "object" :> "patch" :> "rm-link" :> Capture "arg" TextS.Text - :> QueryParam "arg" TextS.Text :> Get '[JSON] ObjectLinksObj - :<|> "object" :> "get" :> Capture "arg" TextS.Text :> Get '[JSON] ObjectGetObj - :<|> "object" :> "diff" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] ObjectDiffObj - :<|> "object" :> "stat" :> Capture "arg" TextS.Text :> Get '[JSON] ObjectStatObj - :<|> "pin" :> "add" :> Capture "arg" TextS.Text :> Get '[JSON] PinObj - :<|> "pin" :> "rm" :> Capture "arg" TextS.Text :> Get '[JSON] PinObj - :<|> "bootstrap" :> "add" :> QueryParam "arg" TextS.Text :> Get '[JSON] BootstrapObj + :<|> "object" :> "links" :> Capture "ref" Text :> Get '[JSON] ObjectLinksObj + :<|> "object" :> "patch" :> "add-link" :> Capture "arg" Text + :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ObjectLinksObj + :<|> "object" :> "patch" :> "rm-link" :> Capture "arg" Text + :> QueryParam "arg" Text :> Get '[JSON] ObjectLinksObj + :<|> "object" :> "get" :> Capture "arg" Text :> Get '[JSON] ObjectGetObj + :<|> "object" :> "diff" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ObjectDiffObj + :<|> "object" :> "stat" :> Capture "arg" Text :> Get '[JSON] ObjectStatObj + :<|> "pin" :> "add" :> Capture "arg" Text :> Get '[JSON] PinObj + :<|> "pin" :> "rm" :> Capture "arg" Text :> Get '[JSON] PinObj + :<|> "bootstrap" :> "add" :> QueryParam "arg" Text :> Get '[JSON] BootstrapObj :<|> "bootstrap" :> "list" :> Get '[JSON] BootstrapObj - :<|> "bootstrap" :> "rm" :> QueryParam "arg" TextS.Text :> Get '[JSON] BootstrapObj + :<|> "bootstrap" :> "rm" :> QueryParam "arg" Text :> Get '[JSON] BootstrapObj :<|> "stats" :> "bw" :> Get '[JSON] StatsBwObj :<|> "stats" :> "repo" :> Get '[JSON] StatsRepoObj :<|> "version" :> Get '[JSON] VersionObj :<|> "id" :> Get '[JSON] IdObj - :<|> "id" :> Capture "arg" TextS.Text :> Get '[JSON] IdObj - :<|> "dns" :> Capture "arg" TextS.Text :> Get '[JSON] DnsObj + :<|> "id" :> Capture "arg" Text :> Get '[JSON] IdObj + :<|> "dns" :> Capture "arg" Text :> Get '[JSON] DnsObj :<|> "pubsub" :> "ls" :> Get '[JSON] PubsubObj :<|> "pubsub" :> "peers" :> Get '[JSON] PubsubObj - :<|> "pubsub" :> "pub" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] NoContent + :<|> "pubsub" :> "pub" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent :<|> "log" :> "ls" :> Get '[JSON] LogLsObj - :<|> "log" :> "level" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] LogLevelObj + :<|> "log" :> "level" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] LogLevelObj :<|> "repo" :> "version" :> Get '[JSON] RepoVersionObj :<|> "repo" :> "fsck" :> Get '[JSON] RepoFsckObj - :<|> "key" :> "gen" :> Capture "arg" TextS.Text :> QueryParam "type" TextS.Text :> Get '[JSON] KeyDetailsObj + :<|> "key" :> "gen" :> Capture "arg" Text :> QueryParam "type" Text :> Get '[JSON] KeyDetailsObj :<|> "key" :> "list" :> Get '[JSON] KeyObj - :<|> "key" :> "rename" :> Capture "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] KeyRenameObj - :<|> "key" :> "rm" :> Capture "arg" TextS.Text :> Get '[JSON] KeyObj - :<|> "files" :> "chcid" :> QueryParam "arg" TextS.Text :> QueryParam "cid-version" Int :> Get '[JSON] NoContent - :<|> "files" :> "cp" :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] NoContent - :<|> "files" :> "flush" :> QueryParam "arg" TextS.Text :> Get '[JSON] FilesFlushObj - :<|> "files" :> "ls" :> QueryParam "arg" TextS.Text :> Get '[JSON] FilesLsObj - :<|> "files" :> "mkdir" :> QueryParam "arg" TextS.Text :> Get '[JSON] NoContent - :<|> "files" :> "mv" :> QueryParam "arg" TextS.Text :> QueryParam "arg" TextS.Text :> Get '[JSON] NoContent - :<|> "files" :> "read" :> QueryParam "arg" TextS.Text :> Get '[IpfsText] FilesReadType - :<|> "files" :> "rm" :> QueryParam "arg" TextS.Text :> QueryParam "recursive" Bool :> Get '[JSON] NoContent - :<|> "files" :> "stat" :> QueryParam "arg" TextS.Text :> Get '[JSON] FilesStatObj + :<|> "key" :> "rename" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] KeyRenameObj + :<|> "key" :> "rm" :> Capture "arg" Text :> Get '[JSON] KeyObj + :<|> "files" :> "chcid" :> QueryParam "arg" Text :> QueryParam "cid-version" Int :> Get '[JSON] NoContent + :<|> "files" :> "cp" :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent + :<|> "files" :> "flush" :> QueryParam "arg" Text :> Get '[JSON] FilesFlushObj + :<|> "files" :> "ls" :> QueryParam "arg" Text :> Get '[JSON] FilesLsObj + :<|> "files" :> "mkdir" :> QueryParam "arg" Text :> Get '[JSON] NoContent + :<|> "files" :> "mv" :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent + :<|> "files" :> "read" :> QueryParam "arg" Text :> Get '[IpfsText] FilesReadType + :<|> "files" :> "rm" :> QueryParam "arg" Text :> QueryParam "recursive" Bool :> Get '[JSON] NoContent + :<|> "files" :> "stat" :> QueryParam "arg" Text :> Get '[JSON] FilesStatObj :<|> "shutdown" :> Get '[JSON] NoContent ipfsApi :: Proxy IpfsApi ipfsApi = Proxy -_cat :: TextS.Text -> ClientM CatReturnType -_ls :: TextS.Text -> ClientM LsObj -_get :: TextS.Text -> ClientM GetReturnType +_cat :: Text -> ClientM CatReturnType +_ls :: Text -> ClientM LsObj +_get :: Text -> ClientM GetReturnType _swarmPeers :: ClientM SwarmPeersObj -_swarmConnect :: Maybe TextS.Text -> ClientM SwarmObj -_swarmDisconnect :: Maybe TextS.Text -> ClientM SwarmObj +_swarmConnect :: Maybe Text -> ClientM SwarmObj +_swarmDisconnect :: Maybe Text -> ClientM SwarmObj _swarmFilters :: ClientM SwarmObj -_swarmFilterAdd :: Maybe TextS.Text -> ClientM SwarmObj -_swarmFilterRm :: Maybe TextS.Text -> ClientM SwarmObj +_swarmFilterAdd :: Maybe Text -> ClientM SwarmObj +_swarmFilterRm :: Maybe Text -> ClientM SwarmObj _bitswapStat :: ClientM BitswapStatObj _bitswapWL :: ClientM BitswapWLObj -_bitswapLedger :: TextS.Text -> ClientM BitswapLedgerObj +_bitswapLedger :: Text -> ClientM BitswapLedgerObj _bitswapReprovide :: ClientM ReprovideReturnType _cidBases :: ClientM [CidBasesObj] _cidCodecs :: ClientM [CidCodecsObj] _cidHashes :: ClientM [CidHashesObj] -_cidBase32 :: TextS.Text -> ClientM CidObj -_cidFormat :: TextS.Text -> ClientM CidObj -_blockGet :: TextS.Text -> ClientM BlockReturnType -_blockStat :: TextS.Text -> ClientM BlockObj -_dagGet :: TextS.Text -> ClientM DagReturnType -_dagResolve :: TextS.Text -> ClientM DagResolveObj -_configGet :: TextS.Text -> ClientM ConfigObj -_configSet :: TextS.Text -> Maybe TextS.Text -> ClientM ConfigObj -_objectData :: TextS.Text -> ClientM ObjectReturnType +_cidBase32 :: Text -> ClientM CidObj +_cidFormat :: Text -> ClientM CidObj +_blockGet :: Text -> ClientM BlockReturnType +_blockStat :: Text -> ClientM BlockObj +_dagGet :: Text -> ClientM DagReturnType +_dagResolve :: Text -> ClientM DagResolveObj +_configGet :: Text -> ClientM ConfigObj +_configSet :: Text -> Maybe Text -> ClientM ConfigObj +_objectData :: Text -> ClientM ObjectReturnType _objectNew :: ClientM ObjectObj -_objectGetLinks :: TextS.Text -> ClientM ObjectLinksObj -_objectAddLink :: TextS.Text -> Maybe TextS.Text -> Maybe TextS.Text -> ClientM ObjectLinksObj -_objectRmLink :: TextS.Text -> Maybe TextS.Text -> ClientM ObjectLinksObj -_objectGet :: TextS.Text -> ClientM ObjectGetObj -_objectDiff :: TextS.Text -> Maybe TextS.Text -> ClientM ObjectDiffObj -_objectStat :: TextS.Text -> ClientM ObjectStatObj -_pinAdd :: TextS.Text -> ClientM PinObj -_pinRemove :: TextS.Text -> ClientM PinObj -_bootstrapAdd ::Maybe TextS.Text -> ClientM BootstrapObj +_objectGetLinks :: Text -> ClientM ObjectLinksObj +_objectAddLink :: Text -> Maybe Text -> Maybe Text -> ClientM ObjectLinksObj +_objectRmLink :: Text -> Maybe Text -> ClientM ObjectLinksObj +_objectGet :: Text -> ClientM ObjectGetObj +_objectDiff :: Text -> Maybe Text -> ClientM ObjectDiffObj +_objectStat :: Text -> ClientM ObjectStatObj +_pinAdd :: Text -> ClientM PinObj +_pinRemove :: Text -> ClientM PinObj +_bootstrapAdd ::Maybe Text -> ClientM BootstrapObj _bootstrapList :: ClientM BootstrapObj -_bootstrapRM :: Maybe TextS.Text -> ClientM BootstrapObj +_bootstrapRM :: Maybe Text -> ClientM BootstrapObj _statsBw :: ClientM StatsBwObj _statsRepo :: ClientM StatsRepoObj _version :: ClientM VersionObj _id :: ClientM IdObj -_idPeer :: TextS.Text -> ClientM IdObj -_dns :: TextS.Text -> ClientM DnsObj +_idPeer :: Text -> ClientM IdObj +_dns :: Text -> ClientM DnsObj _pubsubLs :: ClientM PubsubObj _pubsubPeers :: ClientM PubsubObj -_pubsubPublish :: TextS.Text -> Maybe TextS.Text -> ClientM NoContent +_pubsubPublish :: Text -> Maybe Text -> ClientM NoContent _logLs :: ClientM LogLsObj -_logLevel :: TextS.Text -> Maybe TextS.Text -> ClientM LogLevelObj +_logLevel :: Text -> Maybe Text -> ClientM LogLevelObj _repoVersion :: ClientM RepoVersionObj _repoFsck :: ClientM RepoFsckObj -_keyGen :: TextS.Text -> (Maybe TextS.Text) -> ClientM KeyDetailsObj +_keyGen :: Text -> (Maybe Text) -> ClientM KeyDetailsObj _keyList :: ClientM KeyObj -_keyRename :: TextS.Text -> (Maybe TextS.Text) -> ClientM KeyRenameObj -_keyRm :: TextS.Text -> ClientM KeyObj -_filesChcid :: Maybe TextS.Text -> Maybe Int -> ClientM NoContent -_filesCp :: Maybe TextS.Text -> Maybe TextS.Text -> ClientM NoContent -_filesFlush :: Maybe TextS.Text -> ClientM FilesFlushObj -_filesLs :: Maybe TextS.Text -> ClientM FilesLsObj -_filesMkdir :: Maybe TextS.Text -> ClientM NoContent -_filesMv :: Maybe TextS.Text -> Maybe TextS.Text -> ClientM NoContent -_filesRead :: Maybe TextS.Text -> ClientM FilesReadType -_filesRm :: Maybe TextS.Text -> Maybe Bool -> ClientM NoContent -_filesStat :: Maybe TextS.Text -> ClientM FilesStatObj +_keyRename :: Text -> (Maybe Text) -> ClientM KeyRenameObj +_keyRm :: Text -> ClientM KeyObj +_filesChcid :: Maybe Text -> Maybe Int -> ClientM NoContent +_filesCp :: Maybe Text -> Maybe Text -> ClientM NoContent +_filesFlush :: Maybe Text -> ClientM FilesFlushObj +_filesLs :: Maybe Text -> ClientM FilesLsObj +_filesMkdir :: Maybe Text -> ClientM NoContent +_filesMv :: Maybe Text -> Maybe Text -> ClientM NoContent +_filesRead :: Maybe Text -> ClientM FilesReadType +_filesRm :: Maybe Text -> Maybe Bool -> ClientM NoContent +_filesStat :: Maybe Text -> ClientM FilesStatObj _shutdown :: ClientM NoContent _cat :<|> _ls :<|> _get :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 4cf915ed..532940c3 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -24,8 +24,8 @@ import qualified Codec.Archive.Tar as Tar import Control.Monad.Except import Control.Monad.Reader import Data.Aeson (decode) -import Data.Text as TextS -import qualified Data.Text.Encoding as TextS +import Data.Text +import Data.Text.Encoding import Data.Base58String.Bitcoin (fromBytes, toText) import qualified Data.ByteString as BS'(ByteString, foldr) import qualified Data.ByteArray.Encoding as Enc(convertFromBase, Base(..)) @@ -105,11 +105,11 @@ pubsubCall func = do multipartCall :: Text -> Text -> Ipfs (Net.Response BS.ByteString) multipartCall funcUri filePath = do (reqManager, _, url) <- ask - req <- liftIO $ parseRequest $ TextS.unpack (( TextS.pack url ) <> (TextS.pack "/") <> funcUri ) + req <- liftIO $ parseRequest $ unpack (( pack url ) <> (pack "/") <> funcUri ) resp <- liftIO $ flip httpLbs reqManager =<< formDataBody form req pure resp - where form = [ partFileSource "file" $ TextS.unpack filePath ] + where form = [ partFileSource "file" $ unpack filePath ] ------------------------------------------- Print Functions --------------------------------------------------- @@ -118,17 +118,17 @@ multipartCall funcUri filePath = do printPubsub :: PubsubSubObj -> IO () printPubsub PubsubSubObj {mssgdata = mssg, from = sender, seqno = num, topicIDs = topic } = print $ PubsubSubObj (fromB64 mssg) (fromB64toB58 sender) (fromB64' num) topic - where fromB64toB58 val = case Enc.convertFromBase Enc.Base64 (TextS.encodeUtf8 val) of - Left e -> TextS.pack $ "Invalid input: " ++ e + where fromB64toB58 val = case Enc.convertFromBase Enc.Base64 (encodeUtf8 val) of + Left e -> pack $ "Invalid input: " ++ e Right decoded -> toText $ fromBytes (decoded :: BS'.ByteString) - fromB64 val = case Enc.convertFromBase Enc.Base64 (TextS.encodeUtf8 val) of - Left e -> TextS.pack $ "Invalid input: " ++ e - Right decoded -> TextS.decodeUtf8 (decoded :: BS'.ByteString) + fromB64 val = case Enc.convertFromBase Enc.Base64 (encodeUtf8 val) of + Left e -> pack $ "Invalid input: " ++ e + Right decoded -> decodeUtf8 (decoded :: BS'.ByteString) - fromB64' val = case Enc.convertFromBase Enc.Base64 (TextS.encodeUtf8 val) of - Left e -> TextS.pack $ "Invalid input: " ++ e - Right decoded -> TextS.pack $ BS'.foldr showInt "" (decoded :: BS'.ByteString) + fromB64' val = case Enc.convertFromBase Enc.Base64 (encodeUtf8 val) of + Left e -> pack $ "Invalid input: " ++ e + Right decoded -> pack $ BS'.foldr showInt "" (decoded :: BS'.ByteString) ------------------------------------------- Ipfs functions --------------------------------------------------- @@ -140,7 +140,7 @@ cat hash = call $ Api._cat hash -- | Add a file or directory to ipfs. add :: Text -> Ipfs (Maybe AddObj) add filePath = do - responseVal <- ( multipartCall (TextS.pack "add") filePath ) + responseVal <- ( multipartCall (pack "add") filePath ) pure (decode (Net.responseBody responseVal) :: Maybe AddObj) -- | List directory contents for Unix filesystem objects. @@ -151,7 +151,7 @@ ls hash = call $ Api._ls hash get :: Text -> Ipfs Text get hash = do ret <- call $ Api._get hash - do liftIO $ Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ TextS.encodeUtf8 ret + do liftIO $ Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ encodeUtf8 ret pure "The content has been stored in getResponseDirectory." -- | List links (references) from an object. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. @@ -230,7 +230,7 @@ blockGet key = call $ Api._blockGet key -- | Store input as an IPFS block. blockPut :: Text -> Ipfs (Maybe Api.BlockObj) blockPut filePath = do - responseVal <- multipartCall (TextS.pack "block/put") filePath + responseVal <- multipartCall (pack "block/put") filePath pure (decode (Net.responseBody responseVal) :: Maybe Api.BlockObj) -- | Print information of a raw IPFS block. @@ -248,7 +248,7 @@ dagResolve ref = call $ Api._dagResolve ref -- | Add a dag node to ipfs. dagPut :: Text -> Ipfs (Maybe Api.DagPutObj) dagPut filePath = do - responseVal <- multipartCall (TextS.pack "dag/put") filePath + responseVal <- multipartCall (pack "dag/put") filePath pure (decode (Net.responseBody responseVal) :: Maybe Api.DagPutObj) -- | Get ipfs config values. @@ -262,10 +262,10 @@ configSet key value = call $ Api._configSet key $ Just value -- | Replace the config with the file at . configReplace :: Text -> Ipfs (Maybe Text) configReplace filePath = do - responseVal <- multipartCall (TextS.pack "config/replace") filePath + responseVal <- multipartCall (pack "config/replace") filePath pure $ case statusCode $ Net.responseStatus responseVal of - 200 -> Just $ "Config File Replaced Successfully with status code - " <> (TextS.pack "200") - _ -> Just $ "Error occured with status code - " <> (TextS.pack $ show (statusCode $ Net.responseStatus responseVal)) + 200 -> Just $ "Config File Replaced Successfully with status code - " <> (pack "200") + _ -> Just $ "Error occured with status code - " <> (pack $ show (statusCode $ Net.responseStatus responseVal)) -- | Output the raw bytes of an IPFS object. objectData :: Text -> Ipfs Api.ObjectReturnType @@ -290,13 +290,13 @@ objectRmLink key name = call $ Api._objectRmLink key (Just name) -- | Append data to what already exists in the data segment in the given object. objectAppendData :: Text -> Text -> Ipfs (Maybe Api.ObjectLinksObj) objectAppendData key filePath = do - responseVal <- multipartCall ( ( TextS.pack "object/patch/append-data?arg=" ) <> key) filePath + responseVal <- multipartCall ( ( pack "object/patch/append-data?arg=" ) <> key) filePath pure ( decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj ) -- | Set the data field of an IPFS object. objectSetData :: Text -> Text -> Ipfs (Maybe Api.ObjectLinksObj) objectSetData key filePath = do - responseVal <- multipartCall ( ( TextS.pack "object/patch/set-data?arg=" ) <> key) filePath + responseVal <- multipartCall ( ( pack "object/patch/set-data?arg=" ) <> key) filePath pure ( decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj ) -- | Get and serialize the DAG node named by key. @@ -310,7 +310,7 @@ objectDiff firstKey secondKey = call $ Api._objectDiff firstKey (Just secondKey) -- | Store input as a DAG object, print its key. objectPut :: Text -> Ipfs ( Maybe Api.ObjectObj ) objectPut filePath = do - responseVal <- multipartCall (TextS.pack "object/put") filePath + responseVal <- multipartCall (pack "object/put") filePath pure (decode ( Net.responseBody responseVal) :: Maybe Api.ObjectObj) -- | Get stats for the DAG node named by key. @@ -496,11 +496,11 @@ filesRm mfsPath = do -- | Write to a mutable file in a given filesystem. filesWrite :: Text -> Text -> Bool -> Ipfs (Maybe Text) filesWrite mfsPath filePath toTruncate = do - responseVal <- multipartCall ((TextS.pack "files/write?arg=") - <> mfsPath <> (TextS.pack "&create=true") <> (TextS.pack "&truncate=") <> (TextS.pack $ show toTruncate) ) filePath + responseVal <- multipartCall ((pack "files/write?arg=") + <> mfsPath <> (pack "&create=true") <> (pack "&truncate=") <> (pack $ show toTruncate) ) filePath pure $ case statusCode $ Net.responseStatus responseVal of - 200 -> Just $ "File has been written Successfully with status code - " <> (TextS.pack "200") - _ -> Just $ "Error occured with status code - " <> (TextS.pack $ show (statusCode $ Net.responseStatus responseVal)) + 200 -> Just $ "File has been written Successfully with status code - " <> (pack "200") + _ -> Just $ "Error occured with status code - " <> (pack $ show (statusCode $ Net.responseStatus responseVal)) -- | Shut down the ipfs daemon. shutdown :: Ipfs Text diff --git a/src/Network/Ipfs/Api/Multipart.hs b/src/Network/Ipfs/Api/Multipart.hs index b69f5b17..04a07ef2 100644 --- a/src/Network/Ipfs/Api/Multipart.hs +++ b/src/Network/Ipfs/Api/Multipart.hs @@ -18,12 +18,12 @@ module Network.Ipfs.Api.Multipart where import Control.Monad import Data.Aeson (FromJSON (..), Value(Object), (.:)) -import qualified Data.Text as TextS +import Data.Text data AddObj = AddObj - { name :: TextS.Text - , hash :: TextS.Text - , size :: TextS.Text + { name :: Text + , hash :: Text + , size :: Text } deriving (Show, Eq) instance FromJSON AddObj where diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Stream.hs index b19f1aa1..0a05ef31 100644 --- a/src/Network/Ipfs/Api/Stream.hs +++ b/src/Network/Ipfs/Api/Stream.hs @@ -23,52 +23,52 @@ import Data.Aeson import Data.Int import qualified Data.ByteString.Lazy.Char8() import Data.Proxy -import qualified Data.Text as TextS +import Data.Text import Network.HTTP.Client() import Servant.API import Servant.Client.Streaming as S import Network.Ipfs.Api.Api (IpfsText) -type LogReturnType = TextS.Text +type LogReturnType = Text data PingObj = PingObj { success :: Bool - , text :: TextS.Text + , text :: Text , time :: Int64 } deriving (Show, Eq) data ResponseObj = ResponseObj - { addrs :: Maybe [TextS.Text] - , id :: TextS.Text + { addrs :: Maybe [Text] + , id :: Text } deriving (Show, Eq) data DhtObj = DhtObj - { extra :: TextS.Text - , addrid :: TextS.Text + { extra :: Text + , addrid :: Text , responses :: Maybe [ResponseObj] , addrType :: Int } deriving (Show, Eq) -data RepoKeyObj = RepoKeyObj { repoSlash :: TextS.Text } deriving (Show, Eq) +data RepoKeyObj = RepoKeyObj { repoSlash :: Text } deriving (Show, Eq) data RepoGcObj = RepoGcObj { repoKey :: RepoKeyObj } deriving (Show, Eq) data RepoVerifyObj = RepoVerifyObj - { msg :: TextS.Text + { msg :: Text , progress :: Int } deriving (Show, Eq) data RefsObj = RefsObj - { error :: TextS.Text - , ref :: TextS.Text + { error :: Text + , ref :: Text } deriving (Show, Eq) data PubsubSubObj = PubsubSubObj - { mssgdata :: TextS.Text - , from :: TextS.Text - , seqno :: TextS.Text - , topicIDs :: [TextS.Text] + { mssgdata :: Text + , from :: Text + , seqno :: Text + , topicIDs :: [Text] } deriving (Show, Eq) instance FromJSON PingObj where @@ -130,34 +130,34 @@ instance FromJSON PubsubSubObj where parseJSON _ = mzero -type IpfsStreamApi = "ping" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO PingObj ) - :<|> "dht" :> "findpeer" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) - :<|> "dht" :> "findprovs" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) - :<|> "dht" :> "get" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) - :<|> "dht" :> "provide" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) - :<|> "dht" :> "query" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) +type IpfsStreamApi = "ping" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO PingObj ) + :<|> "dht" :> "findpeer" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + :<|> "dht" :> "findprovs" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + :<|> "dht" :> "get" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + :<|> "dht" :> "provide" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) + :<|> "dht" :> "query" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) :<|> "log" :> "tail" :> StreamGet NewlineFraming IpfsText ( SourceIO LogReturnType) :<|> "repo" :> "gc" :> StreamGet NewlineFraming JSON ( SourceIO RepoGcObj) :<|> "repo" :> "verify" :> StreamGet NewlineFraming JSON ( SourceIO RepoVerifyObj) - :<|> "refs" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON (SourceIO RefsObj) + :<|> "refs" :> Capture "arg" Text :> StreamGet NewlineFraming JSON (SourceIO RefsObj) :<|> "refs" :> "local" :> StreamGet NewlineFraming JSON (SourceIO RefsObj) - :<|> "pubsub" :> "sub" :> Capture "arg" TextS.Text :> StreamGet NewlineFraming JSON ( SourceIO PubsubSubObj ) + :<|> "pubsub" :> "sub" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO PubsubSubObj ) ipfsStreamApi :: Proxy IpfsStreamApi ipfsStreamApi = Proxy -_ping :: TextS.Text -> ClientM (SourceIO PingObj) -_dhtFindPeer :: TextS.Text -> ClientM (SourceIO DhtObj) -_dhtFindProvs :: TextS.Text -> ClientM (SourceIO DhtObj) -_dhtGet :: TextS.Text -> ClientM (SourceIO DhtObj) -_dhtProvide :: TextS.Text -> ClientM (SourceIO DhtObj) -_dhtQuery :: TextS.Text -> ClientM (SourceIO DhtObj) +_ping :: Text -> ClientM (SourceIO PingObj) +_dhtFindPeer :: Text -> ClientM (SourceIO DhtObj) +_dhtFindProvs :: Text -> ClientM (SourceIO DhtObj) +_dhtGet :: Text -> ClientM (SourceIO DhtObj) +_dhtProvide :: Text -> ClientM (SourceIO DhtObj) +_dhtQuery :: Text -> ClientM (SourceIO DhtObj) _logTail :: ClientM (SourceIO LogReturnType) _repoGc :: ClientM (SourceIO RepoGcObj) _repoVerify :: ClientM (SourceIO RepoVerifyObj) -_refs :: TextS.Text -> ClientM (SourceIO RefsObj) +_refs :: Text -> ClientM (SourceIO RefsObj) _refsLocal :: ClientM (SourceIO RefsObj) -_pubsubSubscribe :: TextS.Text -> ClientM (SourceIO PubsubSubObj) +_pubsubSubscribe :: Text -> ClientM (SourceIO PubsubSubObj) _ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery :<|> _logTail :<|> _repoGc :<|> _repoVerify :<|> _refs :<|> _refsLocal :<|> _pubsubSubscribe = client ipfsStreamApi \ No newline at end of file diff --git a/test/Network/Ipfs/Api/Test/Key.hs b/test/Network/Ipfs/Api/Test/Key.hs index 068b9c56..6860e89f 100644 --- a/test/Network/Ipfs/Api/Test/Key.hs +++ b/test/Network/Ipfs/Api/Test/Key.hs @@ -13,7 +13,7 @@ module Network.Ipfs.Api.Test.Key where -import Data.Text as TextS +import Data.Text import Control.Exception() import Control.Monad.Trans import Test.Hspec From a9255b38728249ce876ff76a794f3aab1b2a3147 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 24 Sep 2019 16:10:36 +0300 Subject: [PATCH 121/237] Added LTS14 TravisCI builds --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0fcb3ea9..3ddc8ce7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,8 @@ matrix: compiler: "LTS12" - env: RESOLVER=lts-13 compiler: "LTS13" + - env: RESOLVER=lts-14 + compiler: "LTS14" - env: RESOLVER=nightly compiler: "nightly" @@ -29,6 +31,9 @@ matrix: - env: RESOLVER=lts-13 compiler: "LTS13" os: osx + - env: RESOLVER=lts-14 + compiler: "LTS14" + os: osx - env: RESOLVER=nightly compiler: "nightly" os: osx @@ -42,6 +47,9 @@ matrix: - env: RESOLVER=lts-13 compiler: "LTS13" os: windows + - env: RESOLVER=lts-14 + compiler: "LTS14" + os: windows - env: RESOLVER=nightly compiler: "nightly" os: windows From 8e5062584312710857f9da8b113df28fae3f9e7f Mon Sep 17 00:00:00 2001 From: amany9000 Date: Fri, 27 Sep 2019 01:42:40 +0530 Subject: [PATCH 122/237] Dependency Version Change --- package.yaml | 22 +++++++++++----------- src/Network/Ipfs/Api/Ipfs.hs | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.yaml b/package.yaml index 630ce9c6..0f7b89c8 100644 --- a/package.yaml +++ b/package.yaml @@ -51,17 +51,17 @@ dependencies: - async >=2.1.1.1 && <2.3 - text >=1.2.2.2 && <1.3 - mtl >=2.2.1 && <2.3 -- websockets >=0.12.5.3 && <0.13 -- network >=2.8.0.1 && <2.9 -- servant-client >= 0.15 && <0.36 -- servant >= 0.15 && <0.16 -- http-media >= 0.7 && <0.8 -- errors >= 2.2 && <2.4 -- hspec >= 2.6 && <2.8 -- base58string >= 0.10.0 && <0.11 -- tar >= 0.5 && <0.6 -- unordered-containers >= 0.2 && <0.3 -- http-types >= 0.12 && <0.14 +- websockets >=0.11 && <0.13 +- network >=2.6 && <2.9 +- servant-client >=0.13 && <0.17 +- servant >=0.13 && <0.17 +- http-media >=0.7 && <0.8.1 +- errors >=2.2 && <2.4 +- hspec >=2.4 && <2.8 +- base58string >=0.10.0 && <0.11 +- tar >=0.5 && <0.6 +- unordered-containers >=0.2 && <0.3 +- http-types >=0.12 && <0.14 - attoparsec >=0.13.2.1 && <0.14 ghc-options: diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs index 532940c3..c1937c22 100644 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ b/src/Network/Ipfs/Api/Ipfs.hs @@ -44,13 +44,13 @@ import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _d _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal, _pubsubSubscribe, PubsubSubObj(..)) -newtype IpfsT m a = IpfsT { unIpfs :: ReaderT (Manager, BaseUrl, String) (ExceptT ServantError m) a} +newtype IpfsT m a = IpfsT { unIpfs :: ReaderT (Manager, BaseUrl, String) (ExceptT ClientError m) a} deriving ( Functor , Applicative , Monad , MonadIO , MonadReader (Manager, BaseUrl, String) - , MonadError ServantError + , MonadError ClientError ) instance MonadTrans IpfsT where From 7e8cc830623c516856c34e16754ace71004930a9 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 3 May 2020 08:49:24 +0300 Subject: [PATCH 123/237] Fix build on LTS-15 and nightly --- .travis.yml | 8 ++++++++ package.yaml | 8 ++++---- src/Network/Ethereum/Account/LocalKey.hs | 7 +++++-- src/Network/Ethereum/Account/Personal.hs | 13 ++++++++----- stack.yaml | 7 ++----- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ddc8ce7..a253878c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,8 @@ matrix: compiler: "LTS13" - env: RESOLVER=lts-14 compiler: "LTS14" + - env: RESOLVER=lts-15 + compiler: "LTS15" - env: RESOLVER=nightly compiler: "nightly" @@ -34,6 +36,9 @@ matrix: - env: RESOLVER=lts-14 compiler: "LTS14" os: osx + - env: RESOLVER=lts-15 + compiler: "LTS15" + os: osx - env: RESOLVER=nightly compiler: "nightly" os: osx @@ -50,6 +55,9 @@ matrix: - env: RESOLVER=lts-14 compiler: "LTS14" os: windows + - env: RESOLVER=lts-15 + compiler: "LTS15" + os: windows - env: RESOLVER=nightly compiler: "nightly" os: windows diff --git a/package.yaml b/package.yaml index 094219bb..4f13169a 100644 --- a/package.yaml +++ b/package.yaml @@ -23,11 +23,11 @@ extra-source-files: - test/contracts/Linearization.json dependencies: -- base >4.10 && <4.13 -- template-haskell >=2.12 && <2.15 +- base >4.10 && <4.14 +- template-haskell >=2.12 && <2.16 - http-client-tls >=0.3.5.1 && <0.4 - microlens-aeson >=2.2.0.2 && <2.4 -- microlens-mtl >=0.1.11.0 && <0.2 +- microlens-mtl >=0.1.11.0 && <0.3 - microlens-th >=0.4.1.1 && <0.5 - microlens >=0.4.8.1 && <0.5 - data-default >=0.7.1.1 && <0.8 @@ -47,7 +47,7 @@ dependencies: - memory >=0.14.11 && <0.16 - cereal >=0.5.4.0 && <0.6 - aeson >=1.2.2.0 && <1.5 -- vinyl >=0.5.3 && <0.12 +- vinyl >=0.5.3 && <0.13 - async >=2.1.1.1 && <2.3 - text >=1.2.2.2 && <1.3 - mtl >=2.2.1 && <2.3 diff --git a/src/Network/Ethereum/Account/LocalKey.hs b/src/Network/Ethereum/Account/LocalKey.hs index 419234df..f9fe2f46 100644 --- a/src/Network/Ethereum/Account/LocalKey.hs +++ b/src/Network/Ethereum/Account/LocalKey.hs @@ -19,6 +19,7 @@ module Network.Ethereum.Account.LocalKey where +import Control.Monad.Catch (throwM) import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) import Crypto.PubKey.ECC.ECDSA (PrivateKey) @@ -40,6 +41,7 @@ import Network.Ethereum.Account.Internal (AccountT (..), import qualified Network.Ethereum.Api.Eth as Eth (call, estimateGas, getTransactionCount, sendRawTransaction) +import Network.Ethereum.Api.Provider (Web3Error (ParserFail)) import Network.Ethereum.Api.Types (Call (..)) import Network.Ethereum.Chain (foundation) import Network.Ethereum.Contract.Method (selector) @@ -49,7 +51,8 @@ import Network.Ethereum.Transaction (encodeTransaction) data LocalKey = LocalKey { localKeyPrivate :: !PrivateKey , localKeyChainId :: !Integer - } deriving (Eq, Show) + } + deriving (Eq, Show) instance Default LocalKey where def = LocalKey (importKey empty) foundation @@ -92,4 +95,4 @@ instance Account LocalKey LocalKeyAccount where res <- lift $ Eth.call params _block case decode res of Right r -> return r - Left e -> fail e + Left e -> lift $ throwM (ParserFail e) diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs index a5c6b58c..3f752a07 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/src/Network/Ethereum/Account/Personal.hs @@ -19,6 +19,7 @@ module Network.Ethereum.Account.Personal where +import Control.Monad.Catch (throwM) import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) import qualified Data.ByteArray as BA (convert) @@ -36,14 +37,16 @@ import Network.Ethereum.Account.Internal (AccountT (..), import qualified Network.Ethereum.Api.Eth as Eth (call, estimateGas) import Network.Ethereum.Api.Personal (Passphrase) import qualified Network.Ethereum.Api.Personal as Personal (sendTransaction) +import Network.Ethereum.Api.Provider (Web3Error (ParserFail)) import Network.Ethereum.Api.Types (Call (callData, callFrom, callGas)) import Network.Ethereum.Contract.Method (selector) -- | Unlockable node managed account params -data Personal = Personal { - personalAddress :: !Address - , personalPassphrase :: !Passphrase - } deriving (Eq, Show) +data Personal = Personal + { personalAddress :: !Address + , personalPassphrase :: !Passphrase + } + deriving (Eq, Show) instance Default Personal where def = Personal def "" @@ -80,4 +83,4 @@ instance Account Personal PersonalAccount where res <- lift $ Eth.call params block case decode res of Right r -> return r - Left e -> fail e + Left e -> lift $ throwM (ParserFail e) diff --git a/stack.yaml b/stack.yaml index dabb0287..a2647b84 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-14.6 +resolver: lts-15.10 # User packages to be built. packages: @@ -8,6 +8,7 @@ packages: # Extra package dependencies extra-deps: - relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c +- vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c # Dependencies bounds pvp-bounds: both @@ -16,9 +17,5 @@ pvp-bounds: both nix: packages: - zlib - - boost - - jsoncpp - - solc - - solc.dev - haskellPackages.hlint - haskellPackages.stylish-haskell From 4f5efdf22e2e3348e0051ad9ea4e2e39ad706fc7 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 3 May 2020 08:50:39 +0300 Subject: [PATCH 124/237] Bump version --- CHANGELOG.md | 8 ++++++++ LICENSE | 2 +- package.yaml | 6 +++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 179dd696..b804c39d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.8.4.0] 2020-05-03 +### Added +- Tuple support for `pragma experimental ABIEncoderV2` +- Fixed dependencies bounds for stackage LTS-15 + +### Changed +- Fixed reusing of HTTP request Manager + ## [0.8.3.2] 2019-05-13 ### Changed - Fixed dependencies bounds for stackage distribution diff --git a/LICENSE b/LICENSE index 50eb1b3a..f6ef0da6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright Alexander Krupenkin (c) 2016-2018 +Copyright Alexander Krupenkin (c) 2016-2020 All rights reserved. diff --git a/package.yaml b/package.yaml index 4f13169a..1f5c43a6 100644 --- a/package.yaml +++ b/package.yaml @@ -1,9 +1,9 @@ name: web3 -version: 0.8.3.2 +version: 0.8.4.0 synopsis: Ethereum API for Haskell description: Web3 is a Haskell client library for Ethereum github: "airalab/hs-web3" -license: BSD3 +license: BSD-3-Clause license-file: LICENSE author: Alexander Krupenkin maintainer: mail@akru.me @@ -132,7 +132,7 @@ tests: - hspec >=2.4.4 && <2.8 - split >=0.2.3 && <0.3 - random >=1.1 && <1.2 - - time >=1.6.0 && <1.9 + - time >=1.6.0 && <1.11 - stm >=2.4.4 && <2.6 ghc-options: - -threaded From fb8a185c04f12697abb8ae821ba7b1f94a4e3d6b Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 3 May 2020 13:49:55 +0300 Subject: [PATCH 125/237] [CI]: finish support for stackage LTS-11 --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index a253878c..4531b005 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,6 @@ cache: matrix: # Build with different GHC versions and stable package sets include: - - env: RESOLVER=lts-11 - compiler: "LTS11" - env: RESOLVER=lts-12 compiler: "LTS12" - env: RESOLVER=lts-13 @@ -24,9 +22,6 @@ matrix: - env: RESOLVER=nightly compiler: "nightly" - - env: RESOLVER=lts-11 - compiler: "LTS11" - os: osx - env: RESOLVER=lts-12 compiler: "LTS12" os: osx @@ -43,9 +38,6 @@ matrix: compiler: "nightly" os: osx - - env: RESOLVER=lts-11 - compiler: "LTS11" - os: windows - env: RESOLVER=lts-12 compiler: "LTS12" os: windows From 3aeb56406c6ceafd40735395c61bb2a40847eb8e Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 16 May 2020 03:42:46 +0300 Subject: [PATCH 126/237] Split Ethereum independed ECDSA crypto --- src/Crypto/Ecdsa/Signature.hs | 97 +++++++++++++++++++++++++++++++ src/Crypto/Ecdsa/Utils.hs | 46 +++++++++++++++ src/Crypto/Ethereum.hs | 9 +-- src/Crypto/Ethereum/Keyfile.hs | 31 ++++++---- src/Crypto/Ethereum/Signature.hs | 95 ++++-------------------------- src/Crypto/Ethereum/Utils.hs | 44 ++------------ src/Data/Solidity/Prim/Address.hs | 7 ++- 7 files changed, 188 insertions(+), 141 deletions(-) create mode 100644 src/Crypto/Ecdsa/Signature.hs create mode 100644 src/Crypto/Ecdsa/Utils.hs diff --git a/src/Crypto/Ecdsa/Signature.hs b/src/Crypto/Ecdsa/Signature.hs new file mode 100644 index 00000000..996570a1 --- /dev/null +++ b/src/Crypto/Ecdsa/Signature.hs @@ -0,0 +1,97 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Crypto.Ecdsa.Signature +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Recoverable ECC signature support. +-- + +module Crypto.Ecdsa.Signature + ( + sign + , pack + , unpack + ) where + +import Control.Monad (when) +import Crypto.Hash (SHA256) +import Crypto.Number.Generate (generateBetween) +import Crypto.Number.ModArithmetic (inverse) +import Crypto.Number.Serialize (i2osp, os2ip) +import Crypto.PubKey.ECC.ECDSA (PrivateKey (..)) +import Crypto.PubKey.ECC.Prim (pointMul) +import Crypto.PubKey.ECC.Types (CurveCommon (ecc_g, ecc_n), + Point (..), common_curve) +import Crypto.Random (MonadRandom, withDRG) +import Crypto.Random.HmacDrbg (HmacDrbg, initialize) +import Data.Bits (xor, (.|.)) +import Data.ByteArray (ByteArray, ByteArrayAccess, Bytes, + convert, singleton, takeView, + view) +import qualified Data.ByteArray as BA (unpack) +import Data.Monoid ((<>)) +import Data.Word (Word8) + +import Crypto.Ecdsa.Utils (exportKey) + +-- | Sign arbitrary data by given private key. +-- +-- /WARNING:/ Vulnerable to timing attacks. +sign :: ByteArrayAccess bin + => PrivateKey + -> bin + -> (Integer, Integer, Word8) +sign pk bin = fst $ withDRG hmac_drbg $ ecsign pk (os2ip truncated) + where + hmac_drbg :: HmacDrbg SHA256 + hmac_drbg = initialize $ exportKey pk <> truncated + truncated = convert $ takeView bin 32 :: Bytes + +ecsign :: MonadRandom m + => PrivateKey + -> Integer + -> m (Integer, Integer, Word8) +ecsign pk@(PrivateKey curve d) z = do + k <- generateBetween 0 (n - 1) + case trySign k of + Nothing -> ecsign pk z + Just rsv -> return rsv + where + n = ecc_n (common_curve curve) + g = ecc_g (common_curve curve) + recoveryParam x y r = fromIntegral $ + fromEnum (odd y) .|. if x /= r then 2 else 0 + trySign k = do + (kpX, kpY) <- case pointMul curve k g of + PointO -> Nothing + Point x y -> return (x, y) + let r = kpX `mod` n + kInv <- inverse k n + let s = kInv * (z + r * d) `mod` n + when (r == 0 || s == 0) Nothing + -- Recovery param + let v = recoveryParam kpX kpY r + -- Use complement of s if it > n / 2 + let (s', v') | s > n `div` 2 = (n - s, v `xor` 1) + | otherwise = (s, v) + return $ (r, s', v' + 27) + +-- | Unpack recoverable signature from byte array. +-- +-- Input array should have 65 byte length. +unpack :: ByteArrayAccess rsv => rsv -> (Integer, Integer, Word8) +unpack vrs = (r, s, v) + where + r = os2ip (view vrs 1 33) + s = os2ip (view vrs 33 65) + v = head (BA.unpack vrs) + +-- | Pack recoverable signature as byte array (65 byte length). +pack :: ByteArray rsv => (Integer, Integer, Word8) -> rsv +pack (r, s, v) = i2osp r <> i2osp s <> singleton v diff --git a/src/Crypto/Ecdsa/Utils.hs b/src/Crypto/Ecdsa/Utils.hs new file mode 100644 index 00000000..09a73171 --- /dev/null +++ b/src/Crypto/Ecdsa/Utils.hs @@ -0,0 +1,46 @@ +-- | +-- Module : Crypto.Ecdsa.Utils +-- Copyright : Alexander Krupenkin 2018 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- ECDSA module helper functions. +-- + +module Crypto.Ecdsa.Utils where + +import Crypto.Number.Serialize (i2osp, os2ip) +import Crypto.PubKey.ECC.ECDSA (PrivateKey (..), PublicKey (..)) +import Crypto.PubKey.ECC.Generate (generateQ) +import Crypto.PubKey.ECC.Types (CurveName (SEC_p256k1), Point (..), + getCurveByName) +import Data.ByteArray (ByteArray, ByteArrayAccess) +import Data.Monoid ((<>)) + +-- | Import ECDSA private key from byte array. +-- +-- Input array should have 32 byte length. +importKey :: ByteArrayAccess privateKey => privateKey -> PrivateKey +{-# INLINE importKey #-} +importKey = PrivateKey (getCurveByName SEC_p256k1) . os2ip + +-- | Export private key to byte array (32 byte length). +exportKey :: ByteArray privateKey => PrivateKey -> privateKey +{-# INLINE exportKey #-} +exportKey (PrivateKey _ key) = i2osp key + +-- | Get public key appropriate to private key. +-- +-- /WARNING:/ Vulnerable to timing attacks. +derivePubKey :: PrivateKey -> PublicKey +{-# INLINE derivePubKey #-} +derivePubKey (PrivateKey curve p) = PublicKey curve (generateQ curve p) + +-- | Export public key to byte array (64 byte length). +exportPubKey :: ByteArray publicKey => PublicKey -> publicKey +{-# INLINE exportPubKey #-} +exportPubKey (PublicKey _ (Point x y)) = i2osp x <> i2osp y +exportPubKey (PublicKey _ PointO) = mempty diff --git a/src/Crypto/Ethereum.hs b/src/Crypto/Ethereum.hs index 94a4a08b..5e4a02ff 100644 --- a/src/Crypto/Ethereum.hs +++ b/src/Crypto/Ethereum.hs @@ -7,12 +7,12 @@ -- Stability : experimental -- Portability : unportable -- --- Ethereum ECC support module. +-- Ethereum cryptography primitives. -- module Crypto.Ethereum ( - -- * Ethereum crypto key ops + -- * ECDSA crypto key ops PrivateKey , PublicKey , importKey @@ -22,9 +22,10 @@ module Crypto.Ethereum , signMessage -- * Hash function - , sha3 + , keccak256 ) where +import Crypto.Ecdsa.Utils (derivePubKey, importKey) import Crypto.Ethereum.Signature (signMessage) -import Crypto.Ethereum.Utils (derivePubKey, importKey, sha3) +import Crypto.Ethereum.Utils (keccak256) import Crypto.PubKey.ECC.ECDSA (PrivateKey, PublicKey) diff --git a/src/Crypto/Ethereum/Keyfile.hs b/src/Crypto/Ethereum/Keyfile.hs index ac4db55e..6e3ff59e 100644 --- a/src/Crypto/Ethereum/Keyfile.hs +++ b/src/Crypto/Ethereum/Keyfile.hs @@ -10,7 +10,7 @@ -- Stability : experimental -- Portability : portable -- --- Web3 Secret Storage implementation. +-- Ethereum Secret Storage implementation. -- Spec https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition. -- @@ -44,25 +44,32 @@ import Data.Text (Text) import Data.UUID.Types (UUID) import Data.UUID.Types.Internal (buildFromBytes) -import Crypto.Ethereum.Utils (sha3) +import Crypto.Ethereum.Utils (keccak256) import Data.ByteArray.HexString (HexString) -- | Key derivation function parameters and salt. data Kdf = Pbkdf2 !Pbkdf2.Parameters !HexString - | Scrypt !Scrypt.Parameters !HexString + | Scrypt !Scrypt.Parameters !HexString -- | Cipher parameters. data Cipher = Aes128Ctr - { cipherIv :: !(IV AES128), cipherText :: !HexString } + { cipherIv :: !(IV AES128) + , cipherText :: !HexString + } -- | Secret Storage representation on memory. data EncryptedKey = EncryptedKey - { encryptedKeyId :: !UUID -- ^ Random key ID - , encryptedKeyVersion :: !Int -- ^ Version (suppoted version 3 only) - , encryptedKeyCipher :: !Cipher -- ^ Cipher (supported AES-128-CTR only) - , encryptedKeyKdf :: !Kdf -- ^ Key derivation function - , encryptedKeyMac :: !HexString -- ^ MAC - } + { encryptedKeyId :: !UUID + -- ^ Random key ID + , encryptedKeyVersion :: !Int + -- ^ Version (suppoted version 3 only) + , encryptedKeyCipher :: !Cipher + -- ^ Cipher (supported AES-128-CTR only) + , encryptedKeyKdf :: !Kdf + -- ^ Key derivation function + , encryptedKeyMac :: !HexString + -- ^ MAC + } instance Eq EncryptedKey where a == b = encryptedKeyId a == encryptedKeyId b @@ -195,7 +202,7 @@ decrypt EncryptedKey{..} password cipher = throwCryptoError $ cipherInit (BA.take 16 derivedKey) :: AES128 derivedKey = deriveKey encryptedKeyKdf password ciphertext = cipherText encryptedKeyCipher - mac = sha3 (BA.drop 16 derivedKey <> ciphertext) + mac = keccak256 (BA.drop 16 derivedKey <> ciphertext) iv = cipherIv encryptedKeyCipher -- | Encrypt Ethereum private key. @@ -213,7 +220,7 @@ encrypt privateKey password = do let derivedKey = deriveKey kdf password cipher = throwCryptoError $ cipherInit (BA.take 16 derivedKey) :: AES128 ciphertext = ctrCombine cipher iv privateKey - mac = sha3 (BA.drop 16 derivedKey <> ciphertext) + mac = keccak256 (BA.drop 16 derivedKey <> ciphertext) uuid <- randomUUID return $ EncryptedKey uuid 3 (Aes128Ctr iv $ convert ciphertext) kdf mac where diff --git a/src/Crypto/Ethereum/Signature.hs b/src/Crypto/Ethereum/Signature.hs index 02eaa1e4..c6c6e3ed 100644 --- a/src/Crypto/Ethereum/Signature.hs +++ b/src/Crypto/Ethereum/Signature.hs @@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Crypto.Ethereum +-- Module : Crypto.Ecdsa.Signature -- Copyright : Alexander Krupenkin 2018 -- License : BSD3 -- @@ -9,7 +9,7 @@ -- Stability : experimental -- Portability : portable -- --- Recoverable ECC signature support. +-- Recoverable Ethereum signature support. -- module Crypto.Ethereum.Signature @@ -17,35 +17,18 @@ module Crypto.Ethereum.Signature hashMessage , signMessage , signTransaction - , pack - , unpack ) where -import Control.Monad (when) -import Crypto.Hash (Digest, Keccak_256 (..), SHA256, - hashWith) -import Crypto.Number.Generate (generateBetween) -import Crypto.Number.ModArithmetic (inverse) -import Crypto.Number.Serialize (i2osp, os2ip) -import Crypto.PubKey.ECC.ECDSA (PrivateKey (..)) -import Crypto.PubKey.ECC.Prim (pointMul) -import Crypto.PubKey.ECC.Types (CurveCommon (ecc_g, ecc_n), - Point (..), common_curve) -import Crypto.Random (MonadRandom, withDRG) -import Crypto.Random.HmacDrbg (HmacDrbg, initialize) -import Data.Bits (xor, (.|.)) -import Data.ByteArray (ByteArray, ByteArrayAccess, - convert, singleton, takeView, - view) -import qualified Data.ByteArray as BA (length, unpack) -import Data.ByteString.Builder (intDec, toLazyByteString) -import qualified Data.ByteString.Lazy as LBS (toStrict) -import Data.Monoid ((<>)) -import Data.Word (Word8) +import Crypto.Hash (Digest, Keccak_256 (..), hashWith) +import Crypto.PubKey.ECC.ECDSA (PrivateKey (..)) +import Data.ByteArray (ByteArray, ByteArrayAccess, convert) +import qualified Data.ByteArray as BA (length) +import Data.ByteString.Builder (intDec, toLazyByteString) +import qualified Data.ByteString.Lazy as LBS (toStrict) +import Data.Monoid ((<>)) +import Data.Word (Word8) -import Crypto.Ethereum.Utils (exportKey) -import Data.ByteArray.HexString (HexString) -import Data.Solidity.Prim.Address (Address) +import Crypto.Ecdsa.Signature (pack, sign) -- | Make Ethereum standard signature. -- @@ -84,59 +67,3 @@ signTransaction encode key = encode $ Just signed where unsigned = encode Nothing signed = sign key (hashWith Keccak_256 unsigned) - --- | Sign arbitrary data by given private key. --- --- /WARNING:/ Vulnerable to timing attacks. -sign :: ByteArrayAccess bin - => PrivateKey - -> bin - -> (Integer, Integer, Word8) -sign pk bin = fst $ withDRG hmac_drbg $ ecsign pk (os2ip truncated) - where - hmac_drbg :: HmacDrbg SHA256 - hmac_drbg = initialize $ exportKey pk <> truncated - truncated = convert $ takeView bin 32 :: HexString - -ecsign :: MonadRandom m - => PrivateKey - -> Integer - -> m (Integer, Integer, Word8) -ecsign pk@(PrivateKey curve d) z = do - k <- generateBetween 0 (n - 1) - case trySign k of - Nothing -> ecsign pk z - Just rsv -> return rsv - where - n = ecc_n (common_curve curve) - g = ecc_g (common_curve curve) - recoveryParam x y r = fromIntegral $ - fromEnum (odd y) .|. if x /= r then 2 else 0 - trySign k = do - (kpX, kpY) <- case pointMul curve k g of - PointO -> Nothing - Point x y -> return (x, y) - let r = kpX `mod` n - kInv <- inverse k n - let s = kInv * (z + r * d) `mod` n - when (r == 0 || s == 0) Nothing - -- Recovery param - let v = recoveryParam kpX kpY r - -- Use complement of s if it > n / 2 - let (s', v') | s > n `div` 2 = (n - s, v `xor` 1) - | otherwise = (s, v) - return $ (r, s', v' + 27) - --- | Unpack recoverable signature from byte array. --- --- Input array should have 65 byte length. -unpack :: ByteArrayAccess rsv => rsv -> (Integer, Integer, Word8) -unpack vrs = (r, s, v) - where - r = os2ip (view vrs 1 33) - s = os2ip (view vrs 33 65) - v = head (BA.unpack vrs) - --- | Pack recoverable signature as byte array (65 byte length). -pack :: ByteArray rsv => (Integer, Integer, Word8) -> rsv -pack (r, s, v) = i2osp r <> i2osp s <> singleton v diff --git a/src/Crypto/Ethereum/Utils.hs b/src/Crypto/Ethereum/Utils.hs index 2e9cfbfa..1536cc37 100644 --- a/src/Crypto/Ethereum/Utils.hs +++ b/src/Crypto/Ethereum/Utils.hs @@ -7,47 +7,15 @@ -- Stability : experimental -- Portability : portable -- --- EC cryptography on Secp256k1 curve. +-- Ethereum crypto module helper functions. -- module Crypto.Ethereum.Utils where -import Crypto.Hash (Keccak_256 (..), hashWith) -import Crypto.Number.Serialize (i2osp, os2ip) -import Crypto.PubKey.ECC.ECDSA (PrivateKey (..), PublicKey (..)) -import Crypto.PubKey.ECC.Generate (generateQ) -import Crypto.PubKey.ECC.Types (CurveName (SEC_p256k1), Point (..), - getCurveByName) -import Data.ByteArray (ByteArray, ByteArrayAccess, - convert) -import Data.Monoid ((<>)) - --- | Import Ethereum private key from byte array. --- --- Input array should have 32 byte length. -importKey :: ByteArrayAccess privateKey => privateKey -> PrivateKey -{-# INLINE importKey #-} -importKey = PrivateKey (getCurveByName SEC_p256k1) . os2ip - --- | Export private key to byte array (32 byte length). -exportKey :: ByteArray privateKey => PrivateKey -> privateKey -{-# INLINE exportKey #-} -exportKey (PrivateKey _ key) = i2osp key - --- | Get public key appropriate to private key. --- --- /WARNING:/ Vulnerable to timing attacks. -derivePubKey :: PrivateKey -> PublicKey -{-# INLINE derivePubKey #-} -derivePubKey (PrivateKey curve p) = PublicKey curve (generateQ curve p) - --- | Export public key to byte array (64 byte length). -exportPubKey :: ByteArray publicKey => PublicKey -> publicKey -{-# INLINE exportPubKey #-} -exportPubKey (PublicKey _ (Point x y)) = i2osp x <> i2osp y -exportPubKey (PublicKey _ PointO) = mempty +import Crypto.Hash (Keccak_256 (..), hashWith) +import Data.ByteArray (ByteArray, ByteArrayAccess, convert) -- | Keccak 256 hash function. -sha3 :: (ByteArrayAccess bin, ByteArray bout) => bin -> bout -{-# INLINE sha3 #-} -sha3 = convert . hashWith Keccak_256 +keccak256 :: (ByteArrayAccess bin, ByteArray bout) => bin -> bout +{-# INLINE keccak256 #-} +keccak256 = convert . hashWith Keccak_256 diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs index 1e2f0815..e36b3b1d 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/src/Data/Solidity/Prim/Address.hs @@ -49,7 +49,8 @@ import Data.Text.Encoding as T (encodeUtf8) import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) -import Crypto.Ethereum.Utils (exportPubKey, sha3) +import Crypto.Ecdsa.Utils (exportPubKey) +import Crypto.Ethereum.Utils (keccak256) import Data.ByteArray.HexString (HexString, fromBytes, toBytes, toText) import Data.Solidity.Abi (AbiGet (..), AbiPut (..), @@ -95,7 +96,7 @@ fromPubKey key = Left e -> error $ "Impossible error: " ++ e where toAddress :: HexString -> HexString - toAddress = BA.drop 12 . sha3 + toAddress = BA.drop 12 . keccak256 -- | Decode address from hex string fromHexString :: HexString -> Either String Address @@ -113,7 +114,7 @@ toHexString = fromBytes . C8.drop 12 . encode toChecksum :: ByteString -> ByteString toChecksum addr = ("0x" <>) . C8.pack $ zipWith ($) upcaseVector lower where - upcaseVector = (>>= fourthBits) . BS.unpack . BS.take 20 $ sha3 (C8.pack lower) + upcaseVector = (>>= fourthBits) . BS.unpack . BS.take 20 $ keccak256 (C8.pack lower) fourthBits n = bool id C.toUpper <$> [n .&. 0x80 /= 0, n .&. 0x08 /= 0] lower = drop 2 . fmap C.toLower . C8.unpack $ addr From e696807417d61a18bc287a67ca1cfb7de136c3f2 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 16 May 2020 05:36:42 +0300 Subject: [PATCH 127/237] Dont use Web3 type directly in Ethereum module --- src/Network/Ethereum.hs | 32 ++++ src/Network/Ethereum/Account/Default.hs | 4 +- src/Network/Ethereum/Account/LocalKey.hs | 4 +- src/Network/Ethereum/Account/Personal.hs | 4 +- src/Network/Ethereum/Contract/Event/Common.hs | 51 +++---- .../Ethereum/Contract/Event/MultiFilter.hs | 137 ++++++++---------- .../Ethereum/Contract/Event/SingleFilter.hs | 108 ++++++-------- src/Network/Ethereum/Web3.hs | 44 ------ src/Network/Ipfs.hs | 15 ++ src/Network/Ipfs/Api/{Api.hs => Internal.hs} | 0 src/Network/Ipfs/Types/Multihash.hs | 78 ---------- src/Network/JsonRpc/TinyClient.hs | 103 ++++++------- src/Network/Polkadot.hs | 15 ++ src/Network/Web3.hs | 33 +++++ .../{Ethereum/Api => Web3}/Provider.hs | 80 +++++----- 15 files changed, 312 insertions(+), 396 deletions(-) create mode 100644 src/Network/Ethereum.hs delete mode 100644 src/Network/Ethereum/Web3.hs create mode 100644 src/Network/Ipfs.hs rename src/Network/Ipfs/Api/{Api.hs => Internal.hs} (100%) delete mode 100644 src/Network/Ipfs/Types/Multihash.hs create mode 100644 src/Network/Polkadot.hs create mode 100644 src/Network/Web3.hs rename src/Network/{Ethereum/Api => Web3}/Provider.hs (65%) diff --git a/src/Network/Ethereum.hs b/src/Network/Ethereum.hs new file mode 100644 index 00000000..2d340dbb --- /dev/null +++ b/src/Network/Ethereum.hs @@ -0,0 +1,32 @@ +-- | +-- Module : Network.Ethereum +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- TODO +-- + +module Network.Ethereum + ( + -- * Basic transaction sending + module Account + + -- * Basic EVM event listening + , EventAction(..) + , event + + -- * Primitive Solidity data types + , module Prim + + -- * Metric unit system + , module Unit + ) where + +import Data.Solidity.Prim as Prim +import Network.Ethereum.Account as Account +import Network.Ethereum.Contract.Event (EventAction (..), event) +import Network.Ethereum.Unit as Unit diff --git a/src/Network/Ethereum/Account/Default.hs b/src/Network/Ethereum/Account/Default.hs index d68e13f1..f09510ce 100644 --- a/src/Network/Ethereum/Account/Default.hs +++ b/src/Network/Ethereum/Account/Default.hs @@ -17,6 +17,7 @@ module Network.Ethereum.Account.Default where +import Control.Exception (TypeError (..)) import Control.Monad.Catch (throwM) import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (MonadTrans (..)) @@ -34,7 +35,6 @@ import Network.Ethereum.Account.Internal (AccountT (..), import qualified Network.Ethereum.Api.Eth as Eth (accounts, call, estimateGas, sendTransaction) -import Network.Ethereum.Api.Provider (Web3Error (ParserFail)) import Network.Ethereum.Api.Types (Call (callData, callFrom, callGas)) import Network.Ethereum.Contract.Method (Method (..)) @@ -71,4 +71,4 @@ instance Account () DefaultAccount where Eth.call params _block case decode res of Right r -> return r - Left e -> lift $ throwM (ParserFail e) + Left e -> lift (throwM $ TypeError e) diff --git a/src/Network/Ethereum/Account/LocalKey.hs b/src/Network/Ethereum/Account/LocalKey.hs index f9fe2f46..a5109b61 100644 --- a/src/Network/Ethereum/Account/LocalKey.hs +++ b/src/Network/Ethereum/Account/LocalKey.hs @@ -19,6 +19,7 @@ module Network.Ethereum.Account.LocalKey where +import Control.Exception (TypeError (..)) import Control.Monad.Catch (throwM) import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) @@ -41,7 +42,6 @@ import Network.Ethereum.Account.Internal (AccountT (..), import qualified Network.Ethereum.Api.Eth as Eth (call, estimateGas, getTransactionCount, sendRawTransaction) -import Network.Ethereum.Api.Provider (Web3Error (ParserFail)) import Network.Ethereum.Api.Types (Call (..)) import Network.Ethereum.Chain (foundation) import Network.Ethereum.Contract.Method (selector) @@ -95,4 +95,4 @@ instance Account LocalKey LocalKeyAccount where res <- lift $ Eth.call params _block case decode res of Right r -> return r - Left e -> lift $ throwM (ParserFail e) + Left e -> lift (throwM $ TypeError e) diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs index 3f752a07..35d827ea 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/src/Network/Ethereum/Account/Personal.hs @@ -19,6 +19,7 @@ module Network.Ethereum.Account.Personal where +import Control.Exception (TypeError (..)) import Control.Monad.Catch (throwM) import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) @@ -37,7 +38,6 @@ import Network.Ethereum.Account.Internal (AccountT (..), import qualified Network.Ethereum.Api.Eth as Eth (call, estimateGas) import Network.Ethereum.Api.Personal (Passphrase) import qualified Network.Ethereum.Api.Personal as Personal (sendTransaction) -import Network.Ethereum.Api.Provider (Web3Error (ParserFail)) import Network.Ethereum.Api.Types (Call (callData, callFrom, callGas)) import Network.Ethereum.Contract.Method (selector) @@ -83,4 +83,4 @@ instance Account Personal PersonalAccount where res <- lift $ Eth.call params block case decode res of Right r -> return r - Left e -> lift $ throwM (ParserFail e) + Left e -> lift (throwM $ TypeError e) diff --git a/src/Network/Ethereum/Contract/Event/Common.hs b/src/Network/Ethereum/Contract/Event/Common.hs index f13cfc8c..2fe6638c 100644 --- a/src/Network/Ethereum/Contract/Event/Common.hs +++ b/src/Network/Ethereum/Contract/Event/Common.hs @@ -21,31 +21,30 @@ module Network.Ethereum.Contract.Event.Common where -import Control.Concurrent (threadDelay) -import Control.Exception (Exception, throwIO) -import Control.Monad.IO.Class (liftIO) -import Data.Either (lefts, rights) +import Control.Concurrent (threadDelay) +import Control.Exception (Exception, throwIO) +import Control.Monad.IO.Class (liftIO) +import Data.Either (lefts, rights) -import Data.Solidity.Event (DecodeEvent (..)) -import qualified Network.Ethereum.Api.Eth as Eth -import Network.Ethereum.Api.Provider (Web3) -import Network.Ethereum.Api.Types (Change (..), DefaultBlock (..), - Filter (..), Quantity) +import Data.Solidity.Event (DecodeEvent (..)) +import qualified Network.Ethereum.Api.Eth as Eth +import Network.Ethereum.Api.Types (Change (..), DefaultBlock (..), + Filter (..), Quantity) +import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Event callback control response data EventAction = ContinueEvent - -- ^ Continue to listen events - | TerminateEvent - -- ^ Terminate event listener - deriving (Show, Eq) + | TerminateEvent + deriving (Show, Eq) -data FilterChange a = - FilterChange { filterChangeRawChange :: Change - , filterChangeEvent :: a - } +data FilterChange a = FilterChange + { filterChangeRawChange :: Change + , filterChangeEvent :: a + } -data EventParseFailure = EventParseFailure String deriving (Show) +data EventParseFailure = EventParseFailure String + deriving (Show) instance Exception EventParseFailure @@ -59,24 +58,22 @@ mkFilterChanges changes = in if ls /= [] then throwIO (EventParseFailure $ show ls) else pure rs -data FilterStreamState e = - FilterStreamState { fssCurrentBlock :: Quantity - , fssInitialFilter :: Filter e - , fssWindowSize :: Integer - } +data FilterStreamState e = FilterStreamState + { fssCurrentBlock :: Quantity + , fssInitialFilter :: Filter e + , fssWindowSize :: Integer + } -- | Coerce a 'DefaultBlock' into a numerical block number. -mkBlockNumber :: DefaultBlock -> Web3 Quantity +mkBlockNumber :: JsonRpc m => DefaultBlock -> m Quantity mkBlockNumber bm = case bm of BlockWithNumber bn -> return bn Earliest -> return 0 _ -> Eth.blockNumber -pollTillBlockProgress - :: Quantity - -> Web3 Quantity +pollTillBlockProgress :: JsonRpc m => Quantity -> m Quantity pollTillBlockProgress currentBlock = do bn <- Eth.blockNumber if currentBlock >= bn diff --git a/src/Network/Ethereum/Contract/Event/MultiFilter.hs b/src/Network/Ethereum/Contract/Event/MultiFilter.hs index c03228af..0926eb6d 100644 --- a/src/Network/Ethereum/Contract/Event/MultiFilter.hs +++ b/src/Network/Ethereum/Contract/Event/MultiFilter.hs @@ -21,7 +21,7 @@ -- Stability : experimental -- Portability : unportable -- --- Support for parallel multiple event filters. +-- Parallel multiple event filters. -- module Network.Ethereum.Contract.Event.MultiFilter @@ -34,13 +34,11 @@ module Network.Ethereum.Contract.Event.MultiFilter -- * With geth filters , multiEvent - , multiEvent' - , multiEventMany' + , multiEventMany -- * Without geth filters , multiEventNoFilter - , multiEventNoFilter' - , multiEventManyNoFilter' + , multiEventManyNoFilter -- * Re-exports , Handlers @@ -49,7 +47,6 @@ module Network.Ethereum.Contract.Event.MultiFilter ) where import Control.Concurrent (threadDelay) -import Control.Concurrent.Async (Async) import Control.Monad (forM, void, when) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.Trans.Class (lift) @@ -83,10 +80,10 @@ import Data.Vinyl.TypeLevel (AllAllSat) import Data.Solidity.Event (DecodeEvent (..)) import qualified Network.Ethereum.Api.Eth as Eth -import Network.Ethereum.Api.Provider (Web3, forkWeb3) import Network.Ethereum.Api.Types (Change (..), DefaultBlock (..), Filter (..), Quantity) +import Network.JsonRpc.TinyClient (JsonRpc(..)) import Network.Ethereum.Contract.Event.Common -------------------------------------------------------------------------------- @@ -122,34 +119,19 @@ modifyMultiFilter h (f :? fs) = h f :? modifyMultiFilter h fs multiEvent :: ( PollFilters es , QueryAllLogs es - , MapHandlers Web3 es (WithChange es) -#if MIN_VERSION_vinyl(0,10,0) - , RPureConstrained HasLogIndex (WithChange es) -#else - , AllAllSat '[HasLogIndex] (WithChange es) -#endif - , RecApplicative (WithChange es) - ) - => MultiFilter es - -> Handlers es (ReaderT Change Web3 EventAction) - -> Web3 (Async ()) -multiEvent fltrs = forkWeb3 . multiEvent' fltrs - -multiEvent' - :: ( PollFilters es - , QueryAllLogs es - , MapHandlers Web3 es (WithChange es) + , MapHandlers m es (WithChange es) #if MIN_VERSION_vinyl(0,10,0) , RPureConstrained HasLogIndex (WithChange es) #else , AllAllSat '[HasLogIndex] (WithChange es) #endif , RecApplicative (WithChange es) + , JsonRpc m ) => MultiFilter es - -> Handlers es (ReaderT Change Web3 EventAction) - -> Web3 () -multiEvent' fltrs = multiEventMany' fltrs 0 + -> Handlers es (ReaderT Change m EventAction) + -> m () +multiEvent fltrs = multiEventMany fltrs 0 data MultiFilterStreamState es = MultiFilterStreamState { mfssCurrentBlock :: Quantity @@ -158,22 +140,23 @@ data MultiFilterStreamState es = } -multiEventMany' +multiEventMany :: ( PollFilters es , QueryAllLogs es - , MapHandlers Web3 es (WithChange es) + , MapHandlers m es (WithChange es) #if MIN_VERSION_vinyl(0,10,0) , RPureConstrained HasLogIndex (WithChange es) #else , AllAllSat '[HasLogIndex] (WithChange es) #endif , RecApplicative (WithChange es) + , JsonRpc m ) => MultiFilter es -> Integer - -> Handlers es (ReaderT Change Web3 EventAction) - -> Web3 () -multiEventMany' fltrs window handlers = do + -> Handlers es (ReaderT Change m EventAction) + -> m () +multiEventMany fltrs window handlers = do start <- mkBlockNumber $ minStartBlock fltrs let initState = MultiFilterStreamState { mfssCurrentBlock = start @@ -194,15 +177,18 @@ multiEventMany' fltrs window handlers = do let pollTo = minEndBlock fltrs' void $ reduceMultiEventStream (pollMultiFilter fIds pollTo) handlers -multiFilterStream - :: MultiFilterStreamState es - -> MachineT Web3 k (MultiFilter es) +multiFilterStream :: JsonRpc m + => MultiFilterStreamState es + -> MachineT m k (MultiFilter es) multiFilterStream initialPlan = do unfoldPlan initialPlan $ \s -> do end <- lift . mkBlockNumber . minEndBlock . mfssInitialMultiFilter $ initialPlan filterPlan end s where - filterPlan :: Quantity -> MultiFilterStreamState es -> PlanT k (MultiFilter es) Web3 (MultiFilterStreamState es) + filterPlan :: JsonRpc m + => Quantity + -> MultiFilterStreamState es + -> PlanT k (MultiFilter es) m (MultiFilterStreamState es) filterPlan end initialState@MultiFilterStreamState{..} = do if mfssCurrentBlock > end then stop @@ -228,7 +214,7 @@ type family WithChange (es :: [*]) = (es' :: [*]) | es' -> es where WithChange (e : es) = FilterChange e : WithChange es class QueryAllLogs (es :: [*]) where - queryAllLogs :: MultiFilter es -> Web3 [Field (WithChange es)] + queryAllLogs :: JsonRpc m => MultiFilter es -> m [Field (WithChange es)] instance QueryAllLogs '[] where queryAllLogs NilFilters = pure [] @@ -315,7 +301,7 @@ reduceMultiEventStream filterChanges handlers = fmap listToMaybe . runT $ -- | 'playLogs' streams the 'filterStream' and calls eth_getLogs on these 'Filter' objects. playMultiLogs - :: forall es k. + :: forall es k m. ( QueryAllLogs es #if MIN_VERSION_vinyl(0,10,0) , RPureConstrained HasLogIndex (WithChange es) @@ -323,26 +309,27 @@ playMultiLogs , AllAllSat '[HasLogIndex] (WithChange es) #endif , RecApplicative (WithChange es) + , JsonRpc m ) => MultiFilterStreamState es - -> MachineT Web3 k [Field (WithChange es)] + -> MachineT m k [Field (WithChange es)] playMultiLogs s = fmap sortChanges $ multiFilterStream s ~> autoM queryAllLogs data TaggedFilterIds (es :: [*]) where - TaggedFilterNil :: TaggedFilterIds '[] - TaggedFilterCons :: Tagged e Quantity -> TaggedFilterIds es -> TaggedFilterIds (e : es) + TaggedFilterNil :: TaggedFilterIds '[] + TaggedFilterCons :: Tagged e Quantity -> TaggedFilterIds es -> TaggedFilterIds (e : es) class PollFilters (es :: [*]) where - openMultiFilter :: MultiFilter es -> Web3 (TaggedFilterIds es) - checkMultiFilter :: TaggedFilterIds es -> Web3 [Field (WithChange es)] - closeMultiFilter :: TaggedFilterIds es -> Web3 () + openMultiFilter :: JsonRpc m => MultiFilter es -> m (TaggedFilterIds es) + checkMultiFilter :: JsonRpc m => TaggedFilterIds es -> m [Field (WithChange es)] + closeMultiFilter :: JsonRpc m => TaggedFilterIds es -> m () instance PollFilters '[] where - openMultiFilter _ = pure TaggedFilterNil - checkMultiFilter _ = pure [] - closeMultiFilter _ = pure () + openMultiFilter _ = pure TaggedFilterNil + checkMultiFilter _ = pure [] + closeMultiFilter _ = pure () instance forall e i ni es. ( DecodeEvent i ni e @@ -375,13 +362,13 @@ pollMultiFilter #else , AllAllSat '[HasLogIndex] (WithChange es) #endif + , JsonRpc m ) => TaggedFilterIds es -> DefaultBlock - -> MachineT Web3 k [Field (WithChange es)] + -> MachineT m k [Field (WithChange es)] pollMultiFilter is = construct . pollPlan is where - -- pollPlan :: TaggedFilterIds es -> DefaultBlock -> PlanT k [Field (Map (TyCon1 FilterChange) es)] Web3 () pollPlan (fIds :: TaggedFilterIds es) end = do bn <- lift $ Eth.blockNumber if BlockWithNumber bn > end @@ -396,53 +383,39 @@ pollMultiFilter is = construct . pollPlan is -------------------------------------------------------------------------------- - multiEventNoFilter :: ( QueryAllLogs es - , MapHandlers Web3 es (WithChange es) -#if MIN_VERSION_vinyl(0,10,0) - , RPureConstrained HasLogIndex (WithChange es) -#else - , AllAllSat '[HasLogIndex] (WithChange es) -#endif - , RecApplicative (WithChange es) - ) - => MultiFilter es - -> Handlers es (ReaderT Change Web3 EventAction) - -> Web3 (Async ()) -multiEventNoFilter fltrs = forkWeb3 . multiEventNoFilter' fltrs - -multiEventNoFilter' - :: ( QueryAllLogs es - , MapHandlers Web3 es (WithChange es) + , MapHandlers m es (WithChange es) #if MIN_VERSION_vinyl(0,10,0) , RPureConstrained HasLogIndex (WithChange es) #else , AllAllSat '[HasLogIndex] (WithChange es) #endif , RecApplicative (WithChange es) + , JsonRpc m ) => MultiFilter es - -> Handlers es (ReaderT Change Web3 EventAction) - -> Web3 () -multiEventNoFilter' fltrs = multiEventManyNoFilter' fltrs 0 + -> Handlers es (ReaderT Change m EventAction) + -> m () +multiEventNoFilter fltrs = multiEventManyNoFilter fltrs 0 -multiEventManyNoFilter' +multiEventManyNoFilter :: ( QueryAllLogs es - , MapHandlers Web3 es (WithChange es) + , MapHandlers m es (WithChange es) #if MIN_VERSION_vinyl(0,10,0) , RPureConstrained HasLogIndex (WithChange es) #else , AllAllSat '[HasLogIndex] (WithChange es) #endif , RecApplicative (WithChange es) + , JsonRpc m ) => MultiFilter es -> Integer - -> Handlers es (ReaderT Change Web3 EventAction) - -> Web3 () -multiEventManyNoFilter' fltrs window handlers = do + -> Handlers es (ReaderT Change m EventAction) + -> m () +multiEventManyNoFilter fltrs window handlers = do start <- mkBlockNumber $ minStartBlock fltrs let initState = MultiFilterStreamState { mfssCurrentBlock = start @@ -467,15 +440,18 @@ multiEventManyNoFilter' fltrs window handlers = do } in void $ reduceMultiEventStream (playNewMultiLogs pollingFilterState) handlers -newMultiFilterStream - :: MultiFilterStreamState es - -> MachineT Web3 k (MultiFilter es) +newMultiFilterStream :: JsonRpc m + => MultiFilterStreamState es + -> MachineT m k (MultiFilter es) newMultiFilterStream initialPlan = do unfoldPlan initialPlan $ \s -> do let end = minEndBlock . mfssInitialMultiFilter $ initialPlan filterPlan end s where - filterPlan :: DefaultBlock -> MultiFilterStreamState es -> PlanT k (MultiFilter es) Web3 (MultiFilterStreamState es) + filterPlan :: JsonRpc m + => DefaultBlock + -> MultiFilterStreamState es + -> PlanT k (MultiFilter es) m (MultiFilterStreamState es) filterPlan end initialState@MultiFilterStreamState{..} = do if BlockWithNumber mfssCurrentBlock > end then stop @@ -489,7 +465,7 @@ newMultiFilterStream initialPlan = do filterPlan end initialState { mfssCurrentBlock = newestBlockNumber + 1 } playNewMultiLogs - :: forall es k. + :: forall es k m. ( QueryAllLogs es #if MIN_VERSION_vinyl(0,10,0) , RPureConstrained HasLogIndex (WithChange es) @@ -497,9 +473,10 @@ playNewMultiLogs , AllAllSat '[HasLogIndex] (WithChange es) #endif , RecApplicative (WithChange es) + , JsonRpc m ) => MultiFilterStreamState es - -> MachineT Web3 k [Field (WithChange es)] + -> MachineT m k [Field (WithChange es)] playNewMultiLogs s = fmap sortChanges $ newMultiFilterStream s ~> autoM queryAllLogs diff --git a/src/Network/Ethereum/Contract/Event/SingleFilter.hs b/src/Network/Ethereum/Contract/Event/SingleFilter.hs index 311b53cb..e8c7df34 100644 --- a/src/Network/Ethereum/Contract/Event/SingleFilter.hs +++ b/src/Network/Ethereum/Contract/Event/SingleFilter.hs @@ -19,21 +19,18 @@ -- Stability : experimental -- Portability : unportable -- --- Simple contract event filter support. +-- Contract event filters. -- module Network.Ethereum.Contract.Event.SingleFilter ( event - , event' - , eventMany' + , eventMany , eventNoFilter - , eventNoFilter' - , eventManyNoFilter' + , eventManyNoFilter ) where import Control.Concurrent (threadDelay) -import Control.Concurrent.Async (Async) import Control.Monad (forM, void, when) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.Trans.Class (lift) @@ -48,38 +45,31 @@ import Data.Maybe (catMaybes, listToMaybe) import Data.Solidity.Event (DecodeEvent (..)) import qualified Network.Ethereum.Api.Eth as Eth -import Network.Ethereum.Api.Provider (Web3, forkWeb3) import Network.Ethereum.Api.Types (Change (..), DefaultBlock (..), Filter (..), Quantity) import Network.Ethereum.Contract.Event.Common +import Network.JsonRpc.TinyClient (JsonRpc (..)) --- | Run 'event\'' one block at a time. -event :: DecodeEvent i ni e - => Filter e - -> (e -> ReaderT Change Web3 EventAction) - -> Web3 (Async ()) -event fltr = forkWeb3 . event' fltr - --- | Same as 'event', but does not immediately spawn a new thread. -event' :: DecodeEvent i ni e +-- | Run one block at a time. +event :: (DecodeEvent i ni e, JsonRpc m) => Filter e - -> (e -> ReaderT Change Web3 EventAction) - -> Web3 () -event' fltr = eventMany' fltr 0 + -> (e -> ReaderT Change m EventAction) + -> m () +event fltr = eventMany fltr 0 --- | 'eventMany\'' take s a filter, a window size, and a handler. +-- | 'eventMany' take s a filter, a window size, and a handler. -- -- It runs the handler over the results of 'eventLogs' results using -- 'reduceEventStream'. If no 'TerminateEvent' action is thrown and -- the toBlock is not yet reached, it then transitions to polling. -- -eventMany' :: DecodeEvent i ni e +eventMany :: (DecodeEvent i ni e, JsonRpc m) => Filter e -> Integer - -> (e -> ReaderT Change Web3 EventAction) - -> Web3 () -eventMany' fltr window handler = do + -> (e -> ReaderT Change m EventAction) + -> m () +eventMany fltr window handler = do start <- mkBlockNumber $ filterFromBlock fltr let initState = FilterStreamState { fssCurrentBlock = start , fssInitialFilter = fltr @@ -127,22 +117,21 @@ reduceEventStream filterChanges handler = fmap listToMaybe . runT $ return ((,) act <$> changeBlockNumber filterChangeRawChange) -- | 'playLogs' streams the 'filterStream' and calls eth_getLogs on these 'Filter' objects. -playOldLogs - :: DecodeEvent i ni e - => FilterStreamState e - -> MachineT Web3 k [FilterChange e] +playOldLogs :: (DecodeEvent i ni e, JsonRpc m) + => FilterStreamState e + -> MachineT m k [FilterChange e] playOldLogs s = filterStream s ~> autoM Eth.getLogs ~> autoM (liftIO . mkFilterChanges) -- | Polls a filter from the given filterId until the target toBlock is reached. -pollFilter :: forall i ni e k . DecodeEvent i ni e +pollFilter :: forall i ni e k m . (DecodeEvent i ni e, JsonRpc m) => Quantity -> DefaultBlock - -> MachineT Web3 k [FilterChange e] + -> MachineT m k [FilterChange e] pollFilter i = construct . pollPlan i where - pollPlan :: Quantity -> DefaultBlock -> PlanT k [FilterChange e] Web3 () + pollPlan :: Quantity -> DefaultBlock -> PlanT k [FilterChange e] m () pollPlan fid end = do bn <- lift $ Eth.blockNumber if BlockWithNumber bn > end @@ -162,11 +151,12 @@ pollFilter i = construct . pollPlan i -- which cover this filter in intervals of size `windowSize`. The machine -- halts whenever the `fromBlock` of a spanning filter either (1) excedes then -- initial filter's `toBlock` or (2) is greater than the chain head's block number. -filterStream :: FilterStreamState e - -> MachineT Web3 k (Filter e) +filterStream :: JsonRpc m + => FilterStreamState e + -> MachineT m k (Filter e) filterStream initialPlan = unfoldPlan initialPlan filterPlan where - filterPlan :: FilterStreamState e -> PlanT k (Filter e) Web3 (FilterStreamState e) + filterPlan :: JsonRpc m => FilterStreamState e -> PlanT k (Filter e) m (FilterStreamState e) filterPlan initialState@FilterStreamState{..} = do end <- lift . mkBlockNumber $ filterToBlock fssInitialFilter if fssCurrentBlock > end @@ -181,29 +171,18 @@ filterStream initialPlan = unfoldPlan initialPlan filterPlan -------------------------------------------------------------------------------- --- | Run 'event\'' one block at a time. -eventNoFilter - :: DecodeEvent i ni e - => Filter e - -> (e -> ReaderT Change Web3 EventAction) - -> Web3 (Async ()) -eventNoFilter fltr = forkWeb3 . event' fltr - --- | Same as 'event', but does not immediately spawn a new thread. -eventNoFilter' - :: DecodeEvent i ni e - => Filter e - -> (e -> ReaderT Change Web3 EventAction) - -> Web3 () -eventNoFilter' fltr = eventManyNoFilter' fltr 0 - -eventManyNoFilter' - :: DecodeEvent i ni e - => Filter e - -> Integer - -> (e -> ReaderT Change Web3 EventAction) - -> Web3 () -eventManyNoFilter' fltr window handler = do +eventNoFilter :: (DecodeEvent i ni e, JsonRpc m) + => Filter e + -> (e -> ReaderT Change m EventAction) + -> m () +eventNoFilter fltr = eventManyNoFilter fltr 0 + +eventManyNoFilter :: (DecodeEvent i ni e, JsonRpc m) + => Filter e + -> Integer + -> (e -> ReaderT Change m EventAction) + -> m () +eventManyNoFilter fltr window handler = do start <- mkBlockNumber $ filterFromBlock fltr let initState = FilterStreamState { fssCurrentBlock = start , fssInitialFilter = fltr @@ -228,21 +207,20 @@ eventManyNoFilter' fltr window handler = do in void $ reduceEventStream (playNewLogs pollingFilterState) handler -- | 'playLogs' streams the 'filterStream' and calls eth_getLogs on these 'Filter' objects. -playNewLogs - :: DecodeEvent i ni e - => FilterStreamState e - -> MachineT Web3 k [FilterChange e] +playNewLogs :: (DecodeEvent i ni e, JsonRpc m) + => FilterStreamState e + -> MachineT m k [FilterChange e] playNewLogs s = newFilterStream s ~> autoM Eth.getLogs ~> autoM (liftIO . mkFilterChanges) -newFilterStream - :: FilterStreamState e - -> MachineT Web3 k (Filter e) +newFilterStream :: JsonRpc m + => FilterStreamState e + -> MachineT m k (Filter e) newFilterStream initialState = unfoldPlan initialState filterPlan where - filterPlan :: FilterStreamState e -> PlanT k (Filter e) Web3 (FilterStreamState e) + filterPlan :: JsonRpc m => FilterStreamState e -> PlanT k (Filter e) m (FilterStreamState e) filterPlan s@FilterStreamState{..} = do if BlockWithNumber fssCurrentBlock > filterToBlock fssInitialFilter then stop diff --git a/src/Network/Ethereum/Web3.hs b/src/Network/Ethereum/Web3.hs deleted file mode 100644 index bbe257a1..00000000 --- a/src/Network/Ethereum/Web3.hs +++ /dev/null @@ -1,44 +0,0 @@ --- | --- Module : Network.Ethereum.Web3 --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- --- An Ethereum node offers a RPC interface. This interface gives Ðapp’s --- access to the Ethereum blockchain and functionality that the node provides, --- such as compiling smart contract code. It uses a subset of the JSON-RPC 2.0 --- specification (no support for notifications or named parameters) as serialisation --- protocol and is available over HTTP and IPC (unix domain sockets on linux/OSX --- and named pipe’s on Windows). --- --- Web3 Haskell library currently use JSON-RPC over HTTP to access node functionality. --- - -module Network.Ethereum.Web3 - ( - -- * Base monad for any Ethereum node communication - Web3 - , runWeb3 - - -- * Basic transaction sending - , module Account - - -- * Basic event listening - , EventAction(..) - , event - - -- * Primitive data types - , module Prim - - -- * Metric unit system - , module Unit - ) where - -import Data.Solidity.Prim as Prim -import Network.Ethereum.Account as Account -import Network.Ethereum.Api.Provider (Web3, runWeb3) -import Network.Ethereum.Contract.Event (EventAction (..), event) -import Network.Ethereum.Unit as Unit diff --git a/src/Network/Ipfs.hs b/src/Network/Ipfs.hs new file mode 100644 index 00000000..231a24d6 --- /dev/null +++ b/src/Network/Ipfs.hs @@ -0,0 +1,15 @@ +-- | +-- Module : Network.Ipfs +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- TODO +-- + +module Network.Ipfs + ( + ) where diff --git a/src/Network/Ipfs/Api/Api.hs b/src/Network/Ipfs/Api/Internal.hs similarity index 100% rename from src/Network/Ipfs/Api/Api.hs rename to src/Network/Ipfs/Api/Internal.hs diff --git a/src/Network/Ipfs/Types/Multihash.hs b/src/Network/Ipfs/Types/Multihash.hs deleted file mode 100644 index facdbcf3..00000000 --- a/src/Network/Ipfs/Types/Multihash.hs +++ /dev/null @@ -1,78 +0,0 @@ - --- | --- Module : Network.Ipfs.Types.Multihash --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Multihash Type Module --- - -module Network.Ipfs.Types.Multihash where - -import Control.Applicative ((<$>)) -import Data.Attoparsec.ByteString (Parser, parseOnly) -import qualified Data.Attoparsec.ByteString as A -import qualified Data.ByteString as BS -import Data.ByteString.Builder (Builder, byteString, toLazyByteString) -import qualified Data.ByteString.Builder as BB -import qualified Data.ByteString.Lazy as BL -import Data.Monoid ((<>)) - -data MultihashDigest = MultihashDigest - { algorithm :: !HashAlgorithm - , length :: !Length - , digest :: !Digest - } deriving (Show, Eq) - -type Length = Int - -type Digest = BS.ByteString - -data HashAlgorithm - = SHA1 - | SHA256 - | SHA512 - | SHA3 - | BLAKE2B - | BLAKE2S - deriving (Show, Read, Eq, Enum, Bounded) - -fromCode :: Int -> HashAlgorithm -fromCode 0x11 = SHA1 -fromCode 0x12 = SHA256 -fromCode 0x13 = SHA512 -fromCode 0x14 = SHA3 -fromCode 0x40 = BLAKE2B -fromCode 0x41 = BLAKE2S -fromCode _ = error "Unknown hash function code" - -toCode :: HashAlgorithm -> Int -toCode SHA1 = 0x11 -toCode SHA256 = 0x12 -toCode SHA512 = 0x13 -toCode SHA3 = 0x14 -toCode BLAKE2B = 0x40 -toCode BLAKE2S = 0x41 - -encode :: HashAlgorithm -> Digest -> BL.ByteString -encode h d = toLazyByteString $ encoder h d - -encoder :: HashAlgorithm -> Digest -> Builder -encoder h d = - (BB.word8 . fromIntegral $ toCode h) <> - (BB.word8 . fromIntegral $ BS.length d) <> - byteString d - -decode :: BS.ByteString -> Either String MultihashDigest -decode = parseOnly decoder - -decoder :: Parser MultihashDigest -decoder = do - h <- (fromCode . fromIntegral <$> A.anyWord8) - l <- (fromIntegral <$> A.anyWord8) - d <- A.take l - return $ MultihashDigest h l d \ No newline at end of file diff --git a/src/Network/JsonRpc/TinyClient.hs b/src/Network/JsonRpc/TinyClient.hs index cd621705..88fe2882 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/src/Network/JsonRpc/TinyClient.hs @@ -61,56 +61,60 @@ module Network.JsonRpc.TinyClient , RpcError(..) ) where -import Control.Applicative ((<|>)) -import Control.Exception (Exception) -import Control.Monad ((<=<)) -import Control.Monad.Catch (MonadThrow (..)) -import Control.Monad.IO.Class (MonadIO (..)) -import Control.Monad.State (MonadState,get) -import Crypto.Number.Generate (generateMax) -import Data.Aeson (FromJSON (..), ToJSON (..), - Value (String), eitherDecode, encode, - object, withObject, (.:), (.:?), (.=)) -import Data.ByteString.Lazy (ByteString) -import Data.Text (Text, unpack) -import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), - httpLbs, method, newManager, - parseRequest, requestBody, - requestHeaders, responseBody) -import Network.HTTP.Client.TLS (tlsManagerSettings) -import qualified Network.WebSockets as WS (Connection, sendTextData, receiveData) +import Control.Applicative ((<|>)) +import Control.Exception (Exception) +import Control.Monad ((<=<)) +import Control.Monad.Catch (MonadThrow (..)) +import Control.Monad.IO.Class (MonadIO (..)) +import Control.Monad.State (MonadState, get) +import Crypto.Number.Generate (generateMax) +import Data.Aeson (FromJSON (..), ToJSON (..), + Value (String), eitherDecode, encode, + object, withObject, (.:), (.:?), (.=)) +import Data.ByteString.Lazy (ByteString) +import Data.Text (Text, unpack) +import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), + httpLbs, method, newManager, + parseRequest, requestBody, + requestHeaders, responseBody) +import Network.HTTP.Client.TLS (tlsManagerSettings) +import qualified Network.WebSockets as WS (Connection, receiveData, + sendTextData) -- | JSON-RPC monad constrait. type JsonRpcM m = (MonadIO m, MonadThrow m, MonadState JsonRpcClient m) -- | JSON-RPC client state vars. -data JsonRpcClient = JsonRpcHTTPClient - { jsonRpcManager :: Manager -- ^ HTTP connection manager. - , jsonRpcServer :: String -- ^ Remote server URI. - } | JsonRpcWSClient - { jsonRpcWSConn :: WS.Connection -- ^ WS connection. - , jsonRpcWSHost :: String -- ^ Remote Host. - , jsonRpcWSPort :: Int -- ^ Port - } +data JsonRpcClient = JsonRpcHttpClient + { jsonRpcManager :: Manager + -- ^ HTTP connection manager. + , jsonRpcServer :: String + -- ^ Remote server URI. + } + | JsonRpcWsClient + { jsonRpcWsConnection :: WS.Connection + -- ^ WebSocket connection. + } -- | Create default 'JsonRpcClient' settings. defaultSettings :: MonadIO m => String -- ^ JSON-RPC server URI -> m JsonRpcClient -defaultSettings srv = liftIO $ JsonRpcHTTPClient +defaultSettings srv = liftIO $ JsonRpcHttpClient <$> newManager tlsManagerSettings <*> pure srv instance Show JsonRpcClient where - show JsonRpcHTTPClient{..} = "JsonRpcHTTPClient<" ++ jsonRpcServer ++ ">" - show JsonRpcWSClient{..} = "JsonRpcWSClient<" ++ jsonRpcWSHost ++ ":" ++ (show jsonRpcWSPort ) ++ ">" + show JsonRpcHttpClient{..} = "" + show JsonRpcWsClient{..} = "" -- | JSON-RPC request. data Request = Request { rqMethod :: !Text , rqId :: !Int , rqParams :: !Value - } deriving (Eq, Show) + } + deriving (Eq, Show) instance ToJSON Request where toJSON rq = object [ "jsonrpc" .= String "2.0" @@ -122,7 +126,8 @@ instance ToJSON Request where -- | JSON-RPC response. data Response = Response { rsResult :: !(Either RpcError Value) - } deriving (Eq, Show) + } + deriving (Eq, Show) instance FromJSON Response where parseJSON = @@ -135,7 +140,8 @@ data RpcError = RpcError { errCode :: !Int , errMessage :: !Text , errData :: !(Maybe Value) - } deriving Eq + } + deriving Eq instance Show RpcError where show (RpcError code msg dat) = @@ -148,8 +154,7 @@ instance FromJSON RpcError where <*> v .: "message" <*> v .:? "data" -data JsonRpcException - = ParsingException String +data JsonRpcException = ParsingException String | CallException RpcError deriving (Show, Eq) @@ -185,22 +190,20 @@ call m r = do maxInt = toInteger (maxBound :: Int) connection body = do jsonRpcInstance <- get - case jsonRpcInstance of - JsonRpcHTTPClient{..} -> do - request <- parseRequest jsonRpcServer - let request' = request - { requestBody = RequestBodyLBS body - , requestHeaders = [("Content-Type", "application/json")] - , method = "POST" - } - responseBody <$> liftIO (httpLbs request' jsonRpcManager) - - JsonRpcWSClient{..} -> do - liftIO $ app jsonRpcWSConn - where - app conn = do WS.sendTextData conn body - WS.receiveData conn - + case jsonRpcInstance of + JsonRpcHttpClient{..} -> do + request <- parseRequest jsonRpcServer + let request' = request { + requestBody = RequestBodyLBS body + , requestHeaders = [("Content-Type", "application/json")] + , method = "POST" + } + responseBody <$> liftIO (httpLbs request' jsonRpcManager) + + JsonRpcWsClient{..} -> liftIO $ do + WS.sendTextData jsonRpcWsConnection body + WS.receiveData jsonRpcWsConnection + decodeResponse :: (MonadThrow m, FromJSON a) diff --git a/src/Network/Polkadot.hs b/src/Network/Polkadot.hs new file mode 100644 index 00000000..6a6dc928 --- /dev/null +++ b/src/Network/Polkadot.hs @@ -0,0 +1,15 @@ +-- | +-- Module : Network.Polkadot +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- TODO +-- + +module Network.Polkadot + ( + ) where diff --git a/src/Network/Web3.hs b/src/Network/Web3.hs new file mode 100644 index 00000000..c66f3c92 --- /dev/null +++ b/src/Network/Web3.hs @@ -0,0 +1,33 @@ +-- | +-- Module : Network.Web3 +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Haskell library for next generation of Web. +-- + +module Network.Web3 + ( + -- * Web3 library uses JSON-RPC over HTTP(S) to access node functionality. + Web3 + , runWeb3 + -- ^ Single entry point for any Web3 family network. + + -- * Ethereum Network + , module Network.Ethereum + + -- * Polkadot Network + , module Network.Polkadot + + -- * IPFS Network + , module Network.Ipfs + ) where + +import qualified Network.Ethereum +import qualified Network.Ipfs +import qualified Network.Polkadot +import Network.Web3.Provider (Web3, runWeb3) diff --git a/src/Network/Ethereum/Api/Provider.hs b/src/Network/Web3/Provider.hs similarity index 65% rename from src/Network/Ethereum/Api/Provider.hs rename to src/Network/Web3/Provider.hs index 4c52967b..fd75c527 100644 --- a/src/Network/Ethereum/Api/Provider.hs +++ b/src/Network/Web3/Provider.hs @@ -6,8 +6,8 @@ {-# LANGUAGE RecordWildCards #-} -- | --- Module : Network.Ethereum.Api.Provider --- Copyright : Alexander Krupenkin 2016-2018 +-- Module : Network.Web3.Provider +-- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -17,49 +17,47 @@ -- Web3 service provider. -- -module Network.Ethereum.Api.Provider where +module Network.Web3.Provider where import Control.Concurrent.Async (Async, async) -import Data.Text (Text) import Control.Exception (Exception, try) import Control.Monad.Catch (MonadThrow) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.State (MonadState (..)) import Control.Monad.Trans.State (StateT, evalStateT, withStateT) import Data.Default (Default (..)) +import Data.Text (Text) import GHC.Generics (Generic) import Network.HTTP.Client (Manager) import qualified Network.Socket as S +import qualified Network.WebSockets as WS (Connection, + defaultConnectionOptions, + newClientConnection, + sendClose) import qualified Network.WebSockets.Stream as Stream -import qualified Network.WebSockets as WS ( Connection, sendClose, - newClientConnection, - defaultConnectionOptions) -import Network.JsonRpc.TinyClient (JsonRpc, JsonRpcClient(..), +import Network.JsonRpc.TinyClient (JsonRpc, JsonRpcClient (..), defaultSettings, jsonRpcManager) --- | Any communication with Ethereum node wrapped with 'Web3' monad +-- | Any communication with node wrapped with 'Web3' monad newtype Web3 a = Web3 { unWeb3 :: StateT JsonRpcClient IO a } deriving (Functor, Applicative, Monad, MonadIO, MonadThrow, MonadState JsonRpcClient) instance JsonRpc Web3 -- | Some peace of error response -data Web3Error - = JsonRpcFail !String - -- ^ JSON-RPC communication error - | ParserFail !String - -- ^ Error in parser state - | UserFail !String - -- ^ Common head for user errors - deriving (Show, Eq, Generic) +data Web3Error = JsonRpcFail !String + | ParserFail !String + | UserFail !String + deriving (Show, Eq, Generic) instance Exception Web3Error --TODO: Change to `HttpProvider ServerUri | IpcProvider FilePath` to support IPC -- | Web3 Provider -data Provider = HttpProvider String | WSProvider String Int - deriving (Show, Eq, Generic) +data Provider = HttpProvider String + | WsProvider String Int + deriving (Show, Eq, Generic) instance Default Provider where def = HttpProvider "http://localhost:8545" -- ^ Default Provider URI @@ -70,14 +68,14 @@ runWeb3With :: MonadIO m -> Provider -> Web3 a -> m (Either Web3Error a) -runWeb3With manager provider f = do - runWeb3' provider Web3{ unWeb3 = withStateT changeManager $ unWeb3 f} +runWeb3With manager provider f = do + runWeb3' provider Web3 { unWeb3 = withStateT changeManager $ unWeb3 f} where - changeManager jRpcClient = case jRpcClient of - JsonRpcHTTPClient{..} -> jRpcClient {jsonRpcManager = manager} - JsonRpcWSClient{..} -> jRpcClient + changeManager jRpcClient = case jRpcClient of + JsonRpcHttpClient{..} -> jRpcClient { jsonRpcManager = manager } + JsonRpcWsClient{..} -> jRpcClient --- | 'Web3' monad runner +-- | 'Web3' monad runner runWeb3' :: MonadIO m => Provider -> Web3 a @@ -86,15 +84,12 @@ runWeb3' (HttpProvider uri) f = do cfg <- defaultSettings uri liftIO . try . flip evalStateT cfg . unWeb3 $ f -runWeb3' (WSProvider host port) f = do - currentConnection <- liftIO $ getConnection host port "/" - let currentClient = JsonRpcWSClient { - jsonRpcWSConn = currentConnection - , jsonRpcWSHost = host - , jsonRpcWSPort = port} +runWeb3' (WsProvider host port) f = do + connection <- liftIO $ getConnection host port "/" + let currentClient = JsonRpcWsClient { jsonRpcWsConnection = connection } response <- liftIO $ try . flip evalStateT currentClient . unWeb3 $ f - liftIO $ WS.sendClose currentConnection ("Bye-" :: Text) - return response + liftIO $ WS.sendClose connection ("Bye-" :: Text) + return response -- | 'Web3' runner for default Http provider runWeb3 :: MonadIO m @@ -103,19 +98,12 @@ runWeb3 :: MonadIO m {-# INLINE runWeb3 #-} runWeb3 = runWeb3' def --- | 'Web3' runner for default WS provider -runWeb3WS :: MonadIO m - => Web3 a - -> m (Either Web3Error a) -{-# INLINE runWeb3WS #-} -runWeb3WS = runWeb3' $ WSProvider "127.0.0.1" 8546 - -- | Fork 'Web3' with the same 'Provider' and 'Manager' forkWeb3 :: Web3 a -> Web3 (Async a) forkWeb3 f = liftIO . async . evalStateT (unWeb3 f) =<< get -- | Returns a WebSocket Connection Instance -getConnection :: String -- ^ Host +getConnection :: String -- ^ Host -> Int -- ^ Port -> String -- ^ Path -> IO WS.Connection @@ -124,7 +112,7 @@ getConnection host port path = do -- Create and connect socket let hints = S.defaultHints {S.addrSocketType = S.Stream} - + -- Correct host and path. fullHost = if port == 80 then host else (host ++ ":" ++ show port) path0 = if null path then "/" else path @@ -134,10 +122,10 @@ getConnection host port path = do S.setSocketOption sock S.NoDelay 1 -- Connect WebSocket and run client - + res <- ( S.connect sock (S.addrAddress addr) >> Stream.makeSocketStream sock) >>= (\stream -> - WS.newClientConnection stream fullHost - path0 WS.defaultConnectionOptions [] ) - return res \ No newline at end of file + WS.newClientConnection stream fullHost + path0 WS.defaultConnectionOptions [] ) + return res From 0ceaaf3ef33ba52080d164a68caa97881fa31bb2 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 16 May 2020 15:45:40 +0300 Subject: [PATCH 128/237] Added Polkadot JSON-RPC API calls --- src/Network/Polkadot/Api/Account.hs | 28 ++++ src/Network/Polkadot/Api/Author.hs | 78 +++++++++++ src/Network/Polkadot/Api/Babe.hs | 26 ++++ src/Network/Polkadot/Api/Chain.hs | 51 +++++++ src/Network/Polkadot/Api/Childstate.hs | 69 ++++++++++ src/Network/Polkadot/Api/Contracts.hs | 53 +++++++ src/Network/Polkadot/Api/Engine.hs | 43 ++++++ src/Network/Polkadot/Api/Grandpa.hs | 26 ++++ src/Network/Polkadot/Api/Offchain.hs | 44 ++++++ src/Network/Polkadot/Api/Payment.hs | 32 +++++ src/Network/Polkadot/Api/Rpc.hs | 25 ++++ src/Network/Polkadot/Api/State.hs | 184 +++++++++++++++++++++++++ src/Network/Polkadot/Api/System.hs | 97 +++++++++++++ src/Network/Polkadot/Api/Types.hs | 100 ++++++++++++++ 14 files changed, 856 insertions(+) create mode 100644 src/Network/Polkadot/Api/Account.hs create mode 100644 src/Network/Polkadot/Api/Author.hs create mode 100644 src/Network/Polkadot/Api/Babe.hs create mode 100644 src/Network/Polkadot/Api/Chain.hs create mode 100644 src/Network/Polkadot/Api/Childstate.hs create mode 100644 src/Network/Polkadot/Api/Contracts.hs create mode 100644 src/Network/Polkadot/Api/Engine.hs create mode 100644 src/Network/Polkadot/Api/Grandpa.hs create mode 100644 src/Network/Polkadot/Api/Offchain.hs create mode 100644 src/Network/Polkadot/Api/Payment.hs create mode 100644 src/Network/Polkadot/Api/Rpc.hs create mode 100644 src/Network/Polkadot/Api/State.hs create mode 100644 src/Network/Polkadot/Api/System.hs create mode 100644 src/Network/Polkadot/Api/Types.hs diff --git a/src/Network/Polkadot/Api/Account.hs b/src/Network/Polkadot/Api/Account.hs new file mode 100644 index 00000000..a1e1ca90 --- /dev/null +++ b/src/Network/Polkadot/Api/Account.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Account +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `account` prefix. +-- + +module Network.Polkadot.Api.Account where + +import Data.Text (Text) + +import Network.JsonRpc.TinyClient (JsonRpc (..)) + +-- | Retrieves the next accountIndex as available on the node. +nextIndex :: JsonRpc m + => Text + -- ^ AccountId + -> m Int +{-# INLINE nextIndex #-} +nextIndex = remote "account_nextIndex" diff --git a/src/Network/Polkadot/Api/Author.hs b/src/Network/Polkadot/Api/Author.hs new file mode 100644 index 00000000..65b1e1ce --- /dev/null +++ b/src/Network/Polkadot/Api/Author.hs @@ -0,0 +1,78 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Author +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `author` prefix. +-- + +module Network.Polkadot.Api.Author where + +import Data.Text (Text) + +import Data.ByteArray.HexString (HexString) +import Network.JsonRpc.TinyClient (JsonRpc (..)) + +-- | Returns true if the keystore has private keys for the given public key and key type. +hasKey :: JsonRpc m + => HexString + -- ^ Public key + -> Text + -- ^ Key type + -> m Bool +{-# INLINE hasKey #-} +hasKey = remote "author_hasKey" + +-- | Returns true if the keystore has private keys for the given session public keys. +hasSessionKeys :: JsonRpc m + => HexString + -- ^ Session keys + -> m Bool +{-# INLINE hasSessionKeys #-} +hasSessionKeys = remote "author_hasSessionKeys" + +-- | Insert a key into the keystore. +insertKey :: JsonRpc m + => Text + -- ^ Key type + -> Text + -- ^ Key secret URI + -> HexString + -- ^ Public key + -> m HexString +{-# INLINE insertKey #-} +insertKey = remote "author_insertKey" + +-- | Returns all pending extrinsics, potentially grouped by sender. +pendingExtrinsics :: JsonRpc m => m [HexString] +{-# INLINE pendingExtrinsics #-} +pendingExtrinsics = remote "author_pendingExtrinsics" + +-- | Remove given extrinsic from the pool and temporarily ban it to prevent reimporting. +removeExtrinsic :: JsonRpc m + => [HexString] + -- ^ Extrinsic or hash + -> m HexString +{-# INLINE removeExtrinsic #-} +removeExtrinsic = remote "author_removeExtrinsic" + +-- | Generate new session keys and returns the corresponding public keys. +rotateKeys :: JsonRpc m => m HexString +{-# INLINE rotateKeys #-} +rotateKeys = remote "author_rotateKeys" + +-- | Submit a fully formatted extrinsic for block inclusion. +submitExtrinsic :: JsonRpc m + => HexString + -- ^ Extrinsic + -> m HexString + -- ^ Hash +{-# INLINE submitExtrinsic #-} +submitExtrinsic = remote "author_submitExtrinsic" diff --git a/src/Network/Polkadot/Api/Babe.hs b/src/Network/Polkadot/Api/Babe.hs new file mode 100644 index 00000000..70e084de --- /dev/null +++ b/src/Network/Polkadot/Api/Babe.hs @@ -0,0 +1,26 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Babe +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `babe` prefix. +-- + +module Network.Polkadot.Api.Babe where + +import Data.Aeson (Object) + +import Network.JsonRpc.TinyClient (JsonRpc (..)) + +-- | Returns data about which slots (primary or secondary) can be claimed +-- in the current epoch with the keys in the keystore. +epochAuthorship :: JsonRpc m => m Object +{-# INLINE epochAuthorship #-} +epochAuthorship = remote "babe_epochAuthorship" diff --git a/src/Network/Polkadot/Api/Chain.hs b/src/Network/Polkadot/Api/Chain.hs new file mode 100644 index 00000000..f871e955 --- /dev/null +++ b/src/Network/Polkadot/Api/Chain.hs @@ -0,0 +1,51 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Chain +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `chain` prefix. +-- + +module Network.Polkadot.Api.Chain where + +import Data.Text (Text) + +import Data.ByteArray.HexString (HexString) +import Network.JsonRpc.TinyClient (JsonRpc (..)) +import Network.Polkadot.Api.Types (Header, SignedBlock) + +-- | Get header and body of a relay chain block. +getBlock :: JsonRpc m + => Maybe HexString + -- ^ Block hash + -> m (Maybe SignedBlock) +{-# INLINE getBlock #-} +getBlock = remote "chain_getBlock" + +-- | Get the block hash for a specific block. +getBlockHash :: JsonRpc m + => Maybe Int + -- ^ Block number + -> m (Maybe HexString) +{-# INLINE getBlockHash #-} +getBlockHash = remote "chain_getBlockHash" + +-- | Get hash of the last finalized block in the canon chain. +getFinalizedHead :: JsonRpc m => m HexString +{-# INLINE getFinalizedHead #-} +getFinalizedHead = remote "chain_getFinalizedHead" + +-- | Retrieves the header for a specific block. +getHeader :: JsonRpc m + => Maybe HexString + -- ^ Block hash + -> m (Maybe Header) +{-# INLINE getHeader #-} +getHeader = remote "chain_getHeader" diff --git a/src/Network/Polkadot/Api/Childstate.hs b/src/Network/Polkadot/Api/Childstate.hs new file mode 100644 index 00000000..0e8d364a --- /dev/null +++ b/src/Network/Polkadot/Api/Childstate.hs @@ -0,0 +1,69 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Childstate +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `childstate` prefix. +-- + +module Network.Polkadot.Api.Childstate where + +import Data.Text (Text) + +import Data.ByteArray.HexString (HexString) +import Network.JsonRpc.TinyClient (JsonRpc (..)) + +-- | Returns the keys with prefix from a child storage, leave empty to get all the keys. +getKeys :: JsonRpc m + => HexString + -- ^ Prefixed storage key + -> HexString + -- ^ Storage key + -> Maybe HexString + -- ^ Block hash + -> m [HexString] +{-# INLINE getKeys #-} +getKeys = remote "childstate_getKeys" + +-- | Returns a child storage entry at a specific block state. +getStorage :: JsonRpc m + => HexString + -- ^ Prefixed storage key + -> HexString + -- ^ Storage key + -> Maybe HexString + -- ^ Block hash + -> m (Maybe HexString) +{-# INLINE getStorage #-} +getStorage = remote "childstate_getStorage" + +-- | Returns the hash of a child storage entry at a block state +getStorageHash :: JsonRpc m + => HexString + -- ^ Prefixed storage key + -> HexString + -- ^ Storage key + -> Maybe HexString + -- ^ Block hash + -> m (Maybe HexString) +{-# INLINE getStorageHash #-} +getStorageHash = remote "childstate_getStorageHash" + +-- | Returns the size of a child storage entry at a block state. +getStorageSize :: JsonRpc m + => HexString + -- ^ Prefixed storage key + -> HexString + -- ^ Storage key + -> Maybe HexString + -- ^ Block hash + -> m (Maybe Int) +{-# INLINE getStorageSize #-} +getStorageSize = remote "childstate_getStorageSize" diff --git a/src/Network/Polkadot/Api/Contracts.hs b/src/Network/Polkadot/Api/Contracts.hs new file mode 100644 index 00000000..afff4a5e --- /dev/null +++ b/src/Network/Polkadot/Api/Contracts.hs @@ -0,0 +1,53 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Contracts +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `contracts` prefix. +-- + +module Network.Polkadot.Api.Contracts where + +import Data.Text (Text) + +import Data.ByteArray.HexString (HexString) +import Network.JsonRpc.TinyClient (JsonRpc (..)) + +-- | Executes a call to a contract. +call :: JsonRpc m + => ContractCallRequest + -- ^ Contract call + -> Maybe HexString + -- ^ Block hash or nothing for head + -> ContractExecResult +{-# INLINE call #-} +call = remote "contracts_call" + +-- | Returns the value under a specified storage key in a contract +getStorage :: JsonRpc m + => Text + -- ^ AccountId + -> HexString + -- ^ Storage key + -> Maybe HexString + -- ^ Block hash or nothing for head + -> Maybe HexString +{-# INLINE getStorage #-} +getStorage = remote "contracts_getStorage" + +-- | Returns the projected time a given contract will be able to sustain paying its rent. +rentProjection :: JsonRpc + => Text + -- ^ AccountId + -> Maybe HexString + -- ^ Block hash or nothing for head + -> Maybe Int +{-# INLINE rentProjection #-} +rentProjection = remote "contracts_rentProjection" diff --git a/src/Network/Polkadot/Api/Engine.hs b/src/Network/Polkadot/Api/Engine.hs new file mode 100644 index 00000000..29e4c38f --- /dev/null +++ b/src/Network/Polkadot/Api/Engine.hs @@ -0,0 +1,43 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Engine +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `engine` prefix. +-- + +module Network.Polkadot.Api.Engine where + +import Data.Text (Text) + +import Network.JsonRpc.TinyClient (JsonRpc (..)) +import Network.Polkadot.Api.Types (CreatedBlock) + +-- | Instructs the manual-seal authorship task to create a new block. +createBlock :: JsonRpc m + => Bool + -- ^ Create empty + -> Bool + -- ^ Finalize + -> Maybe HexString + -- ^ Parent hash + -> m CreatedBlock +{-# INLINE createBlock #-} +createBlock = remote "engine_createBlock" + +-- | Instructs the manual-seal authorship task to finalize a block. +finalizeBlock :: JsonRpc m + => HexString + -- ^ Block hash + -> Maybe HexString + -- ^ Justification + -> m Bool +{-# INLINE finalizeBlock #-} +finalizeBlock = remote "engine_finalizeBlock" diff --git a/src/Network/Polkadot/Api/Grandpa.hs b/src/Network/Polkadot/Api/Grandpa.hs new file mode 100644 index 00000000..799d3951 --- /dev/null +++ b/src/Network/Polkadot/Api/Grandpa.hs @@ -0,0 +1,26 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Grandpa +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `grandpa` prefix. +-- + +module Network.Polkadot.Api.Grandpa where + +import Data.Aeson (Object) +import Data.Text (Text) + +import Network.JsonRpc.TinyClient (JsonRpc (..)) + +-- | Returns the state of the current best round state as well as the ongoing background rounds. +roundState :: JsonRpc m => m Object +{-# INLINE roundState #-} +roundState = remote "grandpa_roundState" diff --git a/src/Network/Polkadot/Api/Offchain.hs b/src/Network/Polkadot/Api/Offchain.hs new file mode 100644 index 00000000..eb9c3ef3 --- /dev/null +++ b/src/Network/Polkadot/Api/Offchain.hs @@ -0,0 +1,44 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Offchain +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `offchain` prefix. +-- + +module Network.Polkadot.Api.Offchain where + +import Data.Text (Text) + +import Data.ByteArray.HexString (HexString) +import Network.JsonRpc.TinyClient (JsonRpc (..)) +import Network.Polkadot.Api.Types (StorageKind) + +-- | Get offchain local storage under given key and prefix. +localStorageGet :: JsonRpc m + => StorageKind + -- ^ Offchain storage kind + -> HexString + -- ^ Key + -> m (Maybe HexString) +{-# INLINE localStorageGet #-} +localStorageGet = remote "offchain_localStorageGet" + +-- | Set offchain local storage under given key and prefix +localStorageSet :: JsonRpc m + => StorageKind + -- ^ Offchain storage kind + -> HexString + -- ^ Key + -> HexString + -- ^ Value + -> m () +{-# INLINE localStorageSet #-} +localStorageSet = remote "offchain_localStorageSet" diff --git a/src/Network/Polkadot/Api/Payment.hs b/src/Network/Polkadot/Api/Payment.hs new file mode 100644 index 00000000..3df41430 --- /dev/null +++ b/src/Network/Polkadot/Api/Payment.hs @@ -0,0 +1,32 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Payment +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `payment` prefix. +-- + +module Network.Polkadot.Api.Payment where + +import Data.Text (Text) + +import Data.ByteArray.HexString (HexString) +import Network.JsonRpc.TinyClient (JsonRpc (..)) +import Network.Polkadot.Api.Types (RuntimeDispatchInfo) + +-- | Retrieves the fee information for an encoded extrinsic. +queryInfo :: JsonRpc m + => HexString + -- ^ Extrinsic + -> Maybe HexString + -- ^ Block hash or nothing for head block + -> m RuntimeDispatchInfo +{-# INLINE queryInfo #-} +queryInfo = remote "payment_queryInfo" diff --git a/src/Network/Polkadot/Api/Rpc.hs b/src/Network/Polkadot/Api/Rpc.hs new file mode 100644 index 00000000..c6d2b6f4 --- /dev/null +++ b/src/Network/Polkadot/Api/Rpc.hs @@ -0,0 +1,25 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.Rpc +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `rpc` prefix. +-- + +module Network.Polkadot.Api.Rpc where + +import Data.Text (Text) + +import Network.JsonRpc.TinyClient (JsonRpc (..)) + +-- | Retrieves the list of RPC methods that are exposed by the node. +methods :: JsonRpc m => m [Text] +{-# INLINE methods #-} +methods = remote "rpc_methods" diff --git a/src/Network/Polkadot/Api/State.hs b/src/Network/Polkadot/Api/State.hs new file mode 100644 index 00000000..f5709bb5 --- /dev/null +++ b/src/Network/Polkadot/Api/State.hs @@ -0,0 +1,184 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.State +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `state` prefix. +-- + +module Network.Polkadot.Api.State where + +import Data.Text (Text) + +import Data.ByteArray.HexString (HexString) +import Network.JsonRpc.TinyClient (JsonRpc (..)) +import Network.Polkadot.Api.Types (Metadata, ReadProof, + RuntimeVersion, StorageChangeSet) + +-- | Perform a call to a builtin on the chain. +call :: JsonRpc m + => Text + -- ^ Call method + -> HexString + -- ^ Call data + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m HexString +{-# INLINE call #-} +call = remote "state_call" + +-- | Retrieves the keys with prefix of a specific child storage. +getChildKeys :: JsonRpc m + => HexString + -- ^ Child storage key + -> HexString + -- ^ Child definition + -> Int + -- ^ Child type + -> HexString + -- ^ Key + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m [HexString] +{-# INLINE getChildKeys #-} +getChildKeys = remote "state_getChildKeys" + +-- | Retrieves the child storage for a key. +getChildStorage :: JsonRpc m + => HexString + -- ^ Child storage key + -> HexString + -- ^ Child definition + -> Int + -- ^ Child type + -> HexString + -- ^ Key + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m HexString +{-# INLINE getChildStorage #-} +getChildStorage = remote "state_getChildStorage" + +-- | Retrieves the child storage hash. +getChildStorageHash :: JsonRpc m + => HexString + -- ^ Child storage key + -> HexString + -- ^ Child definition + -> Int + -- ^ Child type + -> HexString + -- ^ Key + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m HexString +{-# INLINE getChildStorageHash #-} +getChildStorageHash = remote "state_getChildStorageHash" + +-- | Retrieves the child storage size. +getChildStorageSize :: JsonRpc m + => HexString + -- ^ Child storage key + -> HexString + -- ^ Child definition + -> Int + -- ^ Child type + -> HexString + -- ^ Key + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m Int +{-# INLINE getChildStorageSize #-} +getChildStorageSize = remote "state_getChildStorageSize" + +-- | Retrieves the keys with a certain prefix. +getKeys :: JsonRpc m + => HexString + -- ^ Key + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m [HexString] +{-# INLINE getKeys #-} +getKeys = remote "state_getKeys" + +-- | Returns the runtime metadata. +getMetadata :: JsonRpc m => m Metadata +{-# INLINE getMetadata #-} +getMetadata = remote "state_getMetadata" + +-- | Returns proof of storage entries at a specific block state. +getReadProof :: JsonRpc m + => [HexString] + -- ^ Keys + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m ReadProof +{-# INLINE getReadProof #-} +getReadProof = remote "state_getReadProof" + +-- | Get runtime version. +getRuntimeVersion :: JsonRpc m + => Maybe HexString + -- ^ Block hash or nothing for head + -> m RuntimeVersion +{-# INLINE getRuntimeVersion #-} +getRuntimeVersion = remote "state_getRuntimeVersion" + +-- | Retrieves the storage for a key. +getStorage :: JsonRpc m + => HexString + -- ^ Key + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m HexString +{-# INLINE getStorage #-} +getStorage = remote "state_getStorage" + +-- | Retrieves the storage hash. +getStorageHash :: JsonRpc m + => HexString + -- ^ Key + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m HexString +{-# INLINE getStorageHash #-} +getStorageHash = remote "state_getStorageHash" + +-- | Retrieves the storage size. +getStorageSize :: JsonRpc m + => HexString + -- ^ Key + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m Int +{-# INLINE getStorageSize #-} +getStorageHash = remote "state_getStorageSize" + +-- | Query historical storage entries (by key) starting from a start block. +queryStorage :: JsonRpc m + => [HexString] + -- ^ Storage keys + -> HexString + -- ^ From block hash + -> Maybe HexString + -- ^ To block hash + -> m [StorageChangeSet] +{-# INLINE queryStorage #-} +queryStorage = remote "state_queryStorage" + +-- | Query storage entries (by key) starting at block hash given as the second parameter. +queryStorageAt :: JsonRpc m + => [HexString] + -- ^ Storage keys + -> Maybe HexString + -- ^ Block hash or nothing for head + -> m [StorageChangeSet] +{-# INLINE queryStorageAt #-} +queryStorageAt = remote "state_queryStorageAt" diff --git a/src/Network/Polkadot/Api/System.hs b/src/Network/Polkadot/Api/System.hs new file mode 100644 index 00000000..87b3e625 --- /dev/null +++ b/src/Network/Polkadot/Api/System.hs @@ -0,0 +1,97 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Api.System +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot RPC methods with `system` prefix. +-- + +module Network.Polkadot.Api.System where + +import Data.Aeson (Object) +import Data.Text (Text) + +import Network.JsonRpc.TinyClient (JsonRpc (..)) +import Network.Polkadot.Api.Types (ChainType, Health, NodeRole, + PeerInfo) + +-- | Adds a reserved peer. +addReservedPeer :: JsonRpc m + => Text + -- ^ Peer URI + -> m Text +{-# INLINE addReservedPeer #-} +addReservedPeer = remote "system_addReservedPeer" + +-- | Retrieves the chain. +chain :: JsonRpc m => m Text +{-# INLINE chain #-} +chain = remote "system_chain" + +-- | Retrieves the chain type. +chainType :: JsonRpc m => m ChainType +{-# INLINE chainType #-} +chainType = remote "system_chainType" + +-- | Return health status of the node. +health :: JsonRpc m => m Health +{-# INLINE health #-} +health = remote "system_health" + +-- | The addresses include a trailing /p2p/ with the local PeerId, +-- and are thus suitable to be passed to addReservedPeer or as a bootnode address. +localListenAddresses :: JsonRpc m => m [Text] +{-# INLINE localListenAddresses #-} +localListenAddresses = remote "system_localListenAddresses" + +-- | Returns the base58-encoded PeerId of the node. +localPeerId :: JsonRpc m => m Text +{-# INLINE localPeerId #-} +localPeerId = remote "system_localPeerId" + +-- | Retrieves the node name. +name :: JsonRpc m => m Text +{-# INLINE name #-} +name = remote "system_name" + +-- | Returns current state of the network. +-- +-- Warning: This API isn't stable. +networkState :: JsonRpc m => m Object +{-# INLINE networkState #-} +networkState = remote "system_networkState" + +-- | Returns the roles the node is running as. +nodeRoles :: JsonRpc m => m [NodeRole] +{-# INLINE nodeRoles #-} +nodeRoles = remote "system_nodeRoles" + +-- | Returns the currently connected peers. +peers :: JsonRpc m => m [PeerInfo] +{-# INLINE peers #-} +peers = remote "system_peers" + +-- | Get a custom set of properties as a JSON object, defined in the chain spec. +properties :: JsonRpc m => m Object +{-# INLINE properties #-} +properties = remote "system_properties" + +-- | Remove a reserved peer. +removeReservedPeer :: JsonRpc m + => Text + -- ^ Peer URI + -> m Text +{-# INLINE removeReservedPeer #-} +removeReservedPeer = remote "system_removeReservedPeer" + +-- | Retrieves the version of the node. +version :: JsonRpc m => m Text +{-# INLINE version #-} +version = remote "system_version" diff --git a/src/Network/Polkadot/Api/Types.hs b/src/Network/Polkadot/Api/Types.hs new file mode 100644 index 00000000..b1e3c437 --- /dev/null +++ b/src/Network/Polkadot/Api/Types.hs @@ -0,0 +1,100 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TemplateHaskell #-} + +-- | +-- Module : Network.Polkadot.Api.Types +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot JSON-RPC types. +-- + +module Network.Polkadot.Api.Types where + +import Data.Aeson (FromJSON (..), Options (fieldLabelModifier, omitNothingFields), + ToJSON (..), Value (Bool, String), + defaultOptions, object, (.=)) +import Data.Aeson.TH (deriveJSON) +import Data.Text (Text) +import GHC.Generics (Generic) + +import Data.String.Extra (toLowerFirst) + +-- | The role the node is running as. +data NodeRole = Full + | LightClient + | Authority + | Sentry + deriving (Eq, Generic, Show) + +$(deriveJSON defaultOptions ''NodeRole) + +-- | Type op a chain. +data ChainType = Development + | Local + | Live + | Custom Text + deriving (Eq, Generic, Show) + +instance FromJSON ChainType where + parseJSON (String v) = return $ case v of + "Development" -> Development + "Local" -> Local + "Live" -> Live + custom_name -> Custom custom_name + parseJSON _ = fail "ChainType should be a JSON String" + +instance ToJSON ChainType where + toJSON (Custom v) = toJSON v + toJSON v = toJSON (show v) + +-- | System health struct returned by the RPC +data Health = Health + { healthPeers :: Int + -- ^ Number of connected peers. + , healthIsSyncing :: Bool + -- ^ Is the node syncing. + , healthShouldHavePeers :: Bool + -- ^ Should this node have any peers. + } + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 6 }) ''Health) + +-- | Network Peer information. +data PeerInfo = PeerInfo + { peerInfoPeerId :: Text + -- ^ Peer ID + , peerInfoRoles :: [NodeRole] + -- ^ Roles + , peerInfoProtocolVersion :: Int + -- ^ Protocol version. + , peerInfoBestHash :: Text + -- ^ Peer best block hash + , peerInfoBestNumber :: Int + -- ^ Peer best block number + } + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 8 }) ''PeerInfo) + +data ContractCallRequest = ContractCallRequest + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 8 }) ''ContractCallRequest) + +data ContractExecResult = ContractExecResult + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 8 }) ''ContractExecResult) From ad7b97db35ed447541c29cb3288aac6f86ca2e3d Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 23 May 2020 10:04:22 +0300 Subject: [PATCH 129/237] Added IPFS REST API calls --- src/Network/Ipfs.hs | 15 - src/Network/Ipfs/Api/Bitswap.hs | 41 + src/Network/Ipfs/Api/Block.hs | 39 + src/Network/Ipfs/Api/Bootstrap.hs | 34 + src/Network/Ipfs/Api/Cid.hs | 44 ++ src/Network/Ipfs/Api/Config.hs | 40 + src/Network/Ipfs/Api/Core.hs | 88 +++ src/Network/Ipfs/Api/Dag.hs | 40 + src/Network/Ipfs/Api/Dht.hs | 41 + src/Network/Ipfs/Api/Files.hs | 74 ++ src/Network/Ipfs/Api/Internal.hs | 822 ++------------------ src/Network/Ipfs/Api/Internal/Call.hs | 58 ++ src/Network/Ipfs/Api/Internal/Stream.hs | 41 + src/Network/Ipfs/Api/Ipfs.hs | 509 ------------- src/Network/Ipfs/Api/Key.hs | 48 ++ src/Network/Ipfs/Api/Log.hs | 42 ++ src/Network/Ipfs/Api/Multipart.hs | 35 - src/Network/Ipfs/Api/Object.hs | 81 ++ src/Network/Ipfs/Api/Pin.hs | 29 + src/Network/Ipfs/Api/Pubsub.hs | 39 + src/Network/Ipfs/Api/Repo.hs | 37 + src/Network/Ipfs/Api/Stats.hs | 28 + src/Network/Ipfs/Api/Swarm.hs | 49 ++ src/Network/Ipfs/Api/Types.hs | 823 +++++++++++++++++++++ src/Network/Ipfs/Api/{ => Types}/Stream.hs | 117 ++- src/Network/Ipfs/Client.hs | 47 ++ src/Network/Polkadot.hs | 15 - 27 files changed, 1877 insertions(+), 1399 deletions(-) delete mode 100644 src/Network/Ipfs.hs create mode 100644 src/Network/Ipfs/Api/Bitswap.hs create mode 100644 src/Network/Ipfs/Api/Block.hs create mode 100644 src/Network/Ipfs/Api/Bootstrap.hs create mode 100644 src/Network/Ipfs/Api/Cid.hs create mode 100644 src/Network/Ipfs/Api/Config.hs create mode 100644 src/Network/Ipfs/Api/Core.hs create mode 100644 src/Network/Ipfs/Api/Dag.hs create mode 100644 src/Network/Ipfs/Api/Dht.hs create mode 100644 src/Network/Ipfs/Api/Files.hs create mode 100644 src/Network/Ipfs/Api/Internal/Call.hs create mode 100644 src/Network/Ipfs/Api/Internal/Stream.hs delete mode 100644 src/Network/Ipfs/Api/Ipfs.hs create mode 100644 src/Network/Ipfs/Api/Key.hs create mode 100644 src/Network/Ipfs/Api/Log.hs delete mode 100644 src/Network/Ipfs/Api/Multipart.hs create mode 100644 src/Network/Ipfs/Api/Object.hs create mode 100644 src/Network/Ipfs/Api/Pin.hs create mode 100644 src/Network/Ipfs/Api/Pubsub.hs create mode 100644 src/Network/Ipfs/Api/Repo.hs create mode 100644 src/Network/Ipfs/Api/Stats.hs create mode 100644 src/Network/Ipfs/Api/Swarm.hs create mode 100644 src/Network/Ipfs/Api/Types.hs rename src/Network/Ipfs/Api/{ => Types}/Stream.hs (63%) create mode 100644 src/Network/Ipfs/Client.hs delete mode 100644 src/Network/Polkadot.hs diff --git a/src/Network/Ipfs.hs b/src/Network/Ipfs.hs deleted file mode 100644 index 231a24d6..00000000 --- a/src/Network/Ipfs.hs +++ /dev/null @@ -1,15 +0,0 @@ --- | --- Module : Network.Ipfs --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- --- TODO --- - -module Network.Ipfs - ( - ) where diff --git a/src/Network/Ipfs/Api/Bitswap.hs b/src/Network/Ipfs/Api/Bitswap.hs new file mode 100644 index 00000000..bb58c5c4 --- /dev/null +++ b/src/Network/Ipfs/Api/Bitswap.hs @@ -0,0 +1,41 @@ +-- | +-- Module : Network.Ipfs.Api.Bitswap +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `bitswap` prefix. +-- + +module Network.Ipfs.Api.Bitswap where + +import Control.Monad.IO.Class (MonadIO (..)) +import Data.Text (Text) + +import Network.Ipfs.Api.Internal (_bitswapLedger, + _bitswapReprovide, + _bitswapStat, _bitswapWL) +import Network.Ipfs.Api.Internal.Call (call) +import Network.Ipfs.Api.Types (BitswapLedgerObj, + BitswapStatObj, BitswapWLObj, + ReprovideReturnType) +import Network.Ipfs.Client (IpfsT) + +-- | 'Show some diagnostic information on the bitswap agent. +stat :: MonadIO m => IpfsT m BitswapStatObj +stat = call _bitswapStat + +-- | Show blocks currently on the wantlist. +wl :: MonadIO m => IpfsT m BitswapWLObj +wl = call _bitswapWL + +-- | Show the current ledger for a peer. +ledger :: MonadIO m => Text -> IpfsT m BitswapLedgerObj +ledger = call . _bitswapLedger + +-- | Trigger reprovider. +reprovide :: MonadIO m => IpfsT m ReprovideReturnType +reprovide = call _bitswapReprovide diff --git a/src/Network/Ipfs/Api/Block.hs b/src/Network/Ipfs/Api/Block.hs new file mode 100644 index 00000000..5a9a0bdc --- /dev/null +++ b/src/Network/Ipfs/Api/Block.hs @@ -0,0 +1,39 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ipfs.Api.Block +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `block` prefix. +-- + +module Network.Ipfs.Api.Block where + +import Control.Monad.IO.Class (MonadIO) +import Data.Aeson (decode) +import Data.Text (Text) +import Network.HTTP.Client (responseBody) + +import Network.Ipfs.Api.Internal (_blockGet, _blockStat) +import Network.Ipfs.Api.Internal.Call (call, multipartCall) +import Network.Ipfs.Api.Types (BlockObj, BlockReturnType) +import Network.Ipfs.Client (IpfsT) + +-- | Get a raw IPFS block. +get :: MonadIO m => Text -> IpfsT m BlockReturnType +get = call . _blockGet + +-- | Store input as an IPFS block. +put :: MonadIO m => Text -> IpfsT m (Maybe BlockObj) +put = fmap decodeResponse . multipartCall "block/put" + where + decodeResponse = decode . responseBody + +-- | Print information of a raw IPFS block. +stat :: MonadIO m => Text -> IpfsT m BlockObj +stat = call . _blockStat diff --git a/src/Network/Ipfs/Api/Bootstrap.hs b/src/Network/Ipfs/Api/Bootstrap.hs new file mode 100644 index 00000000..bff5f1be --- /dev/null +++ b/src/Network/Ipfs/Api/Bootstrap.hs @@ -0,0 +1,34 @@ +-- | +-- Module : Network.Ipfs.Api.Bootstrap +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `bootstrap` prefix. +-- + +module Network.Ipfs.Api.Bootstrap where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text) + +import Network.Ipfs.Api.Internal (_bootstrapAdd, _bootstrapList, + _bootstrapRM) +import Network.Ipfs.Api.Internal.Call (call) +import Network.Ipfs.Api.Types (BootstrapObj) +import Network.Ipfs.Client (IpfsT) + +-- | Add peers to the bootstrap list. +add :: MonadIO m => Text -> IpfsT m BootstrapObj +add = call . _bootstrapAdd . Just + +-- | Show peers in the bootstrap list. +list :: MonadIO m => IpfsT m BootstrapObj +list = call _bootstrapList + +-- | Remove peers from the bootstrap list. +rm :: MonadIO m => Text -> IpfsT m BootstrapObj +rm = call . _bootstrapRM . Just diff --git a/src/Network/Ipfs/Api/Cid.hs b/src/Network/Ipfs/Api/Cid.hs new file mode 100644 index 00000000..9e5b0e24 --- /dev/null +++ b/src/Network/Ipfs/Api/Cid.hs @@ -0,0 +1,44 @@ +-- | +-- Module : Network.Ipfs.Api.Cid +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `cid` prefix. +-- + +module Network.Ipfs.Api.Cid where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text) + +import Network.Ipfs.Api.Internal (_cidBase32, _cidBases, + _cidCodecs, _cidFormat, + _cidHashes) +import Network.Ipfs.Api.Internal.Call (call) +import Network.Ipfs.Api.Types (CidBasesObj, CidCodecsObj, + CidHashesObj, CidObj) +import Network.Ipfs.Client (IpfsT) + +-- | List available multibase encodings. +bases :: MonadIO m => IpfsT m [CidBasesObj] +bases = call _cidBases + +-- | List available CID codecs. +codecs :: MonadIO m => IpfsT m [CidCodecsObj] +codecs = call _cidCodecs + +-- | List available multihashes. +hashes :: MonadIO m => IpfsT m [CidHashesObj] +hashes = call _cidHashes + +-- | Convert CIDs to Base32 CID version 1. +base32 :: MonadIO m => Text -> IpfsT m CidObj +base32 = call . _cidBase32 + +-- | Format and convert a CID in various useful ways. +format :: MonadIO m => Text -> IpfsT m CidObj +format = call . _cidFormat diff --git a/src/Network/Ipfs/Api/Config.hs b/src/Network/Ipfs/Api/Config.hs new file mode 100644 index 00000000..e7c3f910 --- /dev/null +++ b/src/Network/Ipfs/Api/Config.hs @@ -0,0 +1,40 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ipfs.Api.Config +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `config` prefix. +-- + +module Network.Ipfs.Api.Config where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text) +import Network.HTTP.Client (responseStatus) +import Network.HTTP.Types (Status (..)) + +import Network.Ipfs.Api.Internal (_configGet, _configSet) +import Network.Ipfs.Api.Internal.Call (call, multipartCall) +import Network.Ipfs.Api.Types (ConfigObj) +import Network.Ipfs.Client (IpfsT) + + +-- | Get ipfs config values. +get :: MonadIO m => Text -> IpfsT m ConfigObj +get = call . _configGet + +-- | Set ipfs config values. +set :: MonadIO m => Text -> Maybe Text -> IpfsT m ConfigObj +set key = call . _configSet key + +-- | Replace the config with the file at . +replace :: MonadIO m => Text -> IpfsT m Bool +replace = fmap isSuccess . multipartCall "config/replace" + where + isSuccess = (== 200) . statusCode . responseStatus diff --git a/src/Network/Ipfs/Api/Core.hs b/src/Network/Ipfs/Api/Core.hs new file mode 100644 index 00000000..fa5de126 --- /dev/null +++ b/src/Network/Ipfs/Api/Core.hs @@ -0,0 +1,88 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ipfs.Api.Core +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Core IPFS API calls. +-- + +module Network.Ipfs.Api.Core where + +import qualified Codec.Archive.Tar as Tar +import Control.Monad.IO.Class (MonadIO (..)) +import Data.Aeson (decode) +import Data.ByteString.Lazy (fromStrict) +import Data.Text (Text) +import Data.Text.Encoding (encodeUtf8) +import Network.HTTP.Client (responseBody) +import Servant.API.ContentTypes (NoContent) + +import Network.Ipfs.Api.Internal (_cat, _dns, _get, _id, + _idPeer, _ls, _shutdown, + _version) +import Network.Ipfs.Api.Internal.Call (call, multipartCall, + streamCall) +import Network.Ipfs.Api.Internal.Stream (_ping, _refs, _refsLocal) +import Network.Ipfs.Api.Types (AddObj, CatReturnType, + DnsObj, IdObj, LsObj, + VersionObj) +import Network.Ipfs.Client (IpfsT) + +-- | Show IPFS object data. +cat :: MonadIO m => Text -> IpfsT m CatReturnType +cat = call . _cat + +-- | Add a file or directory to ipfs. +add :: MonadIO m => Text -> IpfsT m (Maybe AddObj) +add = fmap decodeResponse . multipartCall "add" + where + decodeResponse = decode . responseBody + +-- | List directory contents for Unix filesystem objects. +ls :: MonadIO m => Text -> IpfsT m LsObj +ls = call . _ls + +-- | Download IPFS objects. +get :: MonadIO m => Text -> IpfsT m Text +get hash = do + ret <- call $ _get hash + do liftIO $ Tar.unpack "getResponseDirectory" . Tar.read . fromStrict $ encodeUtf8 ret + pure "The content has been stored in getResponseDirectory." + +-- | Show ipfs version information. +version :: MonadIO m => IpfsT m VersionObj +version = call _version + +-- | Show ipfs node id info. +id :: MonadIO m => IpfsT m IdObj +id = call _id + +-- | Show ipfs node id info of the given peerId. +idPeer :: MonadIO m => Text -> IpfsT m IdObj +idPeer = call . _idPeer + +-- | Resolve DNS links. +dns :: MonadIO m => Text -> IpfsT m DnsObj +dns = call . _dns + +-- | List links (references) from an object. +refs :: MonadIO m => Text -> m () +refs = streamCall . _refs + +-- | List all local references. +refsLocal :: MonadIO m => m () +refsLocal = streamCall _refsLocal + +-- | Send echo request packets to IPFS hosts. +ping :: MonadIO m => Text -> m () +ping = streamCall . _ping + +-- | Shut down the ipfs daemon. +shutdown :: MonadIO m => IpfsT m NoContent +shutdown = call _shutdown diff --git a/src/Network/Ipfs/Api/Dag.hs b/src/Network/Ipfs/Api/Dag.hs new file mode 100644 index 00000000..954a7665 --- /dev/null +++ b/src/Network/Ipfs/Api/Dag.hs @@ -0,0 +1,40 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ipfs.Api.Dag +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `dag` prefix. +-- + +module Network.Ipfs.Api.Dag where + +import Control.Monad.IO.Class (MonadIO) +import Data.Aeson (decode) +import Data.Text (Text) +import Network.HTTP.Client (responseBody) + +import Network.Ipfs.Api.Internal (_dagGet, _dagResolve) +import Network.Ipfs.Api.Internal.Call (call, multipartCall) +import Network.Ipfs.Api.Types (DagPutObj, DagResolveObj, + DagReturnType) +import Network.Ipfs.Client (IpfsT) + +-- | Get a dag node from ipfs. +get :: MonadIO m => Text -> IpfsT m DagReturnType +get = call . _dagGet + +-- | Resolve ipld block. +resolve :: MonadIO m => Text -> IpfsT m DagResolveObj +resolve = call . _dagResolve + +-- | Add a dag node to ipfs. +put :: MonadIO m => Text -> IpfsT m (Maybe DagPutObj) +put = fmap decodeResponse . multipartCall "dag/put" + where + decodeResponse = decode . responseBody diff --git a/src/Network/Ipfs/Api/Dht.hs b/src/Network/Ipfs/Api/Dht.hs new file mode 100644 index 00000000..f39b9ab1 --- /dev/null +++ b/src/Network/Ipfs/Api/Dht.hs @@ -0,0 +1,41 @@ +-- | +-- Module : Network.Ipfs.Api.Dht +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `dht` prefix. +-- + +module Network.Ipfs.Api.Dht where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text) + +import Network.Ipfs.Api.Internal.Call (streamCall) +import Network.Ipfs.Api.Internal.Stream (_dhtFindPeer, _dhtFindProvs, + _dhtGet, _dhtProvide, + _dhtQuery) + +-- | Find the multiaddresses associated with the given peerId. +findPeer :: MonadIO m => Text -> m () +findPeer = streamCall . _dhtFindPeer + +-- | Find peers that can provide a specific value, given a key. +findProvs :: MonadIO m => Text -> m () +findProvs = streamCall . _dhtFindProvs + +-- | Given a key, query the routing system for its best value. +get :: MonadIO m => Text -> m () +get cid = streamCall $ _dhtGet cid + +-- | Announce to the network that you are providing given values. +provide :: MonadIO m => Text -> m () +provide = streamCall . _dhtProvide + +-- | Find the closest Peer IDs to a given peerID by querying the DHT. +query :: MonadIO m => Text -> m () +query = streamCall . _dhtQuery diff --git a/src/Network/Ipfs/Api/Files.hs b/src/Network/Ipfs/Api/Files.hs new file mode 100644 index 00000000..9fc7adeb --- /dev/null +++ b/src/Network/Ipfs/Api/Files.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ipfs.Api.Files +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `files` prefix. +-- + +module Network.Ipfs.Api.Files where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text, pack) +import Network.HTTP.Client (responseStatus) +import Network.HTTP.Types (Status (..)) +import Servant.API.ContentTypes (NoContent) + +import Network.Ipfs.Api.Internal (_filesChcid, _filesCp, + _filesFlush, _filesLs, + _filesMkdir, _filesMv, + _filesRead, _filesRm, + _filesStat) +import Network.Ipfs.Api.Internal.Call (call, multipartCall) +import Network.Ipfs.Api.Types (FilesFlushObj, FilesLsObj, + FilesReadType, FilesStatObj) +import Network.Ipfs.Client (IpfsT) + +-- | Change the cid version or hash function of the root node of a given mfsPath. +chcidVer :: MonadIO m => Text -> Int -> IpfsT m NoContent +chcidVer mfsPath = call . _filesChcid (Just mfsPath) . Just + +-- | Copy files into mfs. +cp :: MonadIO m => Text -> Text -> IpfsT m NoContent +cp src = call . _filesCp (Just src) . Just + +-- | Flush a given path's data to disk. +flush :: MonadIO m => Text -> IpfsT m FilesFlushObj +flush = call . _filesFlush . Just + +-- | List directories in the local mutable namespace. +ls :: MonadIO m => Text -> IpfsT m FilesLsObj +ls = call . _filesLs . Just + +-- | Make directories. +mkdir :: MonadIO m => Text -> IpfsT m NoContent +mkdir = call . _filesMkdir . Just + +-- | Move files. +mv :: MonadIO m => Text -> Text -> IpfsT m NoContent +mv src = call . _filesMv (Just src) . Just + +-- | Read a file in a given mfs. +read :: MonadIO m => Text -> IpfsT m FilesReadType +read = call . _filesRead . Just + +-- | Display file status. +stat :: MonadIO m => Text -> IpfsT m FilesStatObj +stat = call . _filesStat . Just + +-- | Remove a file. +filesRm :: MonadIO m => Text -> IpfsT m NoContent +filesRm = call . flip _filesRm (Just True) . Just + +-- | Write to a mutable file in a given filesystem. +write :: MonadIO m => Text -> Text -> Bool -> IpfsT m Bool +write mfsPath filePath toTruncate = isSuccess <$> multipartCall uri filePath + where + uri = "files/write?arg=" <> mfsPath <> "&create=true" <> "&truncate=" <> (pack $ show toTruncate) + isSuccess = (200 ==) . statusCode . responseStatus diff --git a/src/Network/Ipfs/Api/Internal.hs b/src/Network/Ipfs/Api/Internal.hs index d107c593..c799da4f 100644 --- a/src/Network/Ipfs/Api/Internal.hs +++ b/src/Network/Ipfs/Api/Internal.hs @@ -1,746 +1,44 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE MultiParamTypeClasses #-} - -- | --- Module : Network.Ipfs.Api.Api --- Copyright : Alexander Krupenkin 2016-2018 +-- Module : Network.Ipfs.Api.Internal +-- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- -- Maintainer : mail@akru.me -- Stability : experimental -- Portability : portable -- --- Ipfs API provider. +-- IPFS API internals. -- -module Network.Ipfs.Api.Api where +module Network.Ipfs.Api.Internal where -import Control.Arrow (left) -import Control.Monad -import Data.Aeson -import Data.Int -import Data.ByteString.Lazy (toStrict) -import qualified Data.ByteString.Lazy.Char8() -import qualified Data.HashMap.Strict as H -import Data.Proxy -import Data.Text (Text) -import qualified Data.Text.Encoding as TextS -import Data.Typeable -import Network.HTTP.Client() -import qualified Network.HTTP.Media as M ((//)) +import Data.Proxy (Proxy (..)) +import Data.Text (Text) import Servant.API -import Servant.Client - -type CatReturnType = Text -type ReprovideReturnType = Text -type GetReturnType = Text -type BlockReturnType = Text -type DagReturnType = Text -type ObjectReturnType = Text -type FilesReadType = Text - -data DirLink = DirLink - { name :: Text - , hash :: Text - , size :: Int64 - , contentType :: Int - , target :: Text - } deriving (Show, Eq) - -data DirObj = DirObj - { dirHash :: Text - , links :: [DirLink] - } deriving (Show, Eq) - -data LsObj = LsObj { objs :: [DirObj] } deriving (Show, Eq) - -data SwarmStreamObj = SwarmStreamObj { protocol :: Text } deriving (Show, Eq) - -data SwarmPeerObj = SwarmPeerObj - { address :: Text - , direction :: Int - , latency :: Text - , muxer :: Text - , peer :: Text - , streams :: Maybe [SwarmStreamObj] - } deriving (Show, Eq) - -data SwarmPeersObj = SwarmPeersObj { peers :: [SwarmPeerObj] } deriving (Show, Eq) - -data SwarmObj = SwarmObj { strings :: [Text] } deriving (Show, Eq) - -data WantlistObj = WantlistObj { forSlash :: Text } deriving (Show, Eq) - -data BitswapStatObj = BitswapStatObj - { blocksReceived :: Int64 - , blocksSent :: Int64 - , dataReceived :: Int64 - , dataSent :: Int64 - , dupBlksReceived :: Int64 - , dupDataReceived :: Int64 - , messagesReceived :: Int64 - , bitswapPeers :: [Text] - , provideBufLen :: Int - , wantlist :: [WantlistObj] - } deriving (Show, Eq) - -data BitswapWLObj = BitswapWLObj { bitswapKeys :: [WantlistObj] } deriving (Show, Eq) - -data BitswapLedgerObj = BitswapLedgerObj - { exchanged :: Int64 - , ledgerPeer :: Text - , recv :: Int64 - , sent :: Int64 - , value :: Double - } deriving (Show, Eq) - -data CidBasesObj = CidBasesObj - { baseCode :: Int - , baseName :: Text - } deriving (Show, Eq) - -data CidCodecsObj = CidCodecsObj - { codecCode :: Int - , codecName :: Text - } deriving (Show, Eq) - -data CidHashesObj = CidHashesObj - { multihashCode :: Int - , multihashName :: Text - } deriving (Show, Eq) - -data CidObj = CidObj - { cidStr :: Text - , errorMsg :: Text - , formatted :: Text - } deriving (Show, Eq) - -data BlockObj = BlockObj - { key :: Text - , blockSize :: Int - } deriving (Show, Eq) - -data DagCidObj = DagCidObj { cidSlash :: Text } deriving (Show, Eq) - -data DagResolveObj = DagResolveObj - { cid :: DagCidObj - , remPath :: Text - } deriving (Show, Eq) - -data DagPutObj = DagPutObj - { putCid :: DagCidObj - } deriving (Show, Eq) - -data ConfigObj = ConfigObj - { configKey :: Text - , configValue :: Text - } deriving (Show, Eq) - -data ObjectLinkObj = ObjectLinkObj - { linkHash :: Text - , linkName :: Text - , linkSize :: Int64 - } deriving (Show, Eq) - -data ObjectObj = ObjectObj { newObjectHash :: Text } deriving (Show, Eq) - -data ObjectLinksObj = WithLinks - { objectHash :: Text - , objectLinks :: [ObjectLinkObj] - } - | WithoutLinks { objectHash :: Text } deriving (Show, Eq) - -data ObjectGetObj = ObjectGetObj - { objectName :: Text - , objectGetLinks :: [ObjectLinkObj] - } deriving (Show, Eq) - -data ObjectStatObj = ObjectStatObj - { objBlockSize :: Int - , cumulativeSize :: Int - , dataSize :: Int - , objHash :: Text - , linksSize :: Int - , numLinks :: Int - } deriving (Show, Eq) - -data DiffObj = DiffObj { diffSlash :: Text } deriving (Show, Eq) - -data ObjectChangeObj = ObjectChangeObj - { after :: Maybe DiffObj - , before :: DiffObj - , path :: Text - , diffType :: Int - } deriving (Show, Eq) - -data ObjectDiffObj = ObjectDiffObj { changes :: [ObjectChangeObj] } deriving (Show, Eq) - -data PinObj = WithoutProgress - { pins :: [Text] } - - | WithProgress - { pins :: [Text] - , progress :: Int - } deriving (Show, Eq) - -data BootstrapObj = BootstrapObj { bootstrapPeers :: [Text] } deriving (Show, Eq) - -data StatsBwObj = StatsBwObj - { rateIn :: Double - , rateOut :: Double - , totalIn :: Int64 - , totalOut :: Int64 - } deriving (Show, Eq) - -data StatsRepoObj = StatsRepoObj - { numObjects :: Int64 - , repoPath :: Text - , repoSize :: Int64 - , storageMax :: Int64 - , repoVersion :: Text - } deriving (Show, Eq) - -data VersionObj = VersionObj - { commit :: Text - , golang :: Text - , repo :: Text - , system :: Text - , version :: Text - } deriving (Show, Eq) - -data IdObj = IdObj - { addresses :: [Text] - , agentVersion :: Text - , id :: Text - , protocolVersion :: Text - , publicKey :: Text - } deriving (Show, Eq) - -data DnsObj = DnsObj { dnsPath :: Text } deriving (Show, Eq) - -data PubsubObj = PubsubObj { pubsubStrings :: [Text] } deriving (Show, Eq) - -data LogLsObj = LogLsObj { logLsStrings :: [Text] } deriving (Show, Eq) - -data LogLevelObj = LogLevelObj { message :: Text } deriving (Show, Eq) - -data RepoVersionObj = RepoVersionObj { repoVer :: Text } deriving (Show, Eq) - -data RepoFsckObj = RepoFsckObj { repoMessage :: Text } deriving (Show, Eq) - -data KeyDetailsObj = KeyDetailsObj - { keyId :: Text - , keyName :: Text - } deriving (Show, Eq) - -data KeyObj = KeyObj { keys :: [KeyDetailsObj] } deriving (Show, Eq) - -data KeyRenameObj = KeyRenameObj - { peerId :: Text - , now :: Text - , overwrite :: Bool - , was :: Text - } deriving (Show, Eq) - -data FilesStatObj = FilesStatObj - { fileObjectHash :: Text - , objectSize :: Int - , cumulativeObjectSize :: Int - , blocks :: Int - , objectType :: Text - } deriving (Show, Eq) - -data FilesEntryObj = FilesEntryObj - { entryName :: Text - , entryType :: Int - , entrySize :: Int - , entryHash :: Text - } deriving (Show, Eq) - -data FilesLsObj = FilesLsObj { enteries :: [FilesEntryObj] } deriving (Show, Eq) - -data FilesFlushObj = FilesFlushObj { fileCid :: Text } deriving (Show, Eq) - -instance FromJSON DirLink where - parseJSON (Object o) = - DirLink <$> o .: "Name" - <*> o .: "Hash" - <*> o .: "Size" - <*> o .: "Type" - <*> o .: "Target" - - parseJSON _ = mzero - -instance FromJSON DirObj where - parseJSON (Object o) = - DirObj <$> o .: "Hash" - <*> o .: "Links" - - parseJSON _ = mzero - -instance FromJSON LsObj where - parseJSON (Object o) = - LsObj <$> o .: "Objects" - - parseJSON _ = mzero - - -instance FromJSON SwarmStreamObj where - parseJSON (Object o) = - SwarmStreamObj <$> o .: "Protocol" - - parseJSON _ = mzero - -instance FromJSON SwarmPeerObj where - parseJSON (Object o) = - SwarmPeerObj <$> o .: "Addr" - <*> o .: "Direction" - <*> o .: "Latency" - <*> o .: "Muxer" - <*> o .: "Peer" - <*> o .: "Streams" - - parseJSON _ = mzero - -instance FromJSON SwarmPeersObj where - parseJSON (Object o) = - SwarmPeersObj <$> o .: "Peers" - - parseJSON _ = mzero - - -instance FromJSON SwarmObj where - parseJSON (Object o) = - SwarmObj <$> o .: "Strings" - - parseJSON _ = mzero - -instance FromJSON WantlistObj where - parseJSON (Object o) = - WantlistObj <$> o .: "/" - - parseJSON _ = mzero - -instance FromJSON BitswapStatObj where - parseJSON (Object o) = - BitswapStatObj <$> o .: "BlocksReceived" - <*> o .: "BlocksSent" - <*> o .: "DataReceived" - <*> o .: "DataSent" - <*> o .: "DupBlksReceived" - <*> o .: "DupDataReceived" - <*> o .: "MessagesReceived" - <*> o .: "Peers" - <*> o .: "ProvideBufLen" - <*> o .: "Wantlist" - - parseJSON _ = mzero - - -instance FromJSON BitswapWLObj where - parseJSON (Object o) = - BitswapWLObj <$> o .: "Keys" - - parseJSON _ = mzero - -instance FromJSON BitswapLedgerObj where - parseJSON (Object o) = - BitswapLedgerObj <$> o .: "Exchanged" - <*> o .: "Peer" - <*> o .: "Recv" - <*> o .: "Sent" - <*> o .: "Value" - - parseJSON _ = mzero - -instance FromJSON CidBasesObj where - parseJSON (Object o) = - CidBasesObj <$> o .: "Code" - <*> o .: "Name" - - parseJSON _ = mzero - -instance FromJSON CidCodecsObj where - parseJSON (Object o) = - CidCodecsObj <$> o .: "Code" - <*> o .: "Name" - - parseJSON _ = mzero - -instance FromJSON CidHashesObj where - parseJSON (Object o) = - CidHashesObj <$> o .: "Code" - <*> o .: "Name" - - parseJSON _ = mzero - -instance FromJSON CidObj where - parseJSON (Object o) = - CidObj <$> o .: "CidStr" - <*> o .: "ErrorMsg" - <*> o .: "Formatted" - - parseJSON _ = mzero - -instance FromJSON BlockObj where - parseJSON (Object o) = - BlockObj <$> o .: "Key" - <*> o .: "Size" - - parseJSON _ = mzero - -instance FromJSON DagCidObj where - parseJSON (Object o) = - DagCidObj <$> o .: "/" - - parseJSON _ = mzero - -instance FromJSON DagResolveObj where - parseJSON (Object o) = - DagResolveObj <$> o .: "Cid" - <*> o .: "RemPath" - - parseJSON _ = mzero - -instance FromJSON DagPutObj where - parseJSON (Object o) = - DagPutObj <$> o .: "Cid" - - parseJSON _ = mzero - -instance FromJSON ConfigObj where - parseJSON (Object o) = - ConfigObj <$> o .: "Key" - <*> o .: "Value" - - parseJSON _ = mzero - -instance FromJSON ObjectLinkObj where - parseJSON (Object o) = - ObjectLinkObj <$> o .: "Hash" - <*> o .: "Name" - <*> o .: "Size" - - parseJSON _ = mzero - -instance FromJSON ObjectObj where - parseJSON (Object o) = - ObjectObj <$> o .: "Hash" - - parseJSON _ = mzero - -instance FromJSON ObjectLinksObj where - parseJSON (Object v) = - case H.lookup "Links" v of - Just (_) -> WithLinks <$> v .: "Hash" - <*> v .: "Links" - - Nothing -> - case H.lookup "Hash" v of - Just (_) -> WithoutLinks <$> v .: "Hash" - Nothing -> mzero - - parseJSON _ = mzero - -instance FromJSON ObjectGetObj where - parseJSON (Object o) = - ObjectGetObj <$> o .: "Data" - <*> o .: "Links" - - parseJSON _ = mzero - -instance FromJSON ObjectStatObj where - parseJSON (Object o) = - ObjectStatObj <$> o .: "BlockSize" - <*> o .: "CumulativeSize" - <*> o .: "DataSize" - <*> o .: "Hash" - <*> o .: "LinksSize" - <*> o .: "NumLinks" - - parseJSON _ = mzero - -instance FromJSON ObjectChangeObj where - parseJSON (Object o) = - ObjectChangeObj <$> o .: "After" - <*> o .: "Before" - <*> o .: "Path" - <*> o .: "Type" - - parseJSON _ = mzero - -instance FromJSON DiffObj where - parseJSON (Object o) = - DiffObj <$> o .: "/" - - parseJSON _ = mzero - -instance FromJSON ObjectDiffObj where - parseJSON (Object o) = - ObjectDiffObj <$> o .: "Changes" - - parseJSON _ = mzero - -instance FromJSON PinObj where - parseJSON (Object v) = - case H.lookup "Progress" v of - Just (_) -> WithProgress <$> v .: "Pins" - <*> v .: "Progress" - - Nothing -> - case H.lookup "Pins" v of - Just (_) -> WithoutProgress <$> v .: "Pins" - Nothing -> mzero - - parseJSON _ = mzero - -instance FromJSON BootstrapObj where - parseJSON (Object o) = - BootstrapObj <$> o .: "Peers" - - parseJSON _ = mzero - -instance FromJSON StatsBwObj where - parseJSON (Object o) = - StatsBwObj <$> o .: "RateIn" - <*> o .: "RateOut" - <*> o .: "TotalIn" - <*> o .: "TotalOut" - - parseJSON _ = mzero - -instance FromJSON StatsRepoObj where - parseJSON (Object o) = - StatsRepoObj <$> o .: "NumObjects" - <*> o .: "RepoPath" - <*> o .: "RepoSize" - <*> o .: "StorageMax" - <*> o .: "Version" - - parseJSON _ = mzero - -instance FromJSON VersionObj where - parseJSON (Object o) = - VersionObj <$> o .: "Commit" - <*> o .: "Golang" - <*> o .: "Repo" - <*> o .: "System" - <*> o .: "Version" - - parseJSON _ = mzero - -instance FromJSON IdObj where - parseJSON (Object o) = - IdObj <$> o .: "Addresses" - <*> o .: "AgentVersion" - <*> o .: "ID" - <*> o .: "ProtocolVersion" - <*> o .: "PublicKey" - - parseJSON _ = mzero - -instance FromJSON DnsObj where - parseJSON (Object o) = - DnsObj <$> o .: "Path" - - parseJSON _ = mzero - -instance FromJSON PubsubObj where - parseJSON (Object o) = - PubsubObj <$> o .: "Strings" - - parseJSON _ = mzero - -instance FromJSON LogLsObj where - parseJSON (Object o) = - LogLsObj <$> o .: "Strings" - - parseJSON _ = mzero - -instance FromJSON LogLevelObj where - parseJSON (Object o) = - LogLevelObj <$> o .: "Message" - - parseJSON _ = mzero - -instance FromJSON RepoVersionObj where - parseJSON (Object o) = - RepoVersionObj <$> o .: "Version" - - parseJSON _ = mzero - -instance FromJSON RepoFsckObj where - parseJSON (Object o) = - RepoFsckObj <$> o .: "Message" - - parseJSON _ = mzero - - -instance FromJSON KeyDetailsObj where - parseJSON (Object o) = - KeyDetailsObj <$> o .: "Id" - <*> o .: "Name" - - parseJSON _ = mzero - -instance FromJSON KeyObj where - parseJSON (Object o) = - KeyObj <$> o .: "Keys" - - parseJSON _ = mzero - -instance FromJSON KeyRenameObj where - parseJSON (Object o) = - KeyRenameObj <$> o .: "Id" - <*> o .: "Now" - <*> o .: "Overwrite" - <*> o .: "Was" - - parseJSON _ = mzero - -instance FromJSON FilesStatObj where - parseJSON (Object o) = - FilesStatObj <$> o .: "Hash" - <*> o .: "Size" - <*> o .: "CumulativeSize" - <*> o .: "Blocks" - <*> o .: "Type" - - parseJSON _ = mzero - -instance FromJSON FilesEntryObj where - parseJSON (Object o) = - FilesEntryObj <$> o .: "Name" - <*> o .: "Type" - <*> o .: "Size" - <*> o .: "Hash" - - parseJSON _ = mzero - -instance FromJSON FilesLsObj where - parseJSON (Object o) = - FilesLsObj <$> o .: "Entries" - - parseJSON _ = mzero - -instance FromJSON FilesFlushObj where - parseJSON (Object o) = - FilesFlushObj <$> o .: "Cid" - - parseJSON _ = mzero - --- | Defining a content type same as PlainText without charset -data IpfsText deriving Typeable - -instance Servant.API.Accept IpfsText where - contentType _ = "text" M.// "plain" - --- | @left show . TextS.decodeUtf8' . toStrict@ -instance MimeUnrender IpfsText Text where - mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict - - --- | Defining a content type same as IpfsJSON -data IpfsJSON deriving Typeable - -instance Servant.API.Accept IpfsJSON where - contentType _ = "application" M.// "json" - --- | @left show . TextS.decodeUtf8' . toStrict@ -instance MimeUnrender IpfsJSON Text where - mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict - +import Servant.Client (ClientM, client) -type IpfsApi = "cat" :> Capture "arg" Text :> Get '[IpfsText] CatReturnType - :<|> "ls" :> Capture "arg" Text :> Get '[JSON] LsObj - :<|> "get" :> Capture "arg" Text :> Get '[IpfsText] GetReturnType - :<|> "swarm" :> "peers" :> Get '[JSON] SwarmPeersObj - :<|> "swarm" :> "connect" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj - :<|> "swarm" :> "disconnect" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj - :<|> "swarm" :> "filters" :> Get '[JSON] SwarmObj - :<|> "swarm" :> "filters" :> "add" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj - :<|> "swarm" :> "filters" :> "rm" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj - :<|> "bitswap" :> "stat" :> Get '[JSON] BitswapStatObj - :<|> "bitswap" :> "wantlist" :> Get '[JSON] BitswapWLObj - :<|> "bitswap" :> "ledger" :> Capture "peerId" Text :> Get '[JSON] BitswapLedgerObj - :<|> "bitswap" :> "reprovide" :> Get '[IpfsText] ReprovideReturnType - :<|> "cid" :> "bases" :> Get '[JSON] [CidBasesObj] - :<|> "cid" :> "codecs" :> Get '[JSON] [CidCodecsObj] - :<|> "cid" :> "hashes" :> Get '[JSON] [CidHashesObj] - :<|> "cid" :> "base32" :> Capture "cid" Text :> Get '[JSON] CidObj - :<|> "cid" :> "format" :> Capture "cid" Text :> Get '[JSON] CidObj - :<|> "block" :> "get" :> Capture "key" Text :> Get '[IpfsText] BlockReturnType - :<|> "block" :> "stat" :> Capture "key" Text :> Get '[JSON] BlockObj - :<|> "dag" :> "get" :> Capture "ref" Text :> Get '[IpfsJSON] DagReturnType - :<|> "dag" :> "resolve" :> Capture "ref" Text :> Get '[JSON] DagResolveObj - :<|> "config" :> Capture "ref" Text :> Get '[JSON] ConfigObj - :<|> "config" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ConfigObj - :<|> "object" :> "data" :> Capture "ref" Text :> Get '[IpfsText] ObjectReturnType - :<|> "object" :> "new" :> Get '[JSON] ObjectObj - :<|> "object" :> "links" :> Capture "ref" Text :> Get '[JSON] ObjectLinksObj - :<|> "object" :> "patch" :> "add-link" :> Capture "arg" Text - :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ObjectLinksObj - :<|> "object" :> "patch" :> "rm-link" :> Capture "arg" Text - :> QueryParam "arg" Text :> Get '[JSON] ObjectLinksObj - :<|> "object" :> "get" :> Capture "arg" Text :> Get '[JSON] ObjectGetObj - :<|> "object" :> "diff" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ObjectDiffObj - :<|> "object" :> "stat" :> Capture "arg" Text :> Get '[JSON] ObjectStatObj - :<|> "pin" :> "add" :> Capture "arg" Text :> Get '[JSON] PinObj - :<|> "pin" :> "rm" :> Capture "arg" Text :> Get '[JSON] PinObj - :<|> "bootstrap" :> "add" :> QueryParam "arg" Text :> Get '[JSON] BootstrapObj - :<|> "bootstrap" :> "list" :> Get '[JSON] BootstrapObj - :<|> "bootstrap" :> "rm" :> QueryParam "arg" Text :> Get '[JSON] BootstrapObj - :<|> "stats" :> "bw" :> Get '[JSON] StatsBwObj - :<|> "stats" :> "repo" :> Get '[JSON] StatsRepoObj - :<|> "version" :> Get '[JSON] VersionObj - :<|> "id" :> Get '[JSON] IdObj - :<|> "id" :> Capture "arg" Text :> Get '[JSON] IdObj - :<|> "dns" :> Capture "arg" Text :> Get '[JSON] DnsObj - :<|> "pubsub" :> "ls" :> Get '[JSON] PubsubObj - :<|> "pubsub" :> "peers" :> Get '[JSON] PubsubObj - :<|> "pubsub" :> "pub" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent - :<|> "log" :> "ls" :> Get '[JSON] LogLsObj - :<|> "log" :> "level" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] LogLevelObj - :<|> "repo" :> "version" :> Get '[JSON] RepoVersionObj - :<|> "repo" :> "fsck" :> Get '[JSON] RepoFsckObj - :<|> "key" :> "gen" :> Capture "arg" Text :> QueryParam "type" Text :> Get '[JSON] KeyDetailsObj - :<|> "key" :> "list" :> Get '[JSON] KeyObj - :<|> "key" :> "rename" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] KeyRenameObj - :<|> "key" :> "rm" :> Capture "arg" Text :> Get '[JSON] KeyObj - :<|> "files" :> "chcid" :> QueryParam "arg" Text :> QueryParam "cid-version" Int :> Get '[JSON] NoContent - :<|> "files" :> "cp" :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent - :<|> "files" :> "flush" :> QueryParam "arg" Text :> Get '[JSON] FilesFlushObj - :<|> "files" :> "ls" :> QueryParam "arg" Text :> Get '[JSON] FilesLsObj - :<|> "files" :> "mkdir" :> QueryParam "arg" Text :> Get '[JSON] NoContent - :<|> "files" :> "mv" :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent - :<|> "files" :> "read" :> QueryParam "arg" Text :> Get '[IpfsText] FilesReadType - :<|> "files" :> "rm" :> QueryParam "arg" Text :> QueryParam "recursive" Bool :> Get '[JSON] NoContent - :<|> "files" :> "stat" :> QueryParam "arg" Text :> Get '[JSON] FilesStatObj - :<|> "shutdown" :> Get '[JSON] NoContent +import Network.Ipfs.Api.Types -ipfsApi :: Proxy IpfsApi -ipfsApi = Proxy +_ipfsApi :: Proxy IpfsApi +_ipfsApi = Proxy _cat :: Text -> ClientM CatReturnType _ls :: Text -> ClientM LsObj _get :: Text -> ClientM GetReturnType -_swarmPeers :: ClientM SwarmPeersObj -_swarmConnect :: Maybe Text -> ClientM SwarmObj -_swarmDisconnect :: Maybe Text -> ClientM SwarmObj -_swarmFilters :: ClientM SwarmObj -_swarmFilterAdd :: Maybe Text -> ClientM SwarmObj -_swarmFilterRm :: Maybe Text -> ClientM SwarmObj -_bitswapStat :: ClientM BitswapStatObj -_bitswapWL :: ClientM BitswapWLObj -_bitswapLedger :: Text -> ClientM BitswapLedgerObj -_bitswapReprovide :: ClientM ReprovideReturnType -_cidBases :: ClientM [CidBasesObj] -_cidCodecs :: ClientM [CidCodecsObj] -_cidHashes :: ClientM [CidHashesObj] -_cidBase32 :: Text -> ClientM CidObj +_swarmPeers :: ClientM SwarmPeersObj +_swarmConnect :: Maybe Text -> ClientM SwarmObj +_swarmDisconnect :: Maybe Text -> ClientM SwarmObj +_swarmFilters :: ClientM SwarmObj +_swarmFilterAdd :: Maybe Text -> ClientM SwarmObj +_swarmFilterRm :: Maybe Text -> ClientM SwarmObj +_bitswapStat :: ClientM BitswapStatObj +_bitswapWL :: ClientM BitswapWLObj +_bitswapLedger :: Text -> ClientM BitswapLedgerObj +_bitswapReprovide :: ClientM ReprovideReturnType +_cidBases :: ClientM [CidBasesObj] +_cidCodecs :: ClientM [CidCodecsObj] +_cidHashes :: ClientM [CidHashesObj] +_cidBase32 :: Text -> ClientM CidObj _cidFormat :: Text -> ClientM CidObj _blockGet :: Text -> ClientM BlockReturnType _blockStat :: Text -> ClientM BlockObj @@ -758,45 +56,45 @@ _objectDiff :: Text -> Maybe Text -> ClientM ObjectDiffObj _objectStat :: Text -> ClientM ObjectStatObj _pinAdd :: Text -> ClientM PinObj _pinRemove :: Text -> ClientM PinObj -_bootstrapAdd ::Maybe Text -> ClientM BootstrapObj -_bootstrapList :: ClientM BootstrapObj -_bootstrapRM :: Maybe Text -> ClientM BootstrapObj -_statsBw :: ClientM StatsBwObj -_statsRepo :: ClientM StatsRepoObj -_version :: ClientM VersionObj -_id :: ClientM IdObj -_idPeer :: Text -> ClientM IdObj -_dns :: Text -> ClientM DnsObj -_pubsubLs :: ClientM PubsubObj -_pubsubPeers :: ClientM PubsubObj -_pubsubPublish :: Text -> Maybe Text -> ClientM NoContent -_logLs :: ClientM LogLsObj +_bootstrapAdd :: Maybe Text -> ClientM BootstrapObj +_bootstrapList :: ClientM BootstrapObj +_bootstrapRM :: Maybe Text -> ClientM BootstrapObj +_statsBw :: ClientM StatsBwObj +_statsRepo :: ClientM StatsRepoObj +_version :: ClientM VersionObj +_id :: ClientM IdObj +_idPeer :: Text -> ClientM IdObj +_dns :: Text -> ClientM DnsObj +_pubsubLs :: ClientM PubsubObj +_pubsubPeers :: ClientM PubsubObj +_pubsubPublish :: Text -> Maybe Text -> ClientM NoContent +_logLs :: ClientM LogLsObj _logLevel :: Text -> Maybe Text -> ClientM LogLevelObj -_repoVersion :: ClientM RepoVersionObj -_repoFsck :: ClientM RepoFsckObj -_keyGen :: Text -> (Maybe Text) -> ClientM KeyDetailsObj -_keyList :: ClientM KeyObj -_keyRename :: Text -> (Maybe Text) -> ClientM KeyRenameObj -_keyRm :: Text -> ClientM KeyObj -_filesChcid :: Maybe Text -> Maybe Int -> ClientM NoContent -_filesCp :: Maybe Text -> Maybe Text -> ClientM NoContent +_repoVersion :: ClientM RepoVersionObj +_repoFsck :: ClientM RepoFsckObj +_keyGen :: Text -> (Maybe Text) -> ClientM KeyDetailsObj +_keyList :: ClientM KeyObj +_keyRename :: Text -> (Maybe Text) -> ClientM KeyRenameObj +_keyRm :: Text -> ClientM KeyObj +_filesChcid :: Maybe Text -> Maybe Int -> ClientM NoContent +_filesCp :: Maybe Text -> Maybe Text -> ClientM NoContent _filesFlush :: Maybe Text -> ClientM FilesFlushObj -_filesLs :: Maybe Text -> ClientM FilesLsObj -_filesMkdir :: Maybe Text -> ClientM NoContent -_filesMv :: Maybe Text -> Maybe Text -> ClientM NoContent -_filesRead :: Maybe Text -> ClientM FilesReadType -_filesRm :: Maybe Text -> Maybe Bool -> ClientM NoContent -_filesStat :: Maybe Text -> ClientM FilesStatObj -_shutdown :: ClientM NoContent +_filesLs :: Maybe Text -> ClientM FilesLsObj +_filesMkdir :: Maybe Text -> ClientM NoContent +_filesMv :: Maybe Text -> Maybe Text -> ClientM NoContent +_filesRead :: Maybe Text -> ClientM FilesReadType +_filesRm :: Maybe Text -> Maybe Bool -> ClientM NoContent +_filesStat :: Maybe Text -> ClientM FilesStatObj +_shutdown :: ClientM NoContent _cat :<|> _ls :<|> _get :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> - _swarmFilters :<|> _swarmFilterAdd :<|> _swarmFilterRm :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> - _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> - _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> - _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectRmLink :<|> + _swarmFilters :<|> _swarmFilterAdd :<|> _swarmFilterRm :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> + _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> + _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> + _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectRmLink :<|> _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> - _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _pubsubPublish :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> - _repoFsck :<|> _keyGen :<|> _keyList :<|> _keyRename :<|> _keyRm :<|> _filesChcid :<|> _filesCp :<|> - _filesFlush :<|> _filesLs :<|> _filesMkdir :<|> _filesMv :<|> _filesRead :<|> _filesRm :<|> _filesStat :<|> - _shutdown = client ipfsApi + _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _pubsubPublish :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> + _repoFsck :<|> _keyGen :<|> _keyList :<|> _keyRename :<|> _keyRm :<|> _filesChcid :<|> _filesCp :<|> + _filesFlush :<|> _filesLs :<|> _filesMkdir :<|> _filesMv :<|> _filesRead :<|> _filesRm :<|> _filesStat :<|> + _shutdown = client _ipfsApi diff --git a/src/Network/Ipfs/Api/Internal/Call.hs b/src/Network/Ipfs/Api/Internal/Call.hs new file mode 100644 index 00000000..1f947845 --- /dev/null +++ b/src/Network/Ipfs/Api/Internal/Call.hs @@ -0,0 +1,58 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeOperators #-} + +-- | +-- Module : Network.Ipfs.Api.Internal.Call +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Module containing IPFS API call functions. +-- + +module Network.Ipfs.Api.Internal.Call where + +import Control.Monad.Except +import Control.Monad.Reader +import Data.ByteString.Lazy (ByteString) +import Data.Text (Text, pack, unpack) +import Network.HTTP.Client as Net hiding (Proxy) +import Network.HTTP.Client.MultipartFormData +import Servant.Client +import qualified Servant.Client.Streaming as S +import Servant.Types.SourceT (SourceT (..), foreach) + +import Network.Ipfs.Client (IpfsT) + +-- | Regular Call function. +call :: MonadIO m => ClientM a -> IpfsT m a +call func = do + (manager', url, _) <- ask + resp <- liftIO (runClientM func (mkClientEnv manager' url)) + case resp of + Left l -> throwError l + Right r -> return r + +-- | Call function for ‘multipart/form-data’. +multipartCall :: MonadIO m => Text -> Text -> IpfsT m (Net.Response ByteString) +multipartCall funcUri filePath = do + (reqManager, _, url) <- ask + req <- liftIO $ parseRequest $ unpack (pack url <> "/" <> funcUri ) + liftIO $ flip httpLbs reqManager =<< formDataBody form req + where + form = [ partFileSource "file" $ unpack filePath ] + +-- | Call function for Streams. +streamCall :: (MonadIO m, Show a) => S.ClientM (SourceT IO a) -> m () +streamCall func = liftIO $ do + manager' <- newManager defaultManagerSettings + S.withClientM func (S.mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) $ \e -> case e of + Left err -> putStrLn $ "Error: " ++ show err + Right rs -> foreach fail print rs diff --git a/src/Network/Ipfs/Api/Internal/Stream.hs b/src/Network/Ipfs/Api/Internal/Stream.hs new file mode 100644 index 00000000..8295a565 --- /dev/null +++ b/src/Network/Ipfs/Api/Internal/Stream.hs @@ -0,0 +1,41 @@ +-- | +-- Module : Network.Ipfs.Api.Internal.Stream +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Ipfs Stream API provider. +-- + +module Network.Ipfs.Api.Internal.Stream where + +import qualified Data.ByteString.Lazy.Char8 () +import Data.Proxy +import Data.Text +import Network.HTTP.Client () +import Servant.API +import Servant.Client.Streaming as S + +import Network.Ipfs.Api.Types.Stream + +_ipfsStreamApi :: Proxy IpfsStreamApi +_ipfsStreamApi = Proxy + +_ping :: Text -> ClientM (SourceIO PingObj) +_dhtFindPeer :: Text -> ClientM (SourceIO DhtObj) +_dhtFindProvs :: Text -> ClientM (SourceIO DhtObj) +_dhtGet :: Text -> ClientM (SourceIO DhtObj) +_dhtProvide :: Text -> ClientM (SourceIO DhtObj) +_dhtQuery :: Text -> ClientM (SourceIO DhtObj) +_logTail :: ClientM (SourceIO LogReturnType) +_repoGc :: ClientM (SourceIO RepoGcObj) +_repoVerify :: ClientM (SourceIO RepoVerifyObj) +_refs :: Text -> ClientM (SourceIO RefsObj) +_refsLocal :: ClientM (SourceIO RefsObj) +_pubsubSubscribe :: Text -> ClientM (SourceIO PubsubSubObj) + +_ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery :<|> + _logTail :<|> _repoGc :<|> _repoVerify :<|> _refs :<|> _refsLocal :<|> _pubsubSubscribe = client _ipfsStreamApi diff --git a/src/Network/Ipfs/Api/Ipfs.hs b/src/Network/Ipfs/Api/Ipfs.hs deleted file mode 100644 index c1937c22..00000000 --- a/src/Network/Ipfs/Api/Ipfs.hs +++ /dev/null @@ -1,509 +0,0 @@ -{-# LANGUAGE BangPatterns #-} -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} - --- | --- Module : Network.Ipfs.Api.Ipfs --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Module containing Ipfs command functions. --- - -module Network.Ipfs.Api.Ipfs where - -import qualified Codec.Archive.Tar as Tar -import Control.Monad.Except -import Control.Monad.Reader -import Data.Aeson (decode) -import Data.Text -import Data.Text.Encoding -import Data.Base58String.Bitcoin (fromBytes, toText) -import qualified Data.ByteString as BS'(ByteString, foldr) -import qualified Data.ByteArray.Encoding as Enc(convertFromBase, Base(..)) -import qualified Data.ByteString.Lazy as BS (ByteString, fromStrict) -import Network.HTTP.Client as Net hiding (Proxy) -import Network.HTTP.Client.MultipartFormData -import Network.HTTP.Types (Status(..)) -import Numeric (showInt) -import Servant.Client -import Servant.Types.SourceT (SourceT(..), foreach) -import qualified Servant.Client.Streaming as S - -import qualified Network.Ipfs.Api.Api as Api -import Network.Ipfs.Api.Multipart (AddObj) -import Network.Ipfs.Api.Stream (_ping, _dhtFindPeer, _dhtFindProvs, _dhtGet, _dhtProvide, - _dhtQuery, _logTail, _repoGc, _repoVerify, _refs, _refsLocal, - _pubsubSubscribe, PubsubSubObj(..)) - -newtype IpfsT m a = IpfsT { unIpfs :: ReaderT (Manager, BaseUrl, String) (ExceptT ClientError m) a} - deriving ( Functor - , Applicative - , Monad - , MonadIO - , MonadReader (Manager, BaseUrl, String) - , MonadError ClientError - ) - -instance MonadTrans IpfsT where - lift = IpfsT . lift . lift - -type Ipfs a = IpfsT IO a - -------------------------------------------- Monad Runners --------------------------------------------------- - --- | 'IpfsT' monad runner. -runIpfs' :: BaseUrl -> Ipfs a -> IO () -runIpfs' url ipfs = do - manager' <- liftIO $ newManager defaultManagerSettings - ret <- runExceptT (runReaderT (unIpfs ipfs) (manager', url, showBaseUrl url)) - case ret of - Left err -> putStrLn $ "Error: " ++ show err - Right _ -> putStr "" - --- | 'IpfsT' monad runner with default arguments. -runIpfs :: Ipfs a -> IO () -runIpfs = runIpfs' (BaseUrl Http "localhost" 5001 "/api/v0") - - -------------------------------------------- Call functions --------------------------------------------------- - --- | Regular Call function. -call :: (ClientM a) -> Ipfs a -call func = do - (manager', url, _) <- ask - resp <- lift (runClientM func (mkClientEnv manager' url)) - case resp of - Left l -> throwError l - Right r -> pure r - --- | Call function for Streams. -streamCall :: Show a => S.ClientM (SourceT IO a) -> IO() -streamCall func = do - manager' <- newManager defaultManagerSettings - S.withClientM func (S.mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) $ \e -> case e of - Left err -> putStrLn $ "Error: " ++ show err - Right rs -> foreach fail print rs - --- | Call function for 'PubsubSubObj'. -pubsubCall :: S.ClientM (SourceT IO PubsubSubObj) -> IO() -pubsubCall func = do - manager' <- newManager defaultManagerSettings - S.withClientM func (S.mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) $ \e -> case e of - Left err -> putStrLn $ "Error: " ++ show err - Right rs -> foreach fail printPubsub rs - --- | Call function for ‘multipart/form-data’. -multipartCall :: Text -> Text -> Ipfs (Net.Response BS.ByteString) -multipartCall funcUri filePath = do - (reqManager, _, url) <- ask - req <- liftIO $ parseRequest $ unpack (( pack url ) <> (pack "/") <> funcUri ) - resp <- liftIO $ flip httpLbs reqManager =<< formDataBody form req - pure resp - - where form = [ partFileSource "file" $ unpack filePath ] - - -------------------------------------------- Print Functions --------------------------------------------------- - --- | Print function for the Base64 decoded 'PubsubSubObj'. -printPubsub :: PubsubSubObj -> IO () -printPubsub PubsubSubObj {mssgdata = mssg, from = sender, seqno = num, topicIDs = topic } = - print $ PubsubSubObj (fromB64 mssg) (fromB64toB58 sender) (fromB64' num) topic - where fromB64toB58 val = case Enc.convertFromBase Enc.Base64 (encodeUtf8 val) of - Left e -> pack $ "Invalid input: " ++ e - Right decoded -> toText $ fromBytes (decoded :: BS'.ByteString) - - fromB64 val = case Enc.convertFromBase Enc.Base64 (encodeUtf8 val) of - Left e -> pack $ "Invalid input: " ++ e - Right decoded -> decodeUtf8 (decoded :: BS'.ByteString) - - fromB64' val = case Enc.convertFromBase Enc.Base64 (encodeUtf8 val) of - Left e -> pack $ "Invalid input: " ++ e - Right decoded -> pack $ BS'.foldr showInt "" (decoded :: BS'.ByteString) - - -------------------------------------------- Ipfs functions --------------------------------------------------- - --- | Show IPFS object data. -cat :: Text -> Ipfs Api.CatReturnType -cat hash = call $ Api._cat hash - --- | Add a file or directory to ipfs. -add :: Text -> Ipfs (Maybe AddObj) -add filePath = do - responseVal <- ( multipartCall (pack "add") filePath ) - pure (decode (Net.responseBody responseVal) :: Maybe AddObj) - --- | List directory contents for Unix filesystem objects. -ls :: Text -> Ipfs Api.LsObj -ls hash = call $ Api._ls hash - --- | Download IPFS objects. -get :: Text -> Ipfs Text -get hash = do - ret <- call $ Api._get hash - do liftIO $ Tar.unpack "getResponseDirectory" . Tar.read $ BS.fromStrict $ encodeUtf8 ret - pure "The content has been stored in getResponseDirectory." - --- | List links (references) from an object. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -refs :: Text -> IO () -refs hash = streamCall $ _refs hash - --- | List all local references. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -refsLocal :: IO () -refsLocal = streamCall _refsLocal - --- | List peers with open connections. -swarmPeers :: Ipfs Api.SwarmPeersObj -swarmPeers = call Api._swarmPeers - --- | Open connection to a given address. 'peerId' has to be of the format - /ipfs/id -swarmConnect :: Text -> Ipfs Api.SwarmObj -swarmConnect peerId = call $ Api._swarmConnect (Just peerId) - - --- | Close connection to a given address. 'peerId' has to be of the format - /ipfs/id -swarmDisconnect :: Text -> Ipfs Api.SwarmObj -swarmDisconnect peerId = call $ Api._swarmDisconnect (Just peerId) - --- | Manipulate address filters. -swarmFilters :: Ipfs Api.SwarmObj -swarmFilters = call Api._swarmFilters - --- | Add an address filter. 'peerId' has to be of the format - /ip4/{IP addr of peer}/ipcidr/{ip network prefix} -swarmFilterAdd :: Text -> Ipfs Api.SwarmObj -swarmFilterAdd filterParam = call $ Api._swarmFilterAdd (Just filterParam) - --- | Remove an address filter. -swarmFilterRm :: Text -> Ipfs Api.SwarmObj -swarmFilterRm filterParam = call $ Api._swarmFilterRm (Just filterParam) - --- | 'Show some diagnostic information on the bitswap agent. -bitswapStat :: Ipfs Api.BitswapStatObj -bitswapStat = call Api._bitswapStat - --- | Show blocks currently on the wantlist. -bitswapWL :: Ipfs Api.BitswapWLObj -bitswapWL = call Api._bitswapWL - --- | Show the current ledger for a peer. -bitswapLedger :: Text -> Ipfs Api.BitswapLedgerObj -bitswapLedger peerId = call $ Api._bitswapLedger peerId - --- | Trigger reprovider. -bitswapReprovide :: Ipfs Api.ReprovideReturnType -bitswapReprovide = call $ Api._bitswapReprovide - --- | List available multibase encodings. -cidBases :: Ipfs [Api.CidBasesObj] -cidBases = call $ Api._cidBases - --- | List available CID codecs. -cidCodecs :: Ipfs [Api.CidCodecsObj] -cidCodecs = call $ Api._cidCodecs - --- | List available multihashes. -cidHashes :: Ipfs [Api.CidHashesObj] -cidHashes = call $ Api._cidHashes - --- | Convert CIDs to Base32 CID version 1. -cidBase32 :: Text -> Ipfs Api.CidObj -cidBase32 hash = call $ Api._cidBase32 hash - --- | Format and convert a CID in various useful ways. -cidFormat :: Text-> Ipfs Api.CidObj -cidFormat hash = call $ Api._cidFormat hash - --- | Get a raw IPFS block. -blockGet :: Text -> Ipfs Api.BlockReturnType -blockGet key = call $ Api._blockGet key - --- | Store input as an IPFS block. -blockPut :: Text -> Ipfs (Maybe Api.BlockObj) -blockPut filePath = do - responseVal <- multipartCall (pack "block/put") filePath - pure (decode (Net.responseBody responseVal) :: Maybe Api.BlockObj) - --- | Print information of a raw IPFS block. -blockStat :: Text -> Ipfs Api.BlockObj -blockStat key = call $ Api._blockStat key - --- | Get a dag node from ipfs. -dagGet :: Text -> Ipfs Api.DagReturnType -dagGet ref = call $ Api._dagGet ref - --- | Resolve ipld block. -dagResolve :: Text -> Ipfs Api.DagResolveObj -dagResolve ref = call $ Api._dagResolve ref - --- | Add a dag node to ipfs. -dagPut :: Text -> Ipfs (Maybe Api.DagPutObj) -dagPut filePath = do - responseVal <- multipartCall (pack "dag/put") filePath - pure (decode (Net.responseBody responseVal) :: Maybe Api.DagPutObj) - --- | Get ipfs config values. -configGet :: Text -> Ipfs Api.ConfigObj -configGet key = call $ Api._configGet key - --- | Set ipfs config values. -configSet :: Text -> Text -> Ipfs Api.ConfigObj -configSet key value = call $ Api._configSet key $ Just value - --- | Replace the config with the file at . -configReplace :: Text -> Ipfs (Maybe Text) -configReplace filePath = do - responseVal <- multipartCall (pack "config/replace") filePath - pure $ case statusCode $ Net.responseStatus responseVal of - 200 -> Just $ "Config File Replaced Successfully with status code - " <> (pack "200") - _ -> Just $ "Error occured with status code - " <> (pack $ show (statusCode $ Net.responseStatus responseVal)) - --- | Output the raw bytes of an IPFS object. -objectData :: Text -> Ipfs Api.ObjectReturnType -objectData key = call $ Api._objectData key - --- | Create a new object from an ipfs template. -objectNew :: Ipfs Api.ObjectObj -objectNew = call Api._objectNew - --- | Output the links pointed to by the specified object. -objectGetLinks :: Text -> Ipfs Api.ObjectLinksObj -objectGetLinks key = call $ Api._objectGetLinks key - --- | Add a Merkle-link to the given object and return the hash of the result. -objectAddLink :: Text -> Text -> Text -> Ipfs Api.ObjectLinksObj -objectAddLink hash name key = call $ Api._objectAddLink hash (Just name) (Just key) - --- | Remove a Merkle-link from the given object and return the hash of the result. -objectRmLink :: Text -> Text -> Ipfs Api.ObjectLinksObj -objectRmLink key name = call $ Api._objectRmLink key (Just name) - --- | Append data to what already exists in the data segment in the given object. -objectAppendData :: Text -> Text -> Ipfs (Maybe Api.ObjectLinksObj) -objectAppendData key filePath = do - responseVal <- multipartCall ( ( pack "object/patch/append-data?arg=" ) <> key) filePath - pure ( decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj ) - --- | Set the data field of an IPFS object. -objectSetData :: Text -> Text -> Ipfs (Maybe Api.ObjectLinksObj) -objectSetData key filePath = do - responseVal <- multipartCall ( ( pack "object/patch/set-data?arg=" ) <> key) filePath - pure ( decode ( Net.responseBody responseVal) :: Maybe Api.ObjectLinksObj ) - --- | Get and serialize the DAG node named by key. -objectGet :: Text -> Ipfs Api.ObjectGetObj -objectGet key = call $ Api._objectGet key - --- | 'Display the diff between two ipfs objects. -objectDiff :: Text -> Text -> Ipfs Api.ObjectDiffObj -objectDiff firstKey secondKey = call $ Api._objectDiff firstKey (Just secondKey) - --- | Store input as a DAG object, print its key. -objectPut :: Text -> Ipfs ( Maybe Api.ObjectObj ) -objectPut filePath = do - responseVal <- multipartCall (pack "object/put") filePath - pure (decode ( Net.responseBody responseVal) :: Maybe Api.ObjectObj) - - -- | Get stats for the DAG node named by key. -objectStat :: Text -> Ipfs Api.ObjectStatObj -objectStat key = call $ Api._objectStat key - --- | Pin objects to local storage. -pinAdd :: Text -> Ipfs Api.PinObj -pinAdd pinPath = call $ Api._pinAdd pinPath - --- | Remove pinned objects from local storage. -pinRemove :: Text -> Ipfs Api.PinObj -pinRemove pinPath = call $ Api._pinRemove pinPath - --- | Add peers to the bootstrap list. -bootstrapAdd :: Text -> Ipfs Api.BootstrapObj -bootstrapAdd peerId = call $ Api._bootstrapAdd (Just peerId) - --- | Show peers in the bootstrap list. -bootstrapList :: Ipfs Api.BootstrapObj -bootstrapList = call $ Api._bootstrapList - --- | Remove peers from the bootstrap list. -bootstrapRM :: Text -> Ipfs Api.BootstrapObj -bootstrapRM peerId = call $ Api._bootstrapRM (Just peerId) - --- | Print ipfs bandwidth information. -statsBw :: Ipfs Api.StatsBwObj -statsBw = call Api._statsBw - --- | Get stats for the currently used repo. -statsRepo :: Ipfs Api.StatsRepoObj -statsRepo = call $ Api._statsRepo - --- | Show ipfs version information. -version :: Ipfs Api.VersionObj -version = call $ Api._version - --- | Show ipfs node id info. -id :: Ipfs Api.IdObj -id = call Api._id - --- | Show ipfs node id info of the given peerId. -idPeer :: Text -> Ipfs Api.IdObj -idPeer peerId = call $ Api._idPeer peerId - --- | Resolve DNS links. -dns :: Text -> Ipfs Api.DnsObj -dns name = call $ Api._dns name - --- | Send echo request packets to IPFS hosts. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -ping :: Text -> IO () -ping cid = streamCall $ _ping cid - --- | Find the multiaddresses associated with the given peerId. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -dhtFindPeer :: Text -> IO () -dhtFindPeer peerId = streamCall $ _dhtFindPeer peerId - --- | Find peers that can provide a specific value, given a key. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -dhtFindProvs :: Text -> IO () -dhtFindProvs cid = streamCall $ _dhtFindProvs cid - --- | 'Given a key, query the routing system for its best value. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -dhtGet :: Text -> IO () -dhtGet cid = streamCall $ _dhtGet cid - --- | 'Announce to the network that you are providing given values. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -dhtProvide :: Text -> IO () -dhtProvide cid = streamCall $ _dhtProvide cid - --- | Find the closest Peer IDs to a given peerID by querying the DHT. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -dhtQuery :: Text -> IO () -dhtQuery peerId = streamCall $ _dhtQuery peerId - --- | List subscribed topics by name. -pubsubLs :: Ipfs Api.PubsubObj -pubsubLs = call Api._pubsubLs - --- | List peers we are currently pubsubbing with. -pubsubPeers :: Ipfs Api.PubsubObj -pubsubPeers = call Api._pubsubPeers ---} --- | Publish a message to a given pubsub topic. -pubsubPublish :: Text -> Text -> Ipfs Text -pubsubPublish topic mssg = do - call $ Api._pubsubPublish topic $ Just mssg - pure "The given message has been published." - --- | Subscribe to messages on a given topic. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -pubsubSubscribe :: Text -> IO () -pubsubSubscribe topic = pubsubCall $ _pubsubSubscribe topic - --- | List the logging subsystems. -logLs :: Ipfs Api.LogLsObj -logLs = call Api._logLs - --- | Change the logging level. -logLevel :: Text -> Text -> Ipfs Api.LogLevelObj -logLevel subsystem level = call $ Api._logLevel subsystem $ Just level - --- | Read the event log. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -logTail :: IO () -logTail = streamCall _logTail - --- | Show the repo version. -repoVersion :: Ipfs Api.RepoVersionObj -repoVersion = call Api._repoVersion - --- | Remove repo lockfiles. -repoFsck :: Ipfs Api.RepoFsckObj -repoFsck = call Api._repoFsck - --- | Perform a garbage collection sweep on the repo. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -repoGc :: IO () -repoGc = streamCall _repoGc - --- | Verify all blocks in repo are not corrupted. Stream function, returns IO(), use liftIO while passing to 'runIpfs' or 'runIpfs''. -repoVerify :: IO () -repoVerify = streamCall _repoVerify - --- | 'List all local keypairs. -keyList :: Ipfs Api.KeyObj -keyList = call Api._keyList - --- | Create a new keypair. -keyGen :: Text -> Text -> Ipfs Api.KeyDetailsObj -keyGen name keyType = call $ Api._keyGen name (Just keyType) - --- | Rename a keypair. -keyRename :: Text -> Text -> Ipfs Api.KeyRenameObj -keyRename was now = call $ Api._keyRename was $ Just now - --- | Remove a keypair. -keyRm :: Text -> Ipfs Api.KeyObj -keyRm name = call $ Api._keyRm name - --- | Change the cid version or hash function of the root node of a given mfsPath. -filesChcidVer :: Text -> Int -> Ipfs Text -filesChcidVer mfsPath cidVersion = do - call $ Api._filesChcid (Just mfsPath) (Just cidVersion) - pure "The directory's cid version has been changed." - --- | Copy files into mfs. -filesCp :: Text -> Text -> Ipfs Text -filesCp src dest = do - call $ Api._filesCp (Just src) (Just dest) - pure "The object has been copied to the specified destination" - --- | Flush a given path's data to disk. -filesFlush ::Text -> Ipfs Api.FilesFlushObj -filesFlush mfsPath = call $ Api._filesFlush $ Just mfsPath - --- | List directories in the local mutable namespace. -filesLs :: Text -> Ipfs Api.FilesLsObj -filesLs mfsPath = call $ Api._filesLs $ Just mfsPath - --- | Make directories. -filesMkdir :: Text -> Ipfs Text -filesMkdir mfsPath = do - call $ Api._filesMkdir $ Just mfsPath - pure "The Directory has been created on the specified path." - --- | Move files. -filesMv :: Text -> Text -> Ipfs Text -filesMv src dest = do - call $ Api._filesMv (Just src) (Just dest) - pure "The object has been moved to the specified destination" - --- | Read a file in a given mfs. -filesRead :: Text -> Ipfs Api.FilesReadType -filesRead mfsPath = call $ Api._filesRead $ Just mfsPath - --- | Display file status. -filesStat :: Text -> Ipfs Api.FilesStatObj -filesStat mfsPath = call $ Api._filesStat $ Just mfsPath - --- | Remove a file. -filesRm :: Text -> Ipfs Text -filesRm mfsPath = do - call $ Api._filesRm (Just mfsPath) (Just True) - pure "The object has been removed." - --- | Write to a mutable file in a given filesystem. -filesWrite :: Text -> Text -> Bool -> Ipfs (Maybe Text) -filesWrite mfsPath filePath toTruncate = do - responseVal <- multipartCall ((pack "files/write?arg=") - <> mfsPath <> (pack "&create=true") <> (pack "&truncate=") <> (pack $ show toTruncate) ) filePath - pure $ case statusCode $ Net.responseStatus responseVal of - 200 -> Just $ "File has been written Successfully with status code - " <> (pack "200") - _ -> Just $ "Error occured with status code - " <> (pack $ show (statusCode $ Net.responseStatus responseVal)) - --- | Shut down the ipfs daemon. -shutdown :: Ipfs Text -shutdown = do - call $ Api._shutdown - pure "The daemon has been shutdown, your welcome." diff --git a/src/Network/Ipfs/Api/Key.hs b/src/Network/Ipfs/Api/Key.hs new file mode 100644 index 00000000..15e63b76 --- /dev/null +++ b/src/Network/Ipfs/Api/Key.hs @@ -0,0 +1,48 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeOperators #-} + +-- | +-- Module : Network.Ipfs.Api.Key +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `key` prefix. +-- + +module Network.Ipfs.Api.Key where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text) + +import Network.Ipfs.Api.Internal (_keyGen, _keyList, _keyRename, + _keyRm) +import Network.Ipfs.Api.Internal.Call (call) +import Network.Ipfs.Api.Types (KeyDetailsObj, KeyObj, + KeyRenameObj) +import Network.Ipfs.Client (IpfsT) + + +-- | 'List all local keypairs. +list :: MonadIO m => IpfsT m KeyObj +list = call _keyList + +-- | Create a new keypair. +gen :: MonadIO m => Text -> Text -> IpfsT m KeyDetailsObj +gen name = call . _keyGen name . Just + +-- | Rename a keypair. +rename :: MonadIO m => Text -> Text -> IpfsT m KeyRenameObj +rename was = call . _keyRename was . Just + +-- | Remove a keypair. +rm :: MonadIO m => Text -> IpfsT m KeyObj +rm = call . _keyRm + diff --git a/src/Network/Ipfs/Api/Log.hs b/src/Network/Ipfs/Api/Log.hs new file mode 100644 index 00000000..c0a766e9 --- /dev/null +++ b/src/Network/Ipfs/Api/Log.hs @@ -0,0 +1,42 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeOperators #-} + +-- | +-- Module : Network.Ipfs.Api.Log +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `log` prefix. +-- + +module Network.Ipfs.Api.Log where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text) + +import Network.Ipfs.Api.Internal (_logLevel, _logLs) +import Network.Ipfs.Api.Internal.Call (call, streamCall) +import Network.Ipfs.Api.Internal.Stream (_logTail) +import Network.Ipfs.Api.Types (LogLevelObj, LogLsObj) +import Network.Ipfs.Client (IpfsT) + + +-- | Change the logging level. +level :: MonadIO m => Text -> Text -> IpfsT m LogLevelObj +level subsystem = call . _logLevel subsystem . Just + +-- | Read the event log. +tail :: MonadIO m => m () +tail = streamCall _logTail + +-- | List the logging subsystems. +ls :: MonadIO m => IpfsT m LogLsObj +ls = call _logLs diff --git a/src/Network/Ipfs/Api/Multipart.hs b/src/Network/Ipfs/Api/Multipart.hs deleted file mode 100644 index 04a07ef2..00000000 --- a/src/Network/Ipfs/Api/Multipart.hs +++ /dev/null @@ -1,35 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Network.Ipfs.Api.Multipart --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : portable --- --- Multipart datatypes provider. --- - -module Network.Ipfs.Api.Multipart where - -import Control.Monad -import Data.Aeson (FromJSON (..), Value(Object), (.:)) -import Data.Text - -data AddObj = AddObj - { name :: Text - , hash :: Text - , size :: Text - } deriving (Show, Eq) - -instance FromJSON AddObj where - parseJSON (Object o) = - AddObj <$> o .: "Name" - <*> o .: "Hash" - <*> o .: "Size" - - parseJSON _ = mzero diff --git a/src/Network/Ipfs/Api/Object.hs b/src/Network/Ipfs/Api/Object.hs new file mode 100644 index 00000000..8f6cddce --- /dev/null +++ b/src/Network/Ipfs/Api/Object.hs @@ -0,0 +1,81 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ipfs.Api.Object +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `object` prefix. +-- + +module Network.Ipfs.Api.Object where + +import Control.Monad.IO.Class (MonadIO) +import Data.Aeson (decode) +import Data.Text (Text) +import Network.HTTP.Client (responseBody) + +import Network.Ipfs.Api.Internal (_objectAddLink, _objectData, + _objectDiff, _objectGet, + _objectGetLinks, _objectNew, + _objectRmLink, _objectStat) +import Network.Ipfs.Api.Internal.Call (call, multipartCall) +import Network.Ipfs.Api.Types (ObjectDiffObj, ObjectGetObj, + ObjectLinksObj, ObjectObj, + ObjectReturnType, + ObjectStatObj) +import Network.Ipfs.Client (IpfsT) + +-- | Output the raw bytes of an IPFS object. +object :: MonadIO m => Text -> IpfsT m ObjectReturnType +object = call . _objectData + +-- | Create a new object from an ipfs template. +new :: MonadIO m => IpfsT m ObjectObj +new = call _objectNew + +-- | Output the links pointed to by the specified object. +getLinks :: MonadIO m => Text -> IpfsT m ObjectLinksObj +getLinks = call . _objectGetLinks + +-- | Add a Merkle-link to the given object and return the hash of the result. +addLink :: MonadIO m => Text -> Text -> Text -> IpfsT m ObjectLinksObj +addLink hash name = call . _objectAddLink hash (Just name) . Just + +-- | Remove a Merkle-link from the given object and return the hash of the result. +rmLink :: MonadIO m => Text -> Text -> IpfsT m ObjectLinksObj +rmLink key = call . _objectRmLink key . Just + +-- | Append data to what already exists in the data segment in the given object. +appendData :: MonadIO m => Text -> Text -> IpfsT m (Maybe ObjectLinksObj) +appendData key = fmap decodeResponse . multipartCall ("object/patch/append-data?arg=" <> key) + where + decodeResponse = decode . responseBody + +-- | Set the data field of an IPFS object. +setData :: MonadIO m => Text -> Text -> IpfsT m (Maybe ObjectLinksObj) +setData key = fmap decodeResponse . multipartCall ("object/patch/set-data?arg=" <> key) + where + decodeResponse = decode . responseBody + +-- | Get and serialize the DAG node named by key. +get :: MonadIO m => Text -> IpfsT m ObjectGetObj +get = call . _objectGet + +-- | 'Display the diff between two ipfs objects. +diff :: MonadIO m => Text -> Text -> IpfsT m ObjectDiffObj +diff firstKey = call . _objectDiff firstKey . Just + +-- | Store input as a DAG object, print its key. +put :: MonadIO m => Text -> IpfsT m (Maybe ObjectObj) +put = fmap decodeResponse . multipartCall "object/put" + where + decodeResponse = decode . responseBody + +-- | Get stats for the DAG node named by key. +objectStat :: MonadIO m => Text -> IpfsT m ObjectStatObj +objectStat = call . _objectStat diff --git a/src/Network/Ipfs/Api/Pin.hs b/src/Network/Ipfs/Api/Pin.hs new file mode 100644 index 00000000..7011062b --- /dev/null +++ b/src/Network/Ipfs/Api/Pin.hs @@ -0,0 +1,29 @@ +-- | +-- Module : Network.Ipfs.Api.Pin +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `pin` prefix. +-- + +module Network.Ipfs.Api.Pin where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text) + +import Network.Ipfs.Api.Internal (_pinAdd, _pinRemove) +import Network.Ipfs.Api.Internal.Call (call) +import Network.Ipfs.Api.Types (PinObj) +import Network.Ipfs.Client (IpfsT) + +-- | Pin objects to local storage. +add :: MonadIO m => Text -> IpfsT m PinObj +add = call . _pinAdd + +-- | Remove pinned objects from local storage. +remove :: MonadIO m => Text -> IpfsT m PinObj +remove = call . _pinRemove diff --git a/src/Network/Ipfs/Api/Pubsub.hs b/src/Network/Ipfs/Api/Pubsub.hs new file mode 100644 index 00000000..18d76bda --- /dev/null +++ b/src/Network/Ipfs/Api/Pubsub.hs @@ -0,0 +1,39 @@ +-- | +-- Module : Network.Ipfs.Api.Pubsub +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `pubsub` prefix. +-- + +module Network.Ipfs.Api.Pubsub where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text) +import Servant.API.ContentTypes (NoContent) + +import Network.Ipfs.Api.Internal (_pubsubLs, _pubsubPeers, + _pubsubPublish) +import Network.Ipfs.Api.Internal.Call (call) +import Network.Ipfs.Api.Types (PubsubObj) +import Network.Ipfs.Client (IpfsT) + +-- | List subscribed topics by name. +ls :: MonadIO m => IpfsT m PubsubObj +ls = call _pubsubLs + +-- | List peers we are currently pubsubbing with. +peers :: MonadIO m => IpfsT m PubsubObj +peers = call _pubsubPeers + +-- | Publish a message to a given pubsub topic. +publish :: MonadIO m => Text -> Text -> IpfsT m NoContent +publish topic = call . _pubsubPublish topic . Just + +-- | Subscribe to messages on a given topic. +--subscribe :: Text -> m () +--subscribe = pubsubCall . _pubsubSubscribe diff --git a/src/Network/Ipfs/Api/Repo.hs b/src/Network/Ipfs/Api/Repo.hs new file mode 100644 index 00000000..4a9a0a18 --- /dev/null +++ b/src/Network/Ipfs/Api/Repo.hs @@ -0,0 +1,37 @@ +-- | +-- Module : Network.Ipfs.Api.Repo +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `repo` prefix. +-- + +module Network.Ipfs.Api.Repo where + +import Control.Monad.IO.Class (MonadIO) + +import Network.Ipfs.Api.Internal (_repoFsck, _repoVersion) +import Network.Ipfs.Api.Internal.Call (call, streamCall) +import Network.Ipfs.Api.Internal.Stream (_repoGc, _repoVerify) +import Network.Ipfs.Api.Types (RepoFsckObj, RepoVersionObj) +import Network.Ipfs.Client (IpfsT) + +-- | Show the repo version. +version :: MonadIO m => IpfsT m RepoVersionObj +version = call _repoVersion + +-- | Remove repo lockfiles. +fsck :: MonadIO m => IpfsT m RepoFsckObj +fsck = call _repoFsck + +-- | Perform a garbage collection sweep on the repo. +gc :: MonadIO m => m () +gc = streamCall _repoGc + +-- | Verify all blocks in repo are not corrupted. +repoVerify :: MonadIO m => m () +repoVerify = streamCall _repoVerify diff --git a/src/Network/Ipfs/Api/Stats.hs b/src/Network/Ipfs/Api/Stats.hs new file mode 100644 index 00000000..1d70f277 --- /dev/null +++ b/src/Network/Ipfs/Api/Stats.hs @@ -0,0 +1,28 @@ +-- | +-- Module : Network.Ipfs.Api.Stats +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `stats` prefix. +-- + +module Network.Ipfs.Api.Stats where + +import Control.Monad.IO.Class (MonadIO) + +import Network.Ipfs.Api.Internal (_statsBw, _statsRepo) +import Network.Ipfs.Api.Internal.Call (call) +import Network.Ipfs.Api.Types (StatsBwObj, StatsRepoObj) +import Network.Ipfs.Client (IpfsT) + +-- | IPFS bandwidth information. +bw :: MonadIO m => IpfsT m StatsBwObj +bw = call _statsBw + +-- | Get stats for the currently used repo. +repo :: MonadIO m => IpfsT m StatsRepoObj +repo = call _statsRepo diff --git a/src/Network/Ipfs/Api/Swarm.hs b/src/Network/Ipfs/Api/Swarm.hs new file mode 100644 index 00000000..8fd8a6b3 --- /dev/null +++ b/src/Network/Ipfs/Api/Swarm.hs @@ -0,0 +1,49 @@ +-- | +-- Module : Network.Ipfs.Api.Swarm +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- Api calls with `swarm` prefix. +-- + +module Network.Ipfs.Api.Swarm where + +import Control.Monad.IO.Class (MonadIO) +import Data.Text (Text) + +import Network.Ipfs.Api.Internal (_swarmConnect, + _swarmDisconnect, + _swarmFilterAdd, + _swarmFilterRm, _swarmFilters, + _swarmPeers) +import Network.Ipfs.Api.Internal.Call (call) +import Network.Ipfs.Api.Types (SwarmObj, SwarmPeersObj) +import Network.Ipfs.Client (IpfsT) + +-- | List peers with open connections. +swarmPeers :: MonadIO m => IpfsT m SwarmPeersObj +swarmPeers = call _swarmPeers + +-- | Open connection to a given address. 'peerId' has to be of the format - /ipfs/id +connect :: MonadIO m => Text -> IpfsT m SwarmObj +connect = call . _swarmConnect . Just + +-- | Close connection to a given address. 'peerId' has to be of the format - /ipfs/id +disconnect :: MonadIO m => Text -> IpfsT m SwarmObj +disconnect = call . _swarmDisconnect . Just + +-- | Manipulate address filters. +filters :: MonadIO m => IpfsT m SwarmObj +filters = call _swarmFilters + +-- | Add an address filter. 'peerId' has to be of the format - /ip4/{IP addr of peer}/ipcidr/{ip network prefix} +filterAdd :: MonadIO m => Text -> IpfsT m SwarmObj +filterAdd = call . _swarmFilterAdd . Just + +-- | Remove an address filter. +filterRm :: MonadIO m => Text -> IpfsT m SwarmObj +filterRm = call . _swarmFilterRm . Just diff --git a/src/Network/Ipfs/Api/Types.hs b/src/Network/Ipfs/Api/Types.hs new file mode 100644 index 00000000..d91ea44a --- /dev/null +++ b/src/Network/Ipfs/Api/Types.hs @@ -0,0 +1,823 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeOperators #-} + +-- | +-- Module : Network.Ipfs.Api.Types +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- IPFS API types. +-- + +module Network.Ipfs.Api.Types where + +import Control.Arrow (left) +import Control.Monad +import Data.Aeson +import Data.ByteString.Lazy (toStrict) +import qualified Data.ByteString.Lazy.Char8 () +import qualified Data.HashMap.Strict as H +import Data.Int +import Data.Text (Text) +import qualified Data.Text.Encoding as TextS +import Data.Typeable +import Network.HTTP.Client () +import qualified Network.HTTP.Media as M ((//)) +import Servant.API + +type CatReturnType = Text +type ReprovideReturnType = Text +type GetReturnType = Text +type BlockReturnType = Text +type DagReturnType = Text +type ObjectReturnType = Text +type FilesReadType = Text + +data DirLink = DirLink + { dlName :: Text + , dlHash :: Text + , dlSize :: Int64 + , dlContentType :: Int + , dlTarget :: Text + } + deriving (Show, Eq) + +data DirObj = DirObj + { dirHash :: Text + , links :: [DirLink] + } + deriving (Show, Eq) + +data AddObj = AddObj + { name :: Text + , hash :: Text + , size :: Text + } + deriving (Show, Eq) + +instance FromJSON AddObj where + parseJSON (Object o) = + AddObj <$> o .: "Name" + <*> o .: "Hash" + <*> o .: "Size" + + parseJSON _ = mzero + +data LsObj = LsObj + { objs :: [DirObj] + } + deriving (Show, Eq) + +data SwarmStreamObj = SwarmStreamObj + { protocol :: Text + } + deriving (Show, Eq) + +data SwarmPeerObj = SwarmPeerObj + { address :: Text + , direction :: Int + , latency :: Text + , muxer :: Text + , peer :: Text + , streams :: Maybe [SwarmStreamObj] + } + deriving (Show, Eq) + +data SwarmPeersObj = SwarmPeersObj + { peers :: [SwarmPeerObj] + } + deriving (Show, Eq) + +data SwarmObj = SwarmObj + { strings :: [Text] + } + deriving (Show, Eq) + +data WantlistObj = WantlistObj + { forSlash :: Text + } + deriving (Show, Eq) + +data BitswapStatObj = BitswapStatObj + { blocksReceived :: Int64 + , blocksSent :: Int64 + , dataReceived :: Int64 + , dataSent :: Int64 + , dupBlksReceived :: Int64 + , dupDataReceived :: Int64 + , messagesReceived :: Int64 + , bitswapPeers :: [Text] + , provideBufLen :: Int + , wantlist :: [WantlistObj] + } + deriving (Show, Eq) + +data BitswapWLObj = BitswapWLObj + { bitswapKeys :: [WantlistObj] + } + deriving (Show, Eq) + +data BitswapLedgerObj = BitswapLedgerObj + { exchanged :: Int64 + , ledgerPeer :: Text + , recv :: Int64 + , sent :: Int64 + , value :: Double + } + deriving (Show, Eq) + +data CidBasesObj = CidBasesObj + { baseCode :: Int + , baseName :: Text + } + deriving (Show, Eq) + +data CidCodecsObj = CidCodecsObj + { codecCode :: Int + , codecName :: Text + } + deriving (Show, Eq) + +data CidHashesObj = CidHashesObj + { multihashCode :: Int + , multihashName :: Text + } + deriving (Show, Eq) + +data CidObj = CidObj + { cidStr :: Text + , errorMsg :: Text + , formatted :: Text + } + deriving (Show, Eq) + +data BlockObj = BlockObj + { key :: Text + , blockSize :: Int + } + deriving (Show, Eq) + +data DagCidObj = DagCidObj + { cidSlash :: Text + } + deriving (Show, Eq) + +data DagResolveObj = DagResolveObj + { cid :: DagCidObj + , remPath :: Text + } + deriving (Show, Eq) + +data DagPutObj = DagPutObj + { putCid :: DagCidObj + } + deriving (Show, Eq) + +data ConfigObj = ConfigObj + { configKey :: Text + , configValue :: Text + } + deriving (Show, Eq) + +data ObjectLinkObj = ObjectLinkObj + { linkHash :: Text + , linkName :: Text + , linkSize :: Int64 + } + deriving (Show, Eq) + +data ObjectObj = ObjectObj + { newObjectHash :: Text + } + deriving (Show, Eq) + +data ObjectLinksObj = WithLinks + { objectHash :: Text + , objectLinks :: [ObjectLinkObj] + } + | WithoutLinks + { objectHash :: Text + } + deriving (Show, Eq) + +data ObjectGetObj = ObjectGetObj + { objectName :: Text + , objectGetLinks :: [ObjectLinkObj] + } + deriving (Show, Eq) + +data ObjectStatObj = ObjectStatObj + { objBlockSize :: Int + , cumulativeSize :: Int + , dataSize :: Int + , objHash :: Text + , linksSize :: Int + , numLinks :: Int + } + deriving (Show, Eq) + +data DiffObj = DiffObj + { diffSlash :: Text + } + deriving (Show, Eq) + +data ObjectChangeObj = ObjectChangeObj + { after :: Maybe DiffObj + , before :: DiffObj + , path :: Text + , diffType :: Int + } + deriving (Show, Eq) + +data ObjectDiffObj = ObjectDiffObj + { changes :: [ObjectChangeObj] + } + deriving (Show, Eq) + +data PinObj = WithoutProgress + { pins :: [Text] + } + | WithProgress + { pins :: [Text] + , progress :: Int + } + deriving (Show, Eq) + +data BootstrapObj = BootstrapObj + { bootstrapPeers :: [Text] + } + deriving (Show, Eq) + +data StatsBwObj = StatsBwObj + { rateIn :: Double + , rateOut :: Double + , totalIn :: Int64 + , totalOut :: Int64 + } + deriving (Show, Eq) + +data StatsRepoObj = StatsRepoObj + { numObjects :: Int64 + , repoPath :: Text + , repoSize :: Int64 + , storageMax :: Int64 + , repoVersion :: Text + } + deriving (Show, Eq) + +data VersionObj = VersionObj + { commit :: Text + , golang :: Text + , repo :: Text + , system :: Text + , version :: Text + } + deriving (Show, Eq) + +data IdObj = IdObj + { addresses :: [Text] + , agentVersion :: Text + , id :: Text + , protocolVersion :: Text + , publicKey :: Text + } + deriving (Show, Eq) + +data DnsObj = DnsObj + { dnsPath :: Text + } + deriving (Show, Eq) + +data PubsubObj = PubsubObj + { pubsubStrings :: [Text] + } + deriving (Show, Eq) + +data LogLsObj = LogLsObj + { logLsStrings :: [Text] + } + deriving (Show, Eq) + +data LogLevelObj = LogLevelObj + { message :: Text + } + deriving (Show, Eq) + +data RepoVersionObj = RepoVersionObj + { repoVer :: Text + } + deriving (Show, Eq) + +data RepoFsckObj = RepoFsckObj + { repoMessage :: Text + } + deriving (Show, Eq) + +data KeyDetailsObj = KeyDetailsObj + { keyId :: Text + , keyName :: Text + } + deriving (Show, Eq) + +data KeyObj = KeyObj + { keys :: [KeyDetailsObj] + } + deriving (Show, Eq) + +data KeyRenameObj = KeyRenameObj + { peerId :: Text + , now :: Text + , overwrite :: Bool + , was :: Text + } + deriving (Show, Eq) + +data FilesStatObj = FilesStatObj + { fileObjectHash :: Text + , objectSize :: Int + , cumulativeObjectSize :: Int + , blocks :: Int + , objectType :: Text + } + deriving (Show, Eq) + +data FilesEntryObj = FilesEntryObj + { entryName :: Text + , entryType :: Int + , entrySize :: Int + , entryHash :: Text + } + deriving (Show, Eq) + +data FilesLsObj = FilesLsObj + { enteries :: [FilesEntryObj] + } + deriving (Show, Eq) + +data FilesFlushObj = FilesFlushObj + { fileCid :: Text + } + deriving (Show, Eq) + +instance FromJSON DirLink where + parseJSON (Object o) = + DirLink <$> o .: "Name" + <*> o .: "Hash" + <*> o .: "Size" + <*> o .: "Type" + <*> o .: "Target" + + parseJSON _ = mzero + +instance FromJSON DirObj where + parseJSON (Object o) = + DirObj <$> o .: "Hash" + <*> o .: "Links" + + parseJSON _ = mzero + +instance FromJSON LsObj where + parseJSON (Object o) = + LsObj <$> o .: "Objects" + + parseJSON _ = mzero + + +instance FromJSON SwarmStreamObj where + parseJSON (Object o) = + SwarmStreamObj <$> o .: "Protocol" + + parseJSON _ = mzero + +instance FromJSON SwarmPeerObj where + parseJSON (Object o) = + SwarmPeerObj <$> o .: "Addr" + <*> o .: "Direction" + <*> o .: "Latency" + <*> o .: "Muxer" + <*> o .: "Peer" + <*> o .: "Streams" + + parseJSON _ = mzero + +instance FromJSON SwarmPeersObj where + parseJSON (Object o) = + SwarmPeersObj <$> o .: "Peers" + + parseJSON _ = mzero + + +instance FromJSON SwarmObj where + parseJSON (Object o) = + SwarmObj <$> o .: "Strings" + + parseJSON _ = mzero + +instance FromJSON WantlistObj where + parseJSON (Object o) = + WantlistObj <$> o .: "/" + + parseJSON _ = mzero + +instance FromJSON BitswapStatObj where + parseJSON (Object o) = + BitswapStatObj <$> o .: "BlocksReceived" + <*> o .: "BlocksSent" + <*> o .: "DataReceived" + <*> o .: "DataSent" + <*> o .: "DupBlksReceived" + <*> o .: "DupDataReceived" + <*> o .: "MessagesReceived" + <*> o .: "Peers" + <*> o .: "ProvideBufLen" + <*> o .: "Wantlist" + + parseJSON _ = mzero + + +instance FromJSON BitswapWLObj where + parseJSON (Object o) = + BitswapWLObj <$> o .: "Keys" + + parseJSON _ = mzero + +instance FromJSON BitswapLedgerObj where + parseJSON (Object o) = + BitswapLedgerObj <$> o .: "Exchanged" + <*> o .: "Peer" + <*> o .: "Recv" + <*> o .: "Sent" + <*> o .: "Value" + + parseJSON _ = mzero + +instance FromJSON CidBasesObj where + parseJSON (Object o) = + CidBasesObj <$> o .: "Code" + <*> o .: "Name" + + parseJSON _ = mzero + +instance FromJSON CidCodecsObj where + parseJSON (Object o) = + CidCodecsObj <$> o .: "Code" + <*> o .: "Name" + + parseJSON _ = mzero + +instance FromJSON CidHashesObj where + parseJSON (Object o) = + CidHashesObj <$> o .: "Code" + <*> o .: "Name" + + parseJSON _ = mzero + +instance FromJSON CidObj where + parseJSON (Object o) = + CidObj <$> o .: "CidStr" + <*> o .: "ErrorMsg" + <*> o .: "Formatted" + + parseJSON _ = mzero + +instance FromJSON BlockObj where + parseJSON (Object o) = + BlockObj <$> o .: "Key" + <*> o .: "Size" + + parseJSON _ = mzero + +instance FromJSON DagCidObj where + parseJSON (Object o) = + DagCidObj <$> o .: "/" + + parseJSON _ = mzero + +instance FromJSON DagResolveObj where + parseJSON (Object o) = + DagResolveObj <$> o .: "Cid" + <*> o .: "RemPath" + + parseJSON _ = mzero + +instance FromJSON DagPutObj where + parseJSON (Object o) = + DagPutObj <$> o .: "Cid" + + parseJSON _ = mzero + +instance FromJSON ConfigObj where + parseJSON (Object o) = + ConfigObj <$> o .: "Key" + <*> o .: "Value" + + parseJSON _ = mzero + +instance FromJSON ObjectLinkObj where + parseJSON (Object o) = + ObjectLinkObj <$> o .: "Hash" + <*> o .: "Name" + <*> o .: "Size" + + parseJSON _ = mzero + +instance FromJSON ObjectObj where + parseJSON (Object o) = + ObjectObj <$> o .: "Hash" + + parseJSON _ = mzero + +instance FromJSON ObjectLinksObj where + parseJSON (Object v) = + case H.lookup "Links" v of + Just (_) -> WithLinks <$> v .: "Hash" + <*> v .: "Links" + + Nothing -> + case H.lookup "Hash" v of + Just (_) -> WithoutLinks <$> v .: "Hash" + Nothing -> mzero + + parseJSON _ = mzero + +instance FromJSON ObjectGetObj where + parseJSON (Object o) = + ObjectGetObj <$> o .: "Data" + <*> o .: "Links" + + parseJSON _ = mzero + +instance FromJSON ObjectStatObj where + parseJSON (Object o) = + ObjectStatObj <$> o .: "BlockSize" + <*> o .: "CumulativeSize" + <*> o .: "DataSize" + <*> o .: "Hash" + <*> o .: "LinksSize" + <*> o .: "NumLinks" + + parseJSON _ = mzero + +instance FromJSON ObjectChangeObj where + parseJSON (Object o) = + ObjectChangeObj <$> o .: "After" + <*> o .: "Before" + <*> o .: "Path" + <*> o .: "Type" + + parseJSON _ = mzero + +instance FromJSON DiffObj where + parseJSON (Object o) = + DiffObj <$> o .: "/" + + parseJSON _ = mzero + +instance FromJSON ObjectDiffObj where + parseJSON (Object o) = + ObjectDiffObj <$> o .: "Changes" + + parseJSON _ = mzero + +instance FromJSON PinObj where + parseJSON (Object v) = + case H.lookup "Progress" v of + Just (_) -> WithProgress <$> v .: "Pins" + <*> v .: "Progress" + + Nothing -> + case H.lookup "Pins" v of + Just (_) -> WithoutProgress <$> v .: "Pins" + Nothing -> mzero + + parseJSON _ = mzero + +instance FromJSON BootstrapObj where + parseJSON (Object o) = + BootstrapObj <$> o .: "Peers" + + parseJSON _ = mzero + +instance FromJSON StatsBwObj where + parseJSON (Object o) = + StatsBwObj <$> o .: "RateIn" + <*> o .: "RateOut" + <*> o .: "TotalIn" + <*> o .: "TotalOut" + + parseJSON _ = mzero + +instance FromJSON StatsRepoObj where + parseJSON (Object o) = + StatsRepoObj <$> o .: "NumObjects" + <*> o .: "RepoPath" + <*> o .: "RepoSize" + <*> o .: "StorageMax" + <*> o .: "Version" + + parseJSON _ = mzero + +instance FromJSON VersionObj where + parseJSON (Object o) = + VersionObj <$> o .: "Commit" + <*> o .: "Golang" + <*> o .: "Repo" + <*> o .: "System" + <*> o .: "Version" + + parseJSON _ = mzero + +instance FromJSON IdObj where + parseJSON (Object o) = + IdObj <$> o .: "Addresses" + <*> o .: "AgentVersion" + <*> o .: "ID" + <*> o .: "ProtocolVersion" + <*> o .: "PublicKey" + + parseJSON _ = mzero + +instance FromJSON DnsObj where + parseJSON (Object o) = + DnsObj <$> o .: "Path" + + parseJSON _ = mzero + +instance FromJSON PubsubObj where + parseJSON (Object o) = + PubsubObj <$> o .: "Strings" + + parseJSON _ = mzero + +instance FromJSON LogLsObj where + parseJSON (Object o) = + LogLsObj <$> o .: "Strings" + + parseJSON _ = mzero + +instance FromJSON LogLevelObj where + parseJSON (Object o) = + LogLevelObj <$> o .: "Message" + + parseJSON _ = mzero + +instance FromJSON RepoVersionObj where + parseJSON (Object o) = + RepoVersionObj <$> o .: "Version" + + parseJSON _ = mzero + +instance FromJSON RepoFsckObj where + parseJSON (Object o) = + RepoFsckObj <$> o .: "Message" + + parseJSON _ = mzero + + +instance FromJSON KeyDetailsObj where + parseJSON (Object o) = + KeyDetailsObj <$> o .: "Id" + <*> o .: "Name" + + parseJSON _ = mzero + +instance FromJSON KeyObj where + parseJSON (Object o) = + KeyObj <$> o .: "Keys" + + parseJSON _ = mzero + +instance FromJSON KeyRenameObj where + parseJSON (Object o) = + KeyRenameObj <$> o .: "Id" + <*> o .: "Now" + <*> o .: "Overwrite" + <*> o .: "Was" + + parseJSON _ = mzero + +instance FromJSON FilesStatObj where + parseJSON (Object o) = + FilesStatObj <$> o .: "Hash" + <*> o .: "Size" + <*> o .: "CumulativeSize" + <*> o .: "Blocks" + <*> o .: "Type" + + parseJSON _ = mzero + +instance FromJSON FilesEntryObj where + parseJSON (Object o) = + FilesEntryObj <$> o .: "Name" + <*> o .: "Type" + <*> o .: "Size" + <*> o .: "Hash" + + parseJSON _ = mzero + +instance FromJSON FilesLsObj where + parseJSON (Object o) = + FilesLsObj <$> o .: "Entries" + + parseJSON _ = mzero + +instance FromJSON FilesFlushObj where + parseJSON (Object o) = + FilesFlushObj <$> o .: "Cid" + + parseJSON _ = mzero + +-- | Defining a content type same as PlainText without charset +data IpfsText deriving Typeable + +instance Servant.API.Accept IpfsText where + contentType _ = "text" M.// "plain" + +-- | @left show . TextS.decodeUtf8' . toStrict@ +instance MimeUnrender IpfsText Text where + mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict + + +-- | Defining a content type same as IpfsJSON +data IpfsJSON deriving Typeable + +instance Servant.API.Accept IpfsJSON where + contentType _ = "application" M.// "json" + +-- | @left show . TextS.decodeUtf8' . toStrict@ +instance MimeUnrender IpfsJSON Text where + mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict + +type IpfsApi = "cat" :> Capture "arg" Text :> Get '[IpfsText] CatReturnType + :<|> "ls" :> Capture "arg" Text :> Get '[JSON] LsObj + :<|> "get" :> Capture "arg" Text :> Get '[IpfsText] GetReturnType + :<|> "swarm" :> "peers" :> Get '[JSON] SwarmPeersObj + :<|> "swarm" :> "connect" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "disconnect" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "filters" :> Get '[JSON] SwarmObj + :<|> "swarm" :> "filters" :> "add" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj + :<|> "swarm" :> "filters" :> "rm" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj + :<|> "bitswap" :> "stat" :> Get '[JSON] BitswapStatObj + :<|> "bitswap" :> "wantlist" :> Get '[JSON] BitswapWLObj + :<|> "bitswap" :> "ledger" :> Capture "peerId" Text :> Get '[JSON] BitswapLedgerObj + :<|> "bitswap" :> "reprovide" :> Get '[IpfsText] ReprovideReturnType + :<|> "cid" :> "bases" :> Get '[JSON] [CidBasesObj] + :<|> "cid" :> "codecs" :> Get '[JSON] [CidCodecsObj] + :<|> "cid" :> "hashes" :> Get '[JSON] [CidHashesObj] + :<|> "cid" :> "base32" :> Capture "cid" Text :> Get '[JSON] CidObj + :<|> "cid" :> "format" :> Capture "cid" Text :> Get '[JSON] CidObj + :<|> "block" :> "get" :> Capture "key" Text :> Get '[IpfsText] BlockReturnType + :<|> "block" :> "stat" :> Capture "key" Text :> Get '[JSON] BlockObj + :<|> "dag" :> "get" :> Capture "ref" Text :> Get '[IpfsJSON] DagReturnType + :<|> "dag" :> "resolve" :> Capture "ref" Text :> Get '[JSON] DagResolveObj + :<|> "config" :> Capture "ref" Text :> Get '[JSON] ConfigObj + :<|> "config" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ConfigObj + :<|> "object" :> "data" :> Capture "ref" Text :> Get '[IpfsText] ObjectReturnType + :<|> "object" :> "new" :> Get '[JSON] ObjectObj + :<|> "object" :> "links" :> Capture "ref" Text :> Get '[JSON] ObjectLinksObj + :<|> "object" :> "patch" :> "add-link" :> Capture "arg" Text + :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ObjectLinksObj + :<|> "object" :> "patch" :> "rm-link" :> Capture "arg" Text + :> QueryParam "arg" Text :> Get '[JSON] ObjectLinksObj + :<|> "object" :> "get" :> Capture "arg" Text :> Get '[JSON] ObjectGetObj + :<|> "object" :> "diff" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ObjectDiffObj + :<|> "object" :> "stat" :> Capture "arg" Text :> Get '[JSON] ObjectStatObj + :<|> "pin" :> "add" :> Capture "arg" Text :> Get '[JSON] PinObj + :<|> "pin" :> "rm" :> Capture "arg" Text :> Get '[JSON] PinObj + :<|> "bootstrap" :> "add" :> QueryParam "arg" Text :> Get '[JSON] BootstrapObj + :<|> "bootstrap" :> "list" :> Get '[JSON] BootstrapObj + :<|> "bootstrap" :> "rm" :> QueryParam "arg" Text :> Get '[JSON] BootstrapObj + :<|> "stats" :> "bw" :> Get '[JSON] StatsBwObj + :<|> "stats" :> "repo" :> Get '[JSON] StatsRepoObj + :<|> "version" :> Get '[JSON] VersionObj + :<|> "id" :> Get '[JSON] IdObj + :<|> "id" :> Capture "arg" Text :> Get '[JSON] IdObj + :<|> "dns" :> Capture "arg" Text :> Get '[JSON] DnsObj + :<|> "pubsub" :> "ls" :> Get '[JSON] PubsubObj + :<|> "pubsub" :> "peers" :> Get '[JSON] PubsubObj + :<|> "pubsub" :> "pub" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent + :<|> "log" :> "ls" :> Get '[JSON] LogLsObj + :<|> "log" :> "level" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] LogLevelObj + :<|> "repo" :> "version" :> Get '[JSON] RepoVersionObj + :<|> "repo" :> "fsck" :> Get '[JSON] RepoFsckObj + :<|> "key" :> "gen" :> Capture "arg" Text :> QueryParam "type" Text :> Get '[JSON] KeyDetailsObj + :<|> "key" :> "list" :> Get '[JSON] KeyObj + :<|> "key" :> "rename" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] KeyRenameObj + :<|> "key" :> "rm" :> Capture "arg" Text :> Get '[JSON] KeyObj + :<|> "files" :> "chcid" :> QueryParam "arg" Text :> QueryParam "cid-version" Int :> Get '[JSON] NoContent + :<|> "files" :> "cp" :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent + :<|> "files" :> "flush" :> QueryParam "arg" Text :> Get '[JSON] FilesFlushObj + :<|> "files" :> "ls" :> QueryParam "arg" Text :> Get '[JSON] FilesLsObj + :<|> "files" :> "mkdir" :> QueryParam "arg" Text :> Get '[JSON] NoContent + :<|> "files" :> "mv" :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent + :<|> "files" :> "read" :> QueryParam "arg" Text :> Get '[IpfsText] FilesReadType + :<|> "files" :> "rm" :> QueryParam "arg" Text :> QueryParam "recursive" Bool :> Get '[JSON] NoContent + :<|> "files" :> "stat" :> QueryParam "arg" Text :> Get '[JSON] FilesStatObj + :<|> "shutdown" :> Get '[JSON] NoContent diff --git a/src/Network/Ipfs/Api/Stream.hs b/src/Network/Ipfs/Api/Types/Stream.hs similarity index 63% rename from src/Network/Ipfs/Api/Stream.hs rename to src/Network/Ipfs/Api/Types/Stream.hs index 0a05ef31..b4667389 100644 --- a/src/Network/Ipfs/Api/Stream.hs +++ b/src/Network/Ipfs/Api/Types/Stream.hs @@ -1,82 +1,92 @@ {-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeOperators #-} -- | --- Module : Network.Ipfs.Api.Stream --- Copyright : Alexander Krupenkin 2016-2018 +-- Module : Network.Ipfs.Api.Types.Stream +-- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- -- Maintainer : mail@akru.me -- Stability : experimental -- Portability : portable -- --- Ipfs Stream API provider. +-- Ipfs Stream API types. -- -module Network.Ipfs.Api.Stream where +module Network.Ipfs.Api.Types.Stream where import Control.Monad import Data.Aeson +import qualified Data.ByteString.Lazy.Char8 () import Data.Int -import qualified Data.ByteString.Lazy.Char8() -import Data.Proxy import Data.Text -import Network.HTTP.Client() +import Network.HTTP.Client () import Servant.API -import Servant.Client.Streaming as S -import Network.Ipfs.Api.Api (IpfsText) +import Network.Ipfs.Api.Types (IpfsText) type LogReturnType = Text data PingObj = PingObj - { success :: Bool - , text :: Text - , time :: Int64 - } deriving (Show, Eq) + { success :: Bool + , text :: Text + , time :: Int64 + } + deriving (Show, Eq) data ResponseObj = ResponseObj - { addrs :: Maybe [Text] - , id :: Text - } deriving (Show, Eq) + { addrs :: Maybe [Text] + , id :: Text + } + deriving (Show, Eq) data DhtObj = DhtObj - { extra :: Text - , addrid :: Text - , responses :: Maybe [ResponseObj] - , addrType :: Int - } deriving (Show, Eq) - -data RepoKeyObj = RepoKeyObj { repoSlash :: Text } deriving (Show, Eq) - -data RepoGcObj = RepoGcObj { repoKey :: RepoKeyObj } deriving (Show, Eq) + { extra :: Text + , addrid :: Text + , responses :: Maybe [ResponseObj] + , addrType :: Int + } + deriving (Show, Eq) + +data RepoKeyObj = RepoKeyObj + { repoSlash :: Text + } + deriving (Show, Eq) + +data RepoGcObj = RepoGcObj + { repoKey :: RepoKeyObj + } + deriving (Show, Eq) data RepoVerifyObj = RepoVerifyObj - { msg :: Text - , progress :: Int - } deriving (Show, Eq) + { msg :: Text + , progress :: Int + } + deriving (Show, Eq) data RefsObj = RefsObj { error :: Text - , ref :: Text - } deriving (Show, Eq) + , ref :: Text + } + deriving (Show, Eq) data PubsubSubObj = PubsubSubObj - { mssgdata :: Text - , from :: Text - , seqno :: Text - , topicIDs :: [Text] - } deriving (Show, Eq) + { mssgdata :: Text + , from :: Text + , seqno :: Text + , topicIDs :: [Text] + } + deriving (Show, Eq) instance FromJSON PingObj where parseJSON (Object o) = PingObj <$> o .: "Success" <*> o .: "Text" <*> o .: "Time" - + parseJSON _ = mzero instance FromJSON DhtObj where @@ -85,33 +95,33 @@ instance FromJSON DhtObj where <*> o .: "ID" <*> o .: "Responses" <*> o .: "Type" - + parseJSON _ = mzero instance FromJSON ResponseObj where parseJSON (Object o) = ResponseObj <$> o .: "Addrs" <*> o .: "ID" - + parseJSON _ = mzero instance FromJSON RepoKeyObj where parseJSON (Object o) = RepoKeyObj <$> o .: "/" - + parseJSON _ = mzero instance FromJSON RepoGcObj where parseJSON (Object o) = RepoGcObj <$> o .: "Key" - + parseJSON _ = mzero instance FromJSON RepoVerifyObj where parseJSON (Object o) = RepoVerifyObj <$> o .: "Msg" <*> o .: "Progress" - + parseJSON _ = mzero instance FromJSON RefsObj where @@ -127,7 +137,7 @@ instance FromJSON PubsubSubObj where <*> o .: "from" <*> o .: "seqno" <*> o .: "topicIDs" - + parseJSON _ = mzero type IpfsStreamApi = "ping" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO PingObj ) @@ -142,22 +152,3 @@ type IpfsStreamApi = "ping" :> Capture "arg" Text :> StreamGet NewlineFraming JS :<|> "refs" :> Capture "arg" Text :> StreamGet NewlineFraming JSON (SourceIO RefsObj) :<|> "refs" :> "local" :> StreamGet NewlineFraming JSON (SourceIO RefsObj) :<|> "pubsub" :> "sub" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO PubsubSubObj ) - -ipfsStreamApi :: Proxy IpfsStreamApi -ipfsStreamApi = Proxy - -_ping :: Text -> ClientM (SourceIO PingObj) -_dhtFindPeer :: Text -> ClientM (SourceIO DhtObj) -_dhtFindProvs :: Text -> ClientM (SourceIO DhtObj) -_dhtGet :: Text -> ClientM (SourceIO DhtObj) -_dhtProvide :: Text -> ClientM (SourceIO DhtObj) -_dhtQuery :: Text -> ClientM (SourceIO DhtObj) -_logTail :: ClientM (SourceIO LogReturnType) -_repoGc :: ClientM (SourceIO RepoGcObj) -_repoVerify :: ClientM (SourceIO RepoVerifyObj) -_refs :: Text -> ClientM (SourceIO RefsObj) -_refsLocal :: ClientM (SourceIO RefsObj) -_pubsubSubscribe :: Text -> ClientM (SourceIO PubsubSubObj) - -_ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery :<|> - _logTail :<|> _repoGc :<|> _repoVerify :<|> _refs :<|> _refsLocal :<|> _pubsubSubscribe = client ipfsStreamApi \ No newline at end of file diff --git a/src/Network/Ipfs/Client.hs b/src/Network/Ipfs/Client.hs new file mode 100644 index 00000000..cfbe8843 --- /dev/null +++ b/src/Network/Ipfs/Client.hs @@ -0,0 +1,47 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} + +-- | +-- Module : Network.Ipfs.Client +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unknown +-- +-- IPFS daemon HTTP client. +-- + +module Network.Ipfs.Client where + +import Control.Monad.Except +import Control.Monad.Reader +import Network.HTTP.Client as Net hiding (Proxy) +import Servant.Client + +newtype IpfsT m a = IpfsT { unIpfs :: ReaderT (Manager, BaseUrl, String) (ExceptT ClientError m) a } + deriving ( Functor + , Applicative + , Monad + , MonadIO + , MonadReader (Manager, BaseUrl, String) + , MonadError ClientError + ) + +instance MonadTrans IpfsT where + lift = IpfsT . lift . lift + +type Ipfs a = IpfsT IO a + +-- | 'IpfsT' monad runner. +runIpfs' :: BaseUrl -> Ipfs a -> IO () +runIpfs' url ipfs = do + manager' <- liftIO $ newManager defaultManagerSettings + ret <- runExceptT (runReaderT (unIpfs ipfs) (manager', url, showBaseUrl url)) + case ret of + Left err -> putStrLn $ "Error: " ++ show err + Right _ -> putStr "" + +-- | 'IpfsT' monad runner with default arguments. +runIpfs :: Ipfs a -> IO () +runIpfs = runIpfs' (BaseUrl Http "localhost" 5001 "/api/v0") diff --git a/src/Network/Polkadot.hs b/src/Network/Polkadot.hs deleted file mode 100644 index 6a6dc928..00000000 --- a/src/Network/Polkadot.hs +++ /dev/null @@ -1,15 +0,0 @@ --- | --- Module : Network.Polkadot --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- --- TODO --- - -module Network.Polkadot - ( - ) where From 8ada2d64cf4772cec8f78c8af285fcaf289c6dbf Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 23 May 2020 10:05:13 +0300 Subject: [PATCH 130/237] Update package meta --- .stylish_haskell.yaml | 4 ++-- package.yaml | 8 ++++---- stack.yaml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.stylish_haskell.yaml b/.stylish_haskell.yaml index d3de67f6..e3505850 100644 --- a/.stylish_haskell.yaml +++ b/.stylish_haskell.yaml @@ -85,7 +85,7 @@ steps: # > ) # # Default: inline - long_list_align: inline + long_list_align: multiline # Align empty list (importing instances) # @@ -124,7 +124,7 @@ steps: # > import Data.Foldable (Foldable(fold, foldl, foldMap)) # # Default: true - separate_lists: true + separate_lists: false # Language pragmas - language_pragmas: diff --git a/package.yaml b/package.yaml index 4de91aea..5442db5e 100644 --- a/package.yaml +++ b/package.yaml @@ -1,7 +1,7 @@ name: web3 -version: 0.8.4.0 -synopsis: Ethereum API for Haskell -description: Web3 is a Haskell client library for Ethereum +version: 0.9.0.0 +synopsis: Web3 API for Haskell. +description: Client library for Third Generation of Web. github: "airalab/hs-web3" license: BSD-3-Clause license-file: LICENSE @@ -52,7 +52,7 @@ dependencies: - text >=1.2.2.2 && <1.3 - mtl >=2.2.1 && <2.3 - websockets >=0.11 && <0.13 -- network >=2.6 && <2.9 +- network >=2.6 && <3.2 - servant-client >=0.13 && <0.17 - servant >=0.13 && <0.17 - http-media >=0.7 && <0.8.1 diff --git a/stack.yaml b/stack.yaml index a2647b84..95fa2b9d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-15.10 +resolver: lts-15.13 # User packages to be built. packages: From 68a36dab188661ea6484cec7c35584123b2330a4 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 24 May 2020 05:03:27 +0300 Subject: [PATCH 131/237] Finish Polkadot API impl --- src/Network/Polkadot/Api/Chain.hs | 2 - src/Network/Polkadot/Api/Contracts.hs | 11 +- src/Network/Polkadot/Api/Engine.hs | 3 +- src/Network/Polkadot/Api/Offchain.hs | 2 - src/Network/Polkadot/Api/Payment.hs | 2 - src/Network/Polkadot/Api/State.hs | 2 +- src/Network/Polkadot/Api/Types.hs | 192 ++++++++++++++++++++++++-- src/Network/Web3.hs | 12 -- 8 files changed, 189 insertions(+), 37 deletions(-) diff --git a/src/Network/Polkadot/Api/Chain.hs b/src/Network/Polkadot/Api/Chain.hs index f871e955..937e0b5e 100644 --- a/src/Network/Polkadot/Api/Chain.hs +++ b/src/Network/Polkadot/Api/Chain.hs @@ -15,8 +15,6 @@ module Network.Polkadot.Api.Chain where -import Data.Text (Text) - import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) import Network.Polkadot.Api.Types (Header, SignedBlock) diff --git a/src/Network/Polkadot/Api/Contracts.hs b/src/Network/Polkadot/Api/Contracts.hs index afff4a5e..fc9719ea 100644 --- a/src/Network/Polkadot/Api/Contracts.hs +++ b/src/Network/Polkadot/Api/Contracts.hs @@ -19,14 +19,15 @@ import Data.Text (Text) import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) +import Network.Polkadot.Api.Types (ContractCall, ContractExecResult) -- | Executes a call to a contract. call :: JsonRpc m - => ContractCallRequest + => ContractCall -- ^ Contract call -> Maybe HexString -- ^ Block hash or nothing for head - -> ContractExecResult + -> m ContractExecResult {-# INLINE call #-} call = remote "contracts_call" @@ -38,16 +39,16 @@ getStorage :: JsonRpc m -- ^ Storage key -> Maybe HexString -- ^ Block hash or nothing for head - -> Maybe HexString + -> m (Maybe HexString) {-# INLINE getStorage #-} getStorage = remote "contracts_getStorage" -- | Returns the projected time a given contract will be able to sustain paying its rent. -rentProjection :: JsonRpc +rentProjection :: JsonRpc m => Text -- ^ AccountId -> Maybe HexString -- ^ Block hash or nothing for head - -> Maybe Int + -> m (Maybe Int) {-# INLINE rentProjection #-} rentProjection = remote "contracts_rentProjection" diff --git a/src/Network/Polkadot/Api/Engine.hs b/src/Network/Polkadot/Api/Engine.hs index 29e4c38f..cd97d840 100644 --- a/src/Network/Polkadot/Api/Engine.hs +++ b/src/Network/Polkadot/Api/Engine.hs @@ -15,8 +15,7 @@ module Network.Polkadot.Api.Engine where -import Data.Text (Text) - +import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) import Network.Polkadot.Api.Types (CreatedBlock) diff --git a/src/Network/Polkadot/Api/Offchain.hs b/src/Network/Polkadot/Api/Offchain.hs index eb9c3ef3..8d2723dc 100644 --- a/src/Network/Polkadot/Api/Offchain.hs +++ b/src/Network/Polkadot/Api/Offchain.hs @@ -15,8 +15,6 @@ module Network.Polkadot.Api.Offchain where -import Data.Text (Text) - import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) import Network.Polkadot.Api.Types (StorageKind) diff --git a/src/Network/Polkadot/Api/Payment.hs b/src/Network/Polkadot/Api/Payment.hs index 3df41430..81301bdb 100644 --- a/src/Network/Polkadot/Api/Payment.hs +++ b/src/Network/Polkadot/Api/Payment.hs @@ -15,8 +15,6 @@ module Network.Polkadot.Api.Payment where -import Data.Text (Text) - import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) import Network.Polkadot.Api.Types (RuntimeDispatchInfo) diff --git a/src/Network/Polkadot/Api/State.hs b/src/Network/Polkadot/Api/State.hs index f5709bb5..e3960a1c 100644 --- a/src/Network/Polkadot/Api/State.hs +++ b/src/Network/Polkadot/Api/State.hs @@ -159,7 +159,7 @@ getStorageSize :: JsonRpc m -- ^ Block hash or nothing for head -> m Int {-# INLINE getStorageSize #-} -getStorageHash = remote "state_getStorageSize" +getStorageSize = remote "state_getStorageSize" -- | Query historical storage entries (by key) starting from a start block. queryStorage :: JsonRpc m diff --git a/src/Network/Polkadot/Api/Types.hs b/src/Network/Polkadot/Api/Types.hs index b1e3c437..6d7bccf1 100644 --- a/src/Network/Polkadot/Api/Types.hs +++ b/src/Network/Polkadot/Api/Types.hs @@ -18,14 +18,17 @@ module Network.Polkadot.Api.Types where -import Data.Aeson (FromJSON (..), Options (fieldLabelModifier, omitNothingFields), - ToJSON (..), Value (Bool, String), - defaultOptions, object, (.=)) -import Data.Aeson.TH (deriveJSON) -import Data.Text (Text) -import GHC.Generics (Generic) +import Data.Aeson (FromJSON (..), + Options (fieldLabelModifier), + ToJSON (..), Value (String), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.Text (Text) +import Data.Word (Word32, Word64, Word8) +import GHC.Generics (Generic) -import Data.String.Extra (toLowerFirst) +import Data.ByteArray.HexString (HexString) +import Data.String.Extra (toLowerFirst) -- | The role the node is running as. data NodeRole = Full @@ -87,14 +90,181 @@ data PeerInfo = PeerInfo $(deriveJSON (defaultOptions { fieldLabelModifier = toLowerFirst . drop 8 }) ''PeerInfo) -data ContractCallRequest = ContractCallRequest +-- | Executes a call to a contract. +data ContractCall = ContractCall + { callOrigin :: HexString + , callDest :: HexString + , callValue :: Integer + , callGasLimit :: Integer + , callInputData :: HexString + } + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 4 }) ''ContractCall) + +-- | A result of execution of a contract. +data ContractExecResult = SuccessExec + { execStatus :: Word8 + -- ^ Status code returned by contract. + , execData :: Maybe HexString + -- ^ Output data returned by contract. Can be empty. + } + | ExecResultError + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 4 }) ''ContractExecResult) + +type Metadata = Value + +-- | ReadProof struct returned by RPC. +data ReadProof = ReadProof + { readProofAt :: HexString + -- ^ Block hash used to generate the proof. + , readProofProof :: [HexString] + -- ^ A proof used to prove that storage entries are included in the storage trie. + } deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 8 }) ''ContractCallRequest) + { fieldLabelModifier = toLowerFirst . drop 9 }) ''ReadProof) + +-- | Runtime version. +-- This should not be thought of as classic Semver (major/minor/tiny). +-- This triplet have different semantics and mis-interpretation could cause problems. +-- In particular: bug fixes should result in an increment of `spec_version` and possibly `authoring_version`, +-- absolutely not `impl_version` since they change the semantics of the runtime. +data RuntimeVersion = RuntimeVersion + { runtimeSpecName :: Text + -- ^ Identifies the different Substrate runtimes. + , runtimeImplName :: Text + -- ^ Name of the implementation of the spec. + , runtimeAuthoringVersion :: Word32 + -- ^ `authoring_version` is the version of the authorship interface. + , runtimeSpecVersion :: Word32 + -- ^ Version of the runtime specification. + , runtimeImplVersion :: Word32 + -- ^ Version of the implementation of the specification. + , runtimeApis :: [(HexString, Word32)] + -- ^ List of supported API "features" along with their versions. + , runtimeTransactionVersion :: Word32 + -- ^ All existing dispatches are fully compatible when this number doesn't change. + } + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 7 }) ''RuntimeVersion) + +-- | Type of supported offchain storages. +-- +-- 1: persistent storage is non-revertible and not fork-aware; +-- 2: local storage is revertible and fork-aware. +type StorageKind = Word8 + +-- | Storage changes. +data StorageChangeSet = StorageChangeSet + { storageBlock :: HexString + -- ^ Block hash. + , storageChanges :: [(HexString, Maybe HexString)] + -- ^ A list of changes. + } + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 7 }) ''StorageChangeSet) + +-- | Numeric range of transaction weight. +type Weight = Word64 + +-- | Generalized group of dispatch types. +data DispatchClass = Normal + | Operational + | Mandatory + deriving (Eq, Generic, Show) + +$(deriveJSON defaultOptions ''DispatchClass) -data ContractExecResult = ContractExecResult +-- | Some information related to a dispatchable that can be queried from the runtime. +data RuntimeDispatchInfo = RuntimeDispatchInfo + { dispatchWeight :: Weight + -- ^ Weight of this dispatch. + , dispatchClass :: DispatchClass + -- ^ Class of this dispatch. + , dispatchPartialFee :: Integer + -- ^ The partial inclusion fee of this dispatch. + } + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 8 }) ''RuntimeDispatchInfo) + +-- | Auxiliary data associated with an imported block result. +data ImportedAux = ImportedAux + { auxHeaderOnly :: Bool + -- ^ Only the header has been imported. Block body verification was skipped. + , auxClearJustificationRequests :: Bool + -- ^ Clear all pending justification requests. + , auxNeedsJustification :: Bool + -- ^ Request a justification for the given block. + , auxBadJustification :: Bool + -- ^ Received a bad justification. + , auxNeedsFinalityProof :: Bool + -- ^ Request a finality proof for the given block. + , auxIsNewBest :: Bool + -- ^ Whether the block that was imported is the new best block. + } + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 3 }) ''ImportedAux) + +data CreatedBlock = CreatedBlock + { createdBlockHash :: HexString + , createdBlockAux :: ImportedAux + } + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 12 }) ''CreatedBlock) + +-- | Abstraction over a block header for a substrate chain. +data Header = Header + { headerParentHash :: HexString + -- ^ The parent hash. + , headerNumber :: Int + -- ^ The block number. + , headerStateRoot :: HexString + -- ^ The state trie merkle root + , headerExtrinsicsRoot :: HexString + -- ^ The merkle root of the extrinsics. + , headerDigest :: HexString + -- ^ A chain-specific digest of data useful for light clients or referencing auxiliary data. + } + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 5 }) ''Header) + +-- | Abstraction over a substrate block. +data Block = Block + { blockHeader :: Header + -- ^ The block header. + , blockExtrinsics :: [HexString] + -- ^ The accompanying extrinsics. + } + deriving (Eq, Generic, Show) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = toLowerFirst . drop 5 }) ''Block) + +-- | Abstraction over a substrate block and justification. +data SignedBlock = SignedBlock + { signedBlock :: Block + -- ^ Full block. + , signedJustification :: Maybe HexString + -- ^ Block justification. + } deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 8 }) ''ContractExecResult) + { fieldLabelModifier = toLowerFirst . drop 6 }) ''SignedBlock) diff --git a/src/Network/Web3.hs b/src/Network/Web3.hs index c66f3c92..4092091b 100644 --- a/src/Network/Web3.hs +++ b/src/Network/Web3.hs @@ -16,18 +16,6 @@ module Network.Web3 Web3 , runWeb3 -- ^ Single entry point for any Web3 family network. - - -- * Ethereum Network - , module Network.Ethereum - - -- * Polkadot Network - , module Network.Polkadot - - -- * IPFS Network - , module Network.Ipfs ) where -import qualified Network.Ethereum -import qualified Network.Ipfs -import qualified Network.Polkadot import Network.Web3.Provider (Web3, runWeb3) From 1f85772f00c1a584caaf41f7f52aa6a39a3453e8 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 24 May 2020 05:34:37 +0300 Subject: [PATCH 132/237] Added Polkadot API reference docs --- docs/ethereum_node_api.rst | 2 +- docs/index.rst | 1 + docs/polkadot_node_api.rst | 50 +++++++++++++++++++++++++++++++++ src/Network/Polkadot/Api/Rpc.hs | 4 +-- 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 docs/polkadot_node_api.rst diff --git a/docs/ethereum_node_api.rst b/docs/ethereum_node_api.rst index 302faace..34484588 100644 --- a/docs/ethereum_node_api.rst +++ b/docs/ethereum_node_api.rst @@ -76,7 +76,7 @@ Currently implemented the following Ethereum APIs in modules: ``personal_*`` `Network.Ethereum.Api.Personal `_ =============== ================ -All modules use descriptive types according to official Ethereum specification. It placed at `Network.Ethereum.Api.Types `_. +All modules use descriptive types according to official Ethereum specification. It placed at `Network.Ethereum.Api.Types `_. .. note:: diff --git a/docs/index.rst b/docs/index.rst index 45dc76f9..1824da06 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,6 +8,7 @@ Haskell Web3 Documentation getting_started ethereum_node_api + polkadot_node_api ethereum_accounts smart_contracts ipfs_client_api diff --git a/docs/polkadot_node_api.rst b/docs/polkadot_node_api.rst new file mode 100644 index 00000000..e7364313 --- /dev/null +++ b/docs/polkadot_node_api.rst @@ -0,0 +1,50 @@ +Polkadot node API +================= + +As same as Ethereum nodes Polkadot node exports HTTP/WebSockets `JSON-RPC` API. For connection with node **hs-web3** use internal tiny JSON-RPC client. + +Lets try to call Polkadot node with ``runWeb3'`` function using ``ghci``. + +.. code-block:: haskell + + > import Network.Web3.Provider + > import qualified Network.Polkadot.Api.System as System + > runWeb3' (WsProvider "127.0.0.1" 9944) $ System.name + Right "Parity Polkadot" + +It can be useful to define function with Polkadot node endpoint location. + +.. code-block:: haskell + + myNode :: Web3 a -> Either Web3Error a + myNode = runWeb3' (Wsprovider "127.0.0.1" 9944) + +API Reference +~~~~~~~~~~~~~ + +Currently implemented the following Polkadot APIs in modules: + + ================== ================ + Method prefix Implementation + ================== ================ + ``account_*`` `Network.Polkadot.Api.Account `_ + ``author_*`` `Network.Polkadot.Api.Author `_ + ``babe_*`` `Network.Polkadot.Api.Babe `_ + ``chain_*`` `Network.Polkadot.Api.Chain `_ + ``childstate_*`` `Network.Polkadot.Api.Childstate `_ + ``contracts_*`` `Network.Polkadot.Api.Contracts `_ + ``engine_*`` `Network.Polkadot.Api.Engine `_ + ``grandpa_*`` `Network.Polkadot.Api.Grandpa `_ + ``offchain_*`` `Network.Polkadot.Api.Offchain `_ + ``payment_*`` `Network.Polkadot.Api.Payment `_ + ``rpc_*`` `Network.Polkadot.Api.Rpc `_ + ``state_*`` `Network.Polkadot.Api.State `_ + ``system_*`` `Network.Polkadot.Api.System `_ + ================== ================ + +All modules use descriptive types located at `Network.Polkadot.Api.Types `_. + +.. note:: + + See classic API reference at `Hackage web3 page `_. + diff --git a/src/Network/Polkadot/Api/Rpc.hs b/src/Network/Polkadot/Api/Rpc.hs index c6d2b6f4..93225c6d 100644 --- a/src/Network/Polkadot/Api/Rpc.hs +++ b/src/Network/Polkadot/Api/Rpc.hs @@ -15,11 +15,11 @@ module Network.Polkadot.Api.Rpc where -import Data.Text (Text) +import Data.Aeson (Value) import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Retrieves the list of RPC methods that are exposed by the node. -methods :: JsonRpc m => m [Text] +methods :: JsonRpc m => m Value {-# INLINE methods #-} methods = remote "rpc_methods" From 36aee5a940549e7a4a6dd7b15056173d21f0d24e Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 24 May 2020 05:58:58 +0300 Subject: [PATCH 133/237] Fix unit and live tests --- .../{Web3 => }/Test/ComplexStorageSpec.hs | 23 ++++---- .../Ethereum/{Web3 => }/Test/ERC20Spec.hs | 16 +++++- .../{Web3 => }/Test/LinearizationSpec.hs | 56 ++++++++++--------- .../{Web3 => }/Test/LocalAccountSpec.hs | 29 +++++----- .../Ethereum/{Web3 => }/Test/RegistrySpec.hs | 7 ++- .../{Web3 => }/Test/SimpleStorageSpec.hs | 35 ++++++------ .../Network/Ethereum/{Web3 => }/Test/Utils.hs | 43 +++++++------- test/Network/Ipfs/Api/Test/Key.hs | 45 ++++++++------- unit/Crypto/Ethereum/Test/SignatureSpec.hs | 2 +- unit/Data/Solidity/Test/AddressSpec.hs | 2 +- 10 files changed, 137 insertions(+), 121 deletions(-) rename test/Network/Ethereum/{Web3 => }/Test/ComplexStorageSpec.hs (88%) rename test/Network/Ethereum/{Web3 => }/Test/ERC20Spec.hs (67%) rename test/Network/Ethereum/{Web3 => }/Test/LinearizationSpec.hs (79%) rename test/Network/Ethereum/{Web3 => }/Test/LocalAccountSpec.hs (52%) rename test/Network/Ethereum/{Web3 => }/Test/RegistrySpec.hs (79%) rename test/Network/Ethereum/{Web3 => }/Test/SimpleStorageSpec.hs (88%) rename test/Network/Ethereum/{Web3 => }/Test/Utils.hs (57%) diff --git a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs b/test/Network/Ethereum/Test/ComplexStorageSpec.hs similarity index 88% rename from test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs rename to test/Network/Ethereum/Test/ComplexStorageSpec.hs index 97a95a88..aca2de87 100644 --- a/test/Network/Ethereum/Web3/Test/ComplexStorageSpec.hs +++ b/test/Network/Ethereum/Test/ComplexStorageSpec.hs @@ -10,7 +10,7 @@ {-# LANGUAGE TemplateHaskell #-} -- | --- Module : Network.Ethereum.Web3.Test.ComplexStorageSpec +-- Module : Network.Ethereum.Test.ComplexStorageSpec -- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- @@ -24,19 +24,18 @@ -- sized components. -- -module Network.Ethereum.Web3.Test.ComplexStorageSpec where +module Network.Ethereum.Test.ComplexStorageSpec where -import Control.Concurrent.Async (wait) -import Control.Concurrent.MVar (newEmptyMVar, putMVar, - takeMVar) -import Control.Monad.IO.Class (liftIO) -import Data.Default (def) +import Control.Concurrent.Async (async, wait) +import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar) +import Control.Monad.IO.Class (liftIO) +import Data.Default (def) -import Network.Ethereum.Api.Types (Filter (..)) -import Network.Ethereum.Contract (new) +import Network.Ethereum hiding (convert) +import Network.Ethereum.Api.Types (Filter (..)) +import Network.Ethereum.Contract (new) import Network.Ethereum.Contract.TH -import Network.Ethereum.Web3 hiding (convert) -import Network.Ethereum.Web3.Test.Utils +import Network.Ethereum.Test.Utils import Test.Hspec @@ -72,7 +71,7 @@ complexStorageSpec = do let fltr = (def :: Filter ValsSet) { filterAddress = Just [storage] } -- kick off listening for the ValsSet event vals <- newEmptyMVar - fiber <- web3 $ + fiber <- async . web3 $ event fltr $ \vs -> do liftIO $ putMVar vals vs pure TerminateEvent diff --git a/test/Network/Ethereum/Web3/Test/ERC20Spec.hs b/test/Network/Ethereum/Test/ERC20Spec.hs similarity index 67% rename from test/Network/Ethereum/Web3/Test/ERC20Spec.hs rename to test/Network/Ethereum/Test/ERC20Spec.hs index d1da2f94..30b42953 100644 --- a/test/Network/Ethereum/Web3/Test/ERC20Spec.hs +++ b/test/Network/Ethereum/Test/ERC20Spec.hs @@ -5,12 +5,24 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -module Network.Ethereum.Web3.Test.ERC20Spec where + +-- | +-- Module : Network.Ethereum.Test.ERC20Spec +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- + +module Network.Ethereum.Test.ERC20Spec where import Test.Hspec +import Network.Ethereum (Account, UIntN) import Network.Ethereum.Contract.TH (abiFrom) -import Network.Ethereum.Web3 (Account, UIntN) import Network.JsonRpc.TinyClient (JsonRpc) [abiFrom|examples/token/ERC20.json|] diff --git a/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs b/test/Network/Ethereum/Test/LinearizationSpec.hs similarity index 79% rename from test/Network/Ethereum/Web3/Test/LinearizationSpec.hs rename to test/Network/Ethereum/Test/LinearizationSpec.hs index ed958102..e4e61498 100644 --- a/test/Network/Ethereum/Web3/Test/LinearizationSpec.hs +++ b/test/Network/Ethereum/Test/LinearizationSpec.hs @@ -13,7 +13,7 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} --- Module : Network.Ethereum.Web3.Test.LinearizationSpec +-- Module : Network.Ethereum.Test.LinearizationSpec -- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- @@ -22,32 +22,33 @@ -- Portability : unportable -- -module Network.Ethereum.Web3.Test.LinearizationSpec where +module Network.Ethereum.Test.LinearizationSpec where -import Control.Concurrent (forkIO) -import Control.Concurrent.Async (forConcurrently_) +import Control.Concurrent (forkIO) +import Control.Concurrent.Async (forConcurrently_) import Control.Concurrent.MVar -import Control.Concurrent.STM (atomically) -import Control.Concurrent.STM.TQueue (TQueue, flushTQueue, - newTQueueIO, writeTQueue) -import Control.Monad (void) -import Control.Monad.IO.Class (MonadIO (..)) -import Control.Monad.Trans.Reader (ReaderT, ask) +import Control.Concurrent.STM (atomically) +import Control.Concurrent.STM.TQueue (TQueue, flushTQueue, + newTQueueIO, writeTQueue) +import Control.Monad (void) +import Control.Monad.IO.Class (MonadIO (..)) +import Control.Monad.Trans.Reader (ReaderT, ask) import Data.Default import Data.Either -import Data.List (sort) -import Data.Maybe (fromJust) -import System.Random (randomRIO) +import Data.List (sort) +import Data.Maybe (fromJust) +import System.Random (randomRIO) import Test.Hspec -import qualified Network.Ethereum.Api.Eth as Eth -import Network.Ethereum.Api.Types (Change (..), Filter (..), - TxReceipt, unQuantity) -import Network.Ethereum.Contract (new) +import Network.Ethereum +import qualified Network.Ethereum.Api.Eth as Eth +import Network.Ethereum.Api.Types (Change (..), Filter (..), + TxReceipt, unQuantity) +import Network.Ethereum.Contract (new) import Network.Ethereum.Contract.Event -import Network.Ethereum.Contract.TH (abiFrom) -import Network.Ethereum.Web3 -import Network.Ethereum.Web3.Test.Utils +import Network.Ethereum.Contract.TH (abiFrom) +import Network.Ethereum.Test.Utils +import Network.Web3 [abiFrom|test/contracts/Linearization.json|] @@ -94,7 +95,7 @@ singleFlood linearization = liftIO $ do _ -> error "got a number outside of (1,4) after randomR (1,4)" floodSpec :: SpecWith Address -floodSpec = describe "can correctly demonstrate the difference between `multiEvent` and multiple `event'`s" $ do +floodSpec = describe "can correctly demonstrate the difference between `multiEvent` and multiple `event`s" $ do it "properly linearizes with `multiEvent` when flooded and doesn't with multiple `event`s" $ \linearization -> do multiQ <- monitorAllFourMulti linearization parQ <- monitorAllFourPar linearization @@ -139,7 +140,10 @@ monitorE1OrE2 addr = do _ <- web3 $ multiEvent filters handlers return var -data EventTag = ETE1 | ETE2 | ETE3 | ETE4 +data EventTag = ETE1 + | ETE2 + | ETE3 + | ETE4 deriving (Eq, Read, Show) instance {-# OVERLAPPING #-} Ord (EventTag, Integer, Integer) where @@ -169,10 +173,10 @@ monitorAllFourPar addr = do h = enqueueingHandler q unH (H h) = h - void . forkIO . web3 $ event' (f @E1) (unH $ h ETE1) - void . forkIO . web3 $ event' (f @E2) (unH $ h ETE2) - void . forkIO . web3 $ event' (f @E3) (unH $ h ETE3) - void . forkIO . web3 $ event' (f @E4) (unH $ h ETE4) + void . forkIO . web3 $ event (f @E1) (unH $ h ETE1) + void . forkIO . web3 $ event (f @E2) (unH $ h ETE2) + void . forkIO . web3 $ event (f @E3) (unH $ h ETE3) + void . forkIO . web3 $ event (f @E4) (unH $ h ETE4) return q defFilter :: forall a. Default (Filter a) => Address -> Filter a diff --git a/test/Network/Ethereum/Web3/Test/LocalAccountSpec.hs b/test/Network/Ethereum/Test/LocalAccountSpec.hs similarity index 52% rename from test/Network/Ethereum/Web3/Test/LocalAccountSpec.hs rename to test/Network/Ethereum/Test/LocalAccountSpec.hs index f003a528..62e3e64f 100644 --- a/test/Network/Ethereum/Web3/Test/LocalAccountSpec.hs +++ b/test/Network/Ethereum/Test/LocalAccountSpec.hs @@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} --- Module : Network.Ethereum.Web3.Test.LocalAccountSpec --- Copyright : Alexander Krupenkin 2018 +-- Module : Network.Ethereum.Test.LocalAccountSpec +-- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- -- Maintainer : mail@akru.me @@ -11,22 +11,21 @@ -- Simple local account transaction test. -- -module Network.Ethereum.Web3.Test.LocalAccountSpec where +module Network.Ethereum.Test.LocalAccountSpec where -import Lens.Micro ((.~)) -import Lens.Micro.Mtl ((.=)) +import Lens.Micro ((.~)) +import Lens.Micro.Mtl ((.=)) import Test.Hspec -import Crypto.Ethereum.Utils (derivePubKey, importKey) -import Data.ByteArray.HexString (HexString) -import Data.Solidity.Prim.Address (fromPubKey) -import Network.Ethereum.Account (LocalKey (..), send, to, - value, withAccount, - withParam) -import Network.Ethereum.Api.Eth (getBalance) -import Network.Ethereum.Api.Types (DefaultBlock (Pending)) -import Network.Ethereum.Unit (Ether, toWei) -import Network.Ethereum.Web3.Test.Utils (web3) +import Crypto.Ecdsa.Utils (derivePubKey, importKey) +import Data.ByteArray.HexString (HexString) +import Data.Solidity.Prim.Address (fromPubKey) +import Network.Ethereum.Account (LocalKey (..), send, to, value, + withAccount, withParam) +import Network.Ethereum.Api.Eth (getBalance) +import Network.Ethereum.Api.Types (DefaultBlock (Pending)) +import Network.Ethereum.Test.Utils (web3) +import Network.Ethereum.Unit (Ether, toWei) spec :: Spec spec = describe "Local account transactions" $ do diff --git a/test/Network/Ethereum/Web3/Test/RegistrySpec.hs b/test/Network/Ethereum/Test/RegistrySpec.hs similarity index 79% rename from test/Network/Ethereum/Web3/Test/RegistrySpec.hs rename to test/Network/Ethereum/Test/RegistrySpec.hs index a2186377..0e9d607b 100644 --- a/test/Network/Ethereum/Web3/Test/RegistrySpec.hs +++ b/test/Network/Ethereum/Test/RegistrySpec.hs @@ -7,15 +7,16 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} -module Network.Ethereum.Web3.Test.RegistrySpec where +module Network.Ethereum.Test.RegistrySpec where import Data.Default (def) import Test.Hspec (Spec) +import Network.Ethereum (EventAction (TerminateEvent), + event) import Network.Ethereum.Api.Types (Filter) import Network.Ethereum.Contract.TH (abiFrom) -import Network.Ethereum.Web3 (EventAction (TerminateEvent), - Web3, event) +import Network.Web3 (Web3) [abiFrom|test/contracts/Registry.json|] diff --git a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs b/test/Network/Ethereum/Test/SimpleStorageSpec.hs similarity index 88% rename from test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs rename to test/Network/Ethereum/Test/SimpleStorageSpec.hs index 677f6bf8..096efb39 100644 --- a/test/Network/Ethereum/Web3/Test/SimpleStorageSpec.hs +++ b/test/Network/Ethereum/Test/SimpleStorageSpec.hs @@ -12,7 +12,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} --- Module : Network.Ethereum.Web3.Test.SimpleStorageSpec +-- Module : Network.Ethereum.Test.SimpleStorageSpec -- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- @@ -25,29 +25,28 @@ -- read the value, as well as an event monitor. -- -module Network.Ethereum.Web3.Test.SimpleStorageSpec where +module Network.Ethereum.Test.SimpleStorageSpec where -import Control.Concurrent.Async (wait) +import Control.Concurrent.Async (wait) import Control.Concurrent.MVar -import Control.Monad.IO.Class (liftIO) -import Control.Monad.Trans.Class (lift) -import Control.Monad.Trans.Reader (ask) -import Data.Default (def) -import Data.List (sort) -import Data.Monoid ((<>)) -import Lens.Micro ((.~)) +import Control.Monad.IO.Class (liftIO) +import Control.Monad.Trans.Class (lift) +import Control.Monad.Trans.Reader (ask) +import Data.Default (def) +import Data.List (sort) +import Data.Monoid ((<>)) +import Lens.Micro ((.~)) import Test.Hspec -import qualified Network.Ethereum.Api.Eth as Eth -import Network.Ethereum.Api.Provider (forkWeb3) +import Network.Ethereum +import qualified Network.Ethereum.Api.Eth as Eth import Network.Ethereum.Api.Types -import Network.Ethereum.Contract (new) -import Network.Ethereum.Contract.Event (event') +import Network.Ethereum.Contract (new) import Network.Ethereum.Contract.TH -import Network.Ethereum.Web3 +import Network.Web3 +import Network.Web3.Provider (forkWeb3) - -import Network.Ethereum.Web3.Test.Utils +import Network.Ethereum.Test.Utils [abiFrom|test/contracts/SimpleStorage.json|] @@ -184,7 +183,7 @@ processUntil :: MVar [EvT_CountSet] -> (Change -> Web3 ()) -> Web3 () processUntil var fltr predicate action = do - event' fltr $ \(ev :: EvT_CountSet) -> do + event fltr $ \(ev :: EvT_CountSet) -> do newV <- liftIO $ modifyMVar var $ \v -> return (ev:v, ev:v) if predicate newV then do diff --git a/test/Network/Ethereum/Web3/Test/Utils.hs b/test/Network/Ethereum/Test/Utils.hs similarity index 57% rename from test/Network/Ethereum/Web3/Test/Utils.hs rename to test/Network/Ethereum/Test/Utils.hs index 69e4da1c..7486f69f 100644 --- a/test/Network/Ethereum/Web3/Test/Utils.hs +++ b/test/Network/Ethereum/Test/Utils.hs @@ -1,30 +1,29 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -module Network.Ethereum.Web3.Test.Utils where +module Network.Ethereum.Test.Utils where -import Control.Concurrent (threadDelay) -import Control.Exception (SomeException, catch) -import Control.Monad.IO.Class (liftIO) -import Data.Maybe (fromMaybe) -import Data.Ratio (numerator) -import Data.Time.Clock.POSIX (getPOSIXTime) -import Lens.Micro ((.~)) -import Network.HTTP.Client (Manager, defaultManagerSettings, - managerConnCount, - managerRawConnection, - managerRetryableException, - newManager) -import System.Environment (lookupEnv) -import System.IO.Unsafe (unsafePerformIO) +import Control.Concurrent (threadDelay) +import Control.Exception (SomeException, catch) +import Control.Monad.IO.Class (liftIO) +import Data.Maybe (fromMaybe) +import Data.Ratio (numerator) +import Data.Time.Clock.POSIX (getPOSIXTime) +import Lens.Micro ((.~)) +import Network.HTTP.Client (Manager, defaultManagerSettings, + managerConnCount, + managerRawConnection, + managerRetryableException, + newManager) +import System.Environment (lookupEnv) +import System.IO.Unsafe (unsafePerformIO) -import Data.Solidity.Prim.Address (Address) -import Network.Ethereum.Account (DefaultAccount, to, withAccount, - withParam) -import Network.Ethereum.Api.Eth (accounts, blockNumber) -import Network.Ethereum.Api.Provider (Provider (..), Web3, - runWeb3With) -import Network.Ethereum.Api.Types (Quantity) +import Data.Solidity.Prim.Address (Address) +import Network.Ethereum.Account (DefaultAccount, to, withAccount, + withParam) +import Network.Ethereum.Api.Eth (accounts, blockNumber) +import Network.Ethereum.Api.Types (Quantity) +import Network.Web3.Provider (Provider (..), Web3, runWeb3With) -- shared manager used throughout the helpers here to prevent hammering geth from ruining everything -- this also retrys on ALL exceptions, including ConnectionResetByPeer and stuff like that diff --git a/test/Network/Ipfs/Api/Test/Key.hs b/test/Network/Ipfs/Api/Test/Key.hs index 6860e89f..fa360145 100644 --- a/test/Network/Ipfs/Api/Test/Key.hs +++ b/test/Network/Ipfs/Api/Test/Key.hs @@ -1,44 +1,47 @@ +{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Network.Ipfs.Api.Test.Key --- Copyright : Alexander Krupenkin 2016-2018 +-- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- -- Maintainer : mail@akru.me -- Stability : experimental -- Portability : unknown -- --- Module containing Ipfs command functions. +-- Key IPFS API testing module. -- module Network.Ipfs.Api.Test.Key where -import Data.Text -import Control.Exception() -import Control.Monad.Trans -import Test.Hspec +import Control.Exception () +import Control.Monad.Trans +import Test.Hspec -import Network.Ipfs.Api.Api (KeyDetailsObj(..), KeyObj(..)) -import Network.Ipfs.Api.Ipfs (keyGen, keyList, keyRm,runIpfs) +import qualified Network.Ipfs.Api.Key as Key +import Network.Ipfs.Api.Types (KeyDetailsObj (..), KeyObj (..)) +import Network.Ipfs.Client (runIpfs) main :: IO () main = hspec $ do describe "keyGen" $ do it "should return the given key name in its response" $ runIpfs $ do - res <- keyGen (pack "TestA") (pack "rsa") - liftIO $ ( keyName res ) `shouldBe` (pack "TestA") - - it "KeyDetailsObj returned by KeyGen should be present in the KeyObj's list returned returned by KeyList" $ runIpfs $ do - resGen <- keyGen (pack "TestB") (pack "rsa") - resList <- keyList - liftIO $ (keys resList) `shouldContain` ( [resGen] ) + res <- Key.gen "TestA" "rsa" + liftIO $ keyName res `shouldBe` "TestA" + + it "KeyDetailsObj returned by KeyGen should be present in the KeyObj's list returned returned by KeyList" $ + runIpfs $ do + resGen <- Key.gen "TestB" "rsa" + resList <- Key.list + liftIO $ keys resList `shouldContain` [resGen] describe "keyRm" $ do it "should return the given key name in its response" $ runIpfs $ do - res <- keyRm (pack "TestA") - liftIO $ ( keyName $ Prelude.head $ keys res ) `shouldBe` (pack "TestA") + res <- Key.rm "TestA" + liftIO $ (keyName $ Prelude.head $ keys res) `shouldBe` "TestA" - it "KeyDetailsObj returned by KeyRm should not be present in the KeyObj's list returned returned by KeyList" $ runIpfs $ do - resRm <- keyRm (pack "TestB") - resList <- keyList - liftIO $ (keys resList) `shouldNotContain` (keys resRm) \ No newline at end of file + it "KeyDetailsObj returned by KeyRm should not be present in the KeyObj's list returned returned by KeyList" $ + runIpfs $ do + resRm <- Key.rm "TestB" + resList <- Key.list + liftIO $ keys resList `shouldNotContain` keys resRm diff --git a/unit/Crypto/Ethereum/Test/SignatureSpec.hs b/unit/Crypto/Ethereum/Test/SignatureSpec.hs index b6536599..1a8b113a 100644 --- a/unit/Crypto/Ethereum/Test/SignatureSpec.hs +++ b/unit/Crypto/Ethereum/Test/SignatureSpec.hs @@ -6,9 +6,9 @@ import Data.Foldable (for_) import Test.Hspec import Test.Hspec.QuickCheck +import Crypto.Ecdsa.Utils (importKey) import Crypto.Ethereum.Signature (hashMessage, signMessage, signTransaction) -import Crypto.Ethereum.Utils (importKey) import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address (fromPubKey) import Network.Ethereum.Api.Types (Call (..)) diff --git a/unit/Data/Solidity/Test/AddressSpec.hs b/unit/Data/Solidity/Test/AddressSpec.hs index 9f986c2a..76107ae6 100644 --- a/unit/Data/Solidity/Test/AddressSpec.hs +++ b/unit/Data/Solidity/Test/AddressSpec.hs @@ -7,7 +7,7 @@ import Data.Foldable (for_) import Data.Monoid ((<>)) import Test.Hspec -import Crypto.Ethereum.Utils (derivePubKey, importKey) +import Crypto.Ecdsa.Utils (derivePubKey, importKey) import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address From 889154ecdf7603a649bebb167219e8ad92ffd626 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 24 May 2020 06:03:53 +0300 Subject: [PATCH 134/237] Updated CHANGELOG --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b804c39d..b47bf14a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.9.0.0] 2020-05-24 +### Added +- Experimental IPFS REST API client +- Experimental Polkadot JSON-RPC API client + +### Changed +- Web3 abstraction moved to `Network.Web3` +- Ethereum entry point renamed `Network.Ethereum.Web3` -> `Network.Ethereum` +- Split from common ECDSA staff from `Crypto.Ethereum` to `Crypto.Ecdsa` +- Ethereum related tests moved to `Network.Ethereum.Test` + ## [0.8.4.0] 2020-05-03 ### Added - Tuple support for `pragma experimental ABIEncoderV2` From 2da60c6ab9702c820e0dbb2b4f20a1f6168d4fb6 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 24 May 2020 06:06:47 +0300 Subject: [PATCH 135/237] Updated README --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 35651596..cf625b55 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -Ethereum API for Haskell -======================== +Web3 API for Haskell +==================== -The Haskell Ethereum API which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC). +This library implements Haskell API client for popular Web3 platforms. [![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://travis-ci.org/airalab/hs-web3.svg?branch=master)](https://travis-ci.org/airalab/hs-web3) @@ -25,7 +25,8 @@ Usage module Main where -- Basic imports -import Network.Ethereum.Web3 +import Network.Ethereum +import Network.Web3 -- Eth API support import qualified Network.Ethereum.Api.Eth as Eth From a4a4dd1619b7dbbd4a274e0201bf3a7099e5e283 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 24 May 2020 06:18:06 +0300 Subject: [PATCH 136/237] Fix in-code docs syntax --- src/Network/Web3.hs | 5 ++--- src/Network/Web3/Provider.hs | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Network/Web3.hs b/src/Network/Web3.hs index 4092091b..3b38b65e 100644 --- a/src/Network/Web3.hs +++ b/src/Network/Web3.hs @@ -7,15 +7,14 @@ -- Stability : experimental -- Portability : unportable -- --- Haskell library for next generation of Web. +-- Client library for Third Generation of Web. -- module Network.Web3 ( - -- * Web3 library uses JSON-RPC over HTTP(S) to access node functionality. + -- * Web3 library uses JSON-RPC over WebSocket/HTTP(S) to access node functionality. Web3 , runWeb3 - -- ^ Single entry point for any Web3 family network. ) where import Network.Web3.Provider (Web3, runWeb3) diff --git a/src/Network/Web3/Provider.hs b/src/Network/Web3/Provider.hs index fd75c527..d4661b63 100644 --- a/src/Network/Web3/Provider.hs +++ b/src/Network/Web3/Provider.hs @@ -59,8 +59,9 @@ data Provider = HttpProvider String | WsProvider String Int deriving (Show, Eq, Generic) +-- | Default Provider URI instance Default Provider where - def = HttpProvider "http://localhost:8545" -- ^ Default Provider URI + def = HttpProvider "http://localhost:8545" -- | 'Web3' monad runner, using the supplied Manager runWeb3With :: MonadIO m From e1f6dee74b108023d384dc314f13f3a064ad3a9c Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 24 May 2020 07:03:56 +0300 Subject: [PATCH 137/237] Added Polkadot example --- examples/polkadot/Main.hs | 24 ++++++++++++ examples/polkadot/package.yaml | 22 +++++++++++ examples/polkadot/stack.yaml | 70 ++++++++++++++++++++++++++++++++++ examples/token/Main.hs | 3 +- examples/token/stack.yaml | 4 +- 5 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 examples/polkadot/Main.hs create mode 100644 examples/polkadot/package.yaml create mode 100644 examples/polkadot/stack.yaml diff --git a/examples/polkadot/Main.hs b/examples/polkadot/Main.hs new file mode 100644 index 00000000..26e4e0a5 --- /dev/null +++ b/examples/polkadot/Main.hs @@ -0,0 +1,24 @@ +{-# LANGUAGE OverloadedStrings #-} +module Main where + +import Control.Monad.IO.Class (liftIO) + +import qualified Network.Polkadot.Api.Chain as Chain +import qualified Network.Polkadot.Api.State as State +import qualified Network.Polkadot.Api.System as System +import Network.Web3.Provider (Provider (..), runWeb3') + +main :: IO () +main = do + result <- runWeb3' (WsProvider "127.0.0.1" 9944) $ do + name <- System.name + liftIO . putStrLn $ "System name: " ++ show name + + best <- Chain.getBlockHash Nothing + liftIO . putStrLn $ "Best hash: " ++ show best + + State.getRuntimeVersion best + + case result of + Left err -> error (show err) + Right version -> putStrLn (show version) diff --git a/examples/polkadot/package.yaml b/examples/polkadot/package.yaml new file mode 100644 index 00000000..c5f0063f --- /dev/null +++ b/examples/polkadot/package.yaml @@ -0,0 +1,22 @@ +name: example-polkadot +version: 0.0.0.0 +synopsis: Polkadot API example +github: "airalab/hs-web3" +license: BSD3 +author: Alexander Krupenkin +maintainer: mail@akru.me +copyright: "(c) Alexander Krupenkin 2016" +category: Network + +dependencies: +- base +- web3 + +executables: + example-polkadot: + main: Main.hs + source-dirs: ./ + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/examples/polkadot/stack.yaml b/examples/polkadot/stack.yaml new file mode 100644 index 00000000..ae6424ac --- /dev/null +++ b/examples/polkadot/stack.yaml @@ -0,0 +1,70 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# https://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# +# The location of a snapshot can be provided as a file or url. Stack assumes +# a snapshot provided as a file might change, whereas a url resource does not. +# +# resolver: ./custom-snapshot.yaml +# resolver: https://example.com/snapshots/2018-01-01.yaml +resolver: lts-15.13 + +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# - location: +# git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# subdirs: +# - auto-update +# - wai +packages: +- . +- ../.. +# Dependency packages to be pulled from upstream that are not in the resolver +# using the same syntax as the packages field. +# (e.g., acme-missiles-0.3) +extra-deps: +- relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c +- vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c + +# Override default flag values for local packages and extra-deps +# flags: {} + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=1.9" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor +nix: + packages: + - zlib diff --git a/examples/token/Main.hs b/examples/token/Main.hs index 76f20859..40ed4bbe 100644 --- a/examples/token/Main.hs +++ b/examples/token/Main.hs @@ -6,8 +6,9 @@ import Data.Text (unpack) import Text.Printf (printf) import Lens.Micro ((.~)) +import Network.Ethereum hiding (name) import Network.Ethereum.Account -import Network.Ethereum.Web3 hiding (name) +import Network.Web3 import ERC20 diff --git a/examples/token/stack.yaml b/examples/token/stack.yaml index 75233df9..81646526 100644 --- a/examples/token/stack.yaml +++ b/examples/token/stack.yaml @@ -17,7 +17,7 @@ # # resolver: ./custom-snapshot.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml -resolver: lts-12.17 +resolver: lts-15.13 # User packages to be built. # Various formats can be used as shown in the example below. @@ -40,7 +40,7 @@ packages: # (e.g., acme-missiles-0.3) extra-deps: - relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c -- secp256k1-haskell-0.1.4@sha256:6eaf6a0909293be49e7de1c9b2a9ad1cc7eed8f3d2829ea23dc4771d81bcef57 +- vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c # Override default flag values for local packages and extra-deps # flags: {} From f2393da8ba64f83606e4db806fcdf92550399341 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 24 May 2020 07:40:29 +0300 Subject: [PATCH 138/237] [CI]: finish support for stackage LTS-12, LTS-13 --- .travis.yml | 16 ---------------- package.yaml | 5 +++++ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4531b005..9e5b1961 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,6 @@ cache: matrix: # Build with different GHC versions and stable package sets include: - - env: RESOLVER=lts-12 - compiler: "LTS12" - - env: RESOLVER=lts-13 - compiler: "LTS13" - env: RESOLVER=lts-14 compiler: "LTS14" - env: RESOLVER=lts-15 @@ -22,12 +18,6 @@ matrix: - env: RESOLVER=nightly compiler: "nightly" - - env: RESOLVER=lts-12 - compiler: "LTS12" - os: osx - - env: RESOLVER=lts-13 - compiler: "LTS13" - os: osx - env: RESOLVER=lts-14 compiler: "LTS14" os: osx @@ -38,12 +28,6 @@ matrix: compiler: "nightly" os: osx - - env: RESOLVER=lts-12 - compiler: "LTS12" - os: windows - - env: RESOLVER=lts-13 - compiler: "LTS13" - os: windows - env: RESOLVER=lts-14 compiler: "LTS14" os: windows diff --git a/package.yaml b/package.yaml index 5442db5e..f2658632 100644 --- a/package.yaml +++ b/package.yaml @@ -17,6 +17,11 @@ extra-source-files: - examples/token/ERC20.hs - examples/token/ERC20.json - examples/token/Main.hs +- examples/token/stack.yaml +- examples/token/package.yaml +- examples/polkadot/Main.hs +- examples/polkadot/stack.yaml +- examples/polkadot/package.yaml - test/contracts/Registry.json - test/contracts/SimpleStorage.json - test/contracts/ComplexStorage.json From da2b9a359c944e19a8080b820154cf0d8457a7ac Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 24 May 2020 07:41:18 +0300 Subject: [PATCH 139/237] Updated CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b47bf14a..f8ad3860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ All notable changes to this project will be documented in this file. - Split from common ECDSA staff from `Crypto.Ethereum` to `Crypto.Ecdsa` - Ethereum related tests moved to `Network.Ethereum.Test` +### Removed +- Support for build on LTS-11, LTS-12, LTS-13 + ## [0.8.4.0] 2020-05-03 ### Added - Tuple support for `pragma experimental ABIEncoderV2` From dd241c64867d04fc83a03f570283566e11be8b7d Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 6 Jun 2020 05:38:16 +0300 Subject: [PATCH 140/237] Added SCALE codec implementation --- src/Codec/Scale.hs | 69 +++++++++++++ src/Codec/Scale/Base.hs | 172 +++++++++++++++++++++++++++++++++ src/Codec/Scale/Class.hs | 60 ++++++++++++ src/Codec/Scale/Compact.hs | 71 ++++++++++++++ src/Codec/Scale/Generic.hs | 89 +++++++++++++++++ src/Codec/Scale/TH.hs | 31 ++++++ src/Data/Solidity/Abi/Codec.hs | 1 + 7 files changed, 493 insertions(+) create mode 100644 src/Codec/Scale.hs create mode 100644 src/Codec/Scale/Base.hs create mode 100644 src/Codec/Scale/Class.hs create mode 100644 src/Codec/Scale/Compact.hs create mode 100644 src/Codec/Scale/Generic.hs create mode 100644 src/Codec/Scale/TH.hs diff --git a/src/Codec/Scale.hs b/src/Codec/Scale.hs new file mode 100644 index 00000000..92059fbe --- /dev/null +++ b/src/Codec/Scale.hs @@ -0,0 +1,69 @@ +{-# LANGUAGE TypeFamilies #-} + +-- | +-- Module : Codec.Scale.Class +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- The SCALE (Simple Concatenated Aggregate Little-Endian) Codec is +-- a lightweight, efficient, binary serialization and deserialization codec. +-- +-- It is designed for high-performance, copy-free encoding and decoding of data in +-- resource-constrained execution contexts, like the Substrate runtime. It is not +-- self-describing in any way and assumes the decoding context has all type +-- knowledge about the encoded data. +-- + +module Codec.Scale + ( encode + , decode + , encode' + , decode' + , Compact + ) where + +import Data.ByteArray (ByteArray, ByteArrayAccess, convert) +import Data.Serialize (runGet, runPut) +import Generics.SOP (Generic, Rep, from, to) + +import Codec.Scale.Base (Compact) +import Codec.Scale.Class (Decode (..), Encode (..), GDecode (..), + GEncode (..)) + +-- | Encode datatype to SCALE format. +encode :: (Encode a, ByteArray ba) + => a + -> ba +{-# INLINE encode #-} +encode = convert . runPut . put + +-- | Generic driven version of 'encode' +encode' :: (Generic a, + Rep a ~ rep, + GEncode rep, + ByteArray ba) + => a + -> ba +{-# INLINE encode' #-} +encode' = convert . runPut . gPut . from + +-- | Decode datatype from SCALE format. +decode :: (ByteArrayAccess ba, Decode a) + => ba + -> Either String a +{-# INLINE decode #-} +decode = runGet get . convert + +-- | Generic driven version of 'decode' +decode' :: (Generic a, + Rep a ~ rep, + GDecode rep, + ByteArrayAccess ba) + => ba + -> Either String a +{-# INLINE decode' #-} +decode' = runGet (to <$> gGet) . convert diff --git a/src/Codec/Scale/Base.hs b/src/Codec/Scale/Base.hs new file mode 100644 index 00000000..80e808ec --- /dev/null +++ b/src/Codec/Scale/Base.hs @@ -0,0 +1,172 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell #-} + +-- | +-- Module : Codec.Scale.Base +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Particular type instances. +-- + +module Codec.Scale.Base (Compact) where + +import Control.Monad (replicateM) +import Data.Int (Int16, Int32, Int64, Int8) +import Data.Serialize.Get (getInt16le, getInt32le, getInt64le, + getInt8, getWord16le, getWord32le, + getWord64le, getWord8) +import Data.Serialize.Put (putInt16le, putInt32le, putInt64le, + putInt8, putWord16le, putWord32le, + putWord64le, putWord8) +import Data.Word (Word16, Word32, Word64, Word8) +import Generics.SOP () + +import Codec.Scale.Class (Decode (..), Encode (..)) +import Codec.Scale.Compact (Compact (..)) +import Codec.Scale.Generic () +import Codec.Scale.TH (tupleInstances) + +-- +-- Boolean instance. +-- + +instance Encode Bool where + put False = putWord8 0 + put True = putWord8 1 + +instance Decode Bool where + get = do x <- getWord8 + case x of + 0 -> return False + 1 -> return True + _ -> fail "invalid boolean representation" + +-- +-- Integer instances. +-- + +instance Encode Word8 where + put = putWord8 + +instance Decode Word8 where + get = getWord8 + +instance Encode Word16 where + put = putWord16le + +instance Decode Word16 where + get = getWord16le + +instance Encode Word32 where + put = putWord32le + +instance Decode Word32 where + get = getWord32le + +instance Encode Word64 where + put = putWord64le + +instance Decode Word64 where + get = getWord64le + +instance Encode Int8 where + put = putInt8 + +instance Decode Int8 where + get = getInt8 + +instance Encode Int16 where + put = putInt16le + +instance Decode Int16 where + get = getInt16le + +instance Encode Int32 where + put = putInt32le + +instance Decode Int32 where + get = getInt32le + +instance Encode Int64 where + put = putInt64le + +instance Decode Int64 where + get = getInt64le + +-- +-- Option type instances. +-- + +-- Let's map `Maybe a` type to Rust `Option`: Just -> Some, Nothing -> None + +instance Encode a => Encode (Maybe a) where + put (Just a) = putWord8 1 >> put a + put Nothing = putWord8 0 + +instance Decode a => Decode (Maybe a) where + get = do + x <- getWord8 + case x of + 0 -> return Nothing + 1 -> Just <$> get + _ -> fail "unexpecded first byte decoding Option" + +-- Option is exception and it is always one byte + +instance {-# OVERLAPPING #-} Encode (Maybe Bool) where + put Nothing = putWord8 0 + put (Just False) = putWord8 1 + put (Just True) = putWord8 2 + +instance {-# OVERLAPPING #-} Decode (Maybe Bool) where + get = do + x <- getWord8 + case x of + 0 -> return Nothing + 1 -> return (Just False) + 2 -> return (Just True) + _ -> fail "unexpecded first byte decoding OptionBool" + +-- +-- Result type isntances. +-- + +-- Let's map `Ether a b` type to Rust `Result`: Left -> Error, Right -> Ok + +instance (Encode a, Encode b) => Encode (Either a b) where + put (Right a) = putWord8 0 >> put a + put (Left a) = putWord8 1 >> put a + +instance (Decode a, Decode b) => Decode (Either a b) where + get = do + x <- getWord8 + case x of + 0 -> Right <$> get + 1 -> Left <$> get + _ -> fail "unexpected first byte decoding Result" + + +-- +-- Tuple type instances. +-- + +$(concat <$> mapM tupleInstances [2..20]) + +-- +-- Vector type instances. +-- + +instance Encode a => Encode [a] where + put list = do + put (Compact $ length list) + mapM_ put list + +instance Decode a => Decode [a] where + get = do + Compact len <- get + replicateM len get diff --git a/src/Codec/Scale/Class.hs b/src/Codec/Scale/Class.hs new file mode 100644 index 00000000..4f215d0d --- /dev/null +++ b/src/Codec/Scale/Class.hs @@ -0,0 +1,60 @@ +{-# LANGUAGE DefaultSignatures #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE TypeFamilies #-} + +-- | +-- Module : Codec.Scale.Class +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- +-- + +module Codec.Scale.Class where + +import Data.Serialize (Get, Putter) +import Generics.SOP (Generic, Rep, from, to) + +-- | A class for encoding datatypes to SCALE format. +-- +-- If your compiler has support for the @DeriveGeneric@ and +-- @DefaultSignatures@ language extensions (@ghc >= 7.2.1@), +-- the 'put' method will have default generic implementations. +-- +-- To use this option, simply add a @deriving 'Generic'@ clause +-- to your datatype and declare a 'Encode' instance for it without +-- giving a definition for 'put'. +-- +class Encode a where + put :: Putter a + + default put :: (Generic a, Rep a ~ rep, GEncode rep) => Putter a + put = gPut . from + +-- | A class for encoding generically composed datatypes to SCALE format. +class GEncode a where + gPut :: Putter a + +-- | A class for decoding datatypes from SCALE format. +-- +-- If your compiler has support for the @DeriveGeneric@ and +-- @DefaultSignatures@ language extensions (@ghc >= 7.2.1@), +-- the 'get' method will have default generic implementations. +-- +-- To use this option, simply add a @deriving 'Generic'@ clause +-- to your datatype and declare a 'Decode' instance for it without +-- giving a definition for 'get'. +-- +class Decode a where + get :: Get a + + default get :: (Generic a, Rep a ~ rep, GDecode rep) => Get a + get = to <$> gGet + +-- | A class for decoding generically composed datatypes from SCALE format. +class GDecode a where + gGet :: Get a diff --git a/src/Codec/Scale/Compact.hs b/src/Codec/Scale/Compact.hs new file mode 100644 index 00000000..9d5eeadc --- /dev/null +++ b/src/Codec/Scale/Compact.hs @@ -0,0 +1,71 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} + +-- | +-- Module : Codec.Scale.Compact +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- Implementation of "compact" integer number codec. +-- + +module Codec.Scale.Compact (Compact(..)) where + +import Control.Monad (replicateM) +import Data.Bits (shiftL, shiftR, (.&.), (.|.)) +import Data.List (unfoldr) +import Data.Serialize.Get (getWord16le, getWord32le, getWord8, + lookAhead) +import Data.Serialize.Put (putWord16le, putWord32le, putWord8) + +import Codec.Scale.Class (Decode (..), Encode (..)) + +-- | A "compact" or general integer encoding is sufficient for encoding +-- large integers (up to 2**536) and is more efficient at encoding most +-- values than the fixed-width version. +newtype Compact a = Compact { unCompact :: a } + deriving (Eq, Ord, Num) + +instance Show a => Show (Compact a) where + show = ("Compact " ++) . show . unCompact + +instance Integral a => Encode (Compact a) where + put (Compact x) + | x >= 0 && x < 64 = singleByteMode x + | x >= 64 && x < (2^14-1) = twoByteMode x + | x >= (2^14-1) && x < (2^30-1) = fourByteMode x + | x >= (2^30-1) && x < (2^536-1) = bigIntegerMode x + | otherwise = error $ show (toInteger x) ++ " could not be encoded as compact number" + where + singleByteMode a = putWord8 (fromIntegral a `shiftL` 2) + twoByteMode a = putWord16le (fromIntegral a `shiftL` 2 .|. 1) + fourByteMode a = putWord32le (fromIntegral a `shiftL` 2 .|. 2) + bigIntegerMode a = do + let step 0 = Nothing + step i = Just (fromIntegral i, i `shiftR` 8) + unroll = unfoldr step (toInteger a) + putWord8 (fromIntegral (length unroll) `shiftL` 2 .|. 3) + mapM_ putWord8 unroll + +instance Integral a => Decode (Compact a) where + get = do + mode <- lookAhead ((3 .&.) <$> getWord8) + x <- case mode of + 0 -> fromIntegral <$> singleByteMode + 1 -> fromIntegral <$> twoByteMode + 2 -> fromIntegral <$> fourByteMode + 3 -> bigIntegerMode + _ -> fail "unexpected prefix decoding compact number" + return (Compact x) + where + singleByteMode = flip shiftR 2 <$> getWord8 + twoByteMode = flip shiftR 2 <$> getWord16le + fourByteMode = flip shiftR 2 <$> getWord32le + bigIntegerMode = do + let unstep b a = a `shiftL` 8 .|. fromIntegral b + roll = fromInteger . foldr unstep 0 + len <- flip shiftR 2 <$> getWord8 + roll <$> replicateM (fromIntegral len) getWord8 diff --git a/src/Codec/Scale/Generic.hs b/src/Codec/Scale/Generic.hs new file mode 100644 index 00000000..d83c80ee --- /dev/null +++ b/src/Codec/Scale/Generic.hs @@ -0,0 +1,89 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeInType #-} +{-# LANGUAGE TypeOperators #-} + +-- | +-- Module : Codec.Scale.Generic +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- This module defines generic codec instances for data structures (including tuples) +-- and enums (tagged-unions in Rust). +-- + +module Codec.Scale.Generic () where + +import Data.Serialize.Get (Get, getWord8) +import Data.Serialize.Put (PutM, putWord8) +import Data.Word (Word8) +import Generics.SOP (All, Compose, I (..), NP (..), NS (..), + SOP (..), unSOP, unZ) + +import Codec.Scale.Class (Decode (..), Encode (..), GDecode (..), + GEncode (..)) + +-- Enum has multiple sum types. +instance ( GEncode (NP f xs) + , GEncode (NP f ys) + , All (GEncode `Compose` NP f) xss + ) => GEncode (SOP f (xs ': ys ': xss)) where + gPut = go 0 . unSOP + where + go :: forall f as . All (GEncode `Compose` f) as => Word8 -> NS f as -> PutM () + go !acc (Z x) = putWord8 acc >> gPut x + go !acc (S x) = go (acc + 1) x + +-- Structures has only one sum type. +instance GEncode (NP f xs) => GEncode (SOP f '[xs]) where + gPut = gPut . unZ . unSOP + +-- Product serialization is just encode each field step by step. +instance (Encode a, GEncode (NP I as)) => GEncode (NP I (a ': as)) where + gPut (I a :* as) = put a >> gPut as + +-- Finish when all fields handled. +instance GEncode (NP I '[]) where + gPut _ = mempty + +-- | Enum parser definition. +-- +-- The index of sum type to parse given as an argument. +class EnumParser xs where + enumParser :: All (GDecode `Compose` NP f) xs => Word8 -> Get (NS (NP f) xs) + +-- Enumerate enum index, zero means that we reach the goal. +instance EnumParser as => EnumParser (a ': as) where + enumParser !i | i > 0 = S <$> enumParser (i - 1) + | otherwise = Z <$> gGet + +-- When index out of type scope raise the error. +instance EnumParser '[] where + enumParser _ = fail "wrong prefix during enum decoding" + +-- Decode enum when multiple sum types. +instance ( GDecode (NP f xs) + , GDecode (NP f ys) + , All (GDecode `Compose` NP f) xss + , EnumParser xss + ) => GDecode (SOP f (xs ': ys ': xss)) where + gGet = SOP <$> (enumParser =<< getWord8) + +-- Decode plain structure when only one sum type. +instance GDecode (NP f as) => GDecode (SOP f '[as]) where + gGet = SOP . Z <$> gGet + +-- Decode each field in sequence. +instance (Decode a, GDecode (NP I as)) => GDecode (NP I (a ': as)) where + gGet = (:*) <$> (I <$> get) <*> gGet + +-- Finish decoding when empty. +instance GDecode (NP I '[]) where + gGet = return Nil diff --git a/src/Codec/Scale/TH.hs b/src/Codec/Scale/TH.hs new file mode 100644 index 00000000..813539f0 --- /dev/null +++ b/src/Codec/Scale/TH.hs @@ -0,0 +1,31 @@ +{-# LANGUAGE TemplateHaskell #-} + +-- | +-- Module : Codec.Scale.TH +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- It contains template haskell SCALE helper functions. +-- + +module Codec.Scale.TH where + + +import Control.Monad (replicateM) +import Language.Haskell.TH (DecsQ, Type (VarT), appT, conT, cxt, + instanceD, newName, tupleT) + +import Codec.Scale.Class (Decode, Encode) + +tupleInstances :: Int -> DecsQ +tupleInstances n = do + vars <- replicateM n $ newName "a" + let types = fmap (pure . VarT) vars + sequence $ + [ instanceD (cxt $ map (appT $ conT ''Decode) types) (appT (conT ''Decode) (foldl appT (tupleT n) types)) [] + , instanceD (cxt $ map (appT $ conT ''Encode) types) (appT (conT ''Encode) (foldl appT (tupleT n) types)) [] + ] diff --git a/src/Data/Solidity/Abi/Codec.hs b/src/Data/Solidity/Abi/Codec.hs index 9a7b53bc..1db81a56 100644 --- a/src/Data/Solidity/Abi/Codec.hs +++ b/src/Data/Solidity/Abi/Codec.hs @@ -63,4 +63,5 @@ decode' :: (Generic a, ByteArrayAccess ba) => ba -> Either String a +{-# INLINE decode' #-} decode' = runGet (to <$> gAbiGet) . convert From 2333b7e73374b053241998f7240b9f8dd22a084f Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 6 Jun 2020 06:28:07 +0300 Subject: [PATCH 141/237] Phantom type based codec modificators * Implement Compact phantom type * Implement Skip phantom type --- src/Codec/Scale/Base.hs | 10 +++++++--- src/Codec/Scale/Compact.hs | 21 +++++++++------------ src/Codec/Scale/Skip.hs | 31 +++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 src/Codec/Scale/Skip.hs diff --git a/src/Codec/Scale/Base.hs b/src/Codec/Scale/Base.hs index 80e808ec..8653f73c 100644 --- a/src/Codec/Scale/Base.hs +++ b/src/Codec/Scale/Base.hs @@ -23,11 +23,12 @@ import Data.Serialize.Get (getInt16le, getInt32le, getInt64le, import Data.Serialize.Put (putInt16le, putInt32le, putInt64le, putInt8, putWord16le, putWord32le, putWord64le, putWord8) +import Data.Tagged (Tagged (..)) import Data.Word (Word16, Word32, Word64, Word8) import Generics.SOP () import Codec.Scale.Class (Decode (..), Encode (..)) -import Codec.Scale.Compact (Compact (..)) +import Codec.Scale.Compact (Compact) import Codec.Scale.Generic () import Codec.Scale.TH (tupleInstances) @@ -163,10 +164,13 @@ $(concat <$> mapM tupleInstances [2..20]) instance Encode a => Encode [a] where put list = do - put (Compact $ length list) + let len :: Tagged Compact Int + len = Tagged (length list) + put len mapM_ put list instance Decode a => Decode [a] where get = do - Compact len <- get + compactLen <- get + let len = unTagged (compactLen :: Tagged Compact Int) replicateM len get diff --git a/src/Codec/Scale/Compact.hs b/src/Codec/Scale/Compact.hs index 9d5eeadc..22fef400 100644 --- a/src/Codec/Scale/Compact.hs +++ b/src/Codec/Scale/Compact.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE FlexibleInstances #-} -- | -- Module : Codec.Scale.Compact @@ -9,10 +9,10 @@ -- Stability : experimental -- Portability : noportable -- --- Implementation of "compact" integer number codec. +-- Efficient general integer codec. -- -module Codec.Scale.Compact (Compact(..)) where +module Codec.Scale.Compact (Compact) where import Control.Monad (replicateM) import Data.Bits (shiftL, shiftR, (.&.), (.|.)) @@ -20,20 +20,17 @@ import Data.List (unfoldr) import Data.Serialize.Get (getWord16le, getWord32le, getWord8, lookAhead) import Data.Serialize.Put (putWord16le, putWord32le, putWord8) +import Data.Tagged (Tagged (..)) import Codec.Scale.Class (Decode (..), Encode (..)) -- | A "compact" or general integer encoding is sufficient for encoding -- large integers (up to 2**536) and is more efficient at encoding most -- values than the fixed-width version. -newtype Compact a = Compact { unCompact :: a } - deriving (Eq, Ord, Num) +data Compact -instance Show a => Show (Compact a) where - show = ("Compact " ++) . show . unCompact - -instance Integral a => Encode (Compact a) where - put (Compact x) +instance Integral a => Encode (Tagged Compact a) where + put (Tagged x) | x >= 0 && x < 64 = singleByteMode x | x >= 64 && x < (2^14-1) = twoByteMode x | x >= (2^14-1) && x < (2^30-1) = fourByteMode x @@ -50,7 +47,7 @@ instance Integral a => Encode (Compact a) where putWord8 (fromIntegral (length unroll) `shiftL` 2 .|. 3) mapM_ putWord8 unroll -instance Integral a => Decode (Compact a) where +instance Integral a => Decode (Tagged Compact a) where get = do mode <- lookAhead ((3 .&.) <$> getWord8) x <- case mode of @@ -59,7 +56,7 @@ instance Integral a => Decode (Compact a) where 2 -> fromIntegral <$> fourByteMode 3 -> bigIntegerMode _ -> fail "unexpected prefix decoding compact number" - return (Compact x) + return (Tagged x) where singleByteMode = flip shiftR 2 <$> getWord8 twoByteMode = flip shiftR 2 <$> getWord16le diff --git a/src/Codec/Scale/Skip.hs b/src/Codec/Scale/Skip.hs new file mode 100644 index 00000000..f83e2f53 --- /dev/null +++ b/src/Codec/Scale/Skip.hs @@ -0,0 +1,31 @@ +{-# LANGUAGE FlexibleInstances #-} + +-- | +-- Module : Codec.Scale.Skip +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- This type helps to skip fields in encoded data type. +-- + +module Codec.Scale.Skip (Skip) where + +import Data.Default (Default (..)) +import Data.Tagged (Tagged (..)) + +import Codec.Scale.Class (Decode (..), Encode (..)) + +-- | This phantom type hide filed from encoding context. It's useful in cases +-- when serialization impossible or not needed. For decoding type should have +-- default value for the field. +data Skip + +instance Encode (Tagged Skip a) where + put _ = return () + +instance Default a => Decode (Tagged Skip a) where + get = return (Tagged def) From ca2faa02a7dcfb83756814ac757f97108392af14 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 6 Jun 2020 06:32:36 +0300 Subject: [PATCH 142/237] Codec.Scale.Base -> Codec.Scale.Core --- src/Codec/Scale.hs | 4 ++-- src/Codec/Scale/{Base.hs => Core.hs} | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) rename src/Codec/Scale/{Base.hs => Core.hs} (96%) diff --git a/src/Codec/Scale.hs b/src/Codec/Scale.hs index 92059fbe..351f9951 100644 --- a/src/Codec/Scale.hs +++ b/src/Codec/Scale.hs @@ -23,16 +23,16 @@ module Codec.Scale , decode , encode' , decode' - , Compact + , module Core ) where import Data.ByteArray (ByteArray, ByteArrayAccess, convert) import Data.Serialize (runGet, runPut) import Generics.SOP (Generic, Rep, from, to) -import Codec.Scale.Base (Compact) import Codec.Scale.Class (Decode (..), Encode (..), GDecode (..), GEncode (..)) +import Codec.Scale.Core as Core -- | Encode datatype to SCALE format. encode :: (Encode a, ByteArray ba) diff --git a/src/Codec/Scale/Base.hs b/src/Codec/Scale/Core.hs similarity index 96% rename from src/Codec/Scale/Base.hs rename to src/Codec/Scale/Core.hs index 8653f73c..6f9769cc 100644 --- a/src/Codec/Scale/Base.hs +++ b/src/Codec/Scale/Core.hs @@ -2,7 +2,7 @@ {-# LANGUAGE TemplateHaskell #-} -- | --- Module : Codec.Scale.Base +-- Module : Codec.Scale.Core -- Copyright : Alexander Krupenkin 2016 -- License : BSD3 -- @@ -10,10 +10,10 @@ -- Stability : experimental -- Portability : unportable -- --- Particular type instances. +-- Particular core type instances. -- -module Codec.Scale.Base (Compact) where +module Codec.Scale.Core (Compact, Skip) where import Control.Monad (replicateM) import Data.Int (Int16, Int32, Int64, Int8) @@ -30,6 +30,7 @@ import Generics.SOP () import Codec.Scale.Class (Decode (..), Encode (..)) import Codec.Scale.Compact (Compact) import Codec.Scale.Generic () +import Codec.Scale.Skip (Skip) import Codec.Scale.TH (tupleInstances) -- From 6b557b18f5dda1d7ffeece067401b8c7c3907172 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 6 Jun 2020 07:33:23 +0300 Subject: [PATCH 143/237] Added efficient vector codecs --- package.yaml | 2 ++ src/Codec/Scale/Core.hs | 42 ++++++++++++++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/package.yaml b/package.yaml index f2658632..56366771 100644 --- a/package.yaml +++ b/package.yaml @@ -43,6 +43,8 @@ dependencies: - bytestring >=0.10.8.1 && <0.11 - cryptonite >=0.23 && <0.27 - exceptions >=0.8.3 && <0.11 +- bitvec >=1.0.0 && <2.0 +- vector >=0.12 && <0.13 - basement >=0.0.4 && <0.1 - machines >=0.6.3 && <0.8 - OneTuple >=0.2.1 && <0.3 diff --git a/src/Codec/Scale/Core.hs b/src/Codec/Scale/Core.hs index 6f9769cc..7fc0a3e6 100644 --- a/src/Codec/Scale/Core.hs +++ b/src/Codec/Scale/Core.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TemplateHaskell #-} -- | -- Module : Codec.Scale.Core @@ -16,6 +17,7 @@ module Codec.Scale.Core (Compact, Skip) where import Control.Monad (replicateM) +import Data.Bit (Bit, castFromWords8, cloneToWords8) import Data.Int (Int16, Int32, Int64, Int8) import Data.Serialize.Get (getInt16le, getInt32le, getInt64le, getInt8, getWord16le, getWord32le, @@ -23,7 +25,9 @@ import Data.Serialize.Get (getInt16le, getInt32le, getInt64le, import Data.Serialize.Put (putInt16le, putInt32le, putInt64le, putInt8, putWord16le, putWord32le, putWord64le, putWord8) -import Data.Tagged (Tagged (..)) +import Data.Tagged (Tagged) +import Data.Vector.Unboxed (Unbox, Vector) +import qualified Data.Vector.Unboxed as V import Data.Word (Word16, Word32, Word64, Word8) import Generics.SOP () @@ -166,12 +170,36 @@ $(concat <$> mapM tupleInstances [2..20]) instance Encode a => Encode [a] where put list = do let len :: Tagged Compact Int - len = Tagged (length list) + len = fromIntegral (length list) put len mapM_ put list instance Decode a => Decode [a] where get = do - compactLen <- get - let len = unTagged (compactLen :: Tagged Compact Int) - replicateM len get + (len :: Tagged Compact Int) <- get + replicateM (fromIntegral len) get + +instance (Encode a, Unbox a) => Encode (Vector a) where + put vec = do + let len :: Tagged Compact Int + len = fromIntegral (V.length vec) + put len + V.mapM_ put vec + +instance (Decode a, Unbox a) => Decode (Vector a) where + get = do + (len :: Tagged Compact Int) <- get + V.replicateM (fromIntegral len) get + +instance Encode (Vector Bit) where + put vec = do + let encoded = cloneToWords8 vec + len :: Tagged Compact Int + len = fromIntegral (V.length encoded) + put len + V.mapM_ put encoded + +instance Decode (Vector Bit) where + get = do + (len :: Tagged Compact Int) <- get + castFromWords8 <$> V.replicateM (fromIntegral len) get From 2d344d5e9a81782a485a8c743cbb44e52999cee0 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 6 Jun 2020 08:03:06 +0300 Subject: [PATCH 144/237] Added helper type for singleton enum codec --- src/Codec/Scale/Core.hs | 3 +-- src/Codec/Scale/SingletonEnum.hs | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 src/Codec/Scale/SingletonEnum.hs diff --git a/src/Codec/Scale/Core.hs b/src/Codec/Scale/Core.hs index 7fc0a3e6..2c91b61e 100644 --- a/src/Codec/Scale/Core.hs +++ b/src/Codec/Scale/Core.hs @@ -14,7 +14,7 @@ -- Particular core type instances. -- -module Codec.Scale.Core (Compact, Skip) where +module Codec.Scale.Core (Compact) where import Control.Monad (replicateM) import Data.Bit (Bit, castFromWords8, cloneToWords8) @@ -34,7 +34,6 @@ import Generics.SOP () import Codec.Scale.Class (Decode (..), Encode (..)) import Codec.Scale.Compact (Compact) import Codec.Scale.Generic () -import Codec.Scale.Skip (Skip) import Codec.Scale.TH (tupleInstances) -- diff --git a/src/Codec/Scale/SingletonEnum.hs b/src/Codec/Scale/SingletonEnum.hs new file mode 100644 index 00000000..3152b92f --- /dev/null +++ b/src/Codec/Scale/SingletonEnum.hs @@ -0,0 +1,33 @@ +{-# LANGUAGE FlexibleInstances #-} + +-- | +-- Module : Codec.Scale.SingletonEnum +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : noportable +-- +-- This type helps to encode/decode singleton Rust enums like: +-- `enum Enum { Data { some_data: u32 } }` +-- + +module Codec.Scale.SingletonEnum (SingletonEnum) where + +import Data.Serialize.Get (getWord8) +import Data.Serialize.Put (putWord8) +import Data.Tagged (Tagged (..)) + +import Codec.Scale.Class (Decode (..), Encode (..)) + +-- | Haskell don't permit to make Rust-like enum type with only one element. +-- For this reason it is impossible to make generic parser for singleton enum type. +-- This phantom type helps to parse Rust encoded singleton enums. +data SingletonEnum + +instance Encode a => Encode (Tagged SingletonEnum a) where + put x = putWord8 0 >> put (unTagged x) + +instance Decode a => Decode (Tagged SingletonEnum a) where + get = getWord8 >> (Tagged <$> get) From 5a547557b5bd246a9c161461680eab975ac1a43c Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 6 Jun 2020 12:31:29 +0300 Subject: [PATCH 145/237] Newtype interface looks better that Tagged --- src/Codec/Scale/Compact.hs | 20 ++++++++++---------- src/Codec/Scale/Core.hs | 29 +++++++++++------------------ src/Codec/Scale/SingletonEnum.hs | 17 +++++++---------- src/Codec/Scale/Skip.hs | 19 ++++++++----------- 4 files changed, 36 insertions(+), 49 deletions(-) diff --git a/src/Codec/Scale/Compact.hs b/src/Codec/Scale/Compact.hs index 22fef400..37fbb0c4 100644 --- a/src/Codec/Scale/Compact.hs +++ b/src/Codec/Scale/Compact.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE FlexibleInstances #-} - -- | -- Module : Codec.Scale.Compact -- Copyright : Alexander Krupenkin 2016 @@ -12,7 +10,7 @@ -- Efficient general integer codec. -- -module Codec.Scale.Compact (Compact) where +module Codec.Scale.Compact (Compact(..)) where import Control.Monad (replicateM) import Data.Bits (shiftL, shiftR, (.&.), (.|.)) @@ -20,17 +18,20 @@ import Data.List (unfoldr) import Data.Serialize.Get (getWord16le, getWord32le, getWord8, lookAhead) import Data.Serialize.Put (putWord16le, putWord32le, putWord8) -import Data.Tagged (Tagged (..)) import Codec.Scale.Class (Decode (..), Encode (..)) -- | A "compact" or general integer encoding is sufficient for encoding -- large integers (up to 2**536) and is more efficient at encoding most -- values than the fixed-width version. -data Compact +newtype Compact a = Compact { unCompact :: a } + deriving (Eq, Ord) + +instance Show a => Show (Compact a) where + show = ("Compact " ++) . show -instance Integral a => Encode (Tagged Compact a) where - put (Tagged x) +instance Integral a => Encode (Compact a) where + put (Compact x) | x >= 0 && x < 64 = singleByteMode x | x >= 64 && x < (2^14-1) = twoByteMode x | x >= (2^14-1) && x < (2^30-1) = fourByteMode x @@ -47,16 +48,15 @@ instance Integral a => Encode (Tagged Compact a) where putWord8 (fromIntegral (length unroll) `shiftL` 2 .|. 3) mapM_ putWord8 unroll -instance Integral a => Decode (Tagged Compact a) where +instance Integral a => Decode (Compact a) where get = do mode <- lookAhead ((3 .&.) <$> getWord8) - x <- case mode of + Compact <$> case mode of 0 -> fromIntegral <$> singleByteMode 1 -> fromIntegral <$> twoByteMode 2 -> fromIntegral <$> fourByteMode 3 -> bigIntegerMode _ -> fail "unexpected prefix decoding compact number" - return (Tagged x) where singleByteMode = flip shiftR 2 <$> getWord8 twoByteMode = flip shiftR 2 <$> getWord16le diff --git a/src/Codec/Scale/Core.hs b/src/Codec/Scale/Core.hs index 2c91b61e..91ab4eeb 100644 --- a/src/Codec/Scale/Core.hs +++ b/src/Codec/Scale/Core.hs @@ -14,7 +14,7 @@ -- Particular core type instances. -- -module Codec.Scale.Core (Compact) where +module Codec.Scale.Core (Compact(..)) where import Control.Monad (replicateM) import Data.Bit (Bit, castFromWords8, cloneToWords8) @@ -25,14 +25,13 @@ import Data.Serialize.Get (getInt16le, getInt32le, getInt64le, import Data.Serialize.Put (putInt16le, putInt32le, putInt64le, putInt8, putWord16le, putWord32le, putWord64le, putWord8) -import Data.Tagged (Tagged) import Data.Vector.Unboxed (Unbox, Vector) import qualified Data.Vector.Unboxed as V import Data.Word (Word16, Word32, Word64, Word8) import Generics.SOP () import Codec.Scale.Class (Decode (..), Encode (..)) -import Codec.Scale.Compact (Compact) +import Codec.Scale.Compact (Compact (..)) import Codec.Scale.Generic () import Codec.Scale.TH (tupleInstances) @@ -168,37 +167,31 @@ $(concat <$> mapM tupleInstances [2..20]) instance Encode a => Encode [a] where put list = do - let len :: Tagged Compact Int - len = fromIntegral (length list) - put len + put (Compact $ length list) mapM_ put list instance Decode a => Decode [a] where get = do - (len :: Tagged Compact Int) <- get - replicateM (fromIntegral len) get + len <- get + replicateM (unCompact len) get instance (Encode a, Unbox a) => Encode (Vector a) where put vec = do - let len :: Tagged Compact Int - len = fromIntegral (V.length vec) - put len + put (Compact $ V.length vec) V.mapM_ put vec instance (Decode a, Unbox a) => Decode (Vector a) where get = do - (len :: Tagged Compact Int) <- get - V.replicateM (fromIntegral len) get + len <- get + V.replicateM (unCompact len) get instance Encode (Vector Bit) where put vec = do let encoded = cloneToWords8 vec - len :: Tagged Compact Int - len = fromIntegral (V.length encoded) - put len + put (Compact $ V.length encoded) V.mapM_ put encoded instance Decode (Vector Bit) where get = do - (len :: Tagged Compact Int) <- get - castFromWords8 <$> V.replicateM (fromIntegral len) get + len <- get + castFromWords8 <$> V.replicateM (unCompact len) get diff --git a/src/Codec/Scale/SingletonEnum.hs b/src/Codec/Scale/SingletonEnum.hs index 3152b92f..02c1dfd4 100644 --- a/src/Codec/Scale/SingletonEnum.hs +++ b/src/Codec/Scale/SingletonEnum.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE FlexibleInstances #-} - -- | -- Module : Codec.Scale.SingletonEnum -- Copyright : Alexander Krupenkin 2016 @@ -13,21 +11,20 @@ -- `enum Enum { Data { some_data: u32 } }` -- -module Codec.Scale.SingletonEnum (SingletonEnum) where +module Codec.Scale.SingletonEnum (SingletonEnum(..)) where import Data.Serialize.Get (getWord8) import Data.Serialize.Put (putWord8) -import Data.Tagged (Tagged (..)) import Codec.Scale.Class (Decode (..), Encode (..)) -- | Haskell don't permit to make Rust-like enum type with only one element. -- For this reason it is impossible to make generic parser for singleton enum type. --- This phantom type helps to parse Rust encoded singleton enums. -data SingletonEnum +-- This type helps to parse Rust encoded singleton enums. +newtype SingletonEnum a = SingletonEnum { unSingletonEnum :: a } -instance Encode a => Encode (Tagged SingletonEnum a) where - put x = putWord8 0 >> put (unTagged x) +instance Encode a => Encode (SingletonEnum a) where + put (SingletonEnum x) = putWord8 0 >> put x -instance Decode a => Decode (Tagged SingletonEnum a) where - get = getWord8 >> (Tagged <$> get) +instance Decode a => Decode (SingletonEnum a) where + get = getWord8 >> (SingletonEnum <$> get) diff --git a/src/Codec/Scale/Skip.hs b/src/Codec/Scale/Skip.hs index f83e2f53..3c52be96 100644 --- a/src/Codec/Scale/Skip.hs +++ b/src/Codec/Scale/Skip.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE FlexibleInstances #-} - -- | -- Module : Codec.Scale.Skip -- Copyright : Alexander Krupenkin 2016 @@ -12,20 +10,19 @@ -- This type helps to skip fields in encoded data type. -- -module Codec.Scale.Skip (Skip) where +module Codec.Scale.Skip (Skip(..)) where import Data.Default (Default (..)) -import Data.Tagged (Tagged (..)) import Codec.Scale.Class (Decode (..), Encode (..)) --- | This phantom type hide filed from encoding context. It's useful in cases --- when serialization impossible or not needed. For decoding type should have --- default value for the field. -data Skip +-- | This type hide filed from encoding context. +-- It's useful in cases when serialization impossible or not needed. +-- For decoding wrapped type should have 'Default' instance. +newtype Skip a = Skip { unSkip :: a } -instance Encode (Tagged Skip a) where +instance Encode (Skip a) where put _ = return () -instance Default a => Decode (Tagged Skip a) where - get = return (Tagged def) +instance Default a => Decode (Skip a) where + get = return (Skip def) From 1607a55b75020433ca1c1da4e0dddb6ea1aa6188 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 7 Jun 2020 06:40:38 +0300 Subject: [PATCH 146/237] Fix compact instance for fixed-size types --- src/Codec/Scale/Compact.hs | 24 +++++++++++++----------- src/Codec/Scale/Core.hs | 4 ++-- src/Codec/Scale/Skip.hs | 6 +++++- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/Codec/Scale/Compact.hs b/src/Codec/Scale/Compact.hs index 37fbb0c4..a10e39ef 100644 --- a/src/Codec/Scale/Compact.hs +++ b/src/Codec/Scale/Compact.hs @@ -28,23 +28,25 @@ newtype Compact a = Compact { unCompact :: a } deriving (Eq, Ord) instance Show a => Show (Compact a) where - show = ("Compact " ++) . show + show = ("Compact " ++) . show . unCompact instance Integral a => Encode (Compact a) where put (Compact x) - | x >= 0 && x < 64 = singleByteMode x - | x >= 64 && x < (2^14-1) = twoByteMode x - | x >= (2^14-1) && x < (2^30-1) = fourByteMode x - | x >= (2^30-1) && x < (2^536-1) = bigIntegerMode x - | otherwise = error $ show (toInteger x) ++ " could not be encoded as compact number" + | n < 0 = error "negatives not supported by compact codec" + | n < 64 = singleByteMode + | n < 2^14 = twoByteMode + | n < 2^30 = fourByteMode + | n < 2^536 = bigIntegerMode + | otherwise = error $ "unable to encode " ++ show n ++ " as compact" where - singleByteMode a = putWord8 (fromIntegral a `shiftL` 2) - twoByteMode a = putWord16le (fromIntegral a `shiftL` 2 .|. 1) - fourByteMode a = putWord32le (fromIntegral a `shiftL` 2 .|. 2) - bigIntegerMode a = do + n = toInteger x + singleByteMode = putWord8 (fromIntegral x `shiftL` 2) + twoByteMode = putWord16le (fromIntegral x `shiftL` 2 .|. 1) + fourByteMode = putWord32le (fromIntegral x `shiftL` 2 .|. 2) + bigIntegerMode = do let step 0 = Nothing step i = Just (fromIntegral i, i `shiftR` 8) - unroll = unfoldr step (toInteger a) + unroll = unfoldr step n putWord8 (fromIntegral (length unroll) `shiftL` 2 .|. 3) mapM_ putWord8 unroll diff --git a/src/Codec/Scale/Core.hs b/src/Codec/Scale/Core.hs index 91ab4eeb..39abd09f 100644 --- a/src/Codec/Scale/Core.hs +++ b/src/Codec/Scale/Core.hs @@ -185,13 +185,13 @@ instance (Decode a, Unbox a) => Decode (Vector a) where len <- get V.replicateM (unCompact len) get -instance Encode (Vector Bit) where +instance {-# OVERLAPPING #-} Encode (Vector Bit) where put vec = do let encoded = cloneToWords8 vec put (Compact $ V.length encoded) V.mapM_ put encoded -instance Decode (Vector Bit) where +instance {-# OVERLAPPING #-} Decode (Vector Bit) where get = do len <- get castFromWords8 <$> V.replicateM (unCompact len) get diff --git a/src/Codec/Scale/Skip.hs b/src/Codec/Scale/Skip.hs index 3c52be96..54614f93 100644 --- a/src/Codec/Scale/Skip.hs +++ b/src/Codec/Scale/Skip.hs @@ -20,9 +20,13 @@ import Codec.Scale.Class (Decode (..), Encode (..)) -- It's useful in cases when serialization impossible or not needed. -- For decoding wrapped type should have 'Default' instance. newtype Skip a = Skip { unSkip :: a } + deriving (Eq, Ord, Show) instance Encode (Skip a) where put _ = return () instance Default a => Decode (Skip a) where - get = return (Skip def) + get = return def + +instance Default a => Default (Skip a) where + def = Skip def From ef4e253df60117a13f7f72fcfe9a2a0c35b660ca Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 7 Jun 2020 07:23:45 +0300 Subject: [PATCH 147/237] Added SCALE codec unit tests --- unit/Codec/Scale/Test/CoreSpec.hs | 255 ++++++++++++++++++ .../Codec/Scale/Test/SingleFieldStructSpec.hs | 107 ++++++++ unit/Codec/Scale/Test/SkipSpec.hs | 82 ++++++ 3 files changed, 444 insertions(+) create mode 100644 unit/Codec/Scale/Test/CoreSpec.hs create mode 100644 unit/Codec/Scale/Test/SingleFieldStructSpec.hs create mode 100644 unit/Codec/Scale/Test/SkipSpec.hs diff --git a/unit/Codec/Scale/Test/CoreSpec.hs b/unit/Codec/Scale/Test/CoreSpec.hs new file mode 100644 index 00000000..721ac6d7 --- /dev/null +++ b/unit/Codec/Scale/Test/CoreSpec.hs @@ -0,0 +1,255 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} + +-- | +-- Module : Codec.Scale.Test.CoreSpec +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Ported to Haskell rust test spec: +-- https://github.com/paritytech/parity-scale-codec/blob/master/tests/single_field_struct_encoding.rs +-- + +module Codec.Scale.Test.CoreSpec where + +import Control.Monad (forM_) +import Data.Bit (castFromWords8) +import Data.Bits (bit) +import Data.ByteString (ByteString) +import qualified Data.ByteString as BS (length, unpack) +import Data.Int (Int16, Int32, Int64, Int8) +import Data.Vector.Unboxed (Vector) +import qualified Data.Vector.Unboxed as V (fromList) +import Data.Word (Word16, Word32, Word64, Word8) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) +import Test.Hspec +import Test.Hspec.QuickCheck + +import Codec.Scale +import Codec.Scale.Class + +data Unit = Unit + deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) + +data Indexed = Indexed Word32 Word64 + deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) + +data Struct a b c = Struct + { _a :: a + , _b :: b + , _c :: c + } + deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) + +data StructWithPhantom a = StructWithPhantom + { a1 :: Word32 + , b1 :: Word64 + } + deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) + +type TestType = Struct Word32 Word64 (Vector Word8); + +data EnumType = A + | B Word32 Word64 + | C + { a2 :: Word32 + , b2 :: Word64 + } + deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) + +data TestHasCompact a = TestHasCompact + { bar1 :: Compact a + } + deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) + +data TestHasCompactEnum a = Unnamed (Compact a) + | Named + { bar2 :: Compact a + } + | UnnamedCompact (Compact a) + | NamedCompact + { bar3 :: Compact a + } + deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) + +data TestGenericEnum = UnnamedGenericEnum (Compact Integer) (Vector Word16) + | NamedGenericEnum + { bar5 :: Compact Word64 + , bar6 :: Word32 + } + deriving (Eq, Show, GHC.Generic, Generic) + +data RecursiveVariant1 a = RecursiveVariant1 + { payload1 :: a + , other1 :: [RecursiveVariant1 a] + } + deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) + +data RecursiveVariant2 a b n = RecursiveVariant2 + { payload2 :: n + , other2 :: [Struct a b (RecursiveVariant1 n)] + } + deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) + +spec :: Spec +spec = parallel $ do + describe "Regular types" $ do + prop "Bool" $ \(v :: Bool) -> decode (encode v :: ByteString) == Right v + + prop "Option" $ \(v :: Maybe Bool) -> decode (encode v :: ByteString) == Right v + + prop "Result>" $ \v vec -> do + let success = Right v :: Either (Vector Word8) Bool + failure = Left (V.fromList vec) :: Either (Vector Word8) Bool + decode (encode success :: ByteString) == Right success + && decode (encode failure :: ByteString) == Right failure + + prop "u64" $ \(v :: Word64) -> decode (encode v :: ByteString) == Right v + prop "u32" $ \(v :: Word32) -> decode (encode v :: ByteString) == Right v + prop "u16" $ \(v :: Word16) -> decode (encode v :: ByteString) == Right v + prop "u8" $ \(v :: Word8) -> decode (encode v :: ByteString) == Right v + + prop "i64" $ \(v :: Int64) -> decode (encode v :: ByteString) == Right v + prop "i32" $ \(v :: Int32) -> decode (encode v :: ByteString) == Right v + prop "i16" $ \(v :: Int16) -> decode (encode v :: ByteString) == Right v + prop "i8" $ \(v :: Int8) -> decode (encode v :: ByteString) == Right v + + prop "Compact" $ \(v :: Integer) -> decode (encode (Compact $ abs v) :: ByteString) == Right (Compact $ abs v) + prop "Compact" $ \(v :: Word64) -> decode (encode (Compact v) :: ByteString) == Right (Compact v) + prop "Compact" $ \(v :: Word32) -> decode (encode (Compact v) :: ByteString) == Right (Compact v) + prop "Compact" $ \(v :: Word16) -> decode (encode (Compact v) :: ByteString) == Right (Compact v) + prop "Compact" $ \(v :: Word8) -> decode (encode (Compact v) :: ByteString) == Right (Compact v) + + prop "Vector" $ \(v :: [Word64]) -> decode (encode (V.fromList v) :: ByteString) == Right v + prop "Vector" $ \(v :: [Word32]) -> decode (encode (V.fromList v) :: ByteString) == Right v + prop "Vector" $ \(v :: [Word16]) -> decode (encode (V.fromList v) :: ByteString) == Right v + prop "Vector" $ \(v :: [Word8]) -> decode (encode (V.fromList v) :: ByteString) == Right v + + prop "BitVec" $ \(v :: [Word8]) -> decode (encode $ castFromWords8 $ V.fromList v :: ByteString) == Right v + + prop "List" $ \(v :: [Word64]) -> decode (encode v :: ByteString) == Right v + prop "List" $ \(v :: [Word32]) -> decode (encode v :: ByteString) == Right v + prop "List" $ \(v :: [Word16]) -> decode (encode v :: ByteString) == Right v + prop "List" $ \(v :: [Word8]) -> decode (encode v :: ByteString) == Right v + + describe "Generic types" $ do + prop "unamed_enum" $ \v vec -> + let e = UnnamedGenericEnum (Compact $ abs v) (V.fromList vec) + in decode' (encode' e :: ByteString) == Right e + prop "named_struct_enum" $ \a b -> + let e = NamedGenericEnum (Compact a) b + in decode' (encode' e :: ByteString) == Right e + + describe "Recursive types" $ do + prop "variant_1" $ \(n :: Word32) -> + let v = RecursiveVariant1 n [RecursiveVariant1 (n+1) []] + in decode (encode v :: ByteString) == Right v + + prop "variant_2" $ \(a :: Word8) (b :: Word16) (n :: Word32) -> + let v = RecursiveVariant2 n [Struct a b (RecursiveVariant1 (n+1) [])] + in decode (encode v :: ByteString) == Right v + + describe "SCALE Rust core tests" $ do + it "option_excheption_works" $ do + encode (Nothing :: Maybe Bool) `shouldBe` ("\0" :: ByteString) + encode (Just False) `shouldBe` ("\x01" :: ByteString) + encode (Just True) `shouldBe` ("\x02" :: ByteString) + + it "should_work_for_simple_enum" $ do + -- Index modificator isn't support yet, skip codec test for A + let sb = B 1 2 + sc = C 1 2 + encoded_b = "\x01\x01\0\0\0\x02\0\0\0\0\0\0\0" :: ByteString + encoded_c = "\x02\x01\0\0\0\x02\0\0\0\0\0\0\0" :: ByteString + + encode sc `shouldBe` encoded_c + encode sb `shouldBe` encoded_b + + decode encoded_b `shouldBe` Right sb + decode encoded_c `shouldBe` Right sc + decode ("\x0a" :: ByteString) `shouldBe` (Left "Failed reading: wrong prefix during enum decoding\nEmpty call stack\n" :: Either String EnumType) + + it "should_derive_encode" $ do + let v :: TestType + v = Struct 15 9 (V.fromList $ BS.unpack "Hello world") + v_encoded :: ByteString + v_encoded = "\x0f\0\0\0\x09\0\0\0\0\0\0\0\x2cHello world" + encode v `shouldBe` v_encoded + Right v `shouldBe` decode v_encoded + + it "should_work_for_unit" $ do + encode Unit `shouldBe` ("" :: ByteString) + decode ("" :: ByteString) `shouldBe` Right Unit + + it "should_work_for_indexed" $ do + let v = Indexed 1 2 + v_encoded :: ByteString + v_encoded = "\x01\0\0\0\x02\0\0\0\0\0\0\0" + encode v `shouldBe` v_encoded + Right v `shouldBe` decode v_encoded + + it "correct_error_for_indexed_0" $ do + let wrong = "\x08" :: ByteString + decode wrong `shouldBe` (Left "too few bytes\nFrom:\tdemandInput\n\n" :: Either String Indexed) + + it "correct_error_for_indexed_1" $ do + let wrong = "\0\0\0\0\x01" :: ByteString + decode wrong `shouldBe` (Left "too few bytes\nFrom:\tdemandInput\n\n" :: Either String Indexed) + + it "correct_error_for_enumtype" $ do + let wrong = "\x01" :: ByteString + decode wrong `shouldBe` (Left "too few bytes\nFrom:\tdemandInput\n\n" :: Either String EnumType) + + it "correct_error_for_named_struct_1" $ do + let wrong = "\x01" :: ByteString + decode wrong `shouldBe` (Left "too few bytes\nFrom:\tdemandInput\n\n" :: Either String TestType) + + it "correct_error_for_named_struct_2" $ do + let wrong = "\0\0\0\0\x01" :: ByteString + decode wrong `shouldBe` (Left "too few bytes\nFrom:\tdemandInput\n\n" :: Either String TestType) + + let u64_TEST_COMPACT_VALUES :: [(Word64, Int)] + u64_TEST_COMPACT_VALUES = + [ (0, 1), (63, 1), (64, 2), (16383, 2) + , (16384, 4), (1073741823, 4), (1073741824, 5) + , (bit 32 - 1, 5), (bit 32, 6), (bit 40, 7) + , (bit 48, 8), (bit 56 - 1, 8), (bit 56, 9) + , (maxBound, 9) + ] + + it "compact_works" $ forM_ u64_TEST_COMPACT_VALUES $ \(n, l) -> do + let encoded = encode (TestHasCompact $ Compact n) + BS.length encoded `shouldBe` l + decode encoded `shouldBe` Right (Compact n) + + let u64_TEST_COMPACT_VALUES_FOR_ENUM :: [(Word64, Int)] + u64_TEST_COMPACT_VALUES_FOR_ENUM = + [ (0, 2), (63, 2), (64, 3), (16383, 3), (16384, 5) + , (1073741823, 5), (1073741824, 6), (bit 32 - 1, 6) + , (bit 32, 7), (bit 40, 8), (bit 48, 9), (bit 56 - 1, 9) + , (bit 56, 10), (maxBound, 10) + ] + + it "enum_compact_works" $ forM_ u64_TEST_COMPACT_VALUES_FOR_ENUM $ \(x, l) -> do + let u = encode $ Unnamed (Compact x) + BS.length u `shouldBe` l + decode u `shouldBe` Right (Unnamed $ Compact x) + + let n = encode $ Named (Compact x) + BS.length n `shouldBe` l + decode n `shouldBe` Right (Named $ Compact x) + + let uc = encode $ UnnamedCompact (Compact x) + BS.length uc `shouldBe` l + decode uc `shouldBe` Right (UnnamedCompact $ Compact x) + + let nc = encode $ NamedCompact (Compact x) + BS.length nc `shouldBe` l + decode nc `shouldBe` Right (NamedCompact $ Compact x) diff --git a/unit/Codec/Scale/Test/SingleFieldStructSpec.hs b/unit/Codec/Scale/Test/SingleFieldStructSpec.hs new file mode 100644 index 00000000..78235a8d --- /dev/null +++ b/unit/Codec/Scale/Test/SingleFieldStructSpec.hs @@ -0,0 +1,107 @@ +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Codec.Scale.Test.SingleFieldStructSpec +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Ported to Haskell rust test spec: +-- https://github.com/paritytech/parity-scale-codec/blob/master/tests/single_field_struct_encoding.rs +-- + +module Codec.Scale.Test.SingleFieldStructSpec where + +import Data.ByteString as BS (pack) +import Data.Default (def) +import Data.Word (Word32, Word64) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) +import Test.Hspec + +import Codec.Scale +import Codec.Scale.Class +import Codec.Scale.Skip + +newtype S = S { x1 :: Word32 } + deriving (Eq, Ord, Show, Encode, Decode) + +data SSkip = SSkip + { s1 :: Skip Word32 + , x2 :: Word32 + , s2 :: Skip Word32 + } + deriving (Eq, Ord, Show, GHC.Generic) + +instance Generic SSkip +instance Encode SSkip +instance Decode SSkip + +newtype Sc = Sc { x3 :: Compact Word32 } + deriving (Eq, Ord, Show, Encode, Decode) + +newtype U = U Word32 + deriving (Eq, Ord, Show, Enum, Num, Real, Integral, Encode, Decode) + +newtype U2 = U2 { a :: Word64 } + deriving (Eq, Ord, Show, Encode, Decode) + +data USkip = USkip (Skip Word32) Word32 (Skip Word32) + deriving (Eq, Ord, Show, GHC.Generic) + +instance Generic USkip +instance Encode USkip +instance Decode USkip + +newtype Uc = Uc (Compact Word32) + deriving (Eq, Ord, Show, Encode, Decode) + +newtype Ucas = Ucas (Compact U) + deriving (Eq, Ord, Show, Encode, Decode) + +spec :: Spec +spec = parallel $ do + describe "Single field struct encoding" $ do + let x = 3 + s = S x + s_skip = SSkip def x def + sc = Sc (Compact x) + u = U x + u_skip = USkip def x def + uc = Uc (Compact x) + ucom = Compact u + ucas = Ucas (Compact u) + + s_encoded = BS.pack [3, 0, 0, 0] + s_skip_encoded = BS.pack [3, 0, 0, 0] + sc_encoded = BS.pack [12] + u_encoded = BS.pack [3, 0, 0, 0] + u_skip_encoded = BS.pack [3, 0, 0, 0] + uc_encoded = BS.pack [12] + ucom_encoded = BS.pack [12] + ucas_encoded = BS.pack [12] + + it "encoding" $ do + encode s `shouldBe` s_encoded + encode s_skip `shouldBe` s_skip_encoded + encode sc `shouldBe` sc_encoded + encode u `shouldBe` u_encoded + encode u_skip `shouldBe` u_skip_encoded + encode uc `shouldBe` uc_encoded + encode ucom `shouldBe` ucom_encoded + encode ucas `shouldBe` ucas_encoded + + it "decoding" $ do + Right s `shouldBe` decode s_encoded + Right s_skip `shouldBe` decode s_skip_encoded + Right sc `shouldBe` decode sc_encoded + Right u `shouldBe` decode u_encoded + Right u_skip `shouldBe` decode u_skip_encoded + Right uc `shouldBe` decode uc_encoded + Right ucom `shouldBe` decode ucom_encoded + Right ucas `shouldBe` decode ucas_encoded diff --git a/unit/Codec/Scale/Test/SkipSpec.hs b/unit/Codec/Scale/Test/SkipSpec.hs new file mode 100644 index 00000000..ae0db577 --- /dev/null +++ b/unit/Codec/Scale/Test/SkipSpec.hs @@ -0,0 +1,82 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Codec.Scale.Test.SkipSpec +-- Copyright : Alexander Krupenkin 2016 +-- License : BSD3 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Ported to Haskell rust test spec: +-- https://github.com/paritytech/parity-scale-codec/blob/master/tests/skip.rs +-- + +module Codec.Scale.Test.SkipSpec where + +import Data.Default (Default) +import Data.Word (Word32) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) +import Test.Hspec + +import Codec.Scale +import Codec.Scale.Class +import Codec.Scale.SingletonEnum +import Codec.Scale.Skip +import Data.ByteArray.HexString + +data UncodecType = UncodecType + deriving (Eq, Ord, Show, GHC.Generic, Default) + +-- Implementing A constructor is impossible +data EnumType = B + { _b1 :: Skip UncodecType + , b2 :: Word32 + } + | C (Skip UncodecType) Word32 + deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) + + +data StructNamed = StructNamed + { a :: Skip UncodecType + , b :: Word32 + } + deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) + +data StructUnnamed = StructUnnamed (Skip UncodecType) Word32 + deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) + +data NamedStruct = NamedStruct + { some_named :: Word32 + , ignore :: Skip (Maybe Word32) + } + deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) + +spec :: Spec +spec = parallel $ do + describe "Type encoding modificators" $ do + it "enum_struct_test" $ do + let eb = B { _b1 = Skip UncodecType, b2 = 1 } + ec = C (Skip UncodecType) 1 + sn = StructNamed { a = Skip UncodecType, b = 1 } + su = StructUnnamed (Skip UncodecType) 1 + + let eb_encoded = encode eb :: HexString + let ec_encoded = encode ec :: HexString + let sn_encoded = encode sn :: HexString + let su_encoded = encode su :: HexString + + decode eb_encoded `shouldBe` Right eb + decode ec_encoded `shouldBe` Right ec + decode sn_encoded `shouldBe` Right sn + decode su_encoded `shouldBe` Right su + + it "skip_enum_struct_inner_variant" $ do + let struct = NamedStruct { some_named = 1, ignore = Skip (Just 1) } + single = SingletonEnum struct + encoded = "0x0001000000" :: HexString + encode single `shouldBe` encoded From e10d844310aa983cad6d616b765d2e46d1aa98bb Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 7 Jun 2020 07:25:01 +0300 Subject: [PATCH 148/237] Verson bump --- CHANGELOG.md | 4 ++++ package.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8ad3860..3028bdb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.9.1.0] 2020-06-07 +### Added +- SCALE codec + ## [0.9.0.0] 2020-05-24 ### Added - Experimental IPFS REST API client diff --git a/package.yaml b/package.yaml index 56366771..910ca908 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 0.9.0.0 +version: 0.9.1.0 synopsis: Web3 API for Haskell. description: Client library for Third Generation of Web. github: "airalab/hs-web3" From 442b0f8994cef2f9babd906b60f544fb0962dafb Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 7 Jun 2020 08:05:18 +0300 Subject: [PATCH 149/237] Optimize imports --- package.yaml | 2 +- src/Codec/Scale.hs | 2 + src/Crypto/Ecdsa/Signature.hs | 1 - src/Crypto/Ecdsa/Utils.hs | 1 - src/Crypto/Ethereum/Keyfile.hs | 1 - src/Crypto/Ethereum/Signature.hs | 1 - src/Crypto/Random/HmacDrbg.hs | 1 - src/Data/ByteArray/HexString.hs | 2 - src/Data/Solidity/Abi/Generic.hs | 11 +- src/Data/Solidity/Prim/Address.hs | 1 - src/Data/Solidity/Prim/Bytes.hs | 1 - src/Language/Solidity/Abi.hs | 97 +++--- src/Network/Ethereum/Account/Default.hs | 1 - src/Network/Ethereum/Account/LocalKey.hs | 1 - src/Network/Ethereum/Account/Personal.hs | 1 - src/Network/Ethereum/Api/Types.hs | 288 +++++++++--------- .../Ethereum/Contract/Event/MultiFilter.hs | 1 - src/Network/Ethereum/Contract/TH.hs | 5 +- src/Network/Ethereum/Ens.hs | 1 - src/Network/Polkadot/Api/Childstate.hs | 2 - src/Network/Polkadot/Api/Grandpa.hs | 1 - 21 files changed, 206 insertions(+), 216 deletions(-) diff --git a/package.yaml b/package.yaml index 910ca908..24e6e7e9 100644 --- a/package.yaml +++ b/package.yaml @@ -28,7 +28,7 @@ extra-source-files: - test/contracts/Linearization.json dependencies: -- base >4.10 && <4.14 +- base >4.11 && <4.14 - template-haskell >=2.12 && <2.16 - http-client-tls >=0.3.5.1 && <0.4 - microlens-aeson >=2.2.0.2 && <2.4 diff --git a/src/Codec/Scale.hs b/src/Codec/Scale.hs index 351f9951..7657d567 100644 --- a/src/Codec/Scale.hs +++ b/src/Codec/Scale.hs @@ -23,6 +23,8 @@ module Codec.Scale , decode , encode' , decode' + , Encode + , Decode , module Core ) where diff --git a/src/Crypto/Ecdsa/Signature.hs b/src/Crypto/Ecdsa/Signature.hs index 996570a1..bcfc2588 100644 --- a/src/Crypto/Ecdsa/Signature.hs +++ b/src/Crypto/Ecdsa/Signature.hs @@ -35,7 +35,6 @@ import Data.ByteArray (ByteArray, ByteArrayAccess, Bytes, convert, singleton, takeView, view) import qualified Data.ByteArray as BA (unpack) -import Data.Monoid ((<>)) import Data.Word (Word8) import Crypto.Ecdsa.Utils (exportKey) diff --git a/src/Crypto/Ecdsa/Utils.hs b/src/Crypto/Ecdsa/Utils.hs index 09a73171..d01060e1 100644 --- a/src/Crypto/Ecdsa/Utils.hs +++ b/src/Crypto/Ecdsa/Utils.hs @@ -18,7 +18,6 @@ import Crypto.PubKey.ECC.Generate (generateQ) import Crypto.PubKey.ECC.Types (CurveName (SEC_p256k1), Point (..), getCurveByName) import Data.ByteArray (ByteArray, ByteArrayAccess) -import Data.Monoid ((<>)) -- | Import ECDSA private key from byte array. -- diff --git a/src/Crypto/Ethereum/Keyfile.hs b/src/Crypto/Ethereum/Keyfile.hs index 6e3ff59e..38f87991 100644 --- a/src/Crypto/Ethereum/Keyfile.hs +++ b/src/Crypto/Ethereum/Keyfile.hs @@ -39,7 +39,6 @@ import Data.Aeson.Types (Parser) import Data.ByteArray (ByteArray, ByteArrayAccess, convert) import qualified Data.ByteArray as BA (drop, take, unpack) import Data.Maybe (fromJust) -import Data.Monoid ((<>)) import Data.Text (Text) import Data.UUID.Types (UUID) import Data.UUID.Types.Internal (buildFromBytes) diff --git a/src/Crypto/Ethereum/Signature.hs b/src/Crypto/Ethereum/Signature.hs index c6c6e3ed..461781e3 100644 --- a/src/Crypto/Ethereum/Signature.hs +++ b/src/Crypto/Ethereum/Signature.hs @@ -25,7 +25,6 @@ import Data.ByteArray (ByteArray, ByteArrayAccess, convert) import qualified Data.ByteArray as BA (length) import Data.ByteString.Builder (intDec, toLazyByteString) import qualified Data.ByteString.Lazy as LBS (toStrict) -import Data.Monoid ((<>)) import Data.Word (Word8) import Crypto.Ecdsa.Signature (pack, sign) diff --git a/src/Crypto/Random/HmacDrbg.hs b/src/Crypto/Random/HmacDrbg.hs index ffc9d36f..6a7c8832 100644 --- a/src/Crypto/Random/HmacDrbg.hs +++ b/src/Crypto/Random/HmacDrbg.hs @@ -30,7 +30,6 @@ import Data.ByteArray (ByteArray, convert, singleton) import qualified Data.ByteArray as BA (null, take) import qualified Data.ByteString as B (replicate) import Data.Maybe (fromJust) -import Data.Monoid ((<>)) import Data.Word (Word8) -- | HMAC Deterministic Random Bytes Generator. diff --git a/src/Data/ByteArray/HexString.hs b/src/Data/ByteArray/HexString.hs index d7155a82..16dbff50 100644 --- a/src/Data/ByteArray/HexString.hs +++ b/src/Data/ByteArray/HexString.hs @@ -22,8 +22,6 @@ import qualified Data.ByteArray as BA (drop, take) import Data.ByteArray.Encoding (Base (Base16), convertFromBase, convertToBase) import Data.ByteString (ByteString) -import Data.Monoid (Monoid, (<>)) -import Data.Semigroup (Semigroup) import Data.String (IsString (..)) import Data.Text (Text) import Data.Text.Encoding (decodeUtf8, encodeUtf8) diff --git a/src/Data/Solidity/Abi/Generic.hs b/src/Data/Solidity/Abi/Generic.hs index e0434eae..822c627b 100644 --- a/src/Data/Solidity/Abi/Generic.hs +++ b/src/Data/Solidity/Abi/Generic.hs @@ -26,7 +26,6 @@ module Data.Solidity.Abi.Generic () where import qualified Data.ByteString.Lazy as LBS import Data.Int (Int64) import qualified Data.List as L -import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) import Data.Serialize (Get, Put) import Data.Serialize.Get (bytesRead, lookAheadE, skip) @@ -37,11 +36,11 @@ import Data.Solidity.Abi (AbiGet (..), AbiPut (..), AbiType (..), GenericAbiGet (..), GenericAbiPut (..)) import Data.Solidity.Prim.Int (getWord256, putWord256) -data EncodedValue = - EncodedValue { order :: Int64 - , offset :: Maybe Int64 - , encoding :: Put - } +data EncodedValue = EncodedValue + { order :: Int64 + , offset :: Maybe Int64 + , encoding :: Put + } instance Eq EncodedValue where ev1 == ev2 = order ev1 == order ev2 diff --git a/src/Data/Solidity/Prim/Address.hs b/src/Data/Solidity/Prim/Address.hs index e36b3b1d..0304ca0b 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/src/Data/Solidity/Prim/Address.hs @@ -43,7 +43,6 @@ import qualified Data.ByteString as BS (take, unpack) import qualified Data.ByteString.Char8 as C8 (drop, length, pack, unpack) import qualified Data.Char as C (toLower, toUpper) import Data.Default (Default (..)) -import Data.Monoid ((<>)) import Data.String (IsString (..)) import Data.Text.Encoding as T (encodeUtf8) import Generics.SOP (Generic) diff --git a/src/Data/Solidity/Prim/Bytes.hs b/src/Data/Solidity/Prim/Bytes.hs index 31a6a731..046ab94f 100644 --- a/src/Data/Solidity/Prim/Bytes.hs +++ b/src/Data/Solidity/Prim/Bytes.hs @@ -38,7 +38,6 @@ import Data.ByteArray.Sized (SizedByteArray, unSizedByteArray, import qualified Data.ByteArray.Sized as S (take) import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as C8 -import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) import Data.Serialize (Get, Putter, getBytes, putByteString) import Data.String (IsString (..)) diff --git a/src/Language/Solidity/Abi.hs b/src/Language/Solidity/Abi.hs index b39798eb..92a3a7c8 100644 --- a/src/Language/Solidity/Abi.hs +++ b/src/Language/Solidity/Abi.hs @@ -38,7 +38,6 @@ import Data.Aeson (FromJSON (parseJSON), Options (constructorT SumEncoding (TaggedObject), ToJSON (toJSON), defaultOptions) import Data.Aeson.TH (deriveJSON) -import Data.Monoid ((<>)) import Data.Text (Text) import qualified Data.Text as T (dropEnd, pack, take, unlines, unpack) import Data.Text.Encoding (encodeUtf8) @@ -51,13 +50,14 @@ import Data.String.Extra (toLowerFirst) -- | Method argument data FunctionArg = FunctionArg - { funArgName :: Text - -- ^ Argument name - , funArgType :: Text - -- ^ Argument type - , funArgComponents :: Maybe [FunctionArg] - -- ^ Argument components for tuples - } deriving (Show, Eq, Ord) + { funArgName :: Text + -- ^ Argument name + , funArgType :: Text + -- ^ Argument type + , funArgComponents :: Maybe [FunctionArg] + -- ^ Argument components for tuples + } + deriving (Show, Eq, Ord) $(deriveJSON (defaultOptions {fieldLabelModifier = toLowerFirst . drop 6}) @@ -65,34 +65,42 @@ $(deriveJSON -- | Event argument data EventArg = EventArg - { eveArgName :: Text - -- ^ Argument name - , eveArgType :: Text - -- ^ Argument type - , eveArgIndexed :: Bool - -- ^ Argument is indexed (e.g. placed on topics of event) - } deriving (Show, Eq, Ord) + { eveArgName :: Text + -- ^ Argument name + , eveArgType :: Text + -- ^ Argument type + , eveArgIndexed :: Bool + -- ^ Argument is indexed (e.g. placed on topics of event) + } + deriving (Show, Eq, Ord) $(deriveJSON (defaultOptions {fieldLabelModifier = toLowerFirst . drop 6}) ''EventArg) -- | Elementrary contract interface item -data Declaration - = DConstructor { conInputs :: [FunctionArg] } - -- ^ Contract constructor - | DFunction { funName :: Text - , funConstant :: Bool - , funInputs :: [FunctionArg] - , funOutputs :: Maybe [FunctionArg] } - -- ^ Method - | DEvent { eveName :: Text - , eveInputs :: [EventArg] - , eveAnonymous :: Bool } - -- ^ Event - | DFallback { falPayable :: Bool } - -- ^ Fallback function - deriving Show +data Declaration = DConstructor + { conInputs :: [FunctionArg] + -- ^ Contract constructor + } + | DFunction + { funName :: Text + , funConstant :: Bool + , funInputs :: [FunctionArg] + , funOutputs :: Maybe [FunctionArg] + -- ^ Method + } + | DEvent + { eveName :: Text + , eveInputs :: [EventArg] + , eveAnonymous :: Bool + -- ^ Event + } + | DFallback + { falPayable :: Bool + -- ^ Fallback function + } + deriving Show instance Eq Declaration where (DConstructor a) == (DConstructor b) = length a == length b @@ -172,7 +180,7 @@ signature (DConstructor inputs) = "(" <> args inputs <> ")" args [] = "" args [x] = funArgType x args (x:xs) = case funArgComponents x of - Nothing -> funArgType x <> "," <> args xs + Nothing -> funArgType x <> "," <> args xs Just cmps -> "(" <> args cmps <> ")," <> args xs signature (DFallback _) = "()" @@ -183,7 +191,7 @@ signature (DFunction name _ inputs _) = name <> "(" <> args inputs <> ")" args [] = "" args [x] = funArgType x args (x:xs) = case funArgComponents x of - Nothing -> funArgType x <> "," <> args xs + Nothing -> funArgType x <> "," <> args xs Just cmps -> "(" <> args cmps <> ")," <> args xs signature (DEvent name inputs _) = name <> "(" <> args inputs <> ")" @@ -209,17 +217,16 @@ eventId :: Declaration -> Text eventId = ("0x" <>) . sha3 . signature -- | Solidity types and parsers -data SolidityType = - SolidityBool - | SolidityAddress - | SolidityUint Int - | SolidityInt Int - | SolidityString - | SolidityBytesN Int - | SolidityBytes - | SolidityTuple Int [SolidityType] - | SolidityVector [Int] SolidityType - | SolidityArray SolidityType +data SolidityType = SolidityBool + | SolidityAddress + | SolidityUint Int + | SolidityInt Int + | SolidityString + | SolidityBytesN Int + | SolidityBytes + | SolidityTuple Int [SolidityType] + | SolidityVector [Int] SolidityType + | SolidityArray SolidityType deriving (Eq, Show) numberParser :: Parser Int @@ -294,8 +301,8 @@ solidityTypeParser = parseSolidityFunctionArgType :: FunctionArg -> Either ParseError SolidityType parseSolidityFunctionArgType (FunctionArg _ typ mcmps) = case mcmps of Nothing -> parse solidityTypeParser "Solidity" typ - Just cmps -> - SolidityTuple (length cmps) + Just cmps -> + SolidityTuple (length cmps) <$> mapM parseSolidityFunctionArgType cmps diff --git a/src/Network/Ethereum/Account/Default.hs b/src/Network/Ethereum/Account/Default.hs index f09510ce..9ddbc7be 100644 --- a/src/Network/Ethereum/Account/Default.hs +++ b/src/Network/Ethereum/Account/Default.hs @@ -23,7 +23,6 @@ import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (MonadTrans (..)) import qualified Data.ByteArray as BA (convert) import Data.Maybe (listToMaybe) -import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) import Data.Solidity.Abi.Codec (decode, encode) diff --git a/src/Network/Ethereum/Account/LocalKey.hs b/src/Network/Ethereum/Account/LocalKey.hs index a5109b61..a7695992 100644 --- a/src/Network/Ethereum/Account/LocalKey.hs +++ b/src/Network/Ethereum/Account/LocalKey.hs @@ -27,7 +27,6 @@ import Crypto.PubKey.ECC.ECDSA (PrivateKey) import Data.ByteArray (convert) import Data.ByteString (empty) import Data.Default (Default (..)) -import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) import Crypto.Ethereum (derivePubKey, importKey) diff --git a/src/Network/Ethereum/Account/Personal.hs b/src/Network/Ethereum/Account/Personal.hs index 35d827ea..bc7a2916 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/src/Network/Ethereum/Account/Personal.hs @@ -25,7 +25,6 @@ import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) import qualified Data.ByteArray as BA (convert) import Data.Default (Default (..)) -import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) import Data.Solidity.Abi.Codec (decode, encode) diff --git a/src/Network/Ethereum/Api/Types.hs b/src/Network/Ethereum/Api/Types.hs index 5803e837..0f499c50 100644 --- a/src/Network/Ethereum/Api/Types.hs +++ b/src/Network/Ethereum/Api/Types.hs @@ -23,7 +23,6 @@ import Data.Aeson (FromJSON (..), Options (fieldLabelM defaultOptions, object, (.=)) import Data.Aeson.TH (deriveJSON) import Data.Default (Default (..)) -import Data.Monoid ((<>)) import Data.Solidity.Prim.Address (Address) import Data.String (IsString (..)) import qualified Data.Text as T (pack) @@ -76,19 +75,21 @@ instance FromJSON Quantity where -- | An object with sync status data. data SyncActive = SyncActive - { syncStartingBlock :: !Quantity - -- ^ QUANTITY - The block at which the import started (will only be reset, after the sync reached his head). - , syncCurrentBlock :: !Quantity - -- ^ QUANTITY - The current block, same as eth_blockNumber. - , syncHighestBlock :: !Quantity - -- ^ QUANTITY - The estimated highest block. - } deriving (Eq, Generic, Show) + { syncStartingBlock :: !Quantity + -- ^ QUANTITY - The block at which the import started (will only be reset, after the sync reached his head). + , syncCurrentBlock :: !Quantity + -- ^ QUANTITY - The current block, same as eth_blockNumber. + , syncHighestBlock :: !Quantity + -- ^ QUANTITY - The estimated highest block. + } + deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions { fieldLabelModifier = toLowerFirst . drop 4 }) ''SyncActive) -- | Sync state pulled by low-level call 'eth_syncing'. -data SyncingState = Syncing SyncActive | NotSyncing +data SyncingState = Syncing SyncActive + | NotSyncing deriving (Eq, Generic, Show) instance FromJSON SyncingState where @@ -98,47 +99,46 @@ instance FromJSON SyncingState where -- | Changes pulled by low-level call 'eth_getFilterChanges', 'eth_getLogs', -- and 'eth_getFilterLogs' data Change = Change - { changeLogIndex :: !(Maybe Quantity) - -- ^ QUANTITY - integer of the log index position in the block. null when its pending log. - , changeTransactionIndex :: !(Maybe Quantity) - -- ^ QUANTITY - integer of the transactions index position log was created from. null when its pending log. - , changeTransactionHash :: !(Maybe HexString) - -- ^ DATA, 32 Bytes - hash of the transactions this log was created from. null when its pending log. - , changeBlockHash :: !(Maybe HexString) - -- ^ DATA, 32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log. - , changeBlockNumber :: !(Maybe Quantity) - -- ^ QUANTITY - the block number where this log was in. null when its pending. null when its pending log. - , changeAddress :: !Address - -- ^ DATA, 20 Bytes - address from which this log originated. - , changeData :: !HexString - -- ^ DATA - contains one or more 32 Bytes non-indexed arguments of the log. - , changeTopics :: ![HexString] - -- ^ Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments. - -- (In solidity: The first topic is the hash of the signature of the event - -- (e.g. Deposit(address, bytes32, uint256)), except you declared the event with - -- the anonymous specifier.) - } deriving (Eq, Show, Generic) + { changeLogIndex :: !(Maybe Quantity) + -- ^ QUANTITY - integer of the log index position in the block. null when its pending log. + , changeTransactionIndex :: !(Maybe Quantity) + -- ^ QUANTITY - integer of the transactions index position log was created from. null when its pending log. + , changeTransactionHash :: !(Maybe HexString) + -- ^ DATA, 32 Bytes - hash of the transactions this log was created from. null when its pending log. + , changeBlockHash :: !(Maybe HexString) + -- ^ DATA, 32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log. + , changeBlockNumber :: !(Maybe Quantity) + -- ^ QUANTITY - the block number where this log was in. null when its pending. null when its pending log. + , changeAddress :: !Address + -- ^ DATA, 20 Bytes - address from which this log originated. + , changeData :: !HexString + -- ^ DATA - contains one or more 32 Bytes non-indexed arguments of the log. + , changeTopics :: ![HexString] + -- ^ Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments. + } + deriving (Eq, Show, Generic) $(deriveJSON (defaultOptions { fieldLabelModifier = toLowerFirst . drop 6 }) ''Change) -- | The contract call params. data Call = Call - { callFrom :: !(Maybe Address) - -- ^ DATA, 20 Bytes - The address the transaction is send from. - , callTo :: !(Maybe Address) - -- ^ DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to. - , callGas :: !(Maybe Quantity) - -- ^ QUANTITY - (optional, default: 3000000) Integer of the gas provided for the transaction execution. It will return unused gas. - , callGasPrice :: !(Maybe Quantity) - -- ^ QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas. - , callValue :: !(Maybe Quantity) - -- ^ QUANTITY - (optional) Integer of the value sent with this transaction. - , callData :: !(Maybe HexString) - -- ^ DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. - , callNonce :: !(Maybe Quantity) - -- ^ QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce. - } deriving (Eq, Show, Generic) + { callFrom :: !(Maybe Address) + -- ^ DATA, 20 Bytes - The address the transaction is send from. + , callTo :: !(Maybe Address) + -- ^ DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to. + , callGas :: !(Maybe Quantity) + -- ^ QUANTITY - (optional, default: 3000000) Integer of the gas provided for the transaction execution. It will return unused gas. + , callGasPrice :: !(Maybe Quantity) + -- ^ QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas. + , callValue :: !(Maybe Quantity) + -- ^ QUANTITY - (optional) Integer of the value sent with this transaction. + , callData :: !(Maybe HexString) + -- ^ DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. + , callNonce :: !(Maybe Quantity) + -- ^ QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce. + } + deriving (Eq, Show, Generic) $(deriveJSON (defaultOptions { fieldLabelModifier = toLowerFirst . drop 4 @@ -149,9 +149,9 @@ instance Default Call where -- | The state of blockchain for contract call. data DefaultBlock = BlockWithNumber Quantity - | Earliest - | Latest - | Pending + | Earliest + | Latest + | Pending deriving (Eq, Show, Generic) instance ToJSON DefaultBlock where @@ -160,21 +160,16 @@ instance ToJSON DefaultBlock where -- | Low-level event filter data structure. data Filter e = Filter - { filterAddress :: !(Maybe [Address]) - -- ^ DATA|Array, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate. - , filterFromBlock :: !DefaultBlock - -- ^ QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. - , filterToBlock :: !DefaultBlock - -- ^ QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. - , filterTopics :: !(Maybe [Maybe HexString]) - -- ^ Array of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. - -- Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters: - -- * [] "anything" - -- * [A] "A in first position (and anything after)" - -- * [null, B] "anything in first position AND B in second position (and anything after)" - -- * [A, B] "A in first position AND B in second position (and anything after)" - -- * [[A, B], [A, B]] "(A OR B) in first position AND (A OR B) in second position (and anything after)" - } deriving (Eq, Show, Generic) + { filterAddress :: !(Maybe [Address]) + -- ^ DATA|Array, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate. + , filterFromBlock :: !DefaultBlock + -- ^ QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. + , filterToBlock :: !DefaultBlock + -- ^ QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. + , filterTopics :: !(Maybe [Maybe HexString]) + -- ^ Array of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. + } + deriving (Eq, Show, Generic) instance ToJSON (Filter e) where toJSON f = object [ "address" .= filterAddress f @@ -198,101 +193,104 @@ instance Ord DefaultBlock where -- | The Receipt of a Transaction data TxReceipt = TxReceipt - { receiptTransactionHash :: !HexString - -- ^ DATA, 32 Bytes - hash of the transaction. - , receiptTransactionIndex :: !Quantity - -- ^ QUANTITY - index of the transaction. - , receiptBlockHash :: !(Maybe HexString) - -- ^ DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending. - , receiptBlockNumber :: !(Maybe Quantity) - -- ^ QUANTITY - block number where this transaction was in. null when its pending. - , receiptCumulativeGasUsed :: !Quantity - -- ^ QUANTITY - The total amount of gas used when this transaction was executed in the block. - , receiptGasUsed :: !Quantity - -- ^ QUANTITY - The amount of gas used by this specific transaction alone. - , receiptContractAddress :: !(Maybe Address) - -- ^ DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null. - , receiptLogs :: ![Change] - -- ^ Array - Array of log objects, which this transaction generated. - , receiptLogsBloom :: !HexString - -- ^ DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs. - , receiptStatus :: !(Maybe Quantity) - -- ^ QUANTITY either 1 (success) or 0 (failure) - } deriving (Show, Generic) + { receiptTransactionHash :: !HexString + -- ^ DATA, 32 Bytes - hash of the transaction. + , receiptTransactionIndex :: !Quantity + -- ^ QUANTITY - index of the transaction. + , receiptBlockHash :: !(Maybe HexString) + -- ^ DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending. + , receiptBlockNumber :: !(Maybe Quantity) + -- ^ QUANTITY - block number where this transaction was in. null when its pending. + , receiptCumulativeGasUsed :: !Quantity + -- ^ QUANTITY - The total amount of gas used when this transaction was executed in the block. + , receiptGasUsed :: !Quantity + -- ^ QUANTITY - The amount of gas used by this specific transaction alone. + , receiptContractAddress :: !(Maybe Address) + -- ^ DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null. + , receiptLogs :: ![Change] + -- ^ Array - Array of log objects, which this transaction generated. + , receiptLogsBloom :: !HexString + -- ^ DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs. + , receiptStatus :: !(Maybe Quantity) + -- ^ QUANTITY either 1 (success) or 0 (failure) + } + deriving (Show, Generic) $(deriveJSON (defaultOptions { fieldLabelModifier = toLowerFirst . drop 7 }) ''TxReceipt) -- | Transaction information. data Transaction = Transaction - { txHash :: !HexString - -- ^ DATA, 32 Bytes - hash of the transaction. - , txNonce :: !Quantity - -- ^ QUANTITY - the number of transactions made by the sender prior to this one. - , txBlockHash :: !(Maybe HexString) - -- ^ DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending. - , txBlockNumber :: !(Maybe Quantity) - -- ^ QUANTITY - block number where this transaction was in. null when its pending. - , txTransactionIndex :: !(Maybe Quantity) - -- ^ QUANTITY - integer of the transactions index position in the block. null when its pending. - , txFrom :: !Address - -- ^ DATA, 20 Bytes - address of the sender. - , txTo :: !(Maybe Address) - -- ^ DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction. - , txValue :: !Quantity - -- ^ QUANTITY - value transferred in Wei. - , txGasPrice :: !Quantity - -- ^ QUANTITY - gas price provided by the sender in Wei. - , txGas :: !Quantity - -- ^ QUANTITY - gas provided by the sender. - , txInput :: !HexString - -- ^ DATA - the data send along with the transaction. - } deriving (Eq, Show, Generic) + { txHash :: !HexString + -- ^ DATA, 32 Bytes - hash of the transaction. + , txNonce :: !Quantity + -- ^ QUANTITY - the number of transactions made by the sender prior to this one. + , txBlockHash :: !(Maybe HexString) + -- ^ DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending. + , txBlockNumber :: !(Maybe Quantity) + -- ^ QUANTITY - block number where this transaction was in. null when its pending. + , txTransactionIndex :: !(Maybe Quantity) + -- ^ QUANTITY - integer of the transactions index position in the block. null when its pending. + , txFrom :: !Address + -- ^ DATA, 20 Bytes - address of the sender. + , txTo :: !(Maybe Address) + -- ^ DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction. + , txValue :: !Quantity + -- ^ QUANTITY - value transferred in Wei. + , txGasPrice :: !Quantity + -- ^ QUANTITY - gas price provided by the sender in Wei. + , txGas :: !Quantity + -- ^ QUANTITY - gas provided by the sender. + , txInput :: !HexString + -- ^ DATA - the data send along with the transaction. + } + deriving (Eq, Show, Generic) $(deriveJSON (defaultOptions { fieldLabelModifier = toLowerFirst . drop 2 }) ''Transaction) -- | Block information. data Block = Block - { blockNumber :: !(Maybe Quantity) - -- ^ QUANTITY - the block number. null when its pending block. - , blockHash :: !(Maybe HexString) - -- ^ DATA, 32 Bytes - hash of the block. null when its pending block. - , blockParentHash :: !HexString - -- ^ DATA, 32 Bytes - hash of the parent block. - , blockNonce :: !(Maybe HexString) - -- ^ DATA, 8 Bytes - hash of the generated proof-of-work. null when its pending block. - , blockSha3Uncles :: !HexString - -- ^ DATA, 32 Bytes - SHA3 of the uncles data in the block. - , blockLogsBloom :: !(Maybe HexString) - -- ^ DATA, 256 Bytes - the bloom filter for the logs of the block. null when its pending block. - , blockTransactionsRoot :: !HexString - -- ^ DATA, 32 Bytes - the root of the transaction trie of the block. - , blockStateRoot :: !HexString - -- ^ DATA, 32 Bytes - the root of the final state trie of the block. - , blockReceiptRoot :: !(Maybe HexString) - -- ^ DATA, 32 Bytes - the root of the receipts trie of the block. - , blockMiner :: !Address - -- ^ DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given. - , blockDifficulty :: !Quantity - -- ^ QUANTITY - integer of the difficulty for this block. - , blockTotalDifficulty :: !Quantity - -- ^ QUANTITY - integer of the total difficulty of the chain until this block. - , blockExtraData :: !HexString - -- ^ DATA - the "extra data" field of this block. - , blockSize :: !Quantity - -- ^ QUANTITY - integer the size of this block in bytes. - , blockGasLimit :: !Quantity - -- ^ QUANTITY - the maximum gas allowed in this block. - , blockGasUsed :: !Quantity - -- ^ QUANTITY - the total used gas by all transactions in this block. - , blockTimestamp :: !Quantity - -- ^ QUANTITY - the unix timestamp for when the block was collated. - , blockTransactions :: ![Transaction] - -- ^ Array of transaction objects. - , blockUncles :: ![HexString] - -- ^ Array - Array of uncle hashes. - } deriving (Show, Generic) + { blockNumber :: !(Maybe Quantity) + -- ^ QUANTITY - the block number. null when its pending block. + , blockHash :: !(Maybe HexString) + -- ^ DATA, 32 Bytes - hash of the block. null when its pending block. + , blockParentHash :: !HexString + -- ^ DATA, 32 Bytes - hash of the parent block. + , blockNonce :: !(Maybe HexString) + -- ^ DATA, 8 Bytes - hash of the generated proof-of-work. null when its pending block. + , blockSha3Uncles :: !HexString + -- ^ DATA, 32 Bytes - SHA3 of the uncles data in the block. + , blockLogsBloom :: !(Maybe HexString) + -- ^ DATA, 256 Bytes - the bloom filter for the logs of the block. null when its pending block. + , blockTransactionsRoot :: !HexString + -- ^ DATA, 32 Bytes - the root of the transaction trie of the block. + , blockStateRoot :: !HexString + -- ^ DATA, 32 Bytes - the root of the final state trie of the block. + , blockReceiptRoot :: !(Maybe HexString) + -- ^ DATA, 32 Bytes - the root of the receipts trie of the block. + , blockMiner :: !Address + -- ^ DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given. + , blockDifficulty :: !Quantity + -- ^ QUANTITY - integer of the difficulty for this block. + , blockTotalDifficulty :: !Quantity + -- ^ QUANTITY - integer of the total difficulty of the chain until this block. + , blockExtraData :: !HexString + -- ^ DATA - the "extra data" field of this block. + , blockSize :: !Quantity + -- ^ QUANTITY - integer the size of this block in bytes. + , blockGasLimit :: !Quantity + -- ^ QUANTITY - the maximum gas allowed in this block. + , blockGasUsed :: !Quantity + -- ^ QUANTITY - the total used gas by all transactions in this block. + , blockTimestamp :: !Quantity + -- ^ QUANTITY - the unix timestamp for when the block was collated. + , blockTransactions :: ![Transaction] + -- ^ Array of transaction objects. + , blockUncles :: ![HexString] + -- ^ Array - Array of uncle hashes. + } + deriving (Show, Generic) $(deriveJSON (defaultOptions { fieldLabelModifier = toLowerFirst . drop 5 }) ''Block) diff --git a/src/Network/Ethereum/Contract/Event/MultiFilter.hs b/src/Network/Ethereum/Contract/Event/MultiFilter.hs index 0926eb6d..dbcabe60 100644 --- a/src/Network/Ethereum/Contract/Event/MultiFilter.hs +++ b/src/Network/Ethereum/Contract/Event/MultiFilter.hs @@ -60,7 +60,6 @@ import Data.Machine (MachineT, asParts, import Data.Machine.Plan (PlanT, stop, yield) import Data.Maybe (catMaybes, fromJust, listToMaybe) -import Data.Monoid ((<>)) import Data.Tagged (Tagged (..)) import Data.Vinyl (Rec ((:&), RNil), RecApplicative) diff --git a/src/Network/Ethereum/Contract/TH.hs b/src/Network/Ethereum/Contract/TH.hs index 566fbdbf..f80748f5 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/src/Network/Ethereum/Contract/TH.hs @@ -50,7 +50,6 @@ import Data.ByteArray (convert) import qualified Data.Char as Char import Data.Default (Default (..)) import Data.List (group, sort, uncons) -import Data.Monoid ((<>)) import Data.Tagged (Tagged) import Data.Text (Text) import qualified Data.Text as T @@ -74,7 +73,9 @@ import Language.Solidity.Abi (ContractAbi (..), EventArg (..), FunctionArg (..), SolidityType (..), eventId, - methodId, parseSolidityFunctionArgType, parseSolidityEventArgType) + methodId, + parseSolidityEventArgType, + parseSolidityFunctionArgType) import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Api.Types (DefaultBlock (..), Filter (..), TxReceipt) diff --git a/src/Network/Ethereum/Ens.hs b/src/Network/Ethereum/Ens.hs index 6cb9bf3c..3ac075b1 100644 --- a/src/Network/Ethereum/Ens.hs +++ b/src/Network/Ethereum/Ens.hs @@ -24,7 +24,6 @@ import Data.ByteArray (convert, zero) import Data.ByteArray.Sized (unsafeFromByteArrayAccess) import Data.ByteString (ByteString) import Data.ByteString.Char8 (split) -import Data.Monoid ((<>)) import Lens.Micro ((.~)) import Data.Solidity.Prim (Address, BytesN) diff --git a/src/Network/Polkadot/Api/Childstate.hs b/src/Network/Polkadot/Api/Childstate.hs index 0e8d364a..55122e57 100644 --- a/src/Network/Polkadot/Api/Childstate.hs +++ b/src/Network/Polkadot/Api/Childstate.hs @@ -15,8 +15,6 @@ module Network.Polkadot.Api.Childstate where -import Data.Text (Text) - import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) diff --git a/src/Network/Polkadot/Api/Grandpa.hs b/src/Network/Polkadot/Api/Grandpa.hs index 799d3951..ba82dbbe 100644 --- a/src/Network/Polkadot/Api/Grandpa.hs +++ b/src/Network/Polkadot/Api/Grandpa.hs @@ -16,7 +16,6 @@ module Network.Polkadot.Api.Grandpa where import Data.Aeson (Object) -import Data.Text (Text) import Network.JsonRpc.TinyClient (JsonRpc (..)) From 51436d3e46364f84062733b013b67ea6281ae0c0 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 7 Jun 2020 08:05:52 +0300 Subject: [PATCH 150/237] Added SCALE codec example --- CHANGELOG.md | 7 +++- examples/scale/Main.hs | 30 ++++++++++++++++ examples/scale/package.yaml | 23 ++++++++++++ examples/scale/stack.yaml | 70 +++++++++++++++++++++++++++++++++++++ 4 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 examples/scale/Main.hs create mode 100644 examples/scale/package.yaml create mode 100644 examples/scale/stack.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 3028bdb1..5c62fef9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,12 @@ All notable changes to this project will be documented in this file. ## [0.9.1.0] 2020-06-07 ### Added -- SCALE codec +- SCALE codec implementation and tests +- SCALE codec example + +### Changed +- Supported GHC version: >=8.4.4 +- Imports optimized ## [0.9.0.0] 2020-05-24 ### Added diff --git a/examples/scale/Main.hs b/examples/scale/Main.hs new file mode 100644 index 00000000..e058cece --- /dev/null +++ b/examples/scale/Main.hs @@ -0,0 +1,30 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +module Main where + +import Codec.Scale +import Codec.Scale.Skip +import Data.ByteArray.HexString (HexString) +import Data.Word (Word32) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) + +data MyTransaction a = Tx + { from :: Word32 + , to :: Word32 + , balance :: Compact Integer + , note :: Skip a + } + deriving (Show, Eq, GHC.Generic, Generic, Encode, Decode) + +main :: IO () +main = do + let alice = 42 + bob = 15 + my_tx = Tx { from = alice + , to = bob + , balance = Compact 1000000 + , note = Skip "Hello!" + } + putStrLn "Encoded transaction:" + print (encode my_tx :: HexString) diff --git a/examples/scale/package.yaml b/examples/scale/package.yaml new file mode 100644 index 00000000..02908f11 --- /dev/null +++ b/examples/scale/package.yaml @@ -0,0 +1,23 @@ +name: example-scale +version: 0.0.0.0 +synopsis: SCALE codec example +github: "airalab/hs-web3" +license: BSD3 +author: Alexander Krupenkin +maintainer: mail@akru.me +copyright: "(c) Alexander Krupenkin 2016" +category: Network + +dependencies: +- base +- web3 +- generics-sop + +executables: + example-scale: + main: Main.hs + source-dirs: ./ + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/examples/scale/stack.yaml b/examples/scale/stack.yaml new file mode 100644 index 00000000..ae6424ac --- /dev/null +++ b/examples/scale/stack.yaml @@ -0,0 +1,70 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# https://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# +# The location of a snapshot can be provided as a file or url. Stack assumes +# a snapshot provided as a file might change, whereas a url resource does not. +# +# resolver: ./custom-snapshot.yaml +# resolver: https://example.com/snapshots/2018-01-01.yaml +resolver: lts-15.13 + +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# - location: +# git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# subdirs: +# - auto-update +# - wai +packages: +- . +- ../.. +# Dependency packages to be pulled from upstream that are not in the resolver +# using the same syntax as the packages field. +# (e.g., acme-missiles-0.3) +extra-deps: +- relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c +- vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c + +# Override default flag values for local packages and extra-deps +# flags: {} + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=1.9" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor +nix: + packages: + - zlib From eb6e2f5c7d866b04eccc9ac7ec4ae69a96f4a875 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 7 Jun 2020 08:23:18 +0300 Subject: [PATCH 151/237] [CI]: drop LTS-14 build --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9e5b1961..9c1095a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,16 +11,11 @@ cache: matrix: # Build with different GHC versions and stable package sets include: - - env: RESOLVER=lts-14 - compiler: "LTS14" - env: RESOLVER=lts-15 compiler: "LTS15" - env: RESOLVER=nightly compiler: "nightly" - - env: RESOLVER=lts-14 - compiler: "LTS14" - os: osx - env: RESOLVER=lts-15 compiler: "LTS15" os: osx @@ -28,9 +23,6 @@ matrix: compiler: "nightly" os: osx - - env: RESOLVER=lts-14 - compiler: "LTS14" - os: windows - env: RESOLVER=lts-15 compiler: "LTS15" os: windows From 313239eba5a382c9742e8a0369e062b293864db6 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 7 Jun 2020 08:27:21 +0300 Subject: [PATCH 152/237] Optimized unit test imports --- unit/Codec/Scale/Test/CoreSpec.hs | 1 - unit/Codec/Scale/Test/SingleFieldStructSpec.hs | 11 +++++------ unit/Codec/Scale/Test/SkipSpec.hs | 1 - 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/unit/Codec/Scale/Test/CoreSpec.hs b/unit/Codec/Scale/Test/CoreSpec.hs index 721ac6d7..538ff20a 100644 --- a/unit/Codec/Scale/Test/CoreSpec.hs +++ b/unit/Codec/Scale/Test/CoreSpec.hs @@ -33,7 +33,6 @@ import Test.Hspec import Test.Hspec.QuickCheck import Codec.Scale -import Codec.Scale.Class data Unit = Unit deriving (Eq, Show, GHC.Generic, Generic, Encode, Decode) diff --git a/unit/Codec/Scale/Test/SingleFieldStructSpec.hs b/unit/Codec/Scale/Test/SingleFieldStructSpec.hs index 78235a8d..a7acdf63 100644 --- a/unit/Codec/Scale/Test/SingleFieldStructSpec.hs +++ b/unit/Codec/Scale/Test/SingleFieldStructSpec.hs @@ -17,15 +17,14 @@ module Codec.Scale.Test.SingleFieldStructSpec where -import Data.ByteString as BS (pack) -import Data.Default (def) -import Data.Word (Word32, Word64) -import Generics.SOP (Generic) -import qualified GHC.Generics as GHC (Generic) +import Data.ByteString as BS (pack) +import Data.Default (def) +import Data.Word (Word32, Word64) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) import Test.Hspec import Codec.Scale -import Codec.Scale.Class import Codec.Scale.Skip newtype S = S { x1 :: Word32 } diff --git a/unit/Codec/Scale/Test/SkipSpec.hs b/unit/Codec/Scale/Test/SkipSpec.hs index ae0db577..d68cca86 100644 --- a/unit/Codec/Scale/Test/SkipSpec.hs +++ b/unit/Codec/Scale/Test/SkipSpec.hs @@ -24,7 +24,6 @@ import qualified GHC.Generics as GHC (Generic) import Test.Hspec import Codec.Scale -import Codec.Scale.Class import Codec.Scale.SingletonEnum import Codec.Scale.Skip import Data.ByteArray.HexString From 8a92f8ed26b311a6fdd8f441cfeea6ceb190fdae Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 7 Jun 2020 08:28:19 +0300 Subject: [PATCH 153/237] Updated changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c62fef9..72383395 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ All notable changes to this project will be documented in this file. - Supported GHC version: >=8.4.4 - Imports optimized +### Removed +- LTS-14 support + ## [0.9.0.0] 2020-05-24 ### Added - Experimental IPFS REST API client From cf25e9038684438325e7c4fa75009e11a983875a Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 7 Jun 2020 08:34:43 +0300 Subject: [PATCH 154/237] Added scale example to extra files --- package.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.yaml b/package.yaml index 24e6e7e9..d19d8133 100644 --- a/package.yaml +++ b/package.yaml @@ -22,6 +22,9 @@ extra-source-files: - examples/polkadot/Main.hs - examples/polkadot/stack.yaml - examples/polkadot/package.yaml +- examples/scale/Main.hs +- examples/scale/stack.yaml +- examples/scale/package.yaml - test/contracts/Registry.json - test/contracts/SimpleStorage.json - test/contracts/ComplexStorage.json From ff38be7bd40ddd5315b1ffbe842bd87bad45f232 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 10 Jun 2020 03:00:51 +0300 Subject: [PATCH 155/237] Licensing Polkadot-related source code under Apache-2.0 --- LICENSE | 4 +- LICENSE-APACHE2 | 211 +++++++++++++++++++++++++ README.md | 7 +- src/Codec/Scale.hs | 2 +- src/Codec/Scale/Class.hs | 2 +- src/Codec/Scale/Compact.hs | 2 +- src/Codec/Scale/Core.hs | 2 +- src/Codec/Scale/Generic.hs | 2 +- src/Codec/Scale/SingletonEnum.hs | 2 +- src/Codec/Scale/Skip.hs | 2 +- src/Codec/Scale/TH.hs | 2 +- src/Network/Polkadot/Api/Account.hs | 2 +- src/Network/Polkadot/Api/Author.hs | 2 +- src/Network/Polkadot/Api/Babe.hs | 2 +- src/Network/Polkadot/Api/Chain.hs | 2 +- src/Network/Polkadot/Api/Childstate.hs | 2 +- src/Network/Polkadot/Api/Contracts.hs | 2 +- src/Network/Polkadot/Api/Engine.hs | 2 +- src/Network/Polkadot/Api/Grandpa.hs | 2 +- src/Network/Polkadot/Api/Offchain.hs | 2 +- src/Network/Polkadot/Api/Payment.hs | 2 +- src/Network/Polkadot/Api/Rpc.hs | 2 +- src/Network/Polkadot/Api/State.hs | 2 +- src/Network/Polkadot/Api/System.hs | 2 +- src/Network/Polkadot/Api/Types.hs | 2 +- 25 files changed, 241 insertions(+), 25 deletions(-) create mode 100644 LICENSE-APACHE2 diff --git a/LICENSE b/LICENSE index f6ef0da6..23a27c7b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright Alexander Krupenkin (c) 2016-2020 +Copyright Aleksandr Krupenkin (c) 2016-2020 All rights reserved. @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are met: disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Alexander Krupenkin nor the names of other + * Neither the name of Aleksandr Krupenkin nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/LICENSE-APACHE2 b/LICENSE-APACHE2 new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/LICENSE-APACHE2 @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/README.md b/README.md index cf625b55..d962be5e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ This library implements Haskell API client for popular Web3 platforms. [![LTS-14](http://stackage.org/package/web3/badge/lts-14)](http://stackage.org/lts-14/package/web3) [![nightly](http://stackage.org/package/web3/badge/nightly)](http://stackage.org/nightly/package/web3) [![Code Triagers](https://www.codetriage.com/airalab/hs-web3/badges/users.svg)](https://www.codetriage.com/airalab/hs-web3) -![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg) Install ------- @@ -79,3 +78,9 @@ main = do --- Read more in the [documentation on ReadTheDocs](https://hs-web3.readthedocs.io). + +License +------- + +* `Network.Polkadot` and `Codec.Scale` is licensed under [Apache 2.0](https://github.com/airalab/hs-web3/blob/master/LICENSE-APACHE2) +* All other source is licensed under [BSD-3-Clause](https://github.com/airalab/hs-web3/blob/master/LICENSE-BSD3) diff --git a/src/Codec/Scale.hs b/src/Codec/Scale.hs index 7657d567..de66bd1b 100644 --- a/src/Codec/Scale.hs +++ b/src/Codec/Scale.hs @@ -3,7 +3,7 @@ -- | -- Module : Codec.Scale.Class -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Codec/Scale/Class.hs b/src/Codec/Scale/Class.hs index 4f215d0d..92f6a337 100644 --- a/src/Codec/Scale/Class.hs +++ b/src/Codec/Scale/Class.hs @@ -5,7 +5,7 @@ -- | -- Module : Codec.Scale.Class -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Codec/Scale/Compact.hs b/src/Codec/Scale/Compact.hs index a10e39ef..8e5f01e1 100644 --- a/src/Codec/Scale/Compact.hs +++ b/src/Codec/Scale/Compact.hs @@ -1,7 +1,7 @@ -- | -- Module : Codec.Scale.Compact -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Codec/Scale/Core.hs b/src/Codec/Scale/Core.hs index 39abd09f..17352464 100644 --- a/src/Codec/Scale/Core.hs +++ b/src/Codec/Scale/Core.hs @@ -5,7 +5,7 @@ -- | -- Module : Codec.Scale.Core -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Codec/Scale/Generic.hs b/src/Codec/Scale/Generic.hs index d83c80ee..3371a140 100644 --- a/src/Codec/Scale/Generic.hs +++ b/src/Codec/Scale/Generic.hs @@ -9,7 +9,7 @@ -- | -- Module : Codec.Scale.Generic -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Codec/Scale/SingletonEnum.hs b/src/Codec/Scale/SingletonEnum.hs index 02c1dfd4..7b334aa7 100644 --- a/src/Codec/Scale/SingletonEnum.hs +++ b/src/Codec/Scale/SingletonEnum.hs @@ -1,7 +1,7 @@ -- | -- Module : Codec.Scale.SingletonEnum -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Codec/Scale/Skip.hs b/src/Codec/Scale/Skip.hs index 54614f93..aedac49b 100644 --- a/src/Codec/Scale/Skip.hs +++ b/src/Codec/Scale/Skip.hs @@ -1,7 +1,7 @@ -- | -- Module : Codec.Scale.Skip -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Codec/Scale/TH.hs b/src/Codec/Scale/TH.hs index 813539f0..4159e2cc 100644 --- a/src/Codec/Scale/TH.hs +++ b/src/Codec/Scale/TH.hs @@ -3,7 +3,7 @@ -- | -- Module : Codec.Scale.TH -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Account.hs b/src/Network/Polkadot/Api/Account.hs index a1e1ca90..bd073f23 100644 --- a/src/Network/Polkadot/Api/Account.hs +++ b/src/Network/Polkadot/Api/Account.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Account -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Author.hs b/src/Network/Polkadot/Api/Author.hs index 65b1e1ce..03bd70f5 100644 --- a/src/Network/Polkadot/Api/Author.hs +++ b/src/Network/Polkadot/Api/Author.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Author -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Babe.hs b/src/Network/Polkadot/Api/Babe.hs index 70e084de..1c80a102 100644 --- a/src/Network/Polkadot/Api/Babe.hs +++ b/src/Network/Polkadot/Api/Babe.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Babe -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Chain.hs b/src/Network/Polkadot/Api/Chain.hs index 937e0b5e..af3ea174 100644 --- a/src/Network/Polkadot/Api/Chain.hs +++ b/src/Network/Polkadot/Api/Chain.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Chain -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Childstate.hs b/src/Network/Polkadot/Api/Childstate.hs index 55122e57..26c57cf5 100644 --- a/src/Network/Polkadot/Api/Childstate.hs +++ b/src/Network/Polkadot/Api/Childstate.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Childstate -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Contracts.hs b/src/Network/Polkadot/Api/Contracts.hs index fc9719ea..21aa49de 100644 --- a/src/Network/Polkadot/Api/Contracts.hs +++ b/src/Network/Polkadot/Api/Contracts.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Contracts -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Engine.hs b/src/Network/Polkadot/Api/Engine.hs index cd97d840..b9d9bee2 100644 --- a/src/Network/Polkadot/Api/Engine.hs +++ b/src/Network/Polkadot/Api/Engine.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Engine -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Grandpa.hs b/src/Network/Polkadot/Api/Grandpa.hs index ba82dbbe..b67e4e7c 100644 --- a/src/Network/Polkadot/Api/Grandpa.hs +++ b/src/Network/Polkadot/Api/Grandpa.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Grandpa -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Offchain.hs b/src/Network/Polkadot/Api/Offchain.hs index 8d2723dc..50e2b9a5 100644 --- a/src/Network/Polkadot/Api/Offchain.hs +++ b/src/Network/Polkadot/Api/Offchain.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Offchain -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Payment.hs b/src/Network/Polkadot/Api/Payment.hs index 81301bdb..4e81615a 100644 --- a/src/Network/Polkadot/Api/Payment.hs +++ b/src/Network/Polkadot/Api/Payment.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Payment -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Rpc.hs b/src/Network/Polkadot/Api/Rpc.hs index 93225c6d..06e51e73 100644 --- a/src/Network/Polkadot/Api/Rpc.hs +++ b/src/Network/Polkadot/Api/Rpc.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.Rpc -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/State.hs b/src/Network/Polkadot/Api/State.hs index e3960a1c..9863293f 100644 --- a/src/Network/Polkadot/Api/State.hs +++ b/src/Network/Polkadot/Api/State.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.State -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/System.hs b/src/Network/Polkadot/Api/System.hs index 87b3e625..fa03e713 100644 --- a/src/Network/Polkadot/Api/System.hs +++ b/src/Network/Polkadot/Api/System.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Api.System -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Polkadot/Api/Types.hs b/src/Network/Polkadot/Api/Types.hs index 6d7bccf1..8ad69d5f 100644 --- a/src/Network/Polkadot/Api/Types.hs +++ b/src/Network/Polkadot/Api/Types.hs @@ -7,7 +7,7 @@ -- | -- Module : Network.Polkadot.Api.Types -- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental From cdcb666b23395b99f38004c67a17cc41d3ad9c0a Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 17 Oct 2020 17:13:33 +0300 Subject: [PATCH 156/237] Multi-package reorganisation. The library becomes to have a lot of source files, in my point of view, is better to split it for multiple packages. Some packages may have not so many dependencies and could be used separately. --- .github/workflows/testing.yml | 16 + .gitignore | 1 + .hlint.yaml | 83 - .travis.yml | 40 - LICENSE | 241 +- Makefile | 8 - README.md | 1 + compiler/Language/Solidity/Compiler.hs | 58 - .../Language/Solidity/Compiler/Foreign.hsc | 106 - compiler/cbits/solidity_lite.cpp | 100 - compiler/cbits/solidity_lite.h | 26 - examples/{token => erc20}/ERC20.hs | 0 examples/{token => erc20}/ERC20.json | 0 examples/{token => erc20}/Main.hs | 3 +- examples/{token => erc20}/package.yaml | 15 +- examples/polkadot/package.yaml | 11 +- examples/polkadot/stack.yaml | 70 - examples/scale/package.yaml | 11 +- examples/scale/stack.yaml | 70 - examples/token/stack.yaml | 71 - package.yaml | 162 - LICENSE-APACHE2 => packages/crypto/LICENSE | 0 Setup.hs => packages/crypto/Setup.hs | 0 packages/crypto/package.yaml | 66 + .../crypto/src}/Crypto/Ecdsa/Signature.hs | 6 +- .../crypto/src}/Crypto/Ecdsa/Utils.hs | 4 +- .../crypto/src}/Crypto/Ethereum.hs | 4 +- .../crypto/src}/Crypto/Ethereum/Keyfile.hs | 5 +- .../crypto/src}/Crypto/Ethereum/Signature.hs | 4 +- .../crypto/src}/Crypto/Ethereum/Utils.hs | 4 +- .../crypto/src}/Crypto/Random/HmacDrbg.hs | 4 +- .../Crypto/Ethereum/Test/KeyfileSpec.hs | 0 .../Crypto/Ethereum/Test/SignatureSpec.hs | 40 +- .../tests}/Crypto/Random/Test/HmacDrbgSpec.hs | 0 {test => packages/crypto/tests}/Spec.hs | 0 packages/ethereum/LICENSE | 211 + packages/ethereum/Setup.hs | 2 + packages/ethereum/package.yaml | 80 + .../ethereum/src}/Network/Ethereum.hs | 6 +- .../ethereum/src}/Network/Ethereum/Account.hs | 4 +- .../src}/Network/Ethereum/Account/Class.hs | 4 +- .../src}/Network/Ethereum/Account/Default.hs | 4 +- .../src}/Network/Ethereum/Account/Internal.hs | 4 +- .../src}/Network/Ethereum/Account/LocalKey.hs | 6 +- .../src}/Network/Ethereum/Account/Personal.hs | 4 +- .../src}/Network/Ethereum/Account/Safe.hs | 4 +- .../ethereum/src}/Network/Ethereum/Api/Eth.hs | 4 +- .../ethereum/src}/Network/Ethereum/Api/Net.hs | 4 +- .../src}/Network/Ethereum/Api/Personal.hs | 2 +- .../src}/Network/Ethereum/Api/Types.hs | 24 +- .../src}/Network/Ethereum/Api/Web3.hs | 4 +- .../ethereum/src}/Network/Ethereum/Chain.hs | 4 +- .../src}/Network/Ethereum/Contract.hs | 4 +- .../src}/Network/Ethereum/Contract/Event.hs | 4 +- .../Network/Ethereum/Contract/Event/Common.hs | 4 +- .../Ethereum/Contract/Event/MultiFilter.hs | 2 +- .../Ethereum/Contract/Event/SingleFilter.hs | 2 +- .../src}/Network/Ethereum/Contract/Method.hs | 4 +- .../src}/Network/Ethereum/Contract/TH.hs | 26 +- .../ethereum/src}/Network/Ethereum/Ens.hs | 13 +- .../Network/Ethereum/Ens/PublicResolver.hs | 4 +- .../src}/Network/Ethereum/Ens/Registry.hs | 4 +- .../src}/Network/Ethereum/Transaction.hs | 4 +- .../ethereum/src}/Network/Ethereum/Unit.hs | 4 +- .../tests/Network/Ethereum}/Test/EventSpec.hs | 6 +- .../Network/Ethereum}/Test/MethodDumpSpec.hs | 5 +- .../tests/Network/Ethereum}/Test/THSpec.hs | 4 +- .../Network/Ethereum/Test/TransactionSpec.hs | 26 + {unit => packages/ethereum/tests}/Spec.hs | 0 packages/ethereum/tests/contracts/ERC20.json | 1 + .../ethereum/tests}/contracts/Exchange.json | 0 packages/hexstring/LICENSE | 211 + packages/hexstring/Setup.hs | 2 + packages/hexstring/package.yaml | 47 + .../src}/Data/ByteArray/HexString.hs | 4 +- packages/ipfs/LICENSE | 211 + packages/ipfs/Setup.hs | 2 + packages/ipfs/package.yaml | 54 + .../ipfs/src}/Network/Ipfs/Api/Bitswap.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Block.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Bootstrap.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Cid.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Config.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Core.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Dag.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Dht.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Files.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Internal.hs | 4 +- .../src}/Network/Ipfs/Api/Internal/Call.hs | 4 +- .../src}/Network/Ipfs/Api/Internal/Stream.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Key.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Log.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Object.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Pin.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Pubsub.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Repo.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Stats.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Swarm.hs | 4 +- .../ipfs/src}/Network/Ipfs/Api/Types.hs | 4 +- .../src}/Network/Ipfs/Api/Types/Stream.hs | 4 +- .../ipfs/src}/Network/Ipfs/Client.hs | 4 +- packages/jsonrpc/LICENSE | 211 + packages/jsonrpc/Setup.hs | 2 + packages/jsonrpc/package.yaml | 52 + .../src}/Network/JsonRpc/TinyClient.hs | 8 +- packages/polkadot/LICENSE | 211 + packages/polkadot/Setup.hs | 2 + packages/polkadot/package.yaml | 48 + .../src}/Network/Polkadot/Api/Account.hs | 2 +- .../src}/Network/Polkadot/Api/Author.hs | 2 +- .../src}/Network/Polkadot/Api/Babe.hs | 2 +- .../src}/Network/Polkadot/Api/Chain.hs | 2 +- .../src}/Network/Polkadot/Api/Childstate.hs | 2 +- .../src}/Network/Polkadot/Api/Contracts.hs | 2 +- .../src}/Network/Polkadot/Api/Engine.hs | 2 +- .../src}/Network/Polkadot/Api/Grandpa.hs | 2 +- .../src}/Network/Polkadot/Api/Offchain.hs | 2 +- .../src}/Network/Polkadot/Api/Payment.hs | 2 +- .../polkadot/src}/Network/Polkadot/Api/Rpc.hs | 2 +- .../src}/Network/Polkadot/Api/State.hs | 2 +- .../src}/Network/Polkadot/Api/System.hs | 2 +- .../src}/Network/Polkadot/Api/Types.hs | 34 +- packages/scale/LICENSE | 211 + packages/scale/Setup.hs | 2 + packages/scale/package.yaml | 68 + {src => packages/scale/src}/Codec/Scale.hs | 2 +- .../scale/src}/Codec/Scale/Class.hs | 2 +- .../scale/src}/Codec/Scale/Compact.hs | 2 +- .../scale/src}/Codec/Scale/Core.hs | 2 +- .../scale/src}/Codec/Scale/Generic.hs | 2 +- .../scale/src}/Codec/Scale/SingletonEnum.hs | 2 +- .../scale/src}/Codec/Scale/Skip.hs | 2 +- {src => packages/scale/src}/Codec/Scale/TH.hs | 2 +- .../scale/tests}/Codec/Scale/Test/CoreSpec.hs | 4 +- .../Codec/Scale/Test/SingleFieldStructSpec.hs | 4 +- .../scale/tests}/Codec/Scale/Test/SkipSpec.hs | 2 +- packages/scale/tests/Spec.hs | 1 + packages/solidity/LICENSE | 211 + packages/solidity/Setup.hs | 2 + packages/solidity/package.yaml | 74 + .../solidity/src}/Data/Solidity/Abi.hs | 4 +- .../solidity/src}/Data/Solidity/Abi/Codec.hs | 4 +- .../src}/Data/Solidity/Abi/Generic.hs | 4 +- .../solidity/src}/Data/Solidity/Event.hs | 26 +- .../src}/Data/Solidity/Event/Internal.hs | 4 +- .../solidity/src}/Data/Solidity/Prim.hs | 4 +- .../src}/Data/Solidity/Prim/Address.hs | 6 +- .../solidity/src}/Data/Solidity/Prim/Bool.hs | 4 +- .../solidity/src}/Data/Solidity/Prim/Bytes.hs | 4 +- .../solidity/src}/Data/Solidity/Prim/Int.hs | 4 +- .../solidity/src}/Data/Solidity/Prim/List.hs | 4 +- .../src}/Data/Solidity/Prim/String.hs | 4 +- .../src}/Data/Solidity/Prim/Tagged.hs | 4 +- .../solidity/src}/Data/Solidity/Prim/Tuple.hs | 4 +- .../src}/Data/Solidity/Prim/Tuple/TH.hs | 4 +- .../solidity/src}/Language/Solidity/Abi.hs | 56 +- .../tests}/Data/Solidity/Test/AddressSpec.hs | 1 - .../tests}/Data/Solidity/Test/EncodingSpec.hs | 0 .../tests}/Data/Solidity/Test/IntSpec.hs | 0 .../tests}/Language/Solidity/Test/AbiSpec.hs | 0 .../Language/Solidity/Test/CompilerSpec.hs | 0 packages/solidity/tests/Spec.hs | 1 + packages/web3/LICENSE | 211 + packages/web3/Setup.hs | 2 + packages/web3/package.yaml | 53 + {src => packages/web3/src}/Network/Web3.hs | 4 +- .../web3/src}/Network/Web3/Provider.hs | 9 +- src/Data/String/Extra.hs | 25 - stack.yaml | 15 +- .../Ethereum/Test/ComplexStorageSpec.hs | 151 - test/Network/Ethereum/Test/ERC20Spec.hs | 36 - .../Ethereum/Test/LinearizationSpec.hs | 193 - .../Network/Ethereum/Test/LocalAccountSpec.hs | 51 - test/Network/Ethereum/Test/RegistrySpec.hs | 33 - .../Ethereum/Test/SimpleStorageSpec.hs | 202 - test/Network/Ethereum/Test/Utils.hs | 80 - test/Network/Ipfs/Api/Test/Key.hs | 47 - test/contracts/ComplexStorage.json | 4533 ----------------- test/contracts/Linearization.json | 2716 ---------- test/contracts/Registry.json | 506 -- test/contracts/SimpleStorage.json | 600 --- 181 files changed, 2812 insertions(+), 10327 deletions(-) create mode 100644 .github/workflows/testing.yml delete mode 100644 .hlint.yaml delete mode 100644 .travis.yml delete mode 100644 Makefile delete mode 100644 compiler/Language/Solidity/Compiler.hs delete mode 100644 compiler/Language/Solidity/Compiler/Foreign.hsc delete mode 100644 compiler/cbits/solidity_lite.cpp delete mode 100644 compiler/cbits/solidity_lite.h rename examples/{token => erc20}/ERC20.hs (100%) rename examples/{token => erc20}/ERC20.json (100%) rename examples/{token => erc20}/Main.hs (99%) rename examples/{token => erc20}/package.yaml (66%) delete mode 100644 examples/polkadot/stack.yaml delete mode 100644 examples/scale/stack.yaml delete mode 100644 examples/token/stack.yaml delete mode 100644 package.yaml rename LICENSE-APACHE2 => packages/crypto/LICENSE (100%) rename Setup.hs => packages/crypto/Setup.hs (100%) create mode 100644 packages/crypto/package.yaml rename {src => packages/crypto/src}/Crypto/Ecdsa/Signature.hs (96%) rename {src => packages/crypto/src}/Crypto/Ecdsa/Utils.hs (95%) rename {src => packages/crypto/src}/Crypto/Ethereum.hs (89%) rename {src => packages/crypto/src}/Crypto/Ethereum/Keyfile.hs (99%) rename {src => packages/crypto/src}/Crypto/Ethereum/Signature.hs (96%) rename {src => packages/crypto/src}/Crypto/Ethereum/Utils.hs (87%) rename {src => packages/crypto/src}/Crypto/Random/HmacDrbg.hs (96%) rename {unit => packages/crypto/tests}/Crypto/Ethereum/Test/KeyfileSpec.hs (100%) rename {unit => packages/crypto/tests}/Crypto/Ethereum/Test/SignatureSpec.hs (63%) rename {unit => packages/crypto/tests}/Crypto/Random/Test/HmacDrbgSpec.hs (100%) rename {test => packages/crypto/tests}/Spec.hs (100%) create mode 100644 packages/ethereum/LICENSE create mode 100644 packages/ethereum/Setup.hs create mode 100644 packages/ethereum/package.yaml rename {src => packages/ethereum/src}/Network/Ethereum.hs (81%) rename {src => packages/ethereum/src}/Network/Ethereum/Account.hs (95%) rename {src => packages/ethereum/src}/Network/Ethereum/Account/Class.hs (95%) rename {src => packages/ethereum/src}/Network/Ethereum/Account/Default.hs (97%) rename {src => packages/ethereum/src}/Network/Ethereum/Account/Internal.hs (98%) rename {src => packages/ethereum/src}/Network/Ethereum/Account/LocalKey.hs (96%) rename {src => packages/ethereum/src}/Network/Ethereum/Account/Personal.hs (97%) rename {src => packages/ethereum/src}/Network/Ethereum/Account/Safe.hs (96%) rename {src => packages/ethereum/src}/Network/Ethereum/Api/Eth.hs (99%) rename {src => packages/ethereum/src}/Network/Ethereum/Api/Net.hs (92%) rename {src => packages/ethereum/src}/Network/Ethereum/Api/Personal.hs (99%) rename {src => packages/ethereum/src}/Network/Ethereum/Api/Types.hs (95%) rename {src => packages/ethereum/src}/Network/Ethereum/Api/Web3.hs (91%) rename {src => packages/ethereum/src}/Network/Ethereum/Chain.hs (89%) rename {src => packages/ethereum/src}/Network/Ethereum/Contract.hs (95%) rename {src => packages/ethereum/src}/Network/Ethereum/Contract/Event.hs (88%) rename {src => packages/ethereum/src}/Network/Ethereum/Contract/Event/Common.hs (97%) rename {src => packages/ethereum/src}/Network/Ethereum/Contract/Event/MultiFilter.hs (99%) rename {src => packages/ethereum/src}/Network/Ethereum/Contract/Event/SingleFilter.hs (99%) rename {src => packages/ethereum/src}/Network/Ethereum/Contract/Method.hs (91%) rename {src => packages/ethereum/src}/Network/Ethereum/Contract/TH.hs (93%) rename {src => packages/ethereum/src}/Network/Ethereum/Ens.hs (84%) rename {src => packages/ethereum/src}/Network/Ethereum/Ens/PublicResolver.hs (97%) rename {src => packages/ethereum/src}/Network/Ethereum/Ens/Registry.hs (96%) rename {src => packages/ethereum/src}/Network/Ethereum/Transaction.hs (96%) rename {src => packages/ethereum/src}/Network/Ethereum/Unit.hs (98%) rename {unit/Network/Ethereum/Web3 => packages/ethereum/tests/Network/Ethereum}/Test/EventSpec.hs (92%) rename {unit/Network/Ethereum/Web3 => packages/ethereum/tests/Network/Ethereum}/Test/MethodDumpSpec.hs (65%) rename {unit/Network/Ethereum/Contract => packages/ethereum/tests/Network/Ethereum}/Test/THSpec.hs (87%) create mode 100644 packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs rename {unit => packages/ethereum/tests}/Spec.hs (100%) create mode 100644 packages/ethereum/tests/contracts/ERC20.json rename {test => packages/ethereum/tests}/contracts/Exchange.json (100%) create mode 100644 packages/hexstring/LICENSE create mode 100644 packages/hexstring/Setup.hs create mode 100644 packages/hexstring/package.yaml rename {src => packages/hexstring/src}/Data/ByteArray/HexString.hs (96%) create mode 100644 packages/ipfs/LICENSE create mode 100644 packages/ipfs/Setup.hs create mode 100644 packages/ipfs/package.yaml rename {src => packages/ipfs/src}/Network/Ipfs/Api/Bitswap.hs (94%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Block.hs (93%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Bootstrap.hs (92%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Cid.hs (94%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Config.hs (93%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Core.hs (97%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Dag.hs (94%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Dht.hs (94%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Files.hs (97%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Internal.hs (98%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Internal/Call.hs (96%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Internal/Stream.hs (94%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Key.hs (94%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Log.hs (94%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Object.hs (97%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Pin.hs (91%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Pubsub.hs (93%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Repo.hs (93%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Stats.hs (90%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Swarm.hs (95%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Types.hs (99%) rename {src => packages/ipfs/src}/Network/Ipfs/Api/Types/Stream.hs (98%) rename {src => packages/ipfs/src}/Network/Ipfs/Client.hs (94%) create mode 100644 packages/jsonrpc/LICENSE create mode 100644 packages/jsonrpc/Setup.hs create mode 100644 packages/jsonrpc/package.yaml rename {src => packages/jsonrpc/src}/Network/JsonRpc/TinyClient.hs (97%) create mode 100644 packages/polkadot/LICENSE create mode 100644 packages/polkadot/Setup.hs create mode 100644 packages/polkadot/package.yaml rename {src => packages/polkadot/src}/Network/Polkadot/Api/Account.hs (93%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Author.hs (97%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Babe.hs (93%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Chain.hs (96%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Childstate.hs (97%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Contracts.hs (97%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Engine.hs (96%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Grandpa.hs (93%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Offchain.hs (96%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Payment.hs (94%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Rpc.hs (92%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/State.hs (99%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/System.hs (98%) rename {src => packages/polkadot/src}/Network/Polkadot/Api/Types.hs (87%) create mode 100644 packages/scale/LICENSE create mode 100644 packages/scale/Setup.hs create mode 100644 packages/scale/package.yaml rename {src => packages/scale/src}/Codec/Scale.hs (97%) rename {src => packages/scale/src}/Codec/Scale/Class.hs (97%) rename {src => packages/scale/src}/Codec/Scale/Compact.hs (98%) rename {src => packages/scale/src}/Codec/Scale/Core.hs (99%) rename {src => packages/scale/src}/Codec/Scale/Generic.hs (98%) rename {src => packages/scale/src}/Codec/Scale/SingletonEnum.hs (95%) rename {src => packages/scale/src}/Codec/Scale/Skip.hs (94%) rename {src => packages/scale/src}/Codec/Scale/TH.hs (95%) rename {unit => packages/scale/tests}/Codec/Scale/Test/CoreSpec.hs (99%) rename {unit => packages/scale/tests}/Codec/Scale/Test/SingleFieldStructSpec.hs (97%) rename {unit => packages/scale/tests}/Codec/Scale/Test/SkipSpec.hs (98%) create mode 100644 packages/scale/tests/Spec.hs create mode 100644 packages/solidity/LICENSE create mode 100644 packages/solidity/Setup.hs create mode 100644 packages/solidity/package.yaml rename {src => packages/solidity/src}/Data/Solidity/Abi.hs (96%) rename {src => packages/solidity/src}/Data/Solidity/Abi/Codec.hs (95%) rename {src => packages/solidity/src}/Data/Solidity/Abi/Generic.hs (98%) rename {src => packages/solidity/src}/Data/Solidity/Event.hs (88%) rename {src => packages/solidity/src}/Data/Solidity/Event/Internal.hs (98%) rename {src => packages/solidity/src}/Data/Solidity/Prim.hs (90%) rename {src => packages/solidity/src}/Data/Solidity/Prim/Address.hs (96%) rename {src => packages/solidity/src}/Data/Solidity/Prim/Bool.hs (88%) rename {src => packages/solidity/src}/Data/Solidity/Prim/Bytes.hs (98%) rename {src => packages/solidity/src}/Data/Solidity/Prim/Int.hs (98%) rename {src => packages/solidity/src}/Data/Solidity/Prim/List.hs (95%) rename {src => packages/solidity/src}/Data/Solidity/Prim/String.hs (90%) rename {src => packages/solidity/src}/Data/Solidity/Prim/Tagged.hs (91%) rename {src => packages/solidity/src}/Data/Solidity/Prim/Tuple.hs (93%) rename {src => packages/solidity/src}/Data/Solidity/Prim/Tuple/TH.hs (94%) rename {src => packages/solidity/src}/Language/Solidity/Abi.hs (82%) rename {unit => packages/solidity/tests}/Data/Solidity/Test/AddressSpec.hs (98%) rename {unit => packages/solidity/tests}/Data/Solidity/Test/EncodingSpec.hs (100%) rename {unit => packages/solidity/tests}/Data/Solidity/Test/IntSpec.hs (100%) rename {unit => packages/solidity/tests}/Language/Solidity/Test/AbiSpec.hs (100%) rename {unit => packages/solidity/tests}/Language/Solidity/Test/CompilerSpec.hs (100%) create mode 100644 packages/solidity/tests/Spec.hs create mode 100644 packages/web3/LICENSE create mode 100644 packages/web3/Setup.hs create mode 100644 packages/web3/package.yaml rename {src => packages/web3/src}/Network/Web3.hs (83%) rename {src => packages/web3/src}/Network/Web3/Provider.hs (98%) delete mode 100644 src/Data/String/Extra.hs delete mode 100644 test/Network/Ethereum/Test/ComplexStorageSpec.hs delete mode 100644 test/Network/Ethereum/Test/ERC20Spec.hs delete mode 100644 test/Network/Ethereum/Test/LinearizationSpec.hs delete mode 100644 test/Network/Ethereum/Test/LocalAccountSpec.hs delete mode 100644 test/Network/Ethereum/Test/RegistrySpec.hs delete mode 100644 test/Network/Ethereum/Test/SimpleStorageSpec.hs delete mode 100644 test/Network/Ethereum/Test/Utils.hs delete mode 100644 test/Network/Ipfs/Api/Test/Key.hs delete mode 100644 test/contracts/ComplexStorage.json delete mode 100644 test/contracts/Linearization.json delete mode 100644 test/contracts/Registry.json delete mode 100644 test/contracts/SimpleStorage.json diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 00000000..3405d42c --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,16 @@ +on: [push] +name: Testing +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + name: Haskell Web3 tests on ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - nameuses: actions/setup-haskell@v1 + with: + enable-stack: true + stack-version: 'latest' + - run: stack test diff --git a/.gitignore b/.gitignore index 1b94246b..077ef307 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ build/ dist/ docs/_build *.cabal +stack.yaml.lock diff --git a/.hlint.yaml b/.hlint.yaml deleted file mode 100644 index 1e22fcd2..00000000 --- a/.hlint.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# HLint configuration file -# https://github.com/ndmitchell/hlint -########################## - -# This file contains a template configuration file, which is typically -# placed as .hlint.yaml in the root of your project - - -# Specify additional command line arguments -# -# - arguments: [--color, --cpp-simple, -XQuasiQuotes] -- arguments: - - --color - - -XTemplateHaskell - - -XQuasiQuotes - - -XTypeApplications - - -XTypeFamilies - - -XTypeOperators - - -XDataKinds - - -XPolyKinds - - -XMultiParamTypeClasses - - -XScopedTypeVariables - - -XFlexibleContexts - - -XFlexibleInstances - - -XLambdaCase - - -XArrows - - -XPatternSynonyms - -# Control which extensions/flags/modules/functions can be used -# -# - extensions: -# - default: false # all extension are banned by default -# - name: [PatternGuards, ViewPatterns] # only these listed extensions can be used -# - {name: CPP, within: CrossPlatform} # CPP can only be used in a given module -# -# - flags: -# - {name: -w, within: []} # -w is allowed nowhere -# -# - modules: -# - {name: [Data.Set, Data.HashSet], as: Set} # if you import Data.Set qualified, it must be as 'Set' -# - {name: Control.Arrow, within: []} # Certain modules are banned entirely -# -# - functions: -# - {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules - - -# Add custom hints for this project -# -# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar" -# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x} - - -# Turn on hints that are off by default -# -# Ban "module X(module X) where", to require a real export list -# - warn: {name: Use explicit module export list} -# -# Replace a $ b $ c with a . b $ c -# - group: {name: dollar, enabled: true} -# -# Generalise map to fmap, ++ to <> -# - group: {name: generalise, enabled: true} - - -# Ignore some builtin hints -- ignore: {name: Redundant do} -- ignore: {name: Redundant $} -- ignore: {name: Parse error} -- ignore: {name: Eta reduce} -- ignore: {name: Reduce duplication} -- ignore: {name: Use .} -- ignore: {name: Use asks} -- ignore: {name: Use newtype instead of data} -- ignore: {name: Use camelCase} -# - ignore: {name: Use const, within: SpecialModule} # Only within certain modules - - -# Define some custom infix operators -# - fixity: infixr 3 ~^#^~ - - -# To generate a suitable file for HLint do: -# $ hlint --default > .hlint.yaml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9c1095a0..00000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -sudo: false -language: cpp - -# Caching so the next build will be fast too. -cache: - directories: - - $HOME/.stack - - $TRAVIS_BUILD_DIR/.stack-work - -# The different configurations we want to test. -matrix: - # Build with different GHC versions and stable package sets - include: - - env: RESOLVER=lts-15 - compiler: "LTS15" - - env: RESOLVER=nightly - compiler: "nightly" - - - env: RESOLVER=lts-15 - compiler: "LTS15" - os: osx - - env: RESOLVER=nightly - compiler: "nightly" - os: osx - - - env: RESOLVER=lts-15 - compiler: "LTS15" - os: windows - - env: RESOLVER=nightly - compiler: "nightly" - os: windows - -before_install: -- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then choco install haskell-stack; else curl -sSL https://get.haskellstack.org/ | sh; fi - -install: -- travis_wait 180 stack build --no-terminal --haddock --no-haddock-deps --resolver $RESOLVER - -script: -- stack test web3:unit --no-terminal --resolver $RESOLVER diff --git a/LICENSE b/LICENSE index 23a27c7b..ef9ef7ee 100644 --- a/LICENSE +++ b/LICENSE @@ -1,30 +1,211 @@ -Copyright Aleksandr Krupenkin (c) 2016-2020 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Aleksandr Krupenkin nor the names of other - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/Makefile b/Makefile deleted file mode 100644 index c7b89c3a..00000000 --- a/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -.PHONY: hlint stylish - -hlint: ## Run hlint on all haskell projects - stack exec hlint -- -h .hlint.yaml src test - -stylish: ## Run stylish-haskell over all haskell projects - find ./src -name "*.hs" | xargs stylish-haskell -c ./.stylish_haskell.yaml -i - find ./test -name "*.hs" | xargs stylish-haskell -c ./.stylish_haskell.yaml -i diff --git a/README.md b/README.md index d962be5e..f8ebb548 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Usage ```haskell {-# LANGUAGE OverloadedStrings #-} + module Main where -- Basic imports diff --git a/compiler/Language/Solidity/Compiler.hs b/compiler/Language/Solidity/Compiler.hs deleted file mode 100644 index 47e59075..00000000 --- a/compiler/Language/Solidity/Compiler.hs +++ /dev/null @@ -1,58 +0,0 @@ -{-# LANGUAGE CPP #-} -#ifdef SOLIDITY_COMPILER -{-# LANGUAGE RecordWildCards #-} -#endif - --- | --- Module : Language.Solidity.Compiler --- Copyright : Alexander Krupenkin 2017 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : portable --- --- Solidity compiler high-level bindings. --- - -module Language.Solidity.Compiler where - -#ifdef SOLIDITY_COMPILER - -import Data.ByteString (ByteString) -import Data.Map (Map) -import Data.Semigroup (Semigroup (..)) -import qualified Language.Solidity.Compiler.Foreign as FFI -import System.IO.Unsafe (unsafePerformIO) - --- | Input contract sources -data Sources = Sources - { sourceMap :: Map ByteString ByteString - -- ^ Source code map from contract name in keys - , libraries :: Map ByteString ByteString - -- ^ Library address map for linking - , optimization :: Bool - -- ^ Enable optimization? - } deriving (Eq, Show) - -instance Semigroup Sources where - a <> b = Sources (sourceMap a `mappend` sourceMap b) - (libraries a `mappend` libraries b) - (optimization a || optimization b) - -instance Monoid Sources where - mappend = (<>) - mempty = Sources mempty mempty False - -type Compiled = Map ByteString (ByteString, ByteString) - --- | Compile Solidity contracts -compile :: Sources - -- ^ Contract sources - -> Either ByteString Compiled - -- ^ Error string or compiled contracts ABI and hex -{-# NOINLINE compile #-} -compile Sources{..} = unsafePerformIO $ - FFI.compile sourceMap libraries optimization - -#endif diff --git a/compiler/Language/Solidity/Compiler/Foreign.hsc b/compiler/Language/Solidity/Compiler/Foreign.hsc deleted file mode 100644 index a26a0f46..00000000 --- a/compiler/Language/Solidity/Compiler/Foreign.hsc +++ /dev/null @@ -1,106 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE ForeignFunctionInterface #-} - --- | --- Module : Language.Solidity.Compiler.Foreign --- Copyright : Alexander Krupenkin 2017 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- --- Ethereum Solidity library FFI. --- - -module Language.Solidity.Compiler.Foreign where - -#ifdef SOLIDITY_COMPILER -#include - -import Data.Map as M -import Data.ByteString.Char8 as BS -import Data.Typeable (Typeable) -import Foreign.C.String (CString, peekCString, withCString) -import Foreign.C.Types (CInt(..)) -import Foreign.Ptr (Ptr) -import Foreign (free) - -data Solidity - deriving Typeable - -foreign import ccall unsafe "create" c_create - :: IO (Ptr Solidity) -foreign import ccall unsafe "destroy" c_destroy - :: Ptr Solidity -> IO () -foreign import ccall unsafe "addSource" c_addSource - :: Ptr Solidity -> CString -> CString -> IO CInt -foreign import ccall unsafe "addLibrary" c_addLibrary - :: Ptr Solidity -> CString -> CString -> IO CInt -foreign import ccall unsafe "compile" c_compile - :: Ptr Solidity -> CInt -> IO CInt -foreign import ccall unsafe "abi" c_abi - :: Ptr Solidity -> CString -> IO CString -foreign import ccall unsafe "binary" c_binary - :: Ptr Solidity -> CString -> IO CString -foreign import ccall unsafe "errors" c_errors - :: Ptr Solidity -> IO CString - -withSolidity :: (Ptr Solidity -> IO a) -> IO a -{-# INLINE withSolidity #-} -withSolidity f = do - ptr <- c_create - r <- f ptr - c_destroy ptr - return r - -withCStringPair :: (CString -> CString -> IO a) -> (ByteString, ByteString) -> IO a -{-# INLINE withCStringPair #-} -withCStringPair f (a, b) = - withCString (BS.unpack a) $ \astr -> - withCString (BS.unpack b) $ \bstr -> - f astr bstr - -addSources :: Ptr Solidity -> Map ByteString ByteString -> IO () -{-# INLINE addSources #-} -addSources ptr = mapM_ (withCStringPair $ c_addSource ptr) . M.toList - -addLibraries :: Ptr Solidity -> Map ByteString ByteString -> IO () -{-# INLINE addLibraries #-} -addLibraries ptr = mapM_ (withCStringPair $ c_addLibrary ptr) . M.toList - -result :: Ptr Solidity -> ByteString -> IO (ByteString, ByteString) -result ptr name = - withCString (BS.unpack name) $ \cname -> do - abi <- c_abi ptr cname - bin <- c_binary ptr cname - res <- (,) <$> fmap BS.pack (peekCString abi) - <*> fmap BS.pack (peekCString bin) - free abi - free bin - return res - -errors :: Ptr Solidity -> IO ByteString -errors ptr = do - errs <- c_errors ptr - res <- BS.pack <$> peekCString errs - free errs - return res - -compile :: Map ByteString ByteString - -> Map ByteString ByteString - -> Bool - -> IO (Either ByteString (Map ByteString (ByteString, ByteString))) -compile srcs libs opt = - withSolidity $ \ptr -> do - addSources ptr srcs - addLibraries ptr libs - res <- c_compile ptr optI - let compiled = sequence $ M.mapWithKey (const . result ptr) srcs - if res < 0 - then Left <$> errors ptr - else Right <$> compiled - where optI | opt = 1 - | otherwise = 0 - -#endif diff --git a/compiler/cbits/solidity_lite.cpp b/compiler/cbits/solidity_lite.cpp deleted file mode 100644 index a93d6d95..00000000 --- a/compiler/cbits/solidity_lite.cpp +++ /dev/null @@ -1,100 +0,0 @@ -#include -#include -#include - -using namespace dev::solidity; -using namespace langutil; -using namespace std; - -struct Solidity { - Solidity() : compiler(new CompilerStack) - {} - - ~Solidity() - { delete compiler; } - - CompilerStack * compiler; - map libs; -}; - -#ifdef __cplusplus -extern "C" -{ -#endif - -namespace dev { -namespace solidity { -namespace lite { - -void * create() -{ - return static_cast(new Solidity); -} - -void destroy(void * self) -{ - delete static_cast(self); -} - -int addSource(void * self, const char * name, const char * source) -{ - return static_cast(self)->compiler->addSource(name, source); -} - -int addLibrary(void * self, const char * name, const char * address) -{ - static_cast(self)->libs[name] = dev::h160(address); - return 0; -} - -int compile(void * self, int optimize) -{ - auto s = static_cast(self); - - s->compiler->setOptimiserSettings(optimize); - s->compiler->setLibraries(s->libs); - s->compiler->reset(true); - if (s->compiler->parseAndAnalyze()) - if (s->compiler->compile()) - return 0; - - return -1; -} - -char * c_string(const std::string &str) -{ - auto c_str = (char *) calloc(1, str.size()+1); - memcpy(c_str, str.c_str(), str.size()); - return c_str; -} - -char * abi(void * self, const char * name) -{ - auto abi_value = static_cast(self)->compiler->contractABI(name); - return c_string(abi_value.toStyledString()); -} - -char * binary(void * self, const char * name) -{ - auto bin_object = static_cast(self)->compiler->object(name); - return c_string(bin_object.toHex()); -} - -char * errors(void * self) -{ - auto compiler = static_cast(self)->compiler; - stringstream error_stream; - for (auto const& error: compiler->errors()) { - SourceReferenceFormatter fmt(error_stream, [&](string const& _source) -> Scanner const& { return compiler->scanner(_source); }); - fmt.printExceptionInformation(*error, (error->type() == Error::Type::Warning) ? "Warning" : "Error"); - } - return c_string(error_stream.str()); -} - -} // solidity -} // lite -} // dev - -#ifdef __cplusplus -} -#endif diff --git a/compiler/cbits/solidity_lite.h b/compiler/cbits/solidity_lite.h deleted file mode 100644 index 2ae935ae..00000000 --- a/compiler/cbits/solidity_lite.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -void * solite_create(); - -void solite_destroy(void * solite); - -int solite_add_source(void * solite, const char * name, const char * source); - -int solite_add_library(void * solite, const char * name, const char * address); - -int solite_compile(void * solite, int optimize); - -char * solite_abi(void * solite, const char * name); - -char * solite_binary(void * solite, const char * name); - -char * solite_errors(void * solite); - -#ifdef __cplusplus -} -#endif diff --git a/examples/token/ERC20.hs b/examples/erc20/ERC20.hs similarity index 100% rename from examples/token/ERC20.hs rename to examples/erc20/ERC20.hs diff --git a/examples/token/ERC20.json b/examples/erc20/ERC20.json similarity index 100% rename from examples/token/ERC20.json rename to examples/erc20/ERC20.json diff --git a/examples/token/Main.hs b/examples/erc20/Main.hs similarity index 99% rename from examples/token/Main.hs rename to examples/erc20/Main.hs index 40ed4bbe..1737b90b 100644 --- a/examples/token/Main.hs +++ b/examples/erc20/Main.hs @@ -3,12 +3,11 @@ module Main where import Data.Default (def) import Data.Text (unpack) -import Text.Printf (printf) - import Lens.Micro ((.~)) import Network.Ethereum hiding (name) import Network.Ethereum.Account import Network.Web3 +import Text.Printf (printf) import ERC20 diff --git a/examples/token/package.yaml b/examples/erc20/package.yaml similarity index 66% rename from examples/token/package.yaml rename to examples/erc20/package.yaml index 7fdd32f0..3950c296 100644 --- a/examples/token/package.yaml +++ b/examples/erc20/package.yaml @@ -1,19 +1,20 @@ name: example-erc20 version: 0.0.0.0 -synopsis: ERC20 token example +synopsis: ERC20 token example. github: "airalab/hs-web3" -license: BSD3 -author: Alexander Krupenkin +license: Apache-2.0 +author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Alexander Krupenkin 2016" +copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: - base -- data-default -- microlens - text -- web3 +- web3 +- microlens +- data-default +- web3-ethereum executables: example-erc20: diff --git a/examples/polkadot/package.yaml b/examples/polkadot/package.yaml index c5f0063f..e57226ea 100644 --- a/examples/polkadot/package.yaml +++ b/examples/polkadot/package.yaml @@ -1,16 +1,17 @@ name: example-polkadot version: 0.0.0.0 -synopsis: Polkadot API example +synopsis: Polkadot API example. github: "airalab/hs-web3" -license: BSD3 -author: Alexander Krupenkin +license: Apache-2.0 +author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Alexander Krupenkin 2016" +copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: - base -- web3 +- web3 +- web3-polkadot executables: example-polkadot: diff --git a/examples/polkadot/stack.yaml b/examples/polkadot/stack.yaml deleted file mode 100644 index ae6424ac..00000000 --- a/examples/polkadot/stack.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# This file was automatically generated by 'stack init' -# -# Some commonly used options have been documented as comments in this file. -# For advanced use and comprehensive documentation of the format, please see: -# https://docs.haskellstack.org/en/stable/yaml_configuration/ - -# Resolver to choose a 'specific' stackage snapshot or a compiler version. -# A snapshot resolver dictates the compiler version and the set of packages -# to be used for project dependencies. For example: -# -# resolver: lts-3.5 -# resolver: nightly-2015-09-21 -# resolver: ghc-7.10.2 -# -# The location of a snapshot can be provided as a file or url. Stack assumes -# a snapshot provided as a file might change, whereas a url resource does not. -# -# resolver: ./custom-snapshot.yaml -# resolver: https://example.com/snapshots/2018-01-01.yaml -resolver: lts-15.13 - -# User packages to be built. -# Various formats can be used as shown in the example below. -# -# packages: -# - some-directory -# - https://example.com/foo/bar/baz-0.0.2.tar.gz -# - location: -# git: https://github.com/commercialhaskell/stack.git -# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a -# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a -# subdirs: -# - auto-update -# - wai -packages: -- . -- ../.. -# Dependency packages to be pulled from upstream that are not in the resolver -# using the same syntax as the packages field. -# (e.g., acme-missiles-0.3) -extra-deps: -- relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c -- vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c - -# Override default flag values for local packages and extra-deps -# flags: {} - -# Extra package databases containing global packages -# extra-package-dbs: [] - -# Control whether we use the GHC we find on the path -# system-ghc: true -# -# Require a specific version of stack, using version ranges -# require-stack-version: -any # Default -# require-stack-version: ">=1.9" -# -# Override the architecture used by stack, especially useful on Windows -# arch: i386 -# arch: x86_64 -# -# Extra directories used by stack for building -# extra-include-dirs: [/path/to/dir] -# extra-lib-dirs: [/path/to/dir] -# -# Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor -nix: - packages: - - zlib diff --git a/examples/scale/package.yaml b/examples/scale/package.yaml index 02908f11..035f8da5 100644 --- a/examples/scale/package.yaml +++ b/examples/scale/package.yaml @@ -1,17 +1,18 @@ name: example-scale version: 0.0.0.0 -synopsis: SCALE codec example +synopsis: SCALE codec example. github: "airalab/hs-web3" -license: BSD3 -author: Alexander Krupenkin +license: Apache-2.0 +author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Alexander Krupenkin 2016" +copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: - base -- web3 - generics-sop +- web3-scale +- web3-hexstring executables: example-scale: diff --git a/examples/scale/stack.yaml b/examples/scale/stack.yaml deleted file mode 100644 index ae6424ac..00000000 --- a/examples/scale/stack.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# This file was automatically generated by 'stack init' -# -# Some commonly used options have been documented as comments in this file. -# For advanced use and comprehensive documentation of the format, please see: -# https://docs.haskellstack.org/en/stable/yaml_configuration/ - -# Resolver to choose a 'specific' stackage snapshot or a compiler version. -# A snapshot resolver dictates the compiler version and the set of packages -# to be used for project dependencies. For example: -# -# resolver: lts-3.5 -# resolver: nightly-2015-09-21 -# resolver: ghc-7.10.2 -# -# The location of a snapshot can be provided as a file or url. Stack assumes -# a snapshot provided as a file might change, whereas a url resource does not. -# -# resolver: ./custom-snapshot.yaml -# resolver: https://example.com/snapshots/2018-01-01.yaml -resolver: lts-15.13 - -# User packages to be built. -# Various formats can be used as shown in the example below. -# -# packages: -# - some-directory -# - https://example.com/foo/bar/baz-0.0.2.tar.gz -# - location: -# git: https://github.com/commercialhaskell/stack.git -# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a -# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a -# subdirs: -# - auto-update -# - wai -packages: -- . -- ../.. -# Dependency packages to be pulled from upstream that are not in the resolver -# using the same syntax as the packages field. -# (e.g., acme-missiles-0.3) -extra-deps: -- relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c -- vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c - -# Override default flag values for local packages and extra-deps -# flags: {} - -# Extra package databases containing global packages -# extra-package-dbs: [] - -# Control whether we use the GHC we find on the path -# system-ghc: true -# -# Require a specific version of stack, using version ranges -# require-stack-version: -any # Default -# require-stack-version: ">=1.9" -# -# Override the architecture used by stack, especially useful on Windows -# arch: i386 -# arch: x86_64 -# -# Extra directories used by stack for building -# extra-include-dirs: [/path/to/dir] -# extra-lib-dirs: [/path/to/dir] -# -# Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor -nix: - packages: - - zlib diff --git a/examples/token/stack.yaml b/examples/token/stack.yaml deleted file mode 100644 index 81646526..00000000 --- a/examples/token/stack.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# This file was automatically generated by 'stack init' -# -# Some commonly used options have been documented as comments in this file. -# For advanced use and comprehensive documentation of the format, please see: -# https://docs.haskellstack.org/en/stable/yaml_configuration/ - -# Resolver to choose a 'specific' stackage snapshot or a compiler version. -# A snapshot resolver dictates the compiler version and the set of packages -# to be used for project dependencies. For example: -# -# resolver: lts-3.5 -# resolver: nightly-2015-09-21 -# resolver: ghc-7.10.2 -# -# The location of a snapshot can be provided as a file or url. Stack assumes -# a snapshot provided as a file might change, whereas a url resource does not. -# -# resolver: ./custom-snapshot.yaml -# resolver: https://example.com/snapshots/2018-01-01.yaml -resolver: lts-15.13 - -# User packages to be built. -# Various formats can be used as shown in the example below. -# -# packages: -# - some-directory -# - https://example.com/foo/bar/baz-0.0.2.tar.gz -# - location: -# git: https://github.com/commercialhaskell/stack.git -# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a -# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a -# subdirs: -# - auto-update -# - wai -packages: -- . -- ../.. -# Dependency packages to be pulled from upstream that are not in the resolver -# using the same syntax as the packages field. -# (e.g., acme-missiles-0.3) -extra-deps: -- relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c -- vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c - -# Override default flag values for local packages and extra-deps -# flags: {} - -# Extra package databases containing global packages -# extra-package-dbs: [] - -# Control whether we use the GHC we find on the path -# system-ghc: true -# -# Require a specific version of stack, using version ranges -# require-stack-version: -any # Default -# require-stack-version: ">=1.9" -# -# Override the architecture used by stack, especially useful on Windows -# arch: i386 -# arch: x86_64 -# -# Extra directories used by stack for building -# extra-include-dirs: [/path/to/dir] -# extra-lib-dirs: [/path/to/dir] -# -# Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor -nix: - packages: - - zlib - - secp256k1 diff --git a/package.yaml b/package.yaml deleted file mode 100644 index d19d8133..00000000 --- a/package.yaml +++ /dev/null @@ -1,162 +0,0 @@ -name: web3 -version: 0.9.1.0 -synopsis: Web3 API for Haskell. -description: Client library for Third Generation of Web. -github: "airalab/hs-web3" -license: BSD-3-Clause -license-file: LICENSE -author: Alexander Krupenkin -maintainer: mail@akru.me -copyright: "(c) Alexander Krupenkin 2016" -category: Network - -extra-source-files: -- README.md -- CHANGELOG.md -- stack.yaml -- examples/token/ERC20.hs -- examples/token/ERC20.json -- examples/token/Main.hs -- examples/token/stack.yaml -- examples/token/package.yaml -- examples/polkadot/Main.hs -- examples/polkadot/stack.yaml -- examples/polkadot/package.yaml -- examples/scale/Main.hs -- examples/scale/stack.yaml -- examples/scale/package.yaml -- test/contracts/Registry.json -- test/contracts/SimpleStorage.json -- test/contracts/ComplexStorage.json -- test/contracts/Linearization.json - -dependencies: -- base >4.11 && <4.14 -- template-haskell >=2.12 && <2.16 -- http-client-tls >=0.3.5.1 && <0.4 -- microlens-aeson >=2.2.0.2 && <2.4 -- microlens-mtl >=0.1.11.0 && <0.3 -- microlens-th >=0.4.1.1 && <0.5 -- microlens >=0.4.8.1 && <0.5 -- data-default >=0.7.1.1 && <0.8 -- generics-sop >=0.3.1.0 && <0.6 -- transformers >=0.5.2.0 && <0.6 -- http-client >=0.5.7.1 && <0.7 -- uuid-types >=1.0.3 && <1.1 -- bytestring >=0.10.8.1 && <0.11 -- cryptonite >=0.23 && <0.27 -- exceptions >=0.8.3 && <0.11 -- bitvec >=1.0.0 && <2.0 -- vector >=0.12 && <0.13 -- basement >=0.0.4 && <0.1 -- machines >=0.6.3 && <0.8 -- OneTuple >=0.2.1 && <0.3 -- relapse >=1.0.0.0 && <2.0 -- tagged >=0.8.5 && <0.9 -- parsec >=3.1.11 && <3.2 -- memory >=0.14.11 && <0.16 -- cereal >=0.5.4.0 && <0.6 -- aeson >=1.2.2.0 && <1.5 -- vinyl >=0.5.3 && <0.13 -- async >=2.1.1.1 && <2.3 -- text >=1.2.2.2 && <1.3 -- mtl >=2.2.1 && <2.3 -- websockets >=0.11 && <0.13 -- network >=2.6 && <3.2 -- servant-client >=0.13 && <0.17 -- servant >=0.13 && <0.17 -- http-media >=0.7 && <0.8.1 -- errors >=2.2 && <2.4 -- hspec >=2.4 && <2.8 -- base58string >=0.10.0 && <0.11 -- tar >=0.5 && <0.6 -- unordered-containers >=0.2 && <0.3 -- http-types >=0.12 && <0.14 -- attoparsec >=0.13.2.1 && <0.14 - -ghc-options: -- -funbox-strict-fields -- -Wduplicate-exports -- -Whi-shadowing -- -Widentities -- -Woverlapping-patterns -- -Wpartial-type-signatures -- -Wunrecognised-pragmas -- -Wtyped-holes -- -Wincomplete-patterns -- -Wincomplete-uni-patterns -- -Wmissing-fields -- -Wmissing-methods -- -Wmissing-exported-signatures -- -Wmissing-monadfail-instances -- -Wmissing-signatures -- -Wname-shadowing -- -Wunused-binds -- -Wunused-top-binds -- -Wunused-local-binds -- -Wunused-pattern-binds -- -Wunused-imports -- -Wunused-matches -- -Wunused-foralls -- -Wtabs - -flags: - debug: - description: Enable debug compiler options - default: False - manual: True - - compiler: - description: Enable Solidity compiler - default: False - manual: True - -when: -- condition: flag(debug) - ghc-options: -ddump-splices - -- condition: flag(compiler) - source-dirs: compiler - cpp-options: -DSOLIDITY_COMPILER - dependencies: containers - extra-libraries: solidity - c-sources: ./compiler/cbits/solidity_lite.cpp - include-dirs: ./compiler/cbits - -library: - source-dirs: src - -tests: - unit: - main: Spec.hs - source-dirs: - - unit - - src - dependencies: - - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.8 - - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.8 - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N - - live: - main: Spec.hs - source-dirs: - - test - - src - dependencies: - - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.8 - - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.8 - - split >=0.2.3 && <0.3 - - random >=1.1 && <1.2 - - time >=1.6.0 && <1.11 - - stm >=2.4.4 && <2.6 - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N diff --git a/LICENSE-APACHE2 b/packages/crypto/LICENSE similarity index 100% rename from LICENSE-APACHE2 rename to packages/crypto/LICENSE diff --git a/Setup.hs b/packages/crypto/Setup.hs similarity index 100% rename from Setup.hs rename to packages/crypto/Setup.hs diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml new file mode 100644 index 00000000..7140a7c5 --- /dev/null +++ b/packages/crypto/package.yaml @@ -0,0 +1,66 @@ +name: web3-crypto +version: 1.0.0.0 +synopsis: Cryptograhical primitives for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- text >1.2 && <1.3 +- aeson >1.2 && <1.5 +- memory >0.14 && <0.16 +- uuid-types >1.0 && <1.1 +- cryptonite >0.22 && <0.27 +- bytestring >0.10 && <0.11 +- web3-hexstring >=1.0 && <1.1 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src + +tests: + tests: + main: Spec.hs + source-dirs: + - tests + - src + dependencies: + - hspec-expectations >=0.8.2 && <0.9 + - hspec-discover >=2.4.4 && <2.8 + - hspec-contrib >=0.4.0 && <0.6 + - hspec >=2.4.4 && <2.8 + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/src/Crypto/Ecdsa/Signature.hs b/packages/crypto/src/Crypto/Ecdsa/Signature.hs similarity index 96% rename from src/Crypto/Ecdsa/Signature.hs rename to packages/crypto/src/Crypto/Ecdsa/Signature.hs index bcfc2588..22edba71 100644 --- a/src/Crypto/Ecdsa/Signature.hs +++ b/packages/crypto/src/Crypto/Ecdsa/Signature.hs @@ -2,8 +2,8 @@ -- | -- Module : Crypto.Ecdsa.Signature --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -79,7 +79,7 @@ ecsign pk@(PrivateKey curve d) z = do -- Use complement of s if it > n / 2 let (s', v') | s > n `div` 2 = (n - s, v `xor` 1) | otherwise = (s, v) - return $ (r, s', v' + 27) + return (r, s', v' + 27) -- | Unpack recoverable signature from byte array. -- diff --git a/src/Crypto/Ecdsa/Utils.hs b/packages/crypto/src/Crypto/Ecdsa/Utils.hs similarity index 95% rename from src/Crypto/Ecdsa/Utils.hs rename to packages/crypto/src/Crypto/Ecdsa/Utils.hs index d01060e1..f762f764 100644 --- a/src/Crypto/Ecdsa/Utils.hs +++ b/packages/crypto/src/Crypto/Ecdsa/Utils.hs @@ -1,7 +1,7 @@ -- | -- Module : Crypto.Ecdsa.Utils --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Crypto/Ethereum.hs b/packages/crypto/src/Crypto/Ethereum.hs similarity index 89% rename from src/Crypto/Ethereum.hs rename to packages/crypto/src/Crypto/Ethereum.hs index 5e4a02ff..a4fb95f4 100644 --- a/src/Crypto/Ethereum.hs +++ b/packages/crypto/src/Crypto/Ethereum.hs @@ -1,7 +1,7 @@ -- | -- Module : Crypto.Ethereum --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Crypto/Ethereum/Keyfile.hs b/packages/crypto/src/Crypto/Ethereum/Keyfile.hs similarity index 99% rename from src/Crypto/Ethereum/Keyfile.hs rename to packages/crypto/src/Crypto/Ethereum/Keyfile.hs index 38f87991..a94eda48 100644 --- a/src/Crypto/Ethereum/Keyfile.hs +++ b/packages/crypto/src/Crypto/Ethereum/Keyfile.hs @@ -1,10 +1,11 @@ {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} + -- | -- Module : Crypto.Ethereum.Keyfile --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Crypto/Ethereum/Signature.hs b/packages/crypto/src/Crypto/Ethereum/Signature.hs similarity index 96% rename from src/Crypto/Ethereum/Signature.hs rename to packages/crypto/src/Crypto/Ethereum/Signature.hs index 461781e3..039472a6 100644 --- a/src/Crypto/Ethereum/Signature.hs +++ b/packages/crypto/src/Crypto/Ethereum/Signature.hs @@ -2,8 +2,8 @@ -- | -- Module : Crypto.Ecdsa.Signature --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Crypto/Ethereum/Utils.hs b/packages/crypto/src/Crypto/Ethereum/Utils.hs similarity index 87% rename from src/Crypto/Ethereum/Utils.hs rename to packages/crypto/src/Crypto/Ethereum/Utils.hs index 1536cc37..c4bf330b 100644 --- a/src/Crypto/Ethereum/Utils.hs +++ b/packages/crypto/src/Crypto/Ethereum/Utils.hs @@ -1,7 +1,7 @@ -- | -- Module : Crypto.Ethereum.Utils --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Crypto/Random/HmacDrbg.hs b/packages/crypto/src/Crypto/Random/HmacDrbg.hs similarity index 96% rename from src/Crypto/Random/HmacDrbg.hs rename to packages/crypto/src/Crypto/Random/HmacDrbg.hs index 6a7c8832..48b6d4b7 100644 --- a/src/Crypto/Random/HmacDrbg.hs +++ b/packages/crypto/src/Crypto/Random/HmacDrbg.hs @@ -1,7 +1,7 @@ -- | -- Module : Crypto.Random.HmacDrbg --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/unit/Crypto/Ethereum/Test/KeyfileSpec.hs b/packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs similarity index 100% rename from unit/Crypto/Ethereum/Test/KeyfileSpec.hs rename to packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs diff --git a/unit/Crypto/Ethereum/Test/SignatureSpec.hs b/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs similarity index 63% rename from unit/Crypto/Ethereum/Test/SignatureSpec.hs rename to packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs index 1a8b113a..0ccd9835 100644 --- a/unit/Crypto/Ethereum/Test/SignatureSpec.hs +++ b/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs @@ -1,18 +1,12 @@ {-# LANGUAGE OverloadedStrings #-} module Crypto.Ethereum.Test.SignatureSpec where -import Data.ByteArray (convert) -import Data.Foldable (for_) +import Crypto.Ecdsa.Utils (importKey) +import Crypto.Ethereum.Signature (hashMessage, signMessage) +import Data.ByteArray (convert) +import Data.ByteArray.HexString (HexString) +import Data.Foldable (for_) import Test.Hspec -import Test.Hspec.QuickCheck - -import Crypto.Ecdsa.Utils (importKey) -import Crypto.Ethereum.Signature (hashMessage, signMessage, - signTransaction) -import Data.ByteArray.HexString (HexString) -import Data.Solidity.Prim.Address (fromPubKey) -import Network.Ethereum.Api.Types (Call (..)) -import Network.Ethereum.Transaction (encodeTransaction) test_vector :: [(HexString, HexString, HexString)] test_vector = [ @@ -39,27 +33,3 @@ spec = do it "can sign Ethereum prefixed message" $ for_ test_vector $ \(msg, _, msgSig) -> signMessage (importKey test_key) msg `shouldBe` msgSig - - it "can create valid raw transaction" $ do - -- using same example as in this blog post: - -- https://medium.com/@codetractio/walkthrough-of-an-ethereum-improvement-proposal-eip-6fda3966d171 - let testCall = Call Nothing - (Just "0x3535353535353535353535353535353535353535") - (Just 21000) - (Just 20000000000) - (Just 1000000000000000000) - Nothing - (Just 9) - key = "4646464646464646464646464646464646464646464646464646464646464646" :: HexString - correctSignedTx = "f86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83" - signTransaction (encodeTransaction testCall 1) (importKey key) `shouldBe` (correctSignedTx :: HexString) - -{- - it "verify message by Ethereum public key" $ do - ecrecover sign' message `shouldBe` Just address - - prop "round robin sign/verify for random message" $ \chars -> - let msg = pack chars - in ecrecover (ecsign key msg) msg `shouldBe` Just address --} - diff --git a/unit/Crypto/Random/Test/HmacDrbgSpec.hs b/packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs similarity index 100% rename from unit/Crypto/Random/Test/HmacDrbgSpec.hs rename to packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs diff --git a/test/Spec.hs b/packages/crypto/tests/Spec.hs similarity index 100% rename from test/Spec.hs rename to packages/crypto/tests/Spec.hs diff --git a/packages/ethereum/LICENSE b/packages/ethereum/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/ethereum/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/ethereum/Setup.hs b/packages/ethereum/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/ethereum/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml new file mode 100644 index 00000000..e266578c --- /dev/null +++ b/packages/ethereum/package.yaml @@ -0,0 +1,80 @@ +name: web3-ethereum +version: 1.0.0.0 +synopsis: Ethereum support for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- text >1.2 && <1.3 +- vinyl >0.5 && <0.13 +- aeson >1.2 && <1.5 +- tagged >0.8 && <0.9 +- memory >0.14 && <0.16 +- relapse >=1.0 && <2.0 +- OneTuple >0.2 && <0.3 +- machines >0.6 && <0.8 +- microlens >0.4 && <0.5 +- bytestring >0.10 && <0.11 +- exceptions >0.8 && <0.11 +- generics-sop >0.3 && <0.6 +- data-default >0.7 && <0.8 +- transformers >0.5 && <0.6 +- microlens-aeson >2.2 && <2.4 +- template-haskell >2.11 && <2.16 +- mtl >2.2 && <2.3 +- web3-crypto >=1.0 && <1.1 +- web3-jsonrpc >=1.0 && <1.1 +- web3-solidity >=1.0 && <1.1 +- web3-hexstring >=1.0 && <1.1 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src + +tests: + tests: + main: Spec.hs + source-dirs: + - tests + - src + dependencies: + - hspec-expectations >=0.8.2 && <0.9 + - hspec-discover >=2.4.4 && <2.8 + - hspec-contrib >=0.4.0 && <0.6 + - hspec >=2.4.4 && <2.8 + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/src/Network/Ethereum.hs b/packages/ethereum/src/Network/Ethereum.hs similarity index 81% rename from src/Network/Ethereum.hs rename to packages/ethereum/src/Network/Ethereum.hs index 2d340dbb..0b2386b5 100644 --- a/src/Network/Ethereum.hs +++ b/packages/ethereum/src/Network/Ethereum.hs @@ -1,13 +1,13 @@ -- | -- Module : Network.Ethereum --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental -- Portability : unportable -- --- TODO +-- Ethereum is a global, open-source platform for decentralized applications. -- module Network.Ethereum diff --git a/src/Network/Ethereum/Account.hs b/packages/ethereum/src/Network/Ethereum/Account.hs similarity index 95% rename from src/Network/Ethereum/Account.hs rename to packages/ethereum/src/Network/Ethereum/Account.hs index cb1d6162..09121c9f 100644 --- a/src/Network/Ethereum/Account.hs +++ b/packages/ethereum/src/Network/Ethereum/Account.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ethereum.Account --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Account/Class.hs b/packages/ethereum/src/Network/Ethereum/Account/Class.hs similarity index 95% rename from src/Network/Ethereum/Account/Class.hs rename to packages/ethereum/src/Network/Ethereum/Account/Class.hs index d8cce656..bc27dbc8 100644 --- a/src/Network/Ethereum/Account/Class.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Class.hs @@ -3,8 +3,8 @@ -- | -- Module : Network.Ethereum.Account.Class --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Account/Default.hs b/packages/ethereum/src/Network/Ethereum/Account/Default.hs similarity index 97% rename from src/Network/Ethereum/Account/Default.hs rename to packages/ethereum/src/Network/Ethereum/Account/Default.hs index 9ddbc7be..f1f59922 100644 --- a/src/Network/Ethereum/Account/Default.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Default.hs @@ -5,8 +5,8 @@ -- | -- Module : Network.Ethereum.Account.Default --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Account/Internal.hs b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs similarity index 98% rename from src/Network/Ethereum/Account/Internal.hs rename to packages/ethereum/src/Network/Ethereum/Account/Internal.hs index a88c2e3d..57dd7016 100644 --- a/src/Network/Ethereum/Account/Internal.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs @@ -5,8 +5,8 @@ -- | -- Module : Network.Ethereum.Account.Internal --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Account/LocalKey.hs b/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs similarity index 96% rename from src/Network/Ethereum/Account/LocalKey.hs rename to packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs index a7695992..248d5783 100644 --- a/src/Network/Ethereum/Account/LocalKey.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs @@ -5,9 +5,9 @@ -- | -- Module : Network.Ethereum.Account.LocalKey --- Copyright : Alexander Krupenkin 2018 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- Roy Blankman 2018 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -23,7 +23,7 @@ import Control.Exception (TypeError (..)) import Control.Monad.Catch (throwM) import Control.Monad.State.Strict (get, runStateT) import Control.Monad.Trans (lift) -import Crypto.PubKey.ECC.ECDSA (PrivateKey) +import Crypto.Ethereum (PrivateKey) import Data.ByteArray (convert) import Data.ByteString (empty) import Data.Default (Default (..)) diff --git a/src/Network/Ethereum/Account/Personal.hs b/packages/ethereum/src/Network/Ethereum/Account/Personal.hs similarity index 97% rename from src/Network/Ethereum/Account/Personal.hs rename to packages/ethereum/src/Network/Ethereum/Account/Personal.hs index bc7a2916..87b618dd 100644 --- a/src/Network/Ethereum/Account/Personal.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Personal.hs @@ -6,8 +6,8 @@ -- | -- Module : Network.Ethereum.Account.Personal --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Account/Safe.hs b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs similarity index 96% rename from src/Network/Ethereum/Account/Safe.hs rename to packages/ethereum/src/Network/Ethereum/Account/Safe.hs index 8baee202..064a81a4 100644 --- a/src/Network/Ethereum/Account/Safe.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs @@ -2,8 +2,8 @@ -- | -- Module : Network.Ethereum.Account.Safe --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Api/Eth.hs b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs similarity index 99% rename from src/Network/Ethereum/Api/Eth.hs rename to packages/ethereum/src/Network/Ethereum/Api/Eth.hs index 534dc773..3b4ff368 100644 --- a/src/Network/Ethereum/Api/Eth.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs @@ -3,8 +3,8 @@ -- | -- Module : Network.Ethereum.Web3.Eth --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Api/Net.hs b/packages/ethereum/src/Network/Ethereum/Api/Net.hs similarity index 92% rename from src/Network/Ethereum/Api/Net.hs rename to packages/ethereum/src/Network/Ethereum/Api/Net.hs index 4383e6f0..42f745d2 100644 --- a/src/Network/Ethereum/Api/Net.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Net.hs @@ -3,8 +3,8 @@ -- | -- Module : Network.Ethereum.Api.Net --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Api/Personal.hs b/packages/ethereum/src/Network/Ethereum/Api/Personal.hs similarity index 99% rename from src/Network/Ethereum/Api/Personal.hs rename to packages/ethereum/src/Network/Ethereum/Api/Personal.hs index 4a17bc00..9e05a7e3 100644 --- a/src/Network/Ethereum/Api/Personal.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Personal.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Ethereum.Api.Personal -- Copyright : Keagan McClelland 2018 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : keagan.mcclelland@gmail.com -- Stability : experimental diff --git a/src/Network/Ethereum/Api/Types.hs b/packages/ethereum/src/Network/Ethereum/Api/Types.hs similarity index 95% rename from src/Network/Ethereum/Api/Types.hs rename to packages/ethereum/src/Network/Ethereum/Api/Types.hs index 0f499c50..501086c3 100644 --- a/src/Network/Ethereum/Api/Types.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Types.hs @@ -6,8 +6,8 @@ -- | -- Module : Network.Ethereum.Api.Types --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -22,6 +22,8 @@ import Data.Aeson (FromJSON (..), Options (fieldLabelM ToJSON (..), Value (Bool, String), defaultOptions, object, (.=)) import Data.Aeson.TH (deriveJSON) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) import Data.Default (Default (..)) import Data.Solidity.Prim.Address (Address) import Data.String (IsString (..)) @@ -30,9 +32,7 @@ import qualified Data.Text.Lazy.Builder as B (toLazyText) import qualified Data.Text.Lazy.Builder.Int as B (hexadecimal) import qualified Data.Text.Read as R (decimal, hexadecimal) import GHC.Generics (Generic) - -import Data.ByteArray.HexString (HexString) -import Data.String.Extra (toLowerFirst) +import Lens.Micro (over, _head) -- | Should be viewed as type to representing QUANTITY in Web3 JSON RPC docs -- @@ -85,7 +85,7 @@ data SyncActive = SyncActive deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 4 }) ''SyncActive) + { fieldLabelModifier = over _head toLower . drop 4 }) ''SyncActive) -- | Sync state pulled by low-level call 'eth_syncing'. data SyncingState = Syncing SyncActive @@ -119,7 +119,7 @@ data Change = Change deriving (Eq, Show, Generic) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 6 }) ''Change) + { fieldLabelModifier = over _head toLower . drop 6 }) ''Change) -- | The contract call params. data Call = Call @@ -141,7 +141,7 @@ data Call = Call deriving (Eq, Show, Generic) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 4 + { fieldLabelModifier = over _head toLower . drop 4 , omitNothingFields = True }) ''Call) instance Default Call where @@ -156,7 +156,7 @@ data DefaultBlock = BlockWithNumber Quantity instance ToJSON DefaultBlock where toJSON (BlockWithNumber bn) = toJSON bn - toJSON parameter = toJSON . toLowerFirst . show $ parameter + toJSON parameter = toJSON . over _head toLower . show $ parameter -- | Low-level event filter data structure. data Filter e = Filter @@ -217,7 +217,7 @@ data TxReceipt = TxReceipt deriving (Show, Generic) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 7 }) ''TxReceipt) + { fieldLabelModifier = over _head toLower . drop 7 }) ''TxReceipt) -- | Transaction information. data Transaction = Transaction @@ -247,7 +247,7 @@ data Transaction = Transaction deriving (Eq, Show, Generic) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 2 }) ''Transaction) + { fieldLabelModifier = over _head toLower . drop 2 }) ''Transaction) -- | Block information. data Block = Block @@ -293,4 +293,4 @@ data Block = Block deriving (Show, Generic) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 5 }) ''Block) + { fieldLabelModifier = over _head toLower . drop 5 }) ''Block) diff --git a/src/Network/Ethereum/Api/Web3.hs b/packages/ethereum/src/Network/Ethereum/Api/Web3.hs similarity index 91% rename from src/Network/Ethereum/Api/Web3.hs rename to packages/ethereum/src/Network/Ethereum/Api/Web3.hs index 7f7d8369..a1a531d9 100644 --- a/src/Network/Ethereum/Api/Web3.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Web3.hs @@ -3,8 +3,8 @@ -- | -- Module : Network.Ethereum.Api.Web3 --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Chain.hs b/packages/ethereum/src/Network/Ethereum/Chain.hs similarity index 89% rename from src/Network/Ethereum/Chain.hs rename to packages/ethereum/src/Network/Ethereum/Chain.hs index 69325da7..b91fbb4b 100644 --- a/src/Network/Ethereum/Chain.hs +++ b/packages/ethereum/src/Network/Ethereum/Chain.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ethereum.Chain --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Contract.hs b/packages/ethereum/src/Network/Ethereum/Contract.hs similarity index 95% rename from src/Network/Ethereum/Contract.hs rename to packages/ethereum/src/Network/Ethereum/Contract.hs index 94158542..e40e31be 100644 --- a/src/Network/Ethereum/Contract.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract.hs @@ -5,8 +5,8 @@ -- | -- Module : Network.Ethereum.Contract --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Contract/Event.hs b/packages/ethereum/src/Network/Ethereum/Contract/Event.hs similarity index 88% rename from src/Network/Ethereum/Contract/Event.hs rename to packages/ethereum/src/Network/Ethereum/Contract/Event.hs index c5e99797..dc727be7 100644 --- a/src/Network/Ethereum/Contract/Event.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/Event.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ethereum.Contract.Event --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Contract/Event/Common.hs b/packages/ethereum/src/Network/Ethereum/Contract/Event/Common.hs similarity index 97% rename from src/Network/Ethereum/Contract/Event/Common.hs rename to packages/ethereum/src/Network/Ethereum/Contract/Event/Common.hs index 2fe6638c..4c24e4f2 100644 --- a/src/Network/Ethereum/Contract/Event/Common.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/Event/Common.hs @@ -10,7 +10,7 @@ -- | -- Module : Network.Ethereum.Contract.Event.Common -- Copyright : FOAM team 2018 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -52,7 +52,7 @@ mkFilterChanges :: DecodeEvent i ni e => [Change] -> IO [FilterChange e] mkFilterChanges changes = - let eChanges = map (\c@Change{..} -> FilterChange c <$> decodeEvent c) changes + let eChanges = map (\c@Change{..} -> FilterChange c <$> decodeEvent changeTopics changeData) changes ls = lefts eChanges rs = rights eChanges in if ls /= [] then throwIO (EventParseFailure $ show ls) else pure rs diff --git a/src/Network/Ethereum/Contract/Event/MultiFilter.hs b/packages/ethereum/src/Network/Ethereum/Contract/Event/MultiFilter.hs similarity index 99% rename from src/Network/Ethereum/Contract/Event/MultiFilter.hs rename to packages/ethereum/src/Network/Ethereum/Contract/Event/MultiFilter.hs index dbcabe60..3ce056a4 100644 --- a/src/Network/Ethereum/Contract/Event/MultiFilter.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/Event/MultiFilter.hs @@ -15,7 +15,7 @@ -- | -- Module : Network.Ethereum.Contract.Event.MultiFilter -- Copyright : FOAM team 2018 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Contract/Event/SingleFilter.hs b/packages/ethereum/src/Network/Ethereum/Contract/Event/SingleFilter.hs similarity index 99% rename from src/Network/Ethereum/Contract/Event/SingleFilter.hs rename to packages/ethereum/src/Network/Ethereum/Contract/Event/SingleFilter.hs index e8c7df34..0d06d4f3 100644 --- a/src/Network/Ethereum/Contract/Event/SingleFilter.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/Event/SingleFilter.hs @@ -13,7 +13,7 @@ -- | -- Module : Network.Ethereum.Contract.Event.SingleFilter -- Copyright : FOAM team 2018 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Contract/Method.hs b/packages/ethereum/src/Network/Ethereum/Contract/Method.hs similarity index 91% rename from src/Network/Ethereum/Contract/Method.hs rename to packages/ethereum/src/Network/Ethereum/Contract/Method.hs index f1773ffb..e2864bb2 100644 --- a/src/Network/Ethereum/Contract/Method.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/Method.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ethereum.Contract.Method --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Contract/TH.hs b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs similarity index 93% rename from src/Network/Ethereum/Contract/TH.hs rename to packages/ethereum/src/Network/Ethereum/Contract/TH.hs index f80748f5..88962c65 100644 --- a/src/Network/Ethereum/Contract/TH.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs @@ -6,8 +6,8 @@ -- | -- Module : Network.Ethereum.Contract.TH --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -47,6 +47,7 @@ import Control.Applicative ((<|>)) import Control.Monad (replicateM, (<=<)) import qualified Data.Aeson as Aeson (encode) import Data.ByteArray (convert) +import Data.Char (toLower, toUpper) import qualified Data.Char as Char import Data.Default (Default (..)) import Data.List (group, sort, uncons) @@ -60,14 +61,13 @@ import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) import Language.Haskell.TH import Language.Haskell.TH.Quote -import Lens.Micro ((^?)) +import Lens.Micro (over, (^?), _head) import Lens.Micro.Aeson (key, _JSON, _String) import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Event (IndexedEvent (..)) import Data.Solidity.Prim (Address, Bytes, BytesN, IntN, ListN, UIntN) -import Data.String.Extra (toLowerFirst, toUpperFirst) import Language.Solidity.Abi (ContractAbi (..), Declaration (..), EventArg (..), @@ -211,18 +211,18 @@ mkDecl ev@(DEvent uncheckedName inputs anonymous) = sequence [funD' 'def [] [|Filter Nothing Latest Latest $ Just topics|] ] ] where - name = if Char.toLower (T.head uncheckedName) == Char.toUpper (T.head uncheckedName) then "EvT" <> uncheckedName else uncheckedName + name = if toLower (T.head uncheckedName) == Char.toUpper (T.head uncheckedName) then "EvT" <> uncheckedName else uncheckedName topics = [Just (T.unpack $ eventId ev)] <> replicate (length indexedArgs) Nothing toBang ty = bangType (bang sourceNoUnpack sourceStrict) (return ty) tag (n, ty) = AppT (AppT (ConT ''Tagged) (LitT $ NumTyLit n)) <$> typeEventQ ty labeledArgs = zip [1..] inputs indexedArgs = map (\(n, ea) -> (n, ea)) . filter (eveArgIndexed . snd) $ labeledArgs - indexedName = mkName $ toUpperFirst (T.unpack name) <> "Indexed" + indexedName = mkName $ over _head toUpper (T.unpack name) <> "Indexed" nonIndexedArgs = map (\(n, ea) -> (n, ea)) . filter (not . eveArgIndexed . snd) $ labeledArgs - nonIndexedName = mkName $ toUpperFirst (T.unpack name) <> "NonIndexed" + nonIndexedName = mkName $ over _head toUpper (T.unpack name) <> "NonIndexed" allArgs :: [(Name, EventArg)] allArgs = makeArgs name $ map (\i -> (eveArgName i, i)) inputs - allName = mkName $ toUpperFirst (T.unpack name) + allName = mkName $ over _head toUpper (T.unpack name) derivingD = [''Show, ''Eq, ''Ord, ''GHC.Generic] -- TODO change this type name also @@ -240,8 +240,8 @@ mkDecl fun@(DFunction name constant inputs outputs) = (++) [funD' 'selector [] [|const mIdent|]] ] where mIdent = T.unpack (methodId $ fun {funName = T.replace "'" "" name}) - dataName = mkName (toUpperFirst (T.unpack $ T.dropWhile (== '_') name <> "Data")) - fnName = mkName (toLowerFirst (T.unpack name)) + dataName = mkName (over _head toUpper (T.unpack $ T.dropWhile (== '_') name <> "Data")) + fnName = mkName (over _head toLower (T.unpack name)) bangInput = fmap funBangType inputs derivingD = [''Show, ''Eq, ''Ord, ''GHC.Generic] @@ -263,7 +263,7 @@ mkContractDecl name a b (DConstructor inputs) = sequence ] where abiString = T.unpack a bytecodeString = T.unpack b - dataName = mkName (toUpperFirst (T.unpack $ name <> "Contract")) + dataName = mkName (over _head toUpper (T.unpack $ name <> "Contract")) bangInput = fmap funBangType inputs derivingD = [''Show, ''Eq, ''Ord, ''GHC.Generic] @@ -277,12 +277,12 @@ mkContractDecl _ _ _ _ = return [] makeArgs :: Text -> [(Text, EventArg)] -> [(Name, EventArg)] makeArgs prefix ns = go 1 ns where - prefixStr = toLowerFirst . T.unpack $ prefix + prefixStr = over _head toLower . T.unpack $ prefix go :: Int -> [(Text, EventArg)] -> [(Name, EventArg)] go _ [] = [] go i ((h, ty) : tail') | T.null h = (mkName $ prefixStr ++ show i, ty) : go (i + 1) tail' - | otherwise = (mkName . (++ "_") . (++) prefixStr . toUpperFirst . T.unpack $ h, ty) : go (i + 1) tail' + | otherwise = (mkName . (++ "_") . (++) prefixStr . over _head toUpper . T.unpack $ h, ty) : go (i + 1) tail' escape :: [Declaration] -> [Declaration] escape = escapeEqualNames . fmap escapeReservedNames diff --git a/src/Network/Ethereum/Ens.hs b/packages/ethereum/src/Network/Ethereum/Ens.hs similarity index 84% rename from src/Network/Ethereum/Ens.hs rename to packages/ethereum/src/Network/Ethereum/Ens.hs index 3ac075b1..8721eab3 100644 --- a/src/Network/Ethereum/Ens.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens.hs @@ -4,8 +4,8 @@ -- | -- Module : Network.Ethereum.Ens --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -19,8 +19,8 @@ module Network.Ethereum.Ens where -import Crypto.Hash (Digest, Keccak_256, hash) -import Data.ByteArray (convert, zero) +import Crypto.Ethereum (keccak256) +import Data.ByteArray (zero) import Data.ByteArray.Sized (unsafeFromByteArrayAccess) import Data.ByteString (ByteString) import Data.ByteString.Char8 (split) @@ -42,9 +42,8 @@ namehash :: ByteString namehash = unsafeFromByteArrayAccess . foldr algo (zero 32) . split '.' where - algo a b = sha3 (b <> sha3 a) - sha3 :: ByteString -> ByteString - sha3 bs = convert (hash bs :: Digest Keccak_256) + algo :: ByteString -> ByteString -> ByteString + algo a b = keccak256 (b <> keccak256 a) -- | Get address of ENS domain resolve :: (JsonRpc m, Account p (AccountT p)) diff --git a/src/Network/Ethereum/Ens/PublicResolver.hs b/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs similarity index 97% rename from src/Network/Ethereum/Ens/PublicResolver.hs rename to packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs index 8d35672e..3c07e9aa 100644 --- a/src/Network/Ethereum/Ens/PublicResolver.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs @@ -8,8 +8,8 @@ -- | -- Module : Network.Ethereum.Ens.PublicResolver --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Ens/Registry.hs b/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs similarity index 96% rename from src/Network/Ethereum/Ens/Registry.hs rename to packages/ethereum/src/Network/Ethereum/Ens/Registry.hs index a10d7703..2bedda29 100644 --- a/src/Network/Ethereum/Ens/Registry.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs @@ -8,8 +8,8 @@ -- | -- Module : Network.Ethereum.Ens.Registry --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Transaction.hs b/packages/ethereum/src/Network/Ethereum/Transaction.hs similarity index 96% rename from src/Network/Ethereum/Transaction.hs rename to packages/ethereum/src/Network/Ethereum/Transaction.hs index 7f62acc3..813533b8 100644 --- a/src/Network/Ethereum/Transaction.hs +++ b/packages/ethereum/src/Network/Ethereum/Transaction.hs @@ -3,9 +3,9 @@ -- | -- Module : Network.Ethereum.Transaction --- Copyright : Alexander Krupenkin 2018 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- Roy Blankman 2018 --- License : BSD3 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ethereum/Unit.hs b/packages/ethereum/src/Network/Ethereum/Unit.hs similarity index 98% rename from src/Network/Ethereum/Unit.hs rename to packages/ethereum/src/Network/Ethereum/Unit.hs index 91e9b629..b10fe178 100644 --- a/src/Network/Ethereum/Unit.hs +++ b/packages/ethereum/src/Network/Ethereum/Unit.hs @@ -5,8 +5,8 @@ -- | -- Module : Network.Ethereum.Unit --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/unit/Network/Ethereum/Web3/Test/EventSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs similarity index 92% rename from unit/Network/Ethereum/Web3/Test/EventSpec.hs rename to packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs index 31a108ec..13b59130 100644 --- a/unit/Network/Ethereum/Web3/Test/EventSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs @@ -3,7 +3,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} -module Network.Ethereum.Web3.Test.EventSpec where +module Network.Ethereum.Test.EventSpec where import Data.Tagged (Tagged) import Generics.SOP (Generic) @@ -33,7 +33,7 @@ eventTest = , changeData = "0x000000000000000000000000000000000000000000000000000000000000000a" , changeTopics = ["0xa32bc18230dd172221ac5c4821a5f1f1a831f27b1396d244cdd891c58f132435"] } - in decodeEvent change `shouldBe` Right (NewCount 10) + in decodeEvent (changeTopics change) (changeData change) `shouldBe` Right (NewCount 10) it "can decode erc20" $ let ercchange = Change { changeLogIndex = Just "0x2" @@ -48,7 +48,7 @@ eventTest = , "0x0000000000000000000000000000000000000000000000000000000000000002" ] } - in decodeEvent ercchange `shouldBe` Right (Transfer "0x0000000000000000000000000000000000000001" 10 "0x0000000000000000000000000000000000000002") + in decodeEvent (changeTopics ercchange) (changeData ercchange) `shouldBe` Right (Transfer "0x0000000000000000000000000000000000000001" 10 "0x0000000000000000000000000000000000000002") -- SimpleStorage Event Types diff --git a/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs similarity index 65% rename from unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs rename to packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs index 16ce0a5f..233fec73 100644 --- a/unit/Network/Ethereum/Web3/Test/MethodDumpSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs @@ -1,13 +1,12 @@ {-# LANGUAGE QuasiQuotes #-} -module Network.Ethereum.Web3.Test.MethodDumpSpec where +module Network.Ethereum.Test.MethodDumpSpec where import Network.Ethereum.Contract.TH import Test.Hspec - spec :: Spec spec = describe "methodDump" $ it "can dump an ABI" $ do - let theApiDump = [abiFrom|examples/token/ERC20.json|] + let theApiDump = [abiFrom|tests/contracts/ERC20.json|] in theApiDump `shouldNotBe` "" diff --git a/unit/Network/Ethereum/Contract/Test/THSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs similarity index 87% rename from unit/Network/Ethereum/Contract/Test/THSpec.hs rename to packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs index 91967e18..62c7c86d 100644 --- a/unit/Network/Ethereum/Contract/Test/THSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs @@ -4,14 +4,14 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -module Network.Ethereum.Contract.Test.THSpec where +module Network.Ethereum.Test.THSpec where import Network.Ethereum.Contract.TH import Test.Hspec -- 0x Exchange Contract that includes Tuples taken from: -- https://raw.githubusercontent.com/0xProject/0x-monorepo/%400x/website%400.0.89/packages/contract-artifacts/artifacts/Exchange.json -[abiFrom|test/contracts/Exchange.json|] +[abiFrom|tests/contracts/Exchange.json|] spec :: Spec spec = diff --git a/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs new file mode 100644 index 00000000..af7a3aa4 --- /dev/null +++ b/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs @@ -0,0 +1,26 @@ +{-# LANGUAGE OverloadedStrings #-} +module Network.Ethereum.Test.TransactionSpec where + +import Crypto.Ecdsa.Utils (importKey) +import Crypto.Ethereum.Signature (signTransaction) +import Data.ByteArray.HexString (HexString) +import Network.Ethereum.Api.Types (Call (..)) +import Network.Ethereum.Transaction (encodeTransaction) +import Test.Hspec + +spec :: Spec +spec = do + describe "Ethereum raw transactions" $ do + it "can create and sign valid raw transaction" $ do + -- using same example as in this blog post: + -- https://medium.com/@codetractio/walkthrough-of-an-ethereum-improvement-proposal-eip-6fda3966d171 + let testCall = Call Nothing + (Just "0x3535353535353535353535353535353535353535") + (Just 21000) + (Just 20000000000) + (Just 1000000000000000000) + Nothing + (Just 9) + key = "4646464646464646464646464646464646464646464646464646464646464646" :: HexString + correctSignedTx = "f86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83" + signTransaction (encodeTransaction testCall 1) (importKey key) `shouldBe` (correctSignedTx :: HexString) diff --git a/unit/Spec.hs b/packages/ethereum/tests/Spec.hs similarity index 100% rename from unit/Spec.hs rename to packages/ethereum/tests/Spec.hs diff --git a/packages/ethereum/tests/contracts/ERC20.json b/packages/ethereum/tests/contracts/ERC20.json new file mode 100644 index 00000000..4dcb87dc --- /dev/null +++ b/packages/ethereum/tests/contracts/ERC20.json @@ -0,0 +1 @@ +[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"delegate","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"}],"name":"unapprove","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_decimals","type":"uint8"},{"name":"_count","type":"uint256"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}] \ No newline at end of file diff --git a/test/contracts/Exchange.json b/packages/ethereum/tests/contracts/Exchange.json similarity index 100% rename from test/contracts/Exchange.json rename to packages/ethereum/tests/contracts/Exchange.json diff --git a/packages/hexstring/LICENSE b/packages/hexstring/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/hexstring/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/hexstring/Setup.hs b/packages/hexstring/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/hexstring/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml new file mode 100644 index 00000000..9f1f444e --- /dev/null +++ b/packages/hexstring/package.yaml @@ -0,0 +1,47 @@ +name: web3-hexstring +version: 1.0.0.0 +synopsis: Hex-string type for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- text >1.2 && <1.3 +- aeson >1.2 && <1.5 +- memory >0.14 && <0.16 +- bytestring >0.10 && <0.11 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src diff --git a/src/Data/ByteArray/HexString.hs b/packages/hexstring/src/Data/ByteArray/HexString.hs similarity index 96% rename from src/Data/ByteArray/HexString.hs rename to packages/hexstring/src/Data/ByteArray/HexString.hs index 16dbff50..21987ac6 100644 --- a/src/Data/ByteArray/HexString.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString.hs @@ -3,8 +3,8 @@ -- | -- Module : Data.ByteArray.HexString --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/packages/ipfs/LICENSE b/packages/ipfs/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/ipfs/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/ipfs/Setup.hs b/packages/ipfs/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/ipfs/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/ipfs/package.yaml b/packages/ipfs/package.yaml new file mode 100644 index 00000000..1280de20 --- /dev/null +++ b/packages/ipfs/package.yaml @@ -0,0 +1,54 @@ +name: web3-ipfs +version: 1.0.0.0 +synopsis: IPFS support for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- mtl >2.2 && <2.3 +- tar >0.4 && <0.6 +- text >1.2 && <1.3 +- aeson >1.2 && <1.5 +- servant >0.12 && <0.17 +- http-media >0.6 && <0.8.1 +- bytestring >0.10 && <0.11 +- http-types >0.11 && <0.14 +- http-client >0.5 && <0.7 +- servant-client >0.12 && <0.17 +- unordered-containers >0.1 && <0.3 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src diff --git a/src/Network/Ipfs/Api/Bitswap.hs b/packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs similarity index 94% rename from src/Network/Ipfs/Api/Bitswap.hs rename to packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs index bb58c5c4..33e00628 100644 --- a/src/Network/Ipfs/Api/Bitswap.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Bitswap --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Block.hs b/packages/ipfs/src/Network/Ipfs/Api/Block.hs similarity index 93% rename from src/Network/Ipfs/Api/Block.hs rename to packages/ipfs/src/Network/Ipfs/Api/Block.hs index 5a9a0bdc..d5cdc660 100644 --- a/src/Network/Ipfs/Api/Block.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Block.hs @@ -2,8 +2,8 @@ -- | -- Module : Network.Ipfs.Api.Block --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Bootstrap.hs b/packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs similarity index 92% rename from src/Network/Ipfs/Api/Bootstrap.hs rename to packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs index bff5f1be..97d8e9fe 100644 --- a/src/Network/Ipfs/Api/Bootstrap.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Bootstrap --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Cid.hs b/packages/ipfs/src/Network/Ipfs/Api/Cid.hs similarity index 94% rename from src/Network/Ipfs/Api/Cid.hs rename to packages/ipfs/src/Network/Ipfs/Api/Cid.hs index 9e5b0e24..d17a43bb 100644 --- a/src/Network/Ipfs/Api/Cid.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Cid.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Cid --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Config.hs b/packages/ipfs/src/Network/Ipfs/Api/Config.hs similarity index 93% rename from src/Network/Ipfs/Api/Config.hs rename to packages/ipfs/src/Network/Ipfs/Api/Config.hs index e7c3f910..72057268 100644 --- a/src/Network/Ipfs/Api/Config.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Config.hs @@ -2,8 +2,8 @@ -- | -- Module : Network.Ipfs.Api.Config --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Core.hs b/packages/ipfs/src/Network/Ipfs/Api/Core.hs similarity index 97% rename from src/Network/Ipfs/Api/Core.hs rename to packages/ipfs/src/Network/Ipfs/Api/Core.hs index fa5de126..a435a409 100644 --- a/src/Network/Ipfs/Api/Core.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Core.hs @@ -2,8 +2,8 @@ -- | -- Module : Network.Ipfs.Api.Core --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Dag.hs b/packages/ipfs/src/Network/Ipfs/Api/Dag.hs similarity index 94% rename from src/Network/Ipfs/Api/Dag.hs rename to packages/ipfs/src/Network/Ipfs/Api/Dag.hs index 954a7665..59179056 100644 --- a/src/Network/Ipfs/Api/Dag.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Dag.hs @@ -2,8 +2,8 @@ -- | -- Module : Network.Ipfs.Api.Dag --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Dht.hs b/packages/ipfs/src/Network/Ipfs/Api/Dht.hs similarity index 94% rename from src/Network/Ipfs/Api/Dht.hs rename to packages/ipfs/src/Network/Ipfs/Api/Dht.hs index f39b9ab1..177c00f8 100644 --- a/src/Network/Ipfs/Api/Dht.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Dht.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Dht --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Files.hs b/packages/ipfs/src/Network/Ipfs/Api/Files.hs similarity index 97% rename from src/Network/Ipfs/Api/Files.hs rename to packages/ipfs/src/Network/Ipfs/Api/Files.hs index 9fc7adeb..fc0bb0e2 100644 --- a/src/Network/Ipfs/Api/Files.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Files.hs @@ -2,8 +2,8 @@ -- | -- Module : Network.Ipfs.Api.Files --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Internal.hs b/packages/ipfs/src/Network/Ipfs/Api/Internal.hs similarity index 98% rename from src/Network/Ipfs/Api/Internal.hs rename to packages/ipfs/src/Network/Ipfs/Api/Internal.hs index c799da4f..90d005e1 100644 --- a/src/Network/Ipfs/Api/Internal.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Internal.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Internal --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Internal/Call.hs b/packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs similarity index 96% rename from src/Network/Ipfs/Api/Internal/Call.hs rename to packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs index 1f947845..3b28f1f7 100644 --- a/src/Network/Ipfs/Api/Internal/Call.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs @@ -7,8 +7,8 @@ -- | -- Module : Network.Ipfs.Api.Internal.Call --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Internal/Stream.hs b/packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs similarity index 94% rename from src/Network/Ipfs/Api/Internal/Stream.hs rename to packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs index 8295a565..3f015730 100644 --- a/src/Network/Ipfs/Api/Internal/Stream.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Internal.Stream --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Key.hs b/packages/ipfs/src/Network/Ipfs/Api/Key.hs similarity index 94% rename from src/Network/Ipfs/Api/Key.hs rename to packages/ipfs/src/Network/Ipfs/Api/Key.hs index 15e63b76..4098c3ac 100644 --- a/src/Network/Ipfs/Api/Key.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Key.hs @@ -7,8 +7,8 @@ -- | -- Module : Network.Ipfs.Api.Key --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Log.hs b/packages/ipfs/src/Network/Ipfs/Api/Log.hs similarity index 94% rename from src/Network/Ipfs/Api/Log.hs rename to packages/ipfs/src/Network/Ipfs/Api/Log.hs index c0a766e9..fa893f11 100644 --- a/src/Network/Ipfs/Api/Log.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Log.hs @@ -7,8 +7,8 @@ -- | -- Module : Network.Ipfs.Api.Log --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Object.hs b/packages/ipfs/src/Network/Ipfs/Api/Object.hs similarity index 97% rename from src/Network/Ipfs/Api/Object.hs rename to packages/ipfs/src/Network/Ipfs/Api/Object.hs index 8f6cddce..062cff40 100644 --- a/src/Network/Ipfs/Api/Object.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Object.hs @@ -2,8 +2,8 @@ -- | -- Module : Network.Ipfs.Api.Object --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Pin.hs b/packages/ipfs/src/Network/Ipfs/Api/Pin.hs similarity index 91% rename from src/Network/Ipfs/Api/Pin.hs rename to packages/ipfs/src/Network/Ipfs/Api/Pin.hs index 7011062b..13827c18 100644 --- a/src/Network/Ipfs/Api/Pin.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Pin.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Pin --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Pubsub.hs b/packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs similarity index 93% rename from src/Network/Ipfs/Api/Pubsub.hs rename to packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs index 18d76bda..89d9d7dd 100644 --- a/src/Network/Ipfs/Api/Pubsub.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Pubsub --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Repo.hs b/packages/ipfs/src/Network/Ipfs/Api/Repo.hs similarity index 93% rename from src/Network/Ipfs/Api/Repo.hs rename to packages/ipfs/src/Network/Ipfs/Api/Repo.hs index 4a9a0a18..f748bc33 100644 --- a/src/Network/Ipfs/Api/Repo.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Repo.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Repo --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Stats.hs b/packages/ipfs/src/Network/Ipfs/Api/Stats.hs similarity index 90% rename from src/Network/Ipfs/Api/Stats.hs rename to packages/ipfs/src/Network/Ipfs/Api/Stats.hs index 1d70f277..64764b4f 100644 --- a/src/Network/Ipfs/Api/Stats.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Stats.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Stats --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Swarm.hs b/packages/ipfs/src/Network/Ipfs/Api/Swarm.hs similarity index 95% rename from src/Network/Ipfs/Api/Swarm.hs rename to packages/ipfs/src/Network/Ipfs/Api/Swarm.hs index 8fd8a6b3..b998161b 100644 --- a/src/Network/Ipfs/Api/Swarm.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Swarm.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Ipfs.Api.Swarm --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Types.hs b/packages/ipfs/src/Network/Ipfs/Api/Types.hs similarity index 99% rename from src/Network/Ipfs/Api/Types.hs rename to packages/ipfs/src/Network/Ipfs/Api/Types.hs index d91ea44a..4f9e4433 100644 --- a/src/Network/Ipfs/Api/Types.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Types.hs @@ -6,8 +6,8 @@ -- | -- Module : Network.Ipfs.Api.Types --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Api/Types/Stream.hs b/packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs similarity index 98% rename from src/Network/Ipfs/Api/Types/Stream.hs rename to packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs index b4667389..d2913950 100644 --- a/src/Network/Ipfs/Api/Types/Stream.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs @@ -6,8 +6,8 @@ -- | -- Module : Network.Ipfs.Api.Types.Stream --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Ipfs/Client.hs b/packages/ipfs/src/Network/Ipfs/Client.hs similarity index 94% rename from src/Network/Ipfs/Client.hs rename to packages/ipfs/src/Network/Ipfs/Client.hs index cfbe8843..eab18014 100644 --- a/src/Network/Ipfs/Client.hs +++ b/packages/ipfs/src/Network/Ipfs/Client.hs @@ -2,8 +2,8 @@ -- | -- Module : Network.Ipfs.Client --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/packages/jsonrpc/LICENSE b/packages/jsonrpc/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/jsonrpc/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/jsonrpc/Setup.hs b/packages/jsonrpc/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/jsonrpc/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml new file mode 100644 index 00000000..5bcd2d9f --- /dev/null +++ b/packages/jsonrpc/package.yaml @@ -0,0 +1,52 @@ +name: web3-jsonrpc +version: 1.0.0.0 +synopsis: Tiny JSON-RPC client for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- text >1.2 && <1.3 +- aeson >1.2 && <1.5 +- random >1.0 && <1.2 +- bytestring >0.10 && <0.11 +- exceptions >0.8 && <0.11 +- websockets >0.10 && <0.13 +- http-client >0.5 && <0.7 +- http-client-tls >0.3 && <0.4 +- mtl >2.2 && <2.3 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src diff --git a/src/Network/JsonRpc/TinyClient.hs b/packages/jsonrpc/src/Network/JsonRpc/TinyClient.hs similarity index 97% rename from src/Network/JsonRpc/TinyClient.hs rename to packages/jsonrpc/src/Network/JsonRpc/TinyClient.hs index 88fe2882..d2d8f15c 100644 --- a/src/Network/JsonRpc/TinyClient.hs +++ b/packages/jsonrpc/src/Network/JsonRpc/TinyClient.hs @@ -11,8 +11,8 @@ -- | -- Module : Network.JsonRpc.TinyClient --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2018 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -67,7 +67,6 @@ import Control.Monad ((<=<)) import Control.Monad.Catch (MonadThrow (..)) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.State (MonadState, get) -import Crypto.Number.Generate (generateMax) import Data.Aeson (FromJSON (..), ToJSON (..), Value (String), eitherDecode, encode, object, withObject, (.:), (.:?), (.=)) @@ -80,6 +79,7 @@ import Network.HTTP.Client (Manager, RequestBody (RequestBodyLBS), import Network.HTTP.Client.TLS (tlsManagerSettings) import qualified Network.WebSockets as WS (Connection, receiveData, sendTextData) +import System.Random (randomRIO) -- | JSON-RPC monad constrait. type JsonRpcM m = (MonadIO m, MonadThrow m, MonadState JsonRpcClient m) @@ -184,7 +184,7 @@ call :: JsonRpcM m -> [Value] -> m ByteString call m r = do - rid <- liftIO $ generateMax maxInt + rid <- liftIO $ randomRIO (0, maxInt) connection . encode $ Request m (fromInteger rid) (toJSON r) where maxInt = toInteger (maxBound :: Int) diff --git a/packages/polkadot/LICENSE b/packages/polkadot/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/polkadot/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/polkadot/Setup.hs b/packages/polkadot/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/polkadot/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml new file mode 100644 index 00000000..e661118f --- /dev/null +++ b/packages/polkadot/package.yaml @@ -0,0 +1,48 @@ +name: web3-polkadot +version: 1.0.0.0 +synopsis: Polkadot support for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- text >1.2 && <1.3 +- aeson >1.2 && <1.5 +- microlens >0.4 && <0.5 +- web3-jsonrpc >=1.0 && <1.1 +- web3-hexstring >=1.0 && <1.1 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src diff --git a/src/Network/Polkadot/Api/Account.hs b/packages/polkadot/src/Network/Polkadot/Api/Account.hs similarity index 93% rename from src/Network/Polkadot/Api/Account.hs rename to packages/polkadot/src/Network/Polkadot/Api/Account.hs index bd073f23..8987c7f3 100644 --- a/src/Network/Polkadot/Api/Account.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Account.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Account --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Author.hs b/packages/polkadot/src/Network/Polkadot/Api/Author.hs similarity index 97% rename from src/Network/Polkadot/Api/Author.hs rename to packages/polkadot/src/Network/Polkadot/Api/Author.hs index 03bd70f5..9475b26d 100644 --- a/src/Network/Polkadot/Api/Author.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Author.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Author --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Babe.hs b/packages/polkadot/src/Network/Polkadot/Api/Babe.hs similarity index 93% rename from src/Network/Polkadot/Api/Babe.hs rename to packages/polkadot/src/Network/Polkadot/Api/Babe.hs index 1c80a102..17fed83d 100644 --- a/src/Network/Polkadot/Api/Babe.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Babe.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Babe --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Chain.hs b/packages/polkadot/src/Network/Polkadot/Api/Chain.hs similarity index 96% rename from src/Network/Polkadot/Api/Chain.hs rename to packages/polkadot/src/Network/Polkadot/Api/Chain.hs index af3ea174..3bd1169e 100644 --- a/src/Network/Polkadot/Api/Chain.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Chain.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Chain --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Childstate.hs b/packages/polkadot/src/Network/Polkadot/Api/Childstate.hs similarity index 97% rename from src/Network/Polkadot/Api/Childstate.hs rename to packages/polkadot/src/Network/Polkadot/Api/Childstate.hs index 26c57cf5..979d7288 100644 --- a/src/Network/Polkadot/Api/Childstate.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Childstate.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Childstate --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Contracts.hs b/packages/polkadot/src/Network/Polkadot/Api/Contracts.hs similarity index 97% rename from src/Network/Polkadot/Api/Contracts.hs rename to packages/polkadot/src/Network/Polkadot/Api/Contracts.hs index 21aa49de..9e0f1438 100644 --- a/src/Network/Polkadot/Api/Contracts.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Contracts.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Contracts --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Engine.hs b/packages/polkadot/src/Network/Polkadot/Api/Engine.hs similarity index 96% rename from src/Network/Polkadot/Api/Engine.hs rename to packages/polkadot/src/Network/Polkadot/Api/Engine.hs index b9d9bee2..1cf7bfd8 100644 --- a/src/Network/Polkadot/Api/Engine.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Engine.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Engine --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Grandpa.hs b/packages/polkadot/src/Network/Polkadot/Api/Grandpa.hs similarity index 93% rename from src/Network/Polkadot/Api/Grandpa.hs rename to packages/polkadot/src/Network/Polkadot/Api/Grandpa.hs index b67e4e7c..5b1b9016 100644 --- a/src/Network/Polkadot/Api/Grandpa.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Grandpa.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Grandpa --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Offchain.hs b/packages/polkadot/src/Network/Polkadot/Api/Offchain.hs similarity index 96% rename from src/Network/Polkadot/Api/Offchain.hs rename to packages/polkadot/src/Network/Polkadot/Api/Offchain.hs index 50e2b9a5..ff058769 100644 --- a/src/Network/Polkadot/Api/Offchain.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Offchain.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Offchain --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Payment.hs b/packages/polkadot/src/Network/Polkadot/Api/Payment.hs similarity index 94% rename from src/Network/Polkadot/Api/Payment.hs rename to packages/polkadot/src/Network/Polkadot/Api/Payment.hs index 4e81615a..c90fc972 100644 --- a/src/Network/Polkadot/Api/Payment.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Payment.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Payment --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Rpc.hs b/packages/polkadot/src/Network/Polkadot/Api/Rpc.hs similarity index 92% rename from src/Network/Polkadot/Api/Rpc.hs rename to packages/polkadot/src/Network/Polkadot/Api/Rpc.hs index 06e51e73..6b14248b 100644 --- a/src/Network/Polkadot/Api/Rpc.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Rpc.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.Rpc --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/State.hs b/packages/polkadot/src/Network/Polkadot/Api/State.hs similarity index 99% rename from src/Network/Polkadot/Api/State.hs rename to packages/polkadot/src/Network/Polkadot/Api/State.hs index 9863293f..33dd24b9 100644 --- a/src/Network/Polkadot/Api/State.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/State.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.State --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/System.hs b/packages/polkadot/src/Network/Polkadot/Api/System.hs similarity index 98% rename from src/Network/Polkadot/Api/System.hs rename to packages/polkadot/src/Network/Polkadot/Api/System.hs index fa03e713..41bb0ec1 100644 --- a/src/Network/Polkadot/Api/System.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/System.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Api.System --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Network/Polkadot/Api/Types.hs b/packages/polkadot/src/Network/Polkadot/Api/Types.hs similarity index 87% rename from src/Network/Polkadot/Api/Types.hs rename to packages/polkadot/src/Network/Polkadot/Api/Types.hs index 8ad69d5f..e24e368a 100644 --- a/src/Network/Polkadot/Api/Types.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Types.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Polkadot.Api.Types --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -23,12 +23,12 @@ import Data.Aeson (FromJSON (..), ToJSON (..), Value (String), defaultOptions) import Data.Aeson.TH (deriveJSON) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) import Data.Text (Text) import Data.Word (Word32, Word64, Word8) import GHC.Generics (Generic) - -import Data.ByteArray.HexString (HexString) -import Data.String.Extra (toLowerFirst) +import Lens.Micro (over, _head) -- | The role the node is running as. data NodeRole = Full @@ -70,7 +70,7 @@ data Health = Health deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 6 }) ''Health) + { fieldLabelModifier = over _head toLower . drop 6 }) ''Health) -- | Network Peer information. data PeerInfo = PeerInfo @@ -88,7 +88,7 @@ data PeerInfo = PeerInfo deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 8 }) ''PeerInfo) + { fieldLabelModifier = over _head toLower . drop 8 }) ''PeerInfo) -- | Executes a call to a contract. data ContractCall = ContractCall @@ -101,7 +101,7 @@ data ContractCall = ContractCall deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 4 }) ''ContractCall) + { fieldLabelModifier = over _head toLower . drop 4 }) ''ContractCall) -- | A result of execution of a contract. data ContractExecResult = SuccessExec @@ -114,7 +114,7 @@ data ContractExecResult = SuccessExec deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 4 }) ''ContractExecResult) + { fieldLabelModifier = over _head toLower . drop 4 }) ''ContractExecResult) type Metadata = Value @@ -128,7 +128,7 @@ data ReadProof = ReadProof deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 9 }) ''ReadProof) + { fieldLabelModifier = over _head toLower . drop 9 }) ''ReadProof) -- | Runtime version. -- This should not be thought of as classic Semver (major/minor/tiny). @@ -154,7 +154,7 @@ data RuntimeVersion = RuntimeVersion deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 7 }) ''RuntimeVersion) + { fieldLabelModifier = over _head toLower . drop 7 }) ''RuntimeVersion) -- | Type of supported offchain storages. -- @@ -171,7 +171,7 @@ data StorageChangeSet = StorageChangeSet } $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 7 }) ''StorageChangeSet) + { fieldLabelModifier = over _head toLower . drop 7 }) ''StorageChangeSet) -- | Numeric range of transaction weight. type Weight = Word64 @@ -196,7 +196,7 @@ data RuntimeDispatchInfo = RuntimeDispatchInfo deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 8 }) ''RuntimeDispatchInfo) + { fieldLabelModifier = over _head toLower . drop 8 }) ''RuntimeDispatchInfo) -- | Auxiliary data associated with an imported block result. data ImportedAux = ImportedAux @@ -216,7 +216,7 @@ data ImportedAux = ImportedAux deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 3 }) ''ImportedAux) + { fieldLabelModifier = over _head toLower . drop 3 }) ''ImportedAux) data CreatedBlock = CreatedBlock { createdBlockHash :: HexString @@ -225,7 +225,7 @@ data CreatedBlock = CreatedBlock deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 12 }) ''CreatedBlock) + { fieldLabelModifier = over _head toLower . drop 12 }) ''CreatedBlock) -- | Abstraction over a block header for a substrate chain. data Header = Header @@ -243,7 +243,7 @@ data Header = Header deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 5 }) ''Header) + { fieldLabelModifier = over _head toLower . drop 5 }) ''Header) -- | Abstraction over a substrate block. data Block = Block @@ -255,7 +255,7 @@ data Block = Block deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 5 }) ''Block) + { fieldLabelModifier = over _head toLower . drop 5 }) ''Block) -- | Abstraction over a substrate block and justification. data SignedBlock = SignedBlock @@ -267,4 +267,4 @@ data SignedBlock = SignedBlock deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = toLowerFirst . drop 6 }) ''SignedBlock) + { fieldLabelModifier = over _head toLower . drop 6 }) ''SignedBlock) diff --git a/packages/scale/LICENSE b/packages/scale/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/scale/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/scale/Setup.hs b/packages/scale/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/scale/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml new file mode 100644 index 00000000..e92d407f --- /dev/null +++ b/packages/scale/package.yaml @@ -0,0 +1,68 @@ +name: web3-scale +version: 1.0.0.0 +synopsis: SCALE codec for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- cereal >0.5 && <0.6 +- bitvec >1.0 && <2.0 +- vector >0.12 && <0.13 +- memory >0.14 && <0.16 +- generics-sop >0.3 && <0.6 +- data-default >0.7 && <0.8 +- template-haskell >2.11 && <2.16 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src + +tests: + tests: + main: Spec.hs + source-dirs: + - tests + - src + dependencies: + - bytestring >0.10 && <0.11 + - web3-hexstring >=1.0.0 && <1.1 + - hspec-expectations >=0.8.2 && <0.9 + - hspec-discover >=2.4.4 && <2.8 + - hspec-contrib >=0.4.0 && <0.6 + - hspec >=2.4.4 && <2.8 + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/src/Codec/Scale.hs b/packages/scale/src/Codec/Scale.hs similarity index 97% rename from src/Codec/Scale.hs rename to packages/scale/src/Codec/Scale.hs index de66bd1b..7e620105 100644 --- a/src/Codec/Scale.hs +++ b/packages/scale/src/Codec/Scale.hs @@ -2,7 +2,7 @@ -- | -- Module : Codec.Scale.Class --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Codec/Scale/Class.hs b/packages/scale/src/Codec/Scale/Class.hs similarity index 97% rename from src/Codec/Scale/Class.hs rename to packages/scale/src/Codec/Scale/Class.hs index 92f6a337..71e270f3 100644 --- a/src/Codec/Scale/Class.hs +++ b/packages/scale/src/Codec/Scale/Class.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Class --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Codec/Scale/Compact.hs b/packages/scale/src/Codec/Scale/Compact.hs similarity index 98% rename from src/Codec/Scale/Compact.hs rename to packages/scale/src/Codec/Scale/Compact.hs index 8e5f01e1..9afd7661 100644 --- a/src/Codec/Scale/Compact.hs +++ b/packages/scale/src/Codec/Scale/Compact.hs @@ -1,6 +1,6 @@ -- | -- Module : Codec.Scale.Compact --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Codec/Scale/Core.hs b/packages/scale/src/Codec/Scale/Core.hs similarity index 99% rename from src/Codec/Scale/Core.hs rename to packages/scale/src/Codec/Scale/Core.hs index 17352464..0acc3aa7 100644 --- a/src/Codec/Scale/Core.hs +++ b/packages/scale/src/Codec/Scale/Core.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Core --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Codec/Scale/Generic.hs b/packages/scale/src/Codec/Scale/Generic.hs similarity index 98% rename from src/Codec/Scale/Generic.hs rename to packages/scale/src/Codec/Scale/Generic.hs index 3371a140..a50b084d 100644 --- a/src/Codec/Scale/Generic.hs +++ b/packages/scale/src/Codec/Scale/Generic.hs @@ -8,7 +8,7 @@ -- | -- Module : Codec.Scale.Generic --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Codec/Scale/SingletonEnum.hs b/packages/scale/src/Codec/Scale/SingletonEnum.hs similarity index 95% rename from src/Codec/Scale/SingletonEnum.hs rename to packages/scale/src/Codec/Scale/SingletonEnum.hs index 7b334aa7..df1601d8 100644 --- a/src/Codec/Scale/SingletonEnum.hs +++ b/packages/scale/src/Codec/Scale/SingletonEnum.hs @@ -1,6 +1,6 @@ -- | -- Module : Codec.Scale.SingletonEnum --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Codec/Scale/Skip.hs b/packages/scale/src/Codec/Scale/Skip.hs similarity index 94% rename from src/Codec/Scale/Skip.hs rename to packages/scale/src/Codec/Scale/Skip.hs index aedac49b..ebda53e7 100644 --- a/src/Codec/Scale/Skip.hs +++ b/packages/scale/src/Codec/Scale/Skip.hs @@ -1,6 +1,6 @@ -- | -- Module : Codec.Scale.Skip --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/src/Codec/Scale/TH.hs b/packages/scale/src/Codec/Scale/TH.hs similarity index 95% rename from src/Codec/Scale/TH.hs rename to packages/scale/src/Codec/Scale/TH.hs index 4159e2cc..84d5f6c6 100644 --- a/src/Codec/Scale/TH.hs +++ b/packages/scale/src/Codec/Scale/TH.hs @@ -2,7 +2,7 @@ -- | -- Module : Codec.Scale.TH --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/unit/Codec/Scale/Test/CoreSpec.hs b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs similarity index 99% rename from unit/Codec/Scale/Test/CoreSpec.hs rename to packages/scale/tests/Codec/Scale/Test/CoreSpec.hs index 538ff20a..2a5fe8d1 100644 --- a/unit/Codec/Scale/Test/CoreSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs @@ -5,8 +5,8 @@ -- | -- Module : Codec.Scale.Test.CoreSpec --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/unit/Codec/Scale/Test/SingleFieldStructSpec.hs b/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs similarity index 97% rename from unit/Codec/Scale/Test/SingleFieldStructSpec.hs rename to packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs index a7acdf63..546ff7e1 100644 --- a/unit/Codec/Scale/Test/SingleFieldStructSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs @@ -4,8 +4,8 @@ -- | -- Module : Codec.Scale.Test.SingleFieldStructSpec --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/unit/Codec/Scale/Test/SkipSpec.hs b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs similarity index 98% rename from unit/Codec/Scale/Test/SkipSpec.hs rename to packages/scale/tests/Codec/Scale/Test/SkipSpec.hs index d68cca86..d3ad29ad 100644 --- a/unit/Codec/Scale/Test/SkipSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Test.SkipSpec --- Copyright : Alexander Krupenkin 2016 +-- Copyright : Aleksandr Krupenkin 2016-2020 -- License : BSD3 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/tests/Spec.hs b/packages/scale/tests/Spec.hs new file mode 100644 index 00000000..a824f8c3 --- /dev/null +++ b/packages/scale/tests/Spec.hs @@ -0,0 +1 @@ +{-# OPTIONS_GHC -F -pgmF hspec-discover #-} diff --git a/packages/solidity/LICENSE b/packages/solidity/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/solidity/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/solidity/Setup.hs b/packages/solidity/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/solidity/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml new file mode 100644 index 00000000..6f581220 --- /dev/null +++ b/packages/solidity/package.yaml @@ -0,0 +1,74 @@ +name: web3-solidity +version: 1.0.0.0 +synopsis: Solidity language for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- text >1.2 && <1.3 +- aeson >1.2 && <1.5 +- cereal >0.5 && <0.6 +- memory >0.14 && <0.16 +- tagged >0.8 && <0.9 +- parsec >3.1 && <3.2 +- basement >0.0 && <0.1 +- OneTuple >0.2 && <0.3 +- microlens >0.4 && <0.5 +- bytestring >0.10 && <0.11 +- generics-sop >0.3 && <0.6 +- data-default >0.7 && <0.8 +- template-haskell >2.11 && <2.16 +- web3-crypto >=1.0 && <1.1 +- web3-hexstring >=1.0 && <1.1 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src + +tests: + tests: + main: Spec.hs + source-dirs: + - tests + - src + dependencies: + - hspec-expectations >=0.8.2 && <0.9 + - hspec-discover >=2.4.4 && <2.8 + - hspec-contrib >=0.4.0 && <0.6 + - hspec >=2.4.4 && <2.8 + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/src/Data/Solidity/Abi.hs b/packages/solidity/src/Data/Solidity/Abi.hs similarity index 96% rename from src/Data/Solidity/Abi.hs rename to packages/solidity/src/Data/Solidity/Abi.hs index 134f80fc..6865e864 100644 --- a/src/Data/Solidity/Abi.hs +++ b/packages/solidity/src/Data/Solidity/Abi.hs @@ -4,8 +4,8 @@ -- | -- Module : Data.Solidity.Abi --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Abi/Codec.hs b/packages/solidity/src/Data/Solidity/Abi/Codec.hs similarity index 95% rename from src/Data/Solidity/Abi/Codec.hs rename to packages/solidity/src/Data/Solidity/Abi/Codec.hs index 1db81a56..0fd6d3bf 100644 --- a/src/Data/Solidity/Abi/Codec.hs +++ b/packages/solidity/src/Data/Solidity/Abi/Codec.hs @@ -2,8 +2,8 @@ -- | -- Module : Data.Solidity.Abi.Codec --- Copyright : Alexander Krupenkin 2017-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Abi/Generic.hs b/packages/solidity/src/Data/Solidity/Abi/Generic.hs similarity index 98% rename from src/Data/Solidity/Abi/Generic.hs rename to packages/solidity/src/Data/Solidity/Abi/Generic.hs index 822c627b..27c2fbc7 100644 --- a/src/Data/Solidity/Abi/Generic.hs +++ b/packages/solidity/src/Data/Solidity/Abi/Generic.hs @@ -9,8 +9,8 @@ -- | -- Module : Data.Solidity.Abi.Generic --- Copyright : Alexander Krupenkin 2017-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Event.hs b/packages/solidity/src/Data/Solidity/Event.hs similarity index 88% rename from src/Data/Solidity/Event.hs rename to packages/solidity/src/Data/Solidity/Event.hs index d658fa8a..09f5e249 100644 --- a/src/Data/Solidity/Event.hs +++ b/packages/solidity/src/Data/Solidity/Event.hs @@ -10,8 +10,8 @@ -- | -- Module : Data.Solidity.Event --- Copyright : Alexander Krupenkin 2017-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -37,7 +37,6 @@ import Generics.SOP (Generic, I (..), NP (..), import Data.Solidity.Abi (AbiGet) import Data.Solidity.Abi.Codec (decode) import Data.Solidity.Event.Internal -import Network.Ethereum.Api.Types (Change (..)) -- | Indexed event args come back in as a list of encoded values. 'ArrayParser' -- | is used to decode these values so that they can be used to reconstruct the @@ -81,17 +80,20 @@ parseChange :: ( Generic i , Rep i ~ irep , ArrayParser irep , AbiGet ni + , ByteArrayAccess ba ) - => Change + => [ba] + -- ^ event change topics + -> ba + -- ^ event change data -> Bool -- ^ is anonymous event -> Either String (Event i ni) -parseChange change anonymous = - Event <$> genericArrayParser topics <*> decode data_ +parseChange topics data_ anonymous = + Event <$> genericArrayParser topics' <*> decode data_ where - topics | anonymous = changeTopics change - | otherwise = tail (changeTopics change) - data_ = changeData change + topics' | anonymous = topics + | otherwise = tail topics class IndexedEvent i ni e | e -> i ni where isAnonymous :: Proxy e -> Bool @@ -122,7 +124,7 @@ instance ( Generic i in to . fromHList $ hle class DecodeEvent i ni e | e -> i ni where - decodeEvent :: Change -> Either String e + decodeEvent :: ByteArrayAccess ba => [ba] -> ba -> Either String e instance ( IndexedEvent i ni e , Generic i @@ -135,7 +137,7 @@ instance ( IndexedEvent i ni e , CombineChange i ni e , ArrayParser (SOP I '[hli]) ) => DecodeEvent i ni e where - decodeEvent change = do + decodeEvent topics data_ = do let anonymous = isAnonymous (Proxy :: Proxy e) - (Event i ni :: Event i ni) <- parseChange change anonymous + (Event i ni :: Event i ni) <- parseChange topics data_ anonymous return $ combineChange i ni diff --git a/src/Data/Solidity/Event/Internal.hs b/packages/solidity/src/Data/Solidity/Event/Internal.hs similarity index 98% rename from src/Data/Solidity/Event/Internal.hs rename to packages/solidity/src/Data/Solidity/Event/Internal.hs index 355f037e..7267036f 100644 --- a/src/Data/Solidity/Event/Internal.hs +++ b/packages/solidity/src/Data/Solidity/Event/Internal.hs @@ -12,8 +12,8 @@ -- | -- Module : Data.Solidity.Event.Internal --- Copyright : Alexander Krupenkin 2017-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Prim.hs b/packages/solidity/src/Data/Solidity/Prim.hs similarity index 90% rename from src/Data/Solidity/Prim.hs rename to packages/solidity/src/Data/Solidity/Prim.hs index 38764b5b..0be0fba6 100644 --- a/src/Data/Solidity/Prim.hs +++ b/packages/solidity/src/Data/Solidity/Prim.hs @@ -1,7 +1,7 @@ -- | -- Module : Data.Solidity.Prim --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Prim/Address.hs b/packages/solidity/src/Data/Solidity/Prim/Address.hs similarity index 96% rename from src/Data/Solidity/Prim/Address.hs rename to packages/solidity/src/Data/Solidity/Prim/Address.hs index 0304ca0b..eb4ed288 100644 --- a/src/Data/Solidity/Prim/Address.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Address.hs @@ -4,8 +4,8 @@ -- | -- Module : Data.Solidity.Prim.Address --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -32,7 +32,7 @@ module Data.Solidity.Prim.Address ) where import Control.Monad ((<=<)) -import Crypto.PubKey.ECC.ECDSA (PublicKey) +import Crypto.Ethereum (PublicKey) import Data.Aeson (FromJSON (..), ToJSON (..)) import Data.Bits ((.&.)) import Data.Bool (bool) diff --git a/src/Data/Solidity/Prim/Bool.hs b/packages/solidity/src/Data/Solidity/Prim/Bool.hs similarity index 88% rename from src/Data/Solidity/Prim/Bool.hs rename to packages/solidity/src/Data/Solidity/Prim/Bool.hs index 5266f57f..f5f576af 100644 --- a/src/Data/Solidity/Prim/Bool.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Bool.hs @@ -1,7 +1,7 @@ -- | -- Module : Data.Solidity.Prim.Bool --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Prim/Bytes.hs b/packages/solidity/src/Data/Solidity/Prim/Bytes.hs similarity index 98% rename from src/Data/Solidity/Prim/Bytes.hs rename to packages/solidity/src/Data/Solidity/Prim/Bytes.hs index 046ab94f..9bd3689b 100644 --- a/src/Data/Solidity/Prim/Bytes.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Bytes.hs @@ -8,8 +8,8 @@ -- | -- Module : Data.Solidity.Prim.Bytes --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Prim/Int.hs b/packages/solidity/src/Data/Solidity/Prim/Int.hs similarity index 98% rename from src/Data/Solidity/Prim/Int.hs rename to packages/solidity/src/Data/Solidity/Prim/Int.hs index 4034a732..26956fb1 100644 --- a/src/Data/Solidity/Prim/Int.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Int.hs @@ -8,8 +8,8 @@ -- | -- Module : Data.Solidity.Prim.Int --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Prim/List.hs b/packages/solidity/src/Data/Solidity/Prim/List.hs similarity index 95% rename from src/Data/Solidity/Prim/List.hs rename to packages/solidity/src/Data/Solidity/Prim/List.hs index 327620ef..1712595b 100644 --- a/src/Data/Solidity/Prim/List.hs +++ b/packages/solidity/src/Data/Solidity/Prim/List.hs @@ -4,8 +4,8 @@ -- | -- Module : Data.Solidity.Prim.List --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Prim/String.hs b/packages/solidity/src/Data/Solidity/Prim/String.hs similarity index 90% rename from src/Data/Solidity/Prim/String.hs rename to packages/solidity/src/Data/Solidity/Prim/String.hs index 8a3e2be3..f641684d 100644 --- a/src/Data/Solidity/Prim/String.hs +++ b/packages/solidity/src/Data/Solidity/Prim/String.hs @@ -1,7 +1,7 @@ -- | -- Module : Data.Solidity.Prim.String --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Prim/Tagged.hs b/packages/solidity/src/Data/Solidity/Prim/Tagged.hs similarity index 91% rename from src/Data/Solidity/Prim/Tagged.hs rename to packages/solidity/src/Data/Solidity/Prim/Tagged.hs index ae2ba7ba..2a1659dc 100644 --- a/src/Data/Solidity/Prim/Tagged.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tagged.hs @@ -3,8 +3,8 @@ -- | -- Module : Data.Solidity.Prim.Tagged --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Prim/Tuple.hs b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs similarity index 93% rename from src/Data/Solidity/Prim/Tuple.hs rename to packages/solidity/src/Data/Solidity/Prim/Tuple.hs index 704d8fc5..5ecc0986 100644 --- a/src/Data/Solidity/Prim/Tuple.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs @@ -5,8 +5,8 @@ -- | -- Module : Data.Solidity.Prim.Tuple --- Copyright : Alexander Krupenkin 2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Data/Solidity/Prim/Tuple/TH.hs b/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs similarity index 94% rename from src/Data/Solidity/Prim/Tuple/TH.hs rename to packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs index 2a701e3b..ba744d9a 100644 --- a/src/Data/Solidity/Prim/Tuple/TH.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs @@ -2,8 +2,8 @@ -- | -- Module : Data.Solidity.Prim.Tuple.TH --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Language/Solidity/Abi.hs b/packages/solidity/src/Language/Solidity/Abi.hs similarity index 82% rename from src/Language/Solidity/Abi.hs rename to packages/solidity/src/Language/Solidity/Abi.hs index 92a3a7c8..a85744c0 100644 --- a/src/Language/Solidity/Abi.hs +++ b/packages/solidity/src/Language/Solidity/Abi.hs @@ -3,8 +3,8 @@ -- | -- Module : Data.Solidity.Abi.Json --- Copyright : Alexander Krupenkin 2016-2018 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -32,21 +32,24 @@ module Language.Solidity.Abi , parseSolidityEventArgType ) where -import Control.Monad (void) -import Crypto.Hash (Digest, Keccak_256, hash) -import Data.Aeson (FromJSON (parseJSON), Options (constructorTagModifier, fieldLabelModifier, sumEncoding), - SumEncoding (TaggedObject), - ToJSON (toJSON), defaultOptions) -import Data.Aeson.TH (deriveJSON) -import Data.Text (Text) -import qualified Data.Text as T (dropEnd, pack, take, unlines, unpack) -import Data.Text.Encoding (encodeUtf8) -import Text.Parsec (ParseError, char, choice, digit, eof, - lookAhead, many1, manyTill, optionMaybe, - parse, string, try, (<|>)) -import Text.Parsec.Text (Parser) - -import Data.String.Extra (toLowerFirst) +import Control.Monad (void) +import Crypto.Ethereum.Utils (keccak256) +import Data.Aeson (FromJSON (parseJSON), Options (constructorTagModifier, fieldLabelModifier, sumEncoding), + SumEncoding (TaggedObject), + ToJSON (toJSON), defaultOptions) +import Data.Aeson.TH (deriveJSON) +import qualified Data.ByteArray as A (take) +import Data.ByteArray.HexString (toText) +import Data.Char (toLower) +import Data.Text (Text) +import qualified Data.Text as T (dropEnd, unlines, unpack) +import Data.Text.Encoding (encodeUtf8) +import Lens.Micro (over, _head) +import Text.Parsec (ParseError, char, choice, digit, eof, + lookAhead, many1, manyTill, + optionMaybe, parse, string, try, + (<|>)) +import Text.Parsec.Text (Parser) -- | Method argument data FunctionArg = FunctionArg @@ -60,7 +63,7 @@ data FunctionArg = FunctionArg deriving (Show, Eq, Ord) $(deriveJSON - (defaultOptions {fieldLabelModifier = toLowerFirst . drop 6}) + (defaultOptions {fieldLabelModifier = over _head toLower . drop 6}) ''FunctionArg) -- | Event argument @@ -75,7 +78,7 @@ data EventArg = EventArg deriving (Show, Eq, Ord) $(deriveJSON - (defaultOptions {fieldLabelModifier = toLowerFirst . drop 6}) + (defaultOptions {fieldLabelModifier = over _head toLower . drop 6}) ''EventArg) -- | Elementrary contract interface item @@ -133,8 +136,8 @@ instance Ord Declaration where $(deriveJSON (defaultOptions { sumEncoding = TaggedObject "type" "contents" - , constructorTagModifier = toLowerFirst . drop 1 - , fieldLabelModifier = toLowerFirst . drop 3 }) + , constructorTagModifier = over _head toLower . drop 1 + , fieldLabelModifier = over _head toLower . drop 3 }) ''Declaration) -- | Contract Abi is a list of method / event declarations @@ -199,22 +202,15 @@ signature (DEvent name inputs _) = name <> "(" <> args inputs <> ")" args :: [EventArg] -> Text args = T.dropEnd 1 . foldMap (<> ",") . fmap eveArgType --- | Localy compute Keccak-256 hash of given text -sha3 :: Text -> Text -{-# INLINE sha3 #-} -sha3 x = T.pack (show digest) - where digest :: Digest Keccak_256 - digest = hash (encodeUtf8 x) - -- | Generate method selector by given method 'Delcaration' methodId :: Declaration -> Text {-# INLINE methodId #-} -methodId = ("0x" <>) . T.take 8 . sha3 . signature +methodId = toText . A.take 4 . keccak256 . encodeUtf8 . signature -- | Generate event `topic0` hash by givent event 'Delcaration' eventId :: Declaration -> Text {-# INLINE eventId #-} -eventId = ("0x" <>) . sha3 . signature +eventId = toText . keccak256 . encodeUtf8 . signature -- | Solidity types and parsers data SolidityType = SolidityBool diff --git a/unit/Data/Solidity/Test/AddressSpec.hs b/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs similarity index 98% rename from unit/Data/Solidity/Test/AddressSpec.hs rename to packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs index 76107ae6..ff9c22d1 100644 --- a/unit/Data/Solidity/Test/AddressSpec.hs +++ b/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs @@ -4,7 +4,6 @@ module Data.Solidity.Test.AddressSpec where import Data.ByteString (ByteString) import Data.ByteString.Char8 (unpack) import Data.Foldable (for_) -import Data.Monoid ((<>)) import Test.Hspec import Crypto.Ecdsa.Utils (derivePubKey, importKey) diff --git a/unit/Data/Solidity/Test/EncodingSpec.hs b/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs similarity index 100% rename from unit/Data/Solidity/Test/EncodingSpec.hs rename to packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs diff --git a/unit/Data/Solidity/Test/IntSpec.hs b/packages/solidity/tests/Data/Solidity/Test/IntSpec.hs similarity index 100% rename from unit/Data/Solidity/Test/IntSpec.hs rename to packages/solidity/tests/Data/Solidity/Test/IntSpec.hs diff --git a/unit/Language/Solidity/Test/AbiSpec.hs b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs similarity index 100% rename from unit/Language/Solidity/Test/AbiSpec.hs rename to packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs diff --git a/unit/Language/Solidity/Test/CompilerSpec.hs b/packages/solidity/tests/Language/Solidity/Test/CompilerSpec.hs similarity index 100% rename from unit/Language/Solidity/Test/CompilerSpec.hs rename to packages/solidity/tests/Language/Solidity/Test/CompilerSpec.hs diff --git a/packages/solidity/tests/Spec.hs b/packages/solidity/tests/Spec.hs new file mode 100644 index 00000000..a824f8c3 --- /dev/null +++ b/packages/solidity/tests/Spec.hs @@ -0,0 +1 @@ +{-# OPTIONS_GHC -F -pgmF hspec-discover #-} diff --git a/packages/web3/LICENSE b/packages/web3/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/web3/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/web3/Setup.hs b/packages/web3/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/web3/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/web3/package.yaml b/packages/web3/package.yaml new file mode 100644 index 00000000..69494fe9 --- /dev/null +++ b/packages/web3/package.yaml @@ -0,0 +1,53 @@ +name: web3 +version: 1.0.0.0 +synopsis: Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- mtl >2.2 && <2.3 +- text >1.2 && <1.3 +- async >2.1 && <2.3 +- network >2.5 && <3.2 +- websockets >0.10 && <0.13 +- exceptions >0.8 && <0.11 +- http-client >0.5 && <0.7 +- data-default >0.7 && <0.8 +- transformers >0.5 && <0.6 +- web3-jsonrpc >=1.0 && <1.1 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src diff --git a/src/Network/Web3.hs b/packages/web3/src/Network/Web3.hs similarity index 83% rename from src/Network/Web3.hs rename to packages/web3/src/Network/Web3.hs index 3b38b65e..caaf2155 100644 --- a/src/Network/Web3.hs +++ b/packages/web3/src/Network/Web3.hs @@ -1,7 +1,7 @@ -- | -- Module : Network.Web3 --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental diff --git a/src/Network/Web3/Provider.hs b/packages/web3/src/Network/Web3/Provider.hs similarity index 98% rename from src/Network/Web3/Provider.hs rename to packages/web3/src/Network/Web3/Provider.hs index d4661b63..bd73de0a 100644 --- a/src/Network/Web3/Provider.hs +++ b/packages/web3/src/Network/Web3/Provider.hs @@ -7,8 +7,8 @@ -- | -- Module : Network.Web3.Provider --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 -- -- Maintainer : mail@akru.me -- Stability : experimental @@ -29,6 +29,8 @@ import Data.Default (Default (..)) import Data.Text (Text) import GHC.Generics (Generic) import Network.HTTP.Client (Manager) +import Network.JsonRpc.TinyClient (JsonRpc, JsonRpcClient (..), + defaultSettings, jsonRpcManager) import qualified Network.Socket as S import qualified Network.WebSockets as WS (Connection, defaultConnectionOptions, @@ -36,9 +38,6 @@ import qualified Network.WebSockets as WS (Connection, sendClose) import qualified Network.WebSockets.Stream as Stream -import Network.JsonRpc.TinyClient (JsonRpc, JsonRpcClient (..), - defaultSettings, jsonRpcManager) - -- | Any communication with node wrapped with 'Web3' monad newtype Web3 a = Web3 { unWeb3 :: StateT JsonRpcClient IO a } deriving (Functor, Applicative, Monad, MonadIO, MonadThrow, MonadState JsonRpcClient) diff --git a/src/Data/String/Extra.hs b/src/Data/String/Extra.hs deleted file mode 100644 index 646d262b..00000000 --- a/src/Data/String/Extra.hs +++ /dev/null @@ -1,25 +0,0 @@ --- | --- Module : Data.String.Extra --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : portable --- --- Extra string manipulation functions. --- - -module Data.String.Extra where - -import Data.Char (toLower, toUpper) - --- | Lower first char of string -toLowerFirst :: String -> String -toLowerFirst [] = [] -toLowerFirst (x : xs) = toLower x : xs - --- | Upper first char of string -toUpperFirst :: String -> String -toUpperFirst [] = [] -toUpperFirst (x : xs) = toUpper x : xs diff --git a/stack.yaml b/stack.yaml index 95fa2b9d..d4f050df 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,9 +1,20 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-15.13 +resolver: lts-16.18 # User packages to be built. packages: -- '.' +- 'packages/web3' +- 'packages/ipfs' +- 'packages/scale' +- 'packages/crypto' +- 'packages/jsonrpc' +- 'packages/solidity' +- 'packages/ethereum' +- 'packages/polkadot' +- 'packages/hexstring' +- 'examples/erc20' +- 'examples/scale' +- 'examples/polkadot' # Extra package dependencies extra-deps: diff --git a/test/Network/Ethereum/Test/ComplexStorageSpec.hs b/test/Network/Ethereum/Test/ComplexStorageSpec.hs deleted file mode 100644 index aca2de87..00000000 --- a/test/Network/Ethereum/Test/ComplexStorageSpec.hs +++ /dev/null @@ -1,151 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE OverloadedLists #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE TemplateHaskell #-} - --- | --- Module : Network.Ethereum.Test.ComplexStorageSpec --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- --- ComplexStorage is a Solidity contract which has global variables of --- several different types. The point of this test is to test the encoding --- of a complicated Solidity tuple, consisting of dynamically and statically --- sized components. --- - -module Network.Ethereum.Test.ComplexStorageSpec where - -import Control.Concurrent.Async (async, wait) -import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar) -import Control.Monad.IO.Class (liftIO) -import Data.Default (def) - -import Network.Ethereum hiding (convert) -import Network.Ethereum.Api.Types (Filter (..)) -import Network.Ethereum.Contract (new) -import Network.Ethereum.Contract.TH -import Network.Ethereum.Test.Utils - - -import Test.Hspec - -[abiFrom|test/contracts/ComplexStorage.json|] - -deploy :: IO Address -deploy = do - Just address <- web3 $ withAccount () $ withParam id $ new ComplexStorageContract - putStrLn $ "ComplexStorage: " ++ show address - return address - -spec :: Spec -spec = deploy `before` complexStorageSpec - -complexStorageSpec :: SpecWith Address -complexStorageSpec = do - describe "can interact with a ComplexStorage contract" $ do - -- todo: these should ideally be arbitrary! - let sUint = 1 - sInt = -1 - sBool = True - sInt224 = 221 - sBools = [True, False] - sInts = [1, 1, -3] - sString = "hello" - sBytes16 = "\x12\x34\x56\x78\x12\x34\x56\x78\x12\x34\x56\x78\x12\x34\x56\x78" - sByte2sElem = "\x12\x34" - sByte2sVec = [sByte2sElem, sByte2sElem, sByte2sElem, sByte2sElem] - sByte2s = [sByte2sVec, sByte2sVec] - - it "can set the values of a ComplexStorage and validate them with an event" $ \storage -> do - let fltr = (def :: Filter ValsSet) { filterAddress = Just [storage] } - -- kick off listening for the ValsSet event - vals <- newEmptyMVar - fiber <- async . web3 $ - event fltr $ \vs -> do - liftIO $ putMVar vals vs - pure TerminateEvent - -- kick off tx - _ <- contract storage $ setValues - sUint - sInt - sBool - sInt224 - sBools - sInts - sString - sBytes16 - sByte2s - -- wait for its ValsSet event - wait fiber - (ValsSet vsA vsB vsC vsD vsE vsF vsG vsH vsI) <- takeMVar vals - vsA `shouldBe` sUint - vsB `shouldBe` sInt - vsC `shouldBe` sBool - vsD `shouldBe` sInt224 - vsE `shouldBe` sBools - vsF `shouldBe` sInts - vsG `shouldBe` sString - vsH `shouldBe` sBytes16 - vsI `shouldBe` sByte2s - - it "can verify that it set the values correctly" $ \storage -> do - -- Write a values - _ <- contract storage $ setValues - sUint - sInt - sBool - sInt224 - sBools - sInts - sString - sBytes16 - sByte2s - -- Read a couple of values - (uintVal', intVal', boolVal', int224Val', boolsVal, intsVal, stringVal', bytes16Val', bytes2s) - <- contract storage $ (,,,,,,,,) - <$> uintVal - <*> intVal - <*> boolVal - <*> int224Val - <*> boolVectorVal 0 - <*> intListVal 0 - <*> stringVal - <*> bytes16Val - <*> bytes2VectorListVal 0 0 - - uintVal' `shouldBe` sUint - intVal' `shouldBe` sInt - boolVal' `shouldBe` sBool - int224Val' `shouldBe` sInt224 - boolsVal `shouldBe` True - intsVal `shouldBe` head sInts - stringVal' `shouldBe` sString - bytes16Val' `shouldBe` sBytes16 - bytes2s `shouldBe` sByte2sElem - - it "can decode a complicated value correctly" $ \storage -> do - -- Write a values - _ <- contract storage $ setValues - sUint - sInt - sBool - sInt224 - sBools - sInts - sString - sBytes16 - sByte2s - -- Read a all values - allVals <- contract storage getVals - allVals `shouldBe` (sUint, sInt, sBool, sInt224, sBools, sInts, sString, sBytes16, sByte2s) diff --git a/test/Network/Ethereum/Test/ERC20Spec.hs b/test/Network/Ethereum/Test/ERC20Spec.hs deleted file mode 100644 index 30b42953..00000000 --- a/test/Network/Ethereum/Test/ERC20Spec.hs +++ /dev/null @@ -1,36 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} - --- | --- Module : Network.Ethereum.Test.ERC20Spec --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- --- - -module Network.Ethereum.Test.ERC20Spec where - -import Test.Hspec - -import Network.Ethereum (Account, UIntN) -import Network.Ethereum.Contract.TH (abiFrom) -import Network.JsonRpc.TinyClient (JsonRpc) - -[abiFrom|examples/token/ERC20.json|] - --- this spec is just to test compilation -spec :: Spec -spec = return () - -getBalance :: (JsonRpc m, Account p t, Functor (t m)) - => t m (UIntN 256) -getBalance = balanceOf "0x1234567890123456789011234567890234567890" diff --git a/test/Network/Ethereum/Test/LinearizationSpec.hs b/test/Network/Ethereum/Test/LinearizationSpec.hs deleted file mode 100644 index e4e61498..00000000 --- a/test/Network/Ethereum/Test/LinearizationSpec.hs +++ /dev/null @@ -1,193 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE KindSignatures #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TemplateHaskell #-} -{-# LANGUAGE TypeApplications #-} - --- Module : Network.Ethereum.Test.LinearizationSpec --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- - -module Network.Ethereum.Test.LinearizationSpec where - -import Control.Concurrent (forkIO) -import Control.Concurrent.Async (forConcurrently_) -import Control.Concurrent.MVar -import Control.Concurrent.STM (atomically) -import Control.Concurrent.STM.TQueue (TQueue, flushTQueue, - newTQueueIO, writeTQueue) -import Control.Monad (void) -import Control.Monad.IO.Class (MonadIO (..)) -import Control.Monad.Trans.Reader (ReaderT, ask) -import Data.Default -import Data.Either -import Data.List (sort) -import Data.Maybe (fromJust) -import System.Random (randomRIO) -import Test.Hspec - -import Network.Ethereum -import qualified Network.Ethereum.Api.Eth as Eth -import Network.Ethereum.Api.Types (Change (..), Filter (..), - TxReceipt, unQuantity) -import Network.Ethereum.Contract (new) -import Network.Ethereum.Contract.Event -import Network.Ethereum.Contract.TH (abiFrom) -import Network.Ethereum.Test.Utils -import Network.Web3 - -[abiFrom|test/contracts/Linearization.json|] - -deploy :: IO Address -deploy = do - Just address <- web3 $ withAccount () $ withParam id $ new LinearizationContract - putStrLn $ "Linearization: " ++ show address - return address - -spec :: Spec -spec = do - deploy `before` linearizationSpec - deploy `before` floodSpec - -floodCount :: Int -floodCount = 200 - -linearizationSpec :: SpecWith Address -linearizationSpec = - describe "can bundle and linearize events" $ do - it "can call e12" $ \linearization -> do - var <- monitorE1OrE2 linearization - _ <- contract linearization e12 - res <- takeMVar var - res `shouldSatisfy` isLeft - - it "can call e21" $ \linearization -> do - -- wait on the next block - web3 Eth.blockNumber >>= \bn -> awaitBlock (bn + 1) - var <- monitorE1OrE2 linearization - _ <- contract linearization e21 - res <- takeMVar var - res `shouldSatisfy` isRight - -singleFlood :: forall m. (MonadIO m) => Address -> m TxReceipt -singleFlood linearization = liftIO $ do - rando :: Int <- randomRIO (1, 4) - contract linearization $ - case rando of - 1 -> e1 - 2 -> e2 - 3 -> e3 - 4 -> e4 - _ -> error "got a number outside of (1,4) after randomR (1,4)" - -floodSpec :: SpecWith Address -floodSpec = describe "can correctly demonstrate the difference between `multiEvent` and multiple `event`s" $ do - it "properly linearizes with `multiEvent` when flooded and doesn't with multiple `event`s" $ \linearization -> do - multiQ <- monitorAllFourMulti linearization - parQ <- monitorAllFourPar linearization - -- to let the filter settle so we dont block indefinitely on missing events? - sleepBlocks 10 - - -- flood em and wait for all to finish - liftIO . forConcurrently_ [1..floodCount] . const $ singleFlood linearization - - -- to let the event listeners catch up - sleepBlocks 10 - - -- wait for all multiEvents to be received and flush em out - multiReceivedEvents <- liftIO . atomically $ flushTQueue multiQ - parReceivedEvents <- liftIO . atomically $ flushTQueue parQ - - -- did we get at least 1/4 of the events? (this is a gotcha when flooding, sometimes nonces get repeated) - length multiReceivedEvents `shouldSatisfy` (>= (floodCount `div` 4)) - length parReceivedEvents `shouldSatisfy` (>= (floodCount `div` 4)) - - -- did both listeners see the same amount of events? - length multiReceivedEvents `shouldBe` length parReceivedEvents - - -- the events pushed into the multi TQueue should already be sorted if they happened in the right order - sort multiReceivedEvents `shouldBe` multiReceivedEvents - -- the events pushed into the TQueue should not be sorted if they didnt come in in the right order - sort parReceivedEvents `shouldNotBe` parReceivedEvents - -monitorE1OrE2 :: Address -> IO (MVar (Either E1 E2)) -monitorE1OrE2 addr = do - var <- newEmptyMVar - let fltr1 = (def :: Filter E1) { filterAddress = Just [addr] } - fltr2 = (def :: Filter E2) { filterAddress = Just [addr] } - filters = fltr1 :? fltr2 :? NilFilters - handler1 ev1 = do - liftIO $ putMVar var (Left ev1) - return TerminateEvent - handler2 ev2 = do - liftIO $ putMVar var (Right ev2) - return TerminateEvent - handlers = H handler1 :& H handler2 :& RNil - _ <- web3 $ multiEvent filters handlers - return var - -data EventTag = ETE1 - | ETE2 - | ETE3 - | ETE4 - deriving (Eq, Read, Show) - -instance {-# OVERLAPPING #-} Ord (EventTag, Integer, Integer) where - (_, b1, t1) `compare` (_, b2, t2) = - let bCmp = b1 `compare` b2 - in if bCmp == EQ then t1 `compare` t2 - else bCmp - -monitorAllFourMulti :: Address - -> IO (TQueue (EventTag, Integer, Integer)) -monitorAllFourMulti addr = do - q <- newTQueueIO - let f :: forall a. Default (Filter a) => Filter a - f = defFilter addr - h = enqueueingHandler q - filters = f @E1 :? f @E2 :? f @E3 :? f @E4 :? NilFilters - handlers = h ETE1 :& h ETE2 :& h ETE3 :& h ETE4 :& RNil - void . web3 $ multiEvent filters handlers - return q - -monitorAllFourPar :: Address - -> IO (TQueue (EventTag, Integer, Integer)) -monitorAllFourPar addr = do - q <- newTQueueIO - let f :: forall a. Default (Filter a) => Filter a - f = defFilter addr - h = enqueueingHandler q - unH (H h) = h - - void . forkIO . web3 $ event (f @E1) (unH $ h ETE1) - void . forkIO . web3 $ event (f @E2) (unH $ h ETE2) - void . forkIO . web3 $ event (f @E3) (unH $ h ETE3) - void . forkIO . web3 $ event (f @E4) (unH $ h ETE4) - return q - -defFilter :: forall a. Default (Filter a) => Address -> Filter a -defFilter addr = (def :: Filter a) { filterAddress = Just [addr] } - -enqueueingHandler :: forall a. TQueue (EventTag, Integer, Integer) - -> EventTag - -> Handler (ReaderT Change Web3 EventAction) a -enqueueingHandler q tag = H . const $ do - Change{..} <- ask - let bn = unQuantity $ fromJust changeBlockNumber - li = unQuantity $ fromJust changeLogIndex - liftIO . atomically $ writeTQueue q (tag, bn, li) - return ContinueEvent diff --git a/test/Network/Ethereum/Test/LocalAccountSpec.hs b/test/Network/Ethereum/Test/LocalAccountSpec.hs deleted file mode 100644 index 62e3e64f..00000000 --- a/test/Network/Ethereum/Test/LocalAccountSpec.hs +++ /dev/null @@ -1,51 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - --- Module : Network.Ethereum.Test.LocalAccountSpec --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- --- Simple local account transaction test. --- - -module Network.Ethereum.Test.LocalAccountSpec where - -import Lens.Micro ((.~)) -import Lens.Micro.Mtl ((.=)) -import Test.Hspec - -import Crypto.Ecdsa.Utils (derivePubKey, importKey) -import Data.ByteArray.HexString (HexString) -import Data.Solidity.Prim.Address (fromPubKey) -import Network.Ethereum.Account (LocalKey (..), send, to, value, - withAccount, withParam) -import Network.Ethereum.Api.Eth (getBalance) -import Network.Ethereum.Api.Types (DefaultBlock (Pending)) -import Network.Ethereum.Test.Utils (web3) -import Network.Ethereum.Unit (Ether, toWei) - -spec :: Spec -spec = describe "Local account transactions" $ do - it "should send value" $ do - let key = "0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20" :: HexString - local = LocalKey (importKey key) 420123 - localAddress = fromPubKey (derivePubKey $ importKey key) - dest = "0x0000000000000000000000000000000000000042" - - -- Prepare - web3 $ withAccount () $ - withParam (to .~ localAddress) $ do - value .= (1 :: Ether) - send () - - balance <- web3 $ do - withAccount local $ - withParam (to .~ dest) $ do - value .= (0.5 :: Ether) - send () - getBalance dest Pending - - fromIntegral balance `shouldBe` toWei (0.5 :: Ether) diff --git a/test/Network/Ethereum/Test/RegistrySpec.hs b/test/Network/Ethereum/Test/RegistrySpec.hs deleted file mode 100644 index 0e9d607b..00000000 --- a/test/Network/Ethereum/Test/RegistrySpec.hs +++ /dev/null @@ -1,33 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedLists #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE TemplateHaskell #-} - -module Network.Ethereum.Test.RegistrySpec where - -import Data.Default (def) -import Test.Hspec (Spec) - -import Network.Ethereum (EventAction (TerminateEvent), - event) -import Network.Ethereum.Api.Types (Filter) -import Network.Ethereum.Contract.TH (abiFrom) -import Network.Web3 (Web3) - -[abiFrom|test/contracts/Registry.json|] - --- this spec is just to test compilation -spec :: Spec -spec = return () - -monitor :: Web3 () -monitor = do - let fltr1 = def :: Filter A - fltr2 = def :: Filter B - event fltr1 $ \_ -> pure TerminateEvent - event fltr2 $ \_ -> pure TerminateEvent - pure () diff --git a/test/Network/Ethereum/Test/SimpleStorageSpec.hs b/test/Network/Ethereum/Test/SimpleStorageSpec.hs deleted file mode 100644 index 096efb39..00000000 --- a/test/Network/Ethereum/Test/SimpleStorageSpec.hs +++ /dev/null @@ -1,202 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE KindSignatures #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TemplateHaskell #-} - --- Module : Network.Ethereum.Test.SimpleStorageSpec --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- --- SimpleStorage is a Solidity contract which stores a uint256. --- The point of this test is to test function calls to update and --- read the value, as well as an event monitor. --- - -module Network.Ethereum.Test.SimpleStorageSpec where - -import Control.Concurrent.Async (wait) -import Control.Concurrent.MVar -import Control.Monad.IO.Class (liftIO) -import Control.Monad.Trans.Class (lift) -import Control.Monad.Trans.Reader (ask) -import Data.Default (def) -import Data.List (sort) -import Data.Monoid ((<>)) -import Lens.Micro ((.~)) -import Test.Hspec - -import Network.Ethereum -import qualified Network.Ethereum.Api.Eth as Eth -import Network.Ethereum.Api.Types -import Network.Ethereum.Contract (new) -import Network.Ethereum.Contract.TH -import Network.Web3 -import Network.Web3.Provider (forkWeb3) - -import Network.Ethereum.Test.Utils - -[abiFrom|test/contracts/SimpleStorage.json|] - -unEvT_CountSet :: EvT_CountSet -> UIntN 256 -unEvT_CountSet (EvT_CountSet n) = n - -deploy :: IO Address -deploy = do - Just address <- web3 $ withAccount () $ withParam id $ new SimpleStorageContract - putStrLn $ "SimpleStorage: " ++ show address - return address - -spec :: Spec -spec = deploy `before` do - interactions - events - -interactions :: SpecWith Address -interactions = describe "can interact with a SimpleStorage contract" $ do - -- todo: this should ideally be arbitrary! - let theValue = 12345 - - it "can set the value of a SimpleStorage contract and read the value back" $ \storage -> do - _ <- contract storage $ setCount theValue - - now <- web3 Eth.blockNumber - let later = now + 3 - awaitBlock later - - v <- contract storage count - v `shouldBe` theValue - - it "can set transaction gas limit" $ \storage -> do - TxReceipt{..} <- contract storage $ withParam (gasLimit .~ 500000) $ setCount theValue - Just Transaction{..} <- web3 $ Eth.getTransactionByHash receiptTransactionHash - txGas `shouldBe` 500000 - - it "can estimate transaction gas limit" $ \storage -> do - TxReceipt{..} <- contract storage $ setCount theValue - Just Transaction{..} <- web3 $ Eth.getTransactionByHash receiptTransactionHash - txGas `shouldBe` 42822 - -events :: SpecWith Address -events = do - describe "can interact with a SimpleStorage contract across block intervals" $ do - it "can stream events starting and ending in the future, unbounded" $ \storage -> do - var <- newMVar [] - let theSets = [1, 2, 3] - putStrLn "Setting up the filter..." - fiber <- web3 $ do - let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] } - forkWeb3 $ processUntil' var fltr ((3 ==) . length) - putStrLn "Setting the values..." - setValues storage theSets - wait fiber - putStrLn "Filter caught 3 values..." - vals <- takeMVar var - sort (unEvT_CountSet <$> vals) `shouldBe` sort theSets - - it "can stream events starting and ending in the future, bounded" $ \storage -> do - var <- newMVar [] - let theSets = [13, 14, 15] - start <- web3 Eth.blockNumber - let later = BlockWithNumber (start + 3) - latest = BlockWithNumber (start + 8) - fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] - , filterFromBlock = later - , filterToBlock = latest - } - putStrLn "Setting up the filter..." - fiber <- web3 $ - forkWeb3 $ processUntil' var fltr ((3 ==) . length) - awaitBlock (start + 3) - putStrLn "Setting the values..." - setValues storage theSets - wait fiber - putStrLn "Filter caught 3 values..." - vals <- takeMVar var - sort (unEvT_CountSet <$> vals) `shouldBe` init (sort theSets) - - it "can stream events starting in the past and ending in the future" $ \storage -> do - var <- newMVar [] - blockNumberVar <- newEmptyMVar - let theSets1 = [7, 8, 9] - theSets2 = [10, 11, 12] - start <- web3 Eth.blockNumber - let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] } - fiber <- web3 $ do - forkWeb3 $ processUntil var fltr ((3 ==) . length) (liftIO . putMVar blockNumberVar . changeBlockNumber) - putStrLn "Running first transactions as past transactions..." - setValues storage theSets1 - wait fiber - putStrLn "All past transactions succeeded... " - Just end <- takeMVar blockNumberVar - awaitBlock $ end + 1 -- make past transactions definitively in past - var' <- newMVar [] - fiber' <- web3 $ do - let fltr' = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] - , filterFromBlock = BlockWithNumber start} - forkWeb3 $ processUntil' var' fltr' ((6 ==) . length) - putStrLn "Setting more values" - setValues storage theSets2 - wait fiber' - putStrLn "All new values have ben set" - vals <- takeMVar var' - sort (unEvT_CountSet <$> vals) `shouldBe` sort (theSets1 <> theSets2) - - it "can stream events starting and ending in the past, bounded" $ \storage -> do - var <- newMVar [] - let theSets = [4, 5, 6] - start <- web3 Eth.blockNumber - blockNumberVar <- newEmptyMVar - let fltr = (def :: Filter EvT_CountSet) { filterAddress = Just [storage] } - putStrLn "Setting up filter for past transactions..." - fiber <- web3 $ do - forkWeb3 $ processUntil var fltr ((3 ==) . length) (liftIO . putMVar blockNumberVar . changeBlockNumber) - putStrLn "Setting values" - setValues storage theSets - wait fiber - putStrLn "All values have been set" - Just end <- takeMVar blockNumberVar - var' <- newMVar [] - let fltr' = fltr { filterFromBlock = BlockWithNumber start - , filterToBlock = BlockWithNumber end - } - awaitBlock $ end + 1 -- make it definitively in the past - web3 $ processUntil' var' fltr' ((3 ==) . length) - vals <- takeMVar var' - sort (unEvT_CountSet <$> vals) `shouldBe` sort theSets - -processUntil :: MVar [EvT_CountSet] - -> Filter EvT_CountSet - -> ([EvT_CountSet] -> Bool) -- TODO: make it work for any event - -> (Change -> Web3 ()) - -> Web3 () -processUntil var fltr predicate action = do - event fltr $ \(ev :: EvT_CountSet) -> do - newV <- liftIO $ modifyMVar var $ \v -> return (ev:v, ev:v) - if predicate newV - then do - change <- ask - lift $ action change - return TerminateEvent - else return ContinueEvent - -processUntil' :: MVar [EvT_CountSet] - -> Filter EvT_CountSet - -> ([EvT_CountSet] -> Bool) - -> Web3 () -processUntil' var fltr predicate = processUntil var fltr predicate (const $ return ()) - -setValues :: Address -> [UIntN 256] -> IO () -setValues storage = mapM_ (contract storage . setCount) diff --git a/test/Network/Ethereum/Test/Utils.hs b/test/Network/Ethereum/Test/Utils.hs deleted file mode 100644 index 7486f69f..00000000 --- a/test/Network/Ethereum/Test/Utils.hs +++ /dev/null @@ -1,80 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE ScopedTypeVariables #-} - -module Network.Ethereum.Test.Utils where - -import Control.Concurrent (threadDelay) -import Control.Exception (SomeException, catch) -import Control.Monad.IO.Class (liftIO) -import Data.Maybe (fromMaybe) -import Data.Ratio (numerator) -import Data.Time.Clock.POSIX (getPOSIXTime) -import Lens.Micro ((.~)) -import Network.HTTP.Client (Manager, defaultManagerSettings, - managerConnCount, - managerRawConnection, - managerRetryableException, - newManager) -import System.Environment (lookupEnv) -import System.IO.Unsafe (unsafePerformIO) - -import Data.Solidity.Prim.Address (Address) -import Network.Ethereum.Account (DefaultAccount, to, withAccount, - withParam) -import Network.Ethereum.Api.Eth (accounts, blockNumber) -import Network.Ethereum.Api.Types (Quantity) -import Network.Web3.Provider (Provider (..), Web3, runWeb3With) - --- shared manager used throughout the helpers here to prevent hammering geth from ruining everything --- this also retrys on ALL exceptions, including ConnectionResetByPeer and stuff like that -sharedManager :: Manager -sharedManager = unsafePerformIO $ newManager defaultManagerSettings - { managerConnCount = 5 - , managerRetryableException = const False - , managerRawConnection = fixRawConnection retryOpenConnection - } - - where retryOpenConnection = threadDelay 500000 >> managerRawConnection defaultManagerSettings - fixRawConnection f = f `catch` (\(_ :: SomeException) -> fixRawConnection f) -{-# NOINLINE sharedManager #-} - -rpcUri :: IO String -rpcUri = liftIO (fromMaybe "http://localhost:8545" <$> lookupEnv "WEB3_PROVIDER") - -contract :: Address - -> DefaultAccount Web3 a - -> IO a -contract a = web3 . withAccount () . withParam (to .~ a) - -web3 :: Web3 a -> IO a -web3 ma = do - provider <- HttpProvider <$> rpcUri - v <- runWeb3With sharedManager provider ma - case v of - Left e -> print e >> threadDelay 1000000 >> web3 ma - Right v' -> return v' - -withAccounts :: ([Address] -> IO a) -> IO a -withAccounts f = web3 accounts >>= f - -withPrimaryEthereumAccount :: IO Address -withPrimaryEthereumAccount = withAccounts (pure . head) - -sleepSeconds :: Int -> IO () -sleepSeconds = threadDelay . (* 1000000) - -microtime :: IO Integer -microtime = numerator . toRational . (* 1000000) <$> getPOSIXTime - -awaitBlock :: Quantity -> IO () -awaitBlock bn = do - bn' <- web3 blockNumber - -- putStrLn $ "awaiting block " ++ show bn ++ ", currently " ++ show bn' - if bn' >= bn - then return () - else threadDelay 1000000 >> awaitBlock bn - -sleepBlocks :: Int -> IO () -sleepBlocks n = do - now <- web3 blockNumber - awaitBlock $ now + fromIntegral n diff --git a/test/Network/Ipfs/Api/Test/Key.hs b/test/Network/Ipfs/Api/Test/Key.hs deleted file mode 100644 index fa360145..00000000 --- a/test/Network/Ipfs/Api/Test/Key.hs +++ /dev/null @@ -1,47 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Network.Ipfs.Api.Test.Key --- Copyright : Alexander Krupenkin 2016 --- License : BSD3 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Key IPFS API testing module. --- - -module Network.Ipfs.Api.Test.Key where - -import Control.Exception () -import Control.Monad.Trans -import Test.Hspec - -import qualified Network.Ipfs.Api.Key as Key -import Network.Ipfs.Api.Types (KeyDetailsObj (..), KeyObj (..)) -import Network.Ipfs.Client (runIpfs) - -main :: IO () -main = hspec $ do - describe "keyGen" $ do - it "should return the given key name in its response" $ runIpfs $ do - res <- Key.gen "TestA" "rsa" - liftIO $ keyName res `shouldBe` "TestA" - - it "KeyDetailsObj returned by KeyGen should be present in the KeyObj's list returned returned by KeyList" $ - runIpfs $ do - resGen <- Key.gen "TestB" "rsa" - resList <- Key.list - liftIO $ keys resList `shouldContain` [resGen] - - describe "keyRm" $ do - it "should return the given key name in its response" $ runIpfs $ do - res <- Key.rm "TestA" - liftIO $ (keyName $ Prelude.head $ keys res) `shouldBe` "TestA" - - it "KeyDetailsObj returned by KeyRm should not be present in the KeyObj's list returned returned by KeyList" $ - runIpfs $ do - resRm <- Key.rm "TestB" - resList <- Key.list - liftIO $ keys resList `shouldNotContain` keys resRm diff --git a/test/contracts/ComplexStorage.json b/test/contracts/ComplexStorage.json deleted file mode 100644 index 06c638e9..00000000 --- a/test/contracts/ComplexStorage.json +++ /dev/null @@ -1,4533 +0,0 @@ -{ - "contractName": "ComplexStorage", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "boolVal", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "stringVal", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "intVal", - "outputs": [ - { - "name": "", - "type": "int256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "intListVal", - "outputs": [ - { - "name": "", - "type": "int256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "uintVal", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "int224Val", - "outputs": [ - { - "name": "", - "type": "int224" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "bytes16Val", - "outputs": [ - { - "name": "", - "type": "bytes16" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "boolVectorVal", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - } - ], - "name": "bytes2VectorListVal", - "outputs": [ - { - "name": "", - "type": "bytes2" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "a", - "type": "uint256" - }, - { - "indexed": false, - "name": "b", - "type": "int256" - }, - { - "indexed": false, - "name": "c", - "type": "bool" - }, - { - "indexed": false, - "name": "d", - "type": "int224" - }, - { - "indexed": false, - "name": "e", - "type": "bool[2]" - }, - { - "indexed": false, - "name": "f", - "type": "int256[]" - }, - { - "indexed": false, - "name": "g", - "type": "string" - }, - { - "indexed": false, - "name": "h", - "type": "bytes16" - }, - { - "indexed": false, - "name": "i", - "type": "bytes2[4][]" - } - ], - "name": "ValsSet", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "_uintVal", - "type": "uint256" - }, - { - "name": "_intVal", - "type": "int256" - }, - { - "name": "_boolVal", - "type": "bool" - }, - { - "name": "_int224Val", - "type": "int224" - }, - { - "name": "_boolVectorVal", - "type": "bool[2]" - }, - { - "name": "_intListVal", - "type": "int256[]" - }, - { - "name": "_stringVal", - "type": "string" - }, - { - "name": "_bytes16Val", - "type": "bytes16" - }, - { - "name": "_bytes2VectorListVal", - "type": "bytes2[4][]" - } - ], - "name": "setValues", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVals", - "outputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "int256" - }, - { - "name": "", - "type": "bool" - }, - { - "name": "", - "type": "int224" - }, - { - "name": "", - "type": "bool[2]" - }, - { - "name": "", - "type": "int256[]" - }, - { - "name": "", - "type": "string" - }, - { - "name": "", - "type": "bytes16" - }, - { - "name": "", - "type": "bytes2[4][]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506111be806100206000396000f3006080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631aadfbdb146100b45780632316afea14610258578063579c738a14610287578063614ac7911461031757806382a35c77146104dc5780638ba27dca146105075780639a0283ed146105485780639d49a304146105735780639eb7a6b2146105a4578063c84a4100146105f5578063f4f67ad71461063a575b600080fd5b3480156100c057600080fd5b5061025660048036038101908080359060200190929190803590602001909291908035151590602001909291908035601b0b9060200190929190806040019060028060200260405190810160405280929190826002602002808284378201915050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929080356fffffffffffffffffffffffffffffffff1916906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156102445784848390506080020160048060200260405190810160405280929190826004602002808284378201915050505050815260200190600101906101ff565b505050505091929192905050506106c7565b005b34801561026457600080fd5b5061026d6109b9565b604051808215151515815260200191505060405180910390f35b34801561029357600080fd5b5061029c6109cc565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102dc5780820151818401526020810190506102c1565b50505050905090810190601f1680156103095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032357600080fd5b5061032c610a6a565b604051808a81526020018981526020018815151515815260200187601b0b601b0b815260200186600260200280838360005b8381101561037957808201518184015260208101905061035e565b505050509050018060200180602001856fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200180602001848103845288818151815260200191508051906020019060200280838360005b838110156103f35780820151818401526020810190506103d8565b50505050905001848103835287818151815260200191508051906020019080838360005b83811015610432578082015181840152602081019050610417565b50505050905090810190601f16801561045f5780820380516001836020036101000a031916815260200191505b508481038252858181518152602001915080516000925b818410156104c157828490602001906020020151600460200280838360005b838110156104b0578082015181840152602081019050610495565b505050509050019260010192610476565b925050509c5050505050505050505050505060405180910390f35b3480156104e857600080fd5b506104f1610d24565b6040518082815260200191505060405180910390f35b34801561051357600080fd5b5061053260048036038101908080359060200190929190505050610d2a565b6040518082815260200191505060405180910390f35b34801561055457600080fd5b5061055d610d4d565b6040518082815260200191505060405180910390f35b34801561057f57600080fd5b50610588610d53565b6040518082601b0b601b0b815260200191505060405180910390f35b3480156105b057600080fd5b506105b9610d66565b60405180826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b34801561060157600080fd5b5061062060048036038101908080359060200190929190505050610d89565b604051808215151515815260200191505060405180910390f35b34801561064657600080fd5b5061066f6004803603810190808035906020019092919080359060200190929190505050610db2565b60405180827dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b886000819055508760018190555086600260006101000a81548160ff02191690831515021790555085600260016101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff0219169083601b0b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550846003906002610754929190610e16565b50836004908051906020019061076b929190610eaf565b508260059080519060200190610782929190610efc565b5081600660006101000a8154816fffffffffffffffffffffffffffffffff02191690837001000000000000000000000000000000009004021790555080600790805190602001906107d4929190610f7c565b507f88d23351ad32a937b11ca10530404f8297d29803e94709336b48c1f82c15b3cc898989898989898989604051808a81526020018981526020018815151515815260200187601b0b601b0b815260200186600260200280838360005b8381101561084c578082015181840152602081019050610831565b505050509050018060200180602001856fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200180602001848103845288818151815260200191508051906020019060200280838360005b838110156108c65780820151818401526020810190506108ab565b50505050905001848103835287818151815260200191508051906020019080838360005b838110156109055780820151818401526020810190506108ea565b50505050905090810190601f1680156109325780820380516001836020036101000a031916815260200191505b508481038252858181518152602001915080516000925b8184101561099457828490602001906020020151600460200280838360005b83811015610983578082015181840152602081019050610968565b505050509050019260010192610949565b925050509c5050505050505050505050505060405180910390a1505050505050505050565b600260009054906101000a900460ff1681565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a625780601f10610a3757610100808354040283529160200191610a62565b820191906000526020600020905b815481529060010190602001808311610a4557829003601f168201915b505050505081565b600080600080610a78610fd7565b60608060006060600054600154600260009054906101000a900460ff16600260019054906101000a9004601b0b600360046005600660009054906101000a900470010000000000000000000000000000000002600784600280602002604051908101604052809291908260028015610b2a576020028201916000905b82829054906101000a900460ff16151581526020019060010190602082600001049283019260010382029150808411610af45790505b5050505050945083805480602002602001604051908101604052809291908181526020018280548015610b7c57602002820191906000526020600020905b815481526020019060010190808311610b68575b50505050509350828054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c185780601f10610bed57610100808354040283529160200191610c18565b820191906000526020600020905b815481529060010190602001808311610bfb57829003601f168201915b5050505050925080805480602002602001604051908101604052809291908181526020016000905b82821015610d0157838290600052602060002001600480602002604051908101604052809291908260048015610ced576020028201916000905b82829054906101000a90047e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019060020190602082600101049283019260010382029150808411610c7a5790505b505050505081526020019060010190610c40565b505050509050985098509850985098509850985098509850909192939495969798565b60015481565b600481815481101515610d3957fe5b906000526020600020016000915090505481565b60005481565b600260019054906101000a9004601b0b81565b600660009054906101000a90047001000000000000000000000000000000000281565b600381600281101515610d9857fe5b60209182820401919006915054906101000a900460ff1681565b600782815481101515610dc157fe5b9060005260206000200181600481101515610dd857fe5b60109182820401919006600202915091509054906101000a90047e010000000000000000000000000000000000000000000000000000000000000281565b826002601f01602090048101928215610e9e5791602002820160005b83821115610e6f57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302610e32565b8015610e9c5782816101000a81549060ff0219169055600101602081600001049283019260010302610e6f565b505b509050610eab9190610ff9565b5090565b828054828255906000526020600020908101928215610eeb579160200282015b82811115610eea578251825591602001919060010190610ecf565b5b509050610ef89190611029565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610f3d57805160ff1916838001178555610f6b565b82800160010185558215610f6b579182015b82811115610f6a578251825591602001919060010190610f4f565b5b509050610f78919061104e565b5090565b828054828255906000526020600020908101928215610fc6579160200282015b82811115610fc557825182906004610fb5929190611073565b5091602001919060010190610f9c565b5b509050610fd3919061112e565b5090565b6040805190810160405280600290602082028038833980820191505090505090565b61102691905b8082111561102257600081816101000a81549060ff021916905550600101610fff565b5090565b90565b61104b91905b8082111561104757600081600090555060010161102f565b5090565b90565b61107091905b8082111561106c576000816000905550600101611054565b5090565b90565b826004600f0160109004810192821561111d5791602002820160005b838211156110ed57835183826101000a81548161ffff02191690837e0100000000000000000000000000000000000000000000000000000000000090040217905550926020019260020160208160010104928301926001030261108f565b801561111b5782816101000a81549061ffff02191690556002016020816001010492830192600103026110ed565b505b50905061112a919061115a565b5090565b61115791905b80821115611153576000818161114a919061118b565b50600101611134565b5090565b90565b61118891905b8082111561118457600081816101000a81549061ffff021916905550600101611160565b5090565b90565b50600090555600a165627a7a7230582011b9a8b2fe6341272836fb36535a5f03b46544a58a14b17b7d49405a8247b7d10029", - "deployedBytecode": "0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631aadfbdb146100b45780632316afea14610258578063579c738a14610287578063614ac7911461031757806382a35c77146104dc5780638ba27dca146105075780639a0283ed146105485780639d49a304146105735780639eb7a6b2146105a4578063c84a4100146105f5578063f4f67ad71461063a575b600080fd5b3480156100c057600080fd5b5061025660048036038101908080359060200190929190803590602001909291908035151590602001909291908035601b0b9060200190929190806040019060028060200260405190810160405280929190826002602002808284378201915050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929080356fffffffffffffffffffffffffffffffff1916906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156102445784848390506080020160048060200260405190810160405280929190826004602002808284378201915050505050815260200190600101906101ff565b505050505091929192905050506106c7565b005b34801561026457600080fd5b5061026d6109b9565b604051808215151515815260200191505060405180910390f35b34801561029357600080fd5b5061029c6109cc565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102dc5780820151818401526020810190506102c1565b50505050905090810190601f1680156103095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032357600080fd5b5061032c610a6a565b604051808a81526020018981526020018815151515815260200187601b0b601b0b815260200186600260200280838360005b8381101561037957808201518184015260208101905061035e565b505050509050018060200180602001856fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200180602001848103845288818151815260200191508051906020019060200280838360005b838110156103f35780820151818401526020810190506103d8565b50505050905001848103835287818151815260200191508051906020019080838360005b83811015610432578082015181840152602081019050610417565b50505050905090810190601f16801561045f5780820380516001836020036101000a031916815260200191505b508481038252858181518152602001915080516000925b818410156104c157828490602001906020020151600460200280838360005b838110156104b0578082015181840152602081019050610495565b505050509050019260010192610476565b925050509c5050505050505050505050505060405180910390f35b3480156104e857600080fd5b506104f1610d24565b6040518082815260200191505060405180910390f35b34801561051357600080fd5b5061053260048036038101908080359060200190929190505050610d2a565b6040518082815260200191505060405180910390f35b34801561055457600080fd5b5061055d610d4d565b6040518082815260200191505060405180910390f35b34801561057f57600080fd5b50610588610d53565b6040518082601b0b601b0b815260200191505060405180910390f35b3480156105b057600080fd5b506105b9610d66565b60405180826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b34801561060157600080fd5b5061062060048036038101908080359060200190929190505050610d89565b604051808215151515815260200191505060405180910390f35b34801561064657600080fd5b5061066f6004803603810190808035906020019092919080359060200190929190505050610db2565b60405180827dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b886000819055508760018190555086600260006101000a81548160ff02191690831515021790555085600260016101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff0219169083601b0b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550846003906002610754929190610e16565b50836004908051906020019061076b929190610eaf565b508260059080519060200190610782929190610efc565b5081600660006101000a8154816fffffffffffffffffffffffffffffffff02191690837001000000000000000000000000000000009004021790555080600790805190602001906107d4929190610f7c565b507f88d23351ad32a937b11ca10530404f8297d29803e94709336b48c1f82c15b3cc898989898989898989604051808a81526020018981526020018815151515815260200187601b0b601b0b815260200186600260200280838360005b8381101561084c578082015181840152602081019050610831565b505050509050018060200180602001856fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260200180602001848103845288818151815260200191508051906020019060200280838360005b838110156108c65780820151818401526020810190506108ab565b50505050905001848103835287818151815260200191508051906020019080838360005b838110156109055780820151818401526020810190506108ea565b50505050905090810190601f1680156109325780820380516001836020036101000a031916815260200191505b508481038252858181518152602001915080516000925b8184101561099457828490602001906020020151600460200280838360005b83811015610983578082015181840152602081019050610968565b505050509050019260010192610949565b925050509c5050505050505050505050505060405180910390a1505050505050505050565b600260009054906101000a900460ff1681565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a625780601f10610a3757610100808354040283529160200191610a62565b820191906000526020600020905b815481529060010190602001808311610a4557829003601f168201915b505050505081565b600080600080610a78610fd7565b60608060006060600054600154600260009054906101000a900460ff16600260019054906101000a9004601b0b600360046005600660009054906101000a900470010000000000000000000000000000000002600784600280602002604051908101604052809291908260028015610b2a576020028201916000905b82829054906101000a900460ff16151581526020019060010190602082600001049283019260010382029150808411610af45790505b5050505050945083805480602002602001604051908101604052809291908181526020018280548015610b7c57602002820191906000526020600020905b815481526020019060010190808311610b68575b50505050509350828054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c185780601f10610bed57610100808354040283529160200191610c18565b820191906000526020600020905b815481529060010190602001808311610bfb57829003601f168201915b5050505050925080805480602002602001604051908101604052809291908181526020016000905b82821015610d0157838290600052602060002001600480602002604051908101604052809291908260048015610ced576020028201916000905b82829054906101000a90047e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019060020190602082600101049283019260010382029150808411610c7a5790505b505050505081526020019060010190610c40565b505050509050985098509850985098509850985098509850909192939495969798565b60015481565b600481815481101515610d3957fe5b906000526020600020016000915090505481565b60005481565b600260019054906101000a9004601b0b81565b600660009054906101000a90047001000000000000000000000000000000000281565b600381600281101515610d9857fe5b60209182820401919006915054906101000a900460ff1681565b600782815481101515610dc157fe5b9060005260206000200181600481101515610dd857fe5b60109182820401919006600202915091509054906101000a90047e010000000000000000000000000000000000000000000000000000000000000281565b826002601f01602090048101928215610e9e5791602002820160005b83821115610e6f57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302610e32565b8015610e9c5782816101000a81549060ff0219169055600101602081600001049283019260010302610e6f565b505b509050610eab9190610ff9565b5090565b828054828255906000526020600020908101928215610eeb579160200282015b82811115610eea578251825591602001919060010190610ecf565b5b509050610ef89190611029565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610f3d57805160ff1916838001178555610f6b565b82800160010185558215610f6b579182015b82811115610f6a578251825591602001919060010190610f4f565b5b509050610f78919061104e565b5090565b828054828255906000526020600020908101928215610fc6579160200282015b82811115610fc557825182906004610fb5929190611073565b5091602001919060010190610f9c565b5b509050610fd3919061112e565b5090565b6040805190810160405280600290602082028038833980820191505090505090565b61102691905b8082111561102257600081816101000a81549060ff021916905550600101610fff565b5090565b90565b61104b91905b8082111561104757600081600090555060010161102f565b5090565b90565b61107091905b8082111561106c576000816000905550600101611054565b5090565b90565b826004600f0160109004810192821561111d5791602002820160005b838211156110ed57835183826101000a81548161ffff02191690837e0100000000000000000000000000000000000000000000000000000000000090040217905550926020019260020160208160010104928301926001030261108f565b801561111b5782816101000a81549061ffff02191690556002016020816001010492830192600103026110ed565b505b50905061112a919061115a565b5090565b61115791905b80821115611153576000818161114a919061118b565b50600101611134565b5090565b90565b61118891905b8082111561118457600081816101000a81549061ffff021916905550600101611160565b5090565b90565b50600090555600a165627a7a7230582011b9a8b2fe6341272836fb36535a5f03b46544a58a14b17b7d49405a8247b7d10029", - "sourceMap": "26:1413:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:1413:0;;;;;;;", - "deployedSourceMap": "26:1413:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;439:742;;8:9:-1;5:2;;;30:1;27;20:12;5:2;439:742:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;104:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;104:19:0;;;;;;;;;;;;;;;;;;;;;;;;;;;221:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;221:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;221:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1187:246;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1187:246:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;81:17:0;;;;;;;;;;;;;;;;;;;;;;;192:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;192:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;56:19:0;;;;;;;;;;;;;;;;;;;;;;;129:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;129:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;250:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;250:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;158:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;158:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;281:38;;8:9:-1;5:2;;;30:1;27;20:12;5:2;281:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;439:742;675:8;655:7;:28;;;;714:7;694:6;:27;;;;752:8;732:7;;:28;;;;;;;;;;;;;;;;;;791:10;771:9;;:30;;;;;;;;;;;;;;;;;;;;832:14;812:13;:34;;;;;;;:::i;:::-;;877:11;857:10;:31;;;;;;;;;;;;:::i;:::-;;919:10;899:9;:30;;;;;;;;;;;;:::i;:::-;;960:11;940:10;;:31;;;;;;;;;;;;;;;;;;;1004:20;982:19;:42;;;;;;;;;;;;:::i;:::-;;1050:124;1058:8;1068:7;1077:8;1087:10;1099:14;1115:11;1128:10;1140:11;1153:20;1050:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1050:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1050:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1050:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1050:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;439:742;;;;;;;;;:::o;104:19::-;;;;;;;;;;;;;:::o;221:23::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1187:246::-;1232:4;1238:3;1243:4;1249:6;1257:7;;:::i;:::-;1266:5;1273:6;1281:7;1290:11;1319:7;;1328:6;;1336:7;;;;;;;;;;;1345:9;;;;;;;;;;;1356:13;1371:10;1383:9;1394:10;;;;;;;;;;;1406:19;1311:115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1187:246;;;;;;;;;:::o;81:17::-;;;;:::o;192:23::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;56:19::-;;;;:::o;129:23::-;;;;;;;;;;;;;:::o;250:25::-;;;;;;;;;;;;;:::o;158:28::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;281:38::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;26:1413::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;26:1413:0;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;:::o", - "source": "pragma solidity ^0.4.13;\n\ncontract ComplexStorage {\n uint public uintVal;\n int public intVal;\n bool public boolVal;\n int224 public int224Val;\n bool[2] public boolVectorVal;\n int[] public intListVal;\n string public stringVal;\n bytes16 public bytes16Val;\n bytes2[4][] public bytes2VectorListVal;\n\n event ValsSet(uint a, int b, bool c, int224 d, bool[2] e, int[] f, string g, bytes16 h, bytes2[4][] i);\n \n function setValues(uint _uintVal, int _intVal, bool _boolVal, int224 _int224Val, bool[2] _boolVectorVal, int[] _intListVal, string _stringVal, bytes16 _bytes16Val, bytes2[4][] _bytes2VectorListVal) public {\n uintVal = _uintVal;\n intVal = _intVal;\n boolVal = _boolVal;\n int224Val = _int224Val;\n boolVectorVal = _boolVectorVal;\n intListVal = _intListVal;\n stringVal = _stringVal;\n bytes16Val = _bytes16Val;\n bytes2VectorListVal = _bytes2VectorListVal;\n \n emit ValsSet(_uintVal, _intVal, _boolVal, _int224Val, _boolVectorVal, _intListVal, _stringVal, _bytes16Val, _bytes2VectorListVal);\n }\n\n function getVals () constant public returns (uint, int, bool, int224, bool[2], int[], string, bytes16, bytes2[4][]) {\n return (uintVal, intVal, boolVal, int224Val, boolVectorVal, intListVal, stringVal, bytes16Val, bytes2VectorListVal);\n }\n \n}\n", - "sourcePath": "/home/akru/hsweb3test/contracts/ComplexStorage.sol", - "ast": { - "absolutePath": "/home/akru/hsweb3test/contracts/ComplexStorage.sol", - "exportedSymbols": { - "ComplexStorage": [ - 167 - ] - }, - "id": 168, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.4", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "0:24:0" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 167, - "linearizedBaseContracts": [ - 167 - ], - "name": "ComplexStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3, - "name": "uintVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "56:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "56:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 5, - "name": "intVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "81:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 4, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "81:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7, - "name": "boolVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "104:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "104:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 9, - "name": "int224Val", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "129:23:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - "typeName": { - "id": 8, - "name": "int224", - "nodeType": "ElementaryTypeName", - "src": "129:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13, - "name": "boolVectorVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "158:28:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage", - "typeString": "bool[2]" - }, - "typeName": { - "baseType": { - "id": 10, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "158:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "163:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "158:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", - "typeString": "bool[2]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16, - "name": "intListVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "192:23:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 14, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "192:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 15, - "length": null, - "nodeType": "ArrayTypeName", - "src": "192:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 18, - "name": "stringVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "221:23:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 17, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "221:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 20, - "name": "bytes16Val", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "250:25:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - "typeName": { - "id": 19, - "name": "bytes16", - "nodeType": "ElementaryTypeName", - "src": "250:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 25, - "name": "bytes2VectorListVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "281:38:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", - "typeString": "bytes2[4][]" - }, - "typeName": { - "baseType": { - "baseType": { - "id": 21, - "name": "bytes2", - "nodeType": "ElementaryTypeName", - "src": "281:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes2", - "typeString": "bytes2" - } - }, - "id": 23, - "length": { - "argumentTypes": null, - "hexValue": "34", - "id": 22, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "288:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "4" - }, - "nodeType": "ArrayTypeName", - "src": "281:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", - "typeString": "bytes2[4]" - } - }, - "id": 24, - "length": null, - "nodeType": "ArrayTypeName", - "src": "281:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", - "typeString": "bytes2[4][]" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 51, - "name": "ValsSet", - "nodeType": "EventDefinition", - "parameters": { - "id": 50, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 27, - "indexed": false, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "340:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 26, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "340:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 29, - "indexed": false, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "348:5:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 28, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "348:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31, - "indexed": false, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "355:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 30, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "355:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 33, - "indexed": false, - "name": "d", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "363:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - "typeName": { - "id": 32, - "name": "int224", - "nodeType": "ElementaryTypeName", - "src": "363:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 37, - "indexed": false, - "name": "e", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "373:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2]" - }, - "typeName": { - "baseType": { - "id": 34, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "373:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 36, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 35, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "378:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "373:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", - "typeString": "bool[2]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 40, - "indexed": false, - "name": "f", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "384:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 38, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "384:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 39, - "length": null, - "nodeType": "ArrayTypeName", - "src": "384:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "indexed": false, - "name": "g", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "393:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 41, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "393:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 44, - "indexed": false, - "name": "h", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "403:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - "typeName": { - "id": 43, - "name": "bytes16", - "nodeType": "ElementaryTypeName", - "src": "403:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 49, - "indexed": false, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "414:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4][]" - }, - "typeName": { - "baseType": { - "baseType": { - "id": 45, - "name": "bytes2", - "nodeType": "ElementaryTypeName", - "src": "414:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes2", - "typeString": "bytes2" - } - }, - "id": 47, - "length": { - "argumentTypes": null, - "hexValue": "34", - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "421:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "4" - }, - "nodeType": "ArrayTypeName", - "src": "414:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", - "typeString": "bytes2[4]" - } - }, - "id": 48, - "length": null, - "nodeType": "ArrayTypeName", - "src": "414:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", - "typeString": "bytes2[4][]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "339:89:0" - }, - "src": "326:103:0" - }, - { - "body": { - "id": 126, - "nodeType": "Block", - "src": "644:537:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 80, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 78, - "name": "uintVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "655:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 79, - "name": "_uintVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "675:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "655:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 81, - "nodeType": "ExpressionStatement", - "src": "655:28:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 84, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 82, - "name": "intVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "694:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 83, - "name": "_intVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "714:7:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "694:27:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 85, - "nodeType": "ExpressionStatement", - "src": "694:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 88, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 86, - "name": "boolVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "732:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 87, - "name": "_boolVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "752:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "732:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 89, - "nodeType": "ExpressionStatement", - "src": "732:28:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 92, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 90, - "name": "int224Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "771:9:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 91, - "name": "_int224Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "791:10:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "src": "771:30:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "id": 93, - "nodeType": "ExpressionStatement", - "src": "771:30:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 96, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 94, - "name": "boolVectorVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "812:13:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage", - "typeString": "bool[2] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 95, - "name": "_boolVectorVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 63, - "src": "832:14:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2] memory" - } - }, - "src": "812:34:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage", - "typeString": "bool[2] storage ref" - } - }, - "id": 97, - "nodeType": "ExpressionStatement", - "src": "812:34:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 98, - "name": "intListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "857:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage", - "typeString": "int256[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 99, - "name": "_intListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "877:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "src": "857:31:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage", - "typeString": "int256[] storage ref" - } - }, - "id": 101, - "nodeType": "ExpressionStatement", - "src": "857:31:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 102, - "name": "stringVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "899:9:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 103, - "name": "_stringVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "919:10:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "899:30:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 105, - "nodeType": "ExpressionStatement", - "src": "899:30:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 106, - "name": "bytes16Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "940:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 107, - "name": "_bytes16Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "960:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "src": "940:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "id": 109, - "nodeType": "ExpressionStatement", - "src": "940:31:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 110, - "name": "bytes2VectorListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 25, - "src": "982:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", - "typeString": "bytes2[4] storage ref[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 111, - "name": "_bytes2VectorListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 75, - "src": "1004:20:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4] memory[] memory" - } - }, - "src": "982:42:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", - "typeString": "bytes2[4] storage ref[] storage ref" - } - }, - "id": 113, - "nodeType": "ExpressionStatement", - "src": "982:42:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 115, - "name": "_uintVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "1058:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 116, - "name": "_intVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "1068:7:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 117, - "name": "_boolVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "1077:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 118, - "name": "_int224Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "1087:10:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - { - "argumentTypes": null, - "id": 119, - "name": "_boolVectorVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 63, - "src": "1099:14:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2] memory" - } - }, - { - "argumentTypes": null, - "id": 120, - "name": "_intListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "1115:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - { - "argumentTypes": null, - "id": 121, - "name": "_stringVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1128:10:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 122, - "name": "_bytes16Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "1140:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - { - "argumentTypes": null, - "id": 123, - "name": "_bytes2VectorListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 75, - "src": "1153:20:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4] memory[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2] memory" - }, - { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4] memory[] memory" - } - ], - "id": 114, - "name": "ValsSet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51, - "src": "1050:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_int256_$_t_bool_$_t_int224_$_t_array$_t_bool_$2_memory_ptr_$_t_array$_t_int256_$dyn_memory_ptr_$_t_string_memory_ptr_$_t_bytes16_$_t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr_$returns$__$", - "typeString": "function (uint256,int256,bool,int224,bool[2] memory,int256[] memory,string memory,bytes16,bytes2[4] memory[] memory)" - } - }, - "id": 124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1050:124:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 125, - "nodeType": "EmitStatement", - "src": "1045:129:0" - } - ] - }, - "documentation": null, - "id": 127, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setValues", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 76, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 53, - "name": "_uintVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "458:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 52, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "458:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 55, - "name": "_intVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "473:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 54, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "473:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 57, - "name": "_boolVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "486:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 56, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "486:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 59, - "name": "_int224Val", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "501:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - "typeName": { - "id": 58, - "name": "int224", - "nodeType": "ElementaryTypeName", - "src": "501:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 63, - "name": "_boolVectorVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "520:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2]" - }, - "typeName": { - "baseType": { - "id": 60, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "520:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 62, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 61, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "525:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "520:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", - "typeString": "bool[2]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 66, - "name": "_intListVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "544:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 64, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "544:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 65, - "length": null, - "nodeType": "ArrayTypeName", - "src": "544:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 68, - "name": "_stringVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "563:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 67, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "563:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 70, - "name": "_bytes16Val", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "582:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - "typeName": { - "id": 69, - "name": "bytes16", - "nodeType": "ElementaryTypeName", - "src": "582:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 75, - "name": "_bytes2VectorListVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "603:32:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4][]" - }, - "typeName": { - "baseType": { - "baseType": { - "id": 71, - "name": "bytes2", - "nodeType": "ElementaryTypeName", - "src": "603:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes2", - "typeString": "bytes2" - } - }, - "id": 73, - "length": { - "argumentTypes": null, - "hexValue": "34", - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "610:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "4" - }, - "nodeType": "ArrayTypeName", - "src": "603:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", - "typeString": "bytes2[4]" - } - }, - "id": 74, - "length": null, - "nodeType": "ArrayTypeName", - "src": "603:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", - "typeString": "bytes2[4][]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "457:179:0" - }, - "payable": false, - "returnParameters": { - "id": 77, - "nodeType": "ParameterList", - "parameters": [], - "src": "644:0:0" - }, - "scope": 167, - "src": "439:742:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 165, - "nodeType": "Block", - "src": "1303:130:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 154, - "name": "uintVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "1319:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 155, - "name": "intVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "1328:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 156, - "name": "boolVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "1336:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 157, - "name": "int224Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "1345:9:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - { - "argumentTypes": null, - "id": 158, - "name": "boolVectorVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1356:13:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage", - "typeString": "bool[2] storage ref" - } - }, - { - "argumentTypes": null, - "id": 159, - "name": "intListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "1371:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage", - "typeString": "int256[] storage ref" - } - }, - { - "argumentTypes": null, - "id": 160, - "name": "stringVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "1383:9:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "id": 161, - "name": "bytes16Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "1394:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - { - "argumentTypes": null, - "id": 162, - "name": "bytes2VectorListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 25, - "src": "1406:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", - "typeString": "bytes2[4] storage ref[] storage ref" - } - } - ], - "id": 163, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1318:108:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_int256_$_t_bool_$_t_int224_$_t_array$_t_bool_$2_storage_$_t_array$_t_int256_$dyn_storage_$_t_string_storage_$_t_bytes16_$_t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_$", - "typeString": "tuple(uint256,int256,bool,int224,bool[2] storage ref,int256[] storage ref,string storage ref,bytes16,bytes2[4] storage ref[] storage ref)" - } - }, - "functionReturnParameters": 153, - "id": 164, - "nodeType": "Return", - "src": "1311:115:0" - } - ] - }, - "documentation": null, - "id": 166, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getVals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 128, - "nodeType": "ParameterList", - "parameters": [], - "src": "1204:2:0" - }, - "payable": false, - "returnParameters": { - "id": 153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 130, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1232:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 129, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1232:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1238:3:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 131, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "1238:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 134, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1243:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 133, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1243:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 136, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1249:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - "typeName": { - "id": 135, - "name": "int224", - "nodeType": "ElementaryTypeName", - "src": "1249:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 140, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1257:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2]" - }, - "typeName": { - "baseType": { - "id": 137, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1257:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 139, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1262:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "1257:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", - "typeString": "bool[2]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 143, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1266:5:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 141, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "1266:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 142, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1266:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 145, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1273:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 144, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1273:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 147, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1281:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - "typeName": { - "id": 146, - "name": "bytes16", - "nodeType": "ElementaryTypeName", - "src": "1281:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 152, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1290:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4][]" - }, - "typeName": { - "baseType": { - "baseType": { - "id": 148, - "name": "bytes2", - "nodeType": "ElementaryTypeName", - "src": "1290:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes2", - "typeString": "bytes2" - } - }, - "id": 150, - "length": { - "argumentTypes": null, - "hexValue": "34", - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1297:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "4" - }, - "nodeType": "ArrayTypeName", - "src": "1290:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", - "typeString": "bytes2[4]" - } - }, - "id": 151, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1290:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", - "typeString": "bytes2[4][]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1231:71:0" - }, - "scope": 167, - "src": "1187:246:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 168, - "src": "26:1413:0" - } - ], - "src": "0:1440:0" - }, - "legacyAST": { - "absolutePath": "/home/akru/hsweb3test/contracts/ComplexStorage.sol", - "exportedSymbols": { - "ComplexStorage": [ - 167 - ] - }, - "id": 168, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.4", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "0:24:0" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 167, - "linearizedBaseContracts": [ - 167 - ], - "name": "ComplexStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3, - "name": "uintVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "56:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "56:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 5, - "name": "intVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "81:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 4, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "81:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 7, - "name": "boolVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "104:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "104:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 9, - "name": "int224Val", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "129:23:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - "typeName": { - "id": 8, - "name": "int224", - "nodeType": "ElementaryTypeName", - "src": "129:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 13, - "name": "boolVectorVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "158:28:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage", - "typeString": "bool[2]" - }, - "typeName": { - "baseType": { - "id": 10, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "158:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 12, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "163:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "158:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", - "typeString": "bool[2]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 16, - "name": "intListVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "192:23:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 14, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "192:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 15, - "length": null, - "nodeType": "ArrayTypeName", - "src": "192:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 18, - "name": "stringVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "221:23:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 17, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "221:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 20, - "name": "bytes16Val", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "250:25:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - "typeName": { - "id": 19, - "name": "bytes16", - "nodeType": "ElementaryTypeName", - "src": "250:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 25, - "name": "bytes2VectorListVal", - "nodeType": "VariableDeclaration", - "scope": 167, - "src": "281:38:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", - "typeString": "bytes2[4][]" - }, - "typeName": { - "baseType": { - "baseType": { - "id": 21, - "name": "bytes2", - "nodeType": "ElementaryTypeName", - "src": "281:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes2", - "typeString": "bytes2" - } - }, - "id": 23, - "length": { - "argumentTypes": null, - "hexValue": "34", - "id": 22, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "288:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "4" - }, - "nodeType": "ArrayTypeName", - "src": "281:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", - "typeString": "bytes2[4]" - } - }, - "id": 24, - "length": null, - "nodeType": "ArrayTypeName", - "src": "281:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", - "typeString": "bytes2[4][]" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 51, - "name": "ValsSet", - "nodeType": "EventDefinition", - "parameters": { - "id": 50, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 27, - "indexed": false, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "340:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 26, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "340:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 29, - "indexed": false, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "348:5:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 28, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "348:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31, - "indexed": false, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "355:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 30, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "355:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 33, - "indexed": false, - "name": "d", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "363:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - "typeName": { - "id": 32, - "name": "int224", - "nodeType": "ElementaryTypeName", - "src": "363:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 37, - "indexed": false, - "name": "e", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "373:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2]" - }, - "typeName": { - "baseType": { - "id": 34, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "373:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 36, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 35, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "378:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "373:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", - "typeString": "bool[2]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 40, - "indexed": false, - "name": "f", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "384:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 38, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "384:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 39, - "length": null, - "nodeType": "ArrayTypeName", - "src": "384:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "indexed": false, - "name": "g", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "393:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 41, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "393:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 44, - "indexed": false, - "name": "h", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "403:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - "typeName": { - "id": 43, - "name": "bytes16", - "nodeType": "ElementaryTypeName", - "src": "403:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 49, - "indexed": false, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 51, - "src": "414:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4][]" - }, - "typeName": { - "baseType": { - "baseType": { - "id": 45, - "name": "bytes2", - "nodeType": "ElementaryTypeName", - "src": "414:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes2", - "typeString": "bytes2" - } - }, - "id": 47, - "length": { - "argumentTypes": null, - "hexValue": "34", - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "421:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "4" - }, - "nodeType": "ArrayTypeName", - "src": "414:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", - "typeString": "bytes2[4]" - } - }, - "id": 48, - "length": null, - "nodeType": "ArrayTypeName", - "src": "414:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", - "typeString": "bytes2[4][]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "339:89:0" - }, - "src": "326:103:0" - }, - { - "body": { - "id": 126, - "nodeType": "Block", - "src": "644:537:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 80, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 78, - "name": "uintVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "655:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 79, - "name": "_uintVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "675:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "655:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 81, - "nodeType": "ExpressionStatement", - "src": "655:28:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 84, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 82, - "name": "intVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "694:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 83, - "name": "_intVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "714:7:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "694:27:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 85, - "nodeType": "ExpressionStatement", - "src": "694:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 88, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 86, - "name": "boolVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "732:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 87, - "name": "_boolVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "752:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "732:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 89, - "nodeType": "ExpressionStatement", - "src": "732:28:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 92, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 90, - "name": "int224Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "771:9:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 91, - "name": "_int224Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "791:10:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "src": "771:30:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "id": 93, - "nodeType": "ExpressionStatement", - "src": "771:30:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 96, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 94, - "name": "boolVectorVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "812:13:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage", - "typeString": "bool[2] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 95, - "name": "_boolVectorVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 63, - "src": "832:14:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2] memory" - } - }, - "src": "812:34:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage", - "typeString": "bool[2] storage ref" - } - }, - "id": 97, - "nodeType": "ExpressionStatement", - "src": "812:34:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 100, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 98, - "name": "intListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "857:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage", - "typeString": "int256[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 99, - "name": "_intListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "877:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "src": "857:31:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage", - "typeString": "int256[] storage ref" - } - }, - "id": 101, - "nodeType": "ExpressionStatement", - "src": "857:31:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 102, - "name": "stringVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "899:9:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 103, - "name": "_stringVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "919:10:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "899:30:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 105, - "nodeType": "ExpressionStatement", - "src": "899:30:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 106, - "name": "bytes16Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "940:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 107, - "name": "_bytes16Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "960:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "src": "940:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "id": 109, - "nodeType": "ExpressionStatement", - "src": "940:31:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 110, - "name": "bytes2VectorListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 25, - "src": "982:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", - "typeString": "bytes2[4] storage ref[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 111, - "name": "_bytes2VectorListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 75, - "src": "1004:20:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4] memory[] memory" - } - }, - "src": "982:42:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", - "typeString": "bytes2[4] storage ref[] storage ref" - } - }, - "id": 113, - "nodeType": "ExpressionStatement", - "src": "982:42:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 115, - "name": "_uintVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "1058:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 116, - "name": "_intVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "1068:7:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 117, - "name": "_boolVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "1077:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 118, - "name": "_int224Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "1087:10:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - { - "argumentTypes": null, - "id": 119, - "name": "_boolVectorVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 63, - "src": "1099:14:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2] memory" - } - }, - { - "argumentTypes": null, - "id": 120, - "name": "_intListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 66, - "src": "1115:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - { - "argumentTypes": null, - "id": 121, - "name": "_stringVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1128:10:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 122, - "name": "_bytes16Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "1140:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - { - "argumentTypes": null, - "id": 123, - "name": "_bytes2VectorListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 75, - "src": "1153:20:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4] memory[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2] memory" - }, - { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - }, - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4] memory[] memory" - } - ], - "id": 114, - "name": "ValsSet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51, - "src": "1050:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_int256_$_t_bool_$_t_int224_$_t_array$_t_bool_$2_memory_ptr_$_t_array$_t_int256_$dyn_memory_ptr_$_t_string_memory_ptr_$_t_bytes16_$_t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr_$returns$__$", - "typeString": "function (uint256,int256,bool,int224,bool[2] memory,int256[] memory,string memory,bytes16,bytes2[4] memory[] memory)" - } - }, - "id": 124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1050:124:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 125, - "nodeType": "EmitStatement", - "src": "1045:129:0" - } - ] - }, - "documentation": null, - "id": 127, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setValues", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 76, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 53, - "name": "_uintVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "458:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 52, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "458:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 55, - "name": "_intVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "473:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 54, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "473:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 57, - "name": "_boolVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "486:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 56, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "486:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 59, - "name": "_int224Val", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "501:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - "typeName": { - "id": 58, - "name": "int224", - "nodeType": "ElementaryTypeName", - "src": "501:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 63, - "name": "_boolVectorVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "520:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2]" - }, - "typeName": { - "baseType": { - "id": 60, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "520:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 62, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 61, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "525:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "520:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", - "typeString": "bool[2]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 66, - "name": "_intListVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "544:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 64, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "544:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 65, - "length": null, - "nodeType": "ArrayTypeName", - "src": "544:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 68, - "name": "_stringVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "563:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 67, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "563:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 70, - "name": "_bytes16Val", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "582:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - "typeName": { - "id": 69, - "name": "bytes16", - "nodeType": "ElementaryTypeName", - "src": "582:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 75, - "name": "_bytes2VectorListVal", - "nodeType": "VariableDeclaration", - "scope": 127, - "src": "603:32:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4][]" - }, - "typeName": { - "baseType": { - "baseType": { - "id": 71, - "name": "bytes2", - "nodeType": "ElementaryTypeName", - "src": "603:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes2", - "typeString": "bytes2" - } - }, - "id": 73, - "length": { - "argumentTypes": null, - "hexValue": "34", - "id": 72, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "610:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "4" - }, - "nodeType": "ArrayTypeName", - "src": "603:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", - "typeString": "bytes2[4]" - } - }, - "id": 74, - "length": null, - "nodeType": "ArrayTypeName", - "src": "603:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", - "typeString": "bytes2[4][]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "457:179:0" - }, - "payable": false, - "returnParameters": { - "id": 77, - "nodeType": "ParameterList", - "parameters": [], - "src": "644:0:0" - }, - "scope": 167, - "src": "439:742:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 165, - "nodeType": "Block", - "src": "1303:130:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 154, - "name": "uintVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "1319:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 155, - "name": "intVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "1328:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 156, - "name": "boolVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "1336:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "id": 157, - "name": "int224Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "1345:9:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - { - "argumentTypes": null, - "id": 158, - "name": "boolVectorVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1356:13:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage", - "typeString": "bool[2] storage ref" - } - }, - { - "argumentTypes": null, - "id": 159, - "name": "intListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "1371:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage", - "typeString": "int256[] storage ref" - } - }, - { - "argumentTypes": null, - "id": 160, - "name": "stringVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "1383:9:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "id": 161, - "name": "bytes16Val", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "1394:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - { - "argumentTypes": null, - "id": 162, - "name": "bytes2VectorListVal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 25, - "src": "1406:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage", - "typeString": "bytes2[4] storage ref[] storage ref" - } - } - ], - "id": 163, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1318:108:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_int256_$_t_bool_$_t_int224_$_t_array$_t_bool_$2_storage_$_t_array$_t_int256_$dyn_storage_$_t_string_storage_$_t_bytes16_$_t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_$", - "typeString": "tuple(uint256,int256,bool,int224,bool[2] storage ref,int256[] storage ref,string storage ref,bytes16,bytes2[4] storage ref[] storage ref)" - } - }, - "functionReturnParameters": 153, - "id": 164, - "nodeType": "Return", - "src": "1311:115:0" - } - ] - }, - "documentation": null, - "id": 166, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getVals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 128, - "nodeType": "ParameterList", - "parameters": [], - "src": "1204:2:0" - }, - "payable": false, - "returnParameters": { - "id": 153, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 130, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1232:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 129, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1232:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1238:3:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 131, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "1238:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 134, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1243:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 133, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1243:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 136, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1249:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - }, - "typeName": { - "id": 135, - "name": "int224", - "nodeType": "ElementaryTypeName", - "src": "1249:6:0", - "typeDescriptions": { - "typeIdentifier": "t_int224", - "typeString": "int224" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 140, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1257:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_memory_ptr", - "typeString": "bool[2]" - }, - "typeName": { - "baseType": { - "id": 137, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1257:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 139, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1262:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "1257:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bool_$2_storage_ptr", - "typeString": "bool[2]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 143, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1266:5:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 141, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "1266:3:0", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 142, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1266:5:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 145, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1273:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 144, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1273:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 147, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1281:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - }, - "typeName": { - "id": 146, - "name": "bytes16", - "nodeType": "ElementaryTypeName", - "src": "1281:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes16", - "typeString": "bytes16" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 152, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 166, - "src": "1290:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_memory_$dyn_memory_ptr", - "typeString": "bytes2[4][]" - }, - "typeName": { - "baseType": { - "baseType": { - "id": 148, - "name": "bytes2", - "nodeType": "ElementaryTypeName", - "src": "1290:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes2", - "typeString": "bytes2" - } - }, - "id": 150, - "length": { - "argumentTypes": null, - "hexValue": "34", - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1297:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "4" - }, - "nodeType": "ArrayTypeName", - "src": "1290:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes2_$4_storage_ptr", - "typeString": "bytes2[4]" - } - }, - "id": 151, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1290:11:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_array$_t_bytes2_$4_storage_$dyn_storage_ptr", - "typeString": "bytes2[4][]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1231:71:0" - }, - "scope": 167, - "src": "1187:246:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 168, - "src": "26:1413:0" - } - ], - "src": "0:1440:0" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.1", - "updatedAt": "2018-10-17T08:28:45.994Z" -} \ No newline at end of file diff --git a/test/contracts/Linearization.json b/test/contracts/Linearization.json deleted file mode 100644 index bd275ba3..00000000 --- a/test/contracts/Linearization.json +++ /dev/null @@ -1,2716 +0,0 @@ -{ - "contractName": "Linearization", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "E1", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "tag", - "type": "string" - }, - { - "indexed": false, - "name": "uuid", - "type": "bytes4" - } - ], - "name": "E2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "txOrigin", - "type": "address" - }, - { - "indexed": false, - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "E3", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "sig", - "type": "bytes4" - }, - { - "indexed": false, - "name": "blockHash", - "type": "bytes32" - } - ], - "name": "E4", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "e12", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "e21", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "e1", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "e2", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "e3", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "e4", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506105ad806100206000396000f300608060405260043610610077576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062def0b21461007c57806356800b521461009357806379e5f054146100aa5780639b31f9e8146100c1578063a0f29798146100d8578063a2c2d666146100ef575b600080fd5b34801561008857600080fd5b50610091610106565b005b34801561009f57600080fd5b506100a8610226565b005b3480156100b657600080fd5b506100bf610293565b005b3480156100cd57600080fd5b506100d661033f565b005b3480156100e457600080fd5b506100ed6103f3565b005b3480156100fb57600080fd5b50610104610513565b005b7f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a17fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a1565b7fe86793c401899b62baf9c8e9b8a8803ece6ace1021d056fe8634d1f59a0410c13243604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1565b7fd8f3042e770b7de0dc534d3accbe98fba747e05ada6febe1a03d1e098521edc26000357fffffffff0000000000000000000000000000000000000000000000000000000016434060405180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200182600019166000191681526020019250505060405180910390a1565b7fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a1565b7fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a17f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1565b7f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15600a165627a7a72305820be9afa4ce385da787f13197a249b8d9d1c557381e3c46f9bbada45913eee79870029", - "deployedBytecode": "0x608060405260043610610077576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062def0b21461007c57806356800b521461009357806379e5f054146100aa5780639b31f9e8146100c1578063a0f29798146100d8578063a2c2d666146100ef575b600080fd5b34801561008857600080fd5b50610091610106565b005b34801561009f57600080fd5b506100a8610226565b005b3480156100b657600080fd5b506100bf610293565b005b3480156100cd57600080fd5b506100d661033f565b005b3480156100e457600080fd5b506100ed6103f3565b005b3480156100fb57600080fd5b50610104610513565b005b7f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a17fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a1565b7fe86793c401899b62baf9c8e9b8a8803ece6ace1021d056fe8634d1f59a0410c13243604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1565b7fd8f3042e770b7de0dc534d3accbe98fba747e05ada6febe1a03d1e098521edc26000357fffffffff0000000000000000000000000000000000000000000000000000000016434060405180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200182600019166000191681526020019250505060405180910390a1565b7fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a1565b7fa7070e1659496fddc8e134f7c9c487aba246b54d9a23918210a30bfa32af9e4563deadbeef6040518080602001837c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001828103825260058152602001807f68656c6c6f0000000000000000000000000000000000000000000000000000008152506020019250505060405180910390a17f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1565b7f39be10caf08413c53cba369135da2b641931c99ac27b0d821e26f3ec4e0c63d2336000604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15600a165627a7a72305820be9afa4ce385da787f13197a249b8d9d1c557381e3c46f9bbada45913eee79870029", - "sourceMap": "26:649:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:649:1;;;;;;;", - "deployedSourceMap": "26:649:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;224:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;224:89:1;;;;;;532:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;532:64:1;;;;;;600:73;;8:9:-1;5:2;;;30:1;27;20:12;5:2;600:73:1;;;;;;468:60;;8:9:-1;5:2;;;30:1;27;20:12;5:2;468:60:1;;;;;;317:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;317:89:1;;;;;;410:54;;8:9:-1;5:2;;;30:1;27;20:12;5:2;410:54:1;;;;;;224:89;257:17;260:10;272:1;257:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;285:23;297:10;285:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;224:89::o;532:64::-;564:27;567:9;578:12;564:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;532:64::o;600:73::-;632:36;635:7;;;;654:12;644:23;632:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;600:73::o;468:60::-;500:23;512:10;500:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;468:60::o;317:89::-;350:23;362:10;350:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;384:17;387:10;399:1;384:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;317:89::o;410:54::-;442:17;445:10;457:1;442:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;410:54::o", - "source": "pragma solidity ^0.4.22;\n\ncontract Linearization {\n\n event E1(address sender, uint amount);\n event E2(string tag, bytes4 uuid);\n event E3(address txOrigin, uint blockNumber);\n event E4(bytes4 sig, bytes32 blockHash);\n\n function e12() public {\n emit E1(msg.sender, 0);\n emit E2(\"hello\", 0xdeadbeef);\n }\n\n function e21() public {\n emit E2(\"hello\", 0xdeadbeef);\n emit E1(msg.sender, 0);\n }\n\n function e1() public {\n emit E1(msg.sender, 0);\n }\n\n function e2() public {\n emit E2(\"hello\", 0xdeadbeef);\n }\n\n function e3() public {\n emit E3(tx.origin, block.number);\n }\n\n function e4() public {\n emit E4(msg.sig, blockhash(block.number));\n }\n}", - "sourcePath": "/home/akru/hsweb3test/contracts/Linearization.sol", - "ast": { - "absolutePath": "/home/akru/hsweb3test/contracts/Linearization.sol", - "exportedSymbols": { - "Linearization": [ - 267 - ] - }, - "id": 268, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 169, - "literals": [ - "solidity", - "^", - "0.4", - ".22" - ], - "nodeType": "PragmaDirective", - "src": "0:24:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 267, - "linearizedBaseContracts": [ - 267 - ], - "name": "Linearization", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 175, - "name": "E1", - "nodeType": "EventDefinition", - "parameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 171, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 175, - "src": "63:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 170, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "63:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 173, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 175, - "src": "79:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 172, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "79:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62:29:1" - }, - "src": "54:38:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 181, - "name": "E2", - "nodeType": "EventDefinition", - "parameters": { - "id": 180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 177, - "indexed": false, - "name": "tag", - "nodeType": "VariableDeclaration", - "scope": 181, - "src": "104:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 176, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "104:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 179, - "indexed": false, - "name": "uuid", - "nodeType": "VariableDeclaration", - "scope": 181, - "src": "116:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 178, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "116:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "103:25:1" - }, - "src": "95:34:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 187, - "name": "E3", - "nodeType": "EventDefinition", - "parameters": { - "id": 186, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 183, - "indexed": false, - "name": "txOrigin", - "nodeType": "VariableDeclaration", - "scope": 187, - "src": "141:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 182, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "141:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 185, - "indexed": false, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 187, - "src": "159:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 184, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "159:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "140:36:1" - }, - "src": "132:45:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 193, - "name": "E4", - "nodeType": "EventDefinition", - "parameters": { - "id": 192, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 189, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "189:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 188, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "189:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 191, - "indexed": false, - "name": "blockHash", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "201:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 190, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "201:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "188:31:1" - }, - "src": "180:40:1" - }, - { - "body": { - "id": 207, - "nodeType": "Block", - "src": "246:67:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 197, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 381, - "src": "260:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "260:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "272:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 196, - "name": "E1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "257:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "257:17:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 201, - "nodeType": "EmitStatement", - "src": "252:22:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "68656c6c6f", - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "288:7:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - "value": "hello" - }, - { - "argumentTypes": null, - "hexValue": "30786465616462656566", - "id": 204, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "297:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - }, - "value": "0xdeadbeef" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - } - ], - "id": 202, - "name": "E2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "285:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", - "typeString": "function (string memory,bytes4)" - } - }, - "id": 205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "285:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 206, - "nodeType": "EmitStatement", - "src": "280:28:1" - } - ] - }, - "documentation": null, - "id": 208, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e12", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 194, - "nodeType": "ParameterList", - "parameters": [], - "src": "236:2:1" - }, - "payable": false, - "returnParameters": { - "id": 195, - "nodeType": "ParameterList", - "parameters": [], - "src": "246:0:1" - }, - "scope": 267, - "src": "224:89:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 222, - "nodeType": "Block", - "src": "339:67:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "68656c6c6f", - "id": 212, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "353:7:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - "value": "hello" - }, - { - "argumentTypes": null, - "hexValue": "30786465616462656566", - "id": 213, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "362:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - }, - "value": "0xdeadbeef" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - } - ], - "id": 211, - "name": "E2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "350:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", - "typeString": "function (string memory,bytes4)" - } - }, - "id": 214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "350:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 215, - "nodeType": "EmitStatement", - "src": "345:28:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 381, - "src": "387:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "387:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "399:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 216, - "name": "E1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "384:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:17:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 221, - "nodeType": "EmitStatement", - "src": "379:22:1" - } - ] - }, - "documentation": null, - "id": 223, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e21", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 209, - "nodeType": "ParameterList", - "parameters": [], - "src": "329:2:1" - }, - "payable": false, - "returnParameters": { - "id": 210, - "nodeType": "ParameterList", - "parameters": [], - "src": "339:0:1" - }, - "scope": 267, - "src": "317:89:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 232, - "nodeType": "Block", - "src": "431:33:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 227, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 381, - "src": "445:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "445:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "457:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 226, - "name": "E1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "442:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "442:17:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 231, - "nodeType": "EmitStatement", - "src": "437:22:1" - } - ] - }, - "documentation": null, - "id": 233, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 224, - "nodeType": "ParameterList", - "parameters": [], - "src": "421:2:1" - }, - "payable": false, - "returnParameters": { - "id": 225, - "nodeType": "ParameterList", - "parameters": [], - "src": "431:0:1" - }, - "scope": 267, - "src": "410:54:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 241, - "nodeType": "Block", - "src": "489:39:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "68656c6c6f", - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "503:7:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - "value": "hello" - }, - { - "argumentTypes": null, - "hexValue": "30786465616462656566", - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "512:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - }, - "value": "0xdeadbeef" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - } - ], - "id": 236, - "name": "E2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "500:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", - "typeString": "function (string memory,bytes4)" - } - }, - "id": 239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "500:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 240, - "nodeType": "EmitStatement", - "src": "495:28:1" - } - ] - }, - "documentation": null, - "id": 242, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e2", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 234, - "nodeType": "ParameterList", - "parameters": [], - "src": "479:2:1" - }, - "payable": false, - "returnParameters": { - "id": 235, - "nodeType": "ParameterList", - "parameters": [], - "src": "489:0:1" - }, - "scope": 267, - "src": "468:60:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 252, - "nodeType": "Block", - "src": "553:43:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 246, - "name": "tx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 393, - "src": "567:2:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_transaction", - "typeString": "tx" - } - }, - "id": 247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "origin", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "567:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 248, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "578:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "578:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 245, - "name": "E3", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 187, - "src": "564:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "564:27:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 251, - "nodeType": "EmitStatement", - "src": "559:32:1" - } - ] - }, - "documentation": null, - "id": 253, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e3", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 243, - "nodeType": "ParameterList", - "parameters": [], - "src": "543:2:1" - }, - "payable": false, - "returnParameters": { - "id": 244, - "nodeType": "ParameterList", - "parameters": [], - "src": "553:0:1" - }, - "scope": 267, - "src": "532:64:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 265, - "nodeType": "Block", - "src": "621:52:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 257, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 381, - "src": "635:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sig", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "635:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 260, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "654:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "654:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 259, - "name": "blockhash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 372, - "src": "644:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view returns (bytes32)" - } - }, - "id": 262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "644:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 256, - "name": "E4", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "632:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes4_$_t_bytes32_$returns$__$", - "typeString": "function (bytes4,bytes32)" - } - }, - "id": 263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "632:36:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 264, - "nodeType": "EmitStatement", - "src": "627:41:1" - } - ] - }, - "documentation": null, - "id": 266, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e4", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 254, - "nodeType": "ParameterList", - "parameters": [], - "src": "611:2:1" - }, - "payable": false, - "returnParameters": { - "id": 255, - "nodeType": "ParameterList", - "parameters": [], - "src": "621:0:1" - }, - "scope": 267, - "src": "600:73:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 268, - "src": "26:649:1" - } - ], - "src": "0:675:1" - }, - "legacyAST": { - "absolutePath": "/home/akru/hsweb3test/contracts/Linearization.sol", - "exportedSymbols": { - "Linearization": [ - 267 - ] - }, - "id": 268, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 169, - "literals": [ - "solidity", - "^", - "0.4", - ".22" - ], - "nodeType": "PragmaDirective", - "src": "0:24:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 267, - "linearizedBaseContracts": [ - 267 - ], - "name": "Linearization", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 175, - "name": "E1", - "nodeType": "EventDefinition", - "parameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 171, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 175, - "src": "63:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 170, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "63:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 173, - "indexed": false, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 175, - "src": "79:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 172, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "79:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "62:29:1" - }, - "src": "54:38:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 181, - "name": "E2", - "nodeType": "EventDefinition", - "parameters": { - "id": 180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 177, - "indexed": false, - "name": "tag", - "nodeType": "VariableDeclaration", - "scope": 181, - "src": "104:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 176, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "104:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 179, - "indexed": false, - "name": "uuid", - "nodeType": "VariableDeclaration", - "scope": 181, - "src": "116:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 178, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "116:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "103:25:1" - }, - "src": "95:34:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 187, - "name": "E3", - "nodeType": "EventDefinition", - "parameters": { - "id": 186, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 183, - "indexed": false, - "name": "txOrigin", - "nodeType": "VariableDeclaration", - "scope": 187, - "src": "141:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 182, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "141:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 185, - "indexed": false, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 187, - "src": "159:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 184, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "159:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "140:36:1" - }, - "src": "132:45:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 193, - "name": "E4", - "nodeType": "EventDefinition", - "parameters": { - "id": 192, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 189, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "189:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "typeName": { - "id": 188, - "name": "bytes4", - "nodeType": "ElementaryTypeName", - "src": "189:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 191, - "indexed": false, - "name": "blockHash", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "201:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 190, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "201:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "188:31:1" - }, - "src": "180:40:1" - }, - { - "body": { - "id": 207, - "nodeType": "Block", - "src": "246:67:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 197, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 381, - "src": "260:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "260:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 199, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "272:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 196, - "name": "E1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "257:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "257:17:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 201, - "nodeType": "EmitStatement", - "src": "252:22:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "68656c6c6f", - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "288:7:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - "value": "hello" - }, - { - "argumentTypes": null, - "hexValue": "30786465616462656566", - "id": 204, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "297:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - }, - "value": "0xdeadbeef" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - } - ], - "id": 202, - "name": "E2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "285:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", - "typeString": "function (string memory,bytes4)" - } - }, - "id": 205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "285:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 206, - "nodeType": "EmitStatement", - "src": "280:28:1" - } - ] - }, - "documentation": null, - "id": 208, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e12", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 194, - "nodeType": "ParameterList", - "parameters": [], - "src": "236:2:1" - }, - "payable": false, - "returnParameters": { - "id": 195, - "nodeType": "ParameterList", - "parameters": [], - "src": "246:0:1" - }, - "scope": 267, - "src": "224:89:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 222, - "nodeType": "Block", - "src": "339:67:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "68656c6c6f", - "id": 212, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "353:7:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - "value": "hello" - }, - { - "argumentTypes": null, - "hexValue": "30786465616462656566", - "id": 213, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "362:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - }, - "value": "0xdeadbeef" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - } - ], - "id": 211, - "name": "E2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "350:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", - "typeString": "function (string memory,bytes4)" - } - }, - "id": 214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "350:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 215, - "nodeType": "EmitStatement", - "src": "345:28:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 217, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 381, - "src": "387:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "387:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "399:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 216, - "name": "E1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "384:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:17:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 221, - "nodeType": "EmitStatement", - "src": "379:22:1" - } - ] - }, - "documentation": null, - "id": 223, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e21", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 209, - "nodeType": "ParameterList", - "parameters": [], - "src": "329:2:1" - }, - "payable": false, - "returnParameters": { - "id": 210, - "nodeType": "ParameterList", - "parameters": [], - "src": "339:0:1" - }, - "scope": 267, - "src": "317:89:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 232, - "nodeType": "Block", - "src": "431:33:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 227, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 381, - "src": "445:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "445:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "457:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 226, - "name": "E1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "442:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "442:17:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 231, - "nodeType": "EmitStatement", - "src": "437:22:1" - } - ] - }, - "documentation": null, - "id": 233, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 224, - "nodeType": "ParameterList", - "parameters": [], - "src": "421:2:1" - }, - "payable": false, - "returnParameters": { - "id": 225, - "nodeType": "ParameterList", - "parameters": [], - "src": "431:0:1" - }, - "scope": 267, - "src": "410:54:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 241, - "nodeType": "Block", - "src": "489:39:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "68656c6c6f", - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "503:7:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - "value": "hello" - }, - { - "argumentTypes": null, - "hexValue": "30786465616462656566", - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "512:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - }, - "value": "0xdeadbeef" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8", - "typeString": "literal_string \"hello\"" - }, - { - "typeIdentifier": "t_rational_3735928559_by_1", - "typeString": "int_const 3735928559" - } - ], - "id": 236, - "name": "E2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "500:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_bytes4_$returns$__$", - "typeString": "function (string memory,bytes4)" - } - }, - "id": 239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "500:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 240, - "nodeType": "EmitStatement", - "src": "495:28:1" - } - ] - }, - "documentation": null, - "id": 242, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e2", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 234, - "nodeType": "ParameterList", - "parameters": [], - "src": "479:2:1" - }, - "payable": false, - "returnParameters": { - "id": 235, - "nodeType": "ParameterList", - "parameters": [], - "src": "489:0:1" - }, - "scope": 267, - "src": "468:60:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 252, - "nodeType": "Block", - "src": "553:43:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 246, - "name": "tx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 393, - "src": "567:2:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_transaction", - "typeString": "tx" - } - }, - "id": 247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "origin", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "567:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 248, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "578:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 249, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "578:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 245, - "name": "E3", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 187, - "src": "564:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 250, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "564:27:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 251, - "nodeType": "EmitStatement", - "src": "559:32:1" - } - ] - }, - "documentation": null, - "id": 253, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e3", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 243, - "nodeType": "ParameterList", - "parameters": [], - "src": "543:2:1" - }, - "payable": false, - "returnParameters": { - "id": 244, - "nodeType": "ParameterList", - "parameters": [], - "src": "553:0:1" - }, - "scope": 267, - "src": "532:64:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 265, - "nodeType": "Block", - "src": "621:52:1", - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 257, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 381, - "src": "635:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sig", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "635:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 260, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 371, - "src": "654:5:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "654:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 259, - "name": "blockhash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 372, - "src": "644:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_blockhash_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view returns (bytes32)" - } - }, - "id": 262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "644:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 256, - "name": "E4", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 193, - "src": "632:2:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes4_$_t_bytes32_$returns$__$", - "typeString": "function (bytes4,bytes32)" - } - }, - "id": 263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "632:36:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 264, - "nodeType": "EmitStatement", - "src": "627:41:1" - } - ] - }, - "documentation": null, - "id": 266, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "e4", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 254, - "nodeType": "ParameterList", - "parameters": [], - "src": "611:2:1" - }, - "payable": false, - "returnParameters": { - "id": 255, - "nodeType": "ParameterList", - "parameters": [], - "src": "621:0:1" - }, - "scope": 267, - "src": "600:73:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 268, - "src": "26:649:1" - } - ], - "src": "0:675:1" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.1", - "updatedAt": "2018-10-17T08:27:57.791Z" -} \ No newline at end of file diff --git a/test/contracts/Registry.json b/test/contracts/Registry.json deleted file mode 100644 index 0a65b5b5..00000000 --- a/test/contracts/Registry.json +++ /dev/null @@ -1,506 +0,0 @@ -{ - "contractName": "Registry", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "listingHash", - "type": "bytes32" - } - ], - "name": "A", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "name": "listingHash", - "type": "bytes32" - } - ], - "name": "B", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "dog", - "type": "address" - }, - { - "indexed": false, - "name": "cat", - "type": "bytes32" - } - ], - "name": "C", - "type": "event" - } - ], - "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a7230582033480aa8fef567c80a4f8afd205add18d07c6a0f6991c2a4b0c2c20b8220f89b0029", - "deployedBytecode": "0x6080604052600080fd00a165627a7a7230582033480aa8fef567c80a4f8afd205add18d07c6a0f6991c2a4b0c2c20b8220f89b0029", - "sourceMap": "26:163:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:163:3;;;;;;;", - "deployedSourceMap": "26:163:3:-;;;;;", - "source": "pragma solidity ^0.4.22;\n\ncontract Registry {\n\n\n event A(bytes32 indexed listingHash);\n event B(address indexed sender, bytes32 listingHash);\n event C(address dog, bytes32 cat);\n\n}\n", - "sourcePath": "/home/akru/hsweb3test/contracts/Registry.sol", - "ast": { - "absolutePath": "/home/akru/hsweb3test/contracts/Registry.sol", - "exportedSymbols": { - "Registry": [ - 343 - ] - }, - "id": 344, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 326, - "literals": [ - "solidity", - "^", - "0.4", - ".22" - ], - "nodeType": "PragmaDirective", - "src": "0:24:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 343, - "linearizedBaseContracts": [ - 343 - ], - "name": "Registry", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 330, - "name": "A", - "nodeType": "EventDefinition", - "parameters": { - "id": 329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 328, - "indexed": true, - "name": "listingHash", - "nodeType": "VariableDeclaration", - "scope": 330, - "src": "60:27:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 327, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "60:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59:29:3" - }, - "src": "52:37:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 336, - "name": "B", - "nodeType": "EventDefinition", - "parameters": { - "id": 335, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 332, - "indexed": true, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 336, - "src": "102:22:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "102:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 334, - "indexed": false, - "name": "listingHash", - "nodeType": "VariableDeclaration", - "scope": 336, - "src": "126:19:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 333, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "126:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "101:45:3" - }, - "src": "94:53:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 342, - "name": "C", - "nodeType": "EventDefinition", - "parameters": { - "id": 341, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 338, - "indexed": false, - "name": "dog", - "nodeType": "VariableDeclaration", - "scope": 342, - "src": "160:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 337, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "160:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 340, - "indexed": false, - "name": "cat", - "nodeType": "VariableDeclaration", - "scope": 342, - "src": "173:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 339, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "173:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "159:26:3" - }, - "src": "152:34:3" - } - ], - "scope": 344, - "src": "26:163:3" - } - ], - "src": "0:190:3" - }, - "legacyAST": { - "absolutePath": "/home/akru/hsweb3test/contracts/Registry.sol", - "exportedSymbols": { - "Registry": [ - 343 - ] - }, - "id": 344, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 326, - "literals": [ - "solidity", - "^", - "0.4", - ".22" - ], - "nodeType": "PragmaDirective", - "src": "0:24:3" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 343, - "linearizedBaseContracts": [ - 343 - ], - "name": "Registry", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 330, - "name": "A", - "nodeType": "EventDefinition", - "parameters": { - "id": 329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 328, - "indexed": true, - "name": "listingHash", - "nodeType": "VariableDeclaration", - "scope": 330, - "src": "60:27:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 327, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "60:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "59:29:3" - }, - "src": "52:37:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 336, - "name": "B", - "nodeType": "EventDefinition", - "parameters": { - "id": 335, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 332, - "indexed": true, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 336, - "src": "102:22:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "102:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 334, - "indexed": false, - "name": "listingHash", - "nodeType": "VariableDeclaration", - "scope": 336, - "src": "126:19:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 333, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "126:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "101:45:3" - }, - "src": "94:53:3" - }, - { - "anonymous": false, - "documentation": null, - "id": 342, - "name": "C", - "nodeType": "EventDefinition", - "parameters": { - "id": 341, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 338, - "indexed": false, - "name": "dog", - "nodeType": "VariableDeclaration", - "scope": 342, - "src": "160:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 337, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "160:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 340, - "indexed": false, - "name": "cat", - "nodeType": "VariableDeclaration", - "scope": 342, - "src": "173:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 339, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "173:7:3", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "159:26:3" - }, - "src": "152:34:3" - } - ], - "scope": 344, - "src": "26:163:3" - } - ], - "src": "0:190:3" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.1", - "updatedAt": "2018-10-17T08:27:57.792Z" -} \ No newline at end of file diff --git a/test/contracts/SimpleStorage.json b/test/contracts/SimpleStorage.json deleted file mode 100644 index 1414362d..00000000 --- a/test/contracts/SimpleStorage.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "contractName": "SimpleStorage", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "count", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "_count", - "type": "uint256" - } - ], - "name": "_CountSet", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "_count", - "type": "uint256" - } - ], - "name": "setCount", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610113806100206000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14604e578063d14e62b8146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b806000819055507f23420683cdbc4b73b0779e0325c497f5b72b3e8a92f3882a5a754c1b9eb734ec816040518082815260200191505060405180910390a1505600a165627a7a72305820a2e06ca2fff9366521c668d197df2b9e7164abd3974f3b0d54e6690ca00798400029", - "deployedBytecode": "0x6080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14604e578063d14e62b8146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b806000819055507f23420683cdbc4b73b0779e0325c497f5b72b3e8a92f3882a5a754c1b9eb734ec816040518082815260200191505060405180910390a1505600a165627a7a72305820a2e06ca2fff9366521c668d197df2b9e7164abd3974f3b0d54e6690ca00798400029", - "sourceMap": "26:201:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:201:1;;;;;;;", - "deployedSourceMap": "26:201:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;55:17:1;;;;;;;;;;;;;;;;;;;;;;;122:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;122:103:1;;;;;;;;;;;;;;;;;;;;;;;;;;55:17;;;;:::o;122:103::-;180:6;172:5;:14;;;;201:17;211:6;201:17;;;;;;;;;;;;;;;;;;122:103;:::o", - "source": "pragma solidity ^0.4.15;\n\ncontract SimpleStorage {\n uint public count;\n \n event _CountSet(uint _count);\n \n function setCount(uint _count) external {\n count = _count;\n emit _CountSet(_count);\n }\n}\n", - "sourcePath": "/home/akru/hsweb3test/contracts/SimpleStorage.sol", - "ast": { - "absolutePath": "/home/akru/hsweb3test/contracts/SimpleStorage.sol", - "exportedSymbols": { - "SimpleStorage": [ - 190 - ] - }, - "id": 191, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 169, - "literals": [ - "solidity", - "^", - "0.4", - ".15" - ], - "nodeType": "PragmaDirective", - "src": "0:24:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 190, - "linearizedBaseContracts": [ - 190 - ], - "name": "SimpleStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 171, - "name": "count", - "nodeType": "VariableDeclaration", - "scope": 190, - "src": "55:17:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 170, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "55:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 175, - "name": "_CountSet", - "nodeType": "EventDefinition", - "parameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 173, - "indexed": false, - "name": "_count", - "nodeType": "VariableDeclaration", - "scope": 175, - "src": "99:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 172, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "99:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "98:13:1" - }, - "src": "83:29:1" - }, - { - "body": { - "id": 188, - "nodeType": "Block", - "src": "162:63:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 180, - "name": "count", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 171, - "src": "172:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 181, - "name": "_count", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 177, - "src": "180:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "172:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 183, - "nodeType": "ExpressionStatement", - "src": "172:14:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 185, - "name": "_count", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 177, - "src": "211:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 184, - "name": "_CountSet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "201:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "201:17:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 187, - "nodeType": "EmitStatement", - "src": "196:22:1" - } - ] - }, - "documentation": null, - "id": 189, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setCount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 178, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 177, - "name": "_count", - "nodeType": "VariableDeclaration", - "scope": 189, - "src": "140:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 176, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "140:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "139:13:1" - }, - "payable": false, - "returnParameters": { - "id": 179, - "nodeType": "ParameterList", - "parameters": [], - "src": "162:0:1" - }, - "scope": 190, - "src": "122:103:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 191, - "src": "26:201:1" - } - ], - "src": "0:228:1" - }, - "legacyAST": { - "absolutePath": "/home/akru/hsweb3test/contracts/SimpleStorage.sol", - "exportedSymbols": { - "SimpleStorage": [ - 190 - ] - }, - "id": 191, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 169, - "literals": [ - "solidity", - "^", - "0.4", - ".15" - ], - "nodeType": "PragmaDirective", - "src": "0:24:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 190, - "linearizedBaseContracts": [ - 190 - ], - "name": "SimpleStorage", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 171, - "name": "count", - "nodeType": "VariableDeclaration", - "scope": 190, - "src": "55:17:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 170, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "55:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 175, - "name": "_CountSet", - "nodeType": "EventDefinition", - "parameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 173, - "indexed": false, - "name": "_count", - "nodeType": "VariableDeclaration", - "scope": 175, - "src": "99:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 172, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "99:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "98:13:1" - }, - "src": "83:29:1" - }, - { - "body": { - "id": 188, - "nodeType": "Block", - "src": "162:63:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 180, - "name": "count", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 171, - "src": "172:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 181, - "name": "_count", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 177, - "src": "180:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "172:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 183, - "nodeType": "ExpressionStatement", - "src": "172:14:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 185, - "name": "_count", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 177, - "src": "211:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 184, - "name": "_CountSet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 175, - "src": "201:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "201:17:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 187, - "nodeType": "EmitStatement", - "src": "196:22:1" - } - ] - }, - "documentation": null, - "id": 189, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "setCount", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 178, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 177, - "name": "_count", - "nodeType": "VariableDeclaration", - "scope": 189, - "src": "140:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 176, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "140:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "139:13:1" - }, - "payable": false, - "returnParameters": { - "id": 179, - "nodeType": "ParameterList", - "parameters": [], - "src": "162:0:1" - }, - "scope": 190, - "src": "122:103:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 191, - "src": "26:201:1" - } - ], - "src": "0:228:1" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.1", - "updatedAt": "2018-10-17T08:28:45.992Z" -} \ No newline at end of file From 7578494980d99b6895c65b0e100dbc722c42123b Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 17 Oct 2020 17:19:12 +0300 Subject: [PATCH 157/237] Updated CHANGELOG --- .github/workflows/testing.yml | 2 +- CHANGELOG.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 3405d42c..08637407 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -9,7 +9,7 @@ jobs: name: Haskell Web3 tests on ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - nameuses: actions/setup-haskell@v1 + - uses: actions/setup-haskell@v1 with: enable-stack: true stack-version: 'latest' diff --git a/CHANGELOG.md b/CHANGELOG.md index 72383395..f3563c51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## [1.0.0.0] 2020-10-00 +### Changed +- Library splitted for multiple independent packages + ## [0.9.1.0] 2020-06-07 ### Added - SCALE codec implementation and tests From e25c18736868023f2d24569841311448eaa1ce5c Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 17 Oct 2020 17:26:06 +0300 Subject: [PATCH 158/237] Added CI badge --- .github/workflows/testing.yml | 4 ++-- README.md | 2 +- packages/ethereum/src/Network/Ethereum/Account.hs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 08637407..ea282db7 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,12 +1,12 @@ on: [push] name: Testing jobs: - test: + unit-tests: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - name: Haskell Web3 tests on ${{ matrix.os }} + name: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - uses: actions/setup-haskell@v1 diff --git a/README.md b/README.md index f8ebb548..5e0675fb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Web3 API for Haskell This library implements Haskell API client for popular Web3 platforms. [![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) -[![Build Status](https://travis-ci.org/airalab/hs-web3.svg?branch=master)](https://travis-ci.org/airalab/hs-web3) +[![Testing](https://github.com/airalab/hs-web3/workflows/Testing/badge.svg)](https://github.com/airalab/hs-web3/actions) [![Hackage Matrix](https://matrix.hackage.haskell.org/api/v2/packages/web3/badge)](https://matrix.hackage.haskell.org/package/web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) [![LTS-14](http://stackage.org/package/web3/badge/lts-14)](http://stackage.org/lts-14/package/web3) diff --git a/packages/ethereum/src/Network/Ethereum/Account.hs b/packages/ethereum/src/Network/Ethereum/Account.hs index 09121c9f..9f7a7877 100644 --- a/packages/ethereum/src/Network/Ethereum/Account.hs +++ b/packages/ethereum/src/Network/Ethereum/Account.hs @@ -32,7 +32,7 @@ module Network.Ethereum.Account , LocalKeyAccount , LocalKey(..) - -- * Transaction paramitrization function and lenses + -- * Transaction parameterization function and lenses , withParam , to , value From 0130ed6ca2b6a02cb833948b1cdfcea451066273 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 18 Oct 2020 09:01:07 +0300 Subject: [PATCH 159/237] Added web3-provider package --- examples/polkadot/package.yaml | 2 +- packages/polkadot/src/Network/Polkadot.hs | 15 ++ packages/provider/LICENSE | 211 ++++++++++++++++++ packages/provider/Setup.hs | 2 + packages/provider/package.yaml | 53 +++++ .../src/Network/Web3/Provider.hs | 0 packages/web3/package.yaml | 13 +- packages/web3/src/Network/Web3.hs | 5 + stack.yaml | 1 + 9 files changed, 291 insertions(+), 11 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot.hs create mode 100644 packages/provider/LICENSE create mode 100644 packages/provider/Setup.hs create mode 100644 packages/provider/package.yaml rename packages/{web3 => provider}/src/Network/Web3/Provider.hs (100%) diff --git a/examples/polkadot/package.yaml b/examples/polkadot/package.yaml index e57226ea..539642c0 100644 --- a/examples/polkadot/package.yaml +++ b/examples/polkadot/package.yaml @@ -10,7 +10,7 @@ category: Network dependencies: - base -- web3 +- web3-provider - web3-polkadot executables: diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs new file mode 100644 index 00000000..b2b18e48 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -0,0 +1,15 @@ +-- | +-- Module : Network.Polkadot +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- A scalable, interoperable & secure network protocol for the next web. +-- + +module Network.Polkadot + ( + ) where diff --git a/packages/provider/LICENSE b/packages/provider/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/provider/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/provider/Setup.hs b/packages/provider/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/provider/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml new file mode 100644 index 00000000..9c7404cf --- /dev/null +++ b/packages/provider/package.yaml @@ -0,0 +1,53 @@ +name: web3-provider +version: 1.0.0.0 +synopsis: Node connection provider for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- mtl >2.2 && <2.3 +- text >1.2 && <1.3 +- async >2.1 && <2.3 +- network >2.5 && <3.2 +- websockets >0.10 && <0.13 +- exceptions >0.8 && <0.11 +- http-client >0.5 && <0.7 +- data-default >0.7 && <0.8 +- transformers >0.5 && <0.6 +- web3-jsonrpc >=1.0 && <1.1 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src diff --git a/packages/web3/src/Network/Web3/Provider.hs b/packages/provider/src/Network/Web3/Provider.hs similarity index 100% rename from packages/web3/src/Network/Web3/Provider.hs rename to packages/provider/src/Network/Web3/Provider.hs diff --git a/packages/web3/package.yaml b/packages/web3/package.yaml index 69494fe9..bb465ad8 100644 --- a/packages/web3/package.yaml +++ b/packages/web3/package.yaml @@ -12,16 +12,9 @@ category: Network dependencies: - base >4.11 && <4.14 -- mtl >2.2 && <2.3 -- text >1.2 && <1.3 -- async >2.1 && <2.3 -- network >2.5 && <3.2 -- websockets >0.10 && <0.13 -- exceptions >0.8 && <0.11 -- http-client >0.5 && <0.7 -- data-default >0.7 && <0.8 -- transformers >0.5 && <0.6 -- web3-jsonrpc >=1.0 && <1.1 +- web3-provider >=1.0 && <1.1 +- web3-ethereum >=1.0 && <1.1 +- web3-polkadot >=1.0 && <1.1 ghc-options: - -funbox-strict-fields diff --git a/packages/web3/src/Network/Web3.hs b/packages/web3/src/Network/Web3.hs index caaf2155..1953b998 100644 --- a/packages/web3/src/Network/Web3.hs +++ b/packages/web3/src/Network/Web3.hs @@ -15,6 +15,11 @@ module Network.Web3 -- * Web3 library uses JSON-RPC over WebSocket/HTTP(S) to access node functionality. Web3 , runWeb3 + -- * Re-export popular Web3 platforms. + , module Network.Ethereum + , module Network.Polkadot ) where +import Network.Ethereum +import Network.Polkadot import Network.Web3.Provider (Web3, runWeb3) diff --git a/stack.yaml b/stack.yaml index d4f050df..c4c36f0e 100644 --- a/stack.yaml +++ b/stack.yaml @@ -8,6 +8,7 @@ packages: - 'packages/scale' - 'packages/crypto' - 'packages/jsonrpc' +- 'packages/provider' - 'packages/solidity' - 'packages/ethereum' - 'packages/polkadot' From 69e0751de0b75a46f1dbfd03598cfe0885784ae8 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 19 Oct 2020 10:30:05 +0300 Subject: [PATCH 160/237] Added QQ loaders for hexstring type --- packages/hexstring/package.yaml | 1 + .../hexstring/src/Data/ByteArray/HexString.hs | 34 +++++++++++++------ 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index 9f1f444e..b8ba17b2 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -16,6 +16,7 @@ dependencies: - aeson >1.2 && <1.5 - memory >0.14 && <0.16 - bytestring >0.10 && <0.11 +- template-haskell >2.11 && <2.16 ghc-options: - -funbox-strict-fields diff --git a/packages/hexstring/src/Data/ByteArray/HexString.hs b/packages/hexstring/src/Data/ByteArray/HexString.hs index 21987ac6..51dca569 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString.hs @@ -1,5 +1,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} +{-# LANGUAGE TemplateHaskell #-} -- | -- Module : Data.ByteArray.HexString @@ -15,16 +17,17 @@ module Data.ByteArray.HexString where -import Data.Aeson (FromJSON (..), ToJSON (..), - Value (String), withText) -import Data.ByteArray (ByteArray, ByteArrayAccess, convert) -import qualified Data.ByteArray as BA (drop, take) -import Data.ByteArray.Encoding (Base (Base16), convertFromBase, - convertToBase) -import Data.ByteString (ByteString) -import Data.String (IsString (..)) -import Data.Text (Text) -import Data.Text.Encoding (decodeUtf8, encodeUtf8) +import Data.Aeson (FromJSON (..), ToJSON (..), + Value (String), withText) +import Data.ByteArray (ByteArray, ByteArrayAccess, convert) +import qualified Data.ByteArray as BA (drop, take) +import Data.ByteArray.Encoding (Base (Base16), convertFromBase, + convertToBase) +import Data.ByteString (ByteString) +import Data.String (IsString (..)) +import Data.Text (Text) +import Data.Text.Encoding (decodeUtf8, encodeUtf8) +import Language.Haskell.TH.Quote (QuasiQuoter (..), quoteFile) -- | Represents a Hex string. Guarantees that all characters it contains -- are valid hex characters. @@ -65,3 +68,14 @@ toBytes = convert . unHexString -- | Access to a 'Text' representation of the 'HexString' toText :: HexString -> Text toText = ("0x" <>) . decodeUtf8 . convertToBase Base16 . unHexString + +hexFrom :: QuasiQuoter +hexFrom = quoteFile hex + +hex :: QuasiQuoter +hex = QuasiQuoter + { quoteExp = \s -> [|fromString s :: HexString|] + , quotePat = undefined + , quoteType = undefined + , quoteDec = undefined + } From e1c287830e1566ea762f1eb3f76ef2c4a1073245 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 19 Oct 2020 16:28:17 +0300 Subject: [PATCH 161/237] Added Text and ByteString scale codecs --- packages/scale/package.yaml | 2 + packages/scale/src/Codec/Scale.hs | 1 + packages/scale/src/Codec/Scale/Core.hs | 42 ++++++++++++++++--- .../scale/tests/Codec/Scale/Test/CoreSpec.hs | 8 +++- .../Codec/Scale/Test/SingleFieldStructSpec.hs | 1 - .../scale/tests/Codec/Scale/Test/SkipSpec.hs | 1 - 6 files changed, 45 insertions(+), 10 deletions(-) diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index e92d407f..49978d3a 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -12,10 +12,12 @@ category: Network dependencies: - base >4.11 && <4.14 +- text >1.2 && <1.3 - cereal >0.5 && <0.6 - bitvec >1.0 && <2.0 - vector >0.12 && <0.13 - memory >0.14 && <0.16 +- bytestring >0.10 && <0.11 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 - template-haskell >2.11 && <2.16 diff --git a/packages/scale/src/Codec/Scale.hs b/packages/scale/src/Codec/Scale.hs index 7e620105..01776c92 100644 --- a/packages/scale/src/Codec/Scale.hs +++ b/packages/scale/src/Codec/Scale.hs @@ -25,6 +25,7 @@ module Codec.Scale , decode' , Encode , Decode + , Generic , module Core ) where diff --git a/packages/scale/src/Codec/Scale/Core.hs b/packages/scale/src/Codec/Scale/Core.hs index 0acc3aa7..09e93821 100644 --- a/packages/scale/src/Codec/Scale/Core.hs +++ b/packages/scale/src/Codec/Scale/Core.hs @@ -18,13 +18,17 @@ module Codec.Scale.Core (Compact(..)) where import Control.Monad (replicateM) import Data.Bit (Bit, castFromWords8, cloneToWords8) +import Data.ByteString (ByteString) +import qualified Data.ByteString as BS (length) import Data.Int (Int16, Int32, Int64, Int8) -import Data.Serialize.Get (getInt16le, getInt32le, getInt64le, - getInt8, getWord16le, getWord32le, - getWord64le, getWord8) -import Data.Serialize.Put (putInt16le, putInt32le, putInt64le, - putInt8, putWord16le, putWord32le, - putWord64le, putWord8) +import Data.Serialize.Get (getByteString, getInt16le, getInt32le, + getInt64le, getInt8, getWord16le, + getWord32le, getWord64le, getWord8) +import Data.Serialize.Put (putByteString, putInt16le, putInt32le, + putInt64le, putInt8, putWord16le, + putWord32le, putWord64le, putWord8) +import Data.Text (Text) +import Data.Text.Encoding (decodeUtf8', encodeUtf8) import Data.Vector.Unboxed (Unbox, Vector) import qualified Data.Vector.Unboxed as V import Data.Word (Word16, Word32, Word64, Word8) @@ -195,3 +199,29 @@ instance {-# OVERLAPPING #-} Decode (Vector Bit) where get = do len <- get castFromWords8 <$> V.replicateM (unCompact len) get + +instance Encode ByteString where + put bs = do + put (Compact $ BS.length bs) + putByteString bs + +instance Decode ByteString where + get = do + len <- get + getByteString (unCompact len) + +-- +-- Text type instances. +-- + +instance Encode Text where + put str = do + let encoded = encodeUtf8 str + put (Compact $ BS.length encoded) + putByteString encoded + +instance Decode Text where + get = do + len <- get + str <- getByteString (unCompact len) + either (fail . show) return (decodeUtf8' str) diff --git a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs index 2a5fe8d1..ac3d30dc 100644 --- a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs @@ -22,12 +22,12 @@ import Control.Monad (forM_) import Data.Bit (castFromWords8) import Data.Bits (bit) import Data.ByteString (ByteString) -import qualified Data.ByteString as BS (length, unpack) +import qualified Data.ByteString as BS (length, pack, unpack) import Data.Int (Int16, Int32, Int64, Int8) +import qualified Data.Text as T (pack, unpack) import Data.Vector.Unboxed (Vector) import qualified Data.Vector.Unboxed as V (fromList) import Data.Word (Word16, Word32, Word64, Word8) -import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) import Test.Hspec import Test.Hspec.QuickCheck @@ -133,6 +133,10 @@ spec = parallel $ do prop "BitVec" $ \(v :: [Word8]) -> decode (encode $ castFromWords8 $ V.fromList v :: ByteString) == Right v + prop "ByteString" $ \(v :: [Word8]) -> decode (encode (BS.pack v) :: ByteString) == Right (BS.pack v) + + prop "Text" $ \(v :: String) -> decode (encode (T.pack v) :: ByteString) == Right (T.pack v) + prop "List" $ \(v :: [Word64]) -> decode (encode v :: ByteString) == Right v prop "List" $ \(v :: [Word32]) -> decode (encode v :: ByteString) == Right v prop "List" $ \(v :: [Word16]) -> decode (encode v :: ByteString) == Right v diff --git a/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs b/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs index 546ff7e1..0fc011dd 100644 --- a/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs @@ -20,7 +20,6 @@ module Codec.Scale.Test.SingleFieldStructSpec where import Data.ByteString as BS (pack) import Data.Default (def) import Data.Word (Word32, Word64) -import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) import Test.Hspec diff --git a/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs index d3ad29ad..ec33aeb9 100644 --- a/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs @@ -19,7 +19,6 @@ module Codec.Scale.Test.SkipSpec where import Data.Default (Default) import Data.Word (Word32) -import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) import Test.Hspec From bbb32ddf5cb4070b0bbd06ac33e51b9e96587e81 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 19 Oct 2020 16:44:58 +0300 Subject: [PATCH 162/237] Added metadata v9 types & codec --- .../src/Network/Polkadot/Api/State.hs | 6 +- .../src/Network/Polkadot/Api/Types.hs | 2 - .../polkadot/src/Network/Polkadot/Metadata.hs | 59 ++++++++++ .../Network/Polkadot/Metadata/MagicNumber.hs | 39 +++++++ .../src/Network/Polkadot/Metadata/V10.hs | 22 ++++ .../src/Network/Polkadot/Metadata/V11.hs | 22 ++++ .../src/Network/Polkadot/Metadata/V12.hs | 22 ++++ .../src/Network/Polkadot/Metadata/V9.hs | 106 ++++++++++++++++++ 8 files changed, 273 insertions(+), 5 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/V10.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/V11.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/V12.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/V9.hs diff --git a/packages/polkadot/src/Network/Polkadot/Api/State.hs b/packages/polkadot/src/Network/Polkadot/Api/State.hs index 33dd24b9..01d6b80e 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/State.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/State.hs @@ -19,8 +19,8 @@ import Data.Text (Text) import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) -import Network.Polkadot.Api.Types (Metadata, ReadProof, - RuntimeVersion, StorageChangeSet) +import Network.Polkadot.Api.Types (ReadProof, RuntimeVersion, + StorageChangeSet) -- | Perform a call to a builtin on the chain. call :: JsonRpc m @@ -109,7 +109,7 @@ getKeys :: JsonRpc m getKeys = remote "state_getKeys" -- | Returns the runtime metadata. -getMetadata :: JsonRpc m => m Metadata +getMetadata :: JsonRpc m => m HexString {-# INLINE getMetadata #-} getMetadata = remote "state_getMetadata" diff --git a/packages/polkadot/src/Network/Polkadot/Api/Types.hs b/packages/polkadot/src/Network/Polkadot/Api/Types.hs index e24e368a..2aaa1a67 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Types.hs +++ b/packages/polkadot/src/Network/Polkadot/Api/Types.hs @@ -116,8 +116,6 @@ data ContractExecResult = SuccessExec $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 4 }) ''ContractExecResult) -type Metadata = Value - -- | ReadProof struct returned by RPC. data ReadProof = ReadProof { readProofAt :: HexString diff --git a/packages/polkadot/src/Network/Polkadot/Metadata.hs b/packages/polkadot/src/Network/Polkadot/Metadata.hs new file mode 100644 index 00000000..7a5e363b --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata.hs @@ -0,0 +1,59 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} + +-- | +-- Module : Network.Polkadot.Metadata +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Node runtime type information. +-- + +module Network.Polkadot.Metadata where + +import Codec.Scale (Decode, Encode, Generic) +import qualified GHC.Generics as GHC (Generic) +import Network.Polkadot.Metadata.MagicNumber (MagicNumber) +import Network.Polkadot.Metadata.V10 (MetadataV10) +import Network.Polkadot.Metadata.V11 (MetadataV11) +import Network.Polkadot.Metadata.V12 (MetadataV12) +import Network.Polkadot.Metadata.V9 (MetadataV9) + +-- | The versioned runtime metadata as a decoded structure. +data Metadata = MetadataVersioned MagicNumber MetadataAll + deriving (Eq, Show, Generic, GHC.Generic, Decode, Encode) + +-- | All supported metadata versions as enum. +-- +-- It could have troubles of decoding for metadata V9 because of hack: +-- https://github.com/polkadot-js/api/commit/a9211690be6b68ad6c6dad7852f1665cadcfa5b2 +data MetadataAll + = V0 | V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 -- Not used + | V9 MetadataV9 + | V10 MetadataV10 + | V11 MetadataV11 + | V12 MetadataV12 + deriving (Eq, Show, Generic, GHC.Generic, Decode, Encode) + +isV9 :: Metadata -> Bool +isV9 (MetadataVersioned _ (V9 _)) = True +isV9 _ = False + +isV10 :: Metadata -> Bool +isV10 (MetadataVersioned _ (V10 _)) = True +isV10 _ = False + +isV11 :: Metadata -> Bool +isV11 (MetadataVersioned _ (V11 _)) = True +isV11 _ = False + +isV12 :: Metadata -> Bool +isV12 (MetadataVersioned _ (V12 _)) = True +isV12 _ = False + +isLatest :: Metadata -> Bool +isLatest = isV12 diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs new file mode 100644 index 00000000..b48b1abb --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs @@ -0,0 +1,39 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} + +-- | +-- Module : Network.Polkadot.Metadata.MagicNumber +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Metadata V9 data type. +-- + +module Network.Polkadot.Metadata.MagicNumber where + +import Codec.Scale.Class (Decode (..), Encode (..)) +import Codec.Scale.Core () +import Control.Monad (when) +import Data.Word (Word32) + +-- | `meta`, reversed for Little Endian encoding +magic_number :: Word32 +magic_number = 0x6174656d + +-- | 32-bit prefix magic sentence. +data MagicNumber = MagicNumber + deriving (Eq, Show) + +instance Decode MagicNumber where + get = do + n <- get + when (n /= magic_number) $ + fail "Bad magic number" + return MagicNumber + +instance Encode MagicNumber where + put _ = put magic_number diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs new file mode 100644 index 00000000..68ffe5a7 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} + +-- | +-- Module : Network.Polkadot.Metadata.V10 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Metadata V10 data type. +-- + +module Network.Polkadot.Metadata.V10 where + +import Codec.Scale (Decode, Encode, Generic) +import qualified GHC.Generics as GHC (Generic) + +data MetadataV10 = MetadataV10 + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs new file mode 100644 index 00000000..23e8dd75 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} + +-- | +-- Module : Network.Polkadot.Metadata.V11 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Metadata V11 data type. +-- + +module Network.Polkadot.Metadata.V11 where + +import Codec.Scale (Decode, Encode, Generic) +import qualified GHC.Generics as GHC (Generic) + +data MetadataV11 = MetadataV11 + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs new file mode 100644 index 00000000..027c0aaa --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} + +-- | +-- Module : Network.Polkadot.Metadata.V12 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Metadata V12 data type. +-- + +module Network.Polkadot.Metadata.V12 where + +import Codec.Scale (Decode, Encode, Generic) +import qualified GHC.Generics as GHC (Generic) + +data MetadataV12 = MetadataV12 + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs new file mode 100644 index 00000000..7f9e5b2f --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs @@ -0,0 +1,106 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} + +-- | +-- Module : Network.Polkadot.Metadata.V9 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Metadata V9 data type. +-- + +module Network.Polkadot.Metadata.V9 where + +import Codec.Scale (Decode, Encode, Generic) +import Data.ByteString (ByteString) +import Data.Text (Text) +import qualified GHC.Generics as GHC (Generic) + +-- TODO +type Type = Text + +data MetadataV9 = MetadataV9 [ModuleMetadataV9] + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data ModuleMetadataV9 = ModuleMetadataV9 + { moduleName :: Text + , moduleStorage :: Maybe StorageMetadataV9 + , moduleCalls :: Maybe [FunctionMetadataV9] + , moduleEvents :: Maybe [EventMetadataV9] + , moduleConstants :: [ModuleConstantMetadataV9] + , moduleErrors :: [ErrorMetadataV9] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data StorageMetadataV9 = StorageMetadataV9 + { storagePrefix :: Text + , storageItems :: [StorageEntryMetadataV9] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data StorageEntryMetadataV9 = StorageEntryMetadataV9 + { entryName :: Text + , entryModifier :: StorageEntryModifierV9 + , entryType :: StorageEntryTypeV9 + , entryFallback :: ByteString + , entryDocumentation :: [Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data StorageEntryModifierV9 = OptionalModifier + | DefaultModifier + | RequiredModifier + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data StorageEntryTypeV9 = PlainType Type + | MapType MapTypeV9 + | DoubleMapType DoubleMapTypeV9 + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data MapTypeV9 = MapTypeV9 + { mapHasher :: StorageHasherV9 + , mapKey :: Type + , mapValue :: Type + , mapLinked :: Bool + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data DoubleMapTypeV9 = DoubleMapTypeV9 + { doubleMapHasher :: StorageHasherV9 + , doubleMapKey1 :: Type + , doubleMapKey2 :: Type + , doubleMapValue :: Type + , doubleMapKey2Hasher :: StorageHasherV9 + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data StorageHasherV9 = Blake2128 | Blake2256 | Twox128 | Twox256 | Twox64Concat + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data FunctionMetadataV9 = FunctionMetadataV9 + { functionName :: Text + , functionArgs :: [FunctionArgumentMetadataV9] + , functionDocumentation :: [Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data FunctionArgumentMetadataV9 = FunctionArgumentMetadataV9 + { argumentName :: Text + , argumentType :: Type + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data EventMetadataV9 = EventMetadataV9 + { eventName :: Text + , eventArgs :: [Type] + , eventDocumentation :: [Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data ModuleConstantMetadataV9 = ModuleConstantMetadataV9 + { constantName :: Text + , constantType :: Type + , constantValue :: ByteString + , constantDocumentation :: [Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data ErrorMetadataV9 = ErrorMetadataV9 + { errorName :: Text + , errorDocumentation :: [Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) From 37f6a0649cc8623156f288a3f24016fef72a7ac8 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 21 Oct 2020 10:24:15 +0300 Subject: [PATCH 163/237] Add CI build cache --- .github/workflows/main.yml | 41 +++++++++++++++++++++++++++++++++++ .github/workflows/testing.yml | 16 -------------- README.md | 2 +- 3 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..c24696cd --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,41 @@ +name: Main + +on: + pull_request: {} + push: + branches: + - master + - rc/* + +jobs: + Tests: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Setup latest stack + uses: actions/setup-haskell@v1 + with: + enable-stack: true + stack-version: 'latest' + + - name: Cache .stack-root + uses: actions/cache@v1 + env: + cache-name: stack-root + with: + path: .stack-root + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('stack.yaml') }} + + - name: Test + shell: bash + run: | + set -ex + export STACK_ROOT=$(pwd)/.stack-root + stack test --haddock --no-haddock-deps diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml deleted file mode 100644 index ea282db7..00000000 --- a/.github/workflows/testing.yml +++ /dev/null @@ -1,16 +0,0 @@ -on: [push] -name: Testing -jobs: - unit-tests: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - name: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1 - with: - enable-stack: true - stack-version: 'latest' - - run: stack test diff --git a/README.md b/README.md index 5e0675fb..0bdb9483 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Web3 API for Haskell This library implements Haskell API client for popular Web3 platforms. [![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) -[![Testing](https://github.com/airalab/hs-web3/workflows/Testing/badge.svg)](https://github.com/airalab/hs-web3/actions) +[![CI](https://github.com/airalab/hs-web3/workflows/Main/badge.svg)](https://github.com/airalab/hs-web3/actions) [![Hackage Matrix](https://matrix.hackage.haskell.org/api/v2/packages/web3/badge)](https://matrix.hackage.haskell.org/package/web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) [![LTS-14](http://stackage.org/package/web3/badge/lts-14)](http://stackage.org/lts-14/package/web3) From d61195aab9c8e4bfcb5384ba3ec294855d9945f7 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 21 Oct 2020 10:31:11 +0300 Subject: [PATCH 164/237] Init web3-polkadot tests --- .github/workflows/{main.yml => ci.yml} | 4 +- README.md | 2 +- examples/scale/Main.hs | 1 - packages/polkadot/package.yaml | 18 +++++++ .../Network/Polkadot/Test/MetadataSpec.hs | 51 +++++++++++++++++++ packages/polkadot/tests/Spec.hs | 1 + 6 files changed, 73 insertions(+), 4 deletions(-) rename .github/workflows/{main.yml => ci.yml} (95%) create mode 100644 packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs create mode 100644 packages/polkadot/tests/Spec.hs diff --git a/.github/workflows/main.yml b/.github/workflows/ci.yml similarity index 95% rename from .github/workflows/main.yml rename to .github/workflows/ci.yml index c24696cd..7dda1e7d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Main +name: CI on: pull_request: {} @@ -9,7 +9,7 @@ on: jobs: Tests: - name: ${{ matrix.os }} + name: Test ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: diff --git a/README.md b/README.md index 0bdb9483..1dff31e1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Web3 API for Haskell This library implements Haskell API client for popular Web3 platforms. [![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) -[![CI](https://github.com/airalab/hs-web3/workflows/Main/badge.svg)](https://github.com/airalab/hs-web3/actions) +[![CI](https://github.com/airalab/hs-web3/workflows/CI/badge.svg)](https://github.com/airalab/hs-web3/actions) [![Hackage Matrix](https://matrix.hackage.haskell.org/api/v2/packages/web3/badge)](https://matrix.hackage.haskell.org/package/web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) [![LTS-14](http://stackage.org/package/web3/badge/lts-14)](http://stackage.org/lts-14/package/web3) diff --git a/examples/scale/Main.hs b/examples/scale/Main.hs index e058cece..b75c8074 100644 --- a/examples/scale/Main.hs +++ b/examples/scale/Main.hs @@ -6,7 +6,6 @@ import Codec.Scale import Codec.Scale.Skip import Data.ByteArray.HexString (HexString) import Data.Word (Word32) -import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) data MyTransaction a = Tx diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index e661118f..81715398 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -15,6 +15,8 @@ dependencies: - text >1.2 && <1.3 - aeson >1.2 && <1.5 - microlens >0.4 && <0.5 +- bytestring >0.10 && <0.11 +- web3-scale >=1.0 && <1.1 - web3-jsonrpc >=1.0 && <1.1 - web3-hexstring >=1.0 && <1.1 @@ -46,3 +48,19 @@ ghc-options: library: source-dirs: src + +tests: + tests: + main: Spec.hs + source-dirs: + - tests + - src + dependencies: + - hspec-expectations >=0.8.2 && <0.9 + - hspec-discover >=2.4.4 && <2.8 + - hspec-contrib >=0.4.0 && <0.6 + - hspec >=2.4.4 && <2.8 + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs new file mode 100644 index 00000000..83bac0c7 --- /dev/null +++ b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs @@ -0,0 +1,51 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} + +-- | +-- Module : Codec.Scale.Test.CoreSpec +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Polkadot metadata tests ported from: +-- https://github.com/polkadot-js/api/tree/master/packages/metadata/src/Metadata +-- + +module Network.Polkadot.Test.MetadataSpec where + +import Codec.Scale (decode) +import Data.ByteArray.HexString (HexString, hexFrom) +import Network.Polkadot.Metadata +import Network.Polkadot.Metadata.MagicNumber +import Network.Polkadot.Metadata.V9 +import Test.Hspec + +spec :: Spec +spec = parallel $ do + describe "Metadata magic" $ do + let empty_metadata = "0x6d65746109" :: HexString + wrong_version = "0x6d657461ff" :: HexString + wrong_magic = "0x6d64746110" :: HexString + + it "succeeds when the magic number matches" $ + let magic = decode empty_metadata + in magic `shouldBe` Right MagicNumber + + it "fails when the magic number mismatches" $ + let error_str = decode wrong_magic :: Either String Metadata + in error_str `shouldBe` Left "Failed reading: Bad magic number\nEmpty call stack\n" + + it "fails when version out of scope" $ + let error_str = decode wrong_version :: Either String Metadata + in error_str `shouldBe` Left "Failed reading: wrong prefix during enum decoding\nEmpty call stack\n" + +{- + describe "Metadata V9" $ do + it "succeeds decode from static hex" $ + let meta_v9 = [hexFrom|tests/meta/v9.hex|] + in decode meta_v9 `shouldBe` Right (MetadataVersioned MagicNumber (V9 _)) +-} + diff --git a/packages/polkadot/tests/Spec.hs b/packages/polkadot/tests/Spec.hs new file mode 100644 index 00000000..a824f8c3 --- /dev/null +++ b/packages/polkadot/tests/Spec.hs @@ -0,0 +1 @@ +{-# OPTIONS_GHC -F -pgmF hspec-discover #-} From 10e54208528329967bcc212ad57e4dd0b957e9f9 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 21 Oct 2020 17:55:10 +0300 Subject: [PATCH 165/237] Add scale codec instances for web3-hexstring --- packages/hexstring/package.yaml | 1 + packages/hexstring/src/Data/ByteArray/HexString.hs | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index b8ba17b2..b4388f50 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -17,6 +17,7 @@ dependencies: - memory >0.14 && <0.16 - bytestring >0.10 && <0.11 - template-haskell >2.11 && <2.16 +- web3-scale >=1.0 && <1.1 ghc-options: - -funbox-strict-fields diff --git a/packages/hexstring/src/Data/ByteArray/HexString.hs b/packages/hexstring/src/Data/ByteArray/HexString.hs index 51dca569..894ece3f 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString.hs @@ -17,6 +17,8 @@ module Data.ByteArray.HexString where +import Codec.Scale.Class (Decode (..), Encode (..)) +import Codec.Scale.Core () import Data.Aeson (FromJSON (..), ToJSON (..), Value (String), withText) import Data.ByteArray (ByteArray, ByteArrayAccess, convert) @@ -32,7 +34,7 @@ import Language.Haskell.TH.Quote (QuasiQuoter (..), quoteFile) -- | Represents a Hex string. Guarantees that all characters it contains -- are valid hex characters. newtype HexString = HexString { unHexString :: ByteString } - deriving (Eq, Ord, Semigroup, Monoid, ByteArrayAccess, ByteArray) + deriving (Eq, Ord, Semigroup, Monoid, ByteArrayAccess, ByteArray) instance Show HexString where show = ("HexString " ++) . show . toText @@ -49,6 +51,12 @@ instance FromJSON HexString where instance ToJSON HexString where toJSON = String . toText +instance Decode HexString where + get = HexString <$> get + +instance Encode HexString where + put = put . unHexString + -- | Smart constructor which trims '0x' and validates length is even. hexString :: ByteArray ba => ba -> Either String HexString hexString bs = HexString <$> convertFromBase Base16 bs' From 954a7795ace2b63af5ea3e35c211b2bc93fd653c Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 21 Oct 2020 17:56:10 +0300 Subject: [PATCH 166/237] Added polkadot metadata scale and JSON codecs --- .../polkadot/src/Network/Polkadot/Metadata.hs | 58 +++--- .../Network/Polkadot/Metadata/MagicNumber.hs | 12 ++ .../src/Network/Polkadot/Metadata/Types.hs | 19 ++ .../src/Network/Polkadot/Metadata/V10.hs | 103 +++++++++- .../src/Network/Polkadot/Metadata/V11.hs | 114 ++++++++++- .../src/Network/Polkadot/Metadata/V12.hs | 48 ++++- .../src/Network/Polkadot/Metadata/V9.hs | 180 +++++++++++------- 7 files changed, 425 insertions(+), 109 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/Types.hs diff --git a/packages/polkadot/src/Network/Polkadot/Metadata.hs b/packages/polkadot/src/Network/Polkadot/Metadata.hs index 7a5e363b..a9b613d4 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TemplateHaskell #-} -- | -- Module : Network.Polkadot.Metadata @@ -16,44 +17,53 @@ module Network.Polkadot.Metadata where import Codec.Scale (Decode, Encode, Generic) +import Data.Aeson (defaultOptions) +import Data.Aeson.TH (deriveJSON) import qualified GHC.Generics as GHC (Generic) -import Network.Polkadot.Metadata.MagicNumber (MagicNumber) -import Network.Polkadot.Metadata.V10 (MetadataV10) -import Network.Polkadot.Metadata.V11 (MetadataV11) -import Network.Polkadot.Metadata.V12 (MetadataV12) -import Network.Polkadot.Metadata.V9 (MetadataV9) --- | The versioned runtime metadata as a decoded structure. -data Metadata = MetadataVersioned MagicNumber MetadataAll - deriving (Eq, Show, Generic, GHC.Generic, Decode, Encode) +import Network.Polkadot.Metadata.MagicNumber (MagicNumber) +import qualified Network.Polkadot.Metadata.V10 as V10 (Metadata) +import qualified Network.Polkadot.Metadata.V11 as V11 (Metadata) +import qualified Network.Polkadot.Metadata.V12 as V12 (Metadata) +import qualified Network.Polkadot.Metadata.V9 as V9 (Metadata) -- | All supported metadata versions as enum. -- -- It could have troubles of decoding for metadata V9 because of hack: -- https://github.com/polkadot-js/api/commit/a9211690be6b68ad6c6dad7852f1665cadcfa5b2 -data MetadataAll - = V0 | V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 -- Not used - | V9 MetadataV9 - | V10 MetadataV10 - | V11 MetadataV11 - | V12 MetadataV12 +data MetadataVersioned + = V0 | V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 -- Not defined + | V9 V9.Metadata + | V10 V10.Metadata + | V11 V11.Metadata + | V12 V12.Metadata deriving (Eq, Show, Generic, GHC.Generic, Decode, Encode) +$(deriveJSON defaultOptions ''MetadataVersioned) + +-- | The versioned runtime metadata as a decoded structure. +data Metadata = Metadata + { magicNumber :: MagicNumber + , metadata :: MetadataVersioned + } deriving (Eq, Show, Generic, GHC.Generic, Decode, Encode) + +$(deriveJSON defaultOptions ''Metadata) + isV9 :: Metadata -> Bool -isV9 (MetadataVersioned _ (V9 _)) = True -isV9 _ = False +isV9 (Metadata _ (V9 _)) = True +isV9 _ = False isV10 :: Metadata -> Bool -isV10 (MetadataVersioned _ (V10 _)) = True -isV10 _ = False +isV10 (Metadata _ (V10 _)) = True +isV10 _ = False isV11 :: Metadata -> Bool -isV11 (MetadataVersioned _ (V11 _)) = True -isV11 _ = False +isV11 (Metadata _ (V11 _)) = True +isV11 _ = False isV12 :: Metadata -> Bool -isV12 (MetadataVersioned _ (V12 _)) = True -isV12 _ = False +isV12 (Metadata _ (V12 _)) = True +isV12 _ = False isLatest :: Metadata -> Bool isLatest = isV12 diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs index b48b1abb..08529fae 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs @@ -18,6 +18,7 @@ module Network.Polkadot.Metadata.MagicNumber where import Codec.Scale.Class (Decode (..), Encode (..)) import Codec.Scale.Core () import Control.Monad (when) +import Data.Aeson (FromJSON (..), ToJSON (..), Value (Number)) import Data.Word (Word32) -- | `meta`, reversed for Little Endian encoding @@ -37,3 +38,14 @@ instance Decode MagicNumber where instance Encode MagicNumber where put _ = put magic_number + +instance FromJSON MagicNumber where + parseJSON (Number n) = do + when (n /= fromIntegral magic_number) $ + fail "Bad magic number" + return MagicNumber + parseJSON _ = fail "Magic number should be a number" + +instance ToJSON MagicNumber where + toJSON _ = toJSON magic_number + diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Types.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Types.hs new file mode 100644 index 00000000..b2fa9995 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Types.hs @@ -0,0 +1,19 @@ +-- | +-- Module : Network.Polkadot.Metadata.Types +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Common metadata types. +-- + +module Network.Polkadot.Metadata.Types where + +import Data.Text (Text) + +-- TODO +type Type = Text + diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs index 68ffe5a7..ed8054d2 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TemplateHaskell #-} -- | -- Module : Network.Polkadot.Metadata.V10 @@ -10,13 +11,103 @@ -- Stability : experimental -- Portability : portable -- --- Metadata V10 data type. +-- Metadata version 10 definitions. -- module Network.Polkadot.Metadata.V10 where -import Codec.Scale (Decode, Encode, Generic) -import qualified GHC.Generics as GHC (Generic) +import Codec.Scale (Decode, Encode, Generic) +import Data.Aeson (Options (fieldLabelModifier), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) +import Data.Text (Text) +import qualified GHC.Generics as GHC (Generic) +import Lens.Micro (over, _head) -data MetadataV10 = MetadataV10 +import Network.Polkadot.Metadata.Types (Type) +import qualified Network.Polkadot.Metadata.V9 as V9 + +type StorageEntryModifier = V9.StorageEntryModifier +type FunctionMetadata = V9.FunctionMetadata +type EventMetadata = V9.EventMetadata +type ModuleConstantMetadata = V9.ModuleConstantMetadata +type ErrorMetadata = V9.ErrorMetadata + +data StorageHasher + = Blake2_128 + | Blake2_256 + | Blake2_128Concat + | Twox128 + | Twox256 + | Twox64Concat + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''StorageHasher) + +data MapType = MapType + { mapHasher :: !StorageHasher + , mapKey :: !Type + , mapValue :: !Type + , mapLinked :: !Bool + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 3 }) ''MapType) + +data DoubleMapType = DoubleMapType + { doubleMapHasher :: !StorageHasher + , doubleMapKey1 :: !Type + , doubleMapKey2 :: !Type + , doubleMapValue :: !Type + , doubleMapKey2Hasher :: !StorageHasher + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 9 }) ''DoubleMapType) + +data StorageEntryType + = Plain !Type + | Map !MapType + | DoubleMap !DoubleMapType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''StorageEntryType) + +data StorageEntryMetadata = StorageEntryMetadata + { entryName :: !Text + , entryModifier :: !StorageEntryModifier + , entryType :: !StorageEntryType + , entryFallback :: !HexString + , entryDocumentation :: ![Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 5 }) ''StorageEntryMetadata) + +data StorageMetadata = StorageMetadata + { storagePrefix :: !Text + , storageItems :: ![StorageEntryMetadata] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 7 }) ''StorageMetadata) + +data ModuleMetadata = ModuleMetadata + { moduleName :: !Text + , moduleStorage :: !(Maybe StorageMetadata) + , moduleCalls :: !(Maybe [FunctionMetadata]) + , moduleEvents :: !(Maybe [EventMetadata]) + , moduleConstants :: ![ModuleConstantMetadata] + , moduleErrors :: ![ErrorMetadata] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 6 }) ''ModuleMetadata) + +data Metadata = Metadata + { modules :: ![ModuleMetadata] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''Metadata) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs index 23e8dd75..f2107aa2 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TemplateHaskell #-} -- | -- Module : Network.Polkadot.Metadata.V11 @@ -10,13 +11,114 @@ -- Stability : experimental -- Portability : portable -- --- Metadata V11 data type. +-- Metadata version 11 definitions. -- module Network.Polkadot.Metadata.V11 where -import Codec.Scale (Decode, Encode, Generic) -import qualified GHC.Generics as GHC (Generic) +import Codec.Scale (Decode, Encode, Generic) +import Data.Aeson (Options (fieldLabelModifier), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) +import Data.Text (Text) +import Data.Word (Word8) +import qualified GHC.Generics as GHC (Generic) +import Lens.Micro (over, _head) -data MetadataV11 = MetadataV11 +import Network.Polkadot.Metadata.Types (Type) +import qualified Network.Polkadot.Metadata.V10 as V10 + +type StorageEntryModifier = V10.StorageEntryModifier +type FunctionMetadata = V10.FunctionMetadata +type EventMetadata = V10.EventMetadata +type ModuleConstantMetadata = V10.ModuleConstantMetadata +type ErrorMetadata = V10.ErrorMetadata + +data StorageHasher + = Blake2_128 + | Blake2_256 + | Blake2_128Concat + | Twox128 + | Twox256 + | Twox64Concat + | Identity + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''StorageHasher) + +data MapType = MapType + { mapHasher :: !StorageHasher + , mapKey :: !Type + , mapValue :: !Type + , mapLinked :: !Bool + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 3 }) ''MapType) + +data DoubleMapType = DoubleMapType + { doubleMapHasher :: !StorageHasher + , doubleMapKey1 :: !Type + , doubleMapKey2 :: !Type + , doubleMapValue :: !Type + , doubleMapKey2Hasher :: !StorageHasher + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 9 }) ''DoubleMapType) + +data StorageEntryType + = Plain !Type + | Map !MapType + | DoubleMap !DoubleMapType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''StorageEntryType) + +data StorageEntryMetadata = StorageEntryMetadata + { entryName :: !Text + , entryModifier :: !StorageEntryModifier + , entryType :: !StorageEntryType + , entryFallback :: !HexString + , entryDocumentation :: ![Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 5 }) ''StorageEntryMetadata) + +data StorageMetadata = StorageMetadata + { storagePrefix :: !Text + , storageItems :: ![StorageEntryMetadata] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 7 }) ''StorageMetadata) + +data ModuleMetadata = ModuleMetadata + { moduleName :: !Text + , moduleStorage :: !(Maybe StorageMetadata) + , moduleCalls :: !(Maybe [FunctionMetadata]) + , moduleEvents :: !(Maybe [EventMetadata]) + , moduleConstants :: ![ModuleConstantMetadata] + , moduleErrors :: ![ErrorMetadata] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 6 }) ''ModuleMetadata) + +data ExtrinsicMetadata = ExtrinsicMetadata + { extrinsicVersion :: !Word8 + , extrinsicSignedExtensions :: ![Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 9 }) ''ExtrinsicMetadata) + +data Metadata = Metadata + { modules :: ![ModuleMetadata] + , extrinsics :: ![ExtrinsicMetadata] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''Metadata) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs index 027c0aaa..f8529742 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TemplateHaskell #-} -- | -- Module : Network.Polkadot.Metadata.V12 @@ -10,13 +11,46 @@ -- Stability : experimental -- Portability : portable -- --- Metadata V12 data type. +-- Metadata version 12 definitions. -- module Network.Polkadot.Metadata.V12 where -import Codec.Scale (Decode, Encode, Generic) -import qualified GHC.Generics as GHC (Generic) +import Codec.Scale (Decode, Encode, Generic) +import Data.Aeson (Options (fieldLabelModifier), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.Char (toLower) +import Data.Text (Text) +import Data.Word (Word8) +import qualified GHC.Generics as GHC (Generic) +import Lens.Micro (over, _head) -data MetadataV12 = MetadataV12 - deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) +import qualified Network.Polkadot.Metadata.V11 as V11 + +type ExtrinsicMetadata = V11.ExtrinsicMetadata +type StorageMetadata = V11.StorageMetadata +type FunctionMetadata = V11.FunctionMetadata +type EventMetadata = V11.EventMetadata +type ModuleConstantMetadata = V11.ModuleConstantMetadata +type ErrorMetadata = V11.ErrorMetadata + +data ModuleMetadata = ModuleMetadata + { moduleName :: !Text + , moduleStorage :: !(Maybe StorageMetadata) + , moduleCalls :: !(Maybe [FunctionMetadata]) + , moduleEvents :: !(Maybe [EventMetadata]) + , moduleConstants :: ![ModuleConstantMetadata] + , moduleErrors :: ![ErrorMetadata] + , moduleIndex :: !Word8 + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 6 }) ''ModuleMetadata) + +data Metadata = Metadata + { modules :: ![ModuleMetadata] + , extrinsics :: ![ExtrinsicMetadata] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''Metadata) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs index 7f9e5b2f..a378aa26 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs @@ -1,5 +1,6 @@ -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TemplateHaskell #-} -- | -- Module : Network.Polkadot.Metadata.V9 @@ -10,97 +11,144 @@ -- Stability : experimental -- Portability : portable -- --- Metadata V9 data type. +-- Metadata version 9 definitions. -- module Network.Polkadot.Metadata.V9 where -import Codec.Scale (Decode, Encode, Generic) -import Data.ByteString (ByteString) -import Data.Text (Text) -import qualified GHC.Generics as GHC (Generic) +import Codec.Scale (Decode, Encode, Generic) +import Data.Aeson (Options (fieldLabelModifier), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) +import Data.Text (Text) +import qualified GHC.Generics as GHC (Generic) +import Lens.Micro (over, _head) + +import Network.Polkadot.Metadata.Types (Type) + +data FunctionArgumentMetadata = FunctionArgumentMetadata + { argumentName :: !Text + , argumentType :: !Type + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) --- TODO -type Type = Text +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 8 }) ''FunctionArgumentMetadata) -data MetadataV9 = MetadataV9 [ModuleMetadataV9] - deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) +data FunctionMetadata = FunctionMetadata + { functionName :: !Text + , functionArgs :: ![FunctionArgumentMetadata] + , functionDocumentation :: ![Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data ModuleMetadataV9 = ModuleMetadataV9 - { moduleName :: Text - , moduleStorage :: Maybe StorageMetadataV9 - , moduleCalls :: Maybe [FunctionMetadataV9] - , moduleEvents :: Maybe [EventMetadataV9] - , moduleConstants :: [ModuleConstantMetadataV9] - , moduleErrors :: [ErrorMetadataV9] +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 8 }) ''FunctionMetadata) + +data EventMetadata = EventMetadata + { eventName :: !Text + , eventArgs :: ![Type] + , eventDocumentation :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data StorageMetadataV9 = StorageMetadataV9 - { storagePrefix :: Text - , storageItems :: [StorageEntryMetadataV9] +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 5 }) ''EventMetadata) + +data ModuleConstantMetadata = ModuleConstantMetadata + { constantName :: !Text + , constantType :: !Type + , constantValue :: !HexString + , constantDocumentation :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data StorageEntryMetadataV9 = StorageEntryMetadataV9 - { entryName :: Text - , entryModifier :: StorageEntryModifierV9 - , entryType :: StorageEntryTypeV9 - , entryFallback :: ByteString - , entryDocumentation :: [Text] +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 8 }) ''ModuleConstantMetadata) + +data ErrorMetadata = ErrorMetadata + { errorName :: !Text + , errorDocumentation :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data StorageEntryModifierV9 = OptionalModifier - | DefaultModifier - | RequiredModifier - deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 5 }) ''ErrorMetadata) -data StorageEntryTypeV9 = PlainType Type - | MapType MapTypeV9 - | DoubleMapType DoubleMapTypeV9 +data StorageHasher + = Blake2_128 + | Blake2_256 + | Twox128 + | Twox256 + | Twox64Concat deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data MapTypeV9 = MapTypeV9 - { mapHasher :: StorageHasherV9 - , mapKey :: Type - , mapValue :: Type - , mapLinked :: Bool +$(deriveJSON defaultOptions ''StorageHasher) + +data MapType = MapType + { mapHasher :: !StorageHasher + , mapKey :: !Type + , mapValue :: !Type + , mapLinked :: !Bool } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data DoubleMapTypeV9 = DoubleMapTypeV9 - { doubleMapHasher :: StorageHasherV9 - , doubleMapKey1 :: Type - , doubleMapKey2 :: Type - , doubleMapValue :: Type - , doubleMapKey2Hasher :: StorageHasherV9 +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 3 }) ''MapType) + +data DoubleMapType = DoubleMapType + { doubleMapHasher :: !StorageHasher + , doubleMapKey1 :: !Type + , doubleMapKey2 :: !Type + , doubleMapValue :: !Type + , doubleMapKey2Hasher :: !StorageHasher } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data StorageHasherV9 = Blake2128 | Blake2256 | Twox128 | Twox256 | Twox64Concat +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 9 }) ''DoubleMapType) + +data StorageEntryType + = Plain !Type + | Map !MapType + | DoubleMap !DoubleMapType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data FunctionMetadataV9 = FunctionMetadataV9 - { functionName :: Text - , functionArgs :: [FunctionArgumentMetadataV9] - , functionDocumentation :: [Text] - } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) +$(deriveJSON defaultOptions ''StorageEntryType) + +data StorageEntryModifier = Optional | Default | Required + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''StorageEntryModifier) -data FunctionArgumentMetadataV9 = FunctionArgumentMetadataV9 - { argumentName :: Text - , argumentType :: Type +data StorageEntryMetadata = StorageEntryMetadata + { entryName :: !Text + , entryModifier :: !StorageEntryModifier + , entryType :: !StorageEntryType + , entryFallback :: !HexString + , entryDocumentation :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data EventMetadataV9 = EventMetadataV9 - { eventName :: Text - , eventArgs :: [Type] - , eventDocumentation :: [Text] +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 5 }) ''StorageEntryMetadata) + +data StorageMetadata = StorageMetadata + { storagePrefix :: !Text + , storageItems :: ![StorageEntryMetadata] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data ModuleConstantMetadataV9 = ModuleConstantMetadataV9 - { constantName :: Text - , constantType :: Type - , constantValue :: ByteString - , constantDocumentation :: [Text] +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 7 }) ''StorageMetadata) + +data ModuleMetadata = ModuleMetadata + { moduleName :: !Text + , moduleStorage :: !(Maybe StorageMetadata) + , moduleCalls :: !(Maybe [FunctionMetadata]) + , moduleEvents :: !(Maybe [EventMetadata]) + , moduleConstants :: ![ModuleConstantMetadata] + , moduleErrors :: ![ErrorMetadata] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data ErrorMetadataV9 = ErrorMetadataV9 - { errorName :: Text - , errorDocumentation :: [Text] +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 6 }) ''ModuleMetadata) + +data Metadata = Metadata + { modules :: ![ModuleMetadata] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''Metadata) From 3fc88e6201102aa700af1e91fe2185818afa57e3 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 22 Oct 2020 09:00:11 +0300 Subject: [PATCH 167/237] Switch tests to parallel execution * Network.Polkadot.Api -> Network.Polkadot.Rpc * Polkadot metadata JSON encoding fixes, init type name sanitize --- examples/polkadot/Main.hs | 6 +- .../tests/Crypto/Ethereum/Test/KeyfileSpec.hs | 2 +- .../Crypto/Ethereum/Test/SignatureSpec.hs | 2 +- .../tests/Crypto/Random/Test/HmacDrbgSpec.hs | 2 +- .../tests/Network/Ethereum/Test/EventSpec.hs | 4 +- .../Network/Ethereum/Test/MethodDumpSpec.hs | 9 +- .../tests/Network/Ethereum/Test/THSpec.hs | 2 +- .../Network/Ethereum/Test/TransactionSpec.hs | 4 +- .../polkadot/src/Network/Polkadot/Metadata.hs | 5 +- .../Network/Polkadot/Metadata/MagicNumber.hs | 1 - .../src/Network/Polkadot/Metadata/Type.hs | 95 + .../src/Network/Polkadot/Metadata/Types.hs | 19 - .../src/Network/Polkadot/Metadata/V10.hs | 24 +- .../src/Network/Polkadot/Metadata/V11.hs | 26 +- .../src/Network/Polkadot/Metadata/V9.hs | 25 +- .../Network/Polkadot/{Api => Rpc}/Account.hs | 5 +- .../Network/Polkadot/{Api => Rpc}/Author.hs | 7 +- .../src/Network/Polkadot/{Api => Rpc}/Babe.hs | 5 +- .../Network/Polkadot/{Api => Rpc}/Chain.hs | 7 +- .../Polkadot/{Api => Rpc}/Childstate.hs | 4 +- .../Polkadot/{Api => Rpc}/Contracts.hs | 10 +- .../Network/Polkadot/{Api => Rpc}/Engine.hs | 7 +- .../Network/Polkadot/{Api => Rpc}/Grandpa.hs | 5 +- .../Network/Polkadot/{Api => Rpc}/Offchain.hs | 7 +- .../Network/Polkadot/{Api => Rpc}/Payment.hs | 7 +- .../src/Network/Polkadot/{Api => Rpc}/Rpc.hs | 5 +- .../Network/Polkadot/{Api => Rpc}/State.hs | 10 +- .../Network/Polkadot/{Api => Rpc}/System.hs | 8 +- .../Network/Polkadot/{Api => Rpc}/Types.hs | 4 +- .../Network/Polkadot/Test/MetadataSpec.hs | 36 +- .../Network/Polkadot/Test/SanitizeSpec.hs | 63 + packages/polkadot/tests/meta/v9.hex | 1 + packages/polkadot/tests/meta/v9.json | 4896 +++++++++++++++++ packages/scale/package.yaml | 1 - .../scale/tests/Codec/Scale/Test/SkipSpec.hs | 12 +- .../tests/Data/Solidity/Test/AddressSpec.hs | 2 +- .../tests/Data/Solidity/Test/EncodingSpec.hs | 3 +- .../tests/Data/Solidity/Test/IntSpec.hs | 2 +- .../tests/Language/Solidity/Test/AbiSpec.hs | 42 +- .../Language/Solidity/Test/CompilerSpec.hs | 32 - 40 files changed, 5214 insertions(+), 193 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/Type.hs delete mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/Types.hs rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Account.hs (87%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Author.hs (96%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Babe.hs (88%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Chain.hs (89%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Childstate.hs (95%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Contracts.hs (90%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Engine.hs (88%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Grandpa.hs (87%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Offchain.hs (88%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Payment.hs (82%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Rpc.hs (87%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/State.hs (97%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/System.hs (94%) rename packages/polkadot/src/Network/Polkadot/{Api => Rpc}/Types.hs (99%) create mode 100644 packages/polkadot/tests/Network/Polkadot/Test/SanitizeSpec.hs create mode 100644 packages/polkadot/tests/meta/v9.hex create mode 100644 packages/polkadot/tests/meta/v9.json delete mode 100644 packages/solidity/tests/Language/Solidity/Test/CompilerSpec.hs diff --git a/examples/polkadot/Main.hs b/examples/polkadot/Main.hs index 26e4e0a5..5e8a25a0 100644 --- a/examples/polkadot/Main.hs +++ b/examples/polkadot/Main.hs @@ -3,9 +3,9 @@ module Main where import Control.Monad.IO.Class (liftIO) -import qualified Network.Polkadot.Api.Chain as Chain -import qualified Network.Polkadot.Api.State as State -import qualified Network.Polkadot.Api.System as System +import qualified Network.Polkadot.Rpc.Chain as Chain +import qualified Network.Polkadot.Rpc.State as State +import qualified Network.Polkadot.Rpc.System as System import Network.Web3.Provider (Provider (..), runWeb3') main :: IO () diff --git a/packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs b/packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs index d86d9ea5..aa300be5 100644 --- a/packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs +++ b/packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs @@ -71,7 +71,7 @@ test_private :: HexString test_private = "7a28b5ba57c53603b0b07b56bba752f7784bf506fa95edc395f5cf6c7514fe9d" spec :: Spec -spec = do +spec = parallel $ do describe "AES-128-CTR and PBKDF2-SHA-256" $ do it "can decode keyfile" $ case eitherDecode pbkdf2_test_keyfile of diff --git a/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs b/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs index 0ccd9835..93d60271 100644 --- a/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs +++ b/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs @@ -26,7 +26,7 @@ test_key :: HexString test_key = "29461542faa1acbc968bcb332115e0537c023f8df416317602ca5d15ca12d02d" spec :: Spec -spec = do +spec = parallel $ do describe "Ethereum ECDSA" $ do it "can hash Ethereum prefixed message" $ for_ test_vector $ \(msg, msgHash, _) -> convert (hashMessage msg) `shouldBe` msgHash diff --git a/packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs b/packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs index d5b1f7ab..f56629d0 100644 --- a/packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs +++ b/packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs @@ -11,7 +11,7 @@ import Crypto.Random.HmacDrbg import Data.ByteArray.HexString (HexString) spec :: Spec -spec = do +spec = parallel $ do describe "HMAC-DRBG-SHA256" $ do it "indutny/hmac-drbg test vectors" $ do let doDrbg :: ByteString -> HexString diff --git a/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs index 13b59130..716f09af 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs @@ -8,7 +8,7 @@ module Network.Ethereum.Test.EventSpec where import Data.Tagged (Tagged) import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) -import Test.Hspec (Spec, describe, it, shouldBe) +import Test.Hspec import Data.Solidity.Abi (AbiGet, AbiType (..)) import Data.Solidity.Event (IndexedEvent (..), decodeEvent) @@ -20,7 +20,7 @@ spec :: Spec spec = eventTest eventTest :: Spec -eventTest = +eventTest = parallel $ describe "event tests" $ do it "can decode simple storage" $ diff --git a/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs index 233fec73..ec00352e 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs @@ -6,7 +6,8 @@ import Network.Ethereum.Contract.TH import Test.Hspec spec :: Spec -spec = describe "methodDump" $ - it "can dump an ABI" $ do - let theApiDump = [abiFrom|tests/contracts/ERC20.json|] - in theApiDump `shouldNotBe` "" +spec = parallel $ + describe "methodDump" $ + it "can dump an ABI" $ + let theApiDump = [abiFrom|tests/contracts/ERC20.json|] + in theApiDump `shouldNotBe` "" diff --git a/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs index 62c7c86d..3ef4ca7a 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs @@ -14,7 +14,7 @@ import Test.Hspec [abiFrom|tests/contracts/Exchange.json|] spec :: Spec -spec = +spec = parallel $ describe "quasi-quoter" $ it "can compile contract with tuples" $ True `shouldBe` True diff --git a/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs index af7a3aa4..c5c06942 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs @@ -9,8 +9,8 @@ import Network.Ethereum.Transaction (encodeTransaction) import Test.Hspec spec :: Spec -spec = do - describe "Ethereum raw transactions" $ do +spec = parallel $ + describe "Ethereum raw transactions" $ it "can create and sign valid raw transaction" $ do -- using same example as in this blog post: -- https://medium.com/@codetractio/walkthrough-of-an-ethereum-improvement-proposal-eip-6fda3966d171 diff --git a/packages/polkadot/src/Network/Polkadot/Metadata.hs b/packages/polkadot/src/Network/Polkadot/Metadata.hs index a9b613d4..baecd2e2 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata.hs @@ -17,7 +17,8 @@ module Network.Polkadot.Metadata where import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (defaultOptions) +import Data.Aeson (Options (sumEncoding), SumEncoding (ObjectWithSingleField), + defaultOptions) import Data.Aeson.TH (deriveJSON) import qualified GHC.Generics as GHC (Generic) @@ -39,7 +40,7 @@ data MetadataVersioned | V12 V12.Metadata deriving (Eq, Show, Generic, GHC.Generic, Decode, Encode) -$(deriveJSON defaultOptions ''MetadataVersioned) +$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''MetadataVersioned) -- | The versioned runtime metadata as a decoded structure. data Metadata = Metadata diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs index 08529fae..ca803f0b 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs @@ -48,4 +48,3 @@ instance FromJSON MagicNumber where instance ToJSON MagicNumber where toJSON _ = toJSON magic_number - diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs new file mode 100644 index 00000000..c61ee8fa --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs @@ -0,0 +1,95 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Metadata.Type +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Runtime type names metadata encoding. +-- + +module Network.Polkadot.Metadata.Type where + +import Codec.Scale.Class (Decode (..), Encode (..)) +import Codec.Scale.Core () +import Data.Aeson (FromJSON (..), ToJSON (..), Value (String)) +import Data.Text (Text, replace, strip) + +-- | This is a extended version of String, specifically to handle types. Here we rely fully +-- on what string provides us, however we also adjust the types received from the runtime, +-- i.e. we remove the `T::` prefixes found in some types for consistency across implementation. +newtype Type = Type { unType :: Text } + deriving (Eq, Ord, Show) + +instance Decode Type where + get = Type <$> get + +instance Encode Type where + put = put . unType + +instance FromJSON Type where + parseJSON (String s) = return $ Type (sanitize s) + parseJSON _ = fail "Type name should be a string" + +instance ToJSON Type where + toJSON = toJSON . unType + +-- | Runtime type name sanitizing. +sanitize :: Text -> Text +sanitize = strip + -- alias ::Inherent -> InherentOfflineReport + . replace "::Inherent" "InherentOfflineReport" + -- alias String -> Text (compat with jsonrpc methods) + . replace "String" "Text" + -- alias Vec -> Bytes + . replace "Vec" "Bytes" + . replace "&[u8]" "Bytes" + -- alias RawAddress -> Address + . replace "RawAddress" "Address" + -- lookups, mapped to Address/AccountId as appropriate in runtime + . replace "Lookup::Source" "LookupSource" + . replace "Lookup::Target" "LookupTarget" + -- HACK duplication between contracts & primitives, however contracts prefixed with exec + . replace "exec::StorageKey" "ContractStorageKey" + -- + . cleanupCompact + -- remove all the trait prefixes + . removeTraits + -- remove PairOf -> (T, T) + . removePairOf + -- remove boxing, `Box` -> `Proposal` + . removeWrap "Box" + -- remove generics, `MisbehaviorReport` -> `MisbehaviorReport` + . removeGenerics + -- flattens tuples with one value, `(AccountId)` -> `AccountId + . flattenSingleTuple + -- converts ::Type to Type, >::Proposal -> Proposal + . removeColons + +alias :: Text -> Text -> Text -> Text +alias = undefined + +cleanupCompact :: Text -> Text +cleanupCompact = id + +removeTraits :: Text -> Text +removeTraits = id + +removePairOf :: Text -> Text +removePairOf = id + +removeWrap :: Text -> Text -> Text +removeWrap _ = id + +removeGenerics :: Text -> Text +removeGenerics = id + +flattenSingleTuple :: Text -> Text +flattenSingleTuple = id + +removeColons :: Text -> Text +removeColons = id diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Types.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Types.hs deleted file mode 100644 index b2fa9995..00000000 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Types.hs +++ /dev/null @@ -1,19 +0,0 @@ --- | --- Module : Network.Polkadot.Metadata.Types --- Copyright : Aleksandr Krupenkin 2016-2020 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : portable --- --- Common metadata types. --- - -module Network.Polkadot.Metadata.Types where - -import Data.Text (Text) - --- TODO -type Type = Text - diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs index ed8054d2..76311a18 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs @@ -16,18 +16,18 @@ module Network.Polkadot.Metadata.V10 where -import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (fieldLabelModifier), - defaultOptions) -import Data.Aeson.TH (deriveJSON) -import Data.ByteArray.HexString (HexString) -import Data.Char (toLower) -import Data.Text (Text) -import qualified GHC.Generics as GHC (Generic) -import Lens.Micro (over, _head) - -import Network.Polkadot.Metadata.Types (Type) -import qualified Network.Polkadot.Metadata.V9 as V9 +import Codec.Scale (Decode, Encode, Generic) +import Data.Aeson (Options (fieldLabelModifier), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) +import Data.Text (Text) +import qualified GHC.Generics as GHC (Generic) +import Lens.Micro (over, _head) + +import Network.Polkadot.Metadata.Type (Type) +import qualified Network.Polkadot.Metadata.V9 as V9 type StorageEntryModifier = V9.StorageEntryModifier type FunctionMetadata = V9.FunctionMetadata diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs index f2107aa2..4eff1036 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs @@ -16,19 +16,19 @@ module Network.Polkadot.Metadata.V11 where -import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (fieldLabelModifier), - defaultOptions) -import Data.Aeson.TH (deriveJSON) -import Data.ByteArray.HexString (HexString) -import Data.Char (toLower) -import Data.Text (Text) -import Data.Word (Word8) -import qualified GHC.Generics as GHC (Generic) -import Lens.Micro (over, _head) - -import Network.Polkadot.Metadata.Types (Type) -import qualified Network.Polkadot.Metadata.V10 as V10 +import Codec.Scale (Decode, Encode, Generic) +import Data.Aeson (Options (fieldLabelModifier), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) +import Data.Text (Text) +import Data.Word (Word8) +import qualified GHC.Generics as GHC (Generic) +import Lens.Micro (over, _head) + +import Network.Polkadot.Metadata.Type (Type) +import qualified Network.Polkadot.Metadata.V10 as V10 type StorageEntryModifier = V10.StorageEntryModifier type FunctionMetadata = V10.FunctionMetadata diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs index a378aa26..7b1d00fd 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs @@ -16,17 +16,18 @@ module Network.Polkadot.Metadata.V9 where -import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (fieldLabelModifier), - defaultOptions) -import Data.Aeson.TH (deriveJSON) -import Data.ByteArray.HexString (HexString) -import Data.Char (toLower) -import Data.Text (Text) -import qualified GHC.Generics as GHC (Generic) -import Lens.Micro (over, _head) - -import Network.Polkadot.Metadata.Types (Type) +import Codec.Scale (Decode, Encode, Generic) +import Data.Aeson (Options (fieldLabelModifier, sumEncoding), + SumEncoding (ObjectWithSingleField), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) +import Data.Text (Text) +import qualified GHC.Generics as GHC (Generic) +import Lens.Micro (over, _head) + +import Network.Polkadot.Metadata.Type (Type) data FunctionArgumentMetadata = FunctionArgumentMetadata { argumentName :: !Text @@ -109,7 +110,7 @@ data StorageEntryType | DoubleMap !DoubleMapType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -$(deriveJSON defaultOptions ''StorageEntryType) +$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''StorageEntryType) data StorageEntryModifier = Optional | Default | Required deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) diff --git a/packages/polkadot/src/Network/Polkadot/Api/Account.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs similarity index 87% rename from packages/polkadot/src/Network/Polkadot/Api/Account.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Account.hs index 8987c7f3..17ead1a7 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Account.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Account +-- Module : Network.Polkadot.Rpc.Account -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,10 +13,9 @@ -- Polkadot RPC methods with `account` prefix. -- -module Network.Polkadot.Api.Account where +module Network.Polkadot.Rpc.Account where import Data.Text (Text) - import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Retrieves the next accountIndex as available on the node. diff --git a/packages/polkadot/src/Network/Polkadot/Api/Author.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs similarity index 96% rename from packages/polkadot/src/Network/Polkadot/Api/Author.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Author.hs index 9475b26d..27e0a9f3 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Author.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Author +-- Module : Network.Polkadot.Rpc.Author -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,11 +13,10 @@ -- Polkadot RPC methods with `author` prefix. -- -module Network.Polkadot.Api.Author where - -import Data.Text (Text) +module Network.Polkadot.Rpc.Author where import Data.ByteArray.HexString (HexString) +import Data.Text (Text) import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Returns true if the keystore has private keys for the given public key and key type. diff --git a/packages/polkadot/src/Network/Polkadot/Api/Babe.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs similarity index 88% rename from packages/polkadot/src/Network/Polkadot/Api/Babe.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs index 17fed83d..91749473 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Babe.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Babe +-- Module : Network.Polkadot.Rpc.Babe -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,10 +13,9 @@ -- Polkadot RPC methods with `babe` prefix. -- -module Network.Polkadot.Api.Babe where +module Network.Polkadot.Rpc.Babe where import Data.Aeson (Object) - import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Returns data about which slots (primary or secondary) can be claimed diff --git a/packages/polkadot/src/Network/Polkadot/Api/Chain.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs similarity index 89% rename from packages/polkadot/src/Network/Polkadot/Api/Chain.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs index 3bd1169e..cdd331be 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Chain.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Chain +-- Module : Network.Polkadot.Rpc.Chain -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,11 +13,12 @@ -- Polkadot RPC methods with `chain` prefix. -- -module Network.Polkadot.Api.Chain where +module Network.Polkadot.Rpc.Chain where import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) -import Network.Polkadot.Api.Types (Header, SignedBlock) + +import Network.Polkadot.Rpc.Types (Header, SignedBlock) -- | Get header and body of a relay chain block. getBlock :: JsonRpc m diff --git a/packages/polkadot/src/Network/Polkadot/Api/Childstate.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs similarity index 95% rename from packages/polkadot/src/Network/Polkadot/Api/Childstate.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs index 979d7288..42c1d561 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Childstate.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Childstate +-- Module : Network.Polkadot.Rpc.Childstate -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,7 +13,7 @@ -- Polkadot RPC methods with `childstate` prefix. -- -module Network.Polkadot.Api.Childstate where +module Network.Polkadot.Rpc.Childstate where import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) diff --git a/packages/polkadot/src/Network/Polkadot/Api/Contracts.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs similarity index 90% rename from packages/polkadot/src/Network/Polkadot/Api/Contracts.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs index 9e0f1438..2fea5fde 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Contracts.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Contracts +-- Module : Network.Polkadot.Rpc.Contracts -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,13 +13,13 @@ -- Polkadot RPC methods with `contracts` prefix. -- -module Network.Polkadot.Api.Contracts where - -import Data.Text (Text) +module Network.Polkadot.Rpc.Contracts where import Data.ByteArray.HexString (HexString) +import Data.Text (Text) import Network.JsonRpc.TinyClient (JsonRpc (..)) -import Network.Polkadot.Api.Types (ContractCall, ContractExecResult) + +import Network.Polkadot.Rpc.Types (ContractCall, ContractExecResult) -- | Executes a call to a contract. call :: JsonRpc m diff --git a/packages/polkadot/src/Network/Polkadot/Api/Engine.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs similarity index 88% rename from packages/polkadot/src/Network/Polkadot/Api/Engine.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs index 1cf7bfd8..e031e93b 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Engine.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Engine +-- Module : Network.Polkadot.Rpc.Engine -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,11 +13,12 @@ -- Polkadot RPC methods with `engine` prefix. -- -module Network.Polkadot.Api.Engine where +module Network.Polkadot.Rpc.Engine where import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) -import Network.Polkadot.Api.Types (CreatedBlock) + +import Network.Polkadot.Rpc.Types (CreatedBlock) -- | Instructs the manual-seal authorship task to create a new block. createBlock :: JsonRpc m diff --git a/packages/polkadot/src/Network/Polkadot/Api/Grandpa.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs similarity index 87% rename from packages/polkadot/src/Network/Polkadot/Api/Grandpa.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs index 5b1b9016..35e4b53c 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Grandpa.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Grandpa +-- Module : Network.Polkadot.Rpc.Grandpa -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,10 +13,9 @@ -- Polkadot RPC methods with `grandpa` prefix. -- -module Network.Polkadot.Api.Grandpa where +module Network.Polkadot.Rpc.Grandpa where import Data.Aeson (Object) - import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Returns the state of the current best round state as well as the ongoing background rounds. diff --git a/packages/polkadot/src/Network/Polkadot/Api/Offchain.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs similarity index 88% rename from packages/polkadot/src/Network/Polkadot/Api/Offchain.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs index ff058769..9acfba3f 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Offchain.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Offchain +-- Module : Network.Polkadot.Rpc.Offchain -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,11 +13,12 @@ -- Polkadot RPC methods with `offchain` prefix. -- -module Network.Polkadot.Api.Offchain where +module Network.Polkadot.Rpc.Offchain where import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) -import Network.Polkadot.Api.Types (StorageKind) + +import Network.Polkadot.Rpc.Types (StorageKind) -- | Get offchain local storage under given key and prefix. localStorageGet :: JsonRpc m diff --git a/packages/polkadot/src/Network/Polkadot/Api/Payment.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs similarity index 82% rename from packages/polkadot/src/Network/Polkadot/Api/Payment.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs index c90fc972..00d0188a 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Payment.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Payment +-- Module : Network.Polkadot.Rpc.Payment -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,11 +13,12 @@ -- Polkadot RPC methods with `payment` prefix. -- -module Network.Polkadot.Api.Payment where +module Network.Polkadot.Rpc.Payment where import Data.ByteArray.HexString (HexString) import Network.JsonRpc.TinyClient (JsonRpc (..)) -import Network.Polkadot.Api.Types (RuntimeDispatchInfo) + +import Network.Polkadot.Rpc.Types (RuntimeDispatchInfo) -- | Retrieves the fee information for an encoded extrinsic. queryInfo :: JsonRpc m diff --git a/packages/polkadot/src/Network/Polkadot/Api/Rpc.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs similarity index 87% rename from packages/polkadot/src/Network/Polkadot/Api/Rpc.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs index 6b14248b..88681461 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Rpc.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.Rpc +-- Module : Network.Polkadot.Rpc.Rpc -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,10 +13,9 @@ -- Polkadot RPC methods with `rpc` prefix. -- -module Network.Polkadot.Api.Rpc where +module Network.Polkadot.Rpc.Rpc where import Data.Aeson (Value) - import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Retrieves the list of RPC methods that are exposed by the node. diff --git a/packages/polkadot/src/Network/Polkadot/Api/State.hs b/packages/polkadot/src/Network/Polkadot/Rpc/State.hs similarity index 97% rename from packages/polkadot/src/Network/Polkadot/Api/State.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/State.hs index 01d6b80e..4465f2bc 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/State.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/State.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.State +-- Module : Network.Polkadot.Rpc.State -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,13 +13,13 @@ -- Polkadot RPC methods with `state` prefix. -- -module Network.Polkadot.Api.State where - -import Data.Text (Text) +module Network.Polkadot.Rpc.State where import Data.ByteArray.HexString (HexString) +import Data.Text (Text) import Network.JsonRpc.TinyClient (JsonRpc (..)) -import Network.Polkadot.Api.Types (ReadProof, RuntimeVersion, + +import Network.Polkadot.Rpc.Types (ReadProof, RuntimeVersion, StorageChangeSet) -- | Perform a call to a builtin on the chain. diff --git a/packages/polkadot/src/Network/Polkadot/Api/System.hs b/packages/polkadot/src/Network/Polkadot/Rpc/System.hs similarity index 94% rename from packages/polkadot/src/Network/Polkadot/Api/System.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/System.hs index 41bb0ec1..40b73afc 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/System.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/System.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | --- Module : Network.Polkadot.Api.System +-- Module : Network.Polkadot.Rpc.System -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -13,13 +13,13 @@ -- Polkadot RPC methods with `system` prefix. -- -module Network.Polkadot.Api.System where +module Network.Polkadot.Rpc.System where import Data.Aeson (Object) import Data.Text (Text) - import Network.JsonRpc.TinyClient (JsonRpc (..)) -import Network.Polkadot.Api.Types (ChainType, Health, NodeRole, + +import Network.Polkadot.Rpc.Types (ChainType, Health, NodeRole, PeerInfo) -- | Adds a reserved peer. diff --git a/packages/polkadot/src/Network/Polkadot/Api/Types.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs similarity index 99% rename from packages/polkadot/src/Network/Polkadot/Api/Types.hs rename to packages/polkadot/src/Network/Polkadot/Rpc/Types.hs index 2aaa1a67..9ef194ed 100644 --- a/packages/polkadot/src/Network/Polkadot/Api/Types.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs @@ -5,7 +5,7 @@ {-# LANGUAGE TemplateHaskell #-} -- | --- Module : Network.Polkadot.Api.Types +-- Module : Network.Polkadot.Rpc.Types -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -16,7 +16,7 @@ -- Polkadot JSON-RPC types. -- -module Network.Polkadot.Api.Types where +module Network.Polkadot.Rpc.Types where import Data.Aeson (FromJSON (..), Options (fieldLabelModifier), diff --git a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs index 83bac0c7..27dc45e9 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs @@ -2,7 +2,7 @@ {-# LANGUAGE QuasiQuotes #-} -- | --- Module : Codec.Scale.Test.CoreSpec +-- Module : Codec.Scale.Test.MetadataSpec -- Copyright : Aleksandr Krupenkin 2016-2020 -- License : Apache-2.0 -- @@ -17,15 +17,16 @@ module Network.Polkadot.Test.MetadataSpec where import Codec.Scale (decode) +import Data.Aeson (eitherDecodeFileStrict) import Data.ByteArray.HexString (HexString, hexFrom) -import Network.Polkadot.Metadata -import Network.Polkadot.Metadata.MagicNumber -import Network.Polkadot.Metadata.V9 +import Network.Polkadot.Metadata (Metadata) +import Network.Polkadot.Metadata.MagicNumber (MagicNumber (..)) +import Network.Polkadot.Metadata.Type (sanitize) import Test.Hspec spec :: Spec spec = parallel $ do - describe "Metadata magic" $ do + describe "MagicNumber codec" $ do let empty_metadata = "0x6d65746109" :: HexString wrong_version = "0x6d657461ff" :: HexString wrong_magic = "0x6d64746110" :: HexString @@ -42,10 +43,27 @@ spec = parallel $ do let error_str = decode wrong_version :: Either String Metadata in error_str `shouldBe` Left "Failed reading: wrong prefix during enum decoding\nEmpty call stack\n" + describe "Sanitize alias" $ do + it "replaces all occurrences for types" $ + sanitize "(String,Address,MasterString,String)" + `shouldBe` "(Text,Address,MasterString,Text)" + + it "replaces actual types, but leaves struct names" $ + sanitize "{\"system\":\"String\",\"versionString\":\"String\"}" + `shouldBe` "{\"system\":\"Text\",\"versionString\":\"Text\"}" + + it "handles the preceding correctly" $ + sanitize "String String (String,[String;32],String)\"String" + `shouldBe` "Text Text (Text,[Text;32],Text)\"Text" + + it "handles emdedded Vec/Tuples" $ + sanitize " + + {- describe "Metadata V9" $ do - it "succeeds decode from static hex" $ - let meta_v9 = [hexFrom|tests/meta/v9.hex|] - in decode meta_v9 `shouldBe` Right (MetadataVersioned MagicNumber (V9 _)) + it "succeeds decode from hex and json" $ do + let hex_v9 = decode [hexFrom|tests/meta/v9.hex|] :: Either String Metadata + json_v9 <- eitherDecodeFileStrict "tests/meta/v9.json" + hex_v9 `shouldBe` json_v9 -} - diff --git a/packages/polkadot/tests/Network/Polkadot/Test/SanitizeSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/SanitizeSpec.hs new file mode 100644 index 00000000..056102e2 --- /dev/null +++ b/packages/polkadot/tests/Network/Polkadot/Test/SanitizeSpec.hs @@ -0,0 +1,63 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Codec.Scale.Test.SanitizeSpec +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Polkadot type name sanitize tests ported from: +-- https://github.com/polkadot-js/api/blob/v2.3.1/packages/types/src/create/sanitize.spec.ts +-- + +module Network.Polkadot.Test.SanitizeSpec where + +import Codec.Scale (decode) +import Data.Aeson (eitherDecodeFileStrict) +import Data.ByteArray.HexString (HexString, hexFrom) +import Network.Polkadot.Metadata (Metadata) +import Network.Polkadot.Metadata.MagicNumber (MagicNumber (..)) +import Network.Polkadot.Metadata.Type (sanitize) +import Test.Hspec + +spec :: Spec +spec = parallel $ do + describe "alias" $ do + let exec = alias ["String"] "Text" + + it "replaces all occurrences for types" $ + exec "(String,Address,MasterString,String)" + `shouldBe` "(Text,Address,MasterString,Text)" + + it "replaces actual types, but leaves struct names" $ + exec "{\"system\":\"String\",\"versionString\":\"String\"}" + `shouldBe` "{\"system\":\"Text\",\"versionString\":\"Text\"}" + + it "handles the preceding correctly" $ + exec "String String (String,[String;32],String)\"String" + `shouldBe` "Text Text (Text,[Text;32],Text)\"Text" + + it "handles emdedded Vec/Tuples" $ do + let ann = alias ["Announcement"] "ProxyAnnouncement" + ann "(Vec,BalanceOf)" + `shouldBe` "(Vec,BalanceOf)" + + describe "removeColons" $ do + it "removes preceding ::Text -> Text" $ + removeColons "::Text" `shouldBe` "Text" + + it "removes middle voting::TallyType -> TallyType" $ + removeColons "voting::TallyType" `shouldBe` "TallyType" + + it "removes on embedded values (one)" $ + removeColons "(T::AccountId, SpanIndex)" `shouldBe` "(AccountId, SpanIndex)" + + it "removes on embedded values (all)" $ + removeColons "(T::AccountId, slashing::SpanIndex)" + `shouldBe` "(AccountId, SpanIndex)" + + it "keeps with allowNamespaces" $ + removeColons "::slashing::SpanIndex" `shouldBe` "slashing::SpanIndex" diff --git a/packages/polkadot/tests/meta/v9.hex b/packages/polkadot/tests/meta/v9.hex new file mode 100644 index 00000000..d3dd6bf3 --- /dev/null +++ b/packages/polkadot/tests/meta/v9.hex @@ -0,0 +1 @@ +0x6d65746109641853797374656d011853797374656d34304163636f756e744e6f6e636501010130543a3a4163636f756e74496420543a3a496e646578001000000000047c2045787472696e73696373206e6f6e636520666f72206163636f756e74732e3845787472696e736963436f756e7400000c753332040004b820546f74616c2065787472696e7369637320636f756e7420666f72207468652063757272656e7420626c6f636b2e4c416c6c45787472696e73696373576569676874000018576569676874040004150120546f74616c2077656967687420666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e40416c6c45787472696e736963734c656e00000c753332040004410120546f74616c206c656e6774682028696e2062797465732920666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e24426c6f636b4861736801010138543a3a426c6f636b4e756d6265721c543a3a48617368008000000000000000000000000000000000000000000000000000000000000000000498204d6170206f6620626c6f636b206e756d6265727320746f20626c6f636b206861736865732e3445787472696e736963446174610101010c7533321c5665633c75383e000400043d012045787472696e73696373206461746120666f72207468652063757272656e7420626c6f636b20286d61707320616e2065787472696e736963277320696e64657820746f206974732064617461292e184e756d626572010038543a3a426c6f636b4e756d6265721000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000004702048617368206f66207468652070726576696f757320626c6f636b2e3845787472696e73696373526f6f7401001c543a3a486173688000000000000000000000000000000000000000000000000000000000000000000415012045787472696e7369637320726f6f74206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e1844696765737401002c4469676573744f663c543e040004f020446967657374206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e184576656e747301008c5665633c4576656e745265636f72643c543a3a4576656e742c20543a3a486173683e3e040004a0204576656e7473206465706f736974656420666f72207468652063757272656e7420626c6f636b2e284576656e74436f756e740100284576656e74496e646578100000000004b820546865206e756d626572206f66206576656e747320696e2074686520604576656e74733c543e60206c6973742e2c4576656e74546f706963730102010828291c543a3a48617368845665633c28543a3a426c6f636b4e756d6265722c204576656e74496e646578293e010400342501204d617070696e67206265747765656e206120746f7069632028726570726573656e74656420627920543a3a486173682920616e64206120766563746f72206f6620696e646578657394206f66206576656e747320696e2074686520603c4576656e74733c543e3e60206c6973742e002d0120546865206669727374206b657920736572766573206e6f20707572706f73652e2054686973206669656c64206973206465636c6172656420617320646f75626c655f6d6170206a757374a820666f7220636f6e76656e69656e6365206f66207573696e67206072656d6f76655f707265666978602e00510120416c6c20746f70696320766563746f727320686176652064657465726d696e69737469632073746f72616765206c6f636174696f6e7320646570656e64696e67206f6e2074686520746f7069632e2054686973450120616c6c6f7773206c696768742d636c69656e747320746f206c6576657261676520746865206368616e67657320747269652073746f7261676520747261636b696e67206d656368616e69736d20616e64e420696e2063617365206f66206368616e67657320666574636820746865206c697374206f66206576656e7473206f6620696e7465726573742e004d01205468652076616c756520686173207468652074797065206028543a3a426c6f636b4e756d6265722c204576656e74496e646578296020626563617573652069662077652075736564206f6e6c79206a7573744d012074686520604576656e74496e64657860207468656e20696e20636173652069662074686520746f70696320686173207468652073616d6520636f6e74656e7473206f6e20746865206e65787420626c6f636b0101206e6f206e6f74696669636174696f6e2077696c6c20626520747269676765726564207468757320746865206576656e74206d69676874206265206c6f73742e011c2866696c6c5f626c6f636b0004210120412062696720646973706174636820746861742077696c6c20646973616c6c6f7720616e79206f74686572207472616e73616374696f6e20746f20626520696e636c756465642e1872656d61726b041c5f72656d61726b1c5665633c75383e046c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e387365745f686561705f7061676573041470616765730c75363404fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e207365745f636f6465040c6e65771c5665633c75383e04482053657420746865206e657720636f64652e2c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e046c2053657420736f6d65206974656d73206f662073746f726167652e306b696c6c5f73746f7261676504106b657973205665633c4b65793e0478204b696c6c20736f6d65206974656d732066726f6d2073746f726167652e2c6b696c6c5f70726566697804187072656669780c4b6579041501204b696c6c20616c6c2073746f72616765206974656d7320776974682061206b657920746861742073746172747320776974682074686520676976656e207072656669782e01084045787472696e7369635375636365737304304469737061746368496e666f049420416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e3c45787472696e7369634661696c6564083444697370617463684572726f72304469737061746368496e666f045420416e2065787472696e736963206661696c65642e000c4c526571756972655369676e65644f726967696e004452657175697265526f6f744f726967696e003c526571756972654e6f4f726967696e001c5574696c697479000104146261746368041463616c6c735c5665633c3c542061732054726169743e3a3a43616c6c3e04b02053656e642061206261746368206f662064697370617463682063616c6c7320286f6e6c7920726f6f74292e0104344261746368457865637574656404785665633c526573756c743c28292c2044697370617463684572726f723e3e0000001042616265011042616265242845706f6368496e64657801000c75363420000000000000000004542043757272656e742065706f636820696e6465782e2c417574686f72697469657301009c5665633c28417574686f7269747949642c2042616265417574686f72697479576569676874293e0400046c2043757272656e742065706f636820617574686f7269746965732e2c47656e65736973536c6f7401000c75363420000000000000000008f82054686520736c6f74206174207768696368207468652066697273742065706f63682061637475616c6c7920737461727465642e205468697320697320309020756e74696c2074686520666972737420626c6f636b206f662074686520636861696e2e2c43757272656e74536c6f7401000c75363420000000000000000004542043757272656e7420736c6f74206e756d6265722e2852616e646f6d6e6573730100205b75383b2033325d80000000000000000000000000000000000000000000000000000000000000000028b8205468652065706f63682072616e646f6d6e65737320666f7220746865202a63757272656e742a2065706f63682e002c20232053656375726974790005012054686973204d555354204e4f54206265207573656420666f722067616d626c696e672c2061732069742063616e20626520696e666c75656e6365642062792061f8206d616c6963696f75732076616c696461746f7220696e207468652073686f7274207465726d2e204974204d4159206265207573656420696e206d616e7915012063727970746f677261706869632070726f746f636f6c732c20686f77657665722c20736f206c6f6e67206173206f6e652072656d656d6265727320746861742074686973150120286c696b652065766572797468696e6720656c7365206f6e2d636861696e29206974206973207075626c69632e20466f72206578616d706c652c2069742063616e206265050120757365642077686572652061206e756d626572206973206e656564656420746861742063616e6e6f742068617665206265656e2063686f73656e20627920616e0d01206164766572736172792c20666f7220707572706f7365732073756368206173207075626c69632d636f696e207a65726f2d6b6e6f776c656467652070726f6f66732e384e65787452616e646f6d6e6573730100205b75383b2033325d800000000000000000000000000000000000000000000000000000000000000000045c204e6578742065706f63682072616e646f6d6e6573732e305365676d656e74496e64657801000c7533321000000000247c2052616e646f6d6e65737320756e64657220636f6e737472756374696f6e2e00f4205765206d616b6520612074726164656f6666206265747765656e2073746f7261676520616363657373657320616e64206c697374206c656e6774682e01012057652073746f72652074686520756e6465722d636f6e737472756374696f6e2072616e646f6d6e65737320696e207365676d656e7473206f6620757020746f942060554e4445525f434f4e535452554354494f4e5f5345474d454e545f4c454e475448602e00ec204f6e63652061207365676d656e7420726561636865732074686973206c656e6774682c20776520626567696e20746865206e657874206f6e652e090120576520726573657420616c6c207365676d656e747320616e642072657475726e20746f206030602061742074686520626567696e6e696e67206f662065766572791c2065706f63682e44556e646572436f6e737472756374696f6e0101010c753332345665633c5b75383b2033325d3e000400002c496e697469616c697a65640000204d6179626556726604000801012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e292077686963682069732060536f6d65601d01206966207065722d626c6f636b20696e697469616c697a6174696f6e2068617320616c7265616479206265656e2063616c6c656420666f722063757272656e7420626c6f636b2e010000083445706f63684475726174696f6e0c75363420c800000000000000080d0120546865206e756d626572206f66202a2a736c6f74732a2a207468617420616e2065706f63682074616b65732e20576520636f75706c652073657373696f6e7320746ffc2065706f6368732c20692e652e2077652073746172742061206e65772073657373696f6e206f6e636520746865206e65772065706f636820626567696e732e444578706563746564426c6f636b54696d6524543a3a4d6f6d656e7420b80b00000000000014050120546865206578706563746564206176657261676520626c6f636b2074696d6520617420776869636820424142452073686f756c64206265206372656174696e67110120626c6f636b732e2053696e636520424142452069732070726f626162696c6973746963206974206973206e6f74207472697669616c20746f20666967757265206f75740501207768617420746865206578706563746564206176657261676520626c6f636b2074696d652073686f756c64206265206261736564206f6e2074686520736c6f740901206475726174696f6e20616e642074686520736563757269747920706172616d657465722060636020287768657265206031202d20636020726570726573656e7473a0207468652070726f626162696c697479206f66206120736c6f74206265696e6720656d707479292e002454696d657374616d70012454696d657374616d70080c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f01040c736574040c6e6f7748436f6d706163743c543a3a4d6f6d656e743e245820536574207468652063757272656e742074696d652e00590120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6ed82070686173652c20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e004501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062794420604d696e696d756d506572696f64602e00d820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060496e686572656e74602e0004344d696e696d756d506572696f6424543a3a4d6f6d656e7420dc0500000000000010690120546865206d696e696d756d20706572696f64206265747765656e20626c6f636b732e204265776172652074686174207468697320697320646966666572656e7420746f20746865202a65787065637465642a20706572696f64690120746861742074686520626c6f636b2070726f64756374696f6e206170706172617475732070726f76696465732e20596f75722063686f73656e20636f6e73656e7375732073797374656d2077696c6c2067656e6572616c6c79650120776f726b2077697468207468697320746f2064657465726d696e6520612073656e7369626c6520626c6f636b2074696d652e20652e672e20466f7220417572612c2069742077696c6c20626520646f75626c6520746869737020706572696f64206f6e2064656661756c742073657474696e67732e0028417574686f72736869700128417574686f72736869700c18556e636c65730100e85665633c556e636c65456e7472794974656d3c543a3a426c6f636b4e756d6265722c20543a3a486173682c20543a3a4163636f756e7449643e3e0400041c20556e636c657318417574686f72000030543a3a4163636f756e7449640400046420417574686f72206f662063757272656e7420626c6f636b2e30446964536574556e636c6573010010626f6f6c040004bc205768657468657220756e636c6573207765726520616c72656164792073657420696e207468697320626c6f636b2e0104287365745f756e636c657304286e65775f756e636c6573385665633c543a3a4865616465723e04642050726f76696465206120736574206f6620756e636c65732e0000001c496e6469636573011c496e6469636573082c4e657874456e756d53657401003c543a3a4163636f756e74496e6465781000000000047c20546865206e657874206672656520656e756d65726174696f6e207365742e1c456e756d5365740101013c543a3a4163636f756e74496e646578445665633c543a3a4163636f756e7449643e00040004582054686520656e756d65726174696f6e20736574732e010001043c4e65774163636f756e74496e64657808244163636f756e744964304163636f756e74496e64657810882041206e6577206163636f756e7420696e646578207761732061737369676e65642e0005012054686973206576656e74206973206e6f7420747269676765726564207768656e20616e206578697374696e6720696e64657820697320726561737369676e65646020746f20616e6f7468657220604163636f756e744964602e00002042616c616e636573012042616c616e6365731434546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004982054686520746f74616c20756e6974732069737375656420696e207468652073797374656d2e1c56657374696e6700010130543a3a4163636f756e744964ac56657374696e675363686564756c653c543a3a42616c616e63652c20543a3a426c6f636b4e756d6265723e00040004d820496e666f726d6174696f6e20726567617264696e67207468652076657374696e67206f66206120676976656e206163636f756e742e2c4672656542616c616e636501010130543a3a4163636f756e74496428543a3a42616c616e63650040000000000000000000000000000000002c9c20546865202766726565272062616c616e6365206f66206120676976656e206163636f756e742e004101205468697320697320746865206f6e6c792062616c616e63652074686174206d61747465727320696e207465726d73206f66206d6f7374206f7065726174696f6e73206f6e20746f6b656e732e204974750120616c6f6e65206973207573656420746f2064657465726d696e65207468652062616c616e6365207768656e20696e2074686520636f6e747261637420657865637574696f6e20656e7669726f6e6d656e742e205768656e207468697355012062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e20746865202763757272656e74206163636f756e74272069733d012064656c657465643a207370656369666963616c6c7920604672656542616c616e6365602e20467572746865722c2074686520604f6e4672656542616c616e63655a65726f602063616c6c6261636b450120697320696e766f6b65642c20676976696e672061206368616e636520746f2065787465726e616c206d6f64756c657320746f20636c65616e2075702064617461206173736f636961746564207769746854207468652064656c65746564206163636f756e742e005d01206073797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c657465642069662060526573657276656442616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473150120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e3c526573657276656442616c616e636501010130543a3a4163636f756e74496428543a3a42616c616e63650040000000000000000000000000000000002c75012054686520616d6f756e74206f66207468652062616c616e6365206f66206120676976656e206163636f756e7420746861742069732065787465726e616c6c792072657365727665643b20746869732063616e207374696c6c206765749c20736c61736865642c20627574206765747320736c6173686564206c617374206f6620616c6c2e006d0120546869732062616c616e63652069732061202772657365727665272062616c616e63652074686174206f746865722073756273797374656d732075736520696e206f7264657220746f2073657420617369646520746f6b656e732501207468617420617265207374696c6c20276f776e65642720627920746865206163636f756e7420686f6c6465722c20627574207768696368206172652073757370656e6461626c652e007501205768656e20746869732062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e2074686973202772657365727665206163636f756e7427b42069732064656c657465643a207370656369666963616c6c792c2060526573657276656442616c616e6365602e004d01206073797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c6574656420696620604672656542616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473190120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e29144c6f636b7301010130543a3a4163636f756e744964b05665633c42616c616e63654c6f636b3c543a3a42616c616e63652c20543a3a426c6f636b4e756d6265723e3e00040004b820416e79206c6971756964697479206c6f636b73206f6e20736f6d65206163636f756e742062616c616e6365732e0110207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e64d8205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572206163636f756e742e00090120607472616e73666572602077696c6c207365742074686520604672656542616c616e636560206f66207468652073656e64657220616e642072656365697665722e21012049742077696c6c2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d2062792074686520605472616e73666572466565602e1501204966207468652073656e6465722773206163636f756e742069732062656c6f7720746865206578697374656e7469616c206465706f736974206173206120726573756c74b4206f6620746865207472616e736665722c20746865206163636f756e742077696c6c206265207265617065642e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605369676e65646020627920746865207472616e736163746f722e002c2023203c7765696768743e3101202d20446570656e64656e74206f6e20617267756d656e747320627574206e6f7420637269746963616c2c20676976656e2070726f70657220696d706c656d656e746174696f6e7320666f72cc202020696e70757420636f6e6669672074797065732e205365652072656c617465642066756e6374696f6e732062656c6f772e6901202d20497420636f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e642077726974657320696e7465726e616c6c7920616e64206e6f20636f6d706c657820636f6d7075746174696f6e2e004c2052656c617465642066756e6374696f6e733a0051012020202d2060656e737572655f63616e5f77697468647261776020697320616c776179732063616c6c656420696e7465726e616c6c792062757420686173206120626f756e64656420636f6d706c65786974792e2d012020202d205472616e7366657272696e672062616c616e63657320746f206163636f756e7473207468617420646964206e6f74206578697374206265666f72652077696c6c206361757365d420202020202060543a3a4f6e4e65774163636f756e743a3a6f6e5f6e65775f6163636f756e746020746f2062652063616c6c65642edc2020202d2052656d6f76696e6720656e6f7567682066756e64732066726f6d20616e206163636f756e742077696c6c20747269676765725901202020202060543a3a4475737452656d6f76616c3a3a6f6e5f756e62616c616e6365646020616e642060543a3a4f6e4672656542616c616e63655a65726f3a3a6f6e5f667265655f62616c616e63655f7a65726f602e49012020202d20607472616e736665725f6b6565705f616c6976656020776f726b73207468652073616d652077617920617320607472616e73666572602c206275742068617320616e206164646974696f6e616cf82020202020636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c20746865206f726967696e206163636f756e742e00302023203c2f7765696768743e2c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365206e65775f667265654c436f6d706163743c543a3a42616c616e63653e306e65775f72657365727665644c436f6d706163743c543a3a42616c616e63653e349420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e00210120546869732077696c6c20616c74657220604672656542616c616e63656020616e642060526573657276656442616c616e63656020696e2073746f726167652e2069742077696c6c090120616c736f2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d202860546f74616c49737375616e636560292e190120496620746865206e65772066726565206f722072657365727665642062616c616e63652069732062656c6f7720746865206578697374656e7469616c206465706f7369742ce82069742077696c6c20726573657420746865206163636f756e74206e6f6e636520286073797374656d3a3a4163636f756e744e6f6e636560292e00b420546865206469737061746368206f726967696e20666f7220746869732063616c6c2069732060726f6f74602e002c2023203c7765696768743e80202d20496e646570656e64656e74206f662074686520617267756d656e74732ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e302023203c2f7765696768743e38666f7263655f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e0851012045786163746c7920617320607472616e73666572602c2065786365707420746865206f726967696e206d75737420626520726f6f7420616e642074686520736f75726365206163636f756e74206d61792062652c207370656369666965642e4c7472616e736665725f6b6565705f616c6976650810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e1851012053616d6520617320746865205b607472616e73666572605d2063616c6c2c206275742077697468206120636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c2074686540206f726967696e206163636f756e742e00bc20393925206f66207468652074696d6520796f752077616e74205b607472616e73666572605d20696e73746561642e00c4205b607472616e73666572605d3a207374727563742e4d6f64756c652e68746d6c236d6574686f642e7472616e73666572010c284e65774163636f756e7408244163636f756e7449641c42616c616e6365046c2041206e6577206163636f756e742077617320637265617465642e345265617065644163636f756e7404244163636f756e744964045c20416e206163636f756e7420776173207265617065642e205472616e7366657210244163636f756e744964244163636f756e7449641c42616c616e63651c42616c616e636504b0205472616e7366657220737563636565646564202866726f6d2c20746f2c2076616c75652c2066656573292e0c484578697374656e7469616c4465706f73697428543a3a42616c616e63654000407a10f35a0000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f206b65657020616e206163636f756e74206f70656e2e2c5472616e7366657246656528543a3a42616c616e6365400010a5d4e800000000000000000000000494205468652066656520726571756972656420746f206d616b652061207472616e736665722e2c4372656174696f6e46656528543a3a42616c616e6365400010a5d4e80000000000000000000000049c205468652066656520726571756972656420746f2063726561746520616e206163636f756e742e00485472616e73616374696f6e5061796d656e74012042616c616e63657304444e6578744665654d756c7469706c6965720100284d756c7469706c69657220000000000000000000000008485472616e73616374696f6e426173654665653042616c616e63654f663c543e400010a5d4e8000000000000000000000004dc205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b2074686520626173652e485472616e73616374696f6e427974654665653042616c616e63654f663c543e4000e40b54020000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e001c5374616b696e67011c5374616b696e67683856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321004000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e34496e76756c6e657261626c65730100445665633c543a3a4163636f756e7449643e04000c590120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c79206b69636b65642e20497427732061205665632073696e636520746865792772654d01206561737920746f20696e697469616c697a6520616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f7572ac20696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e18426f6e64656400010130543a3a4163636f756e74496430543a3a4163636f756e744964000400040101204d61702066726f6d20616c6c206c6f636b65642022737461736822206163636f756e747320746f2074686520636f6e74726f6c6c6572206163636f756e742e184c656467657200010130543a3a4163636f756e744964a45374616b696e674c65646765723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400044501204d61702066726f6d20616c6c2028756e6c6f636b6564292022636f6e74726f6c6c657222206163636f756e747320746f2074686520696e666f20726567617264696e6720746865207374616b696e672e14506179656501010130543a3a4163636f756e7449644452657761726444657374696e6174696f6e00040004e42057686572652074686520726577617264207061796d656e742073686f756c64206265206d6164652e204b657965642062792073746173682e2856616c696461746f727301010130543a3a4163636f756e7449643856616c696461746f72507265667301040004450120546865206d61702066726f6d202877616e6e616265292076616c696461746f72207374617368206b657920746f2074686520707265666572656e636573206f6620746861742076616c696461746f722e284e6f6d696e61746f727300010130543a3a4163636f756e744964644e6f6d696e6174696f6e733c543a3a4163636f756e7449643e01040010650120546865206d61702066726f6d206e6f6d696e61746f72207374617368206b657920746f2074686520736574206f66207374617368206b657973206f6620616c6c2076616c696461746f727320746f206e6f6d696e6174652e003501204e4f54453a206973207072697661746520736f20746861742077652063616e20656e73757265207570677261646564206265666f726520616c6c207479706963616c2061636365737365732ed8204469726563742073746f7261676520415049732063616e207374696c6c2062797061737320746869732070726f74656374696f6e2e1c5374616b65727301010130543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000c000000104d01204e6f6d696e61746f727320666f72206120706172746963756c6172206163636f756e74207468617420697320696e20616374696f6e207269676874206e6f772e20596f752063616e277420697465726174651901207468726f7567682076616c696461746f727320686572652c2062757420796f752063616e2066696e64207468656d20696e207468652053657373696f6e206d6f64756c652e00902054686973206973206b6579656420627920746865207374617368206163636f756e742e3843757272656e74456c65637465640100445665633c543a3a4163636f756e7449643e040004fc205468652063757272656e746c7920656c65637465642076616c696461746f7220736574206b65796564206279207374617368206163636f756e742049442e2843757272656e74457261010020457261496e6465781000000000045c205468652063757272656e742065726120696e6465782e3c43757272656e74457261537461727401002c4d6f6d656e744f663c543e200000000000000000047820546865207374617274206f66207468652063757272656e74206572612e6c43757272656e74457261537461727453657373696f6e496e64657801003053657373696f6e496e646578100000000004d0205468652073657373696f6e20696e646578206174207768696368207468652063757272656e742065726120737461727465642e5843757272656e74457261506f696e74734561726e6564010024457261506f696e7473140000000000040d01205265776172647320666f72207468652063757272656e74206572612e205573696e6720696e6469636573206f662063757272656e7420656c6563746564207365742e24536c6f745374616b6501003042616c616e63654f663c543e40000000000000000000000000000000000c31012054686520616d6f756e74206f662062616c616e6365206163746976656c79206174207374616b6520666f7220656163682076616c696461746f7220736c6f742c2063757272656e746c792e00c02054686973206973207573656420746f20646572697665207265776172647320616e642070756e6973686d656e74732e20466f72636545726101001c466f7263696e670400041d01205472756520696620746865206e6578742073657373696f6e206368616e67652077696c6c2062652061206e657720657261207265676172646c657373206f6620696e6465782e4c536c6173685265776172644672616374696f6e01001c50657262696c6c10000000000cf8205468652070657263656e74616765206f662074686520736c617368207468617420697320646973747269627574656420746f207265706f72746572732e00e4205468652072657374206f662074686520736c61736865642076616c75652069732068616e646c6564206279207468652060536c617368602e4c43616e63656c6564536c6173685061796f757401003042616c616e63654f663c543e40000000000000000000000000000000000815012054686520616d6f756e74206f662063757272656e637920676976656e20746f207265706f7274657273206f66206120736c617368206576656e7420776869636820776173ec2063616e63656c65642062792065787472616f7264696e6172792063697263756d7374616e6365732028652e672e20676f7665726e616e6365292e40556e6170706c696564536c617368657301010120457261496e646578bc5665633c556e6170706c696564536c6173683c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e00040004c420416c6c20756e6170706c69656420736c61736865732074686174206172652071756575656420666f72206c617465722e28426f6e646564457261730100745665633c28457261496e6465782c2053657373696f6e496e646578293e04000425012041206d617070696e672066726f6d207374696c6c2d626f6e646564206572617320746f207468652066697273742073657373696f6e20696e646578206f662074686174206572612e4c56616c696461746f72536c617368496e45726100020120457261496e64657830543a3a4163636f756e7449645c2850657262696c6c2c2042616c616e63654f663c543e2902040008450120416c6c20736c617368696e67206576656e7473206f6e2076616c696461746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682070726f706f7274696f6e7020616e6420736c6173682076616c7565206f6620746865206572612e4c4e6f6d696e61746f72536c617368496e45726100020120457261496e64657830543a3a4163636f756e7449643042616c616e63654f663c543e02040004610120416c6c20736c617368696e67206576656e7473206f6e206e6f6d696e61746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682076616c7565206f6620746865206572612e34536c617368696e675370616e7300010130543a3a4163636f756e7449645c736c617368696e673a3a536c617368696e675370616e73000400048c20536c617368696e67207370616e7320666f72207374617368206163636f756e74732e245370616e536c6173680101018c28543a3a4163636f756e7449642c20736c617368696e673a3a5370616e496e6465782988736c617368696e673a3a5370616e5265636f72643c42616c616e63654f663c543e3e00800000000000000000000000000000000000000000000000000000000000000000083d01205265636f72647320696e666f726d6174696f6e2061626f757420746865206d6178696d756d20736c617368206f6620612073746173682077697468696e206120736c617368696e67207370616e2cb82061732077656c6c20617320686f77206d7563682072657761726420686173206265656e2070616964206f75742e584561726c69657374556e6170706c696564536c617368000020457261496e646578040004fc20546865206561726c696573742065726120666f72207768696368207765206861766520612070656e64696e672c20756e6170706c69656420736c6173682e3853746f7261676556657273696f6e01000c75333210000000000490205468652076657273696f6e206f662073746f7261676520666f7220757067726164652e014010626f6e640c28636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e1470617965654452657761726444657374696e6174696f6e3c65012054616b6520746865206f726967696e206163636f756e74206173206120737461736820616e64206c6f636b207570206076616c756560206f66206974732062616c616e63652e2060636f6e74726f6c6c6572602077696c6c8420626520746865206163636f756e74207468617420636f6e74726f6c732069742e003101206076616c756560206d757374206265206d6f7265207468616e2074686520606d696e696d756d5f62616c616e636560207370656369666965642062792060543a3a43757272656e6379602e00250120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20627920746865207374617368206163636f756e742e002c2023203c7765696768743ed4202d20496e646570656e64656e74206f662074686520617267756d656e74732e204d6f64657261746520636f6d706c65786974792e20202d204f2831292e68202d20546872656520657874726120444220656e74726965732e006d01204e4f54453a2054776f206f66207468652073746f726167652077726974657320286053656c663a3a626f6e646564602c206053656c663a3a7061796565602920617265205f6e657665725f20636c65616e656420756e6c65737325012074686520606f726967696e602066616c6c732062656c6f77205f6578697374656e7469616c206465706f7369745f20616e6420676574732072656d6f76656420617320647573742e302023203c2f7765696768743e28626f6e645f657874726104386d61785f6164646974696f6e616c54436f6d706163743c42616c616e63654f663c543e3e3865012041646420736f6d6520657874726120616d6f756e742074686174206861766520617070656172656420696e207468652073746173682060667265655f62616c616e63656020696e746f207468652062616c616e63652075703420666f72207374616b696e672e00510120557365207468697320696620746865726520617265206164646974696f6e616c2066756e647320696e20796f7572207374617368206163636f756e74207468617420796f75207769736820746f20626f6e642e650120556e6c696b65205b60626f6e64605d206f72205b60756e626f6e64605d20746869732066756e6374696f6e20646f6573206e6f7420696d706f736520616e79206c696d69746174696f6e206f6e2074686520616d6f756e744c20746861742063616e2062652061646465642e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e20202d204f2831292e40202d204f6e6520444220656e7472792e302023203c2f7765696768743e18756e626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e5c5501205363686564756c65206120706f7274696f6e206f662074686520737461736820746f20626520756e6c6f636b656420726561647920666f72207472616e73666572206f75742061667465722074686520626f6e64010120706572696f6420656e64732e2049662074686973206c656176657320616e20616d6f756e74206163746976656c7920626f6e646564206c657373207468616e250120543a3a43757272656e63793a3a6d696e696d756d5f62616c616e636528292c207468656e20697420697320696e6372656173656420746f207468652066756c6c20616d6f756e742e004901204f6e63652074686520756e6c6f636b20706572696f6420697320646f6e652c20796f752063616e2063616c6c206077697468647261775f756e626f6e6465646020746f2061637475616c6c79206d6f7665c0207468652066756e6473206f7574206f66206d616e6167656d656e7420726561647920666f72207472616e736665722e003d01204e6f206d6f7265207468616e2061206c696d69746564206e756d626572206f6620756e6c6f636b696e67206368756e6b73202873656520604d41585f554e4c4f434b494e475f4348554e4b5360293d012063616e20636f2d657869737473206174207468652073616d652074696d652e20496e207468617420636173652c205b6043616c6c3a3a77697468647261775f756e626f6e646564605d206e656564fc20746f2062652063616c6c656420666972737420746f2072656d6f766520736f6d65206f6620746865206368756e6b732028696620706f737369626c65292e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e00982053656520616c736f205b6043616c6c3a3a77697468647261775f756e626f6e646564605d2e002c2023203c7765696768743e4101202d20496e646570656e64656e74206f662074686520617267756d656e74732e204c696d697465642062757420706f74656e7469616c6c79206578706c6f697461626c6520636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732e6501202d20456163682063616c6c20287265717569726573207468652072656d61696e646572206f662074686520626f6e6465642062616c616e636520746f2062652061626f766520606d696e696d756d5f62616c616e63656029710120202077696c6c2063617573652061206e657720656e74727920746f20626520696e73657274656420696e746f206120766563746f722028604c65646765722e756e6c6f636b696e676029206b65707420696e2073746f726167652ea501202020546865206f6e6c792077617920746f20636c65616e207468652061666f72656d656e74696f6e65642073746f72616765206974656d20697320616c736f20757365722d636f6e74726f6c6c656420766961206077697468647261775f756e626f6e646564602e40202d204f6e6520444220656e7472792e28203c2f7765696768743e4477697468647261775f756e626f6e64656400402d012052656d6f766520616e7920756e6c6f636b6564206368756e6b732066726f6d207468652060756e6c6f636b696e67602071756575652066726f6d206f7572206d616e6167656d656e742e003501205468697320657373656e7469616c6c7920667265657320757020746861742062616c616e636520746f206265207573656420627920746865207374617368206163636f756e7420746f20646f4c2077686174657665722069742077616e74732e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e006c2053656520616c736f205b6043616c6c3a3a756e626f6e64605d2e002c2023203c7765696768743e5501202d20436f756c6420626520646570656e64656e74206f6e2074686520606f726967696e6020617267756d656e7420616e6420686f77206d7563682060756e6c6f636b696e6760206368756e6b732065786973742e45012020497420696d706c6965732060636f6e736f6c69646174655f756e6c6f636b656460207768696368206c6f6f7073206f76657220604c65646765722e756e6c6f636b696e67602c207768696368206973f42020696e6469726563746c7920757365722d636f6e74726f6c6c65642e20536565205b60756e626f6e64605d20666f72206d6f72652064657461696c2e7901202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732c20796574207468652073697a65206f6620776869636820636f756c64206265206c61726765206261736564206f6e20606c6564676572602ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e2076616c6964617465041470726566733856616c696461746f7250726566732ce8204465636c617265207468652064657369726520746f2076616c696461746520666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e206e6f6d696e617465041c74617267657473a05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e2c1101204465636c617265207468652064657369726520746f206e6f6d696e6174652060746172676574736020666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743e2501202d20546865207472616e73616374696f6e277320636f6d706c65786974792069732070726f706f7274696f6e616c20746f207468652073697a65206f66206074617267657473602c982077686963682069732063617070656420617420604d41585f4e4f4d494e4154494f4e53602ed8202d20426f74682074686520726561647320616e642077726974657320666f6c6c6f7720612073696d696c6172207061747465726e2e302023203c2f7765696768743e146368696c6c002cc8204465636c617265206e6f2064657369726520746f206569746865722076616c6964617465206f72206e6f6d696e6174652e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e54202d20436f6e7461696e73206f6e6520726561642ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e247365745f7061796565041470617965654452657761726444657374696e6174696f6e2cb8202852652d2973657420746865207061796d656e742074617267657420666f72206120636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e387365745f636f6e74726f6c6c65720428636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c90202852652d297365742074686520636f6e74726f6c6c6572206f6620612073746173682e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e4c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e04802054686520696465616c206e756d626572206f662076616c696461746f72732e34666f7263655f6e6f5f657261730014b020466f72636520746865726520746f206265206e6f206e6577206572617320696e646566696e6974656c792e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e302023203c2f7765696768743e34666f7263655f6e65775f65726100184d0120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f6620746865206e6578742073657373696f6e2e20416674657220746869732c2069742077696c6c206265a020726573657420746f206e6f726d616c20286e6f6e2d666f7263656429206265686176696f75722e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e302023203c2f7765696768743e447365745f696e76756c6e657261626c6573042876616c696461746f7273445665633c543a3a4163636f756e7449643e04cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e34666f7263655f756e7374616b650414737461736830543a3a4163636f756e744964040d0120466f72636520612063757272656e74207374616b657220746f206265636f6d6520636f6d706c6574656c7920756e7374616b65642c20696d6d6564696174656c792e50666f7263655f6e65775f6572615f616c776179730014050120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f662073657373696f6e7320696e646566696e6974656c792e002c2023203c7765696768743e50202d204f6e652073746f72616765207772697465302023203c2f7765696768743e5463616e63656c5f64656665727265645f736c617368080c65726120457261496e64657834736c6173685f696e6469636573205665633c7533323e1c45012043616e63656c20656e6163746d656e74206f66206120646566657272656420736c6173682e2043616e2062652063616c6c6564206279206569746865722074686520726f6f74206f726967696e206f7270207468652060543a3a536c61736843616e63656c4f726967696e602e05012070617373696e67207468652065726120616e6420696e6469636573206f662074686520736c617368657320666f7220746861742065726120746f206b696c6c2e002c2023203c7765696768743e54202d204f6e652073746f726167652077726974652e302023203c2f7765696768743e010c18526577617264081c42616c616e63651c42616c616e636508510120416c6c2076616c696461746f72732068617665206265656e207265776172646564206279207468652066697273742062616c616e63653b20746865207365636f6e64206973207468652072656d61696e6465728c2066726f6d20746865206d6178696d756d20616d6f756e74206f66207265776172642e14536c61736808244163636f756e7449641c42616c616e6365042501204f6e652076616c696461746f722028616e6420697473206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e684f6c64536c617368696e675265706f7274446973636172646564043053657373696f6e496e646578081d0120416e206f6c6420736c617368696e67207265706f72742066726f6d2061207072696f72206572612077617320646973636172646564206265636175736520697420636f756c6448206e6f742062652070726f6365737365642e083853657373696f6e735065724572613053657373696f6e496e64657810060000000470204e756d626572206f662073657373696f6e7320706572206572612e3c426f6e64696e674475726174696f6e20457261496e64657810a002000004e4204e756d626572206f6620657261732074686174207374616b65642066756e6473206d7573742072656d61696e20626f6e64656420666f722e001c53657373696f6e011c53657373696f6e1c2856616c696461746f727301004c5665633c543a3a56616c696461746f7249643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3043757272656e74496e64657801003053657373696f6e496e646578100000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e345175657565644368616e676564010010626f6f6c040008390120547275652069662074686520756e6465726c79696e672065636f6e6f6d6963206964656e746974696573206f7220776569676874696e6720626568696e64207468652076616c696461746f7273a420686173206368616e67656420696e20746865207175657565642076616c696461746f72207365742e285175657565644b6579730100785665633c28543a3a56616c696461746f7249642c20543a3a4b657973293e0400083d012054686520717565756564206b65797320666f7220746865206e6578742073657373696f6e2e205768656e20746865206e6578742073657373696f6e20626567696e732c207468657365206b657973e02077696c6c206265207573656420746f2064657465726d696e65207468652076616c696461746f7227732073657373696f6e206b6579732e4844697361626c656456616c696461746f72730100205665633c7533323e04000c8020496e6469636573206f662064697361626c65642076616c696461746f72732e003501205468652073657420697320636c6561726564207768656e20606f6e5f73657373696f6e5f656e64696e67602072657475726e732061206e657720736574206f66206964656e7469746965732e204e6578744b6579730002041c5665633c75383e38543a3a56616c696461746f7249641c543a3a4b657973010400109c20546865206e6578742073657373696f6e206b65797320666f7220612076616c696461746f722e00590120546865206669727374206b657920697320616c77617973206044454455505f4b45595f5052454649586020746f206861766520616c6c20746865206461746120696e207468652073616d65206272616e6368206f6661012074686520747269652e20486176696e6720616c6c206461746120696e207468652073616d65206272616e63682073686f756c642070726576656e7420736c6f77696e6720646f776e206f7468657220717565726965732e204b65794f776e65720002041c5665633c75383e50284b65795479706549642c205665633c75383e2938543a3a56616c696461746f72496401040010250120546865206f776e6572206f662061206b65792e20546865207365636f6e64206b65792069732074686520604b657954797065496460202b2074686520656e636f646564206b65792e00590120546865206669727374206b657920697320616c77617973206044454455505f4b45595f5052454649586020746f206861766520616c6c20746865206461746120696e207468652073616d65206272616e6368206f6661012074686520747269652e20486176696e6720616c6c206461746120696e207468652073616d65206272616e63682073686f756c642070726576656e7420736c6f77696e6720646f776e206f7468657220717565726965732e0104207365745f6b65797308106b6579731c543a3a4b6579731470726f6f661c5665633c75383e28e42053657473207468652073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c657220746f20606b6579602e210120416c6c6f777320616e206163636f756e7420746f20736574206974732073657373696f6e206b6579207072696f7220746f206265636f6d696e6720612076616c696461746f722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743e88202d204f286c6f67206e2920696e206e756d626572206f66206163636f756e74732e58202d204f6e6520657874726120444220656e7472792e302023203c2f7765696768743e0104284e657753657373696f6e043053657373696f6e496e646578085501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e74206973207468652073657373696f6e20696e6465782c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e044044454455505f4b45595f50524546495814265b75385d38343a73657373696f6e3a6b6579730865012055736564206173206669727374206b657920666f7220604e6578744b6579736020616e6420604b65794f776e65726020746f2070757420616c6c20746865206461746120696e746f207468652073616d65206272616e636834206f662074686520747269652e002444656d6f6372616379012444656d6f6372616379403c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f707301009c5665633c2850726f70496e6465782c20543a3a486173682c20543a3a4163636f756e744964293e040004210120546865207075626c69632070726f706f73616c732e20556e736f727465642e20546865207365636f6e64206974656d206973207468652070726f706f73616c277320686173682e24507265696d616765730001011c543a3a48617368d4285665633c75383e2c20543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d62657229000400086101204d6170206f662068617368657320746f207468652070726f706f73616c20707265696d6167652c20616c6f6e6720776974682077686f207265676973746572656420697420616e64207468656972206465706f7369742ee42054686520626c6f636b206e756d6265722069732074686520626c6f636b20617420776869636820697420776173206465706f73697465642e244465706f7369744f660001012450726f70496e646578842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e2900040004842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e244e65787454616c6c7901003c5265666572656e64756d496e646578100000000004c820546865206e657874207265666572656e64756d20696e64657820746861742073686f756c642062652074616c6c6965642e405265666572656e64756d496e666f4f660001013c5265666572656e64756d496e646578a4285265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a486173683e2900040004b420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e344469737061746368517565756501010438543a3a426c6f636b4e756d6265729c5665633c4f7074696f6e3c28543a3a486173682c205265666572656e64756d496e646578293e3e00040004c0205175657565206f66207375636365737366756c207265666572656e646120746f20626520646973706174636865642e24566f74657273466f720101013c5265666572656e64756d496e646578445665633c543a3a4163636f756e7449643e00040004a4204765742074686520766f7465727320666f72207468652063757272656e742070726f706f73616c2e18566f74654f660101017c285265666572656e64756d496e6465782c20543a3a4163636f756e7449642910566f7465000400106101204765742074686520766f746520696e206120676976656e207265666572656e64756d206f66206120706172746963756c617220766f7465722e2054686520726573756c74206973206d65616e696e6766756c206f6e6c794d012069662060766f746572735f666f726020696e636c756465732074686520766f746572207768656e2063616c6c6564207769746820746865207265666572656e64756d2028796f75276c6c20676574207468655d012064656661756c742060566f7465602076616c7565206f7468657277697365292e20496620796f7520646f6e27742077616e7420746f20636865636b2060766f746572735f666f72602c207468656e20796f752063616ef420616c736f20636865636b20666f722073696d706c65206578697374656e636520776974682060566f74654f663a3a657869737473602066697273742e1450726f787900010130543a3a4163636f756e74496430543a3a4163636f756e7449640004000831012057686f2069732061626c6520746f20766f746520666f722077686f6d2e2056616c7565206973207468652066756e642d686f6c64696e67206163636f756e742c206b6579206973207468658820766f74652d7472616e73616374696f6e2d73656e64696e67206163636f756e742e2c44656c65676174696f6e7301010130543a3a4163636f756e7449646828543a3a4163636f756e7449642c20436f6e76696374696f6e2901840000000000000000000000000000000000000000000000000000000000000000000441012047657420746865206163636f756e742028616e64206c6f636b20706572696f64732920746f20776869636820616e6f74686572206163636f756e742069732064656c65676174696e6720766f74652e544c6173745461626c656457617345787465726e616c010010626f6f6c0400085901205472756520696620746865206c617374207265666572656e64756d207461626c656420776173207375626d69747465642065787465726e616c6c792e2046616c7365206966206974207761732061207075626c6963282070726f706f73616c2e304e65787445787465726e616c00006028543a3a486173682c20566f74655468726573686f6c6429040010590120546865207265666572656e64756d20746f206265207461626c6564207768656e6576657220697420776f756c642062652076616c696420746f207461626c6520616e2065787465726e616c2070726f706f73616c2e550120546869732068617070656e73207768656e2061207265666572656e64756d206e6565647320746f206265207461626c656420616e64206f6e65206f662074776f20636f6e646974696f6e7320617265206d65743aa4202d20604c6173745461626c656457617345787465726e616c60206973206066616c7365603b206f7268202d20605075626c696350726f70736020697320656d7074792e24426c61636b6c6973740001011c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290004000851012041207265636f7264206f662077686f207665746f656420776861742e204d6170732070726f706f73616c206861736820746f206120706f737369626c65206578697374656e7420626c6f636b206e756d626572e82028756e74696c207768656e206974206d6179206e6f742062652072657375626d69747465642920616e642077686f207665746f65642069742e3443616e63656c6c6174696f6e730101011c543a3a4861736810626f6f6c000400042901205265636f7264206f6620616c6c2070726f706f73616c7320746861742068617665206265656e207375626a65637420746f20656d657267656e63792063616e63656c6c6174696f6e2e01541c70726f706f7365083470726f706f73616c5f686173681c543a3a486173681476616c756554436f6d706163743c42616c616e63654f663c543e3e18a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e002c2023203c7765696768743e20202d204f2831292e80202d2054776f204442206368616e6765732c206f6e6520444220656e7472792e302023203c2f7765696768743e187365636f6e64042070726f706f73616c48436f6d706163743c50726f70496e6465783e18a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e002c2023203c7765696768743e20202d204f2831292e40202d204f6e6520444220656e7472792e302023203c2f7765696768743e10766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f746510566f74651c350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e002c2023203c7765696768743e20202d204f2831292e7c202d204f6e65204442206368616e67652c206f6e6520444220656e7472792e302023203c2f7765696768743e2870726f78795f766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f746510566f74651c510120566f746520696e2061207265666572656e64756d206f6e20626568616c66206f6620612073746173682e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374f8207468652070726f706f73616c3b20206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e002c2023203c7765696768743e20202d204f2831292e7c202d204f6e65204442206368616e67652c206f6e6520444220656e7472792e302023203c2f7765696768743e40656d657267656e63795f63616e63656c04247265665f696e6465783c5265666572656e64756d496e646578085101205363686564756c6520616e20656d657267656e63792063616e63656c6c6174696f6e206f662061207265666572656e64756d2e2043616e6e6f742068617070656e20747769636520746f207468652073616d6530207265666572656e64756d2e4065787465726e616c5f70726f706f7365043470726f706f73616c5f686173681c543a3a48617368083101205363686564756c652061207265666572656e64756d20746f206265207461626c6564206f6e6365206974206973206c6567616c20746f207363686564756c6520616e2065787465726e616c30207265666572656e64756d2e6465787465726e616c5f70726f706f73655f6d616a6f72697479043470726f706f73616c5f686173681c543a3a48617368145901205363686564756c652061206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f207363686564756c656020616e2065787465726e616c207265666572656e64756d2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e6065787465726e616c5f70726f706f73655f64656661756c74043470726f706f73616c5f686173681c543a3a48617368144901205363686564756c652061206e656761746976652d7475726e6f75742d62696173207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f84207363686564756c6520616e2065787465726e616c207265666572656e64756d2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e28666173745f747261636b0c3470726f706f73616c5f686173681c543a3a4861736834766f74696e675f706572696f6438543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d626572245101205363686564756c65207468652063757272656e746c792065787465726e616c6c792d70726f706f736564206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564650120696d6d6564696174656c792e204966207468657265206973206e6f2065787465726e616c6c792d70726f706f736564207265666572656e64756d2063757272656e746c792c206f72206966207468657265206973206f6e65ec20627574206974206973206e6f742061206d616a6f726974792d63617272696573207265666572656e64756d207468656e206974206661696c732e00f8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652063757272656e742065787465726e616c2070726f706f73616c2e6101202d2060766f74696e675f706572696f64603a2054686520706572696f64207468617420697320616c6c6f77656420666f7220766f74696e67206f6e20746869732070726f706f73616c2e20496e6372656173656420746f9820202060456d657267656e6379566f74696e67506572696f646020696620746f6f206c6f772e5501202d206064656c6179603a20546865206e756d626572206f6620626c6f636b20616674657220766f74696e672068617320656e64656420696e20617070726f76616c20616e6420746869732073686f756c64206265bc202020656e61637465642e205468697320646f65736e277420686176652061206d696e696d756d20616d6f756e742e347665746f5f65787465726e616c043470726f706f73616c5f686173681c543a3a4861736804bc205665746f20616e6420626c61636b6c697374207468652065787465726e616c2070726f706f73616c20686173682e4463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e04542052656d6f76652061207265666572656e64756d2e3463616e63656c5f7175657565640c107768656e5c436f6d706163743c543a3a426c6f636b4e756d6265723e14776869636830436f6d706163743c7533323e107768617460436f6d706163743c5265666572656e64756d496e6465783e04a02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e247365745f70726f7879041470726f787930543a3a4163636f756e7449641498205370656369667920612070726f78792e2043616c6c6564206279207468652073746173682e002c2023203c7765696768743e58202d204f6e6520657874726120444220656e7472792e302023203c2f7765696768743e3072657369676e5f70726f787900149820436c656172207468652070726f78792e2043616c6c6564206279207468652070726f78792e002c2023203c7765696768743e40202d204f6e6520444220636c6561722e302023203c2f7765696768743e3072656d6f76655f70726f7879041470726f787930543a3a4163636f756e744964149820436c656172207468652070726f78792e2043616c6c6564206279207468652073746173682e002c2023203c7765696768743e40202d204f6e6520444220636c6561722e302023203c2f7765696768743e2064656c65676174650808746f30543a3a4163636f756e74496428636f6e76696374696f6e28436f6e76696374696f6e143c2044656c656761746520766f74652e002c2023203c7765696768743e58202d204f6e6520657874726120444220656e7472792e302023203c2f7765696768743e28756e64656c656761746500144420556e64656c656761746520766f74652e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e58636c6561725f7075626c69635f70726f706f73616c7300040101205665746f20616e6420626c61636b6c697374207468652070726f706f73616c20686173682e204d7573742062652066726f6d20526f6f74206f726967696e2e346e6f74655f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e0861012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e205468697320646f65736e27742072657175697265207468652070726f706f73616c20746f206265250120696e207468652064697370617463682071756575652062757420646f657320726571756972652061206465706f7369742c2072657475726e6564206f6e636520656e61637465642e586e6f74655f696d6d696e656e745f707265696d6167650c40656e636f6465645f70726f706f73616c1c5665633c75383e107768656e38543a3a426c6f636b4e756d6265721477686963680c7533320845012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e2054686973207265717569726573207468652070726f706f73616c20746f206265b420696e207468652064697370617463682071756575652e204e6f206465706f736974206973206e65656465642e34726561705f707265696d616765043470726f706f73616c5f686173681c543a3a4861736804f42052656d6f766520616e20657870697265642070726f706f73616c20707265696d61676520616e6420636f6c6c65637420746865206465706f7369742e01402050726f706f736564082450726f70496e6465781c42616c616e636504c02041206d6f74696f6e20686173206265656e2070726f706f7365642062792061207075626c6963206163636f756e742e185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e04dc2041207075626c69632070726f706f73616c20686173206265656e207461626c656420666f72207265666572656e64756d20766f74652e3845787465726e616c5461626c656400049820416e2065787465726e616c2070726f706f73616c20686173206265656e207461626c65642e1c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c6404602041207265666572656e64756d2068617320626567756e2e18506173736564043c5265666572656e64756d496e64657804b020412070726f706f73616c20686173206265656e20617070726f766564206279207265666572656e64756d2e244e6f74506173736564043c5265666572656e64756d496e64657804b020412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e2443616e63656c6c6564043c5265666572656e64756d496e64657804842041207265666572656e64756d20686173206265656e2063616e63656c6c65642e204578656375746564083c5265666572656e64756d496e64657810626f6f6c047420412070726f706f73616c20686173206265656e20656e61637465642e2444656c65676174656408244163636f756e744964244163636f756e74496404e020416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e2c556e64656c65676174656404244163636f756e74496404e820416e206163636f756e74206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e185665746f65640c244163636f756e74496410486173682c426c6f636b4e756d626572049820416e2065787465726e616c2070726f706f73616c20686173206265656e207665746f65642e34507265696d6167654e6f7465640c1048617368244163636f756e7449641c42616c616e636504e020412070726f706f73616c277320707265696d61676520776173206e6f7465642c20616e6420746865206465706f7369742074616b656e2e30507265696d616765557365640c1048617368244163636f756e7449641c42616c616e636504150120412070726f706f73616c20707265696d616765207761732072656d6f76656420616e6420757365642028746865206465706f736974207761732072657475726e6564292e3c507265696d616765496e76616c69640810486173683c5265666572656e64756d496e646578040d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d6167652077617320696e76616c69642e3c507265696d6167654d697373696e670810486173683c5265666572656e64756d496e646578040d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d61676520776173206d697373696e672e38507265696d616765526561706564101048617368244163636f756e7449641c42616c616e6365244163636f756e744964045d012041207265676973746572656420707265696d616765207761732072656d6f76656420616e6420746865206465706f73697420636f6c6c6563746564206279207468652072656170657220286c617374206974656d292e1c3c456e6163746d656e74506572696f6438543a3a426c6f636b4e756d62657210002f0d0014710120546865206d696e696d756d20706572696f64206f66206c6f636b696e6720616e642074686520706572696f64206265747765656e20612070726f706f73616c206265696e6720617070726f76656420616e6420656e61637465642e0031012049742073686f756c642067656e6572616c6c792062652061206c6974746c65206d6f7265207468616e2074686520756e7374616b6520706572696f6420746f20656e737572652074686174690120766f74696e67207374616b657273206861766520616e206f70706f7274756e69747920746f2072656d6f7665207468656d73656c7665732066726f6d207468652073797374656d20696e2074686520636173652077686572659c207468657920617265206f6e20746865206c6f73696e672073696465206f66206120766f74652e304c61756e6368506572696f6438543a3a426c6f636b4e756d62657210004e0c0004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e30566f74696e67506572696f6438543a3a426c6f636b4e756d62657210004e0c0004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e384d696e696d756d4465706f7369743042616c616e63654f663c543e400000c16ff2862300000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e54456d657267656e6379566f74696e67506572696f6438543a3a426c6f636b4e756d626572108051010004ec204d696e696d756d20766f74696e6720706572696f6420616c6c6f77656420666f7220616e20656d657267656e6379207265666572656e64756d2e34436f6f6c6f6666506572696f6438543a3a426c6f636b4e756d62657210004e0c0004610120506572696f6420696e20626c6f636b7320776865726520616e2065787465726e616c2070726f706f73616c206d6179206e6f742062652072652d7375626d6974746564206166746572206265696e67207665746f65642e4c507265696d616765427974654465706f7369743042616c616e63654f663c543e400010a5d4e800000000000000000000000429012054686520616d6f756e74206f662062616c616e63652074686174206d757374206265206465706f7369746564207065722062797465206f6620707265696d6167652073746f7265642e001c436f756e63696c014c496e7374616e636531436f6c6c656374697665142450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001011c543a3a48617368643c542061732054726169743c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001011c543a3a486173684c566f7465733c543a3a4163636f756e7449643e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e01102c7365745f6d656d62657273042c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e105101205365742074686520636f6c6c6563746976652773206d656d62657273686970206d616e75616c6c7920746f20606e65775f6d656d62657273602e204265206e69636520746f2074686520636861696e20616e645c2070726f76696465206974207072652d736f727465642e005820526571756972657320726f6f74206f726967696e2e1c65786563757465042070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e0cf420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e1c70726f706f736508247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e102c2023203c7765696768743e90202d20426f756e6465642073746f7261676520726561647320616e64207772697465732eb8202d20417267756d656e7420607468726573686f6c6460206861732062656172696e67206f6e207765696768742e302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c102c2023203c7765696768743e8c202d20426f756e6465642073746f72616765207265616420616e64207772697465732e5501202d2057696c6c20626520736c696768746c792068656176696572206966207468652070726f706f73616c20697320617070726f766564202f20646973617070726f7665642061667465722074686520766f74652e302023203c2f7765696768743e01182050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e74084d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292e14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740809012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292e20417070726f76656404104861736804c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404104861736804d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408104861736810626f6f6c0405012041206d6f74696f6e207761732065786563757465643b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e384d656d626572457865637574656408104861736810626f6f6c042d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e000048546563686e6963616c436f6d6d6974746565014c496e7374616e636532436f6c6c656374697665142450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001011c543a3a48617368643c542061732054726169743c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001011c543a3a486173684c566f7465733c543a3a4163636f756e7449643e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e01102c7365745f6d656d62657273042c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e105101205365742074686520636f6c6c6563746976652773206d656d62657273686970206d616e75616c6c7920746f20606e65775f6d656d62657273602e204265206e69636520746f2074686520636861696e20616e645c2070726f76696465206974207072652d736f727465642e005820526571756972657320726f6f74206f726967696e2e1c65786563757465042070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e0cf420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e1c70726f706f736508247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e102c2023203c7765696768743e90202d20426f756e6465642073746f7261676520726561647320616e64207772697465732eb8202d20417267756d656e7420607468726573686f6c6460206861732062656172696e67206f6e207765696768742e302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c102c2023203c7765696768743e8c202d20426f756e6465642073746f72616765207265616420616e64207772697465732e5501202d2057696c6c20626520736c696768746c792068656176696572206966207468652070726f706f73616c20697320617070726f766564202f20646973617070726f7665642061667465722074686520766f74652e302023203c2f7765696768743e01182050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e74084d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292e14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740809012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292e20417070726f76656404104861736804c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404104861736804d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408104861736810626f6f6c0405012041206d6f74696f6e207761732065786563757465643b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e384d656d626572457865637574656408104861736810626f6f6c042d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e000024456c656374696f6e73014050687261676d656e456c656374696f6e181c4d656d626572730100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e040004f0205468652063757272656e7420656c6563746564206d656d626572736869702e20536f72746564206261736564206f6e206163636f756e742069642e2452756e6e65727355700100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e0400044901205468652063757272656e742072756e6e6572735f75702e20536f72746564206261736564206f6e206c6f7720746f2068696768206d657269742028776f72736520746f20626573742072756e6e6572292e38456c656374696f6e526f756e647301000c75333210000000000441012054686520746f74616c206e756d626572206f6620766f746520726f756e6473207468617420686176652068617070656e65642c206578636c7564696e6720746865207570636f6d696e67206f6e652e1c566f7465734f6601010130543a3a4163636f756e744964445665633c543a3a4163636f756e7449643e01040004010120566f746573206f66206120706172746963756c617220766f7465722c20776974682074686520726f756e6420696e646578206f662074686520766f7465732e1c5374616b654f6601010130543a3a4163636f756e7449643042616c616e63654f663c543e0040000000000000000000000000000000000464204c6f636b6564207374616b65206f66206120766f7465722e2843616e646964617465730100445665633c543a3a4163636f756e7449643e0400086501205468652070726573656e742063616e646964617465206c6973742e20536f72746564206261736564206f6e206163636f756e742069642e20412063757272656e74206d656d6265722063616e206e6576657220656e7465720101207468697320766563746f7220616e6420697320616c7761797320696d706c696369746c7920617373756d656420746f20626520612063616e6469646174652e011810766f74650814766f746573445665633c543a3a4163636f756e7449643e1476616c756554436f6d706163743c42616c616e63654f663c543e3e3c050120566f746520666f72206120736574206f662063616e6469646174657320666f7220746865207570636f6d696e6720726f756e64206f6620656c656374696f6e2e0050205468652060766f746573602073686f756c643a482020202d206e6f7420626520656d7074792eac2020202d206265206c657373207468616e20746865206e756d626572206f662063616e646964617465732e005d012055706f6e20766f74696e672c206076616c75656020756e697473206f66206077686f6027732062616c616e6365206973206c6f636b656420616e64206120626f6e6420616d6f756e742069732072657365727665642e5d012049742069732074686520726573706f6e736962696c697479206f66207468652063616c6c657220746f206e6f7420706c61636520616c6c206f662074686569722062616c616e636520696e746f20746865206c6f636ba020616e64206b65657020736f6d6520666f722066757274686572207472616e73616374696f6e732e002c2023203c7765696768743e2c2023232323205374617465302052656164733a204f283129c8205772697465733a204f28562920676976656e2060566020766f7465732e205620697320626f756e6465642062792031362e302023203c2f7765696768743e3072656d6f76655f766f746572001c21012052656d6f766520606f726967696e60206173206120766f7465722e20546869732072656d6f76657320746865206c6f636b20616e642072657475726e732074686520626f6e642e002c2023203c7765696768743e2c2023232323205374617465302052656164733a204f28312934205772697465733a204f283129302023203c2f7765696768743e507265706f72745f646566756e63745f766f74657204187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365345d01205265706f727420607461726765746020666f72206265696e6720616e20646566756e637420766f7465722e20496e2063617365206f6620612076616c6964207265706f72742c20746865207265706f727465722069735d012072657761726465642062792074686520626f6e6420616d6f756e74206f662060746172676574602e204f74686572776973652c20746865207265706f7274657220697473656c662069732072656d6f76656420616e645c20746865697220626f6e6420697320736c61736865642e0088204120646566756e637420766f74657220697320646566696e656420746f2062653a4d012020202d206120766f7465722077686f73652063757272656e74207375626d697474656420766f7465732061726520616c6c20696e76616c69642e20692e652e20616c6c206f66207468656d20617265206e6fb420202020206c6f6e67657220612063616e646964617465206e6f7220616e20616374697665206d656d6265722e002c2023203c7765696768743e2c202323232320537461746515012052656164733a204f284e4c6f674d2920676976656e204d2063757272656e742063616e6469646174657320616e64204e20766f74657320666f722060746172676574602e34205772697465733a204f283129302023203c2f7765696768743e407375626d69745f63616e646964616379003478205375626d6974206f6e6573656c6620666f722063616e6469646163792e006420412063616e6469646174652077696c6c206569746865723aec2020202d204c6f73652061742074686520656e64206f6620746865207465726d20616e6420666f7266656974207468656972206465706f7369742e2d012020202d2057696e20616e64206265636f6d652061206d656d6265722e204d656d626572732077696c6c206576656e7475616c6c7920676574207468656972207374617368206261636b2e55012020202d204265636f6d6520612072756e6e65722d75702e2052756e6e6572732d75707320617265207265736572766564206d656d6265727320696e2063617365206f6e65206765747320666f72636566756c6c7934202020202072656d6f7665642e002c2023203c7765696768743e2c20232323232053746174658c2052656164733a204f284c6f674e2920476976656e204e2063616e646964617465732e34205772697465733a204f283129302023203c2f7765696768743e4872656e6f756e63655f63616e646964616379002451012052656e6f756e6365206f6e65277320696e74656e74696f6e20746f20626520612063616e64696461746520666f7220746865206e65787420656c656374696f6e20726f756e642e203320706f74656e7469616c40206f7574636f6d65732065786973743a4101202d20606f726967696e6020697320612063616e64696461746520616e64206e6f7420656c656374656420696e20616e79207365742e20496e207468697320636173652c2074686520626f6e64206973f4202020756e72657365727665642c2072657475726e656420616e64206f726967696e2069732072656d6f76656420617320612063616e6469646174652e5901202d20606f726967696e6020697320612063757272656e742072756e6e65722075702e20496e207468697320636173652c2074686520626f6e6420697320756e72657365727665642c2072657475726e656420616e64842020206f726967696e2069732072656d6f76656420617320612072756e6e65722e4d01202d20606f726967696e6020697320612063757272656e74206d656d6265722e20496e207468697320636173652c2074686520626f6e6420697320756e726573657276656420616e64206f726967696e206973590120202072656d6f7665642061732061206d656d6265722c20636f6e73657175656e746c79206e6f74206265696e6720612063616e64696461746520666f7220746865206e65787420726f756e6420616e796d6f72652e650120202053696d696c617220746f205b6072656d6f76655f766f746572605d2c206966207265706c6163656d656e742072756e6e657273206578697374732c20746865792061726520696d6d6564696174656c7920757365642e3472656d6f76655f6d656d626572040c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365345d012052656d6f7665206120706172746963756c6172206d656d6265722066726f6d20746865207365742e20546869732069732065666665637469766520696d6d6564696174656c7920616e642074686520626f6e64206f668020746865206f7574676f696e67206d656d62657220697320736c61736865642e00590120496620612072756e6e65722d757020697320617661696c61626c652c207468656e2074686520626573742072756e6e65722d75702077696c6c2062652072656d6f76656420616e64207265706c6163657320746865f4206f7574676f696e67206d656d6265722e204f74686572776973652c2061206e65772070687261676d656e20726f756e6420697320737461727465642e004501204e6f74652074686174207468697320646f6573206e6f7420616666656374207468652064657369676e6174656420626c6f636b206e756d626572206f6620746865206e65787420656c656374696f6e2e002c2023203c7765696768743e2c2023232323205374617465582052656164733a204f28646f5f70687261676d656e295c205772697465733a204f28646f5f70687261676d656e29302023203c2f7765696768743e01141c4e65775465726d04645665633c284163636f756e7449642c2042616c616e6365293e0855012041206e6577207465726d2077697468206e6577206d656d626572732e205468697320696e64696361746573207468617420656e6f7567682063616e6469646174657320657869737465642c206e6f742074686174450120656e6f756768206861766520686173206265656e20656c65637465642e2054686520696e6e65722076616c7565206d757374206265206578616d696e656420666f72207468697320707572706f73652e24456d7074795465726d0004d8204e6f20286f72206e6f7420656e6f756768292063616e64696461746573206578697374656420666f72207468697320726f756e642e304d656d6265724b69636b656404244163636f756e7449640845012041206d656d62657220686173206265656e2072656d6f7665642e20546869732073686f756c6420616c7761797320626520666f6c6c6f7765642062792065697468657220604e65775465726d60206f74342060456d7074795465726d602e3c4d656d62657252656e6f756e63656404244163636f756e74496404a02041206d656d626572206861732072656e6f756e6365642074686569722063616e6469646163792e34566f7465725265706f727465640c244163636f756e744964244163636f756e74496410626f6f6c086101204120766f7465722028666972737420656c656d656e742920776173207265706f72746564202862797420746865207365636f6e6420656c656d656e742920776974682074686520746865207265706f7274206265696e678c207375636365737366756c206f72206e6f742028746869726420656c656d656e74292e143443616e646964616379426f6e643042616c616e63654f663c543e400080c6a47e8d030000000000000000000028566f74696e67426f6e643042616c616e63654f663c543e4000407a10f35a000000000000000000000038446573697265644d656d626572730c753332100d00000000404465736972656452756e6e65727355700c753332100700000000305465726d4475726174696f6e38543a3a426c6f636b4e756d626572108013030000004c546563686e6963616c4d656d62657273686970014c496e7374616e6365314d656d62657273686970041c4d656d626572730100445665633c543a3a4163636f756e7449643e040004c8205468652063757272656e74206d656d626572736869702c2073746f72656420617320616e206f726465726564205665632e0114286164645f6d656d626572040c77686f30543a3a4163636f756e7449640c7c204164642061206d656d626572206077686f6020746f20746865207365742e00b4204d6179206f6e6c792062652063616c6c65642066726f6d20604164644f726967696e60206f7220726f6f742e3472656d6f76655f6d656d626572040c77686f30543a3a4163636f756e7449640c902052656d6f76652061206d656d626572206077686f602066726f6d20746865207365742e00c0204d6179206f6e6c792062652063616c6c65642066726f6d206052656d6f76654f726967696e60206f7220726f6f742e2c737761705f6d656d626572081872656d6f766530543a3a4163636f756e7449640c61646430543a3a4163636f756e7449640cc02053776170206f7574206f6e65206d656d626572206072656d6f76656020666f7220616e6f746865722060616464602e00b8204d6179206f6e6c792062652063616c6c65642066726f6d2060537761704f726967696e60206f7220726f6f742e3472657365745f6d656d62657273041c6d656d62657273445665633c543a3a4163636f756e7449643e105901204368616e676520746865206d656d6265727368697020746f2061206e6577207365742c20646973726567617264696e6720746865206578697374696e67206d656d626572736869702e204265206e69636520616e646c207061737320606d656d6265727360207072652d736f727465642e00bc204d6179206f6e6c792062652063616c6c65642066726f6d206052657365744f726967696e60206f7220726f6f742e286368616e67655f6b6579040c6e657730543a3a4163636f756e7449640cd82053776170206f7574207468652073656e64696e67206d656d62657220666f7220736f6d65206f74686572206b657920606e6577602e00f4204d6179206f6e6c792062652063616c6c65642066726f6d20605369676e656460206f726967696e206f6620612063757272656e74206d656d6265722e01182c4d656d62657241646465640004e42054686520676976656e206d656d626572207761732061646465643b2073656520746865207472616e73616374696f6e20666f722077686f2e344d656d62657252656d6f7665640004ec2054686520676976656e206d656d626572207761732072656d6f7665643b2073656520746865207472616e73616374696f6e20666f722077686f2e384d656d62657273537761707065640004dc2054776f206d656d62657273207765726520737761707065643b2073656520746865207472616e73616374696f6e20666f722077686f2e304d656d6265727352657365740004190120546865206d656d62657273686970207761732072657365743b2073656520746865207472616e73616374696f6e20666f722077686f20746865206e6577207365742069732e284b65794368616e676564000488204f6e65206f6620746865206d656d6265727327206b657973206368616e6765642e1444756d6d7904b4727374643a3a6d61726b65723a3a5068616e746f6d446174613c284163636f756e7449642c204576656e74293e0470205068616e746f6d206d656d6265722c206e6576657220757365642e00003c46696e616c697479547261636b65720001042866696e616c5f68696e74041068696e745c436f6d706163743c543a3a426c6f636b4e756d6265723e08f42048696e7420746861742074686520617574686f72206f66207468697320626c6f636b207468696e6b732074686520626573742066696e616c697a65646c20626c6f636b2069732074686520676976656e206e756d6265722e00082857696e646f7753697a6538543a3a426c6f636b4e756d626572106500000004190120546865206e756d626572206f6620726563656e742073616d706c657320746f206b6565702066726f6d207468697320636861696e2e2044656661756c74206973203130312e345265706f72744c6174656e637938543a3a426c6f636b4e756d62657210e8030000041d01205468652064656c617920616674657220776869636820706f696e74207468696e6773206265636f6d6520737573706963696f75732e2044656661756c7420697320313030302e001c4772616e647061013c4772616e64706146696e616c6974791c2c417574686f726974696573010034417574686f726974794c6973740400102c20444550524543415445440061012054686973207573656420746f2073746f7265207468652063757272656e7420617574686f72697479207365742c20776869636820686173206265656e206d6967726174656420746f207468652077656c6c2d6b6e6f776e94204752414e4450415f415554484f52495445535f4b455920756e686173686564206b65792e14537461746501006c53746f72656453746174653c543a3a426c6f636b4e756d6265723e04000490205374617465206f66207468652063757272656e7420617574686f72697479207365742e3450656e64696e674368616e676500008c53746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265723e040004c42050656e64696e67206368616e67653a20287369676e616c65642061742c207363686564756c6564206368616e6765292e284e657874466f72636564000038543a3a426c6f636b4e756d626572040004bc206e65787420626c6f636b206e756d6265722077686572652077652063616e20666f7263652061206368616e67652e1c5374616c6c656400008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d626572290400049020607472756560206966207765206172652063757272656e746c79207374616c6c65642e3043757272656e7453657449640100145365744964200000000000000000085d0120546865206e756d626572206f66206368616e6765732028626f746820696e207465726d73206f66206b65797320616e6420756e6465726c79696e672065636f6e6f6d696320726573706f6e736962696c697469657329c420696e20746865202273657422206f66204772616e6470612076616c696461746f72732066726f6d2067656e657369732e30536574496453657373696f6e0001011453657449643053657373696f6e496e64657800040004c1012041206d617070696e672066726f6d206772616e6470612073657420494420746f2074686520696e646578206f6620746865202a6d6f737420726563656e742a2073657373696f6e20666f7220776869636820697473206d656d62657273207765726520726573706f6e7369626c652e0104487265706f72745f6d69736265686176696f72041c5f7265706f72741c5665633c75383e0464205265706f727420736f6d65206d69736265686176696f722e010c384e6577417574686f7269746965730434417574686f726974794c6973740490204e657720617574686f726974792073657420686173206265656e206170706c6965642e1850617573656400049c2043757272656e7420617574686f726974792073657420686173206265656e207061757365642e1c526573756d65640004a02043757272656e7420617574686f726974792073657420686173206265656e20726573756d65642e0000205472656173757279012054726561737572790c3450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c730001013450726f706f73616c496e6465789050726f706f73616c3c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100485665633c50726f706f73616c496e6465783e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e010c3470726f706f73655f7370656e64081476616c756554436f6d706163743c42616c616e63654f663c543e3e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365242d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e94202d204f6e65204442206368616e67652c206f6e6520657874726120444220656e7472792e302023203c2f7765696768743e3c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e1cfc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e40202d204f6e6520444220636c6561722e302023203c2f7765696768743e40617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e205d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e01182050726f706f736564043450726f706f73616c496e6465780438204e65772070726f706f73616c2e205370656e64696e67041c42616c616e636504e8205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964048020536f6d652066756e64732068617665206265656e20616c6c6f63617465642e144275726e74041c42616c616e6365048c20536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e20526f6c6c6f766572041c42616c616e6365043101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e1c4465706f736974041c42616c616e6365048020536f6d652066756e64732068617665206265656e206465706f73697465642e103050726f706f73616c426f6e641c5065726d696c6c1050c30000085501204672616374696f6e206f6620612070726f706f73616c27732076616c756520746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c616365207468652070726f706f73616c2e110120416e2061636365707465642070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f6573206e6f742e4c50726f706f73616c426f6e644d696e696d756d3042616c616e63654f663c543e4000407a10f35a00000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f6438543a3a426c6f636b4e756d6265721080700000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e1c5065726d696c6c1020a107000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e0024436f6e7472616374730120436f6e74726163741c204761735370656e7401000c476173200000000000000000048020476173207370656e7420736f2066617220696e207468697320626c6f636b2e3c43757272656e745363686564756c650100205363686564756c65c5010000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af000000000000000100000000000000010000000000000004000000000001001000000000400000002000000004942043757272656e7420636f7374207363686564756c6520666f7220636f6e7472616374732e305072697374696e65436f64650001012c436f6465486173683c543e1c5665633c75383e0004000465012041206d617070696e672066726f6d20616e206f726967696e616c20636f6465206861736820746f20746865206f726967696e616c20636f64652c20756e746f756368656420627920696e737472756d656e746174696f6e2e2c436f646553746f726167650001012c436f6465486173683c543e587761736d3a3a5072656661625761736d4d6f64756c650004000465012041206d617070696e67206265747765656e20616e206f726967696e616c20636f6465206861736820616e6420696e737472756d656e746564207761736d20636f64652c20726561647920666f7220657865637574696f6e2e384163636f756e74436f756e74657201000c753634200000000000000000045420546865207375627472696520636f756e7465722e38436f6e7472616374496e666f4f6600010130543a3a4163636f756e7449643c436f6e7472616374496e666f3c543e00040004a82054686520636f6465206173736f6369617465642077697468206120676976656e206163636f756e742e20476173507269636501003042616c616e63654f663c543e4001000000000000000000000000000000047820546865207072696365206f66206f6e6520756e6974206f66206761732e01143c7570646174655f7363686564756c6504207363686564756c65205363686564756c650cb4205570646174657320746865207363686564756c6520666f72206d65746572696e6720636f6e7472616374732e000d0120546865207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652073746f726564207363686564756c652e207075745f636f646508246761735f6c696d697430436f6d706163743c4761733e10636f64651c5665633c75383e085d012053746f7265732074686520676976656e2062696e617279205761736d20636f646520696e746f2074686520636861696e27732073746f7261676520616e642072657475726e73206974732060636f646568617368602ed420596f752063616e20696e7374616e746961746520636f6e747261637473206f6e6c7920776974682073746f72656420636f64652e1063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e10646174611c5665633c75383e1c0901204d616b657320612063616c6c20746f20616e206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e002901202a20496620746865206163636f756e74206973206120736d6172742d636f6e7472616374206163636f756e742c20746865206173736f63696174656420636f64652077696c6c206265b020657865637574656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e1901202a20496620746865206163636f756e74206973206120726567756c6172206163636f756e742c20616e792076616c75652077696c6c206265207472616e736665727265642e4901202a204966206e6f206163636f756e742065786973747320616e64207468652063616c6c2076616c7565206973206e6f74206c657373207468616e20606578697374656e7469616c5f6465706f736974602c1501206120726567756c6172206163636f756e742077696c6c206265206372656174656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e2c696e7374616e74696174651024656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e24636f64655f686173682c436f6465486173683c543e10646174611c5665633c75383e28bd0120496e7374616e7469617465732061206e657720636f6e74726163742066726f6d207468652060636f646568617368602067656e65726174656420627920607075745f636f6465602c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e009820496e7374616e74696174696f6e20697320657865637574656420617320666f6c6c6f77733a004101202d205468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e64657220616e642068617368206f662074686520636f64652e0501202d2054686520736d6172742d636f6e7472616374206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732e6d01202d20546865206063746f725f636f64656020697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792d63726561746564206163636f756e742e204275666665722072657475726e65645d0120202061667465722074686520657865637574696f6e206973207361766564206173207468652060636f646560206f6620746865206163636f756e742e205468617420636f64652077696c6c20626520696e766f6b6564a820202075706f6e20616e792063616c6c2072656365697665642062792074686973206163636f756e742e7c202d2054686520636f6e747261637420697320696e697469616c697a65642e3c636c61696d5f73757263686172676508106465737430543a3a4163636f756e744964286175785f73656e646572504f7074696f6e3c543a3a4163636f756e7449643e14710120416c6c6f777320626c6f636b2070726f64756365727320746f20636c61696d206120736d616c6c2072657761726420666f72206576696374696e67206120636f6e74726163742e204966206120626c6f636b2070726f64756365721501206661696c7320746f20646f20736f2c206120726567756c61722075736572732077696c6c20626520616c6c6f77656420746f20636c61696d20746865207265776172642e00390120496620636f6e7472616374206973206e6f742065766963746564206173206120726573756c74206f6620746869732063616c6c2c206e6f20616374696f6e73206172652074616b656e20616e64ac207468652073656e646572206973206e6f7420656c696769626c6520666f7220746865207265776172642e0118205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e6365046901205472616e736665722068617070656e6564206066726f6d6020746f2060746f60207769746820676976656e206076616c7565602061732070617274206f662061206063616c6c60206f722060696e7374616e7469617465602e30496e7374616e74696174656408244163636f756e744964244163636f756e74496404dc20436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e28436f646553746f72656404104861736804b820436f646520776974682074686520737065636966696564206861736820686173206265656e2073746f7265642e3c5363686564756c6555706461746564040c75333204c020547269676765726564207768656e207468652063757272656e74207363686564756c6520697320757064617465642e284469737061746368656408244163636f756e74496410626f6f6c08390120412063616c6c2077617320646973706174636865642066726f6d2074686520676976656e206163636f756e742e2054686520626f6f6c207369676e616c7320776865746865722069742077617374207375636365737366756c20657865637574696f6e206f72206e6f742e20436f6e747261637408244163636f756e7449641c5665633c75383e048c20416e206576656e742066726f6d20636f6e7472616374206f66206163636f756e742e404c5369676e6564436c61696d48616e646963617038543a3a426c6f636b4e756d626572100200000010e0204e756d626572206f6620626c6f636b2064656c617920616e2065787472696e73696320636c61696d20737572636861726765206861732e000d01205768656e20636c61696d207375726368617267652069732063616c6c656420627920616e2065787472696e736963207468652072656e7420697320636865636b65646820666f722063757272656e745f626c6f636b202d2064656c617940546f6d6273746f6e654465706f7369743042616c616e63654f663c543e4000407a10f35a0000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f2067656e6572617465206120746f6d6273746f6e652e4453746f7261676553697a654f66667365740c75333210080000000851012053697a65206f66206120636f6e7472616374206174207468652074696d65206f6620696e7374616e746961696f6e2e205468697320697320612073696d706c652077617920746f20656e737572652074686174a420656d70747920636f6e747261637473206576656e7475616c6c7920676574732064656c657465642e2c52656e74427974654665653042616c616e63654f663c543e4000407a10f35a00000000000000000000043501205072696365206f6620612062797465206f662073746f7261676520706572206f6e6520626c6f636b20696e74657276616c2e2053686f756c642062652067726561746572207468616e20302e4452656e744465706f7369744f66667365743042616c616e63654f663c543e4000008a5d7845630100000000000000001c05012054686520616d6f756e74206f662066756e6473206120636f6e74726163742073686f756c64206465706f73697420696e206f7264657220746f206f6666736574582074686520636f7374206f66206f6e6520627974652e006901204c6574277320737570706f736520746865206465706f73697420697320312c303030204255202862616c616e636520756e697473292f6279746520616e64207468652072656e7420697320312042552f627974652f6461792c5901207468656e206120636f6e7472616374207769746820312c3030302c3030302042552074686174207573657320312c303030206279746573206f662073746f7261676520776f756c6420706179206e6f2072656e742e4d0120427574206966207468652062616c616e6365207265647563656420746f203530302c30303020425520616e64207468652073746f7261676520737461796564207468652073616d6520617420312c3030302c78207468656e20697420776f756c6420706179203530302042552f6461792e3c5375726368617267655265776172643042616c616e63654f663c543e400080a1a76b4a3500000000000000000008e4205265776172642074686174206973207265636569766564206279207468652070617274792077686f736520746f75636820686173206c65646820746f2072656d6f76616c206f66206120636f6e74726163742e2c5472616e736665724665653042616c616e63654f663c543e400010a5d4e800000000000000000000000494205468652066656520726571756972656420746f206d616b652061207472616e736665722e2c4372656174696f6e4665653042616c616e63654f663c543e400010a5d4e80000000000000000000000049c205468652066656520726571756972656420746f2063726561746520616e206163636f756e742e485472616e73616374696f6e426173654665653042616c616e63654f663c543e400010a5d4e8000000000000000000000004dc205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b2074686520626173652e485472616e73616374696f6e427974654665653042616c616e63654f663c543e4000e40b54020000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e2c436f6e74726163744665653042616c616e63654f663c543e400010a5d4e80000000000000000000000084101205468652066656520726571756972656420746f20696e7374616e7469617465206120636f6e747261637420696e7374616e63652e204120726561736f6e61626c652064656661756c742076616c75651c2069732032312e2c43616c6c426173654665650c47617320e803000000000000081d0120546865206261736520666565206368617267656420666f722063616c6c696e6720696e746f206120636f6e74726163742e204120726561736f6e61626c652064656661756c74382076616c7565206973203133352e48496e7374616e7469617465426173654665650c47617320e80300000000000008390120546865206261736520666565206368617267656420666f7220696e7374616e74696174696e67206120636f6e74726163742e204120726561736f6e61626c652064656661756c742076616c756520206973203137352e204d617844657074680c753332102000000008310120546865206d6178696d756d206e657374696e67206c6576656c206f6620612063616c6c2f696e7374616e746961746520737461636b2e204120726561736f6e61626c652064656661756c74382076616c7565206973203130302e304d617856616c756553697a650c753332100040000004390120546865206d6178696d756d2073697a65206f6620612073746f726167652076616c756520696e2062797465732e204120726561736f6e61626c652064656661756c74206973203136204b69422e34426c6f636b4761734c696d69740c47617320809698000000000008250120546865206d6178696d756d20616d6f756e74206f6620676173207468617420636f756c6420626520657870656e6465642070657220626c6f636b2e204120726561736f6e61626c65742064656661756c742076616c75652069732031305f3030305f3030302e00105375646f01105375646f040c4b6579010030543a3a4163636f756e74496480000000000000000000000000000000000000000000000000000000000000000004842054686520604163636f756e74496460206f6620746865207375646f206b65792e010c107375646f042070726f706f73616c40426f783c543a3a50726f706f73616c3e2839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ed4202d20556e6b6e6f776e20776569676874206f662064657269766174697665206070726f706f73616c6020657865637574696f6e2e302023203c2f7765696768743e1c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652475012041757468656e74696361746573207468652063757272656e74207375646f206b657920616e6420736574732074686520676976656e204163636f756e7449642028606e6577602920617320746865206e6577207375646f206b65792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e1c7375646f5f6173080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652070726f706f73616c40426f783c543a3a50726f706f73616c3e2c51012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c207769746820605369676e656460206f726967696e2066726f6d44206120676976656e206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ed4202d20556e6b6e6f776e20776569676874206f662064657269766174697665206070726f706f73616c6020657865637574696f6e2e302023203c2f7765696768743e010c1453756469640410626f6f6c04602041207375646f206a75737420746f6f6b20706c6163652e284b65794368616e67656404244163636f756e74496404f020546865207375646f6572206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e285375646f4173446f6e650410626f6f6c04602041207375646f206a75737420746f6f6b20706c6163652e000020496d4f6e6c696e650120496d4f6e6c696e651020476f737369704174010038543a3a426c6f636b4e756d626572100000000004a02054686520626c6f636b206e756d626572207768656e2077652073686f756c6420676f737369702e104b65797301004c5665633c543a3a417574686f7269747949643e040004d0205468652063757272656e7420736574206f66206b6579732074686174206d61792069737375652061206865617274626561742e485265636569766564486561727462656174730002013053657373696f6e496e6465782441757468496e6465781c5665633c75383e01040008e420466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206041757468496e646578608c20746f20606f6666636861696e3a3a4f70617175654e6574776f726b5374617465602e38417574686f726564426c6f636b730102013053657373696f6e496e64657838543a3a56616c696461746f7249640c75333201100000000008150120466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f662060543a3a56616c696461746f7249646020746f20746865c8206e756d626572206f6620626c6f636b7320617574686f7265642062792074686520676976656e20617574686f726974792e0104246865617274626561740824686561727462656174644865617274626561743c543a3a426c6f636b4e756d6265723e285f7369676e6174757265bc3c543a3a417574686f7269747949642061732052756e74696d654170705075626c69633e3a3a5369676e617475726500010c444865617274626561745265636569766564042c417574686f72697479496404c02041206e657720686561727462656174207761732072656365697665642066726f6d2060417574686f726974794964601c416c6c476f6f640004d42041742074686520656e64206f66207468652073657373696f6e2c206e6f206f6666656e63652077617320636f6d6d69747465642e2c536f6d654f66666c696e6504605665633c4964656e74696669636174696f6e5475706c653e0431012041742074686520656e64206f66207468652073657373696f6e2c206174206c65617374206f6e63652076616c696461746f722077617320666f756e6420746f206265206f66666c696e652e000048417574686f72697479446973636f76657279000100000000204f6666656e63657301204f6666656e6365730c1c5265706f727473000101345265706f727449644f663c543ed04f6666656e636544657461696c733c543a3a4163636f756e7449642c20543a3a4964656e74696669636174696f6e5475706c653e00040004490120546865207072696d61727920737472756374757265207468617420686f6c647320616c6c206f6666656e6365207265636f726473206b65796564206279207265706f7274206964656e746966696572732e58436f6e63757272656e745265706f727473496e646578010201104b696e64384f706171756554696d65536c6f74485665633c5265706f727449644f663c543e3e010400042901204120766563746f72206f66207265706f727473206f66207468652073616d65206b696e6420746861742068617070656e6564206174207468652073616d652074696d6520736c6f742e485265706f72747342794b696e64496e646578010101104b696e641c5665633c75383e00040018110120456e756d65726174657320616c6c207265706f727473206f662061206b696e6420616c6f6e672077697468207468652074696d6520746865792068617070656e65642e00bc20416c6c207265706f7274732061726520736f72746564206279207468652074696d65206f66206f6666656e63652e004901204e6f74652074686174207468652061637475616c2074797065206f662074686973206d617070696e6720697320605665633c75383e602c207468697320697320626563617573652076616c756573206f66690120646966666572656e7420747970657320617265206e6f7420737570706f7274656420617420746865206d6f6d656e7420736f2077652061726520646f696e6720746865206d616e75616c2073657269616c697a6174696f6e2e010001041c4f6666656e636508104b696e64384f706171756554696d65536c6f7408550120546865726520697320616e206f6666656e6365207265706f72746564206f662074686520676976656e20606b696e64602068617070656e656420617420746865206073657373696f6e5f696e6465786020616e64390120286b696e642d7370656369666963292074696d6520736c6f742e2054686973206576656e74206973206e6f74206465706f736974656420666f72206475706c696361746520736c61736865732e00006052616e646f6d6e657373436f6c6c656374697665466c6970016052616e646f6d6e657373436f6c6c656374697665466c6970043852616e646f6d4d6174657269616c0100305665633c543a3a486173683e04000c610120536572696573206f6620626c6f636b20686561646572732066726f6d20746865206c61737420383120626c6f636b73207468617420616374732061732072616e646f6d2073656564206d6174657269616c2e2054686973610120697320617272616e67656420617320612072696e672062756666657220776974682060626c6f636b5f6e756d626572202520383160206265696e672074686520696e64657820696e746f20746865206056656360206f664420746865206f6c6465737420686173682e0100000000144e69636b7301105375646f04184e616d654f6600010130543a3a4163636f756e7449645c285665633c75383e2c2042616c616e63654f663c543e29000400047020546865206c6f6f6b7570207461626c6520666f72206e616d65732e0110207365745f6e616d6504106e616d651c5665633c75383e405d012053657420616e206163636f756e742773206e616d652e20546865206e616d652073686f756c642062652061205554462d382d656e636f64656420737472696e6720627920636f6e76656e74696f6e2c2074686f7567684c20776520646f6e277420636865636b2069742e00610120546865206e616d65206d6179206e6f74206265206d6f7265207468616e2060543a3a4d61784c656e677468602062797465732c206e6f72206c657373207468616e2060543a3a4d696e4c656e677468602062797465732e005d0120496620746865206163636f756e7420646f65736e277420616c726561647920686176652061206e616d652c207468656e206120666565206f6620605265736572766174696f6e466565602069732072657365727665644020696e20746865206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e84202d204174206d6f7374206f6e652062616c616e6365206f7065726174696f6e2e68202d204f6e652073746f7261676520726561642f77726974652e34202d204f6e65206576656e742e302023203c2f7765696768743e28636c6561725f6e616d650028510120436c65617220616e206163636f756e742773206e616d6520616e642072657475726e20746865206465706f7369742e204661696c7320696620746865206163636f756e7420776173206e6f74206e616d65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204f6e652062616c616e6365206f7065726174696f6e2e68202d204f6e652073746f7261676520726561642f77726974652e34202d204f6e65206576656e742e302023203c2f7765696768743e246b696c6c5f6e616d6504187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636534e42052656d6f766520616e206163636f756e742773206e616d6520616e642074616b6520636861726765206f6620746865206465706f7369742e004901204661696c73206966206077686f6020686173206e6f74206265656e206e616d65642e20546865206465706f736974206973206465616c742077697468207468726f7567682060543a3a536c6173686564604c20696d62616c616e63652068616e646c65722e00310120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f206f72206d617463682060543a3a466f7263654f726967696e602e002c2023203c7765696768743e20202d204f2831292edc202d204f6e6520756e62616c616e6365642068616e646c6572202870726f6261626c7920612062616c616e6365207472616e736665722968202d204f6e652073746f7261676520726561642f77726974652e34202d204f6e65206576656e742e302023203c2f7765696768743e28666f7263655f6e616d6508187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365106e616d651c5665633c75383e30c82053657420612074686972642d7061727479206163636f756e742773206e616d652077697468206e6f206465706f7369742e00a0204e6f206c656e67746820636865636b696e6720697320646f6e65206f6e20746865206e616d652e00310120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f206f72206d617463682060543a3a466f7263654f726967696e602e002c2023203c7765696768743e20202d204f2831292e84202d204174206d6f7374206f6e652062616c616e6365206f7065726174696f6e2e68202d204f6e652073746f7261676520726561642f77726974652e34202d204f6e65206576656e742e302023203c2f7765696768743e01141c4e616d6553657404244163636f756e74496404402041206e616d6520776173207365742e284e616d65466f7263656404244163636f756e74496404642041206e616d652077617320666f726369626c79207365742e2c4e616d654368616e67656404244163636f756e74496404502041206e616d6520776173206368616e6765642e2c4e616d65436c656172656408244163636f756e7449641c42616c616e636504d02041206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e284e616d654b696c6c656408244163636f756e7449641c42616c616e636504c82041206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e0c385265736572766174696f6e4665653042616c616e63654f663c543e4000407a10f35a000000000000000000000444205265736572766174696f6e206665652e244d696e4c656e6774680c7533321003000000048820546865206d696e696d756d206c656e6774682061206e616d65206d61792062652e244d61784c656e6774680c7533321010000000048820546865206d6178696d756d206c656e6774682061206e616d65206d61792062652e00 \ No newline at end of file diff --git a/packages/polkadot/tests/meta/v9.json b/packages/polkadot/tests/meta/v9.json new file mode 100644 index 00000000..b3986785 --- /dev/null +++ b/packages/polkadot/tests/meta/v9.json @@ -0,0 +1,4896 @@ +{ + "magicNumber": 1635018093, + "metadata": { + "V9": { + "modules": [ + { + "name": "System", + "storage": { + "prefix": "System", + "items": [ + { + "name": "AccountNonce", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Index", + "linked": false + } + }, + "fallback": "0x00000000", + "documentation": [ + " Extrinsics nonce for accounts." + ] + }, + { + "name": "ExtrinsicCount", + "modifier": "Optional", + "type": { + "Plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total extrinsics count for the current block." + ] + }, + { + "name": "AllExtrinsicsWeight", + "modifier": "Optional", + "type": { + "Plain": "Weight" + }, + "fallback": "0x00", + "documentation": [ + " Total weight for all extrinsics put together, for the current block." + ] + }, + { + "name": "AllExtrinsicsLen", + "modifier": "Optional", + "type": { + "Plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total length (in bytes) for all extrinsics put together, for the current block." + ] + }, + { + "name": "BlockHash", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "BlockNumber", + "value": "Hash", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Map of block numbers to block hashes." + ] + }, + { + "name": "ExtrinsicData", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "u32", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Extrinsics data for the current block (maps an extrinsic's index to its data)." + ] + }, + { + "name": "Number", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The current block number being processed. Set by `execute_block`." + ] + }, + { + "name": "ParentHash", + "modifier": "Default", + "type": { + "Plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Hash of the previous block." + ] + }, + { + "name": "ExtrinsicsRoot", + "modifier": "Default", + "type": { + "Plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Extrinsics root of the current block, also part of the block header." + ] + }, + { + "name": "Digest", + "modifier": "Default", + "type": { + "Plain": "DigestOf" + }, + "fallback": "0x00", + "documentation": [ + " Digest of the current block, also part of the block header." + ] + }, + { + "name": "Events", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Events deposited for the current block." + ] + }, + { + "name": "EventCount", + "modifier": "Default", + "type": { + "Plain": "EventIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of events in the `Events` list." + ] + }, + { + "name": "EventTopics", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "()", + "key2": "Hash", + "value": "Vec<(BlockNumber,EventIndex)>", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00", + "documentation": [ + " Mapping between a topic (represented by T::Hash) and a vector of indexes", + " of events in the `>` list.", + "", + " The first key serves no purpose. This field is declared as double_map just", + " for convenience of using `remove_prefix`.", + "", + " All topic vectors have deterministic storage locations depending on the topic. This", + " allows light-clients to leverage the changes trie storage tracking mechanism and", + " in case of changes fetch the list of events of interest.", + "", + " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just", + " the `EventIndex` then in case if the topic has the same contents on the next block", + " no notification will be triggered thus the event might be lost." + ] + } + ] + }, + "calls": [ + { + "name": "fill_block", + "args": [], + "documentation": [ + " A big dispatch that will disallow any other transaction to be included." + ] + }, + { + "name": "remark", + "args": [ + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Make some on-chain remark." + ] + }, + { + "name": "set_heap_pages", + "args": [ + { + "name": "pages", + "type": "u64" + } + ], + "documentation": [ + " Set the number of pages in the WebAssembly environment's heap." + ] + }, + { + "name": "set_code", + "args": [ + { + "name": "new", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new code." + ] + }, + { + "name": "set_storage", + "args": [ + { + "name": "items", + "type": "Vec" + } + ], + "documentation": [ + " Set some items of storage." + ] + }, + { + "name": "kill_storage", + "args": [ + { + "name": "keys", + "type": "Vec" + } + ], + "documentation": [ + " Kill some items from storage." + ] + }, + { + "name": "kill_prefix", + "args": [ + { + "name": "prefix", + "type": "Key" + } + ], + "documentation": [ + " Kill all storage items with a key that starts with the given prefix." + ] + } + ], + "events": [ + { + "name": "ExtrinsicSuccess", + "args": [ + "DispatchInfo" + ], + "documentation": [ + " An extrinsic completed successfully." + ] + }, + { + "name": "ExtrinsicFailed", + "args": [ + "DispatchError", + "DispatchInfo" + ], + "documentation": [ + " An extrinsic failed." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "RequireSignedOrigin", + "documentation": [] + }, + { + "name": "RequireRootOrigin", + "documentation": [] + }, + { + "name": "RequireNoOrigin", + "documentation": [] + } + ] + }, + { + "name": "Utility", + "storage": null, + "calls": [ + { + "name": "batch", + "args": [ + { + "name": "calls", + "type": "Vec" + } + ], + "documentation": [ + " Send a batch of dispatch calls (only root)." + ] + } + ], + "events": [ + { + "name": "BatchExecuted", + "args": [ + "Vec>" + ], + "documentation": [] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "Babe", + "storage": { + "prefix": "Babe", + "items": [ + { + "name": "EpochIndex", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current epoch index." + ] + }, + { + "name": "Authorities", + "modifier": "Default", + "type": { + "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + }, + "fallback": "0x00", + "documentation": [ + " Current epoch authorities." + ] + }, + { + "name": "GenesisSlot", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The slot at which the first epoch actually started. This is 0", + " until the first block of the chain." + ] + }, + { + "name": "CurrentSlot", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current slot number." + ] + }, + { + "name": "Randomness", + "modifier": "Default", + "type": { + "Plain": "[u8;32]" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The epoch randomness for the *current* epoch.", + "", + " # Security", + "", + " This MUST NOT be used for gambling, as it can be influenced by a", + " malicious validator in the short term. It MAY be used in many", + " cryptographic protocols, however, so long as one remembers that this", + " (like everything else on-chain) it is public. For example, it can be", + " used where a number is needed that cannot have been chosen by an", + " adversary, for purposes such as public-coin zero-knowledge proofs." + ] + }, + { + "name": "NextRandomness", + "modifier": "Default", + "type": { + "Plain": "[u8;32]" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Next epoch randomness." + ] + }, + { + "name": "SegmentIndex", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Randomness under construction.", + "", + " We make a tradeoff between storage accesses and list length.", + " We store the under-construction randomness in segments of up to", + " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.", + "", + " Once a segment reaches this length, we begin the next one.", + " We reset all segments and return to `0` at the beginning of every", + " epoch." + ] + }, + { + "name": "UnderConstruction", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "u32", + "value": "Vec<[u8;32]>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [] + }, + { + "name": "Initialized", + "modifier": "Optional", + "type": { + "Plain": "MaybeVrf" + }, + "fallback": "0x00", + "documentation": [ + " Temporary value (cleared at block finalization) which is `Some`", + " if per-block initialization has already been called for current block." + ] + } + ] + }, + "calls": [], + "events": null, + "constants": [ + { + "name": "EpochDuration", + "type": "u64", + "value": "0xc800000000000000", + "documentation": [ + " The number of **slots** that an epoch takes. We couple sessions to", + " epochs, i.e. we start a new session once the new epoch begins." + ] + }, + { + "name": "ExpectedBlockTime", + "type": "Moment", + "value": "0xb80b000000000000", + "documentation": [ + " The expected average block time at which BABE should be creating", + " blocks. Since BABE is probabilistic it is not trivial to figure out", + " what the expected average block time should be based on the slot", + " duration and the security parameter `c` (where `1 - c` represents", + " the probability of a slot being empty)." + ] + } + ], + "errors": [] + }, + { + "name": "Timestamp", + "storage": { + "prefix": "Timestamp", + "items": [ + { + "name": "Now", + "modifier": "Default", + "type": { + "Plain": "Moment" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current time for the current block." + ] + }, + { + "name": "DidUpdate", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Did the timestamp get updated in this block?" + ] + } + ] + }, + "calls": [ + { + "name": "set", + "args": [ + { + "name": "now", + "type": "Compact" + } + ], + "documentation": [ + " Set the current time.", + "", + " This call should be invoked exactly once per block. It will panic at the finalization", + " phase, if this call hasn't been invoked by that time.", + "", + " The timestamp should be greater than the previous one by the amount specified by", + " `MinimumPeriod`.", + "", + " The dispatch origin for this call must be `Inherent`." + ] + } + ], + "events": null, + "constants": [ + { + "name": "MinimumPeriod", + "type": "Moment", + "value": "0xdc05000000000000", + "documentation": [ + " The minimum period between blocks. Beware that this is different to the *expected* period", + " that the block production apparatus provides. Your chosen consensus system will generally", + " work with this to determine a sensible block time. e.g. For Aura, it will be double this", + " period on default settings." + ] + } + ], + "errors": [] + }, + { + "name": "Authorship", + "storage": { + "prefix": "Authorship", + "items": [ + { + "name": "Uncles", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Uncles" + ] + }, + { + "name": "Author", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " Author of current block." + ] + }, + { + "name": "DidSetUncles", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Whether uncles were already set in this block." + ] + } + ] + }, + "calls": [ + { + "name": "set_uncles", + "args": [ + { + "name": "new_uncles", + "type": "Vec
" + } + ], + "documentation": [ + " Provide a set of uncles." + ] + } + ], + "events": null, + "constants": [], + "errors": [] + }, + { + "name": "Indices", + "storage": { + "prefix": "Indices", + "items": [ + { + "name": "NextEnumSet", + "modifier": "Default", + "type": { + "Plain": "AccountIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The next free enumeration set." + ] + }, + { + "name": "EnumSet", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountIndex", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The enumeration sets." + ] + } + ] + }, + "calls": [], + "events": [ + { + "name": "NewAccountIndex", + "args": [ + "AccountId", + "AccountIndex" + ], + "documentation": [ + " A new account index was assigned.", + "", + " This event is not triggered when an existing index is reassigned", + " to another `AccountId`." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "Balances", + "storage": { + "prefix": "Balances", + "items": [ + { + "name": "TotalIssuance", + "modifier": "Default", + "type": { + "Plain": "Balance" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The total units issued in the system." + ] + }, + { + "name": "Vesting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "VestingSchedule", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information regarding the vesting of a given account." + ] + }, + { + "name": "FreeBalance", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Balance", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The 'free' balance of a given account.", + "", + " This is the only balance that matters in terms of most operations on tokens. It", + " alone is used to determine the balance when in the contract execution environment. When this", + " balance falls below the value of `ExistentialDeposit`, then the 'current account' is", + " deleted: specifically `FreeBalance`. Further, the `OnFreeBalanceZero` callback", + " is invoked, giving a chance to external modules to clean up data associated with", + " the deleted account.", + "", + " `system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`." + ] + }, + { + "name": "ReservedBalance", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Balance", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of the balance of a given account that is externally reserved; this can still get", + " slashed, but gets slashed last of all.", + "", + " This balance is a 'reserve' balance that other subsystems use in order to set aside tokens", + " that are still 'owned' by the account holder, but which are suspendable.", + "", + " When this balance falls below the value of `ExistentialDeposit`, then this 'reserve account'", + " is deleted: specifically, `ReservedBalance`.", + "", + " `system::AccountNonce` is also deleted if `FreeBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`.)" + ] + }, + { + "name": "Locks", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Any liquidity locks on some account balances." + ] + } + ] + }, + "calls": [ + { + "name": "transfer", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Transfer some liquid free balance to another account.", + "", + " `transfer` will set the `FreeBalance` of the sender and receiver.", + " It will decrease the total issuance of the system by the `TransferFee`.", + " If the sender's account is below the existential deposit as a result", + " of the transfer, the account will be reaped.", + "", + " The dispatch origin for this call must be `Signed` by the transactor.", + "", + " # ", + " - Dependent on arguments but not critical, given proper implementations for", + " input config types. See related functions below.", + " - It contains a limited number of reads and writes internally and no complex computation.", + "", + " Related functions:", + "", + " - `ensure_can_withdraw` is always called internally but has a bounded complexity.", + " - Transferring balances to accounts that did not exist before will cause", + " `T::OnNewAccount::on_new_account` to be called.", + " - Removing enough funds from an account will trigger", + " `T::DustRemoval::on_unbalanced` and `T::OnFreeBalanceZero::on_free_balance_zero`.", + " - `transfer_keep_alive` works the same way as `transfer`, but has an additional", + " check that the transfer will not kill the origin account.", + "", + " # " + ] + }, + { + "name": "set_balance", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "new_free", + "type": "Compact" + }, + { + "name": "new_reserved", + "type": "Compact" + } + ], + "documentation": [ + " Set the balances of a given account.", + "", + " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", + " also decrease the total issuance of the system (`TotalIssuance`).", + " If the new free or reserved balance is below the existential deposit,", + " it will reset the account nonce (`system::AccountNonce`).", + "", + " The dispatch origin for this call is `root`.", + "", + " # ", + " - Independent of the arguments.", + " - Contains a limited number of reads and writes.", + " # " + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Exactly as `transfer`, except the origin must be root and the source account may be", + " specified." + ] + }, + { + "name": "transfer_keep_alive", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Same as the [`transfer`] call, but with a check that the transfer will not kill the", + " origin account.", + "", + " 99% of the time you want [`transfer`] instead.", + "", + " [`transfer`]: struct.Module.html#method.transfer" + ] + } + ], + "events": [ + { + "name": "NewAccount", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A new account was created." + ] + }, + { + "name": "ReapedAccount", + "args": [ + "AccountId" + ], + "documentation": [ + " An account was reaped." + ] + }, + { + "name": "Transfer", + "args": [ + "AccountId", + "AccountId", + "Balance", + "Balance" + ], + "documentation": [ + " Transfer succeeded (from, to, value, fees)." + ] + } + ], + "constants": [ + { + "name": "ExistentialDeposit", + "type": "Balance", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The minimum amount required to keep an account open." + ] + }, + { + "name": "TransferFee", + "type": "Balance", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to make a transfer." + ] + }, + { + "name": "CreationFee", + "type": "Balance", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to create an account." + ] + } + ], + "errors": [] + }, + { + "name": "TransactionPayment", + "storage": { + "prefix": "Balances", + "items": [ + { + "name": "NextFeeMultiplier", + "modifier": "Default", + "type": { + "Plain": "Multiplier" + }, + "fallback": "0x0000000000000000", + "documentation": [] + } + ] + }, + "calls": null, + "events": null, + "constants": [ + { + "name": "TransactionBaseFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the base." + ] + }, + { + "name": "TransactionByteFee", + "type": "BalanceOf", + "value": "0x00e40b54020000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + } + ], + "errors": [] + }, + { + "name": "Staking", + "storage": { + "prefix": "Staking", + "items": [ + { + "name": "ValidatorCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The ideal number of staking participants." + ] + }, + { + "name": "MinimumValidatorCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x04000000", + "documentation": [ + " Minimum number of staking participants before emergency conditions are imposed." + ] + }, + { + "name": "Invulnerables", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", + " easy to initialize and the performance hit is minimal (we expect no more than four", + " invulnerables) and restricted to testnets." + ] + }, + { + "name": "Bonded", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all locked \"stash\" accounts to the controller account." + ] + }, + { + "name": "Ledger", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "StakingLedger", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." + ] + }, + { + "name": "Payee", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "RewardDestination", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Where the reward payment should be made. Keyed by stash." + ] + }, + { + "name": "Validators", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "ValidatorPrefs", + "linked": true + } + }, + "fallback": "0x00", + "documentation": [ + " The map from (wannabe) validator stash key to the preferences of that validator." + ] + }, + { + "name": "Nominators", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Nominations", + "linked": true + } + }, + "fallback": "0x00", + "documentation": [ + " The map from nominator stash key to the set of stash keys of all validators to nominate.", + "", + " NOTE: is private so that we can ensure upgraded before all typical accesses.", + " Direct storage APIs can still bypass this protection." + ] + }, + { + "name": "Stakers", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Exposure", + "linked": false + } + }, + "fallback": "0x000000", + "documentation": [ + " Nominators for a particular account that is in action right now. You can't iterate", + " through validators here, but you can find them in the Session module.", + "", + " This is keyed by the stash account." + ] + }, + { + "name": "CurrentElected", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The currently elected validator set keyed by stash account ID." + ] + }, + { + "name": "CurrentEra", + "modifier": "Default", + "type": { + "Plain": "EraIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The current era index." + ] + }, + { + "name": "CurrentEraStart", + "modifier": "Default", + "type": { + "Plain": "MomentOf" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The start of the current era." + ] + }, + { + "name": "CurrentEraStartSessionIndex", + "modifier": "Default", + "type": { + "Plain": "SessionIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The session index at which the current era started." + ] + }, + { + "name": "CurrentEraPointsEarned", + "modifier": "Default", + "type": { + "Plain": "EraPoints" + }, + "fallback": "0x0000000000", + "documentation": [ + " Rewards for the current era. Using indices of current elected set." + ] + }, + { + "name": "SlotStake", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of balance actively at stake for each validator slot, currently.", + "", + " This is used to derive rewards and punishments." + ] + }, + { + "name": "ForceEra", + "modifier": "Default", + "type": { + "Plain": "Forcing" + }, + "fallback": "0x00", + "documentation": [ + " True if the next session change will be a new era regardless of index." + ] + }, + { + "name": "SlashRewardFraction", + "modifier": "Default", + "type": { + "Plain": "Perbill" + }, + "fallback": "0x00000000", + "documentation": [ + " The percentage of the slash that is distributed to reporters.", + "", + " The rest of the slashed value is handled by the `Slash`." + ] + }, + { + "name": "CanceledSlashPayout", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of currency given to reporters of a slash event which was", + " canceled by extraordinary circumstances (e.g. governance)." + ] + }, + { + "name": "UnappliedSlashes", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "EraIndex", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " All unapplied slashes that are queued for later." + ] + }, + { + "name": "BondedEras", + "modifier": "Default", + "type": { + "Plain": "Vec<(EraIndex,SessionIndex)>" + }, + "fallback": "0x00", + "documentation": [ + " A mapping from still-bonded eras to the first session index of that era." + ] + }, + { + "name": "ValidatorSlashInEra", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "EraIndex", + "key2": "AccountId", + "value": "(Perbill,BalanceOf)", + "key2Hasher": "Twox128" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on validators, mapped by era to the highest slash proportion", + " and slash value of the era." + ] + }, + { + "name": "NominatorSlashInEra", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "EraIndex", + "key2": "AccountId", + "value": "BalanceOf", + "key2Hasher": "Twox128" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on nominators, mapped by era to the highest slash value of the era." + ] + }, + { + "name": "SlashingSpans", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "SlashingSpans", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Slashing spans for stash accounts." + ] + }, + { + "name": "SpanSlash", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "(AccountId,SpanIndex)", + "value": "SpanRecord", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Records information about the maximum slash of a stash within a slashing span,", + " as well as how much reward has been paid out." + ] + }, + { + "name": "EarliestUnappliedSlash", + "modifier": "Optional", + "type": { + "Plain": "EraIndex" + }, + "fallback": "0x00", + "documentation": [ + " The earliest era for which we have a pending, unapplied slash." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The version of storage for upgrade." + ] + } + ] + }, + "calls": [ + { + "name": "bond", + "args": [ + { + "name": "controller", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " Take the origin account as a stash and lock up `value` of its balance. `controller` will", + " be the account that controls it.", + "", + " `value` must be more than the `minimum_balance` specified by `T::Currency`.", + "", + " The dispatch origin for this call must be _Signed_ by the stash account.", + "", + " # ", + " - Independent of the arguments. Moderate complexity.", + " - O(1).", + " - Three extra DB entries.", + "", + " NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned unless", + " the `origin` falls below _existential deposit_ and gets removed as dust.", + " # " + ] + }, + { + "name": "bond_extra", + "args": [ + { + "name": "max_additional", + "type": "Compact" + } + ], + "documentation": [ + " Add some extra amount that have appeared in the stash `free_balance` into the balance up", + " for staking.", + "", + " Use this if there are additional funds in your stash account that you wish to bond.", + " Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount", + " that can be added.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - O(1).", + " - One DB entry.", + " # " + ] + }, + { + "name": "unbond", + "args": [ + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", + " period ends. If this leaves an amount actively bonded less than", + " T::Currency::minimum_balance(), then it is increased to the full amount.", + "", + " Once the unlock period is done, you can call `withdraw_unbonded` to actually move", + " the funds out of management ready for transfer.", + "", + " No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)", + " can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need", + " to be called first to remove some of the chunks (if possible).", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " See also [`Call::withdraw_unbonded`].", + "", + " # ", + " - Independent of the arguments. Limited but potentially exploitable complexity.", + " - Contains a limited number of reads.", + " - Each call (requires the remainder of the bonded balance to be above `minimum_balance`)", + " will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage.", + " The only way to clean the aforementioned storage item is also user-controlled via `withdraw_unbonded`.", + " - One DB entry.", + " " + ] + }, + { + "name": "withdraw_unbonded", + "args": [], + "documentation": [ + " Remove any unlocked chunks from the `unlocking` queue from our management.", + "", + " This essentially frees up that balance to be used by the stash account to do", + " whatever it wants.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " See also [`Call::unbond`].", + "", + " # ", + " - Could be dependent on the `origin` argument and how much `unlocking` chunks exist.", + " It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is", + " indirectly user-controlled. See [`unbond`] for more detail.", + " - Contains a limited number of reads, yet the size of which could be large based on `ledger`.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "validate", + "args": [ + { + "name": "prefs", + "type": "ValidatorPrefs" + } + ], + "documentation": [ + " Declare the desire to validate for the origin controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "nominate", + "args": [ + { + "name": "targets", + "type": "Vec" + } + ], + "documentation": [ + " Declare the desire to nominate `targets` for the origin controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - The transaction's complexity is proportional to the size of `targets`,", + " which is capped at `MAX_NOMINATIONS`.", + " - Both the reads and writes follow a similar pattern.", + " # " + ] + }, + { + "name": "chill", + "args": [], + "documentation": [ + " Declare no desire to either validate or nominate.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains one read.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "set_payee", + "args": [ + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " (Re-)set the payment target for a controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "set_controller", + "args": [ + { + "name": "controller", + "type": "LookupSource" + } + ], + "documentation": [ + " (Re-)set the controller of a stash.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "set_validator_count", + "args": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " The ideal number of validators." + ] + }, + { + "name": "force_no_eras", + "args": [], + "documentation": [ + " Force there to be no new eras indefinitely.", + "", + " # ", + " - No arguments.", + " # " + ] + }, + { + "name": "force_new_era", + "args": [], + "documentation": [ + " Force there to be a new era at the end of the next session. After this, it will be", + " reset to normal (non-forced) behaviour.", + "", + " # ", + " - No arguments.", + " # " + ] + }, + { + "name": "set_invulnerables", + "args": [ + { + "name": "validators", + "type": "Vec" + } + ], + "documentation": [ + " Set the validators who cannot be slashed (if any)." + ] + }, + { + "name": "force_unstake", + "args": [ + { + "name": "stash", + "type": "AccountId" + } + ], + "documentation": [ + " Force a current staker to become completely unstaked, immediately." + ] + }, + { + "name": "force_new_era_always", + "args": [], + "documentation": [ + " Force there to be a new era at the end of sessions indefinitely.", + "", + " # ", + " - One storage write", + " # " + ] + }, + { + "name": "cancel_deferred_slash", + "args": [ + { + "name": "era", + "type": "EraIndex" + }, + { + "name": "slash_indices", + "type": "Vec" + } + ], + "documentation": [ + " Cancel enactment of a deferred slash. Can be called by either the root origin or", + " the `T::SlashCancelOrigin`.", + " passing the era and indices of the slashes for that era to kill.", + "", + " # ", + " - One storage write.", + " # " + ] + } + ], + "events": [ + { + "name": "Reward", + "args": [ + "Balance", + "Balance" + ], + "documentation": [ + " All validators have been rewarded by the first balance; the second is the remainder", + " from the maximum amount of reward." + ] + }, + { + "name": "Slash", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " One validator (and its nominators) has been slashed by the given amount." + ] + }, + { + "name": "OldSlashingReportDiscarded", + "args": [ + "SessionIndex" + ], + "documentation": [ + " An old slashing report from a prior era was discarded because it could", + " not be processed." + ] + } + ], + "constants": [ + { + "name": "SessionsPerEra", + "type": "SessionIndex", + "value": "0x06000000", + "documentation": [ + " Number of sessions per era." + ] + }, + { + "name": "BondingDuration", + "type": "EraIndex", + "value": "0xa0020000", + "documentation": [ + " Number of eras that staked funds must remain bonded for." + ] + } + ], + "errors": [] + }, + { + "name": "Session", + "storage": { + "prefix": "Session", + "items": [ + { + "name": "Validators", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of validators." + ] + }, + { + "name": "CurrentIndex", + "modifier": "Default", + "type": { + "Plain": "SessionIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Current index of the session." + ] + }, + { + "name": "QueuedChanged", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the underlying economic identities or weighting behind the validators", + " has changed in the queued validator set." + ] + }, + { + "name": "QueuedKeys", + "modifier": "Default", + "type": { + "Plain": "Vec<(ValidatorId,Keys)>" + }, + "fallback": "0x00", + "documentation": [ + " The queued keys for the next session. When the next session begins, these keys", + " will be used to determine the validator's session keys." + ] + }, + { + "name": "DisabledValidators", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Indices of disabled validators.", + "", + " The set is cleared when `on_session_ending` returns a new set of identities." + ] + }, + { + "name": "NextKeys", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "Bytes", + "key2": "ValidatorId", + "value": "Keys", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00", + "documentation": [ + " The next session keys for a validator.", + "", + " The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of", + " the trie. Having all data in the same branch should prevent slowing down other queries." + ] + }, + { + "name": "KeyOwner", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "Bytes", + "key2": "(KeyTypeId,Bytes)", + "value": "ValidatorId", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00", + "documentation": [ + " The owner of a key. The second key is the `KeyTypeId` + the encoded key.", + "", + " The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of", + " the trie. Having all data in the same branch should prevent slowing down other queries." + ] + } + ] + }, + "calls": [ + { + "name": "set_keys", + "args": [ + { + "name": "keys", + "type": "Keys" + }, + { + "name": "proof", + "type": "Bytes" + } + ], + "documentation": [ + " Sets the session key(s) of the function caller to `key`.", + " Allows an account to set its session key prior to becoming a validator.", + " This doesn't take effect until the next session.", + "", + " The dispatch origin of this function must be signed.", + "", + " # ", + " - O(log n) in number of accounts.", + " - One extra DB entry.", + " # " + ] + } + ], + "events": [ + { + "name": "NewSession", + "args": [ + "SessionIndex" + ], + "documentation": [ + " New session has happened. Note that the argument is the session index, not the block", + " number as the type might suggest." + ] + } + ], + "constants": [ + { + "name": "DEDUP_KEY_PREFIX", + "type": "Bytes", + "value": "0x343a73657373696f6e3a6b657973", + "documentation": [ + " Used as first key for `NextKeys` and `KeyOwner` to put all the data into the same branch", + " of the trie." + ] + } + ], + "errors": [] + }, + { + "name": "Democracy", + "storage": { + "prefix": "Democracy", + "items": [ + { + "name": "PublicPropCount", + "modifier": "Default", + "type": { + "Plain": "PropIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of (public) proposals that have been made so far." + ] + }, + { + "name": "PublicProps", + "modifier": "Default", + "type": { + "Plain": "Vec<(PropIndex,Hash,AccountId)>" + }, + "fallback": "0x00", + "documentation": [ + " The public proposals. Unsorted. The second item is the proposal's hash." + ] + }, + { + "name": "Preimages", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "(Bytes,AccountId,BalanceOf,BlockNumber)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map of hashes to the proposal preimage, along with who registered it and their deposit.", + " The block number is the block at which it was deposited." + ] + }, + { + "name": "DepositOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "PropIndex", + "value": "(BalanceOf,Vec)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Those who have locked a deposit." + ] + }, + { + "name": "ReferendumCount", + "modifier": "Default", + "type": { + "Plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The next free referendum index, aka the number of referenda started so far." + ] + }, + { + "name": "NextTally", + "modifier": "Default", + "type": { + "Plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The next referendum index that should be tallied." + ] + }, + { + "name": "ReferendumInfoOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "ReferendumIndex", + "value": "ReferendumInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information concerning any given referendum." + ] + }, + { + "name": "DispatchQueue", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "BlockNumber", + "value": "Vec>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Queue of successful referenda to be dispatched." + ] + }, + { + "name": "VotersFor", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "ReferendumIndex", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Get the voters for the current proposal." + ] + }, + { + "name": "VoteOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "(ReferendumIndex,AccountId)", + "value": "Vote", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Get the vote in a given referendum of a particular voter. The result is meaningful only", + " if `voters_for` includes the voter when called with the referendum (you'll get the", + " default `Vote` value otherwise). If you don't want to check `voters_for`, then you can", + " also check for simple existence with `VoteOf::exists` first." + ] + }, + { + "name": "Proxy", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Who is able to vote for whom. Value is the fund-holding account, key is the", + " vote-transaction-sending account." + ] + }, + { + "name": "Delegations", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "(AccountId,Conviction)", + "linked": true + } + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Get the account (and lock periods) to which another account is delegating vote." + ] + }, + { + "name": "LastTabledWasExternal", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the last referendum tabled was submitted externally. False if it was a public", + " proposal." + ] + }, + { + "name": "NextExternal", + "modifier": "Optional", + "type": { + "Plain": "(Hash,VoteThreshold)" + }, + "fallback": "0x00", + "documentation": [ + " The referendum to be tabled whenever it would be valid to table an external proposal.", + " This happens when a referendum needs to be tabled and one of two conditions are met:", + " - `LastTabledWasExternal` is `false`; or", + " - `PublicProps` is empty." + ] + }, + { + "name": "Blacklist", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "(BlockNumber,Vec)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A record of who vetoed what. Maps proposal hash to a possible existent block number", + " (until when it may not be resubmitted) and who vetoed it." + ] + }, + { + "name": "Cancellations", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "bool", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Record of all proposals that have been subject to emergency cancellation." + ] + } + ] + }, + "calls": [ + { + "name": "propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken.", + "", + " # ", + " - O(1).", + " - Two DB changes, one DB entry.", + " # " + ] + }, + { + "name": "second", + "args": [ + { + "name": "proposal", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken.", + "", + " # ", + " - O(1).", + " - One DB entry.", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "name": "vote", + "type": "Vote" + } + ], + "documentation": [ + " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", + " otherwise it is a vote to keep the status quo.", + "", + " # ", + " - O(1).", + " - One DB change, one DB entry.", + " # " + ] + }, + { + "name": "proxy_vote", + "args": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "name": "vote", + "type": "Vote" + } + ], + "documentation": [ + " Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact", + " the proposal; otherwise it is a vote to keep the status quo.", + "", + " # ", + " - O(1).", + " - One DB change, one DB entry.", + " # " + ] + }, + { + "name": "emergency_cancel", + "args": [ + { + "name": "ref_index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", + " referendum." + ] + }, + { + "name": "external_propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a referendum to be tabled once it is legal to schedule an external", + " referendum." + ] + }, + { + "name": "external_propose_majority", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", + " an external referendum.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call." + ] + }, + { + "name": "external_propose_default", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", + " schedule an external referendum.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call." + ] + }, + { + "name": "fast_track", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "voting_period", + "type": "BlockNumber" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Schedule the currently externally-proposed majority-carries referendum to be tabled", + " immediately. If there is no externally-proposed referendum currently, or if there is one", + " but it is not a majority-carries referendum then it fails.", + "", + " - `proposal_hash`: The hash of the current external proposal.", + " - `voting_period`: The period that is allowed for voting on this proposal. Increased to", + " `EmergencyVotingPeriod` if too low.", + " - `delay`: The number of block after voting has ended in approval and this should be", + " enacted. This doesn't have a minimum amount." + ] + }, + { + "name": "veto_external", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Veto and blacklist the external proposal hash." + ] + }, + { + "name": "cancel_referendum", + "args": [ + { + "name": "ref_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a referendum." + ] + }, + { + "name": "cancel_queued", + "args": [ + { + "name": "when", + "type": "Compact" + }, + { + "name": "which", + "type": "Compact" + }, + { + "name": "what", + "type": "Compact" + } + ], + "documentation": [ + " Cancel a proposal queued for enactment." + ] + }, + { + "name": "set_proxy", + "args": [ + { + "name": "proxy", + "type": "AccountId" + } + ], + "documentation": [ + " Specify a proxy. Called by the stash.", + "", + " # ", + " - One extra DB entry.", + " # " + ] + }, + { + "name": "resign_proxy", + "args": [], + "documentation": [ + " Clear the proxy. Called by the proxy.", + "", + " # ", + " - One DB clear.", + " # " + ] + }, + { + "name": "remove_proxy", + "args": [ + { + "name": "proxy", + "type": "AccountId" + } + ], + "documentation": [ + " Clear the proxy. Called by the stash.", + "", + " # ", + " - One DB clear.", + " # " + ] + }, + { + "name": "delegate", + "args": [ + { + "name": "to", + "type": "AccountId" + }, + { + "name": "conviction", + "type": "Conviction" + } + ], + "documentation": [ + " Delegate vote.", + "", + " # ", + " - One extra DB entry.", + " # " + ] + }, + { + "name": "undelegate", + "args": [], + "documentation": [ + " Undelegate vote.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "clear_public_proposals", + "args": [], + "documentation": [ + " Veto and blacklist the proposal hash. Must be from Root origin." + ] + }, + { + "name": "note_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", + " in the dispatch queue but does require a deposit, returned once enacted." + ] + }, + { + "name": "note_imminent_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + }, + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "which", + "type": "u32" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This requires the proposal to be", + " in the dispatch queue. No deposit is needed." + ] + }, + { + "name": "reap_preimage", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Remove an expired proposal preimage and collect the deposit." + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "PropIndex", + "Balance" + ], + "documentation": [ + " A motion has been proposed by a public account." + ] + }, + { + "name": "Tabled", + "args": [ + "PropIndex", + "Balance", + "Vec" + ], + "documentation": [ + " A public proposal has been tabled for referendum vote." + ] + }, + { + "name": "ExternalTabled", + "args": [], + "documentation": [ + " An external proposal has been tabled." + ] + }, + { + "name": "Started", + "args": [ + "ReferendumIndex", + "VoteThreshold" + ], + "documentation": [ + " A referendum has begun." + ] + }, + { + "name": "Passed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been approved by referendum." + ] + }, + { + "name": "NotPassed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been rejected by referendum." + ] + }, + { + "name": "Cancelled", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A referendum has been cancelled." + ] + }, + { + "name": "Executed", + "args": [ + "ReferendumIndex", + "bool" + ], + "documentation": [ + " A proposal has been enacted." + ] + }, + { + "name": "Delegated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " An account has delegated their vote to another account." + ] + }, + { + "name": "Undelegated", + "args": [ + "AccountId" + ], + "documentation": [ + " An account has cancelled a previous delegation operation." + ] + }, + { + "name": "Vetoed", + "args": [ + "AccountId", + "Hash", + "BlockNumber" + ], + "documentation": [ + " An external proposal has been vetoed." + ] + }, + { + "name": "PreimageNoted", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal's preimage was noted, and the deposit taken." + ] + }, + { + "name": "PreimageUsed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal preimage was removed and used (the deposit was returned)." + ] + }, + { + "name": "PreimageInvalid", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was invalid." + ] + }, + { + "name": "PreimageMissing", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was missing." + ] + }, + { + "name": "PreimageReaped", + "args": [ + "Hash", + "AccountId", + "Balance", + "AccountId" + ], + "documentation": [ + " A registered preimage was removed and the deposit collected by the reaper (last item)." + ] + } + ], + "constants": [ + { + "name": "EnactmentPeriod", + "type": "BlockNumber", + "value": "0x002f0d00", + "documentation": [ + " The minimum period of locking and the period between a proposal being approved and enacted.", + "", + " It should generally be a little more than the unstake period to ensure that", + " voting stakers have an opportunity to remove themselves from the system in the case where", + " they are on the losing side of a vote." + ] + }, + { + "name": "LaunchPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) new public referenda are launched." + ] + }, + { + "name": "VotingPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "MinimumDeposit", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "documentation": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "EmergencyVotingPeriod", + "type": "BlockNumber", + "value": "0x80510100", + "documentation": [ + " Minimum voting period allowed for an emergency referendum." + ] + }, + { + "name": "CooloffPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " Period in blocks where an external proposal may not be re-submitted after being vetoed." + ] + }, + { + "name": "PreimageByteDeposit", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount of balance that must be deposited per byte of preimage stored." + ] + } + ], + "errors": [] + }, + { + "name": "Council", + "storage": { + "prefix": "Instance1Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + } + ], + "documentation": [ + " Set the collective's membership manually to `new_members`. Be nice to the chain and", + " provide it pre-sorted.", + "", + " Requires root origin." + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective." + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " # ", + " - Bounded storage reads and writes.", + " - Argument `threshold` has bearing on weight.", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " # ", + " - Bounded storage read and writes.", + " - Will be slightly heavier if the proposal is approved / disapproved after the vote.", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`)." + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`)." + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold." + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold." + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "bool" + ], + "documentation": [ + " A motion was executed; `bool` is true if returned without error." + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "bool" + ], + "documentation": [ + " A single member did some action; `bool` is true if returned without error." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "TechnicalCommittee", + "storage": { + "prefix": "Instance2Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + } + ], + "documentation": [ + " Set the collective's membership manually to `new_members`. Be nice to the chain and", + " provide it pre-sorted.", + "", + " Requires root origin." + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective." + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " # ", + " - Bounded storage reads and writes.", + " - Argument `threshold` has bearing on weight.", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " # ", + " - Bounded storage read and writes.", + " - Will be slightly heavier if the proposal is approved / disapproved after the vote.", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`)." + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`)." + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold." + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold." + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "bool" + ], + "documentation": [ + " A motion was executed; `bool` is true if returned without error." + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "bool" + ], + "documentation": [ + " A single member did some action; `bool` is true if returned without error." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "Elections", + "storage": { + "prefix": "PhragmenElection", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec<(AccountId,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The current elected membership. Sorted based on account id." + ] + }, + { + "name": "RunnersUp", + "modifier": "Default", + "type": { + "Plain": "Vec<(AccountId,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The current runners_up. Sorted based on low to high merit (worse to best runner)." + ] + }, + { + "name": "ElectionRounds", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The total number of vote rounds that have happened, excluding the upcoming one." + ] + }, + { + "name": "VotesOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Vec", + "linked": true + } + }, + "fallback": "0x00", + "documentation": [ + " Votes of a particular voter, with the round index of the votes." + ] + }, + { + "name": "StakeOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "BalanceOf", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " Locked stake of a voter." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The present candidate list. Sorted based on account id. A current member can never enter", + " this vector and is always implicitly assumed to be a candidate." + ] + } + ] + }, + "calls": [ + { + "name": "vote", + "args": [ + { + "name": "votes", + "type": "Vec" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Vote for a set of candidates for the upcoming round of election.", + "", + " The `votes` should:", + " - not be empty.", + " - be less than the number of candidates.", + "", + " Upon voting, `value` units of `who`'s balance is locked and a bond amount is reserved.", + " It is the responsibility of the caller to not place all of their balance into the lock", + " and keep some for further transactions.", + "", + " # ", + " #### State", + " Reads: O(1)", + " Writes: O(V) given `V` votes. V is bounded by 16.", + " # " + ] + }, + { + "name": "remove_voter", + "args": [], + "documentation": [ + " Remove `origin` as a voter. This removes the lock and returns the bond.", + "", + " # ", + " #### State", + " Reads: O(1)", + " Writes: O(1)", + " # " + ] + }, + { + "name": "report_defunct_voter", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Report `target` for being an defunct voter. In case of a valid report, the reporter is", + " rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and", + " their bond is slashed.", + "", + " A defunct voter is defined to be:", + " - a voter whose current submitted votes are all invalid. i.e. all of them are no", + " longer a candidate nor an active member.", + "", + " # ", + " #### State", + " Reads: O(NLogM) given M current candidates and N votes for `target`.", + " Writes: O(1)", + " # " + ] + }, + { + "name": "submit_candidacy", + "args": [], + "documentation": [ + " Submit oneself for candidacy.", + "", + " A candidate will either:", + " - Lose at the end of the term and forfeit their deposit.", + " - Win and become a member. Members will eventually get their stash back.", + " - Become a runner-up. Runners-ups are reserved members in case one gets forcefully", + " removed.", + "", + " # ", + " #### State", + " Reads: O(LogN) Given N candidates.", + " Writes: O(1)", + " # " + ] + }, + { + "name": "renounce_candidacy", + "args": [], + "documentation": [ + " Renounce one's intention to be a candidate for the next election round. 3 potential", + " outcomes exist:", + " - `origin` is a candidate and not elected in any set. In this case, the bond is", + " unreserved, returned and origin is removed as a candidate.", + " - `origin` is a current runner up. In this case, the bond is unreserved, returned and", + " origin is removed as a runner.", + " - `origin` is a current member. In this case, the bond is unreserved and origin is", + " removed as a member, consequently not being a candidate for the next round anymore.", + " Similar to [`remove_voter`], if replacement runners exists, they are immediately used." + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove a particular member from the set. This is effective immediately and the bond of", + " the outgoing member is slashed.", + "", + " If a runner-up is available, then the best runner-up will be removed and replaces the", + " outgoing member. Otherwise, a new phragmen round is started.", + "", + " Note that this does not affect the designated block number of the next election.", + "", + " # ", + " #### State", + " Reads: O(do_phragmen)", + " Writes: O(do_phragmen)", + " # " + ] + } + ], + "events": [ + { + "name": "NewTerm", + "args": [ + "Vec<(AccountId,Balance)>" + ], + "documentation": [ + " A new term with new members. This indicates that enough candidates existed, not that", + " enough have has been elected. The inner value must be examined for this purpose." + ] + }, + { + "name": "EmptyTerm", + "args": [], + "documentation": [ + " No (or not enough) candidates existed for this round." + ] + }, + { + "name": "MemberKicked", + "args": [ + "AccountId" + ], + "documentation": [ + " A member has been removed. This should always be followed by either `NewTerm` ot", + " `EmptyTerm`." + ] + }, + { + "name": "MemberRenounced", + "args": [ + "AccountId" + ], + "documentation": [ + " A member has renounced their candidacy." + ] + }, + { + "name": "VoterReported", + "args": [ + "AccountId", + "AccountId", + "bool" + ], + "documentation": [ + " A voter (first element) was reported (byt the second element) with the the report being", + " successful or not (third element)." + ] + } + ], + "constants": [ + { + "name": "CandidacyBond", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [] + }, + { + "name": "VotingBond", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [] + }, + { + "name": "DesiredMembers", + "type": "u32", + "value": "0x0d000000", + "documentation": [] + }, + { + "name": "DesiredRunnersUp", + "type": "u32", + "value": "0x07000000", + "documentation": [] + }, + { + "name": "TermDuration", + "type": "BlockNumber", + "value": "0x80130300", + "documentation": [] + } + ], + "errors": [] + }, + { + "name": "TechnicalMembership", + "storage": { + "prefix": "Instance1Membership", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current membership, stored as an ordered Vec." + ] + } + ] + }, + "calls": [ + { + "name": "add_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Add a member `who` to the set.", + "", + " May only be called from `AddOrigin` or root." + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Remove a member `who` from the set.", + "", + " May only be called from `RemoveOrigin` or root." + ] + }, + { + "name": "swap_member", + "args": [ + { + "name": "remove", + "type": "AccountId" + }, + { + "name": "add", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out one member `remove` for another `add`.", + "", + " May only be called from `SwapOrigin` or root." + ] + }, + { + "name": "reset_members", + "args": [ + { + "name": "members", + "type": "Vec" + } + ], + "documentation": [ + " Change the membership to a new set, disregarding the existing membership. Be nice and", + " pass `members` pre-sorted.", + "", + " May only be called from `ResetOrigin` or root." + ] + }, + { + "name": "change_key", + "args": [ + { + "name": "new", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out the sending member for some other key `new`.", + "", + " May only be called from `Signed` origin of a current member." + ] + } + ], + "events": [ + { + "name": "MemberAdded", + "args": [], + "documentation": [ + " The given member was added; see the transaction for who." + ] + }, + { + "name": "MemberRemoved", + "args": [], + "documentation": [ + " The given member was removed; see the transaction for who." + ] + }, + { + "name": "MembersSwapped", + "args": [], + "documentation": [ + " Two members were swapped; see the transaction for who." + ] + }, + { + "name": "MembersReset", + "args": [], + "documentation": [ + " The membership was reset; see the transaction for who the new set is." + ] + }, + { + "name": "KeyChanged", + "args": [], + "documentation": [ + " One of the members' keys changed." + ] + }, + { + "name": "Dummy", + "args": [ + "PhantomData" + ], + "documentation": [ + " Phantom member, never used." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "FinalityTracker", + "storage": null, + "calls": [ + { + "name": "final_hint", + "args": [ + { + "name": "hint", + "type": "Compact" + } + ], + "documentation": [ + " Hint that the author of this block thinks the best finalized", + " block is the given number." + ] + } + ], + "events": null, + "constants": [ + { + "name": "WindowSize", + "type": "BlockNumber", + "value": "0x65000000", + "documentation": [ + " The number of recent samples to keep from this chain. Default is 101." + ] + }, + { + "name": "ReportLatency", + "type": "BlockNumber", + "value": "0xe8030000", + "documentation": [ + " The delay after which point things become suspicious. Default is 1000." + ] + } + ], + "errors": [] + }, + { + "name": "Grandpa", + "storage": { + "prefix": "GrandpaFinality", + "items": [ + { + "name": "Authorities", + "modifier": "Default", + "type": { + "Plain": "AuthorityList" + }, + "fallback": "0x00", + "documentation": [ + " DEPRECATED", + "", + " This used to store the current authority set, which has been migrated to the well-known", + " GRANDPA_AUTHORITES_KEY unhashed key." + ] + }, + { + "name": "State", + "modifier": "Default", + "type": { + "Plain": "StoredState" + }, + "fallback": "0x00", + "documentation": [ + " State of the current authority set." + ] + }, + { + "name": "PendingChange", + "modifier": "Optional", + "type": { + "Plain": "StoredPendingChange" + }, + "fallback": "0x00", + "documentation": [ + " Pending change: (signaled at, scheduled change)." + ] + }, + { + "name": "NextForced", + "modifier": "Optional", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00", + "documentation": [ + " next block number where we can force a change." + ] + }, + { + "name": "Stalled", + "modifier": "Optional", + "type": { + "Plain": "(BlockNumber,BlockNumber)" + }, + "fallback": "0x00", + "documentation": [ + " `true` if we are currently stalled." + ] + }, + { + "name": "CurrentSetId", + "modifier": "Default", + "type": { + "Plain": "SetId" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The number of changes (both in terms of keys and underlying economic responsibilities)", + " in the \"set\" of Grandpa validators from genesis." + ] + }, + { + "name": "SetIdSession", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "SetId", + "value": "SessionIndex", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from grandpa set ID to the index of the *most recent* session for which its members were responsible." + ] + } + ] + }, + "calls": [ + { + "name": "report_misbehavior", + "args": [ + { + "name": "_report", + "type": "Bytes" + } + ], + "documentation": [ + " Report some misbehavior." + ] + } + ], + "events": [ + { + "name": "NewAuthorities", + "args": [ + "AuthorityList" + ], + "documentation": [ + " New authority set has been applied." + ] + }, + { + "name": "Paused", + "args": [], + "documentation": [ + " Current authority set has been paused." + ] + }, + { + "name": "Resumed", + "args": [], + "documentation": [ + " Current authority set has been resumed." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "Treasury", + "storage": { + "prefix": "Treasury", + "items": [ + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "ProposalIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Number of proposals that have been made." + ] + }, + { + "name": "Proposals", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "ProposalIndex", + "value": "TreasuryProposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Proposals that have been made." + ] + }, + { + "name": "Approvals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Proposal indices that have been approved but not yet awarded." + ] + } + ] + }, + "calls": [ + { + "name": "propose_spend", + "args": [ + { + "name": "value", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "LookupSource" + } + ], + "documentation": [ + " Put forward a suggestion for spending. A deposit proportional to the value", + " is reserved and slashed if the proposal is rejected. It is returned once the", + " proposal is awarded.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB change, one extra DB entry.", + " # " + ] + }, + { + "name": "reject_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Reject a proposed spend. The original deposit will be slashed.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB clear.", + " # " + ] + }, + { + "name": "approve_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", + " and the original deposit will be returned.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB change.", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "ProposalIndex" + ], + "documentation": [ + " New proposal." + ] + }, + { + "name": "Spending", + "args": [ + "Balance" + ], + "documentation": [ + " We have ended a spend period and will now allocate funds." + ] + }, + { + "name": "Awarded", + "args": [ + "ProposalIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " Some funds have been allocated." + ] + }, + { + "name": "Burnt", + "args": [ + "Balance" + ], + "documentation": [ + " Some of our funds have been burnt." + ] + }, + { + "name": "Rollover", + "args": [ + "Balance" + ], + "documentation": [ + " Spending has finished; this is the amount that rolls over until next spend." + ] + }, + { + "name": "Deposit", + "args": [ + "Balance" + ], + "documentation": [ + " Some funds have been deposited." + ] + } + ], + "constants": [ + { + "name": "ProposalBond", + "type": "Permill", + "value": "0x50c30000", + "documentation": [ + " Fraction of a proposal's value that should be bonded in order to place the proposal.", + " An accepted proposal gets these back. A rejected proposal does not." + ] + }, + { + "name": "ProposalBondMinimum", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "SpendPeriod", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " Period between successive spends." + ] + }, + { + "name": "Burn", + "type": "Permill", + "value": "0x20a10700", + "documentation": [ + " Percentage of spare funds (if any) that are burnt per spend period." + ] + } + ], + "errors": [] + }, + { + "name": "Contracts", + "storage": { + "prefix": "Contract", + "items": [ + { + "name": "GasSpent", + "modifier": "Default", + "type": { + "Plain": "Gas" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Gas spent so far in this block." + ] + }, + { + "name": "CurrentSchedule", + "modifier": "Default", + "type": { + "Plain": "Schedule" + }, + "fallback": "0x0000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af0000000000000001000000000000000100000000000000040000000000010010000000004000000020000000", + "documentation": [ + " Current cost schedule for contracts." + ] + }, + { + "name": "PristineCode", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "CodeHash", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from an original code hash to the original code, untouched by instrumentation." + ] + }, + { + "name": "CodeStorage", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "CodeHash", + "value": "PrefabWasmModule", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping between an original code hash and instrumented wasm code, ready for execution." + ] + }, + { + "name": "AccountCounter", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The subtrie counter." + ] + }, + { + "name": "ContractInfoOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "ContractInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The code associated with a given account." + ] + }, + { + "name": "GasPrice", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x01000000000000000000000000000000", + "documentation": [ + " The price of one unit of gas." + ] + } + ] + }, + "calls": [ + { + "name": "update_schedule", + "args": [ + { + "name": "schedule", + "type": "Schedule" + } + ], + "documentation": [ + " Updates the schedule for metering contracts.", + "", + " The schedule must have a greater version than the stored schedule." + ] + }, + { + "name": "put_code", + "args": [ + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Stores the given binary Wasm code into the chain's storage and returns its `codehash`.", + " You can instantiate contracts only with stored code." + ] + }, + { + "name": "call", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Makes a call to an account, optionally transferring some balance.", + "", + " * If the account is a smart-contract account, the associated code will be", + " executed and any value will be transferred.", + " * If the account is a regular account, any value will be transferred.", + " * If no account exists and the call value is not less than `existential_deposit`,", + " a regular account will be created and any value will be transferred." + ] + }, + { + "name": "instantiate", + "args": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code_hash", + "type": "CodeHash" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Instantiates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance.", + "", + " Instantiation is executed as follows:", + "", + " - The destination address is computed based on the sender and hash of the code.", + " - The smart-contract account is created at the computed address.", + " - The `ctor_code` is executed in the context of the newly-created account. Buffer returned", + " after the execution is saved as the `code` of the account. That code will be invoked", + " upon any call received by this account.", + " - The contract is initialized." + ] + }, + { + "name": "claim_surcharge", + "args": [ + { + "name": "dest", + "type": "AccountId" + }, + { + "name": "aux_sender", + "type": "Option" + } + ], + "documentation": [ + " Allows block producers to claim a small reward for evicting a contract. If a block producer", + " fails to do so, a regular users will be allowed to claim the reward.", + "", + " If contract is not evicted as a result of this call, no actions are taken and", + " the sender is not eligible for the reward." + ] + } + ], + "events": [ + { + "name": "Transfer", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Transfer happened `from` to `to` with given `value` as part of a `call` or `instantiate`." + ] + }, + { + "name": "Instantiated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Contract deployed by address at the specified address." + ] + }, + { + "name": "CodeStored", + "args": [ + "Hash" + ], + "documentation": [ + " Code with the specified hash has been stored." + ] + }, + { + "name": "ScheduleUpdated", + "args": [ + "u32" + ], + "documentation": [ + " Triggered when the current schedule is updated." + ] + }, + { + "name": "Dispatched", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A call was dispatched from the given account. The bool signals whether it was", + " successful execution or not." + ] + }, + { + "name": "Contract", + "args": [ + "AccountId", + "Bytes" + ], + "documentation": [ + " An event from contract of account." + ] + } + ], + "constants": [ + { + "name": "SignedClaimHandicap", + "type": "BlockNumber", + "value": "0x02000000", + "documentation": [ + " Number of block delay an extrinsic claim surcharge has.", + "", + " When claim surcharge is called by an extrinsic the rent is checked", + " for current_block - delay" + ] + }, + { + "name": "TombstoneDeposit", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The minimum amount required to generate a tombstone." + ] + }, + { + "name": "StorageSizeOffset", + "type": "u32", + "value": "0x08000000", + "documentation": [ + " Size of a contract at the time of instantiaion. This is a simple way to ensure that", + " empty contracts eventually gets deleted." + ] + }, + { + "name": "RentByteFee", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Price of a byte of storage per one block interval. Should be greater than 0." + ] + }, + { + "name": "RentDepositOffset", + "type": "BalanceOf", + "value": "0x00008a5d784563010000000000000000", + "documentation": [ + " The amount of funds a contract should deposit in order to offset", + " the cost of one byte.", + "", + " Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,", + " then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent.", + " But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000,", + " then it would pay 500 BU/day." + ] + }, + { + "name": "SurchargeReward", + "type": "BalanceOf", + "value": "0x0080a1a76b4a35000000000000000000", + "documentation": [ + " Reward that is received by the party whose touch has led", + " to removal of a contract." + ] + }, + { + "name": "TransferFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to make a transfer." + ] + }, + { + "name": "CreationFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to create an account." + ] + }, + { + "name": "TransactionBaseFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the base." + ] + }, + { + "name": "TransactionByteFee", + "type": "BalanceOf", + "value": "0x00e40b54020000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + }, + { + "name": "ContractFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to instantiate a contract instance. A reasonable default value", + " is 21." + ] + }, + { + "name": "CallBaseFee", + "type": "Gas", + "value": "0xe803000000000000", + "documentation": [ + " The base fee charged for calling into a contract. A reasonable default", + " value is 135." + ] + }, + { + "name": "InstantiateBaseFee", + "type": "Gas", + "value": "0xe803000000000000", + "documentation": [ + " The base fee charged for instantiating a contract. A reasonable default value", + " is 175." + ] + }, + { + "name": "MaxDepth", + "type": "u32", + "value": "0x20000000", + "documentation": [ + " The maximum nesting level of a call/instantiate stack. A reasonable default", + " value is 100." + ] + }, + { + "name": "MaxValueSize", + "type": "u32", + "value": "0x00400000", + "documentation": [ + " The maximum size of a storage value in bytes. A reasonable default is 16 KiB." + ] + }, + { + "name": "BlockGasLimit", + "type": "Gas", + "value": "0x8096980000000000", + "documentation": [ + " The maximum amount of gas that could be expended per block. A reasonable", + " default value is 10_000_000." + ] + } + ], + "errors": [] + }, + { + "name": "Sudo", + "storage": { + "prefix": "Sudo", + "items": [ + { + "name": "Key", + "modifier": "Default", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The `AccountId` of the sudo key." + ] + } + ] + }, + "calls": [ + { + "name": "sudo", + "args": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Root` origin.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Unknown weight of derivative `proposal` execution.", + " # " + ] + }, + { + "name": "set_key", + "args": [ + { + "name": "new", + "type": "LookupSource" + } + ], + "documentation": [ + " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB change.", + " # " + ] + }, + { + "name": "sudo_as", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Signed` origin from", + " a given account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Unknown weight of derivative `proposal` execution.", + " # " + ] + } + ], + "events": [ + { + "name": "Sudid", + "args": [ + "bool" + ], + "documentation": [ + " A sudo just took place." + ] + }, + { + "name": "KeyChanged", + "args": [ + "AccountId" + ], + "documentation": [ + " The sudoer just switched identity; the old key is supplied." + ] + }, + { + "name": "SudoAsDone", + "args": [ + "bool" + ], + "documentation": [ + " A sudo just took place." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "ImOnline", + "storage": { + "prefix": "ImOnline", + "items": [ + { + "name": "GossipAt", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The block number when we should gossip." + ] + }, + { + "name": "Keys", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of keys that may issue a heartbeat." + ] + }, + { + "name": "ReceivedHeartbeats", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "SessionIndex", + "key2": "AuthIndex", + "value": "Bytes", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00", + "documentation": [ + " For each session index, we keep a mapping of `AuthIndex`", + " to `offchain::OpaqueNetworkState`." + ] + }, + { + "name": "AuthoredBlocks", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "SessionIndex", + "key2": "ValidatorId", + "value": "u32", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00000000", + "documentation": [ + " For each session index, we keep a mapping of `T::ValidatorId` to the", + " number of blocks authored by the given authority." + ] + } + ] + }, + "calls": [ + { + "name": "heartbeat", + "args": [ + { + "name": "heartbeat", + "type": "Heartbeat" + }, + { + "name": "_signature", + "type": "Signature" + } + ], + "documentation": [] + } + ], + "events": [ + { + "name": "HeartbeatReceived", + "args": [ + "AuthorityId" + ], + "documentation": [ + " A new heartbeat was received from `AuthorityId`" + ] + }, + { + "name": "AllGood", + "args": [], + "documentation": [ + " At the end of the session, no offence was committed." + ] + }, + { + "name": "SomeOffline", + "args": [ + "Vec" + ], + "documentation": [ + " At the end of the session, at least once validator was found to be offline." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "AuthorityDiscovery", + "storage": null, + "calls": [], + "events": null, + "constants": [], + "errors": [] + }, + { + "name": "Offences", + "storage": { + "prefix": "Offences", + "items": [ + { + "name": "Reports", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "ReportIdOf", + "value": "OffenceDetails", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The primary structure that holds all offence records keyed by report identifiers." + ] + }, + { + "name": "ConcurrentReportsIndex", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "Kind", + "key2": "OpaqueTimeSlot", + "value": "Vec", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00", + "documentation": [ + " A vector of reports of the same kind that happened at the same time slot." + ] + }, + { + "name": "ReportsByKindIndex", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Kind", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Enumerates all reports of a kind along with the time they happened.", + "", + " All reports are sorted by the time of offence.", + "", + " Note that the actual type of this mapping is `Vec`, this is because values of", + " different types are not supported at the moment so we are doing the manual serialization." + ] + } + ] + }, + "calls": [], + "events": [ + { + "name": "Offence", + "args": [ + "Kind", + "OpaqueTimeSlot" + ], + "documentation": [ + " There is an offence reported of the given `kind` happened at the `session_index` and", + " (kind-specific) time slot. This event is not deposited for duplicate slashes." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "RandomnessCollectiveFlip", + "storage": { + "prefix": "RandomnessCollectiveFlip", + "items": [ + { + "name": "RandomMaterial", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Series of block headers from the last 81 blocks that acts as random seed material. This", + " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", + " the oldest hash." + ] + } + ] + }, + "calls": [], + "events": null, + "constants": [], + "errors": [] + }, + { + "name": "Nicks", + "storage": { + "prefix": "Sudo", + "items": [ + { + "name": "NameOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "(Bytes,BalanceOf)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The lookup table for names." + ] + } + ] + }, + "calls": [ + { + "name": "set_name", + "args": [ + { + "name": "name", + "type": "Bytes" + } + ], + "documentation": [ + " Set an account's name. The name should be a UTF-8-encoded string by convention, though", + " we don't check it.", + "", + " The name may not be more than `T::MaxLength` bytes, nor less than `T::MinLength` bytes.", + "", + " If the account doesn't already have a name, then a fee of `ReservationFee` is reserved", + " in the account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - At most one balance operation.", + " - One storage read/write.", + " - One event.", + " # " + ] + }, + { + "name": "clear_name", + "args": [], + "documentation": [ + " Clear an account's name and return the deposit. Fails if the account was not named.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - One balance operation.", + " - One storage read/write.", + " - One event.", + " # " + ] + }, + { + "name": "kill_name", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove an account's name and take charge of the deposit.", + "", + " Fails if `who` has not been named. The deposit is dealt with through `T::Slashed`", + " imbalance handler.", + "", + " The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`.", + "", + " # ", + " - O(1).", + " - One unbalanced handler (probably a balance transfer)", + " - One storage read/write.", + " - One event.", + " # " + ] + }, + { + "name": "force_name", + "args": [ + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "name", + "type": "Bytes" + } + ], + "documentation": [ + " Set a third-party account's name with no deposit.", + "", + " No length checking is done on the name.", + "", + " The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`.", + "", + " # ", + " - O(1).", + " - At most one balance operation.", + " - One storage read/write.", + " - One event.", + " # " + ] + } + ], + "events": [ + { + "name": "NameSet", + "args": [ + "AccountId" + ], + "documentation": [ + " A name was set." + ] + }, + { + "name": "NameForced", + "args": [ + "AccountId" + ], + "documentation": [ + " A name was forcibly set." + ] + }, + { + "name": "NameChanged", + "args": [ + "AccountId" + ], + "documentation": [ + " A name was changed." + ] + }, + { + "name": "NameCleared", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was cleared, and the given balance returned." + ] + }, + { + "name": "NameKilled", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was removed and the given balance slashed." + ] + } + ], + "constants": [ + { + "name": "ReservationFee", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Reservation fee." + ] + }, + { + "name": "MinLength", + "type": "u32", + "value": "0x03000000", + "documentation": [ + " The minimum length a name may be." + ] + }, + { + "name": "MaxLength", + "type": "u32", + "value": "0x10000000", + "documentation": [ + " The maximum length a name may be." + ] + } + ], + "errors": [] + } + ] + } + } +} diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index 49978d3a..01f8b74b 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -59,7 +59,6 @@ tests: - src dependencies: - bytestring >0.10 && <0.11 - - web3-hexstring >=1.0.0 && <1.1 - hspec-expectations >=0.8.2 && <0.9 - hspec-discover >=2.4.4 && <2.8 - hspec-contrib >=0.4.0 && <0.6 diff --git a/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs index ec33aeb9..66cf5d22 100644 --- a/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs @@ -17,6 +17,7 @@ module Codec.Scale.Test.SkipSpec where +import Data.ByteString (ByteString, pack) import Data.Default (Default) import Data.Word (Word32) import qualified GHC.Generics as GHC (Generic) @@ -25,7 +26,6 @@ import Test.Hspec import Codec.Scale import Codec.Scale.SingletonEnum import Codec.Scale.Skip -import Data.ByteArray.HexString data UncodecType = UncodecType deriving (Eq, Ord, Show, GHC.Generic, Default) @@ -63,10 +63,10 @@ spec = parallel $ do sn = StructNamed { a = Skip UncodecType, b = 1 } su = StructUnnamed (Skip UncodecType) 1 - let eb_encoded = encode eb :: HexString - let ec_encoded = encode ec :: HexString - let sn_encoded = encode sn :: HexString - let su_encoded = encode su :: HexString + let eb_encoded = encode eb :: ByteString + let ec_encoded = encode ec :: ByteString + let sn_encoded = encode sn :: ByteString + let su_encoded = encode su :: ByteString decode eb_encoded `shouldBe` Right eb decode ec_encoded `shouldBe` Right ec @@ -76,5 +76,5 @@ spec = parallel $ do it "skip_enum_struct_inner_variant" $ do let struct = NamedStruct { some_named = 1, ignore = Skip (Just 1) } single = SingletonEnum struct - encoded = "0x0001000000" :: HexString + encoded = pack [0x00, 0x01, 0x00, 0x00, 0x00] encode single `shouldBe` encoded diff --git a/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs b/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs index ff9c22d1..c5403177 100644 --- a/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs +++ b/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs @@ -11,7 +11,7 @@ import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address spec :: Spec -spec = do +spec = parallel $ do describe "EIP55 Test Vectors" $ for_ checksummedAddrs $ \addr -> it (unpack addr <> " should be checksummed") $ verifyChecksum addr `shouldBe` True diff --git a/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs b/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs index d08ec996..0a981cdd 100644 --- a/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs +++ b/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs @@ -7,7 +7,6 @@ module Data.Solidity.Test.EncodingSpec where import Control.Exception (evaluate) -import Data.Monoid ((<>)) import Data.Text (Text) import Data.Tuple.OneTuple (OneTuple (..)) import Generics.SOP (Generic, Rep) @@ -21,7 +20,7 @@ import Data.Solidity.Prim (Address, Bytes, BytesN, IntN, import Data.Solidity.Prim.Address (fromHexString, toHexString) spec :: Spec -spec = do +spec = parallel $ do intNTest bytesTest bytesNTest diff --git a/packages/solidity/tests/Data/Solidity/Test/IntSpec.hs b/packages/solidity/tests/Data/Solidity/Test/IntSpec.hs index 1a3d5e85..b89bd41e 100644 --- a/packages/solidity/tests/Data/Solidity/Test/IntSpec.hs +++ b/packages/solidity/tests/Data/Solidity/Test/IntSpec.hs @@ -6,7 +6,7 @@ import Test.Hspec import Data.Solidity.Prim.Int spec :: Spec -spec = do +spec = parallel $ do describe "Unsigned integer overflow" $ do it "UIntN 256" $ do (negate 1 :: UIntN 256) `shouldBe` 115792089237316195423570985008687907853269984665640564039457584007913129639935 diff --git a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs index db1ee6cb..129058f7 100644 --- a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs +++ b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs @@ -2,14 +2,14 @@ module Language.Solidity.Test.AbiSpec where -import Test.Hspec -import Data.Either (isLeft) -import Language.Solidity.Abi +import Data.Either (isLeft) +import Language.Solidity.Abi +import Test.Hspec spec :: Spec -spec = do - describe "parseSolidityType" $ +spec = parallel $ do + describe "parseSolidityType" $ describe "tuple type" $ do it "can parses a FunctionArg with tuple type" $ do let maa = FunctionArg "makerAssetAmount" "uint256" Nothing @@ -20,14 +20,14 @@ spec = do it "fails to parse a FunctionArg with invalid tuple" $ do let tupleFA = FunctionArg "order" "tuple" Nothing eRes = parseSolidityFunctionArgType tupleFA - isLeft eRes `shouldBe` True - describe "signature" $ + isLeft eRes `shouldBe` True + describe "signature" $ it "can generate signature for fillOrder" $ do let fillOrderDec = buildFillOrderDec expected = "fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)" sig = signature fillOrderDec sig `shouldBe` expected - describe "methodId" $ + describe "methodId" $ it "can generate methodId for fillOrder" $ do let fillOrderDec = buildFillOrderDec expected = "0xb4be83d5" @@ -37,27 +37,27 @@ spec = do buildFillOrderDec :: Declaration buildFillOrderDec = DFunction "fillOrder" False funInputs' funOutputs' where - funInputs' = + funInputs' = [ makeTupleFuncArg ("order", "tuple") tupleComponents , makeBasicFuncArg ("takerAssetFillAmount", "uint256") , makeBasicFuncArg ("signature", "bytes") ] - tupleComponents = - [ ("makerAddress", "address") - , ("takerAddress", "address") - , ("feeRecipientAddress", "address") - , ("senderAddress", "address") - , ("makerAssetAmount", "uint256") - , ("takerAssetAmount", "uint256") - , ("makerFee", "uint256") - , ("takerFee", "uint256") + tupleComponents = + [ ("makerAddress", "address") + , ("takerAddress", "address") + , ("feeRecipientAddress", "address") + , ("senderAddress", "address") + , ("makerAssetAmount", "uint256") + , ("takerAssetAmount", "uint256") + , ("makerFee", "uint256") + , ("takerFee", "uint256") , ("expirationTimeSeconds", "uint256") - , ("salt", "uint256") + , ("salt", "uint256") , ("makerAssetData", "bytes") , ("takerAssetData", "bytes") ] funOutputs' = Nothing - makeBasicFuncArg (n,t) = + makeBasicFuncArg (n,t) = FunctionArg n t Nothing - makeTupleFuncArg (n,t) cmps = + makeTupleFuncArg (n,t) cmps = FunctionArg n t (Just $ map makeBasicFuncArg cmps) diff --git a/packages/solidity/tests/Language/Solidity/Test/CompilerSpec.hs b/packages/solidity/tests/Language/Solidity/Test/CompilerSpec.hs deleted file mode 100644 index ac2af75b..00000000 --- a/packages/solidity/tests/Language/Solidity/Test/CompilerSpec.hs +++ /dev/null @@ -1,32 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE OverloadedLists #-} -{-# LANGUAGE OverloadedStrings #-} - -module Language.Solidity.Test.CompilerSpec where - -import Test.Hspec - -#ifdef SOLIDITY_COMPILER - -import Language.Solidity.Compiler - -spec :: Spec -spec = describe "solidity compiler" $ do - it "can compile empty contract" $ do - compile (Sources [("A", "contract A {}")] [] True) - `shouldBe` Right [("A", ("[]\n", "6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfea165627a7a7230582055975a3cf5eb9a652c2154ede405cdb2137a09e47088fb89162c336da0b415c40029"))] - - it "can handle broken contract" $ do - compile (Sources [("Fail", "contract Fail {")] [] True) - `shouldBe` Left "Fail:1:16: Error: Function, variable, struct or modifier declaration expected.\ncontract Fail {\n ^\n" - - it "can compile simple contract" $ do - compile (Sources [("SimpleStorage", "contract SimpleStorage { uint256 public a; function set(uint256 _a) public { a = _a; } }")] [] True) - `shouldBe` Right [("SimpleStorage", ("[\n\t{\n\t\t\"constant\" : true,\n\t\t\"inputs\" : [],\n\t\t\"name\" : \"a\",\n\t\t\"outputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"view\",\n\t\t\"type\" : \"function\"\n\t},\n\t{\n\t\t\"constant\" : false,\n\t\t\"inputs\" : \n\t\t[\n\t\t\t{\n\t\t\t\t\"name\" : \"_a\",\n\t\t\t\t\"type\" : \"uint256\"\n\t\t\t}\n\t\t],\n\t\t\"name\" : \"set\",\n\t\t\"outputs\" : [],\n\t\t\"payable\" : false,\n\t\t\"stateMutability\" : \"nonpayable\",\n\t\t\"type\" : \"function\"\n\t}\n]\n", "608060405234801561001057600080fd5b5060e38061001f6000396000f3fe6080604052600436106043576000357c0100000000000000000000000000000000000000000000000000000000900480630dbe671f14604857806360fe47b1146070575b600080fd5b348015605357600080fd5b50605a60a7565b6040518082815260200191505060405180910390f35b348015607b57600080fd5b5060a560048036036020811015609057600080fd5b810190808035906020019092919050505060ad565b005b60005481565b806000819055505056fea165627a7a7230582077f3d0f8c042c028ca18fb49065c0091b05c6b70dd5aee2b8a4388f7ecaa308f0029"))] - -#else - -spec :: Spec -spec = describe "solidity compiler is not enabled" $ return () - -#endif From 4adf4c93b392f42cbc28265ca81c101a1ee2573a Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Wed, 16 Dec 2020 02:23:19 +0000 Subject: [PATCH 168/237] Classify tuples as dynamic when a component type is dynamic --- packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs b/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs index ba744d9a..5a51a026 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs @@ -17,8 +17,9 @@ module Data.Solidity.Prim.Tuple.TH (tupleDecs) where import Control.Monad (replicateM) +import Data.Proxy import Language.Haskell.TH (DecsQ, Type (VarT), appT, clause, conT, - cxt, funD, instanceD, newName, normalB, + cxt, funD, instanceD, listE, newName, normalB, tupleT) import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) @@ -27,8 +28,10 @@ tupleDecs :: Int -> DecsQ tupleDecs n = do vars <- replicateM n $ newName "a" let types = fmap (pure . VarT) vars + areDynamic = listE $ flip fmap types $ \t -> [| isDynamic (Proxy :: Proxy $(t)) |] + sequence $ [ instanceD (cxt $ map (appT $ conT ''AbiType) types) (appT (conT ''AbiType) (foldl appT (tupleT n) types)) - [funD 'isDynamic [clause [] (normalB [|const False|]) []]] + [funD 'isDynamic [clause [] (normalB [|const (or $(areDynamic))|]) []]] , instanceD (cxt $ map (appT $ conT ''AbiGet) types) (appT (conT ''AbiGet) (foldl appT (tupleT n) types)) [] , instanceD (cxt $ map (appT $ conT ''AbiPut) types) (appT (conT ''AbiPut) (foldl appT (tupleT n) types)) [] ] From ee626fb917c94f93d0bdef7b48f610d80b1edaef Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Sun, 13 Dec 2020 22:16:42 +0000 Subject: [PATCH 169/237] Fix bytes padding --- .../solidity/src/Data/Solidity/Prim/Bytes.hs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/solidity/src/Data/Solidity/Prim/Bytes.hs b/packages/solidity/src/Data/Solidity/Prim/Bytes.hs index 9bd3689b..c7e99a9f 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Bytes.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Bytes.hs @@ -27,7 +27,7 @@ module Data.Solidity.Prim.Bytes , BytesN ) where -import Control.Monad (unless) +import Control.Monad (unless, void) import Data.Aeson (FromJSON (..), ToJSON (..), Value (String)) import Data.ByteArray (Bytes, convert, length, zero) @@ -113,13 +113,17 @@ instance (KnownNat n, n <= 32) => ToJSON (BytesN n) where abiGetByteString :: Get ByteString abiGetByteString = do len <- fromIntegral <$> getWord256 - if len == 0 - then return "" - else getBytes len + res <- getBytes len + let remainder = len `mod` 32 + unless (remainder == 0) $ + void $ getBytes (32 - remainder) + pure res abiPutByteString :: Putter ByteString abiPutByteString bs = do putWord256 $ fromIntegral len - unless (len == 0) $ - putByteString $ bs <> zero (32 - len `mod` 32) + putByteString bs + unless (remainder == 0) $ + putByteString $ zero (32 - remainder) where len = length bs + remainder = len `mod` 32 From 1cfeddde4197d93e56bea6a593b0eb586d8b1140 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Tue, 20 Oct 2020 19:34:32 +0100 Subject: [PATCH 170/237] Parse stateMutability field --- .../src/Network/Ethereum/Contract/TH.hs | 10 +++--- .../Network/Ethereum/Ens/PublicResolver.hs | 2 +- .../src/Network/Ethereum/Ens/Registry.hs | 2 +- .../solidity/src/Language/Solidity/Abi.hs | 18 ++++++++-- .../tests/Language/Solidity/Test/AbiSpec.hs | 36 +++++++++---------- 5 files changed, 42 insertions(+), 26 deletions(-) diff --git a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs index 88962c65..5714f977 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs @@ -72,7 +72,9 @@ import Language.Solidity.Abi (ContractAbi (..), Declaration (..), EventArg (..), FunctionArg (..), - SolidityType (..), eventId, + SolidityType (..), + StateMutability(..), + eventId, methodId, parseSolidityEventArgType, parseSolidityFunctionArgType) @@ -226,9 +228,9 @@ mkDecl ev@(DEvent uncheckedName inputs anonymous) = sequence derivingD = [''Show, ''Eq, ''Ord, ''GHC.Generic] -- TODO change this type name also --- | Method delcarations maker -mkDecl fun@(DFunction name constant inputs outputs) = (++) - <$> funWrapper constant fnName dataName inputs outputs +-- | Method declarations maker +mkDecl fun@(DFunction name stateMutability inputs outputs) = (++) + <$> funWrapper (stateMutability `elem` [SMPure, SMView]) fnName dataName inputs outputs <*> sequence [ dataD' dataName (normalC dataName bangInput) derivingD , instanceD' dataName (conT ''Generic) [] diff --git a/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs b/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs index 3c07e9aa..9b090283 100644 --- a/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs @@ -22,4 +22,4 @@ module Network.Ethereum.Ens.PublicResolver where import Network.Ethereum.Contract.TH -[abi|[{"constant":true,"inputs":[{"name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"},{"name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"name":"contentType","type":"uint256"},{"name":"data","type":"bytes"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"x","type":"bytes32"},{"name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"content","outputs":[{"name":"ret","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"addr","outputs":[{"name":"ret","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"contentType","type":"uint256"},{"name":"data","type":"bytes"}],"name":"setABI","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"name","outputs":[{"name":"ret","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"name","type":"string"}],"name":"setName","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"hash","type":"bytes32"}],"name":"setContent","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"name":"x","type":"bytes32"},{"name":"y","type":"bytes32"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"addr","type":"address"}],"name":"setAddr","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"ensAddr","type":"address"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"hash","type":"bytes32"}],"name":"ContentChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":true,"name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"x","type":"bytes32"},{"indexed":false,"name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"}]|] +[abi|[{"stateMutability":"view","inputs":[{"name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"stateMutability":"view","inputs":[{"name":"node","type":"bytes32"},{"name":"contentTypes","type":"uint256"}],"name":"ABI","outputs":[{"name":"contentType","type":"uint256"},{"name":"data","type":"bytes"}],"payable":false,"type":"function"},{"stateMutability":"nonpayable","inputs":[{"name":"node","type":"bytes32"},{"name":"x","type":"bytes32"},{"name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"payable":false,"type":"function"},{"stateMutability":"view","inputs":[{"name":"node","type":"bytes32"}],"name":"content","outputs":[{"name":"ret","type":"bytes32"}],"payable":false,"type":"function"},{"stateMutability":"view","inputs":[{"name":"node","type":"bytes32"}],"name":"addr","outputs":[{"name":"ret","type":"address"}],"payable":false,"type":"function"},{"stateMutability":"nonpayable","inputs":[{"name":"node","type":"bytes32"},{"name":"contentType","type":"uint256"},{"name":"data","type":"bytes"}],"name":"setABI","outputs":[],"payable":false,"type":"function"},{"stateMutability":"view","inputs":[{"name":"node","type":"bytes32"}],"name":"name","outputs":[{"name":"ret","type":"string"}],"payable":false,"type":"function"},{"stateMutability":"nonpayable","inputs":[{"name":"node","type":"bytes32"},{"name":"name","type":"string"}],"name":"setName","outputs":[],"payable":false,"type":"function"},{"stateMutability":"nonpayable","inputs":[{"name":"node","type":"bytes32"},{"name":"hash","type":"bytes32"}],"name":"setContent","outputs":[],"payable":false,"type":"function"},{"stateMutability":"view","inputs":[{"name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"name":"x","type":"bytes32"},{"name":"y","type":"bytes32"}],"payable":false,"type":"function"},{"stateMutability":"nonpayable","inputs":[{"name":"node","type":"bytes32"},{"name":"addr","type":"address"}],"name":"setAddr","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"ensAddr","type":"address"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"hash","type":"bytes32"}],"name":"ContentChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":true,"name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"x","type":"bytes32"},{"indexed":false,"name":"y","type":"bytes32"}],"name":"PubkeyChanged","type":"event"}]|] diff --git a/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs b/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs index 2bedda29..30e9ddec 100644 --- a/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs @@ -22,4 +22,4 @@ module Network.Ethereum.Ens.Registry where import Network.Ethereum.Contract.TH -[abi|[{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"resolver","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"label","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setSubnodeOwner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"node","type":"bytes32"}],"name":"ttl","outputs":[{"name":"","type":"uint64"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":true,"name":"label","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"NewOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"resolver","type":"address"}],"name":"NewResolver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"ttl","type":"uint64"}],"name":"NewTTL","type":"event"}]|] +[abi|[{"stateMutability":"view","inputs":[{"name":"node","type":"bytes32"}],"name":"resolver","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"stateMutability":"view","inputs":[{"name":"node","type":"bytes32"}],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"stateMutability":"nonpayable","inputs":[{"name":"node","type":"bytes32"},{"name":"label","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setSubnodeOwner","outputs":[],"payable":false,"type":"function"},{"stateMutability":"nonpayable","inputs":[{"name":"node","type":"bytes32"},{"name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"payable":false,"type":"function"},{"stateMutability":"view","inputs":[{"name":"node","type":"bytes32"}],"name":"ttl","outputs":[{"name":"","type":"uint64"}],"payable":false,"type":"function"},{"stateMutability":"nonpayable","inputs":[{"name":"node","type":"bytes32"},{"name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"type":"function"},{"stateMutability":"nonpayable","inputs":[{"name":"node","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":true,"name":"label","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"NewOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"resolver","type":"address"}],"name":"NewResolver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"ttl","type":"uint64"}],"name":"NewTTL","type":"event"}]|] diff --git a/packages/solidity/src/Language/Solidity/Abi.hs b/packages/solidity/src/Language/Solidity/Abi.hs index a85744c0..d13faf18 100644 --- a/packages/solidity/src/Language/Solidity/Abi.hs +++ b/packages/solidity/src/Language/Solidity/Abi.hs @@ -20,6 +20,7 @@ module Language.Solidity.Abi , Declaration(..) , FunctionArg(..) , EventArg(..) + , StateMutability(..) -- * Method/Event id encoder , signature @@ -81,14 +82,21 @@ $(deriveJSON (defaultOptions {fieldLabelModifier = over _head toLower . drop 6}) ''EventArg) --- | Elementrary contract interface item +data StateMutability + = SMPure + | SMView + | SMPayable + | SMNonPayable + deriving (Eq, Ord, Show) + +-- | Elementary contract interface item data Declaration = DConstructor { conInputs :: [FunctionArg] -- ^ Contract constructor } | DFunction { funName :: Text - , funConstant :: Bool + , funStateMutability :: StateMutability , funInputs :: [FunctionArg] , funOutputs :: Maybe [FunctionArg] -- ^ Method @@ -140,6 +148,12 @@ $(deriveJSON (defaultOptions { , fieldLabelModifier = over _head toLower . drop 3 }) ''Declaration) +$(deriveJSON (defaultOptions { + sumEncoding = TaggedObject "stateMutability" "contents" + , constructorTagModifier = fmap toLower . drop 2 }) + ''StateMutability) + + -- | Contract Abi is a list of method / event declarations newtype ContractAbi = ContractAbi { unAbi :: [Declaration] } deriving (Eq, Ord) diff --git a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs index db1ee6cb..893a03aa 100644 --- a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs +++ b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs @@ -9,7 +9,7 @@ import Language.Solidity.Abi spec :: Spec spec = do - describe "parseSolidityType" $ + describe "parseSolidityType" $ describe "tuple type" $ do it "can parses a FunctionArg with tuple type" $ do let maa = FunctionArg "makerAssetAmount" "uint256" Nothing @@ -20,14 +20,14 @@ spec = do it "fails to parse a FunctionArg with invalid tuple" $ do let tupleFA = FunctionArg "order" "tuple" Nothing eRes = parseSolidityFunctionArgType tupleFA - isLeft eRes `shouldBe` True - describe "signature" $ + isLeft eRes `shouldBe` True + describe "signature" $ it "can generate signature for fillOrder" $ do let fillOrderDec = buildFillOrderDec expected = "fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)" sig = signature fillOrderDec sig `shouldBe` expected - describe "methodId" $ + describe "methodId" $ it "can generate methodId for fillOrder" $ do let fillOrderDec = buildFillOrderDec expected = "0xb4be83d5" @@ -35,29 +35,29 @@ spec = do mId `shouldBe` expected buildFillOrderDec :: Declaration -buildFillOrderDec = DFunction "fillOrder" False funInputs' funOutputs' +buildFillOrderDec = DFunction "fillOrder" SMNonPayable funInputs' funOutputs' where - funInputs' = + funInputs' = [ makeTupleFuncArg ("order", "tuple") tupleComponents , makeBasicFuncArg ("takerAssetFillAmount", "uint256") , makeBasicFuncArg ("signature", "bytes") ] - tupleComponents = - [ ("makerAddress", "address") - , ("takerAddress", "address") - , ("feeRecipientAddress", "address") - , ("senderAddress", "address") - , ("makerAssetAmount", "uint256") - , ("takerAssetAmount", "uint256") - , ("makerFee", "uint256") - , ("takerFee", "uint256") + tupleComponents = + [ ("makerAddress", "address") + , ("takerAddress", "address") + , ("feeRecipientAddress", "address") + , ("senderAddress", "address") + , ("makerAssetAmount", "uint256") + , ("takerAssetAmount", "uint256") + , ("makerFee", "uint256") + , ("takerFee", "uint256") , ("expirationTimeSeconds", "uint256") - , ("salt", "uint256") + , ("salt", "uint256") , ("makerAssetData", "bytes") , ("takerAssetData", "bytes") ] funOutputs' = Nothing - makeBasicFuncArg (n,t) = + makeBasicFuncArg (n,t) = FunctionArg n t Nothing - makeTupleFuncArg (n,t) cmps = + makeTupleFuncArg (n,t) cmps = FunctionArg n t (Just $ map makeBasicFuncArg cmps) From 29604ddb452de52f568f4cd062a2647d339883f5 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Wed, 16 Dec 2020 19:13:12 +0000 Subject: [PATCH 171/237] Fallback to parsing 'constant' field for backwards compatibility --- .../src/Network/Ethereum/Contract/TH.hs | 5 ++- .../solidity/src/Language/Solidity/Abi.hs | 34 ++++++++++++++----- .../tests/Language/Solidity/Test/AbiSpec.hs | 2 +- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs index 5714f977..71a4a078 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs @@ -73,7 +73,6 @@ import Language.Solidity.Abi (ContractAbi (..), EventArg (..), FunctionArg (..), SolidityType (..), - StateMutability(..), eventId, methodId, parseSolidityEventArgType, @@ -229,8 +228,8 @@ mkDecl ev@(DEvent uncheckedName inputs anonymous) = sequence -- TODO change this type name also -- | Method declarations maker -mkDecl fun@(DFunction name stateMutability inputs outputs) = (++) - <$> funWrapper (stateMutability `elem` [SMPure, SMView]) fnName dataName inputs outputs +mkDecl fun@(DFunction name constant inputs outputs) = (++) + <$> funWrapper constant fnName dataName inputs outputs <*> sequence [ dataD' dataName (normalC dataName bangInput) derivingD , instanceD' dataName (conT ''Generic) [] diff --git a/packages/solidity/src/Language/Solidity/Abi.hs b/packages/solidity/src/Language/Solidity/Abi.hs index d13faf18..771a00e8 100644 --- a/packages/solidity/src/Language/Solidity/Abi.hs +++ b/packages/solidity/src/Language/Solidity/Abi.hs @@ -1,4 +1,6 @@ +{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} -- | @@ -37,8 +39,8 @@ import Control.Monad (void) import Crypto.Ethereum.Utils (keccak256) import Data.Aeson (FromJSON (parseJSON), Options (constructorTagModifier, fieldLabelModifier, sumEncoding), SumEncoding (TaggedObject), - ToJSON (toJSON), defaultOptions) -import Data.Aeson.TH (deriveJSON) + ToJSON (toJSON), defaultOptions, withObject, (.:), (.:?)) +import Data.Aeson.TH (deriveJSON, deriveToJSON) import qualified Data.ByteArray as A (take) import Data.ByteArray.HexString (toText) import Data.Char (toLower) @@ -96,7 +98,7 @@ data Declaration = DConstructor } | DFunction { funName :: Text - , funStateMutability :: StateMutability + , funConstant :: Bool , funInputs :: [FunctionArg] , funOutputs :: Maybe [FunctionArg] -- ^ Method @@ -142,11 +144,27 @@ instance Ord Declaration where compare DFallback {} DFunction {} = GT compare DFallback {} DEvent {} = GT -$(deriveJSON (defaultOptions { - sumEncoding = TaggedObject "type" "contents" - , constructorTagModifier = over _head toLower . drop 1 - , fieldLabelModifier = over _head toLower . drop 3 }) - ''Declaration) +instance FromJSON Declaration where + parseJSON = withObject "Declaration" $ \o -> do + t :: Text <- o .: "type" + case t of + "fallback" -> DFallback <$> o .: "payable" + "constructor" -> DConstructor <$> o .: "inputs" + "event" -> DEvent <$> o .: "name" <*> o .: "inputs" <*> o .: "anonymous" + "function" -> DFunction <$> o .: "name" <*> parseSm o <*> o .: "inputs" <*> o .:? "outputs" + _ -> fail "value of 'type' not recognized" + where + parseSm o = do + o .:? "stateMutability" >>= \case + Nothing -> o .: "constant" + Just sm -> pure $ sm `elem` [SMPure, SMView] + +$(deriveToJSON + (defaultOptions { + sumEncoding = TaggedObject "type" "contents" + , constructorTagModifier = over _head toLower . drop 1 + , fieldLabelModifier = over _head toLower . drop 3 }) + ''Declaration) $(deriveJSON (defaultOptions { sumEncoding = TaggedObject "stateMutability" "contents" diff --git a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs index 893a03aa..9f15cd9b 100644 --- a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs +++ b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs @@ -35,7 +35,7 @@ spec = do mId `shouldBe` expected buildFillOrderDec :: Declaration -buildFillOrderDec = DFunction "fillOrder" SMNonPayable funInputs' funOutputs' +buildFillOrderDec = DFunction "fillOrder" False funInputs' funOutputs' where funInputs' = [ makeTupleFuncArg ("order", "tuple") tupleComponents From 7983583c9705ca25da57dbf365fba48ee961375a Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Wed, 16 Dec 2020 19:26:18 +0000 Subject: [PATCH 172/237] Bump some cabal upper bounds --- packages/crypto/package.yaml | 4 ++-- packages/ethereum/package.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index 7140a7c5..173cb6aa 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -16,7 +16,7 @@ dependencies: - aeson >1.2 && <1.5 - memory >0.14 && <0.16 - uuid-types >1.0 && <1.1 -- cryptonite >0.22 && <0.27 +- cryptonite >0.22 && <0.28 - bytestring >0.10 && <0.11 - web3-hexstring >=1.0 && <1.1 @@ -53,7 +53,7 @@ tests: tests: main: Spec.hs source-dirs: - - tests + - tests - src dependencies: - hspec-expectations >=0.8.2 && <0.9 diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index e266578c..74fe34f4 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -13,7 +13,7 @@ category: Network dependencies: - base >4.11 && <4.14 - text >1.2 && <1.3 -- vinyl >0.5 && <0.13 +- vinyl >0.5 && <0.14 - aeson >1.2 && <1.5 - tagged >0.8 && <0.9 - memory >0.14 && <0.16 @@ -67,7 +67,7 @@ tests: tests: main: Spec.hs source-dirs: - - tests + - tests - src dependencies: - hspec-expectations >=0.8.2 && <0.9 From 1dccc0438b81497e4760532dbda75439b985bb3a Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 7 Jan 2021 16:45:14 +0300 Subject: [PATCH 173/237] Polkadot metadata type sanitizing & unit tests. * Added metadata type parsers combinators and sanitizers. * Added internal metadata type AST representation. * Added generics-based metadata type discovery. * Added static/json metadata reference tests. --- packages/polkadot/package.yaml | 15 +- .../polkadot/src/Network/Polkadot/Metadata.hs | 52 +- .../src/Network/Polkadot/Metadata/Type.hs | 89 +- .../src/Network/Polkadot/Metadata/Type/Ast.hs | 39 + .../Polkadot/Metadata/Type/Discovery.hs | 123 + .../Network/Polkadot/Metadata/Type/Parser.hs | 96 + .../Metadata/Type/ParserCombinators.hs | 62 + .../src/Network/Polkadot/Metadata/V10.hs | 5 +- .../src/Network/Polkadot/Metadata/V11.hs | 7 +- .../src/Network/Polkadot/Metadata/V12.hs | 4 +- .../src/Network/Polkadot/Metadata/V9.hs | 1 + .../Network/Polkadot/Test/MetadataSpec.hs | 48 +- .../Network/Polkadot/Test/SanitizeSpec.hs | 63 - packages/polkadot/tests/meta/v10.hex | 1 + packages/polkadot/tests/meta/v10.json | 7821 ++++++++++ packages/polkadot/tests/meta/v11.hex | 1 + packages/polkadot/tests/meta/v11.json | 11686 ++++++++++++++ packages/polkadot/tests/meta/v12.hex | 1 + packages/polkadot/tests/meta/v12.json | 12923 ++++++++++++++++ .../solidity/src/Data/Solidity/Abi/Codec.hs | 3 + 20 files changed, 32859 insertions(+), 181 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs delete mode 100644 packages/polkadot/tests/Network/Polkadot/Test/SanitizeSpec.hs create mode 100644 packages/polkadot/tests/meta/v10.hex create mode 100644 packages/polkadot/tests/meta/v10.json create mode 100644 packages/polkadot/tests/meta/v11.hex create mode 100644 packages/polkadot/tests/meta/v11.json create mode 100644 packages/polkadot/tests/meta/v12.hex create mode 100644 packages/polkadot/tests/meta/v12.json diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 81715398..897c4702 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -11,11 +11,17 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: +- mtl >2.2 && <2.3 - base >4.11 && <4.14 - text >1.2 && <1.3 - aeson >1.2 && <1.5 +- parsec >3.0 && <3.2 - microlens >0.4 && <0.5 +- containers >0.6 && <0.7 - bytestring >0.10 && <0.11 +- generics-sop >0.3 && <0.6 +- microlens-th >0.4 && <0.5 +- microlens-mtl >0.2 && <0.3 - web3-scale >=1.0 && <1.1 - web3-jsonrpc >=1.0 && <1.1 - web3-hexstring >=1.0 && <1.1 @@ -56,10 +62,11 @@ tests: - tests - src dependencies: - - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.8 - - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.8 + - hspec-expectations-json >=1.0.0 && <1.1 + - hspec-expectations >=0.8.2 && <0.9 + - hspec-discover >=2.4.4 && <2.8 + - hspec-contrib >=0.4.0 && <0.6 + - hspec >=2.4.4 && <2.8 ghc-options: - -threaded - -rtsopts diff --git a/packages/polkadot/src/Network/Polkadot/Metadata.hs b/packages/polkadot/src/Network/Polkadot/Metadata.hs index baecd2e2..4c810886 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata.hs @@ -16,17 +16,26 @@ module Network.Polkadot.Metadata where -import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (sumEncoding), SumEncoding (ObjectWithSingleField), - defaultOptions) -import Data.Aeson.TH (deriveJSON) -import qualified GHC.Generics as GHC (Generic) - -import Network.Polkadot.Metadata.MagicNumber (MagicNumber) -import qualified Network.Polkadot.Metadata.V10 as V10 (Metadata) -import qualified Network.Polkadot.Metadata.V11 as V11 (Metadata) -import qualified Network.Polkadot.Metadata.V12 as V12 (Metadata) -import qualified Network.Polkadot.Metadata.V9 as V9 (Metadata) +import Codec.Scale (Decode, Encode, + Generic) +import Data.Aeson (Options (sumEncoding), + SumEncoding (ObjectWithSingleField), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.Set (Set) +import qualified GHC.Generics as GHC (Generic) + +import Network.Polkadot.Metadata.MagicNumber (MagicNumber (..)) +import Network.Polkadot.Metadata.Type (Type) +import Network.Polkadot.Metadata.Type.Discovery (runDiscovery) +import qualified Network.Polkadot.Metadata.V10 as V10 (Metadata (Metadata), + moduleName) +import qualified Network.Polkadot.Metadata.V11 as V11 (Metadata (Metadata), + moduleName) +import qualified Network.Polkadot.Metadata.V12 as V12 (Metadata (Metadata), + moduleName) +import qualified Network.Polkadot.Metadata.V9 as V9 (Metadata (Metadata), + moduleName) -- | All supported metadata versions as enum. -- @@ -68,3 +77,24 @@ isV12 _ = False isLatest :: Metadata -> Bool isLatest = isV12 + +metadataTypes :: Metadata -> (Metadata, Set Type) +metadataTypes (Metadata _ (V9 (V9.Metadata modules))) = + let (modules', types) = runDiscovery V9.moduleName modules + in (Metadata MagicNumber (V9 (V9.Metadata modules')), types) + +metadataTypes (Metadata _ (V10 (V10.Metadata modules))) = + let (modules', types) = runDiscovery V10.moduleName modules + in (Metadata MagicNumber (V10 (V10.Metadata modules')), types) + +{- XXX: OOM compilation on my laptop +metadataTypes (Metadata _ (V11 (V11.Metadata modules extrinsics))) = + let (modules', types) = runDiscovery V11.moduleName modules + in (Metadata MagicNumber (V11 (V11.Metadata modules' extrinsics)), types) +-} + +metadataTypes (Metadata _ (V12 (V12.Metadata modules extrinsics))) = + let (modules', types) = runDiscovery V12.moduleName modules + in (Metadata MagicNumber (V12 (V12.Metadata modules' extrinsics)), types) + +metadataTypes m = (m, mempty) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs index c61ee8fa..d83f1b9c 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TemplateHaskell #-} -- | -- Module : Network.Polkadot.Metadata.Type @@ -9,87 +9,34 @@ -- Stability : experimental -- Portability : portable -- --- Runtime type names metadata encoding. +-- Runtime metadata type and encoding. -- module Network.Polkadot.Metadata.Type where -import Codec.Scale.Class (Decode (..), Encode (..)) -import Codec.Scale.Core () -import Data.Aeson (FromJSON (..), ToJSON (..), Value (String)) -import Data.Text (Text, replace, strip) +import Codec.Scale.Class (Decode (..), + Encode (..)) +import Codec.Scale.Core () +import Data.Aeson (FromJSON (..), + ToJSON (..), + Value (String)) +import Data.Text (Text) --- | This is a extended version of String, specifically to handle types. Here we rely fully --- on what string provides us, however we also adjust the types received from the runtime, --- i.e. we remove the `T::` prefixes found in some types for consistency across implementation. +import Network.Polkadot.Metadata.Type.Parser (sanitizeM) + +-- | Contains information about type structure and it's representation. newtype Type = Type { unType :: Text } deriving (Eq, Ord, Show) -instance Decode Type where - get = Type <$> get - -instance Encode Type where - put = put . unType - instance FromJSON Type where - parseJSON (String s) = return $ Type (sanitize s) - parseJSON _ = fail "Type name should be a string" + parseJSON (String s) = return (Type s) + parseJSON _ = fail "Type should be a string" instance ToJSON Type where toJSON = toJSON . unType --- | Runtime type name sanitizing. -sanitize :: Text -> Text -sanitize = strip - -- alias ::Inherent -> InherentOfflineReport - . replace "::Inherent" "InherentOfflineReport" - -- alias String -> Text (compat with jsonrpc methods) - . replace "String" "Text" - -- alias Vec -> Bytes - . replace "Vec" "Bytes" - . replace "&[u8]" "Bytes" - -- alias RawAddress -> Address - . replace "RawAddress" "Address" - -- lookups, mapped to Address/AccountId as appropriate in runtime - . replace "Lookup::Source" "LookupSource" - . replace "Lookup::Target" "LookupTarget" - -- HACK duplication between contracts & primitives, however contracts prefixed with exec - . replace "exec::StorageKey" "ContractStorageKey" - -- - . cleanupCompact - -- remove all the trait prefixes - . removeTraits - -- remove PairOf -> (T, T) - . removePairOf - -- remove boxing, `Box` -> `Proposal` - . removeWrap "Box" - -- remove generics, `MisbehaviorReport` -> `MisbehaviorReport` - . removeGenerics - -- flattens tuples with one value, `(AccountId)` -> `AccountId - . flattenSingleTuple - -- converts ::Type to Type, >::Proposal -> Proposal - . removeColons - -alias :: Text -> Text -> Text -> Text -alias = undefined - -cleanupCompact :: Text -> Text -cleanupCompact = id - -removeTraits :: Text -> Text -removeTraits = id - -removePairOf :: Text -> Text -removePairOf = id - -removeWrap :: Text -> Text -> Text -removeWrap _ = id - -removeGenerics :: Text -> Text -removeGenerics = id - -flattenSingleTuple :: Text -> Text -flattenSingleTuple = id +instance Decode Type where + get = fmap Type (sanitizeM =<< get) -removeColons :: Text -> Text -removeColons = id +instance Encode Type where + put = put . unType diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs new file mode 100644 index 00000000..a9733435 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs @@ -0,0 +1,39 @@ +-- | +-- Module : Network.Polkadot.Metadata.Type.Ast +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Runtime metadata type AST. +-- + +module Network.Polkadot.Metadata.Type.Ast where + +import Data.Text (Text) + +-- | Qualified type parameter, e.g., as SomeTrait>::SomeType. +type QSelf = (TypeAst, TypeAst) + +-- | A segment of a path: an identifier and a set of argument types. +type PathSegment = (Text, Maybe [TypeAst]) + +-- | Simple Rust type AST is used for Metadata type representation. +data TypeAst + = Slice !TypeAst + -- ^ A variable-length slice ([T]). + | Tuple ![TypeAst] + -- ^ A tuple ((A, B, C, D,...)). + | Array !TypeAst !Int + -- ^ A fixed length array ([T; n]). + | Path { qself :: !(Maybe QSelf) + -- ^ Two types of as Trait>. + , segments :: ![PathSegment] + -- ^ A segment of a path: an identifier and a set of types. + } + -- ^ A "Path" is essentially Rust's notion of a name. It's represented as a sequence of identifiers, + -- along with a bunch of supporting information. A path (module::module::...::Type), optionally "qualified", + -- e.g., as SomeTrait>::SomeType. + deriving (Eq, Ord, Read, Show) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs new file mode 100644 index 00000000..07c06df9 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs @@ -0,0 +1,123 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeInType #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE UndecidableInstances #-} + +-- | +-- Module : Network.Polkadot.Metadata.Type.Discovery +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Runtime type discovery for generic metadata structures. +-- + +module Network.Polkadot.Metadata.Type.Discovery + ( DiscoveryContext + , Discovery(..) + , runDiscovery + , prefix + , types + ) where + +import Control.Monad.State.Class (MonadState (..)) +import Control.Monad.State.Strict (runState) +import Data.ByteArray.HexString (HexString) +import Data.Set (Set, insert) +import Data.Text (Text) +import Data.Word (Word8) +import Generics.SOP +import Lens.Micro.Extras (view) +import Lens.Micro.Mtl (use, (%=), (.=)) +import Lens.Micro.TH (makeLenses) + +import Network.Polkadot.Metadata.Type (Type (..)) + +-- | Contains information about types and current context. +data DiscoveryContext = DiscoveryContext + { _prefix :: !Text + , _types :: !(Set Type) + } deriving (Eq, Show) + +instance Semigroup DiscoveryContext where + (DiscoveryContext p a) <> (DiscoveryContext _ b) = DiscoveryContext p (a <> b) + +instance Monoid DiscoveryContext where + mempty = DiscoveryContext mempty mempty + +makeLenses ''DiscoveryContext + +-- | Collects information about runtime types. +class Discovery a where + -- | Discover metadata structure for type information. + discovery :: MonadState DiscoveryContext m + => a + -- ^ Input data structure that contains type information. + -> m a + -- ^ Returns the same structure wrapped with registry state monad. + +-- | Skip 'Word8' when found. +instance {-# OVERLAPPING #-} Discovery Word8 where + discovery = return + +-- | Skip 'HexString' when found. +instance {-# OVERLAPPING #-} Discovery HexString where + discovery = return + +-- | Skip 'Text' when found. +instance {-# OVERLAPPING #-} Discovery Text where + discovery = return + +-- | Register 'Type' when found. +instance {-# OVERLAPPING #-} Discovery Type where + discovery t = update . go =<< use prefix + where + update x = types %= insert x >> return x + -- type overlapping hacks + go px | isOverlap || isCtxOverlap px = Type (px <> unType t) + | otherwise = t + isOverlap = unType t `elem` [ "Judgement", "EquivocationProof" ] + isCtxOverlap a = (unType t, a) `elem` [ ("Proposal", "Treasury"), ("Vote", "Society") ] + + +-- | If input type is generic structure, let's go deep using generics. +instance (Generic a, GDiscovery (NS (NP I) (Code a))) => Discovery a where + discovery = fmap (to . SOP) . gdiscovery . unSOP . from + +-- | Generic version of 'Discovery' type class. +class GDiscovery a where + gdiscovery :: MonadState DiscoveryContext m => a -> m a + +-- | Discovery all constructors of the sum. +instance ( GDiscovery (NP I xs) + , GDiscovery (NS (NP I) xss) + ) => GDiscovery (NS (NP I) (xs ': xss)) where + gdiscovery (Z xs) = Z <$> gdiscovery xs + gdiscovery (S xs) = S <$> gdiscovery xs + +-- | Finish when constructors will end. +instance GDiscovery (NS (NP I) '[]) where + gdiscovery = return + +-- | Discovery all fileds of constructors. +instance (Discovery a, GDiscovery (NP I as)) => GDiscovery (NP I (a ': as)) where + gdiscovery (I a :* as) = do + a' <- discovery a + (I a' :*) <$> gdiscovery as + +-- | Finish when fileds will end. +instance GDiscovery (NP I '[]) where + gdiscovery = return + +-- | Discovery types and returns sanitized metadata and set of discovered types. +runDiscovery :: (Discovery a, Traversable t) => (a -> Text) -> t a -> (t a, Set Type) +runDiscovery p = fmap (view types) + . flip runState mempty + . mapM (\m -> prefix .= p m >> discovery m) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs new file mode 100644 index 00000000..89f33493 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs @@ -0,0 +1,96 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Metadata.Type.Parser +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- This module parse and cleanup raw types given from runtime, +-- drop traits, generics, etc. +-- + +module Network.Polkadot.Metadata.Type.Parser + ( fromText + , fromTextM + , toText + , sanitize + , sanitizeM + ) where + +import Data.Text (Text, + intercalate, + pack, + replace, + strip) +import Text.Parsec (ParseError, + parse) + +import Network.Polkadot.Metadata.Type.Ast +import Network.Polkadot.Metadata.Type.ParserCombinators (type') + +allowed_boxes :: [Text] +allowed_boxes = + [ "BTreeMap" + , "BTreeSet" + , "Compact" + , "DoNotConstruct" + , "HashMap" + , "Int" + , "Linkage" + , "Result" + , "Option" + , "UInt" + , "Vec" + ] + +render_box :: Text -> Maybe [TypeAst] -> Text +render_box name Nothing = name +render_box name (Just args) + | any (== name) allowed_boxes = name <> "<" <> intercalate "," (toText <$> args) <> ">" + | name == "Box" = toText (head args) + | otherwise = name + +aliases :: Maybe QSelf -> PathSegment -> Text -> Text +aliases _ _ "Vec" = "Bytes" +aliases _ _ "Announcement" = "ProxyAnnouncement" +aliases _ _ "Status" = "BalanceStatus" +aliases (Just (q, _)) _ "Source" = toText q <> "Source" +aliases (Just (q, _)) _ "Target" = toText q <> "Target" +aliases _ _ a = a + +-- | Render Metadata type to text. +-- +-- This function strongly sanitize type identifiers and paths, +-- removes generics and other Rust related staff. +toText :: TypeAst -> Text +toText (Slice (Path Nothing [("u8", Nothing)])) = "Bytes" +toText (Slice t) = "[" <> toText t <> "]" +toText (Tuple [t]) = toText t +toText (Tuple ts) = "(" <> intercalate "," (toText <$> ts) <> ")" +toText (Array t n) = "[" <> toText t <> ";" <> pack (show n) <> "]" +toText (Path _ []) = "()" +toText (Path q xs) = aliases q (last xs) $ render_box name args + where name = fst (last xs) + args = snd (last xs) + +-- | Parse metadata type (general Rust type) from text. +fromText :: Text -> Either ParseError TypeAst +fromText = parse type' "Metadata Type" . strip . replace "\n" "" + +-- | This variant of `fromText` fails when error happens. +fromTextM :: MonadFail m => Text -> m TypeAst +fromTextM t = either (fail . ((show t ++ ": ") ++) . show) return $ fromText t + +-- | Cleanup type or return error when syntax failure. +sanitize :: Text -> Either ParseError Text +{-# INLINE sanitize #-} +sanitize = fmap toText . fromText + +-- | Cleanup type or throw fail call when syntax failure. +sanitizeM :: MonadFail m => Text -> m Text +{-# INLINE sanitizeM #-} +sanitizeM = fmap toText . fromTextM diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs new file mode 100644 index 00000000..677fea14 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs @@ -0,0 +1,62 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Metadata.Type.ParserCombinators +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Parser combinators for the metadata type. +-- + +module Network.Polkadot.Metadata.Type.ParserCombinators where + +import Data.Functor.Identity (Identity) +import Data.Text (pack) +import Text.Parsec +import Text.Parsec.Text () + +import Network.Polkadot.Metadata.Type.Ast (PathSegment, QSelf, + TypeAst (..)) + +type' :: Stream s Identity Char => Parsec s () TypeAst +type' = choice + [ Slice <$> try slice + , Tuple <$> tuple + , Array <$> arrayT <*> arrayN + , Path <$> optionMaybe pathQself <*> path + ] + +slice :: Stream s Identity Char => Parsec s () TypeAst +slice = (string "[" <|> string "&[") *> type' <* char ']' + +tuple :: Stream s Identity Char => Parsec s () [TypeAst] +tuple = char '(' *> type' `sepBy1` comma <* char ')' + +arrayT :: Stream s Identity Char => Parsec s () TypeAst +arrayT = char '[' *> type' <* dotcomma + where dotcomma = try (string "; ") <|> string ";" + +arrayN :: Stream s Identity Char => Parsec s () Int +arrayN = read <$> manyTill digit (char ']') + +pathQself :: Stream s Identity Char => Parsec s () QSelf +pathQself = (char '<' *> qselfP <* char '>') <* string "::" + where qselfP = (,) <$> (type' <* string " as ") <*> type' + +path :: Stream s Identity Char => Parsec s () [PathSegment] +path = path' `sepBy` string "::" + where + path' = (,) <$> ident + <*> optionMaybe (char '<' *> type' `sepBy1` comma <* char '>') + ident = do + c <- letter + cs <- many (alphaNum <|> char '_') + return $ pack (c : cs) + +comma :: Stream s Identity Char => Parsec s () String +comma = try (string ", ") <|> string "," diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs index 76311a18..1bfb0df2 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs @@ -17,7 +17,8 @@ module Network.Polkadot.Metadata.V10 where import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (fieldLabelModifier), +import Data.Aeson (Options (fieldLabelModifier, sumEncoding), + SumEncoding (ObjectWithSingleField), defaultOptions) import Data.Aeson.TH (deriveJSON) import Data.ByteArray.HexString (HexString) @@ -73,7 +74,7 @@ data StorageEntryType | DoubleMap !DoubleMapType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -$(deriveJSON defaultOptions ''StorageEntryType) +$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''StorageEntryType) data StorageEntryMetadata = StorageEntryMetadata { entryName :: !Text diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs index 4eff1036..95708f2c 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs @@ -17,7 +17,8 @@ module Network.Polkadot.Metadata.V11 where import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (fieldLabelModifier), +import Data.Aeson (Options (fieldLabelModifier, sumEncoding), + SumEncoding (ObjectWithSingleField), defaultOptions) import Data.Aeson.TH (deriveJSON) import Data.ByteArray.HexString (HexString) @@ -75,7 +76,7 @@ data StorageEntryType | DoubleMap !DoubleMapType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -$(deriveJSON defaultOptions ''StorageEntryType) +$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''StorageEntryType) data StorageEntryMetadata = StorageEntryMetadata { entryName :: !Text @@ -118,7 +119,7 @@ $(deriveJSON (defaultOptions data Metadata = Metadata { modules :: ![ModuleMetadata] - , extrinsics :: ![ExtrinsicMetadata] + , extrinsics :: !ExtrinsicMetadata } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON defaultOptions ''Metadata) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs index f8529742..166cd01c 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs @@ -49,8 +49,8 @@ $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 6 }) ''ModuleMetadata) data Metadata = Metadata - { modules :: ![ModuleMetadata] - , extrinsics :: ![ExtrinsicMetadata] + { modules :: ![ModuleMetadata] + , extrinsic :: !ExtrinsicMetadata } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON defaultOptions ''Metadata) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs index 7b1d00fd..0e38684d 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- | diff --git a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs index 27dc45e9..d96634f6 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs @@ -17,12 +17,14 @@ module Network.Polkadot.Test.MetadataSpec where import Codec.Scale (decode) -import Data.Aeson (eitherDecodeFileStrict) +import Data.Aeson (eitherDecodeFileStrict, + toJSON) import Data.ByteArray.HexString (HexString, hexFrom) -import Network.Polkadot.Metadata (Metadata) -import Network.Polkadot.Metadata.MagicNumber (MagicNumber (..)) -import Network.Polkadot.Metadata.Type (sanitize) import Test.Hspec +import Test.Hspec.Expectations.Json (shouldBeJson) + +import Network.Polkadot.Metadata (Metadata, metadataTypes) +import Network.Polkadot.Metadata.MagicNumber (MagicNumber (..)) spec :: Spec spec = parallel $ do @@ -43,27 +45,23 @@ spec = parallel $ do let error_str = decode wrong_version :: Either String Metadata in error_str `shouldBe` Left "Failed reading: wrong prefix during enum decoding\nEmpty call stack\n" - describe "Sanitize alias" $ do - it "replaces all occurrences for types" $ - sanitize "(String,Address,MasterString,String)" - `shouldBe` "(Text,Address,MasterString,Text)" - - it "replaces actual types, but leaves struct names" $ - sanitize "{\"system\":\"String\",\"versionString\":\"String\"}" - `shouldBe` "{\"system\":\"Text\",\"versionString\":\"Text\"}" - - it "handles the preceding correctly" $ - sanitize "String String (String,[String;32],String)\"String" - `shouldBe` "Text Text (Text,[Text;32],Text)\"Text" - - it "handles emdedded Vec/Tuples" $ - sanitize " + describe "Metadata V9" $ do + it "succeeds decode from hex and json" $ do + let (Right hex) = decode [hexFrom|tests/meta/v9.hex|] :: Either String Metadata + (meta, _) = metadataTypes hex + Right json <- eitherDecodeFileStrict "tests/meta/v9.json" + toJSON meta `shouldBeJson` json + describe "Metadata V10" $ do + it "succeeds decode from hex and json" $ do + let (Right hex) = decode [hexFrom|tests/meta/v10.hex|] :: Either String Metadata + (meta, _) = metadataTypes hex + Right json <- eitherDecodeFileStrict "tests/meta/v10.json" + toJSON meta `shouldBeJson` json -{- - describe "Metadata V9" $ do + describe "Metadata V12" $ do it "succeeds decode from hex and json" $ do - let hex_v9 = decode [hexFrom|tests/meta/v9.hex|] :: Either String Metadata - json_v9 <- eitherDecodeFileStrict "tests/meta/v9.json" - hex_v9 `shouldBe` json_v9 --} + let (Right hex) = decode [hexFrom|tests/meta/v12.hex|] :: Either String Metadata + (meta, _) = metadataTypes hex + Right json <- eitherDecodeFileStrict "tests/meta/v12.json" + toJSON meta `shouldBeJson` json diff --git a/packages/polkadot/tests/Network/Polkadot/Test/SanitizeSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/SanitizeSpec.hs deleted file mode 100644 index 056102e2..00000000 --- a/packages/polkadot/tests/Network/Polkadot/Test/SanitizeSpec.hs +++ /dev/null @@ -1,63 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Codec.Scale.Test.SanitizeSpec --- Copyright : Aleksandr Krupenkin 2016-2020 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unportable --- --- Polkadot type name sanitize tests ported from: --- https://github.com/polkadot-js/api/blob/v2.3.1/packages/types/src/create/sanitize.spec.ts --- - -module Network.Polkadot.Test.SanitizeSpec where - -import Codec.Scale (decode) -import Data.Aeson (eitherDecodeFileStrict) -import Data.ByteArray.HexString (HexString, hexFrom) -import Network.Polkadot.Metadata (Metadata) -import Network.Polkadot.Metadata.MagicNumber (MagicNumber (..)) -import Network.Polkadot.Metadata.Type (sanitize) -import Test.Hspec - -spec :: Spec -spec = parallel $ do - describe "alias" $ do - let exec = alias ["String"] "Text" - - it "replaces all occurrences for types" $ - exec "(String,Address,MasterString,String)" - `shouldBe` "(Text,Address,MasterString,Text)" - - it "replaces actual types, but leaves struct names" $ - exec "{\"system\":\"String\",\"versionString\":\"String\"}" - `shouldBe` "{\"system\":\"Text\",\"versionString\":\"Text\"}" - - it "handles the preceding correctly" $ - exec "String String (String,[String;32],String)\"String" - `shouldBe` "Text Text (Text,[Text;32],Text)\"Text" - - it "handles emdedded Vec/Tuples" $ do - let ann = alias ["Announcement"] "ProxyAnnouncement" - ann "(Vec,BalanceOf)" - `shouldBe` "(Vec,BalanceOf)" - - describe "removeColons" $ do - it "removes preceding ::Text -> Text" $ - removeColons "::Text" `shouldBe` "Text" - - it "removes middle voting::TallyType -> TallyType" $ - removeColons "voting::TallyType" `shouldBe` "TallyType" - - it "removes on embedded values (one)" $ - removeColons "(T::AccountId, SpanIndex)" `shouldBe` "(AccountId, SpanIndex)" - - it "removes on embedded values (all)" $ - removeColons "(T::AccountId, slashing::SpanIndex)" - `shouldBe` "(AccountId, SpanIndex)" - - it "keeps with allowNamespaces" $ - removeColons "::slashing::SpanIndex" `shouldBe` "slashing::SpanIndex" diff --git a/packages/polkadot/tests/meta/v10.hex b/packages/polkadot/tests/meta/v10.hex new file mode 100644 index 00000000..e403b831 --- /dev/null +++ b/packages/polkadot/tests/meta/v10.hex @@ -0,0 +1 @@ +0x6d6574610a6c1853797374656d011853797374656d34304163636f756e744e6f6e636501010130543a3a4163636f756e74496420543a3a496e646578001000000000047c2045787472696e73696373206e6f6e636520666f72206163636f756e74732e3845787472696e736963436f756e7400000c753332040004b820546f74616c2065787472696e7369637320636f756e7420666f72207468652063757272656e7420626c6f636b2e4c416c6c45787472696e73696373576569676874000018576569676874040004150120546f74616c2077656967687420666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e40416c6c45787472696e736963734c656e00000c753332040004410120546f74616c206c656e6774682028696e2062797465732920666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e24426c6f636b4861736801010138543a3a426c6f636b4e756d6265721c543a3a48617368008000000000000000000000000000000000000000000000000000000000000000000498204d6170206f6620626c6f636b206e756d6265727320746f20626c6f636b206861736865732e3445787472696e736963446174610101010c7533321c5665633c75383e000400043d012045787472696e73696373206461746120666f72207468652063757272656e7420626c6f636b20286d61707320616e2065787472696e736963277320696e64657820746f206974732064617461292e184e756d626572010038543a3a426c6f636b4e756d6265721000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000004702048617368206f66207468652070726576696f757320626c6f636b2e3845787472696e73696373526f6f7401001c543a3a486173688000000000000000000000000000000000000000000000000000000000000000000415012045787472696e7369637320726f6f74206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e1844696765737401002c4469676573744f663c543e040004f020446967657374206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e184576656e747301008c5665633c4576656e745265636f72643c543a3a4576656e742c20543a3a486173683e3e040004a0204576656e7473206465706f736974656420666f72207468652063757272656e7420626c6f636b2e284576656e74436f756e740100284576656e74496e646578100000000004b820546865206e756d626572206f66206576656e747320696e2074686520604576656e74733c543e60206c6973742e2c4576656e74546f706963730101011c543a3a48617368845665633c28543a3a426c6f636b4e756d6265722c204576656e74496e646578293e000400282501204d617070696e67206265747765656e206120746f7069632028726570726573656e74656420627920543a3a486173682920616e64206120766563746f72206f6620696e646578657394206f66206576656e747320696e2074686520603c4576656e74733c543e3e60206c6973742e00510120416c6c20746f70696320766563746f727320686176652064657465726d696e69737469632073746f72616765206c6f636174696f6e7320646570656e64696e67206f6e2074686520746f7069632e2054686973450120616c6c6f7773206c696768742d636c69656e747320746f206c6576657261676520746865206368616e67657320747269652073746f7261676520747261636b696e67206d656368616e69736d20616e64e420696e2063617365206f66206368616e67657320666574636820746865206c697374206f66206576656e7473206f6620696e7465726573742e004d01205468652076616c756520686173207468652074797065206028543a3a426c6f636b4e756d6265722c204576656e74496e646578296020626563617573652069662077652075736564206f6e6c79206a7573744d012074686520604576656e74496e64657860207468656e20696e20636173652069662074686520746f70696320686173207468652073616d6520636f6e74656e7473206f6e20746865206e65787420626c6f636b0101206e6f206e6f74696669636174696f6e2077696c6c20626520747269676765726564207468757320746865206576656e74206d69676874206265206c6f73742e01242866696c6c5f626c6f636b0004210120412062696720646973706174636820746861742077696c6c20646973616c6c6f7720616e79206f74686572207472616e73616374696f6e20746f20626520696e636c756465642e1872656d61726b041c5f72656d61726b1c5665633c75383e046c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e387365745f686561705f7061676573041470616765730c75363404fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e207365745f636f64650410636f64651c5665633c75383e04682053657420746865206e65772072756e74696d6520636f64652e5c7365745f636f64655f776974686f75745f636865636b730410636f64651c5665633c75383e041d012053657420746865206e65772072756e74696d6520636f646520776974686f757420646f696e6720616e7920636865636b73206f662074686520676976656e2060636f6465602e5c7365745f6368616e6765735f747269655f636f6e666967044c6368616e6765735f747269655f636f6e666967804f7074696f6e3c4368616e67657354726965436f6e66696775726174696f6e3e04a02053657420746865206e6577206368616e676573207472696520636f6e66696775726174696f6e2e2c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e046c2053657420736f6d65206974656d73206f662073746f726167652e306b696c6c5f73746f7261676504106b657973205665633c4b65793e0478204b696c6c20736f6d65206974656d732066726f6d2073746f726167652e2c6b696c6c5f70726566697804187072656669780c4b6579041501204b696c6c20616c6c2073746f72616765206974656d7320776974682061206b657920746861742073746172747320776974682074686520676976656e207072656669782e01084045787472696e7369635375636365737304304469737061746368496e666f049420416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e3c45787472696e7369634661696c6564083444697370617463684572726f72304469737061746368496e666f045420416e2065787472696e736963206661696c65642e00143c496e76616c6964537065634e616d6508150120546865206e616d65206f662073706563696669636174696f6e20646f6573206e6f74206d61746368206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e7c5370656356657273696f6e4e6f74416c6c6f776564546f4465637265617365084501205468652073706563696669636174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e7c496d706c56657273696f6e4e6f74416c6c6f776564546f44656372656173650849012054686520696d706c656d656e746174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e7c537065634f72496d706c56657273696f6e4e656564546f496e637265617365083501205468652073706563696669636174696f6e206f722074686520696d706c656d656e746174696f6e2076657273696f6e206e65656420746f20696e637265617365206265747765656e20746865942063757272656e742072756e74696d6520616e6420746865206e65772072756e74696d652e744661696c6564546f4578747261637452756e74696d6556657273696f6e0cf0204661696c656420746f2065787472616374207468652072756e74696d652076657273696f6e2066726f6d20746865206e65772072756e74696d652e000d01204569746865722063616c6c696e672060436f72655f76657273696f6e60206f72206465636f64696e67206052756e74696d6556657273696f6e60206661696c65642e1c5574696c697479011c5574696c69747904244d756c74697369677300020530543a3a4163636f756e744964205b75383b2033325dd04d756c74697369673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e02040004942054686520736574206f66206f70656e206d756c7469736967206f7065726174696f6e732e0114146261746368041463616c6c735c5665633c3c542061732054726169743e3a3a43616c6c3e48802053656e642061206261746368206f662064697370617463682063616c6c732e00ec20546869732077696c6c206578656375746520756e74696c20746865206669727374206f6e65206661696c7320616e64207468656e2073746f702e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e002c2023203c7765696768743ea4202d205468652073756d206f66207468652077656967687473206f6620746865206063616c6c73602e34202d204f6e65206576656e742e302023203c2f7765696768743e00590120546869732077696c6c2072657475726e20604f6b6020696e20616c6c2063697263756d7374616e6365732e20546f2064657465726d696e65207468652073756363657373206f66207468652062617463682c20616e3501206576656e74206973206465706f73697465642e20496620612063616c6c206661696c656420616e64207468652062617463682077617320696e7465727275707465642c207468656e20746865590120604261746368496e74657272757074656460206576656e74206973206465706f73697465642c20616c6f6e67207769746820746865206e756d626572206f66207375636365737366756c2063616c6c73206d616465510120616e6420746865206572726f72206f6620746865206661696c65642063616c6c2e20496620616c6c2077657265207375636365737366756c2c207468656e2074686520604261746368436f6d706c657465646050206576656e74206973206465706f73697465642e1861735f7375620814696e6465780c7531361063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e1ce02053656e6420612063616c6c207468726f75676820616e20696e64657865642070736575646f6e796d206f66207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e70202d2054686520776569676874206f6620746865206063616c6c602e302023203c2f7765696768743e2061735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e1063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3ea4590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e00b42049662074686572652061726520656e6f7567682c207468656e206469737061746368207468652063616c6c2e005101205061796d656e743a20604d756c74697369674465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573610120607468726573686f6c64602074696d657320604d756c74697369674465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e002101204e4f54453a20556e6c6573732074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2067656e6572616c6c792077616e7420746f207573651d012060617070726f76655f61735f6d756c74696020696e73746561642c2073696e6365206974206f6e6c7920726571756972657320612068617368206f66207468652063616c6c2e005d0120526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c7420696620607468726573686f6c64602069732065786163746c79206031602e204f74686572776973655901206f6e20737563636573732c20726573756c7420697320604f6b6020616e642074686520726573756c742066726f6d2074686520696e746572696f722063616c6c2c206966206974207761732065786563757465642ce0206d617920626520666f756e6420696e20746865206465706f736974656420604d756c7469736967457865637574656460206576656e742e002c2023203c7765696768743e54202d20604f2853202b205a202b2043616c6c29602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2e2501202d204f6e652063616c6c20656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285a296020776865726520605a602069732074782d6c656e2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e70202d2054686520776569676874206f6620746865206063616c6c602e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66f4202020604d756c74697369674465706f73697442617365202b207468726573686f6c64202a204d756c74697369674465706f736974466163746f72602e302023203c2f7765696768743e40617070726f76655f61735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e2463616c6c5f68617368205b75383b2033325d80590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e005101205061796d656e743a20604d756c74697369674465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573610120607468726573686f6c64602074696d657320604d756c74697369674465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e003901204e4f54453a2049662074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2077616e7420746f20757365206061735f6d756c74696020696e73746561642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66f4202020604d756c74697369674465706f73697442617365202b207468726573686f6c64202a204d756c74697369674465706f736974466163746f72602e302023203c2f7765696768743e3c63616e63656c5f61735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e2474696d65706f696e746454696d65706f696e743c543a3a426c6f636b4e756d6265723e2463616c6c5f68617368205b75383b2033325d5859012043616e63656c2061207072652d6578697374696e672c206f6e2d676f696e67206d756c7469736967207472616e73616374696f6e2e20416e79206465706f7369742072657365727665642070726576696f75736c79c820666f722074686973206f7065726174696f6e2077696c6c20626520756e7265736572766564206f6e20737563636573732e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e6101202d206074696d65706f696e74603a205468652074696d65706f696e742028626c6f636b206e756d62657220616e64207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c7c207472616e73616374696f6e20666f7220746869732064697370617463682ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602e34202d204f6e65206576656e742e88202d20492f4f3a2031207265616420604f285329602c206f6e652072656d6f76652e74202d2053746f726167653a2072656d6f766573206f6e65206974656d2e302023203c2f7765696768743e0118404261746368496e746572727570746564080c7533323444697370617463684572726f72085901204261746368206f66206469737061746368657320646964206e6f7420636f6d706c6574652066756c6c792e20496e646578206f66206669727374206661696c696e6720646973706174636820676976656e2c2061734c2077656c6c20617320746865206572726f722e384261746368436f6d706c657465640004cc204261746368206f66206469737061746368657320636f6d706c657465642066756c6c792077697468206e6f206572726f722e2c4e65774d756c746973696708244163636f756e744964244163636f756e7449640849012041206e6577206d756c7469736967206f7065726174696f6e2068617320626567756e2e20466972737420706172616d20697320746865206163636f756e74207468617420697320617070726f76696e672c80207365636f6e6420697320746865206d756c7469736967206163636f756e742e404d756c7469736967417070726f76616c0c244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449640859012041206d756c7469736967206f7065726174696f6e20686173206265656e20617070726f76656420627920736f6d656f6e652e20466972737420706172616d20697320746865206163636f756e742074686174206973a820617070726f76696e672c20746869726420697320746865206d756c7469736967206163636f756e742e404d756c7469736967457865637574656410244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e744964384469737061746368526573756c74082d012041206d756c7469736967206f7065726174696f6e20686173206265656e2065786563757465642e20466972737420706172616d20697320746865206163636f756e742074686174206973a820617070726f76696e672c20746869726420697320746865206d756c7469736967206163636f756e742e444d756c746973696743616e63656c6c65640c244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449640831012041206d756c7469736967206f7065726174696f6e20686173206265656e2063616e63656c6c65642e20466972737420706172616d20697320746865206163636f756e742074686174206973ac2063616e63656c6c696e672c20746869726420697320746865206d756c7469736967206163636f756e742e00001042616265011042616265242845706f6368496e64657801000c75363420000000000000000004542043757272656e742065706f636820696e6465782e2c417574686f72697469657301009c5665633c28417574686f7269747949642c2042616265417574686f72697479576569676874293e0400046c2043757272656e742065706f636820617574686f7269746965732e2c47656e65736973536c6f7401000c75363420000000000000000008f82054686520736c6f74206174207768696368207468652066697273742065706f63682061637475616c6c7920737461727465642e205468697320697320309020756e74696c2074686520666972737420626c6f636b206f662074686520636861696e2e2c43757272656e74536c6f7401000c75363420000000000000000004542043757272656e7420736c6f74206e756d6265722e2852616e646f6d6e6573730100205b75383b2033325d80000000000000000000000000000000000000000000000000000000000000000028b8205468652065706f63682072616e646f6d6e65737320666f7220746865202a63757272656e742a2065706f63682e002c20232053656375726974790005012054686973204d555354204e4f54206265207573656420666f722067616d626c696e672c2061732069742063616e20626520696e666c75656e6365642062792061f8206d616c6963696f75732076616c696461746f7220696e207468652073686f7274207465726d2e204974204d4159206265207573656420696e206d616e7915012063727970746f677261706869632070726f746f636f6c732c20686f77657665722c20736f206c6f6e67206173206f6e652072656d656d6265727320746861742074686973150120286c696b652065766572797468696e6720656c7365206f6e2d636861696e29206974206973207075626c69632e20466f72206578616d706c652c2069742063616e206265050120757365642077686572652061206e756d626572206973206e656564656420746861742063616e6e6f742068617665206265656e2063686f73656e20627920616e0d01206164766572736172792c20666f7220707572706f7365732073756368206173207075626c69632d636f696e207a65726f2d6b6e6f776c656467652070726f6f66732e384e65787452616e646f6d6e6573730100205b75383b2033325d800000000000000000000000000000000000000000000000000000000000000000045c204e6578742065706f63682072616e646f6d6e6573732e305365676d656e74496e64657801000c7533321000000000247c2052616e646f6d6e65737320756e64657220636f6e737472756374696f6e2e00f4205765206d616b6520612074726164656f6666206265747765656e2073746f7261676520616363657373657320616e64206c697374206c656e6774682e01012057652073746f72652074686520756e6465722d636f6e737472756374696f6e2072616e646f6d6e65737320696e207365676d656e7473206f6620757020746f942060554e4445525f434f4e535452554354494f4e5f5345474d454e545f4c454e475448602e00ec204f6e63652061207365676d656e7420726561636865732074686973206c656e6774682c20776520626567696e20746865206e657874206f6e652e090120576520726573657420616c6c207365676d656e747320616e642072657475726e20746f206030602061742074686520626567696e6e696e67206f662065766572791c2065706f63682e44556e646572436f6e737472756374696f6e0101010c753332345665633c5b75383b2033325d3e000400002c496e697469616c697a65640000204d6179626556726604000801012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e292077686963682069732060536f6d65601d01206966207065722d626c6f636b20696e697469616c697a6174696f6e2068617320616c7265616479206265656e2063616c6c656420666f722063757272656e7420626c6f636b2e010000083445706f63684475726174696f6e0c75363420c800000000000000080d0120546865206e756d626572206f66202a2a736c6f74732a2a207468617420616e2065706f63682074616b65732e20576520636f75706c652073657373696f6e7320746ffc2065706f6368732c20692e652e2077652073746172742061206e65772073657373696f6e206f6e636520746865206e65772065706f636820626567696e732e444578706563746564426c6f636b54696d6524543a3a4d6f6d656e7420b80b00000000000014050120546865206578706563746564206176657261676520626c6f636b2074696d6520617420776869636820424142452073686f756c64206265206372656174696e67110120626c6f636b732e2053696e636520424142452069732070726f626162696c6973746963206974206973206e6f74207472697669616c20746f20666967757265206f75740501207768617420746865206578706563746564206176657261676520626c6f636b2074696d652073686f756c64206265206261736564206f6e2074686520736c6f740901206475726174696f6e20616e642074686520736563757269747920706172616d657465722060636020287768657265206031202d20636020726570726573656e7473a0207468652070726f626162696c697479206f66206120736c6f74206265696e6720656d707479292e002454696d657374616d70012454696d657374616d70080c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f01040c736574040c6e6f7748436f6d706163743c543a3a4d6f6d656e743e245820536574207468652063757272656e742074696d652e00590120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6ed82070686173652c20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e004501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062794420604d696e696d756d506572696f64602e00d820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060496e686572656e74602e0004344d696e696d756d506572696f6424543a3a4d6f6d656e7420dc0500000000000010690120546865206d696e696d756d20706572696f64206265747765656e20626c6f636b732e204265776172652074686174207468697320697320646966666572656e7420746f20746865202a65787065637465642a20706572696f64690120746861742074686520626c6f636b2070726f64756374696f6e206170706172617475732070726f76696465732e20596f75722063686f73656e20636f6e73656e7375732073797374656d2077696c6c2067656e6572616c6c79650120776f726b2077697468207468697320746f2064657465726d696e6520612073656e7369626c6520626c6f636b2074696d652e20652e672e20466f7220417572612c2069742077696c6c20626520646f75626c6520746869737020706572696f64206f6e2064656661756c742073657474696e67732e0028417574686f72736869700128417574686f72736869700c18556e636c65730100e85665633c556e636c65456e7472794974656d3c543a3a426c6f636b4e756d6265722c20543a3a486173682c20543a3a4163636f756e7449643e3e0400041c20556e636c657318417574686f72000030543a3a4163636f756e7449640400046420417574686f72206f662063757272656e7420626c6f636b2e30446964536574556e636c6573010010626f6f6c040004bc205768657468657220756e636c6573207765726520616c72656164792073657420696e207468697320626c6f636b2e0104287365745f756e636c657304286e65775f756e636c6573385665633c543a3a4865616465723e04642050726f76696465206120736574206f6620756e636c65732e00001c48496e76616c6964556e636c65506172656e74048c2054686520756e636c6520706172656e74206e6f7420696e2074686520636861696e2e40556e636c6573416c7265616479536574048420556e636c657320616c72656164792073657420696e2074686520626c6f636b2e34546f6f4d616e79556e636c6573044420546f6f206d616e7920756e636c65732e3047656e65736973556e636c6504582054686520756e636c652069732067656e657369732e30546f6f48696768556e636c6504802054686520756e636c6520697320746f6f206869676820696e20636861696e2e50556e636c65416c7265616479496e636c75646564047c2054686520756e636c6520697320616c726561647920696e636c756465642e204f6c64556e636c6504b82054686520756e636c652069736e277420726563656e7420656e6f75676820746f20626520696e636c756465642e1c496e6469636573011c496e6469636573082c4e657874456e756d53657401003c543a3a4163636f756e74496e6465781000000000047c20546865206e657874206672656520656e756d65726174696f6e207365742e1c456e756d5365740101013c543a3a4163636f756e74496e646578445665633c543a3a4163636f756e7449643e00040004582054686520656e756d65726174696f6e20736574732e010001043c4e65774163636f756e74496e64657808244163636f756e744964304163636f756e74496e64657810882041206e6577206163636f756e7420696e646578207761732061737369676e65642e0005012054686973206576656e74206973206e6f7420747269676765726564207768656e20616e206578697374696e6720696e64657820697320726561737369676e65646020746f20616e6f7468657220604163636f756e744964602e00002042616c616e636573012042616c616e6365731434546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004982054686520746f74616c20756e6974732069737375656420696e207468652073797374656d2e1c56657374696e6700010130543a3a4163636f756e744964ac56657374696e675363686564756c653c543a3a42616c616e63652c20543a3a426c6f636b4e756d6265723e00040004d820496e666f726d6174696f6e20726567617264696e67207468652076657374696e67206f66206120676976656e206163636f756e742e2c4672656542616c616e636501010130543a3a4163636f756e74496428543a3a42616c616e63650040000000000000000000000000000000002c9c20546865202766726565272062616c616e6365206f66206120676976656e206163636f756e742e004101205468697320697320746865206f6e6c792062616c616e63652074686174206d61747465727320696e207465726d73206f66206d6f7374206f7065726174696f6e73206f6e20746f6b656e732e204974750120616c6f6e65206973207573656420746f2064657465726d696e65207468652062616c616e6365207768656e20696e2074686520636f6e747261637420657865637574696f6e20656e7669726f6e6d656e742e205768656e207468697355012062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e20746865202763757272656e74206163636f756e74272069733d012064656c657465643a207370656369666963616c6c7920604672656542616c616e6365602e20467572746865722c2074686520604f6e4672656542616c616e63655a65726f602063616c6c6261636b450120697320696e766f6b65642c20676976696e672061206368616e636520746f2065787465726e616c206d6f64756c657320746f20636c65616e2075702064617461206173736f636961746564207769746854207468652064656c65746564206163636f756e742e00750120606672616d655f73797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c657465642069662060526573657276656442616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473150120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e3c526573657276656442616c616e636501010130543a3a4163636f756e74496428543a3a42616c616e63650040000000000000000000000000000000002c75012054686520616d6f756e74206f66207468652062616c616e6365206f66206120676976656e206163636f756e7420746861742069732065787465726e616c6c792072657365727665643b20746869732063616e207374696c6c206765749c20736c61736865642c20627574206765747320736c6173686564206c617374206f6620616c6c2e006d0120546869732062616c616e63652069732061202772657365727665272062616c616e63652074686174206f746865722073756273797374656d732075736520696e206f7264657220746f2073657420617369646520746f6b656e732501207468617420617265207374696c6c20276f776e65642720627920746865206163636f756e7420686f6c6465722c20627574207768696368206172652073757370656e6461626c652e007501205768656e20746869732062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e2074686973202772657365727665206163636f756e7427b42069732064656c657465643a207370656369666963616c6c792c2060526573657276656442616c616e6365602e00650120606672616d655f73797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c6574656420696620604672656542616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473190120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e29144c6f636b7301010130543a3a4163636f756e744964b05665633c42616c616e63654c6f636b3c543a3a42616c616e63652c20543a3a426c6f636b4e756d6265723e3e00040004b820416e79206c6971756964697479206c6f636b73206f6e20736f6d65206163636f756e742062616c616e6365732e0110207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e64d8205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572206163636f756e742e00090120607472616e73666572602077696c6c207365742074686520604672656542616c616e636560206f66207468652073656e64657220616e642072656365697665722e21012049742077696c6c2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d2062792074686520605472616e73666572466565602e1501204966207468652073656e6465722773206163636f756e742069732062656c6f7720746865206578697374656e7469616c206465706f736974206173206120726573756c74b4206f6620746865207472616e736665722c20746865206163636f756e742077696c6c206265207265617065642e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605369676e65646020627920746865207472616e736163746f722e002c2023203c7765696768743e3101202d20446570656e64656e74206f6e20617267756d656e747320627574206e6f7420637269746963616c2c20676976656e2070726f70657220696d706c656d656e746174696f6e7320666f72cc202020696e70757420636f6e6669672074797065732e205365652072656c617465642066756e6374696f6e732062656c6f772e6901202d20497420636f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e642077726974657320696e7465726e616c6c7920616e64206e6f20636f6d706c657820636f6d7075746174696f6e2e004c2052656c617465642066756e6374696f6e733a0051012020202d2060656e737572655f63616e5f77697468647261776020697320616c776179732063616c6c656420696e7465726e616c6c792062757420686173206120626f756e64656420636f6d706c65786974792e2d012020202d205472616e7366657272696e672062616c616e63657320746f206163636f756e7473207468617420646964206e6f74206578697374206265666f72652077696c6c206361757365d420202020202060543a3a4f6e4e65774163636f756e743a3a6f6e5f6e65775f6163636f756e746020746f2062652063616c6c65642edc2020202d2052656d6f76696e6720656e6f7567682066756e64732066726f6d20616e206163636f756e742077696c6c20747269676765725901202020202060543a3a4475737452656d6f76616c3a3a6f6e5f756e62616c616e6365646020616e642060543a3a4f6e4672656542616c616e63655a65726f3a3a6f6e5f667265655f62616c616e63655f7a65726f602e49012020202d20607472616e736665725f6b6565705f616c6976656020776f726b73207468652073616d652077617920617320607472616e73666572602c206275742068617320616e206164646974696f6e616cf82020202020636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c20746865206f726967696e206163636f756e742e00302023203c2f7765696768743e2c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365206e65775f667265654c436f6d706163743c543a3a42616c616e63653e306e65775f72657365727665644c436f6d706163743c543a3a42616c616e63653e349420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e00210120546869732077696c6c20616c74657220604672656542616c616e63656020616e642060526573657276656442616c616e63656020696e2073746f726167652e2069742077696c6c090120616c736f2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d202860546f74616c49737375616e636560292e190120496620746865206e65772066726565206f722072657365727665642062616c616e63652069732062656c6f7720746865206578697374656e7469616c206465706f7369742c01012069742077696c6c20726573657420746865206163636f756e74206e6f6e63652028606672616d655f73797374656d3a3a4163636f756e744e6f6e636560292e00b420546865206469737061746368206f726967696e20666f7220746869732063616c6c2069732060726f6f74602e002c2023203c7765696768743e80202d20496e646570656e64656e74206f662074686520617267756d656e74732ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e302023203c2f7765696768743e38666f7263655f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e0851012045786163746c7920617320607472616e73666572602c2065786365707420746865206f726967696e206d75737420626520726f6f7420616e642074686520736f75726365206163636f756e74206d61792062652c207370656369666965642e4c7472616e736665725f6b6565705f616c6976650810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e1851012053616d6520617320746865205b607472616e73666572605d2063616c6c2c206275742077697468206120636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c2074686540206f726967696e206163636f756e742e00bc20393925206f66207468652074696d6520796f752077616e74205b607472616e73666572605d20696e73746561642e00c4205b607472616e73666572605d3a207374727563742e4d6f64756c652e68746d6c236d6574686f642e7472616e736665720114284e65774163636f756e7408244163636f756e7449641c42616c616e6365046c2041206e6577206163636f756e742077617320637265617465642e345265617065644163636f756e7408244163636f756e7449641c42616c616e6365045c20416e206163636f756e7420776173207265617065642e205472616e7366657210244163636f756e744964244163636f756e7449641c42616c616e63651c42616c616e636504b0205472616e7366657220737563636565646564202866726f6d2c20746f2c2076616c75652c2066656573292e2842616c616e63655365740c244163636f756e7449641c42616c616e63651c42616c616e636504c420412062616c616e6365207761732073657420627920726f6f74202877686f2c20667265652c207265736572766564292e1c4465706f73697408244163636f756e7449641c42616c616e636504dc20536f6d6520616d6f756e7420776173206465706f73697465642028652e672e20666f72207472616e73616374696f6e2066656573292e0c484578697374656e7469616c4465706f73697428543a3a42616c616e63654000407a10f35a0000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f206b65657020616e206163636f756e74206f70656e2e2c5472616e7366657246656528543a3a42616c616e6365400010a5d4e800000000000000000000000494205468652066656520726571756972656420746f206d616b652061207472616e736665722e2c4372656174696f6e46656528543a3a42616c616e6365400010a5d4e80000000000000000000000049c205468652066656520726571756972656420746f2063726561746520616e206163636f756e742e203856657374696e6742616c616e6365049c2056657374696e672062616c616e636520746f6f206869676820746f2073656e642076616c7565544c69717569646974795265737472696374696f6e7304c8204163636f756e74206c6971756964697479207265737472696374696f6e732070726576656e74207769746864726177616c204f766572666c6f77047420476f7420616e206f766572666c6f7720616674657220616464696e674c496e73756666696369656e7442616c616e636504782042616c616e636520746f6f206c6f7720746f2073656e642076616c7565484578697374656e7469616c4465706f73697404ec2056616c756520746f6f206c6f7720746f20637265617465206163636f756e742064756520746f206578697374656e7469616c206465706f736974244b656570416c6976650490205472616e736665722f7061796d656e7420776f756c64206b696c6c206163636f756e745c4578697374696e6756657374696e675363686564756c6504cc20412076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e742c446561644163636f756e74048c2042656e6566696369617279206163636f756e74206d757374207072652d6578697374485472616e73616374696f6e5061796d656e74012042616c616e63657304444e6578744665654d756c7469706c6965720100284d756c7469706c69657220000000000000000000000008485472616e73616374696f6e426173654665653042616c616e63654f663c543e400010a5d4e8000000000000000000000004dc205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b2074686520626173652e485472616e73616374696f6e427974654665653042616c616e63654f663c543e4000e40b54020000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e001c5374616b696e67011c5374616b696e67683856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321004000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e34496e76756c6e657261626c65730100445665633c543a3a4163636f756e7449643e04000c590120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c79206b69636b65642e20497427732061205665632073696e636520746865792772654d01206561737920746f20696e697469616c697a6520616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f7572ac20696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e18426f6e64656400010130543a3a4163636f756e74496430543a3a4163636f756e744964000400040101204d61702066726f6d20616c6c206c6f636b65642022737461736822206163636f756e747320746f2074686520636f6e74726f6c6c6572206163636f756e742e184c656467657200010130543a3a4163636f756e744964a45374616b696e674c65646765723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400044501204d61702066726f6d20616c6c2028756e6c6f636b6564292022636f6e74726f6c6c657222206163636f756e747320746f2074686520696e666f20726567617264696e6720746865207374616b696e672e14506179656501010130543a3a4163636f756e7449644452657761726444657374696e6174696f6e00040004e42057686572652074686520726577617264207061796d656e742073686f756c64206265206d6164652e204b657965642062792073746173682e2856616c696461746f727301010130543a3a4163636f756e7449643856616c696461746f72507265667301040004450120546865206d61702066726f6d202877616e6e616265292076616c696461746f72207374617368206b657920746f2074686520707265666572656e636573206f6620746861742076616c696461746f722e284e6f6d696e61746f727300010130543a3a4163636f756e744964644e6f6d696e6174696f6e733c543a3a4163636f756e7449643e01040010650120546865206d61702066726f6d206e6f6d696e61746f72207374617368206b657920746f2074686520736574206f66207374617368206b657973206f6620616c6c2076616c696461746f727320746f206e6f6d696e6174652e003501204e4f54453a206973207072697661746520736f20746861742077652063616e20656e73757265207570677261646564206265666f726520616c6c207479706963616c2061636365737365732ed8204469726563742073746f7261676520415049732063616e207374696c6c2062797061737320746869732070726f74656374696f6e2e1c5374616b65727301010130543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000c000000104d01204e6f6d696e61746f727320666f72206120706172746963756c6172206163636f756e74207468617420697320696e20616374696f6e207269676874206e6f772e20596f752063616e277420697465726174651901207468726f7567682076616c696461746f727320686572652c2062757420796f752063616e2066696e64207468656d20696e207468652053657373696f6e206d6f64756c652e00902054686973206973206b6579656420627920746865207374617368206163636f756e742e3843757272656e74456c65637465640100445665633c543a3a4163636f756e7449643e040004fc205468652063757272656e746c7920656c65637465642076616c696461746f7220736574206b65796564206279207374617368206163636f756e742049442e2843757272656e74457261010020457261496e6465781000000000045c205468652063757272656e742065726120696e6465782e3c43757272656e74457261537461727401002c4d6f6d656e744f663c543e200000000000000000047820546865207374617274206f66207468652063757272656e74206572612e6c43757272656e74457261537461727453657373696f6e496e64657801003053657373696f6e496e646578100000000004d0205468652073657373696f6e20696e646578206174207768696368207468652063757272656e742065726120737461727465642e5843757272656e74457261506f696e74734561726e6564010024457261506f696e7473140000000000040d01205265776172647320666f72207468652063757272656e74206572612e205573696e6720696e6469636573206f662063757272656e7420656c6563746564207365742e24536c6f745374616b6501003042616c616e63654f663c543e40000000000000000000000000000000000c31012054686520616d6f756e74206f662062616c616e6365206163746976656c79206174207374616b6520666f7220656163682076616c696461746f7220736c6f742c2063757272656e746c792e00c02054686973206973207573656420746f20646572697665207265776172647320616e642070756e6973686d656e74732e20466f72636545726101001c466f7263696e670400041d01205472756520696620746865206e6578742073657373696f6e206368616e67652077696c6c2062652061206e657720657261207265676172646c657373206f6620696e6465782e4c536c6173685265776172644672616374696f6e01001c50657262696c6c10000000000cf8205468652070657263656e74616765206f662074686520736c617368207468617420697320646973747269627574656420746f207265706f72746572732e00e4205468652072657374206f662074686520736c61736865642076616c75652069732068616e646c6564206279207468652060536c617368602e4c43616e63656c6564536c6173685061796f757401003042616c616e63654f663c543e40000000000000000000000000000000000815012054686520616d6f756e74206f662063757272656e637920676976656e20746f207265706f7274657273206f66206120736c617368206576656e7420776869636820776173ec2063616e63656c65642062792065787472616f7264696e6172792063697263756d7374616e6365732028652e672e20676f7665726e616e6365292e40556e6170706c696564536c617368657301010120457261496e646578bc5665633c556e6170706c696564536c6173683c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e00040004c420416c6c20756e6170706c69656420736c61736865732074686174206172652071756575656420666f72206c617465722e28426f6e646564457261730100745665633c28457261496e6465782c2053657373696f6e496e646578293e04000425012041206d617070696e672066726f6d207374696c6c2d626f6e646564206572617320746f207468652066697273742073657373696f6e20696e646578206f662074686174206572612e4c56616c696461746f72536c617368496e45726100020120457261496e64657830543a3a4163636f756e7449645c2850657262696c6c2c2042616c616e63654f663c543e2903040008450120416c6c20736c617368696e67206576656e7473206f6e2076616c696461746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682070726f706f7274696f6e7020616e6420736c6173682076616c7565206f6620746865206572612e4c4e6f6d696e61746f72536c617368496e45726100020120457261496e64657830543a3a4163636f756e7449643042616c616e63654f663c543e03040004610120416c6c20736c617368696e67206576656e7473206f6e206e6f6d696e61746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682076616c7565206f6620746865206572612e34536c617368696e675370616e7300010130543a3a4163636f756e7449645c736c617368696e673a3a536c617368696e675370616e73000400048c20536c617368696e67207370616e7320666f72207374617368206163636f756e74732e245370616e536c6173680101018c28543a3a4163636f756e7449642c20736c617368696e673a3a5370616e496e6465782988736c617368696e673a3a5370616e5265636f72643c42616c616e63654f663c543e3e00800000000000000000000000000000000000000000000000000000000000000000083d01205265636f72647320696e666f726d6174696f6e2061626f757420746865206d6178696d756d20736c617368206f6620612073746173682077697468696e206120736c617368696e67207370616e2cb82061732077656c6c20617320686f77206d7563682072657761726420686173206265656e2070616964206f75742e584561726c69657374556e6170706c696564536c617368000020457261496e646578040004fc20546865206561726c696573742065726120666f72207768696368207765206861766520612070656e64696e672c20756e6170706c69656420736c6173682e3853746f7261676556657273696f6e01000c75333210000000000490205468652076657273696f6e206f662073746f7261676520666f7220757067726164652e014410626f6e640c28636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e1470617965654452657761726444657374696e6174696f6e3c65012054616b6520746865206f726967696e206163636f756e74206173206120737461736820616e64206c6f636b207570206076616c756560206f66206974732062616c616e63652e2060636f6e74726f6c6c6572602077696c6c8420626520746865206163636f756e74207468617420636f6e74726f6c732069742e003101206076616c756560206d757374206265206d6f7265207468616e2074686520606d696e696d756d5f62616c616e636560207370656369666965642062792060543a3a43757272656e6379602e00250120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20627920746865207374617368206163636f756e742e002c2023203c7765696768743ed4202d20496e646570656e64656e74206f662074686520617267756d656e74732e204d6f64657261746520636f6d706c65786974792e20202d204f2831292e68202d20546872656520657874726120444220656e74726965732e006d01204e4f54453a2054776f206f66207468652073746f726167652077726974657320286053656c663a3a626f6e646564602c206053656c663a3a7061796565602920617265205f6e657665725f20636c65616e656420756e6c65737325012074686520606f726967696e602066616c6c732062656c6f77205f6578697374656e7469616c206465706f7369745f20616e6420676574732072656d6f76656420617320647573742e302023203c2f7765696768743e28626f6e645f657874726104386d61785f6164646974696f6e616c54436f6d706163743c42616c616e63654f663c543e3e3865012041646420736f6d6520657874726120616d6f756e742074686174206861766520617070656172656420696e207468652073746173682060667265655f62616c616e63656020696e746f207468652062616c616e63652075703420666f72207374616b696e672e00510120557365207468697320696620746865726520617265206164646974696f6e616c2066756e647320696e20796f7572207374617368206163636f756e74207468617420796f75207769736820746f20626f6e642e650120556e6c696b65205b60626f6e64605d206f72205b60756e626f6e64605d20746869732066756e6374696f6e20646f6573206e6f7420696d706f736520616e79206c696d69746174696f6e206f6e2074686520616d6f756e744c20746861742063616e2062652061646465642e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e20202d204f2831292e40202d204f6e6520444220656e7472792e302023203c2f7765696768743e18756e626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e5c5501205363686564756c65206120706f7274696f6e206f662074686520737461736820746f20626520756e6c6f636b656420726561647920666f72207472616e73666572206f75742061667465722074686520626f6e64010120706572696f6420656e64732e2049662074686973206c656176657320616e20616d6f756e74206163746976656c7920626f6e646564206c657373207468616e250120543a3a43757272656e63793a3a6d696e696d756d5f62616c616e636528292c207468656e20697420697320696e6372656173656420746f207468652066756c6c20616d6f756e742e004901204f6e63652074686520756e6c6f636b20706572696f6420697320646f6e652c20796f752063616e2063616c6c206077697468647261775f756e626f6e6465646020746f2061637475616c6c79206d6f7665c0207468652066756e6473206f7574206f66206d616e6167656d656e7420726561647920666f72207472616e736665722e003d01204e6f206d6f7265207468616e2061206c696d69746564206e756d626572206f6620756e6c6f636b696e67206368756e6b73202873656520604d41585f554e4c4f434b494e475f4348554e4b5360293d012063616e20636f2d657869737473206174207468652073616d652074696d652e20496e207468617420636173652c205b6043616c6c3a3a77697468647261775f756e626f6e646564605d206e656564fc20746f2062652063616c6c656420666972737420746f2072656d6f766520736f6d65206f6620746865206368756e6b732028696620706f737369626c65292e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e00982053656520616c736f205b6043616c6c3a3a77697468647261775f756e626f6e646564605d2e002c2023203c7765696768743e4101202d20496e646570656e64656e74206f662074686520617267756d656e74732e204c696d697465642062757420706f74656e7469616c6c79206578706c6f697461626c6520636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732e6501202d20456163682063616c6c20287265717569726573207468652072656d61696e646572206f662074686520626f6e6465642062616c616e636520746f2062652061626f766520606d696e696d756d5f62616c616e63656029710120202077696c6c2063617573652061206e657720656e74727920746f20626520696e73657274656420696e746f206120766563746f722028604c65646765722e756e6c6f636b696e676029206b65707420696e2073746f726167652ea501202020546865206f6e6c792077617920746f20636c65616e207468652061666f72656d656e74696f6e65642073746f72616765206974656d20697320616c736f20757365722d636f6e74726f6c6c656420766961206077697468647261775f756e626f6e646564602e40202d204f6e6520444220656e7472792e28203c2f7765696768743e4477697468647261775f756e626f6e64656400402d012052656d6f766520616e7920756e6c6f636b6564206368756e6b732066726f6d207468652060756e6c6f636b696e67602071756575652066726f6d206f7572206d616e6167656d656e742e003501205468697320657373656e7469616c6c7920667265657320757020746861742062616c616e636520746f206265207573656420627920746865207374617368206163636f756e7420746f20646f4c2077686174657665722069742077616e74732e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e006c2053656520616c736f205b6043616c6c3a3a756e626f6e64605d2e002c2023203c7765696768743e5501202d20436f756c6420626520646570656e64656e74206f6e2074686520606f726967696e6020617267756d656e7420616e6420686f77206d7563682060756e6c6f636b696e6760206368756e6b732065786973742e45012020497420696d706c6965732060636f6e736f6c69646174655f756e6c6f636b656460207768696368206c6f6f7073206f76657220604c65646765722e756e6c6f636b696e67602c207768696368206973f42020696e6469726563746c7920757365722d636f6e74726f6c6c65642e20536565205b60756e626f6e64605d20666f72206d6f72652064657461696c2e7901202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732c20796574207468652073697a65206f6620776869636820636f756c64206265206c61726765206261736564206f6e20606c6564676572602ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e2076616c6964617465041470726566733856616c696461746f7250726566732ce8204465636c617265207468652064657369726520746f2076616c696461746520666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e206e6f6d696e617465041c74617267657473a05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e2c1101204465636c617265207468652064657369726520746f206e6f6d696e6174652060746172676574736020666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743e2501202d20546865207472616e73616374696f6e277320636f6d706c65786974792069732070726f706f7274696f6e616c20746f207468652073697a65206f66206074617267657473602c982077686963682069732063617070656420617420604d41585f4e4f4d494e4154494f4e53602ed8202d20426f74682074686520726561647320616e642077726974657320666f6c6c6f7720612073696d696c6172207061747465726e2e302023203c2f7765696768743e146368696c6c002cc8204465636c617265206e6f2064657369726520746f206569746865722076616c6964617465206f72206e6f6d696e6174652e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e54202d20436f6e7461696e73206f6e6520726561642ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e247365745f7061796565041470617965654452657761726444657374696e6174696f6e2cb8202852652d2973657420746865207061796d656e742074617267657420666f72206120636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e387365745f636f6e74726f6c6c65720428636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c90202852652d297365742074686520636f6e74726f6c6c6572206f6620612073746173682e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e4c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e04802054686520696465616c206e756d626572206f662076616c696461746f72732e34666f7263655f6e6f5f657261730014b020466f72636520746865726520746f206265206e6f206e6577206572617320696e646566696e6974656c792e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e302023203c2f7765696768743e34666f7263655f6e65775f65726100184d0120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f6620746865206e6578742073657373696f6e2e20416674657220746869732c2069742077696c6c206265a020726573657420746f206e6f726d616c20286e6f6e2d666f7263656429206265686176696f75722e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e302023203c2f7765696768743e447365745f696e76756c6e657261626c6573042876616c696461746f7273445665633c543a3a4163636f756e7449643e04cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e34666f7263655f756e7374616b650414737461736830543a3a4163636f756e744964040d0120466f72636520612063757272656e74207374616b657220746f206265636f6d6520636f6d706c6574656c7920756e7374616b65642c20696d6d6564696174656c792e50666f7263655f6e65775f6572615f616c776179730014050120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f662073657373696f6e7320696e646566696e6974656c792e002c2023203c7765696768743e50202d204f6e652073746f72616765207772697465302023203c2f7765696768743e5463616e63656c5f64656665727265645f736c617368080c65726120457261496e64657834736c6173685f696e6469636573205665633c7533323e1c45012043616e63656c20656e6163746d656e74206f66206120646566657272656420736c6173682e2043616e2062652063616c6c6564206279206569746865722074686520726f6f74206f726967696e206f7270207468652060543a3a536c61736843616e63656c4f726967696e602e05012070617373696e67207468652065726120616e6420696e6469636573206f662074686520736c617368657320666f7220746861742065726120746f206b696c6c2e002c2023203c7765696768743e54202d204f6e652073746f726167652077726974652e302023203c2f7765696768743e187265626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e18e0205265626f6e64206120706f7274696f6e206f6620746865207374617368207363686564756c656420746f20626520756e6c6f636b65642e002c2023203c7765696768743ef0202d2054696d6520636f6d706c65786974793a204f2831292e20426f756e64656420627920604d41585f554e4c4f434b494e475f4348554e4b53602ef4202d2053746f72616765206368616e6765733a2043616e277420696e6372656173652073746f726167652c206f6e6c792064656372656173652069742e302023203c2f7765696768743e010c18526577617264081c42616c616e63651c42616c616e636508510120416c6c2076616c696461746f72732068617665206265656e207265776172646564206279207468652066697273742062616c616e63653b20746865207365636f6e64206973207468652072656d61696e6465728c2066726f6d20746865206d6178696d756d20616d6f756e74206f66207265776172642e14536c61736808244163636f756e7449641c42616c616e6365042501204f6e652076616c696461746f722028616e6420697473206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e684f6c64536c617368696e675265706f7274446973636172646564043053657373696f6e496e646578081d0120416e206f6c6420736c617368696e67207265706f72742066726f6d2061207072696f72206572612077617320646973636172646564206265636175736520697420636f756c6448206e6f742062652070726f6365737365642e083853657373696f6e735065724572613053657373696f6e496e64657810060000000470204e756d626572206f662073657373696f6e7320706572206572612e3c426f6e64696e674475726174696f6e20457261496e64657810a002000004e4204e756d626572206f6620657261732074686174207374616b65642066756e6473206d7573742072656d61696e20626f6e64656420666f722e28344e6f74436f6e74726f6c6c65720468204e6f74206120636f6e74726f6c6c6572206163636f756e742e204e6f7453746173680454204e6f742061207374617368206163636f756e742e34416c7265616479426f6e646564046420537461736820697320616c726561647920626f6e6465642e34416c7265616479506169726564047820436f6e74726f6c6c657220697320616c7265616479207061697265642e30456d70747954617267657473046420546172676574732063616e6e6f7420626520656d7074792e384475706c6963617465496e6465780444204475706c696361746520696e6465782e44496e76616c6964536c617368496e646578048820536c617368207265636f726420696e646578206f7574206f6620626f756e64732e44496e73756666696369656e7456616c756504cc2043616e206e6f7420626f6e6420776974682076616c7565206c657373207468616e206d696e696d756d2062616c616e63652e304e6f4d6f72654368756e6b7304942043616e206e6f74207363686564756c65206d6f726520756e6c6f636b206368756e6b732e344e6f556e6c6f636b4368756e6b04a42043616e206e6f74207265626f6e6420776974686f757420756e6c6f636b696e67206368756e6b732e1c53657373696f6e011c53657373696f6e1c2856616c696461746f727301004c5665633c543a3a56616c696461746f7249643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3043757272656e74496e64657801003053657373696f6e496e646578100000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e345175657565644368616e676564010010626f6f6c040008390120547275652069662074686520756e6465726c79696e672065636f6e6f6d6963206964656e746974696573206f7220776569676874696e6720626568696e64207468652076616c696461746f7273a420686173206368616e67656420696e20746865207175657565642076616c696461746f72207365742e285175657565644b6579730100785665633c28543a3a56616c696461746f7249642c20543a3a4b657973293e0400083d012054686520717565756564206b65797320666f7220746865206e6578742073657373696f6e2e205768656e20746865206e6578742073657373696f6e20626567696e732c207468657365206b657973e02077696c6c206265207573656420746f2064657465726d696e65207468652076616c696461746f7227732073657373696f6e206b6579732e4844697361626c656456616c696461746f72730100205665633c7533323e04000c8020496e6469636573206f662064697361626c65642076616c696461746f72732e003501205468652073657420697320636c6561726564207768656e20606f6e5f73657373696f6e5f656e64696e67602072657475726e732061206e657720736574206f66206964656e7469746965732e204e6578744b6579730002051c5665633c75383e38543a3a56616c696461746f7249641c543a3a4b657973010400109c20546865206e6578742073657373696f6e206b65797320666f7220612076616c696461746f722e00590120546865206669727374206b657920697320616c77617973206044454455505f4b45595f5052454649586020746f206861766520616c6c20746865206461746120696e207468652073616d65206272616e6368206f6661012074686520747269652e20486176696e6720616c6c206461746120696e207468652073616d65206272616e63682073686f756c642070726576656e7420736c6f77696e6720646f776e206f7468657220717565726965732e204b65794f776e65720002051c5665633c75383e50284b65795479706549642c205665633c75383e2938543a3a56616c696461746f72496401040010250120546865206f776e6572206f662061206b65792e20546865207365636f6e64206b65792069732074686520604b657954797065496460202b2074686520656e636f646564206b65792e00590120546865206669727374206b657920697320616c77617973206044454455505f4b45595f5052454649586020746f206861766520616c6c20746865206461746120696e207468652073616d65206272616e6368206f6661012074686520747269652e20486176696e6720616c6c206461746120696e207468652073616d65206272616e63682073686f756c642070726576656e7420736c6f77696e6720646f776e206f7468657220717565726965732e0104207365745f6b65797308106b6579731c543a3a4b6579731470726f6f661c5665633c75383e28e42053657473207468652073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c657220746f20606b6579602e210120416c6c6f777320616e206163636f756e7420746f20736574206974732073657373696f6e206b6579207072696f7220746f206265636f6d696e6720612076616c696461746f722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743e88202d204f286c6f67206e2920696e206e756d626572206f66206163636f756e74732e58202d204f6e6520657874726120444220656e7472792e302023203c2f7765696768743e0104284e657753657373696f6e043053657373696f6e496e646578085501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e74206973207468652073657373696f6e20696e6465782c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e044044454455505f4b45595f50524546495814265b75385d38343a73657373696f6e3a6b6579730865012055736564206173206669727374206b657920666f7220604e6578744b6579736020616e6420604b65794f776e65726020746f2070757420616c6c20746865206461746120696e746f207468652073616d65206272616e636834206f662074686520747269652e0c30496e76616c696450726f6f66046420496e76616c6964206f776e6572736869702070726f6f662e5c4e6f4173736f63696174656456616c696461746f72496404a0204e6f206173736f6369617465642076616c696461746f7220494420666f72206163636f756e742e344475706c6963617465644b657904682052656769737465726564206475706c6963617465206b65792e2444656d6f6372616379012444656d6f6372616379403c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f707301009c5665633c2850726f70496e6465782c20543a3a486173682c20543a3a4163636f756e744964293e040004210120546865207075626c69632070726f706f73616c732e20556e736f727465642e20546865207365636f6e64206974656d206973207468652070726f706f73616c277320686173682e24507265696d616765730001011c543a3a48617368d4285665633c75383e2c20543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d62657229000400086101204d6170206f662068617368657320746f207468652070726f706f73616c20707265696d6167652c20616c6f6e6720776974682077686f207265676973746572656420697420616e64207468656972206465706f7369742ee42054686520626c6f636b206e756d6265722069732074686520626c6f636b20617420776869636820697420776173206465706f73697465642e244465706f7369744f660001012450726f70496e646578842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e2900040004842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e344c6f77657374556e62616b656401003c5265666572656e64756d496e646578100000000008250120546865206c6f77657374207265666572656e64756d20696e64657820726570726573656e74696e6720616e20756e62616b6564207265666572656e64756d2e20457175616c20746fdc20605265666572656e64756d436f756e74602069662074686572652069736e2774206120756e62616b6564207265666572656e64756d2e405265666572656e64756d496e666f4f660001013c5265666572656e64756d496e6465789c5265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a486173683e00040004b420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e34446973706174636851756575650100bc5665633c28543a3a426c6f636b4e756d6265722c20543a3a486173682c205265666572656e64756d496e646578293e0400044101205175657565206f66207375636365737366756c207265666572656e646120746f20626520646973706174636865642e2053746f726564206f72646572656420627920626c6f636b206e756d6265722e24566f74657273466f720101013c5265666572656e64756d496e646578445665633c543a3a4163636f756e7449643e00040004a4204765742074686520766f7465727320666f72207468652063757272656e742070726f706f73616c2e18566f74654f660101017c285265666572656e64756d496e6465782c20543a3a4163636f756e7449642910566f7465000400106101204765742074686520766f746520696e206120676976656e207265666572656e64756d206f66206120706172746963756c617220766f7465722e2054686520726573756c74206973206d65616e696e6766756c206f6e6c794d012069662060766f746572735f666f726020696e636c756465732074686520766f746572207768656e2063616c6c6564207769746820746865207265666572656e64756d2028796f75276c6c20676574207468655d012064656661756c742060566f7465602076616c7565206f7468657277697365292e20496620796f7520646f6e27742077616e7420746f20636865636b2060766f746572735f666f72602c207468656e20796f752063616ef420616c736f20636865636b20666f722073696d706c65206578697374656e636520776974682060566f74654f663a3a657869737473602066697273742e1450726f787900010130543a3a4163636f756e74496430543a3a4163636f756e7449640004000831012057686f2069732061626c6520746f20766f746520666f722077686f6d2e2056616c7565206973207468652066756e642d686f6c64696e67206163636f756e742c206b6579206973207468658820766f74652d7472616e73616374696f6e2d73656e64696e67206163636f756e742e2c44656c65676174696f6e7301010130543a3a4163636f756e7449646828543a3a4163636f756e7449642c20436f6e76696374696f6e2901840000000000000000000000000000000000000000000000000000000000000000000441012047657420746865206163636f756e742028616e64206c6f636b20706572696f64732920746f20776869636820616e6f74686572206163636f756e742069732064656c65676174696e6720766f74652e544c6173745461626c656457617345787465726e616c010010626f6f6c0400085901205472756520696620746865206c617374207265666572656e64756d207461626c656420776173207375626d69747465642065787465726e616c6c792e2046616c7365206966206974207761732061207075626c6963282070726f706f73616c2e304e65787445787465726e616c00006028543a3a486173682c20566f74655468726573686f6c6429040010590120546865207265666572656e64756d20746f206265207461626c6564207768656e6576657220697420776f756c642062652076616c696420746f207461626c6520616e2065787465726e616c2070726f706f73616c2e550120546869732068617070656e73207768656e2061207265666572656e64756d206e6565647320746f206265207461626c656420616e64206f6e65206f662074776f20636f6e646974696f6e7320617265206d65743aa4202d20604c6173745461626c656457617345787465726e616c60206973206066616c7365603b206f7268202d20605075626c696350726f70736020697320656d7074792e24426c61636b6c6973740001011c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290004000851012041207265636f7264206f662077686f207665746f656420776861742e204d6170732070726f706f73616c206861736820746f206120706f737369626c65206578697374656e7420626c6f636b206e756d626572e82028756e74696c207768656e206974206d6179206e6f742062652072657375626d69747465642920616e642077686f207665746f65642069742e3443616e63656c6c6174696f6e730101011c543a3a4861736810626f6f6c000400042901205265636f7264206f6620616c6c2070726f706f73616c7320746861742068617665206265656e207375626a65637420746f20656d657267656e63792063616e63656c6c6174696f6e2e01541c70726f706f7365083470726f706f73616c5f686173681c543a3a486173681476616c756554436f6d706163743c42616c616e63654f663c543e3e18a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e002c2023203c7765696768743e20202d204f2831292e80202d2054776f204442206368616e6765732c206f6e6520444220656e7472792e302023203c2f7765696768743e187365636f6e64042070726f706f73616c48436f6d706163743c50726f70496e6465783e18a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e002c2023203c7765696768743e20202d204f2831292e40202d204f6e6520444220656e7472792e302023203c2f7765696768743e10766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f746510566f74651c350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e002c2023203c7765696768743e20202d204f2831292e7c202d204f6e65204442206368616e67652c206f6e6520444220656e7472792e302023203c2f7765696768743e2870726f78795f766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f746510566f74651c510120566f746520696e2061207265666572656e64756d206f6e20626568616c66206f6620612073746173682e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374f4207468652070726f706f73616c3b206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e002c2023203c7765696768743e20202d204f2831292e7c202d204f6e65204442206368616e67652c206f6e6520444220656e7472792e302023203c2f7765696768743e40656d657267656e63795f63616e63656c04247265665f696e6465783c5265666572656e64756d496e646578085101205363686564756c6520616e20656d657267656e63792063616e63656c6c6174696f6e206f662061207265666572656e64756d2e2043616e6e6f742068617070656e20747769636520746f207468652073616d6530207265666572656e64756d2e4065787465726e616c5f70726f706f7365043470726f706f73616c5f686173681c543a3a48617368083101205363686564756c652061207265666572656e64756d20746f206265207461626c6564206f6e6365206974206973206c6567616c20746f207363686564756c6520616e2065787465726e616c30207265666572656e64756d2e6465787465726e616c5f70726f706f73655f6d616a6f72697479043470726f706f73616c5f686173681c543a3a48617368145901205363686564756c652061206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f207363686564756c656020616e2065787465726e616c207265666572656e64756d2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e6065787465726e616c5f70726f706f73655f64656661756c74043470726f706f73616c5f686173681c543a3a48617368144901205363686564756c652061206e656761746976652d7475726e6f75742d62696173207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f84207363686564756c6520616e2065787465726e616c207265666572656e64756d2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e28666173745f747261636b0c3470726f706f73616c5f686173681c543a3a4861736834766f74696e675f706572696f6438543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d626572245101205363686564756c65207468652063757272656e746c792065787465726e616c6c792d70726f706f736564206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564650120696d6d6564696174656c792e204966207468657265206973206e6f2065787465726e616c6c792d70726f706f736564207265666572656e64756d2063757272656e746c792c206f72206966207468657265206973206f6e65ec20627574206974206973206e6f742061206d616a6f726974792d63617272696573207265666572656e64756d207468656e206974206661696c732e00f8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652063757272656e742065787465726e616c2070726f706f73616c2e6101202d2060766f74696e675f706572696f64603a2054686520706572696f64207468617420697320616c6c6f77656420666f7220766f74696e67206f6e20746869732070726f706f73616c2e20496e6372656173656420746f9820202060456d657267656e6379566f74696e67506572696f646020696620746f6f206c6f772e5501202d206064656c6179603a20546865206e756d626572206f6620626c6f636b20616674657220766f74696e672068617320656e64656420696e20617070726f76616c20616e6420746869732073686f756c64206265bc202020656e61637465642e205468697320646f65736e277420686176652061206d696e696d756d20616d6f756e742e347665746f5f65787465726e616c043470726f706f73616c5f686173681c543a3a4861736804bc205665746f20616e6420626c61636b6c697374207468652065787465726e616c2070726f706f73616c20686173682e4463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e04542052656d6f76652061207265666572656e64756d2e3463616e63656c5f717565756564041477686963683c5265666572656e64756d496e64657804a02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e247365745f70726f7879041470726f787930543a3a4163636f756e7449641498205370656369667920612070726f78792e2043616c6c6564206279207468652073746173682e002c2023203c7765696768743e58202d204f6e6520657874726120444220656e7472792e302023203c2f7765696768743e3072657369676e5f70726f787900149820436c656172207468652070726f78792e2043616c6c6564206279207468652070726f78792e002c2023203c7765696768743e40202d204f6e6520444220636c6561722e302023203c2f7765696768743e3072656d6f76655f70726f7879041470726f787930543a3a4163636f756e744964149820436c656172207468652070726f78792e2043616c6c6564206279207468652073746173682e002c2023203c7765696768743e40202d204f6e6520444220636c6561722e302023203c2f7765696768743e2064656c65676174650808746f30543a3a4163636f756e74496428636f6e76696374696f6e28436f6e76696374696f6e143c2044656c656761746520766f74652e002c2023203c7765696768743e58202d204f6e6520657874726120444220656e7472792e302023203c2f7765696768743e28756e64656c656761746500144420556e64656c656761746520766f74652e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e58636c6561725f7075626c69635f70726f706f73616c7300040101205665746f20616e6420626c61636b6c697374207468652070726f706f73616c20686173682e204d7573742062652066726f6d20526f6f74206f726967696e2e346e6f74655f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e0861012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e205468697320646f65736e27742072657175697265207468652070726f706f73616c20746f206265250120696e207468652064697370617463682071756575652062757420646f657320726571756972652061206465706f7369742c2072657475726e6564206f6e636520656e61637465642e586e6f74655f696d6d696e656e745f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e0845012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e2054686973207265717569726573207468652070726f706f73616c20746f206265b420696e207468652064697370617463682071756575652e204e6f206465706f736974206973206e65656465642e34726561705f707265696d616765043470726f706f73616c5f686173681c543a3a4861736814f42052656d6f766520616e20657870697265642070726f706f73616c20707265696d61676520616e6420636f6c6c65637420746865206465706f7369742e00510120546869732077696c6c206f6e6c7920776f726b2061667465722060566f74696e67506572696f646020626c6f636b732066726f6d207468652074696d6520746861742074686520707265696d616765207761735d01206e6f7465642c2069662069742773207468652073616d65206163636f756e7420646f696e672069742e2049662069742773206120646966666572656e74206163636f756e742c207468656e206974276c6c206f6e6c79b020776f726b20616e206164646974696f6e616c2060456e6163746d656e74506572696f6460206c617465722e01402050726f706f736564082450726f70496e6465781c42616c616e636504c02041206d6f74696f6e20686173206265656e2070726f706f7365642062792061207075626c6963206163636f756e742e185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e04dc2041207075626c69632070726f706f73616c20686173206265656e207461626c656420666f72207265666572656e64756d20766f74652e3845787465726e616c5461626c656400049820416e2065787465726e616c2070726f706f73616c20686173206265656e207461626c65642e1c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c6404602041207265666572656e64756d2068617320626567756e2e18506173736564043c5265666572656e64756d496e64657804b020412070726f706f73616c20686173206265656e20617070726f766564206279207265666572656e64756d2e244e6f74506173736564043c5265666572656e64756d496e64657804b020412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e2443616e63656c6c6564043c5265666572656e64756d496e64657804842041207265666572656e64756d20686173206265656e2063616e63656c6c65642e204578656375746564083c5265666572656e64756d496e64657810626f6f6c047420412070726f706f73616c20686173206265656e20656e61637465642e2444656c65676174656408244163636f756e744964244163636f756e74496404e020416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e2c556e64656c65676174656404244163636f756e74496404e820416e206163636f756e74206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e185665746f65640c244163636f756e74496410486173682c426c6f636b4e756d626572049820416e2065787465726e616c2070726f706f73616c20686173206265656e207665746f65642e34507265696d6167654e6f7465640c1048617368244163636f756e7449641c42616c616e636504e020412070726f706f73616c277320707265696d61676520776173206e6f7465642c20616e6420746865206465706f7369742074616b656e2e30507265696d616765557365640c1048617368244163636f756e7449641c42616c616e636504150120412070726f706f73616c20707265696d616765207761732072656d6f76656420616e6420757365642028746865206465706f736974207761732072657475726e6564292e3c507265696d616765496e76616c69640810486173683c5265666572656e64756d496e646578040d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d6167652077617320696e76616c69642e3c507265696d6167654d697373696e670810486173683c5265666572656e64756d496e646578040d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d61676520776173206d697373696e672e38507265696d616765526561706564101048617368244163636f756e7449641c42616c616e6365244163636f756e744964045d012041207265676973746572656420707265696d616765207761732072656d6f76656420616e6420746865206465706f73697420636f6c6c6563746564206279207468652072656170657220286c617374206974656d292e1c3c456e6163746d656e74506572696f6438543a3a426c6f636b4e756d62657210002f0d0014710120546865206d696e696d756d20706572696f64206f66206c6f636b696e6720616e642074686520706572696f64206265747765656e20612070726f706f73616c206265696e6720617070726f76656420616e6420656e61637465642e0031012049742073686f756c642067656e6572616c6c792062652061206c6974746c65206d6f7265207468616e2074686520756e7374616b6520706572696f6420746f20656e737572652074686174690120766f74696e67207374616b657273206861766520616e206f70706f7274756e69747920746f2072656d6f7665207468656d73656c7665732066726f6d207468652073797374656d20696e2074686520636173652077686572659c207468657920617265206f6e20746865206c6f73696e672073696465206f66206120766f74652e304c61756e6368506572696f6438543a3a426c6f636b4e756d62657210004e0c0004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e30566f74696e67506572696f6438543a3a426c6f636b4e756d62657210004e0c0004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e384d696e696d756d4465706f7369743042616c616e63654f663c543e400000c16ff2862300000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e54456d657267656e6379566f74696e67506572696f6438543a3a426c6f636b4e756d626572108051010004ec204d696e696d756d20766f74696e6720706572696f6420616c6c6f77656420666f7220616e20656d657267656e6379207265666572656e64756d2e34436f6f6c6f6666506572696f6438543a3a426c6f636b4e756d62657210004e0c0004610120506572696f6420696e20626c6f636b7320776865726520616e2065787465726e616c2070726f706f73616c206d6179206e6f742062652072652d7375626d6974746564206166746572206265696e67207665746f65642e4c507265696d616765427974654465706f7369743042616c616e63654f663c543e400010a5d4e800000000000000000000000429012054686520616d6f756e74206f662062616c616e63652074686174206d757374206265206465706f7369746564207065722062797465206f6620707265696d6167652073746f7265642e582056616c75654c6f7704382056616c756520746f6f206c6f773c50726f706f73616c4d697373696e6704602050726f706f73616c20646f6573206e6f74206578697374204e6f7450726f78790430204e6f7420612070726f787920426164496e646578043820556e6b6e6f776e20696e6465783c416c726561647943616e63656c656404982043616e6e6f742063616e63656c207468652073616d652070726f706f73616c207477696365444475706c696361746550726f706f73616c04582050726f706f73616c20616c7265616479206d6164654c50726f706f73616c426c61636b6c6973746564046c2050726f706f73616c207374696c6c20626c61636b6c6973746564444e6f7453696d706c654d616a6f7269747904ac204e6578742065787465726e616c2070726f706f73616c206e6f742073696d706c65206d616a6f726974792c496e76616c696448617368043420496e76616c69642068617368284e6f50726f706f73616c0454204e6f2065787465726e616c2070726f706f73616c34416c72656164795665746f6564049c204964656e74697479206d6179206e6f74207665746f20612070726f706f73616c20747769636530416c726561647950726f7879044020416c726561647920612070726f78792857726f6e6750726f787904302057726f6e672070726f7879304e6f7444656c6567617465640438204e6f742064656c656761746564444475706c6963617465507265696d616765045c20507265696d61676520616c7265616479206e6f7465642c4e6f74496d6d696e656e740434204e6f7420696d6d696e656e74144561726c79042820546f6f206561726c7920496d6d696e656e74042420496d6d696e656e743c507265696d6167654d697373696e67044c20507265696d616765206e6f7420666f756e64445265666572656e64756d496e76616c6964048820566f746520676976656e20666f7220696e76616c6964207265666572656e64756d3c507265696d616765496e76616c6964044420496e76616c696420707265696d6167652c4e6f6e6557616974696e670454204e6f2070726f706f73616c732077616974696e671c436f756e63696c014c496e7374616e636531436f6c6c656374697665142450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001011c543a3a48617368643c542061732054726169743c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001011c543a3a486173684c566f7465733c543a3a4163636f756e7449643e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e01102c7365745f6d656d62657273042c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e105101205365742074686520636f6c6c6563746976652773206d656d62657273686970206d616e75616c6c7920746f20606e65775f6d656d62657273602e204265206e69636520746f2074686520636861696e20616e645c2070726f76696465206974207072652d736f727465642e005820526571756972657320726f6f74206f726967696e2e1c65786563757465042070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e0cf420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e1c70726f706f736508247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e102c2023203c7765696768743e90202d20426f756e6465642073746f7261676520726561647320616e64207772697465732eb8202d20417267756d656e7420607468726573686f6c6460206861732062656172696e67206f6e207765696768742e302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c102c2023203c7765696768743e8c202d20426f756e6465642073746f72616765207265616420616e64207772697465732e5501202d2057696c6c20626520736c696768746c792068656176696572206966207468652070726f706f73616c20697320617070726f766564202f20646973617070726f7665642061667465722074686520766f74652e302023203c2f7765696768743e01182050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e74084d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292e14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740809012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292e20417070726f76656404104861736804c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404104861736804d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408104861736810626f6f6c0405012041206d6f74696f6e207761732065786563757465643b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e384d656d626572457865637574656408104861736810626f6f6c042d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e0018244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642148546563686e6963616c436f6d6d6974746565014c496e7374616e636532436f6c6c656374697665142450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001011c543a3a48617368643c542061732054726169743c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001011c543a3a486173684c566f7465733c543a3a4163636f756e7449643e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e01102c7365745f6d656d62657273042c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e105101205365742074686520636f6c6c6563746976652773206d656d62657273686970206d616e75616c6c7920746f20606e65775f6d656d62657273602e204265206e69636520746f2074686520636861696e20616e645c2070726f76696465206974207072652d736f727465642e005820526571756972657320726f6f74206f726967696e2e1c65786563757465042070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e0cf420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e1c70726f706f736508247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e102c2023203c7765696768743e90202d20426f756e6465642073746f7261676520726561647320616e64207772697465732eb8202d20417267756d656e7420607468726573686f6c6460206861732062656172696e67206f6e207765696768742e302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c102c2023203c7765696768743e8c202d20426f756e6465642073746f72616765207265616420616e64207772697465732e5501202d2057696c6c20626520736c696768746c792068656176696572206966207468652070726f706f73616c20697320617070726f766564202f20646973617070726f7665642061667465722074686520766f74652e302023203c2f7765696768743e01182050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e74084d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292e14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740809012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292e20417070726f76656404104861736804c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404104861736804d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408104861736810626f6f6c0405012041206d6f74696f6e207761732065786563757465643b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e384d656d626572457865637574656408104861736810626f6f6c042d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e0018244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642124456c656374696f6e73014050687261676d656e456c656374696f6e181c4d656d626572730100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e040004f0205468652063757272656e7420656c6563746564206d656d626572736869702e20536f72746564206261736564206f6e206163636f756e742069642e2452756e6e65727355700100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e0400044901205468652063757272656e742072756e6e6572735f75702e20536f72746564206261736564206f6e206c6f7720746f2068696768206d657269742028776f72736520746f20626573742072756e6e6572292e38456c656374696f6e526f756e647301000c75333210000000000441012054686520746f74616c206e756d626572206f6620766f746520726f756e6473207468617420686176652068617070656e65642c206578636c7564696e6720746865207570636f6d696e67206f6e652e1c566f7465734f6601010130543a3a4163636f756e744964445665633c543a3a4163636f756e7449643e01040004010120566f746573206f66206120706172746963756c617220766f7465722c20776974682074686520726f756e6420696e646578206f662074686520766f7465732e1c5374616b654f6601010130543a3a4163636f756e7449643042616c616e63654f663c543e0040000000000000000000000000000000000464204c6f636b6564207374616b65206f66206120766f7465722e2843616e646964617465730100445665633c543a3a4163636f756e7449643e0400086501205468652070726573656e742063616e646964617465206c6973742e20536f72746564206261736564206f6e206163636f756e742d69642e20412063757272656e74206d656d626572206f7220612072756e6e65722063616e3101206e6576657220656e746572207468697320766563746f7220616e6420697320616c7761797320696d706c696369746c7920617373756d656420746f20626520612063616e6469646174652e011810766f74650814766f746573445665633c543a3a4163636f756e7449643e1476616c756554436f6d706163743c42616c616e63654f663c543e3e3c050120566f746520666f72206120736574206f662063616e6469646174657320666f7220746865207570636f6d696e6720726f756e64206f6620656c656374696f6e2e0050205468652060766f746573602073686f756c643a482020202d206e6f7420626520656d7074792eac2020202d206265206c657373207468616e20746865206e756d626572206f662063616e646964617465732e005d012055706f6e20766f74696e672c206076616c75656020756e697473206f66206077686f6027732062616c616e6365206973206c6f636b656420616e64206120626f6e6420616d6f756e742069732072657365727665642e5d012049742069732074686520726573706f6e736962696c697479206f66207468652063616c6c657220746f206e6f7420706c61636520616c6c206f662074686569722062616c616e636520696e746f20746865206c6f636ba020616e64206b65657020736f6d6520666f722066757274686572207472616e73616374696f6e732e002c2023203c7765696768743e2c2023232323205374617465302052656164733a204f283129c8205772697465733a204f28562920676976656e2060566020766f7465732e205620697320626f756e6465642062792031362e302023203c2f7765696768743e3072656d6f76655f766f746572001c21012052656d6f766520606f726967696e60206173206120766f7465722e20546869732072656d6f76657320746865206c6f636b20616e642072657475726e732074686520626f6e642e002c2023203c7765696768743e2c2023232323205374617465302052656164733a204f28312934205772697465733a204f283129302023203c2f7765696768743e507265706f72745f646566756e63745f766f74657204187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365345d01205265706f727420607461726765746020666f72206265696e6720616e20646566756e637420766f7465722e20496e2063617365206f6620612076616c6964207265706f72742c20746865207265706f727465722069735d012072657761726465642062792074686520626f6e6420616d6f756e74206f662060746172676574602e204f74686572776973652c20746865207265706f7274657220697473656c662069732072656d6f76656420616e645c20746865697220626f6e6420697320736c61736865642e0088204120646566756e637420766f74657220697320646566696e656420746f2062653a4d012020202d206120766f7465722077686f73652063757272656e74207375626d697474656420766f7465732061726520616c6c20696e76616c69642e20692e652e20616c6c206f66207468656d20617265206e6fb420202020206c6f6e67657220612063616e646964617465206e6f7220616e20616374697665206d656d6265722e002c2023203c7765696768743e2c202323232320537461746515012052656164733a204f284e4c6f674d2920676976656e204d2063757272656e742063616e6469646174657320616e64204e20766f74657320666f722060746172676574602e34205772697465733a204f283129302023203c2f7765696768743e407375626d69745f63616e646964616379003478205375626d6974206f6e6573656c6620666f722063616e6469646163792e006420412063616e6469646174652077696c6c206569746865723aec2020202d204c6f73652061742074686520656e64206f6620746865207465726d20616e6420666f7266656974207468656972206465706f7369742e2d012020202d2057696e20616e64206265636f6d652061206d656d6265722e204d656d626572732077696c6c206576656e7475616c6c7920676574207468656972207374617368206261636b2e55012020202d204265636f6d6520612072756e6e65722d75702e2052756e6e6572732d75707320617265207265736572766564206d656d6265727320696e2063617365206f6e65206765747320666f72636566756c6c7934202020202072656d6f7665642e002c2023203c7765696768743e2c20232323232053746174658c2052656164733a204f284c6f674e2920476976656e204e2063616e646964617465732e34205772697465733a204f283129302023203c2f7765696768743e4872656e6f756e63655f63616e646964616379002451012052656e6f756e6365206f6e65277320696e74656e74696f6e20746f20626520612063616e64696461746520666f7220746865206e65787420656c656374696f6e20726f756e642e203320706f74656e7469616c40206f7574636f6d65732065786973743a4101202d20606f726967696e6020697320612063616e64696461746520616e64206e6f7420656c656374656420696e20616e79207365742e20496e207468697320636173652c2074686520626f6e64206973f4202020756e72657365727665642c2072657475726e656420616e64206f726967696e2069732072656d6f76656420617320612063616e6469646174652e5901202d20606f726967696e6020697320612063757272656e742072756e6e65722075702e20496e207468697320636173652c2074686520626f6e6420697320756e72657365727665642c2072657475726e656420616e64842020206f726967696e2069732072656d6f76656420617320612072756e6e65722e4d01202d20606f726967696e6020697320612063757272656e74206d656d6265722e20496e207468697320636173652c2074686520626f6e6420697320756e726573657276656420616e64206f726967696e206973590120202072656d6f7665642061732061206d656d6265722c20636f6e73657175656e746c79206e6f74206265696e6720612063616e64696461746520666f7220746865206e65787420726f756e6420616e796d6f72652e650120202053696d696c617220746f205b6072656d6f76655f766f746572605d2c206966207265706c6163656d656e742072756e6e657273206578697374732c20746865792061726520696d6d6564696174656c7920757365642e3472656d6f76655f6d656d626572040c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365345d012052656d6f7665206120706172746963756c6172206d656d6265722066726f6d20746865207365742e20546869732069732065666665637469766520696d6d6564696174656c7920616e642074686520626f6e64206f668020746865206f7574676f696e67206d656d62657220697320736c61736865642e00590120496620612072756e6e65722d757020697320617661696c61626c652c207468656e2074686520626573742072756e6e65722d75702077696c6c2062652072656d6f76656420616e64207265706c6163657320746865f4206f7574676f696e67206d656d6265722e204f74686572776973652c2061206e65772070687261676d656e20726f756e6420697320737461727465642e004501204e6f74652074686174207468697320646f6573206e6f7420616666656374207468652064657369676e6174656420626c6f636b206e756d626572206f6620746865206e65787420656c656374696f6e2e002c2023203c7765696768743e2c2023232323205374617465582052656164733a204f28646f5f70687261676d656e295c205772697465733a204f28646f5f70687261676d656e29302023203c2f7765696768743e01141c4e65775465726d04645665633c284163636f756e7449642c2042616c616e6365293e0855012041206e6577207465726d2077697468206e6577206d656d626572732e205468697320696e64696361746573207468617420656e6f7567682063616e6469646174657320657869737465642c206e6f742074686174450120656e6f756768206861766520686173206265656e20656c65637465642e2054686520696e6e65722076616c7565206d757374206265206578616d696e656420666f72207468697320707572706f73652e24456d7074795465726d0004d8204e6f20286f72206e6f7420656e6f756768292063616e64696461746573206578697374656420666f72207468697320726f756e642e304d656d6265724b69636b656404244163636f756e7449640845012041206d656d62657220686173206265656e2072656d6f7665642e20546869732073686f756c6420616c7761797320626520666f6c6c6f7765642062792065697468657220604e65775465726d60206f74342060456d7074795465726d602e3c4d656d62657252656e6f756e63656404244163636f756e74496404a02041206d656d626572206861732072656e6f756e6365642074686569722063616e6469646163792e34566f7465725265706f727465640c244163636f756e744964244163636f756e74496410626f6f6c086101204120766f7465722028666972737420656c656d656e742920776173207265706f72746564202862797420746865207365636f6e6420656c656d656e742920776974682074686520746865207265706f7274206265696e678c207375636365737366756c206f72206e6f742028746869726420656c656d656e74292e143443616e646964616379426f6e643042616c616e63654f663c543e400080c6a47e8d030000000000000000000028566f74696e67426f6e643042616c616e63654f663c543e4000407a10f35a000000000000000000000038446573697265644d656d626572730c753332100d00000000404465736972656452756e6e65727355700c753332100700000000305465726d4475726174696f6e38543a3a426c6f636b4e756d6265721080130300003830556e61626c65546f566f746504c42043616e6e6f7420766f7465207768656e206e6f2063616e64696461746573206f72206d656d626572732065786973742e1c4e6f566f7465730498204d75737420766f746520666f72206174206c65617374206f6e652063616e6469646174652e30546f6f4d616e79566f74657304882043616e6e6f7420766f7465206d6f7265207468616e2063616e646964617465732e504d6178696d756d566f7465734578636565646564049c2043616e6e6f7420766f7465206d6f7265207468616e206d6178696d756d20616c6c6f7765642e284c6f7742616c616e636504c82043616e6e6f7420766f74652077697468207374616b65206c657373207468616e206d696e696d756d2062616c616e63652e3c556e61626c65546f506179426f6e64047c20566f7465722063616e206e6f742070617920766f74696e6720626f6e642e2c4d7573744265566f7465720444204d757374206265206120766f7465722e285265706f727453656c6604502043616e6e6f74207265706f72742073656c662e4c4475706c69636174656443616e6469646174650484204475706c6963617465642063616e646964617465207375626d697373696f6e2e304d656d6265725375626d6974048c204d656d6265722063616e6e6f742072652d7375626d69742063616e6469646163792e3052756e6e65725375626d6974048c2052756e6e65722063616e6e6f742072652d7375626d69742063616e6469646163792e68496e73756666696369656e7443616e64696461746546756e647304982043616e64696461746520646f6573206e6f74206861766520656e6f7567682066756e64732e34496e76616c69644f726967696e04c8204f726967696e206973206e6f7420612063616e6469646174652c206d656d626572206f7220612072756e6e65722075702e244e6f744d656d6265720438204e6f742061206d656d6265722e4c546563686e6963616c4d656d62657273686970014c496e7374616e6365314d656d62657273686970041c4d656d626572730100445665633c543a3a4163636f756e7449643e040004c8205468652063757272656e74206d656d626572736869702c2073746f72656420617320616e206f726465726564205665632e0114286164645f6d656d626572040c77686f30543a3a4163636f756e7449640c7c204164642061206d656d626572206077686f6020746f20746865207365742e00b4204d6179206f6e6c792062652063616c6c65642066726f6d20604164644f726967696e60206f7220726f6f742e3472656d6f76655f6d656d626572040c77686f30543a3a4163636f756e7449640c902052656d6f76652061206d656d626572206077686f602066726f6d20746865207365742e00c0204d6179206f6e6c792062652063616c6c65642066726f6d206052656d6f76654f726967696e60206f7220726f6f742e2c737761705f6d656d626572081872656d6f766530543a3a4163636f756e7449640c61646430543a3a4163636f756e7449640cc02053776170206f7574206f6e65206d656d626572206072656d6f76656020666f7220616e6f746865722060616464602e00b8204d6179206f6e6c792062652063616c6c65642066726f6d2060537761704f726967696e60206f7220726f6f742e3472657365745f6d656d62657273041c6d656d62657273445665633c543a3a4163636f756e7449643e105901204368616e676520746865206d656d6265727368697020746f2061206e6577207365742c20646973726567617264696e6720746865206578697374696e67206d656d626572736869702e204265206e69636520616e646c207061737320606d656d6265727360207072652d736f727465642e00bc204d6179206f6e6c792062652063616c6c65642066726f6d206052657365744f726967696e60206f7220726f6f742e286368616e67655f6b6579040c6e657730543a3a4163636f756e7449640cd82053776170206f7574207468652073656e64696e67206d656d62657220666f7220736f6d65206f74686572206b657920606e6577602e00f4204d6179206f6e6c792062652063616c6c65642066726f6d20605369676e656460206f726967696e206f6620612063757272656e74206d656d6265722e01182c4d656d62657241646465640004e42054686520676976656e206d656d626572207761732061646465643b2073656520746865207472616e73616374696f6e20666f722077686f2e344d656d62657252656d6f7665640004ec2054686520676976656e206d656d626572207761732072656d6f7665643b2073656520746865207472616e73616374696f6e20666f722077686f2e384d656d62657273537761707065640004dc2054776f206d656d62657273207765726520737761707065643b2073656520746865207472616e73616374696f6e20666f722077686f2e304d656d6265727352657365740004190120546865206d656d62657273686970207761732072657365743b2073656520746865207472616e73616374696f6e20666f722077686f20746865206e6577207365742069732e284b65794368616e676564000488204f6e65206f6620746865206d656d6265727327206b657973206368616e6765642e1444756d6d7904bc73705f7374643a3a6d61726b65723a3a5068616e746f6d446174613c284163636f756e7449642c204576656e74293e0470205068616e746f6d206d656d6265722c206e6576657220757365642e00003c46696e616c697479547261636b65720001042866696e616c5f68696e74041068696e745c436f6d706163743c543a3a426c6f636b4e756d6265723e08f42048696e7420746861742074686520617574686f72206f66207468697320626c6f636b207468696e6b732074686520626573742066696e616c697a65646c20626c6f636b2069732074686520676976656e206e756d6265722e00082857696e646f7753697a6538543a3a426c6f636b4e756d626572106500000004190120546865206e756d626572206f6620726563656e742073616d706c657320746f206b6565702066726f6d207468697320636861696e2e2044656661756c74206973203130312e345265706f72744c6174656e637938543a3a426c6f636b4e756d62657210e8030000041d01205468652064656c617920616674657220776869636820706f696e74207468696e6773206265636f6d6520737573706963696f75732e2044656661756c7420697320313030302e0838416c72656164795570646174656404c82046696e616c2068696e74206d7573742062652075706461746564206f6e6c79206f6e636520696e2074686520626c6f636b1c42616448696e7404902046696e616c697a6564206865696768742061626f766520626c6f636b206e756d6265721c4772616e647061013c4772616e64706146696e616c6974791c2c417574686f726974696573010034417574686f726974794c6973740400102c20444550524543415445440061012054686973207573656420746f2073746f7265207468652063757272656e7420617574686f72697479207365742c20776869636820686173206265656e206d6967726174656420746f207468652077656c6c2d6b6e6f776e94204752414e4450415f415554484f52495445535f4b455920756e686173686564206b65792e14537461746501006c53746f72656453746174653c543a3a426c6f636b4e756d6265723e04000490205374617465206f66207468652063757272656e7420617574686f72697479207365742e3450656e64696e674368616e676500008c53746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265723e040004c42050656e64696e67206368616e67653a20287369676e616c65642061742c207363686564756c6564206368616e6765292e284e657874466f72636564000038543a3a426c6f636b4e756d626572040004bc206e65787420626c6f636b206e756d6265722077686572652077652063616e20666f7263652061206368616e67652e1c5374616c6c656400008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d626572290400049020607472756560206966207765206172652063757272656e746c79207374616c6c65642e3043757272656e7453657449640100145365744964200000000000000000085d0120546865206e756d626572206f66206368616e6765732028626f746820696e207465726d73206f66206b65797320616e6420756e6465726c79696e672065636f6e6f6d696320726573706f6e736962696c697469657329c420696e20746865202273657422206f66204772616e6470612076616c696461746f72732066726f6d2067656e657369732e30536574496453657373696f6e0001011453657449643053657373696f6e496e64657800040004c1012041206d617070696e672066726f6d206772616e6470612073657420494420746f2074686520696e646578206f6620746865202a6d6f737420726563656e742a2073657373696f6e20666f7220776869636820697473206d656d62657273207765726520726573706f6e7369626c652e0104487265706f72745f6d69736265686176696f72041c5f7265706f72741c5665633c75383e0464205265706f727420736f6d65206d69736265686176696f722e010c384e6577417574686f7269746965730434417574686f726974794c6973740490204e657720617574686f726974792073657420686173206265656e206170706c6965642e1850617573656400049c2043757272656e7420617574686f726974792073657420686173206265656e207061757365642e1c526573756d65640004a02043757272656e7420617574686f726974792073657420686173206265656e20726573756d65642e00102c50617573654661696c656408090120417474656d707420746f207369676e616c204752414e445041207061757365207768656e2074686520617574686f72697479207365742069736e2774206c697665a8202865697468657220706175736564206f7220616c72656164792070656e64696e67207061757365292e30526573756d654661696c656408150120417474656d707420746f207369676e616c204752414e44504120726573756d65207768656e2074686520617574686f72697479207365742069736e277420706175736564a42028656974686572206c697665206f7220616c72656164792070656e64696e6720726573756d65292e344368616e676550656e64696e6704ec20417474656d707420746f207369676e616c204752414e445041206368616e67652077697468206f6e6520616c72656164792070656e64696e672e1c546f6f536f6f6e04c02043616e6e6f74207369676e616c20666f72636564206368616e676520736f20736f6f6e206166746572206c6173742e20547265617375727901205472656173757279143450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c730001013450726f706f73616c496e6465789050726f706f73616c3c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100485665633c50726f706f73616c496e6465783e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e10546970730001051c543a3a48617368f04f70656e5469703c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265722c20543a3a486173683e0004000c59012054697073207468617420617265206e6f742079657420636f6d706c657465642e204b65796564206279207468652068617368206f66206028726561736f6e2c2077686f29602066726f6d207468652076616c75652e3d012054686973206861732074686520696e73656375726520656e756d657261626c6520686173682066756e6374696f6e2073696e636520746865206b657920697473656c6620697320616c7265616479802067756172616e7465656420746f20626520612073656375726520686173682e1c526561736f6e730001051c543a3a486173681c5665633c75383e0004000849012053696d706c6520707265696d616765206c6f6f6b75702066726f6d2074686520726561736f6e2773206861736820746f20746865206f726967696e616c20646174612e20416761696e2c2068617320616e610120696e73656375726520656e756d657261626c6520686173682073696e636520746865206b65792069732067756172616e7465656420746f2062652074686520726573756c74206f6620612073656375726520686173682e01203470726f706f73655f7370656e64081476616c756554436f6d706163743c42616c616e63654f663c543e3e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365242d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e94202d204f6e65204442206368616e67652c206f6e6520657874726120444220656e7472792e302023203c2f7765696768743e3c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e1cfc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e40202d204f6e6520444220636c6561722e302023203c2f7765696768743e40617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e205d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e387265706f72745f617765736f6d650818726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e7449644c5d01205265706f727420736f6d657468696e672060726561736f6e60207468617420646573657276657320612074697020616e6420636c61696d20616e79206576656e7475616c207468652066696e6465722773206665652e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c206173d420605469705265706f72744465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743e9c202d20604f2852296020776865726520605260206c656e677468206f662060726561736f6e602e64202d204f6e652062616c616e6365206f7065726174696f6e2e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e2c726574726163745f7469700410686173681c543a3a486173684c550120526574726163742061207072696f72207469702d7265706f72742066726f6d20607265706f72745f617765736f6d65602c20616e642063616e63656c207468652070726f63657373206f662074697070696e672e00e0204966207375636365737366756c2c20746865206f726967696e616c206465706f7369742077696c6c20626520756e72657365727665642e00510120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642074686520746970206964656e746966696564206279206068617368604501206d7573742068617665206265656e207265706f7274656420627920746865207369676e696e67206163636f756e74207468726f75676820607265706f72745f617765736f6d65602028616e64206e6f7450207468726f75676820607469705f6e657760292e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e009020456d697473206054697052657472616374656460206966207375636365737366756c2e002c2023203c7765696768743e24202d20604f2854296064202d204f6e652062616c616e6365206f7065726174696f6e2ec4202d2054776f2073746f726167652072656d6f76616c7320286f6e6520726561642c20636f64656320604f28542960292e34202d204f6e65206576656e742e302023203c2f7765696768743e1c7469705f6e65770c18726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e744964247469705f76616c75653042616c616e63654f663c543e4cf4204769766520612074697020666f7220736f6d657468696e67206e65773b206e6f2066696e6465722773206665652077696c6c2062652074616b656e2e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743e4101202d20604f2852202b2054296020776865726520605260206c656e677468206f662060726561736f6e602c2060546020697320746865206e756d626572206f6620746970706572732e2060546020697345012020206e61747572616c6c79206361707065642061732061206d656d62657273686970207365742c20605260206973206c696d69746564207468726f756768207472616e73616374696f6e2d73697a652e0d01202d2054776f2073746f7261676520696e73657274696f6e732028636f6465637320604f285229602c20604f28542960292c206f6e65207265616420604f283129602e34202d204f6e65206576656e742e302023203c2f7765696768743e0c7469700810686173681c543a3a48617368247469705f76616c75653042616c616e63654f663c543e4cb4204465636c6172652061207469702076616c756520666f7220616e20616c72656164792d6f70656e207469702e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f66207468652068617368206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279382020206163636f756e742049442e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e00650120456d6974732060546970436c6f73696e676020696620746865207468726573686f6c64206f66207469707065727320686173206265656e207265616368656420616e642074686520636f756e74646f776e20706572696f64342068617320737461727465642e002c2023203c7765696768743e24202d20604f285429600101202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28542960292c206f6e652073746f72616765207265616420604f283129602e4c202d20557020746f206f6e65206576656e742e302023203c2f7765696768743e24636c6f73655f7469700410686173681c543a3a48617368386020436c6f736520616e64207061796f75742061207469702e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0019012054686520746970206964656e74696669656420627920606861736860206d75737420686176652066696e69736865642069747320636f756e74646f776e20706572696f642e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e002c2023203c7765696768743e24202d20604f28542960e4202d204f6e652073746f726167652072657472696576616c2028636f64656320604f285429602920616e642074776f2072656d6f76616c732e88202d20557020746f2074687265652062616c616e6365206f7065726174696f6e732e302023203c2f7765696768743e012c2050726f706f736564043450726f706f73616c496e6465780438204e65772070726f706f73616c2e205370656e64696e67041c42616c616e636504e8205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964048020536f6d652066756e64732068617665206265656e20616c6c6f63617465642e2052656a6563746564083450726f706f73616c496e6465781c42616c616e636504b420412070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e144275726e74041c42616c616e6365048c20536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e20526f6c6c6f766572041c42616c616e6365043101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e1c4465706f736974041c42616c616e6365048020536f6d652066756e64732068617665206265656e206465706f73697465642e184e657754697004104861736804982041206e6577207469702073756767657374696f6e20686173206265656e206f70656e65642e28546970436c6f73696e6704104861736804dc2041207469702073756767657374696f6e206861732072656163686564207468726573686f6c6420616e6420697320636c6f73696e672e24546970436c6f7365640c1048617368244163636f756e7449641c42616c616e636504882041207469702073756767657374696f6e20686173206265656e20636c6f7365642e3054697052657472616374656404104861736804942041207469702073756767657374696f6e20686173206265656e207265747261637465642e203050726f706f73616c426f6e641c5065726d696c6c1050c30000085501204672616374696f6e206f6620612070726f706f73616c27732076616c756520746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c616365207468652070726f706f73616c2e110120416e2061636365707465642070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f6573206e6f742e4c50726f706f73616c426f6e644d696e696d756d3042616c616e63654f663c543e4000407a10f35a00000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f6438543a3a426c6f636b4e756d6265721080700000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e1c5065726d696c6c1020a107000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e30546970436f756e74646f776e38543a3a426c6f636b4e756d62657210807000000445012054686520706572696f6420666f722077686963682061207469702072656d61696e73206f70656e20616674657220697320686173206163686965766564207468726573686f6c6420746970706572732e3454697046696e646572734665651c50657263656e7404140431012054686520616d6f756e74206f66207468652066696e616c2074697020776869636820676f657320746f20746865206f726967696e616c207265706f72746572206f6620746865207469702e505469705265706f72744465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004d42054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120746970207265706f72742e5c5469705265706f72744465706f736974506572427974653042616c616e63654f663c543e400010a5d4e800000000000000000000000409012054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e2074686520746970207265706f727420726561736f6e2e2070496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e50496e76616c696450726f706f73616c496e646578046c204e6f2070726f706f73616c206174207468617420696e6465782e30526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e30416c72656164794b6e6f776e048c20546865207469702077617320616c726561647920666f756e642f737461727465642e28556e6b6e6f776e54697004642054686520746970206861736820697320756e6b6e6f776e2e244e6f7446696e64657204210120546865206163636f756e7420617474656d7074696e6720746f20726574726163742074686520746970206973206e6f74207468652066696e646572206f6620746865207469702e245374696c6c4f70656e042d0120546865207469702063616e6e6f7420626520636c61696d65642f636c6f736564206265636175736520746865726520617265206e6f7420656e6f7567682074697070657273207965742e245072656d617475726504350120546865207469702063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e24436f6e7472616374730120436f6e74726163741c204761735370656e7401000c476173200000000000000000048020476173207370656e7420736f2066617220696e207468697320626c6f636b2e3c43757272656e745363686564756c650100205363686564756c65c5010000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af000000000000000100000000000000010000000000000004000000000001001000000000400000002000000004942043757272656e7420636f7374207363686564756c6520666f7220636f6e7472616374732e305072697374696e65436f64650001012c436f6465486173683c543e1c5665633c75383e0004000465012041206d617070696e672066726f6d20616e206f726967696e616c20636f6465206861736820746f20746865206f726967696e616c20636f64652c20756e746f756368656420627920696e737472756d656e746174696f6e2e2c436f646553746f726167650001012c436f6465486173683c543e587761736d3a3a5072656661625761736d4d6f64756c650004000465012041206d617070696e67206265747765656e20616e206f726967696e616c20636f6465206861736820616e6420696e737472756d656e746564207761736d20636f64652c20726561647920666f7220657865637574696f6e2e384163636f756e74436f756e74657201000c753634200000000000000000045420546865207375627472696520636f756e7465722e38436f6e7472616374496e666f4f6600010130543a3a4163636f756e7449643c436f6e7472616374496e666f3c543e00040004a82054686520636f6465206173736f6369617465642077697468206120676976656e206163636f756e742e20476173507269636501003042616c616e63654f663c543e4001000000000000000000000000000000047820546865207072696365206f66206f6e6520756e6974206f66206761732e01143c7570646174655f7363686564756c6504207363686564756c65205363686564756c650cb4205570646174657320746865207363686564756c6520666f72206d65746572696e6720636f6e7472616374732e000d0120546865207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652073746f726564207363686564756c652e207075745f636f646508246761735f6c696d697430436f6d706163743c4761733e10636f64651c5665633c75383e085d012053746f7265732074686520676976656e2062696e617279205761736d20636f646520696e746f2074686520636861696e27732073746f7261676520616e642072657475726e73206974732060636f646568617368602ed420596f752063616e20696e7374616e746961746520636f6e747261637473206f6e6c7920776974682073746f72656420636f64652e1063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e10646174611c5665633c75383e1c0901204d616b657320612063616c6c20746f20616e206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e002901202a20496620746865206163636f756e74206973206120736d6172742d636f6e7472616374206163636f756e742c20746865206173736f63696174656420636f64652077696c6c206265b020657865637574656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e1901202a20496620746865206163636f756e74206973206120726567756c6172206163636f756e742c20616e792076616c75652077696c6c206265207472616e736665727265642e4901202a204966206e6f206163636f756e742065786973747320616e64207468652063616c6c2076616c7565206973206e6f74206c657373207468616e20606578697374656e7469616c5f6465706f736974602c1501206120726567756c6172206163636f756e742077696c6c206265206372656174656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e2c696e7374616e74696174651024656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e24636f64655f686173682c436f6465486173683c543e10646174611c5665633c75383e28bd0120496e7374616e7469617465732061206e657720636f6e74726163742066726f6d207468652060636f646568617368602067656e65726174656420627920607075745f636f6465602c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e009820496e7374616e74696174696f6e20697320657865637574656420617320666f6c6c6f77733a004101202d205468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e64657220616e642068617368206f662074686520636f64652e0501202d2054686520736d6172742d636f6e7472616374206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732e6d01202d20546865206063746f725f636f64656020697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792d63726561746564206163636f756e742e204275666665722072657475726e65645d0120202061667465722074686520657865637574696f6e206973207361766564206173207468652060636f646560206f6620746865206163636f756e742e205468617420636f64652077696c6c20626520696e766f6b6564a820202075706f6e20616e792063616c6c2072656365697665642062792074686973206163636f756e742e7c202d2054686520636f6e747261637420697320696e697469616c697a65642e3c636c61696d5f73757263686172676508106465737430543a3a4163636f756e744964286175785f73656e646572504f7074696f6e3c543a3a4163636f756e7449643e14710120416c6c6f777320626c6f636b2070726f64756365727320746f20636c61696d206120736d616c6c2072657761726420666f72206576696374696e67206120636f6e74726163742e204966206120626c6f636b2070726f64756365721501206661696c7320746f20646f20736f2c206120726567756c61722075736572732077696c6c20626520616c6c6f77656420746f20636c61696d20746865207265776172642e00390120496620636f6e7472616374206973206e6f742065766963746564206173206120726573756c74206f6620746869732063616c6c2c206e6f20616374696f6e73206172652074616b656e20616e64ac207468652073656e646572206973206e6f7420656c696769626c6520666f7220746865207265776172642e0118205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e6365046901205472616e736665722068617070656e6564206066726f6d6020746f2060746f60207769746820676976656e206076616c7565602061732070617274206f662061206063616c6c60206f722060696e7374616e7469617465602e30496e7374616e74696174656408244163636f756e744964244163636f756e74496404dc20436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e28436f646553746f72656404104861736804b820436f646520776974682074686520737065636966696564206861736820686173206265656e2073746f7265642e3c5363686564756c6555706461746564040c75333204c020547269676765726564207768656e207468652063757272656e74207363686564756c6520697320757064617465642e284469737061746368656408244163636f756e74496410626f6f6c08390120412063616c6c2077617320646973706174636865642066726f6d2074686520676976656e206163636f756e742e2054686520626f6f6c207369676e616c7320776865746865722069742077617374207375636365737366756c20657865637574696f6e206f72206e6f742e20436f6e747261637408244163636f756e7449641c5665633c75383e048c20416e206576656e742066726f6d20636f6e7472616374206f66206163636f756e742e404c5369676e6564436c61696d48616e646963617038543a3a426c6f636b4e756d626572100200000010e0204e756d626572206f6620626c6f636b2064656c617920616e2065787472696e73696320636c61696d20737572636861726765206861732e000d01205768656e20636c61696d207375726368617267652069732063616c6c656420627920616e2065787472696e736963207468652072656e7420697320636865636b65646820666f722063757272656e745f626c6f636b202d2064656c617940546f6d6273746f6e654465706f7369743042616c616e63654f663c543e4000407a10f35a0000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f2067656e6572617465206120746f6d6273746f6e652e4453746f7261676553697a654f66667365740c75333210080000000851012053697a65206f66206120636f6e7472616374206174207468652074696d65206f6620696e7374616e746961696f6e2e205468697320697320612073696d706c652077617920746f20656e737572652074686174a420656d70747920636f6e747261637473206576656e7475616c6c7920676574732064656c657465642e2c52656e74427974654665653042616c616e63654f663c543e4000407a10f35a00000000000000000000043501205072696365206f6620612062797465206f662073746f7261676520706572206f6e6520626c6f636b20696e74657276616c2e2053686f756c642062652067726561746572207468616e20302e4452656e744465706f7369744f66667365743042616c616e63654f663c543e4000008a5d7845630100000000000000001c05012054686520616d6f756e74206f662066756e6473206120636f6e74726163742073686f756c64206465706f73697420696e206f7264657220746f206f6666736574582074686520636f7374206f66206f6e6520627974652e006901204c6574277320737570706f736520746865206465706f73697420697320312c303030204255202862616c616e636520756e697473292f6279746520616e64207468652072656e7420697320312042552f627974652f6461792c5901207468656e206120636f6e7472616374207769746820312c3030302c3030302042552074686174207573657320312c303030206279746573206f662073746f7261676520776f756c6420706179206e6f2072656e742e4d0120427574206966207468652062616c616e6365207265647563656420746f203530302c30303020425520616e64207468652073746f7261676520737461796564207468652073616d6520617420312c3030302c78207468656e20697420776f756c6420706179203530302042552f6461792e3c5375726368617267655265776172643042616c616e63654f663c543e400080a1a76b4a3500000000000000000008e4205265776172642074686174206973207265636569766564206279207468652070617274792077686f736520746f75636820686173206c65646820746f2072656d6f76616c206f66206120636f6e74726163742e2c5472616e736665724665653042616c616e63654f663c543e400010a5d4e800000000000000000000000494205468652066656520726571756972656420746f206d616b652061207472616e736665722e2c4372656174696f6e4665653042616c616e63654f663c543e400010a5d4e80000000000000000000000049c205468652066656520726571756972656420746f2063726561746520616e206163636f756e742e485472616e73616374696f6e426173654665653042616c616e63654f663c543e400010a5d4e8000000000000000000000004dc205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b2074686520626173652e485472616e73616374696f6e427974654665653042616c616e63654f663c543e4000e40b54020000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e2c436f6e74726163744665653042616c616e63654f663c543e400010a5d4e80000000000000000000000084101205468652066656520726571756972656420746f20696e7374616e7469617465206120636f6e747261637420696e7374616e63652e204120726561736f6e61626c652064656661756c742076616c75651c2069732032312e2c43616c6c426173654665650c47617320e803000000000000081d0120546865206261736520666565206368617267656420666f722063616c6c696e6720696e746f206120636f6e74726163742e204120726561736f6e61626c652064656661756c74382076616c7565206973203133352e48496e7374616e7469617465426173654665650c47617320e80300000000000008390120546865206261736520666565206368617267656420666f7220696e7374616e74696174696e67206120636f6e74726163742e204120726561736f6e61626c652064656661756c742076616c756520206973203137352e204d617844657074680c753332102000000008310120546865206d6178696d756d206e657374696e67206c6576656c206f6620612063616c6c2f696e7374616e746961746520737461636b2e204120726561736f6e61626c652064656661756c74382076616c7565206973203130302e304d617856616c756553697a650c753332100040000004390120546865206d6178696d756d2073697a65206f6620612073746f726167652076616c756520696e2062797465732e204120726561736f6e61626c652064656661756c74206973203136204b69422e34426c6f636b4761734c696d69740c47617320809698000000000008250120546865206d6178696d756d20616d6f756e74206f6620676173207468617420636f756c6420626520657870656e6465642070657220626c6f636b2e204120726561736f6e61626c65742064656661756c742076616c75652069732031305f3030305f3030302e1858496e76616c69645363686564756c6556657273696f6e0405012041206e6577207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652063757272656e74206f6e652e54496e76616c6964537572636861726765436c61696d04550120416e206f726967696e206d757374206265207369676e6564206f7220696e686572656e7420616e6420617578696c696172792073656e646572206f6e6c792070726f7669646564206f6e20696e686572656e742e54496e76616c6964536f75726365436f6e747261637404dc2043616e6e6f7420726573746f72652066726f6d206e6f6e6578697374696e67206f7220746f6d6273746f6e6520636f6e74726163742e68496e76616c696444657374696e6174696f6e436f6e747261637404c42043616e6e6f7420726573746f726520746f206e6f6e6578697374696e67206f7220616c69766520636f6e74726163742e40496e76616c6964546f6d6273746f6e65046020546f6d6273746f6e657320646f6e2774206d617463682e54496e76616c6964436f6e74726163744f726967696e04bc20416e206f726967696e20547269654964207772697474656e20696e207468652063757272656e7420626c6f636b2e105375646f01105375646f040c4b6579010030543a3a4163636f756e74496480000000000000000000000000000000000000000000000000000000000000000004842054686520604163636f756e74496460206f6620746865207375646f206b65792e010c107375646f042070726f706f73616c40426f783c543a3a50726f706f73616c3e2839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ed4202d20556e6b6e6f776e20776569676874206f662064657269766174697665206070726f706f73616c6020657865637574696f6e2e302023203c2f7765696768743e1c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652475012041757468656e74696361746573207468652063757272656e74207375646f206b657920616e6420736574732074686520676976656e204163636f756e7449642028606e6577602920617320746865206e6577207375646f206b65792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e1c7375646f5f6173080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652070726f706f73616c40426f783c543a3a50726f706f73616c3e2c51012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c207769746820605369676e656460206f726967696e2066726f6d44206120676976656e206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ed4202d20556e6b6e6f776e20776569676874206f662064657269766174697665206070726f706f73616c6020657865637574696f6e2e302023203c2f7765696768743e010c1453756469640410626f6f6c04602041207375646f206a75737420746f6f6b20706c6163652e284b65794368616e67656404244163636f756e74496404f020546865207375646f6572206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e285375646f4173446f6e650410626f6f6c04602041207375646f206a75737420746f6f6b20706c6163652e00042c526571756972655375646f04802053656e646572206d75737420626520746865205375646f206163636f756e7420496d4f6e6c696e650120496d4f6e6c696e651020476f737369704174010038543a3a426c6f636b4e756d626572100000000004a02054686520626c6f636b206e756d626572207768656e2077652073686f756c6420676f737369702e104b65797301004c5665633c543a3a417574686f7269747949643e040004d0205468652063757272656e7420736574206f66206b6579732074686174206d61792069737375652061206865617274626561742e485265636569766564486561727462656174730002013053657373696f6e496e6465782441757468496e6465781c5665633c75383e01040008e420466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206041757468496e646578608c20746f20606f6666636861696e3a3a4f70617175654e6574776f726b5374617465602e38417574686f726564426c6f636b730102013053657373696f6e496e64657838543a3a56616c696461746f7249640c75333201100000000008150120466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f662060543a3a56616c696461746f7249646020746f20746865c8206e756d626572206f6620626c6f636b7320617574686f7265642062792074686520676976656e20617574686f726974792e0104246865617274626561740824686561727462656174644865617274626561743c543a3a426c6f636b4e756d6265723e285f7369676e6174757265bc3c543a3a417574686f7269747949642061732052756e74696d654170705075626c69633e3a3a5369676e617475726500010c444865617274626561745265636569766564042c417574686f72697479496404c02041206e657720686561727462656174207761732072656365697665642066726f6d2060417574686f726974794964601c416c6c476f6f640004d42041742074686520656e64206f66207468652073657373696f6e2c206e6f206f6666656e63652077617320636f6d6d69747465642e2c536f6d654f66666c696e6504605665633c4964656e74696669636174696f6e5475706c653e0431012041742074686520656e64206f66207468652073657373696f6e2c206174206c65617374206f6e63652076616c696461746f722077617320666f756e6420746f206265206f66666c696e652e000828496e76616c69644b65790464204e6f6e206578697374656e74207075626c6963206b65792e4c4475706c6963617465644865617274626561740458204475706c696361746564206865617274626561742e48417574686f72697479446973636f76657279000100000000204f6666656e63657301204f6666656e6365730c1c5265706f727473000101345265706f727449644f663c543ed04f6666656e636544657461696c733c543a3a4163636f756e7449642c20543a3a4964656e74696669636174696f6e5475706c653e00040004490120546865207072696d61727920737472756374757265207468617420686f6c647320616c6c206f6666656e6365207265636f726473206b65796564206279207265706f7274206964656e746966696572732e58436f6e63757272656e745265706f727473496e646578010201104b696e64384f706171756554696d65536c6f74485665633c5265706f727449644f663c543e3e010400042901204120766563746f72206f66207265706f727473206f66207468652073616d65206b696e6420746861742068617070656e6564206174207468652073616d652074696d6520736c6f742e485265706f72747342794b696e64496e646578010101104b696e641c5665633c75383e00040018110120456e756d65726174657320616c6c207265706f727473206f662061206b696e6420616c6f6e672077697468207468652074696d6520746865792068617070656e65642e00bc20416c6c207265706f7274732061726520736f72746564206279207468652074696d65206f66206f6666656e63652e004901204e6f74652074686174207468652061637475616c2074797065206f662074686973206d617070696e6720697320605665633c75383e602c207468697320697320626563617573652076616c756573206f66690120646966666572656e7420747970657320617265206e6f7420737570706f7274656420617420746865206d6f6d656e7420736f2077652061726520646f696e6720746865206d616e75616c2073657269616c697a6174696f6e2e010001041c4f6666656e636508104b696e64384f706171756554696d65536c6f7408550120546865726520697320616e206f6666656e6365207265706f72746564206f662074686520676976656e20606b696e64602068617070656e656420617420746865206073657373696f6e5f696e6465786020616e64390120286b696e642d7370656369666963292074696d6520736c6f742e2054686973206576656e74206973206e6f74206465706f736974656420666f72206475706c696361746520736c61736865732e00006052616e646f6d6e657373436f6c6c656374697665466c6970016052616e646f6d6e657373436f6c6c656374697665466c6970043852616e646f6d4d6174657269616c0100305665633c543a3a486173683e04000c610120536572696573206f6620626c6f636b20686561646572732066726f6d20746865206c61737420383120626c6f636b73207468617420616374732061732072616e646f6d2073656564206d6174657269616c2e2054686973610120697320617272616e67656420617320612072696e672062756666657220776974682060626c6f636b5f6e756d626572202520383160206265696e672074686520696e64657820696e746f20746865206056656360206f664420746865206f6c6465737420686173682e0100000000204964656e7469747901105375646f10284964656e746974794f6600010130543a3a4163636f756e74496468526567697374726174696f6e3c42616c616e63654f663c543e3e00040004210120496e666f726d6174696f6e20746861742069732070657274696e656e7420746f206964656e746966792074686520656e7469747920626568696e6420616e206163636f756e742e1c53757065724f6600010130543a3a4163636f756e7449645028543a3a4163636f756e7449642c204461746129000400086101205468652073757065722d6964656e74697479206f6620616e20616c7465726e6174697665202273756222206964656e7469747920746f676574686572207769746820697473206e616d652c2077697468696e2074686174510120636f6e746578742e20496620746865206163636f756e74206973206e6f7420736f6d65206f74686572206163636f756e742773207375622d6964656e746974792c207468656e206a75737420604e6f6e65602e18537562734f6601010130543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e29004400000000000000000000000000000000000cb820416c7465726e6174697665202273756222206964656e746974696573206f662074686973206163636f756e742e001d0120546865206669727374206974656d20697320746865206465706f7369742c20746865207365636f6e64206973206120766563746f72206f6620746865206163636f756e74732e28526567697374726172730100d85665633c4f7074696f6e3c526567697374726172496e666f3c42616c616e63654f663c543e2c20543a3a4163636f756e7449643e3e3e0400104d012054686520736574206f6620726567697374726172732e204e6f7420657870656374656420746f206765742076657279206269672061732063616e206f6e6c79206265206164646564207468726f7567682061a8207370656369616c206f726967696e20286c696b656c79206120636f756e63696c206d6f74696f6e292e0029012054686520696e64657820696e746f20746869732063616e206265206361737420746f2060526567697374726172496e6465786020746f2067657420612076616c69642076616c75652e012c346164645f726567697374726172041c6163636f756e7430543a3a4163636f756e744964347c2041646420612072656769737472617220746f207468652073797374656d2e001d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605265676973747261724f726967696e60206f722060526f6f74602e00ac202d20606163636f756e74603a20746865206163636f756e74206f6620746865207265676973747261722e009820456d6974732060526567697374726172416464656460206966207375636365737366756c2e002c2023203c7765696768743ee4202d20604f2852296020776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e646564292e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e307365745f6964656e746974790410696e666f304964656e74697479496e666f482d012053657420616e206163636f756e742773206964656e7469747920696e666f726d6174696f6e20616e6420726573657276652074686520617070726f707269617465206465706f7369742e00590120496620746865206163636f756e7420616c726561647920686173206964656e7469747920696e666f726d6174696f6e2c20746865206465706f7369742069732074616b656e2061732070617274207061796d656e745420666f7220746865206e6577206465706f7369742e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e0090202d2060696e666f603a20546865206964656e7469747920696e666f726d6174696f6e2e008c20456d69747320604964656e7469747953657460206966207375636365737366756c2e002c2023203c7765696768743e0501202d20604f2858202b2052296020776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e646564292e88202d204174206d6f73742074776f2062616c616e6365206f7065726174696f6e732eac202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f2858202b20522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e207365745f73756273041073756273645665633c28543a3a4163636f756e7449642c2044617461293e40902053657420746865207375622d6163636f756e7473206f66207468652073656e6465722e005901205061796d656e743a20416e79206167677265676174652062616c616e63652072657365727665642062792070726576696f757320607365745f73756273602063616c6c732077696c6c2062652072657475726e6564310120616e6420616e20616d6f756e7420605375624163636f756e744465706f736974602077696c6c20626520726573657276656420666f722065616368206974656d20696e206073756273602e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e009c202d206073756273603a20546865206964656e746974792773207375622d6163636f756e74732e002c2023203c7765696768743eec202d20604f285329602077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e88202d204174206d6f73742074776f2062616c616e6365206f7065726174696f6e732e4101202d204174206d6f7374204f2832202a2053202b2031292073746f72616765206d75746174696f6e733b20636f64656320636f6d706c657869747920604f2831202a2053202b2053202a20312960293b582020206f6e652073746f726167652d6578697374732e302023203c2f7765696768743e38636c6561725f6964656e74697479003c390120436c65617220616e206163636f756e742773206964656e7469747920696e666f20616e6420616c6c207375622d6163636f756e7420616e642072657475726e20616c6c206465706f736974732e00f0205061796d656e743a20416c6c2072657365727665642062616c616e636573206f6e20746865206163636f756e74206172652072657475726e65642e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e009c20456d69747320604964656e74697479436c656172656460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2852202b2053202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e74202d206053202b2032602073746f726167652064656c6574696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e44726571756573745f6a756467656d656e7408247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e1c6d61785f66656554436f6d706163743c42616c616e63654f663c543e3e5c9820526571756573742061206a756467656d656e742066726f6d2061207265676973747261722e005901205061796d656e743a204174206d6f737420606d61785f666565602077696c6c20626520726573657276656420666f72207061796d656e7420746f2074686520726567697374726172206966206a756467656d656e741c20676976656e2e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e002101202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973207265717565737465642e5901202d20606d61785f666565603a20546865206d6178696d756d206665652074686174206d617920626520706169642e20546869732073686f756c64206a757374206265206175746f2d706f70756c617465642061733a0034206060606e6f636f6d70696c65a42053656c663a3a72656769737472617273287265675f696e646578292e75776e72617028292e666565102060606000a820456d69747320604a756467656d656e7452657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2858202b205229602e34202d204f6e65206576656e742e302023203c2f7765696768743e3863616e63656c5f7265717565737404247265675f696e64657838526567697374726172496e646578446c2043616e63656c20612070726576696f757320726571756573742e00fc205061796d656e743a20412070726576696f75736c79207265736572766564206465706f7369742069732072657475726e6564206f6e20737563636573732e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e004901202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206e6f206c6f6e676572207265717565737465642e00b020456d69747320604a756467656d656e74556e72657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e8c202d204f6e652073746f72616765206d75746174696f6e20604f2852202b205829602e34202d204f6e65206576656e742e302023203c2f7765696768743e1c7365745f6665650814696e6465785c436f6d706163743c526567697374726172496e6465783e0c66656554436f6d706163743c42616c616e63654f663c543e3e301d0120536574207468652066656520726571756972656420666f722061206a756467656d656e7420746f206265207265717565737465642066726f6d2061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e58202d2060666565603a20746865206e6577206665652e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602e302023203c2f7765696768743e387365745f6163636f756e745f69640814696e6465785c436f6d706163743c526567697374726172496e6465783e0c6e657730543a3a4163636f756e74496430c0204368616e676520746865206163636f756e74206173736f63696174656420776974682061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e74202d20606e6577603a20746865206e6577206163636f756e742049442e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602e302023203c2f7765696768743e287365745f6669656c64730814696e6465785c436f6d706163743c526567697374726172496e6465783e186669656c6473384964656e746974794669656c647330ac2053657420746865206669656c6420696e666f726d6174696f6e20666f722061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e1101202d20606669656c6473603a20746865206669656c64732074686174207468652072656769737472617220636f6e6365726e73207468656d73656c76657320776974682e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602e302023203c2f7765696768743e4470726f766964655f6a756467656d656e740c247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365246a756467656d656e745c4a756467656d656e743c42616c616e63654f663c543e3e4cbc2050726f766964652061206a756467656d656e7420666f7220616e206163636f756e742773206964656e746974792e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74b4206f6620746865207265676973747261722077686f736520696e64657820697320607265675f696e646578602e002501202d20607265675f696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206265696e67206d6164652e5901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e4d01202d20606a756467656d656e74603a20746865206a756467656d656e74206f662074686520726567697374726172206f6620696e64657820607265675f696e646578602061626f75742060746172676574602e009820456d69747320604a756467656d656e74476976656e60206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e88202d204f6e652062616c616e63652d7472616e73666572206f7065726174696f6e2e98202d20557020746f206f6e65206163636f756e742d6c6f6f6b7570206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2852202b205829602e34202d204f6e65206576656e742e302023203c2f7765696768743e346b696c6c5f6964656e7469747904187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654c45012052656d6f766520616e206163636f756e742773206964656e7469747920616e64207375622d6163636f756e7420696e666f726d6174696f6e20616e6420736c61736820746865206465706f736974732e006501205061796d656e743a2052657365727665642062616c616e6365732066726f6d20607365745f737562736020616e6420607365745f6964656e74697479602061726520736c617368656420616e642068616e646c656420627949012060536c617368602e20566572696669636174696f6e2072657175657374206465706f7369747320617265206e6f742072657475726e65643b20746865792073686f756c642062652063616e63656c6c656484206d616e75616c6c79207573696e67206063616e63656c5f72657175657374602e00310120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f206f72206d617463682060543a3a466f7263654f726967696e602e005901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e009820456d69747320604964656e746974794b696c6c656460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2852202b2053202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e74202d206053202b2032602073746f72616765206d75746174696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e011c2c4964656e7469747953657404244163636f756e74496404f02041206e616d652077617320736574206f72207265736574202877686963682077696c6c2072656d6f766520616c6c206a756467656d656e7473292e3c4964656e74697479436c656172656408244163636f756e7449641c42616c616e636504d02041206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e384964656e746974794b696c6c656408244163636f756e7449641c42616c616e636504c82041206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e484a756467656d656e7452657175657374656408244163636f756e74496438526567697374726172496e64657804a02041206a756467656d656e74207761732061736b65642066726f6d2061207265676973747261722e504a756467656d656e74556e72657175657374656408244163636f756e74496438526567697374726172496e646578048c2041206a756467656d656e74207265717565737420776173207265747261637465642e384a756467656d656e74476976656e08244163636f756e74496438526567697374726172496e64657804982041206a756467656d656e742077617320676976656e2062792061207265676973747261722e3852656769737472617241646465640438526567697374726172496e646578045c204120726567697374726172207761732061646465642e002c48546f6f4d616e795375624163636f756e7473046020546f6f206d616e7920737562732d6163636f756e74732e204e6f74466f756e640454204163636f756e742069736e277420666f756e642e204e6f744e616d65640454204163636f756e742069736e2774206e616d65642e28456d707479496e646578043420456d70747920696e6465782e284665654368616e676564044020466565206973206368616e6765642e284e6f4964656e74697479044c204e6f206964656e7469747920666f756e642e3c537469636b794a756467656d656e74044820537469636b79206a756467656d656e742e384a756467656d656e74476976656e0444204a756467656d656e7420676976656e2e40496e76616c69644a756467656d656e74044c20496e76616c6964206a756467656d656e742e30496e76616c6964496e64657804582054686520696e64657820697320696e76616c69642e34496e76616c6964546172676574045c205468652074617267657420697320696e76616c69642e1c536f6369657479011c536f6369657479401c466f756e646572000030543a3a4163636f756e7449640400044820546865206669727374206d656d6265722e1452756c657300001c543a3a48617368040008510120412068617368206f66207468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e2043616e206f6e6c7920626520736574206f6e636520616e6454206f6e6c792062792074686520666f756e6465722e2843616e6469646174657301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e0400043901205468652063757272656e7420736574206f662063616e646964617465733b206269646465727320746861742061726520617474656d7074696e6720746f206265636f6d65206d656d626572732e4c53757370656e64656443616e6469646174657300010130543a3a4163636f756e744964e42842616c616e63654f663c542c20493e2c204269644b696e643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e2900040004842054686520736574206f662073757370656e6465642063616e646964617465732e0c506f7401003c42616c616e63654f663c542c20493e400000000000000000000000000000000004410120416d6f756e74206f66206f7572206163636f756e742062616c616e63652074686174206973207370656369666963616c6c7920666f7220746865206e65787420726f756e642773206269642873292e1048656164000030543a3a4163636f756e744964040004e820546865206d6f7374207072696d6172792066726f6d20746865206d6f737420726563656e746c7920617070726f766564206d656d626572732e1c4d656d626572730100445665633c543a3a4163636f756e7449643e04000494205468652063757272656e7420736574206f66206d656d626572732c206f7264657265642e4053757370656e6465644d656d6265727301010130543a3a4163636f756e74496410626f6f6c00040004782054686520736574206f662073757370656e646564206d656d626572732e104269647301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e040004e8205468652063757272656e7420626964732c2073746f726564206f726465726564206279207468652076616c7565206f6620746865206269642e20566f756368696e6700010130543a3a4163636f756e74496438566f756368696e6753746174757300040004e4204d656d626572732063757272656e746c7920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e1c5061796f75747301010130543a3a4163636f756e744964985665633c28543a3a426c6f636b4e756d6265722c2042616c616e63654f663c542c20493e293e000400044d012050656e64696e67207061796f7574733b206f72646572656420627920626c6f636b206e756d6265722c20776974682074686520616d6f756e7420746861742073686f756c642062652070616964206f75742e1c537472696b657301010130543a3a4163636f756e7449642c537472696b65436f756e7400100000000004dc20546865206f6e676f696e67206e756d626572206f66206c6f73696e6720766f746573206361737420627920746865206d656d6265722e14566f74657300020530543a3a4163636f756e74496430543a3a4163636f756e74496410566f746505040004d020446f75626c65206d61702066726f6d2043616e646964617465202d3e20566f746572202d3e20284d617962652920566f74652e20446566656e646572000030543a3a4163636f756e744964040004c42054686520646566656e64696e67206d656d6265722063757272656e746c79206265696e67206368616c6c656e6765642e34446566656e646572566f74657300010530543a3a4163636f756e74496410566f7465000400046020566f74657320666f722074686520646566656e6465722e284d61784d656d6265727301000c753332100000000004dc20546865206d6178206e756d626572206f66206d656d6265727320666f722074686520736f6369657479206174206f6e652074696d652e01300c626964041476616c75653c42616c616e63654f663c542c20493e84e020412075736572206f757473696465206f662074686520736f63696574792063616e206d616b6520612062696420666f7220656e7472792e003901205061796d656e743a206043616e6469646174654465706f736974602077696c6c20626520726573657276656420666f72206d616b696e672061206269642e2049742069732072657475726e6564f0207768656e2074686520626964206265636f6d65732061206d656d6265722c206f7220696620746865206269642063616c6c732060756e626964602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a5901202d206076616c7565603a2041206f6e652074696d65207061796d656e74207468652062696420776f756c64206c696b6520746f2072656365697665207768656e206a6f696e696e672074686520736f63696574792e002c2023203c7765696768743e5501204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520726573657276652944202d2053746f726167652052656164733aec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f284329c820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d2948202d2053746f72616765205772697465733a810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3a2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6820092d204f6e65206576656e7420666f72206e6577206269642efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e14756e626964040c706f730c7533324cd82041206269646465722063616e2072656d6f76652074686569722062696420666f7220656e74727920696e746f20736f63696574792e010120427920646f696e6720736f2c20746865792077696c6c20686176652074686569722063616e646964617465206465706f7369742072657475726e6564206f728420746865792077696c6c20756e766f75636820746865697220766f75636865722e00fc205061796d656e743a2054686520626964206465706f73697420697320756e7265736572766564206966207468652075736572206d6164652061206269642e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206269646465722e003020506172616d65746572733a1901202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2077616e747320746f20756e6269642e002c2023203c7765696768743eb0204b65793a204220286c656e206f662062696473292c2058202862616c616e636520756e72657365727665290d01202d204f6e652073746f72616765207265616420616e6420777269746520746f20726574726965766520616e64207570646174652074686520626964732e204f2842294501202d20456974686572206f6e6520756e726573657276652062616c616e636520616374696f6e204f285829206f72206f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2842202b205829302023203c2f7765696768743e14766f7563680c0c77686f30543a3a4163636f756e7449641476616c75653c42616c616e63654f663c542c20493e0c7469703c42616c616e63654f663c542c20493eb045012041732061206d656d6265722c20766f75636820666f7220736f6d656f6e6520746f206a6f696e20736f636965747920627920706c6163696e67206120626964206f6e20746865697220626568616c662e005501205468657265206973206e6f206465706f73697420726571756972656420746f20766f75636820666f722061206e6577206269642c206275742061206d656d6265722063616e206f6e6c7920766f75636820666f725d01206f6e652062696420617420612074696d652e2049662074686520626964206265636f6d657320612073757370656e6465642063616e64696461746520616e6420756c74696d6174656c792072656a65637465642062794101207468652073757370656e73696f6e206a756467656d656e74206f726967696e2c20746865206d656d6265722077696c6c2062652062616e6e65642066726f6d20766f756368696e6720616761696e2e005901204173206120766f756368696e67206d656d6265722c20796f752063616e20636c61696d206120746970206966207468652063616e6469646174652069732061636365707465642e2054686973207469702077696c6c51012062652070616964206173206120706f7274696f6e206f66207468652072657761726420746865206d656d6265722077696c6c207265636569766520666f72206a6f696e696e672074686520736f63696574792e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733acc202d206077686f603a2054686520757365722077686f20796f7520776f756c64206c696b6520746f20766f75636820666f722e5101202d206076616c7565603a2054686520746f74616c2072657761726420746f2062652070616964206265747765656e20796f7520616e64207468652063616e6469646174652069662074686579206265636f6d65642061206d656d62657220696e2074686520736f63696574792e4901202d2060746970603a20596f757220637574206f662074686520746f74616c206076616c756560207061796f7574207768656e207468652063616e64696461746520697320696e64756374656420696e746f15012074686520736f63696574792e2054697073206c6172676572207468616e206076616c7565602077696c6c206265207361747572617465642075706f6e207061796f75742e002c2023203c7765696768743e0101204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d626572732944202d2053746f726167652052656164733ac820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d29090120092d204f6e652073746f72616765207265616420746f20636865636b206d656d626572206973206e6f7420616c726561647920766f756368696e672e204f283129ec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f28432948202d2053746f72616765205772697465733a0d0120092d204f6e652073746f7261676520777269746520746f20696e7365727420766f756368696e672073746174757320746f20746865206d656d6265722e204f283129810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3ac020092d204f286c6f67204d292073656172636820746f20636865636b2073656e6465722069732061206d656d6265722e2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6020092d204f6e65206576656e7420666f7220766f7563682efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e1c756e766f756368040c706f730c753332442d01204173206120766f756368696e67206d656d6265722c20756e766f7563682061206269642e2054686973206f6e6c7920776f726b73207768696c6520766f7563686564207573657220697394206f6e6c792061206269646465722028616e64206e6f7420612063616e646964617465292e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206120766f756368696e67206d656d6265722e003020506172616d65746572733a2d01202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2073686f756c6420626520756e766f75636865642e002c2023203c7765696768743e54204b65793a204220286c656e206f662062696473290901202d204f6e652073746f726167652072656164204f28312920746f20636865636b20746865207369676e6572206973206120766f756368696e67206d656d6265722eec202d204f6e652073746f72616765206d757461746520746f20726574726965766520616e64207570646174652074686520626964732e204f28422994202d204f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f284229302023203c2f7765696768743e10766f7465082463616e6469646174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c617070726f766510626f6f6c4c882041732061206d656d6265722c20766f7465206f6e20612063616e6469646174652e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733a0d01202d206063616e646964617465603a205468652063616e646964617465207468617420746865206d656d62657220776f756c64206c696b6520746f20626964206f6e2ef4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265d82020202020202020202020202020617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743ebc204b65793a204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722e58202d204f6e65206163636f756e74206c6f6f6b75702e2d01202d204f6e652073746f726167652072656164204f28432920616e64204f2843292073656172636820746f20636865636b2074686174207573657220697320612063616e6469646174652ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204329302023203c2f7765696768743e34646566656e6465725f766f7465041c617070726f766510626f6f6c408c2041732061206d656d6265722c20766f7465206f6e2074686520646566656e6465722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733af4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265a420617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743e68202d204b65793a204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e007820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d29302023203c2f7765696768743e187061796f757400504501205472616e7366657220746865206669727374206d617475726564207061796f757420666f72207468652073656e64657220616e642072656d6f76652069742066726f6d20746865207265636f7264732e006901204e4f54453a20546869732065787472696e736963206e6565647320746f2062652063616c6c6564206d756c7469706c652074696d657320746f20636c61696d206d756c7469706c65206d617475726564207061796f7574732e002101205061796d656e743a20546865206d656d6265722077696c6c20726563656976652061207061796d656e7420657175616c20746f207468656972206669727374206d61747572656478207061796f757420746f20746865697220667265652062616c616e63652e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d62657220776974684c207061796f7574732072656d61696e696e672e002c2023203c7765696768743e1d01204b65793a204d20286c656e206f66206d656d62657273292c205020286e756d626572206f66207061796f75747320666f72206120706172746963756c6172206d656d626572292501202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b207369676e65722069732061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28502920746f2067657420616c6c207061796f75747320666f722061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28312920746f20676574207468652063757272656e7420626c6f636b206e756d6265722e8c202d204f6e652063757272656e6379207472616e736665722063616c6c2e204f2858291101202d204f6e652073746f72616765207772697465206f722072656d6f76616c20746f2075706461746520746865206d656d6265722773207061796f7574732e204f285029009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2050202b205829302023203c2f7765696768743e14666f756e640c1c666f756e64657230543a3a4163636f756e7449642c6d61785f6d656d626572730c7533321472756c65731c5665633c75383e4c4c20466f756e642074686520736f63696574792e00f0205468697320697320646f6e65206173206120646973637265746520616374696f6e20696e206f7264657220746f20616c6c6f7720666f72207468651901206d6f64756c6520746f20626520696e636c7564656420696e746f20612072756e6e696e6720636861696e20616e642063616e206f6e6c7920626520646f6e65206f6e63652e001d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f466f756e6465725365744f726967696e5f2e003020506172616d65746572733a1901202d2060666f756e64657260202d20546865206669727374206d656d62657220616e642068656164206f6620746865206e65776c7920666f756e64656420736f63696574792e1501202d20606d61785f6d656d6265727360202d2054686520696e697469616c206d6178206e756d626572206f66206d656d6265727320666f722074686520736f63696574792ef4202d206072756c657360202d205468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e002c2023203c7765696768743ee0202d2054776f2073746f72616765206d75746174657320746f207365742060486561646020616e642060466f756e646572602e204f283129f4202d204f6e652073746f7261676520777269746520746f2061646420746865206669727374206d656d62657220746f20736f63696574792e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e1c756e666f756e6400348c20416e756c6c2074686520666f756e64696e67206f662074686520736f63696574792e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205369676e65642c20616e6420746865207369676e696e67206163636f756e74206d75737420626520626f74685901207468652060466f756e6465726020616e6420746865206048656164602e205468697320696d706c6965732074686174206974206d6179206f6e6c7920626520646f6e65207768656e207468657265206973206f6e6520206d656d6265722e002c2023203c7765696768743e68202d2054776f2073746f72616765207265616473204f2831292e78202d20466f75722073746f726167652072656d6f76616c73204f2831292e34202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e586a756467655f73757370656e6465645f6d656d626572080c77686f30543a3a4163636f756e7449641c666f726769766510626f6f6c6c2d0120416c6c6f772073757370656e73696f6e206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e646564206d656d6265722e00590120496620612073757370656e646564206d656d62657220697320666f72676976656e2c2077652073696d706c7920616464207468656d206261636b2061732061206d656d6265722c206e6f7420616666656374696e67cc20616e79206f6620746865206578697374696e672073746f72616765206974656d7320666f722074686174206d656d6265722e00490120496620612073757370656e646564206d656d6265722069732072656a65637465642c2072656d6f766520616c6c206173736f6369617465642073746f72616765206974656d732c20696e636c7564696e670101207468656972207061796f7574732c20616e642072656d6f766520616e7920766f7563686564206269647320746865792063757272656e746c7920686176652e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ab4202d206077686f60202d205468652073757370656e646564206d656d62657220746f206265206a75646765642e3501202d2060666f726769766560202d204120626f6f6c65616e20726570726573656e74696e672077686574686572207468652073757370656e73696f6e206a756467656d656e74206f726967696e2501202020202020202020202020202020666f726769766573202860747275656029206f722072656a6563747320286066616c7365602920612073757370656e646564206d656d6265722e002c2023203c7765696768743ea4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d6265727329f8202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e646564206d656d6265722e204f2831297101202d20557020746f206f6e652073746f72616765207772697465204f284d292077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d626572206261636b20746f20736f63696574792ef8202d20557020746f20332073746f726167652072656d6f76616c73204f28312920746f20636c65616e20757020612072656d6f766564206d656d6265722e4501202d20557020746f206f6e652073746f72616765207772697465204f2842292077697468204f2842292073656172636820746f2072656d6f766520766f7563686564206269642066726f6d20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e70202d204f6e652073746f726167652072656d6f76616c2e204f2831297c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204229302023203c2f7765696768743e646a756467655f73757370656e6465645f63616e646964617465080c77686f30543a3a4163636f756e744964246a756467656d656e74244a756467656d656e74a0350120416c6c6f772073757370656e646564206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e6465642063616e6469646174652e005d0120496620746865206a756467656d656e742069732060417070726f7665602c20776520616464207468656d20746f20736f63696574792061732061206d656d62657220776974682074686520617070726f70726961746574207061796d656e7420666f72206a6f696e696e6720736f63696574792e00550120496620746865206a756467656d656e74206973206052656a656374602c2077652065697468657220736c61736820746865206465706f736974206f6620746865206269642c20676976696e67206974206261636b110120746f2074686520736f63696574792074726561737572792c206f722077652062616e2074686520766f75636865722066726f6d20766f756368696e6720616761696e2e005d0120496620746865206a756467656d656e7420697320605265626964602c20776520707574207468652063616e646964617465206261636b20696e207468652062696420706f6f6c20616e64206c6574207468656d20676f94207468726f7567682074686520696e64756374696f6e2070726f6365737320616761696e2e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ac0202d206077686f60202d205468652073757370656e6465642063616e64696461746520746f206265206a75646765642ec4202d20606a756467656d656e7460202d2060417070726f7665602c206052656a656374602c206f7220605265626964602e002c2023203c7765696768743ef4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520616374696f6e29f0202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e6465642063616e6469646174652ec8202d204f6e652073746f726167652072656d6f76616c206f66207468652073757370656e6465642063616e6469646174652e40202d20417070726f7665204c6f676963150120092d204f6e652073746f72616765207265616420746f206765742074686520617661696c61626c6520706f7420746f2070617920757365727320776974682e204f283129dc20092d204f6e652073746f7261676520777269746520746f207570646174652074686520617661696c61626c6520706f742e204f283129e820092d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f283129b420092d204f6e652073746f72616765207265616420746f2067657420616c6c206d656d626572732e204f284d29a020092d20557020746f206f6e6520756e726573657276652063757272656e637920616374696f6e2eb020092d20557020746f2074776f206e65772073746f726167652077726974657320746f207061796f7574732e4d0120092d20557020746f206f6e652073746f726167652077726974652077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d62657220746f20736f63696574792e3c202d2052656a656374204c6f676963dc20092d20557020746f206f6e6520726570617472696174652072657365727665642063757272656e637920616374696f6e2e204f2858292d0120092d20557020746f206f6e652073746f7261676520777269746520746f2062616e2074686520766f756368696e67206d656d6265722066726f6d20766f756368696e6720616761696e2e38202d205265626964204c6f676963410120092d2053746f72616765206d75746174652077697468204f286c6f672042292062696e6172792073656172636820746f20706c616365207468652075736572206261636b20696e746f20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e5c202d204f6e652073746f726167652072656d6f76616c2e7c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2042202b205829302023203c2f7765696768743e3c7365745f6d61785f6d656d62657273040c6d61780c753332381d0120416c6c6f777320726f6f74206f726967696e20746f206368616e676520746865206d6178696d756d206e756d626572206f66206d656d6265727320696e20736f63696574792eb4204d6178206d656d6265727368697020636f756e74206d7573742062652067726561746572207468616e20312e00dc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d205f524f4f545f2e003020506172616d65746572733ae4202d20606d617860202d20546865206d6178696d756d206e756d626572206f66206d656d6265727320666f722074686520736f63696574792e002c2023203c7765696768743eb0202d204f6e652073746f7261676520777269746520746f2075706461746520746865206d61782e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e013c1c466f756e64656404244163636f756e74496404b82054686520736f636965747920697320666f756e6465642062792074686520676976656e206964656e746974792e0c42696408244163636f756e7449641c42616c616e63650861012041206d656d6265727368697020626964206a7573742068617070656e65642e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e64207468656972206f666665723c20697320746865207365636f6e642e14566f7563680c244163636f756e7449641c42616c616e6365244163636f756e7449640861012041206d656d6265727368697020626964206a7573742068617070656e656420627920766f756368696e672e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e64f0207468656972206f6666657220697320746865207365636f6e642e2054686520766f756368696e67207061727479206973207468652074686972642e244175746f556e62696404244163636f756e74496404090120412063616e646964617465207761732064726f70706564202864756520746f20616e20657863657373206f66206269647320696e207468652073797374656d292e14556e62696404244163636f756e74496404b020412063616e646964617465207761732064726f70706564202862792074686569722072657175657374292e1c556e766f75636804244163636f756e74496404f820412063616e646964617465207761732064726f70706564202862792072657175657374206f662077686f20766f756368656420666f72207468656d292e20496e64756374656408244163636f756e744964385665633c4163636f756e7449643e08590120412067726f7570206f662063616e646964617465732068617665206265656e20696e6475637465642e205468652062617463682773207072696d617279206973207468652066697273742076616c75652c207468657420626174636820696e2066756c6c20697320746865207365636f6e642e6053757370656e6465644d656d6265724a756467656d656e7408244163636f756e74496410626f6f6c048c20412073757370656e646564206d656d62657220686173206265656e206a75646765644843616e64696461746553757370656e64656404244163636f756e744964047c20412063616e64696461746520686173206265656e2073757370656e6465643c4d656d62657253757370656e64656404244163636f756e74496404702041206d656d62657220686173206265656e2073757370656e646564284368616c6c656e67656404244163636f756e74496404742041206d656d62657220686173206265656e206368616c6c656e67656410566f74650c244163636f756e744964244163636f756e74496410626f6f6c04c0204120766f746520686173206265656e20706c61636564202863616e6469646174652c20766f7465722c20766f74652930446566656e646572566f746508244163636f756e74496410626f6f6c04f0204120766f746520686173206265656e20706c6163656420666f72206120646566656e64696e67206d656d6265722028766f7465722c20766f746529344e65774d61784d656d62657273040c75333204902041206e6577206d6178206d656d62657220636f756e7420686173206265656e2073657424556e666f756e64656404244163636f756e744964045820536f636965747920697320756e666f756e6465642e184043616e6469646174654465706f7369743c42616c616e63654f663c542c20493e400080c6a47e8d0300000000000000000004fc20546865206d696e696d756d20616d6f756e74206f662061206465706f73697420726571756972656420666f7220612062696420746f206265206d6164652e4857726f6e6753696465446564756374696f6e3c42616c616e63654f663c542c20493e400080f420e6b5000000000000000000000855012054686520616d6f756e74206f662074686520756e70616964207265776172642074686174206765747320646564756374656420696e207468652063617365207468617420656974686572206120736b6570746963c020646f65736e277420766f7465206f7220736f6d656f6e6520766f74657320696e207468652077726f6e67207761792e284d6178537472696b65730c753332100a00000008750120546865206e756d626572206f662074696d65732061206d656d626572206d617920766f7465207468652077726f6e672077617920286f72206e6f7420617420616c6c2c207768656e207468657920617265206120736b65707469632978206265666f72652074686579206265636f6d652073757370656e6465642e2c506572696f645370656e643c42616c616e63654f663c542c20493e400000c52ebca2b1000000000000000000042d012054686520616d6f756e74206f6620696e63656e7469766520706169642077697468696e206561636820706572696f642e20446f65736e277420696e636c75646520566f7465725469702e38526f746174696f6e506572696f6438543a3a426c6f636b4e756d626572100077010004110120546865206e756d626572206f6620626c6f636b73206265747765656e2063616e6469646174652f6d656d6265727368697020726f746174696f6e20706572696f64732e3c4368616c6c656e6765506572696f6438543a3a426c6f636b4e756d626572108013030004d020546865206e756d626572206f6620626c6f636b73206265747765656e206d656d62657273686970206368616c6c656e6765732e482c426164506f736974696f6e049020416e20696e636f727265637420706f736974696f6e207761732070726f76696465642e244e6f744d656d62657204582055736572206973206e6f742061206d656d6265722e34416c72656164794d656d6265720468205573657220697320616c72656164792061206d656d6265722e2453757370656e646564044c20557365722069732073757370656e6465642e304e6f7453757370656e646564045c2055736572206973206e6f742073757370656e6465642e204e6f5061796f7574044c204e6f7468696e6720746f207061796f75742e38416c7265616479466f756e646564046420536f636965747920616c726561647920666f756e6465642e3c496e73756666696369656e74506f74049c204e6f7420656e6f75676820696e20706f7420746f206163636570742063616e6469646174652e3c416c7265616479566f756368696e6704e8204d656d62657220697320616c726561647920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e2e2c4e6f74566f756368696e670460204d656d626572206973206e6f7420766f756368696e672e104865616404942043616e6e6f742072656d6f7665207468652068656164206f662074686520636861696e2e1c466f756e646572046c2043616e6e6f742072656d6f76652074686520666f756e6465722e28416c7265616479426964047420557365722068617320616c7265616479206d6164652061206269642e40416c726561647943616e6469646174650474205573657220697320616c726561647920612063616e6469646174652e304e6f7443616e64696461746504642055736572206973206e6f7420612063616e6469646174652e284d61784d656d62657273048420546f6f206d616e79206d656d6265727320696e2074686520736f63696574792e284e6f74466f756e646572047c205468652063616c6c6572206973206e6f742074686520666f756e6465722e1c4e6f74486561640470205468652063616c6c6572206973206e6f742074686520686561642e205265636f7665727901205265636f766572790c2c5265636f76657261626c6500010130543a3a4163636f756e744964e85265636f76657279436f6e6669673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e0004000409012054686520736574206f66207265636f76657261626c65206163636f756e747320616e64207468656972207265636f7665727920636f6e66696775726174696f6e2e404163746976655265636f76657269657300020530543a3a4163636f756e74496430543a3a4163636f756e744964e84163746976655265636f766572793c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e050400106820416374697665207265636f7665727920617474656d7074732e001501204669727374206163636f756e7420697320746865206163636f756e7420746f206265207265636f76657265642c20616e6420746865207365636f6e64206163636f756e74ac20697320746865207573657220747279696e6720746f207265636f76657220746865206163636f756e742e245265636f766572656400010130543a3a4163636f756e74496430543a3a4163636f756e7449640004000c98205468652066696e616c206c697374206f66207265636f7665726564206163636f756e74732e00f8204d61702066726f6d20746865207265636f7665726564206163636f756e7420746f2074686520757365722077686f2063616e206163636573732069742e01203061735f7265636f7665726564081c6163636f756e7430543a3a4163636f756e7449641063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e34a42053656e6420612063616c6c207468726f7567682061207265636f7665726564206163636f756e742e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a2501202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f752077616e7420746f206d616b6520612063616c6c206f6e2d626568616c662d6f662e0101202d206063616c6c603a205468652063616c6c20796f752077616e7420746f206d616b65207769746820746865207265636f7665726564206163636f756e742e002c2023203c7765696768743e70202d2054686520776569676874206f6620746865206063616c6c602e0901202d204f6e652073746f72616765206c6f6f6b757020746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e347365745f7265636f766572656408106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e744964341d0120416c6c6f7720524f4f5420746f2062797061737320746865207265636f766572792070726f6365737320616e642073657420616e20612072657363756572206163636f756e747420666f722061206c6f7374206163636f756e74206469726563746c792e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f524f4f545f2e003020506172616d65746572733ab8202d20606c6f7374603a2054686520226c6f7374206163636f756e742220746f206265207265636f76657265642e1d01202d206072657363756572603a20546865202272657363756572206163636f756e74222077686963682063616e2063616c6c20617320746865206c6f7374206163636f756e742e002c2023203c7765696768743e64202d204f6e652073746f72616765207772697465204f28312930202d204f6e65206576656e74302023203c2f7765696768743e3c6372656174655f7265636f766572790c1c667269656e6473445665633c543a3a4163636f756e7449643e247468726573686f6c640c7531363064656c61795f706572696f6438543a3a426c6f636b4e756d6265726c5d01204372656174652061207265636f7665727920636f6e66696775726174696f6e20666f7220796f7572206163636f756e742e2054686973206d616b657320796f7572206163636f756e74207265636f76657261626c652e003101205061796d656e743a2060436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732062616c616e636549012077696c6c20626520726573657276656420666f722073746f72696e6720746865207265636f7665727920636f6e66696775726174696f6e2e2054686973206465706f7369742069732072657475726e6564bc20696e2066756c6c207768656e2074686520757365722063616c6c73206072656d6f76655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2501202d2060667269656e6473603a2041206c697374206f6620667269656e647320796f7520747275737420746f20766f75636820666f72207265636f7665727920617474656d7074732ed420202053686f756c64206265206f72646572656420616e6420636f6e7461696e206e6f206475706c69636174652076616c7565732e3101202d20607468726573686f6c64603a20546865206e756d626572206f6620667269656e64732074686174206d75737420766f75636820666f722061207265636f7665727920617474656d70741d012020206265666f726520746865206163636f756e742063616e206265207265636f76657265642e2053686f756c64206265206c657373207468616e206f7220657175616c20746f94202020746865206c656e677468206f6620746865206c697374206f6620667269656e64732e3d01202d206064656c61795f706572696f64603a20546865206e756d626572206f6620626c6f636b732061667465722061207265636f7665727920617474656d707420697320696e697469616c697a6564e820202074686174206e6565647320746f2070617373206265666f726520746865206163636f756e742063616e206265207265636f76657265642e002c2023203c7765696768743e68202d204b65793a204620286c656e206f6620667269656e6473292d01202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973206e6f7420616c7265616479207265636f76657261626c652e204f2831292eec202d204120636865636b20746861742074686520667269656e6473206c69737420697320736f7274656420616e6420756e697175652e204f2846299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f2858299c202d204f6e652073746f726167652077726974652e204f2831292e20436f646563204f2846292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e44696e6974696174655f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496458ec20496e697469617465207468652070726f6365737320666f72207265636f766572696e672061207265636f76657261626c65206163636f756e742e001d01205061796d656e743a20605265636f766572794465706f736974602062616c616e63652077696c6c20626520726573657276656420666f7220696e6974696174696e67207468652501207265636f766572792070726f636573732e2054686973206465706f7369742077696c6c20616c7761797320626520726570617472696174656420746f20746865206163636f756e74b820747279696e6720746f206265207265636f76657265642e205365652060636c6f73655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e2054686973206163636f756e7401012020206e6565647320746f206265207265636f76657261626c652028692e652e20686176652061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743ef8202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973207265636f76657261626c652e204f2846295101202d204f6e652073746f72616765207265616420746f20636865636b20746861742074686973207265636f766572792070726f63657373206861736e277420616c726561647920737461727465642e204f2831299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f285829e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831296c202d204f6e652073746f726167652077726974652e204f2831292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e38766f7563685f7265636f7665727908106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e74496464290120416c6c6f7720612022667269656e6422206f662061207265636f76657261626c65206163636f756e7420746f20766f75636820666f7220616e20616374697665207265636f76657279682070726f6365737320666f722074686174206163636f756e742e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d75737420626520612022667269656e64227420666f7220746865207265636f76657261626c65206163636f756e742e003020506172616d65746572733ad4202d20606c6f7374603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f2072657363756520746865206c6f7374206163636f756e74207468617420796f755420202077616e7420746f20766f75636820666f722e0025012054686520636f6d62696e6174696f6e206f662074686573652074776f20706172616d6574657273206d75737420706f696e7420746f20616e20616374697665207265636f76657279242070726f636573732e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629ec202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c6572206973206120667269656e642e204f286c6f6746291d01202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c657220686173206e6f7420616c726561647920766f75636865642e204f286c6f6756299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e00a420546f74616c20436f6d706c65786974793a204f2846202b206c6f6746202b2056202b206c6f675629302023203c2f7765696768743e38636c61696d5f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496450f420416c6c6f772061207375636365737366756c207265736375657220746f20636c61696d207468656972207265636f7665726564206163636f756e742e002d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061202272657363756572221d012077686f20686173207375636365737366756c6c7920636f6d706c6574656420746865206163636f756e74207265636f766572792070726f636573733a20636f6c6c6563746564310120607468726573686f6c6460206f72206d6f726520766f75636865732c20776169746564206064656c61795f706572696f646020626c6f636b732073696e636520696e6974696174696f6e2e003020506172616d65746572733a2d01202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f20636c61696d20686173206265656e207375636365737366756c6c79502020207265636f766572656420627920796f752e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205629302023203c2f7765696768743e38636c6f73655f7265636f76657279041c7265736375657230543a3a4163636f756e7449645015012041732074686520636f6e74726f6c6c6572206f662061207265636f76657261626c65206163636f756e742c20636c6f736520616e20616374697665207265636f76657279682070726f6365737320666f7220796f7572206163636f756e742e002101205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e2c20746865207265636f76657261626c65206163636f756e742077696c6c2072656365697665f820746865207265636f76657279206465706f73697420605265636f766572794465706f7369746020706c616365642062792074686520726573637565722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061f0207265636f76657261626c65206163636f756e74207769746820616e20616374697665207265636f766572792070726f6365737320666f722069742e003020506172616d65746572733a1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f207265736375652074686973207265636f76657261626c65206163636f756e742e002c2023203c7765696768743e84204b65793a205620286c656e206f6620766f756368696e6720667269656e6473293d01202d204f6e652073746f7261676520726561642f72656d6f766520746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629c0202d204f6e652062616c616e63652063616c6c20746f20726570617472696174652072657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2856202b205829302023203c2f7765696768743e3c72656d6f76655f7265636f766572790054b82052656d6f766520746865207265636f766572792070726f6365737320666f7220796f7572206163636f756e742e001501204e4f54453a205468652075736572206d757374206d616b65207375726520746f2063616c6c2060636c6f73655f7265636f7665727960206f6e20616c6c206163746976650901207265636f7665727920617474656d707473206265666f72652063616c6c696e6720746869732066756e6374696f6e20656c73652069742077696c6c206661696c2e002501205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e20746865207265636f76657261626c65206163636f756e742077696c6c20756e7265736572766598207468656972207265636f7665727920636f6e66696775726174696f6e206465706f7369742ef4202860436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732900050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061e4207265636f76657261626c65206163636f756e742028692e652e206861732061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743e60204b65793a204620286c656e206f6620667269656e6473292901202d204f6e652073746f72616765207265616420746f206765742074686520707265666978206974657261746f7220666f7220616374697665207265636f7665726965732e204f2831293901202d204f6e652073746f7261676520726561642f72656d6f766520746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846299c202d204f6e652062616c616e63652063616c6c20746f20756e72657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e01183c5265636f766572794372656174656404244163636f756e74496404c82041207265636f766572792070726f6365737320686173206265656e2073657420757020666f7220616e206163636f756e74445265636f76657279496e6974696174656408244163636f756e744964244163636f756e7449640405012041207265636f766572792070726f6365737320686173206265656e20696e6974696174656420666f72206163636f756e745f31206279206163636f756e745f323c5265636f76657279566f75636865640c244163636f756e744964244163636f756e744964244163636f756e7449640441012041207265636f766572792070726f6365737320666f72206163636f756e745f31206279206163636f756e745f3220686173206265656e20766f756368656420666f72206279206163636f756e745f33385265636f76657279436c6f73656408244163636f756e744964244163636f756e74496404f82041207265636f766572792070726f6365737320666f72206163636f756e745f31206279206163636f756e745f3220686173206265656e20636c6f736564404163636f756e745265636f766572656408244163636f756e744964244163636f756e74496404dc204163636f756e745f3120686173206265656e207375636365737366756c6c79207265636f7665726564206279206163636f756e745f323c5265636f7665727952656d6f76656404244163636f756e74496404cc2041207265636f766572792070726f6365737320686173206265656e2072656d6f76656420666f7220616e206163636f756e740000 \ No newline at end of file diff --git a/packages/polkadot/tests/meta/v10.json b/packages/polkadot/tests/meta/v10.json new file mode 100644 index 00000000..084b138a --- /dev/null +++ b/packages/polkadot/tests/meta/v10.json @@ -0,0 +1,7821 @@ +{ + "magicNumber": 1635018093, + "metadata": { + "V10": { + "modules": [ + { + "name": "System", + "storage": { + "prefix": "System", + "items": [ + { + "name": "AccountNonce", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Index", + "linked": false + } + }, + "fallback": "0x00000000", + "documentation": [ + " Extrinsics nonce for accounts." + ] + }, + { + "name": "ExtrinsicCount", + "modifier": "Optional", + "type": { + "Plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total extrinsics count for the current block." + ] + }, + { + "name": "AllExtrinsicsWeight", + "modifier": "Optional", + "type": { + "Plain": "Weight" + }, + "fallback": "0x00", + "documentation": [ + " Total weight for all extrinsics put together, for the current block." + ] + }, + { + "name": "AllExtrinsicsLen", + "modifier": "Optional", + "type": { + "Plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total length (in bytes) for all extrinsics put together, for the current block." + ] + }, + { + "name": "BlockHash", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "BlockNumber", + "value": "Hash", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Map of block numbers to block hashes." + ] + }, + { + "name": "ExtrinsicData", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "u32", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Extrinsics data for the current block (maps an extrinsic's index to its data)." + ] + }, + { + "name": "Number", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The current block number being processed. Set by `execute_block`." + ] + }, + { + "name": "ParentHash", + "modifier": "Default", + "type": { + "Plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Hash of the previous block." + ] + }, + { + "name": "ExtrinsicsRoot", + "modifier": "Default", + "type": { + "Plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Extrinsics root of the current block, also part of the block header." + ] + }, + { + "name": "Digest", + "modifier": "Default", + "type": { + "Plain": "DigestOf" + }, + "fallback": "0x00", + "documentation": [ + " Digest of the current block, also part of the block header." + ] + }, + { + "name": "Events", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Events deposited for the current block." + ] + }, + { + "name": "EventCount", + "modifier": "Default", + "type": { + "Plain": "EventIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of events in the `Events` list." + ] + }, + { + "name": "EventTopics", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "Vec<(BlockNumber,EventIndex)>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Mapping between a topic (represented by T::Hash) and a vector of indexes", + " of events in the `>` list.", + "", + " All topic vectors have deterministic storage locations depending on the topic. This", + " allows light-clients to leverage the changes trie storage tracking mechanism and", + " in case of changes fetch the list of events of interest.", + "", + " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just", + " the `EventIndex` then in case if the topic has the same contents on the next block", + " no notification will be triggered thus the event might be lost." + ] + } + ] + }, + "calls": [ + { + "name": "fill_block", + "args": [], + "documentation": [ + " A big dispatch that will disallow any other transaction to be included." + ] + }, + { + "name": "remark", + "args": [ + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Make some on-chain remark." + ] + }, + { + "name": "set_heap_pages", + "args": [ + { + "name": "pages", + "type": "u64" + } + ], + "documentation": [ + " Set the number of pages in the WebAssembly environment's heap." + ] + }, + { + "name": "set_code", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new runtime code." + ] + }, + { + "name": "set_code_without_checks", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new runtime code without doing any checks of the given `code`." + ] + }, + { + "name": "set_changes_trie_config", + "args": [ + { + "name": "changes_trie_config", + "type": "Option" + } + ], + "documentation": [ + " Set the new changes trie configuration." + ] + }, + { + "name": "set_storage", + "args": [ + { + "name": "items", + "type": "Vec" + } + ], + "documentation": [ + " Set some items of storage." + ] + }, + { + "name": "kill_storage", + "args": [ + { + "name": "keys", + "type": "Vec" + } + ], + "documentation": [ + " Kill some items from storage." + ] + }, + { + "name": "kill_prefix", + "args": [ + { + "name": "prefix", + "type": "Key" + } + ], + "documentation": [ + " Kill all storage items with a key that starts with the given prefix." + ] + } + ], + "events": [ + { + "name": "ExtrinsicSuccess", + "args": [ + "DispatchInfo" + ], + "documentation": [ + " An extrinsic completed successfully." + ] + }, + { + "name": "ExtrinsicFailed", + "args": [ + "DispatchError", + "DispatchInfo" + ], + "documentation": [ + " An extrinsic failed." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "InvalidSpecName", + "documentation": [ + " The name of specification does not match between the current runtime", + " and the new runtime." + ] + }, + { + "name": "SpecVersionNotAllowedToDecrease", + "documentation": [ + " The specification version is not allowed to decrease between the current runtime", + " and the new runtime." + ] + }, + { + "name": "ImplVersionNotAllowedToDecrease", + "documentation": [ + " The implementation version is not allowed to decrease between the current runtime", + " and the new runtime." + ] + }, + { + "name": "SpecOrImplVersionNeedToIncrease", + "documentation": [ + " The specification or the implementation version need to increase between the", + " current runtime and the new runtime." + ] + }, + { + "name": "FailedToExtractRuntimeVersion", + "documentation": [ + " Failed to extract the runtime version from the new runtime.", + "", + " Either calling `Core_version` or decoding `RuntimeVersion` failed." + ] + } + ] + }, + { + "name": "Utility", + "storage": { + "prefix": "Utility", + "items": [ + { + "name": "Multisigs", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "[u8;32]", + "value": "Multisig", + "key2Hasher": "Blake2_128Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " The set of open multisig operations." + ] + } + ] + }, + "calls": [ + { + "name": "batch", + "args": [ + { + "name": "calls", + "type": "Vec" + } + ], + "documentation": [ + " Send a batch of dispatch calls.", + "", + " This will execute until the first one fails and then stop.", + "", + " May be called from any origin.", + "", + " - `calls`: The calls to be dispatched from the same origin.", + "", + " # ", + " - The sum of the weights of the `calls`.", + " - One event.", + " # ", + "", + " This will return `Ok` in all circumstances. To determine the success of the batch, an", + " event is deposited. If a call failed and the batch was interrupted, then the", + " `BatchInterrupted` event is deposited, along with the number of successful calls made", + " and the error of the failed call. If all were successful, then the `BatchCompleted`", + " event is deposited." + ] + }, + { + "name": "as_sub", + "args": [ + { + "name": "index", + "type": "u16" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Send a call through an indexed pseudonym of the sender.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - The weight of the `call`.", + " # " + ] + }, + { + "name": "as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "maybe_timepoint", + "type": "Option" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Register approval for a dispatch to be made from a deterministic composite account if", + " approved by a total of `threshold - 1` of `other_signatories`.", + "", + " If there are enough, then dispatch the call.", + "", + " Payment: `MultisigDepositBase` will be reserved if this is the first approval, plus", + " `threshold` times `MultisigDepositFactor`. It is returned once this dispatch happens or", + " is cancelled.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + " not the first approval, then it must be `Some`, with the timepoint (block number and", + " transaction index) of the first approval transaction.", + " - `call`: The call to be executed.", + "", + " NOTE: Unless this is the final approval, you will generally want to use", + " `approve_as_multi` instead, since it only requires a hash of the call.", + "", + " Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise", + " on success, result is `Ok` and the result from the interior call, if it was executed,", + " may be found in the deposited `MultisigExecuted` event.", + "", + " # ", + " - `O(S + Z + Call)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.", + " - One encode & hash, both of complexity `O(S)`.", + " - Up to one binary search and insert (`O(logS + S)`).", + " - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + " - One event.", + " - The weight of the `call`.", + " - Storage: inserts one item, value size bounded by `MaxSignatories`, with a", + " deposit taken for its lifetime of", + " `MultisigDepositBase + threshold * MultisigDepositFactor`.", + " # " + ] + }, + { + "name": "approve_as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "maybe_timepoint", + "type": "Option" + }, + { + "name": "call_hash", + "type": "[u8;32]" + } + ], + "documentation": [ + " Register approval for a dispatch to be made from a deterministic composite account if", + " approved by a total of `threshold - 1` of `other_signatories`.", + "", + " Payment: `MultisigDepositBase` will be reserved if this is the first approval, plus", + " `threshold` times `MultisigDepositFactor`. It is returned once this dispatch happens or", + " is cancelled.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + " not the first approval, then it must be `Some`, with the timepoint (block number and", + " transaction index) of the first approval transaction.", + " - `call_hash`: The hash of the call to be executed.", + "", + " NOTE: If this is the final approval, you will want to use `as_multi` instead.", + "", + " # ", + " - `O(S)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One encode & hash, both of complexity `O(S)`.", + " - Up to one binary search and insert (`O(logS + S)`).", + " - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + " - One event.", + " - Storage: inserts one item, value size bounded by `MaxSignatories`, with a", + " deposit taken for its lifetime of", + " `MultisigDepositBase + threshold * MultisigDepositFactor`.", + " # " + ] + }, + { + "name": "cancel_as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "timepoint", + "type": "Timepoint" + }, + { + "name": "call_hash", + "type": "[u8;32]" + } + ], + "documentation": [ + " Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", + " for this operation will be unreserved on success.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `timepoint`: The timepoint (block number and transaction index) of the first approval", + " transaction for this dispatch.", + " - `call_hash`: The hash of the call to be executed.", + "", + " # ", + " - `O(S)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One encode & hash, both of complexity `O(S)`.", + " - One event.", + " - I/O: 1 read `O(S)`, one remove.", + " - Storage: removes one item.", + " # " + ] + } + ], + "events": [ + { + "name": "BatchInterrupted", + "args": [ + "u32", + "DispatchError" + ], + "documentation": [ + " Batch of dispatches did not complete fully. Index of first failing dispatch given, as", + " well as the error." + ] + }, + { + "name": "BatchCompleted", + "args": [], + "documentation": [ + " Batch of dispatches completed fully with no error." + ] + }, + { + "name": "NewMultisig", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A new multisig operation has begun. First param is the account that is approving,", + " second is the multisig account." + ] + }, + { + "name": "MultisigApproval", + "args": [ + "AccountId", + "Timepoint", + "AccountId" + ], + "documentation": [ + " A multisig operation has been approved by someone. First param is the account that is", + " approving, third is the multisig account." + ] + }, + { + "name": "MultisigExecuted", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "DispatchResult" + ], + "documentation": [ + " A multisig operation has been executed. First param is the account that is", + " approving, third is the multisig account." + ] + }, + { + "name": "MultisigCancelled", + "args": [ + "AccountId", + "Timepoint", + "AccountId" + ], + "documentation": [ + " A multisig operation has been cancelled. First param is the account that is", + " cancelling, third is the multisig account." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "Babe", + "storage": { + "prefix": "Babe", + "items": [ + { + "name": "EpochIndex", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current epoch index." + ] + }, + { + "name": "Authorities", + "modifier": "Default", + "type": { + "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + }, + "fallback": "0x00", + "documentation": [ + " Current epoch authorities." + ] + }, + { + "name": "GenesisSlot", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The slot at which the first epoch actually started. This is 0", + " until the first block of the chain." + ] + }, + { + "name": "CurrentSlot", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current slot number." + ] + }, + { + "name": "Randomness", + "modifier": "Default", + "type": { + "Plain": "[u8;32]" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The epoch randomness for the *current* epoch.", + "", + " # Security", + "", + " This MUST NOT be used for gambling, as it can be influenced by a", + " malicious validator in the short term. It MAY be used in many", + " cryptographic protocols, however, so long as one remembers that this", + " (like everything else on-chain) it is public. For example, it can be", + " used where a number is needed that cannot have been chosen by an", + " adversary, for purposes such as public-coin zero-knowledge proofs." + ] + }, + { + "name": "NextRandomness", + "modifier": "Default", + "type": { + "Plain": "[u8;32]" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Next epoch randomness." + ] + }, + { + "name": "SegmentIndex", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Randomness under construction.", + "", + " We make a tradeoff between storage accesses and list length.", + " We store the under-construction randomness in segments of up to", + " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.", + "", + " Once a segment reaches this length, we begin the next one.", + " We reset all segments and return to `0` at the beginning of every", + " epoch." + ] + }, + { + "name": "UnderConstruction", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "u32", + "value": "Vec<[u8;32]>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [] + }, + { + "name": "Initialized", + "modifier": "Optional", + "type": { + "Plain": "MaybeVrf" + }, + "fallback": "0x00", + "documentation": [ + " Temporary value (cleared at block finalization) which is `Some`", + " if per-block initialization has already been called for current block." + ] + } + ] + }, + "calls": [], + "events": null, + "constants": [ + { + "name": "EpochDuration", + "type": "u64", + "value": "0xc800000000000000", + "documentation": [ + " The number of **slots** that an epoch takes. We couple sessions to", + " epochs, i.e. we start a new session once the new epoch begins." + ] + }, + { + "name": "ExpectedBlockTime", + "type": "Moment", + "value": "0xb80b000000000000", + "documentation": [ + " The expected average block time at which BABE should be creating", + " blocks. Since BABE is probabilistic it is not trivial to figure out", + " what the expected average block time should be based on the slot", + " duration and the security parameter `c` (where `1 - c` represents", + " the probability of a slot being empty)." + ] + } + ], + "errors": [] + }, + { + "name": "Timestamp", + "storage": { + "prefix": "Timestamp", + "items": [ + { + "name": "Now", + "modifier": "Default", + "type": { + "Plain": "Moment" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current time for the current block." + ] + }, + { + "name": "DidUpdate", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Did the timestamp get updated in this block?" + ] + } + ] + }, + "calls": [ + { + "name": "set", + "args": [ + { + "name": "now", + "type": "Compact" + } + ], + "documentation": [ + " Set the current time.", + "", + " This call should be invoked exactly once per block. It will panic at the finalization", + " phase, if this call hasn't been invoked by that time.", + "", + " The timestamp should be greater than the previous one by the amount specified by", + " `MinimumPeriod`.", + "", + " The dispatch origin for this call must be `Inherent`." + ] + } + ], + "events": null, + "constants": [ + { + "name": "MinimumPeriod", + "type": "Moment", + "value": "0xdc05000000000000", + "documentation": [ + " The minimum period between blocks. Beware that this is different to the *expected* period", + " that the block production apparatus provides. Your chosen consensus system will generally", + " work with this to determine a sensible block time. e.g. For Aura, it will be double this", + " period on default settings." + ] + } + ], + "errors": [] + }, + { + "name": "Authorship", + "storage": { + "prefix": "Authorship", + "items": [ + { + "name": "Uncles", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Uncles" + ] + }, + { + "name": "Author", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " Author of current block." + ] + }, + { + "name": "DidSetUncles", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Whether uncles were already set in this block." + ] + } + ] + }, + "calls": [ + { + "name": "set_uncles", + "args": [ + { + "name": "new_uncles", + "type": "Vec
" + } + ], + "documentation": [ + " Provide a set of uncles." + ] + } + ], + "events": null, + "constants": [], + "errors": [ + { + "name": "InvalidUncleParent", + "documentation": [ + " The uncle parent not in the chain." + ] + }, + { + "name": "UnclesAlreadySet", + "documentation": [ + " Uncles already set in the block." + ] + }, + { + "name": "TooManyUncles", + "documentation": [ + " Too many uncles." + ] + }, + { + "name": "GenesisUncle", + "documentation": [ + " The uncle is genesis." + ] + }, + { + "name": "TooHighUncle", + "documentation": [ + " The uncle is too high in chain." + ] + }, + { + "name": "UncleAlreadyIncluded", + "documentation": [ + " The uncle is already included." + ] + }, + { + "name": "OldUncle", + "documentation": [ + " The uncle isn't recent enough to be included." + ] + } + ] + }, + { + "name": "Indices", + "storage": { + "prefix": "Indices", + "items": [ + { + "name": "NextEnumSet", + "modifier": "Default", + "type": { + "Plain": "AccountIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The next free enumeration set." + ] + }, + { + "name": "EnumSet", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountIndex", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The enumeration sets." + ] + } + ] + }, + "calls": [], + "events": [ + { + "name": "NewAccountIndex", + "args": [ + "AccountId", + "AccountIndex" + ], + "documentation": [ + " A new account index was assigned.", + "", + " This event is not triggered when an existing index is reassigned", + " to another `AccountId`." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "Balances", + "storage": { + "prefix": "Balances", + "items": [ + { + "name": "TotalIssuance", + "modifier": "Default", + "type": { + "Plain": "Balance" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The total units issued in the system." + ] + }, + { + "name": "Vesting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "VestingSchedule", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information regarding the vesting of a given account." + ] + }, + { + "name": "FreeBalance", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Balance", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The 'free' balance of a given account.", + "", + " This is the only balance that matters in terms of most operations on tokens. It", + " alone is used to determine the balance when in the contract execution environment. When this", + " balance falls below the value of `ExistentialDeposit`, then the 'current account' is", + " deleted: specifically `FreeBalance`. Further, the `OnFreeBalanceZero` callback", + " is invoked, giving a chance to external modules to clean up data associated with", + " the deleted account.", + "", + " `frame_system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`." + ] + }, + { + "name": "ReservedBalance", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Balance", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of the balance of a given account that is externally reserved; this can still get", + " slashed, but gets slashed last of all.", + "", + " This balance is a 'reserve' balance that other subsystems use in order to set aside tokens", + " that are still 'owned' by the account holder, but which are suspendable.", + "", + " When this balance falls below the value of `ExistentialDeposit`, then this 'reserve account'", + " is deleted: specifically, `ReservedBalance`.", + "", + " `frame_system::AccountNonce` is also deleted if `FreeBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`.)" + ] + }, + { + "name": "Locks", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Any liquidity locks on some account balances." + ] + } + ] + }, + "calls": [ + { + "name": "transfer", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Transfer some liquid free balance to another account.", + "", + " `transfer` will set the `FreeBalance` of the sender and receiver.", + " It will decrease the total issuance of the system by the `TransferFee`.", + " If the sender's account is below the existential deposit as a result", + " of the transfer, the account will be reaped.", + "", + " The dispatch origin for this call must be `Signed` by the transactor.", + "", + " # ", + " - Dependent on arguments but not critical, given proper implementations for", + " input config types. See related functions below.", + " - It contains a limited number of reads and writes internally and no complex computation.", + "", + " Related functions:", + "", + " - `ensure_can_withdraw` is always called internally but has a bounded complexity.", + " - Transferring balances to accounts that did not exist before will cause", + " `T::OnNewAccount::on_new_account` to be called.", + " - Removing enough funds from an account will trigger", + " `T::DustRemoval::on_unbalanced` and `T::OnFreeBalanceZero::on_free_balance_zero`.", + " - `transfer_keep_alive` works the same way as `transfer`, but has an additional", + " check that the transfer will not kill the origin account.", + "", + " # " + ] + }, + { + "name": "set_balance", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "new_free", + "type": "Compact" + }, + { + "name": "new_reserved", + "type": "Compact" + } + ], + "documentation": [ + " Set the balances of a given account.", + "", + " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", + " also decrease the total issuance of the system (`TotalIssuance`).", + " If the new free or reserved balance is below the existential deposit,", + " it will reset the account nonce (`frame_system::AccountNonce`).", + "", + " The dispatch origin for this call is `root`.", + "", + " # ", + " - Independent of the arguments.", + " - Contains a limited number of reads and writes.", + " # " + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Exactly as `transfer`, except the origin must be root and the source account may be", + " specified." + ] + }, + { + "name": "transfer_keep_alive", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Same as the [`transfer`] call, but with a check that the transfer will not kill the", + " origin account.", + "", + " 99% of the time you want [`transfer`] instead.", + "", + " [`transfer`]: struct.Module.html#method.transfer" + ] + } + ], + "events": [ + { + "name": "NewAccount", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A new account was created." + ] + }, + { + "name": "ReapedAccount", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account was reaped." + ] + }, + { + "name": "Transfer", + "args": [ + "AccountId", + "AccountId", + "Balance", + "Balance" + ], + "documentation": [ + " Transfer succeeded (from, to, value, fees)." + ] + }, + { + "name": "BalanceSet", + "args": [ + "AccountId", + "Balance", + "Balance" + ], + "documentation": [ + " A balance was set by root (who, free, reserved)." + ] + }, + { + "name": "Deposit", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some amount was deposited (e.g. for transaction fees)." + ] + } + ], + "constants": [ + { + "name": "ExistentialDeposit", + "type": "Balance", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The minimum amount required to keep an account open." + ] + }, + { + "name": "TransferFee", + "type": "Balance", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to make a transfer." + ] + }, + { + "name": "CreationFee", + "type": "Balance", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to create an account." + ] + } + ], + "errors": [ + { + "name": "VestingBalance", + "documentation": [ + " Vesting balance too high to send value" + ] + }, + { + "name": "LiquidityRestrictions", + "documentation": [ + " Account liquidity restrictions prevent withdrawal" + ] + }, + { + "name": "Overflow", + "documentation": [ + " Got an overflow after adding" + ] + }, + { + "name": "InsufficientBalance", + "documentation": [ + " Balance too low to send value" + ] + }, + { + "name": "ExistentialDeposit", + "documentation": [ + " Value too low to create account due to existential deposit" + ] + }, + { + "name": "KeepAlive", + "documentation": [ + " Transfer/payment would kill account" + ] + }, + { + "name": "ExistingVestingSchedule", + "documentation": [ + " A vesting schedule already exists for this account" + ] + }, + { + "name": "DeadAccount", + "documentation": [ + " Beneficiary account must pre-exist" + ] + } + ] + }, + { + "name": "TransactionPayment", + "storage": { + "prefix": "Balances", + "items": [ + { + "name": "NextFeeMultiplier", + "modifier": "Default", + "type": { + "Plain": "Multiplier" + }, + "fallback": "0x0000000000000000", + "documentation": [] + } + ] + }, + "calls": null, + "events": null, + "constants": [ + { + "name": "TransactionBaseFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the base." + ] + }, + { + "name": "TransactionByteFee", + "type": "BalanceOf", + "value": "0x00e40b54020000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + } + ], + "errors": [] + }, + { + "name": "Staking", + "storage": { + "prefix": "Staking", + "items": [ + { + "name": "ValidatorCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The ideal number of staking participants." + ] + }, + { + "name": "MinimumValidatorCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x04000000", + "documentation": [ + " Minimum number of staking participants before emergency conditions are imposed." + ] + }, + { + "name": "Invulnerables", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", + " easy to initialize and the performance hit is minimal (we expect no more than four", + " invulnerables) and restricted to testnets." + ] + }, + { + "name": "Bonded", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all locked \"stash\" accounts to the controller account." + ] + }, + { + "name": "Ledger", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "StakingLedger", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." + ] + }, + { + "name": "Payee", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "RewardDestination", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Where the reward payment should be made. Keyed by stash." + ] + }, + { + "name": "Validators", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "ValidatorPrefs", + "linked": true + } + }, + "fallback": "0x00", + "documentation": [ + " The map from (wannabe) validator stash key to the preferences of that validator." + ] + }, + { + "name": "Nominators", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Nominations", + "linked": true + } + }, + "fallback": "0x00", + "documentation": [ + " The map from nominator stash key to the set of stash keys of all validators to nominate.", + "", + " NOTE: is private so that we can ensure upgraded before all typical accesses.", + " Direct storage APIs can still bypass this protection." + ] + }, + { + "name": "Stakers", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Exposure", + "linked": false + } + }, + "fallback": "0x000000", + "documentation": [ + " Nominators for a particular account that is in action right now. You can't iterate", + " through validators here, but you can find them in the Session module.", + "", + " This is keyed by the stash account." + ] + }, + { + "name": "CurrentElected", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The currently elected validator set keyed by stash account ID." + ] + }, + { + "name": "CurrentEra", + "modifier": "Default", + "type": { + "Plain": "EraIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The current era index." + ] + }, + { + "name": "CurrentEraStart", + "modifier": "Default", + "type": { + "Plain": "MomentOf" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The start of the current era." + ] + }, + { + "name": "CurrentEraStartSessionIndex", + "modifier": "Default", + "type": { + "Plain": "SessionIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The session index at which the current era started." + ] + }, + { + "name": "CurrentEraPointsEarned", + "modifier": "Default", + "type": { + "Plain": "EraPoints" + }, + "fallback": "0x0000000000", + "documentation": [ + " Rewards for the current era. Using indices of current elected set." + ] + }, + { + "name": "SlotStake", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of balance actively at stake for each validator slot, currently.", + "", + " This is used to derive rewards and punishments." + ] + }, + { + "name": "ForceEra", + "modifier": "Default", + "type": { + "Plain": "Forcing" + }, + "fallback": "0x00", + "documentation": [ + " True if the next session change will be a new era regardless of index." + ] + }, + { + "name": "SlashRewardFraction", + "modifier": "Default", + "type": { + "Plain": "Perbill" + }, + "fallback": "0x00000000", + "documentation": [ + " The percentage of the slash that is distributed to reporters.", + "", + " The rest of the slashed value is handled by the `Slash`." + ] + }, + { + "name": "CanceledSlashPayout", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of currency given to reporters of a slash event which was", + " canceled by extraordinary circumstances (e.g. governance)." + ] + }, + { + "name": "UnappliedSlashes", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "EraIndex", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " All unapplied slashes that are queued for later." + ] + }, + { + "name": "BondedEras", + "modifier": "Default", + "type": { + "Plain": "Vec<(EraIndex,SessionIndex)>" + }, + "fallback": "0x00", + "documentation": [ + " A mapping from still-bonded eras to the first session index of that era." + ] + }, + { + "name": "ValidatorSlashInEra", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "EraIndex", + "key2": "AccountId", + "value": "(Perbill,BalanceOf)", + "key2Hasher": "Twox128" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on validators, mapped by era to the highest slash proportion", + " and slash value of the era." + ] + }, + { + "name": "NominatorSlashInEra", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "EraIndex", + "key2": "AccountId", + "value": "BalanceOf", + "key2Hasher": "Twox128" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on nominators, mapped by era to the highest slash value of the era." + ] + }, + { + "name": "SlashingSpans", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "SlashingSpans", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Slashing spans for stash accounts." + ] + }, + { + "name": "SpanSlash", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "(AccountId,SpanIndex)", + "value": "SpanRecord", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Records information about the maximum slash of a stash within a slashing span,", + " as well as how much reward has been paid out." + ] + }, + { + "name": "EarliestUnappliedSlash", + "modifier": "Optional", + "type": { + "Plain": "EraIndex" + }, + "fallback": "0x00", + "documentation": [ + " The earliest era for which we have a pending, unapplied slash." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The version of storage for upgrade." + ] + } + ] + }, + "calls": [ + { + "name": "bond", + "args": [ + { + "name": "controller", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " Take the origin account as a stash and lock up `value` of its balance. `controller` will", + " be the account that controls it.", + "", + " `value` must be more than the `minimum_balance` specified by `T::Currency`.", + "", + " The dispatch origin for this call must be _Signed_ by the stash account.", + "", + " # ", + " - Independent of the arguments. Moderate complexity.", + " - O(1).", + " - Three extra DB entries.", + "", + " NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned unless", + " the `origin` falls below _existential deposit_ and gets removed as dust.", + " # " + ] + }, + { + "name": "bond_extra", + "args": [ + { + "name": "max_additional", + "type": "Compact" + } + ], + "documentation": [ + " Add some extra amount that have appeared in the stash `free_balance` into the balance up", + " for staking.", + "", + " Use this if there are additional funds in your stash account that you wish to bond.", + " Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount", + " that can be added.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - O(1).", + " - One DB entry.", + " # " + ] + }, + { + "name": "unbond", + "args": [ + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", + " period ends. If this leaves an amount actively bonded less than", + " T::Currency::minimum_balance(), then it is increased to the full amount.", + "", + " Once the unlock period is done, you can call `withdraw_unbonded` to actually move", + " the funds out of management ready for transfer.", + "", + " No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)", + " can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need", + " to be called first to remove some of the chunks (if possible).", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " See also [`Call::withdraw_unbonded`].", + "", + " # ", + " - Independent of the arguments. Limited but potentially exploitable complexity.", + " - Contains a limited number of reads.", + " - Each call (requires the remainder of the bonded balance to be above `minimum_balance`)", + " will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage.", + " The only way to clean the aforementioned storage item is also user-controlled via `withdraw_unbonded`.", + " - One DB entry.", + " " + ] + }, + { + "name": "withdraw_unbonded", + "args": [], + "documentation": [ + " Remove any unlocked chunks from the `unlocking` queue from our management.", + "", + " This essentially frees up that balance to be used by the stash account to do", + " whatever it wants.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " See also [`Call::unbond`].", + "", + " # ", + " - Could be dependent on the `origin` argument and how much `unlocking` chunks exist.", + " It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is", + " indirectly user-controlled. See [`unbond`] for more detail.", + " - Contains a limited number of reads, yet the size of which could be large based on `ledger`.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "validate", + "args": [ + { + "name": "prefs", + "type": "ValidatorPrefs" + } + ], + "documentation": [ + " Declare the desire to validate for the origin controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "nominate", + "args": [ + { + "name": "targets", + "type": "Vec" + } + ], + "documentation": [ + " Declare the desire to nominate `targets` for the origin controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - The transaction's complexity is proportional to the size of `targets`,", + " which is capped at `MAX_NOMINATIONS`.", + " - Both the reads and writes follow a similar pattern.", + " # " + ] + }, + { + "name": "chill", + "args": [], + "documentation": [ + " Declare no desire to either validate or nominate.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains one read.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "set_payee", + "args": [ + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " (Re-)set the payment target for a controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "set_controller", + "args": [ + { + "name": "controller", + "type": "LookupSource" + } + ], + "documentation": [ + " (Re-)set the controller of a stash.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " # " + ] + }, + { + "name": "set_validator_count", + "args": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " The ideal number of validators." + ] + }, + { + "name": "force_no_eras", + "args": [], + "documentation": [ + " Force there to be no new eras indefinitely.", + "", + " # ", + " - No arguments.", + " # " + ] + }, + { + "name": "force_new_era", + "args": [], + "documentation": [ + " Force there to be a new era at the end of the next session. After this, it will be", + " reset to normal (non-forced) behaviour.", + "", + " # ", + " - No arguments.", + " # " + ] + }, + { + "name": "set_invulnerables", + "args": [ + { + "name": "validators", + "type": "Vec" + } + ], + "documentation": [ + " Set the validators who cannot be slashed (if any)." + ] + }, + { + "name": "force_unstake", + "args": [ + { + "name": "stash", + "type": "AccountId" + } + ], + "documentation": [ + " Force a current staker to become completely unstaked, immediately." + ] + }, + { + "name": "force_new_era_always", + "args": [], + "documentation": [ + " Force there to be a new era at the end of sessions indefinitely.", + "", + " # ", + " - One storage write", + " # " + ] + }, + { + "name": "cancel_deferred_slash", + "args": [ + { + "name": "era", + "type": "EraIndex" + }, + { + "name": "slash_indices", + "type": "Vec" + } + ], + "documentation": [ + " Cancel enactment of a deferred slash. Can be called by either the root origin or", + " the `T::SlashCancelOrigin`.", + " passing the era and indices of the slashes for that era to kill.", + "", + " # ", + " - One storage write.", + " # " + ] + }, + { + "name": "rebond", + "args": [ + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Rebond a portion of the stash scheduled to be unlocked.", + "", + " # ", + " - Time complexity: O(1). Bounded by `MAX_UNLOCKING_CHUNKS`.", + " - Storage changes: Can't increase storage, only decrease it.", + " # " + ] + } + ], + "events": [ + { + "name": "Reward", + "args": [ + "Balance", + "Balance" + ], + "documentation": [ + " All validators have been rewarded by the first balance; the second is the remainder", + " from the maximum amount of reward." + ] + }, + { + "name": "Slash", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " One validator (and its nominators) has been slashed by the given amount." + ] + }, + { + "name": "OldSlashingReportDiscarded", + "args": [ + "SessionIndex" + ], + "documentation": [ + " An old slashing report from a prior era was discarded because it could", + " not be processed." + ] + } + ], + "constants": [ + { + "name": "SessionsPerEra", + "type": "SessionIndex", + "value": "0x06000000", + "documentation": [ + " Number of sessions per era." + ] + }, + { + "name": "BondingDuration", + "type": "EraIndex", + "value": "0xa0020000", + "documentation": [ + " Number of eras that staked funds must remain bonded for." + ] + } + ], + "errors": [ + { + "name": "NotController", + "documentation": [ + " Not a controller account." + ] + }, + { + "name": "NotStash", + "documentation": [ + " Not a stash account." + ] + }, + { + "name": "AlreadyBonded", + "documentation": [ + " Stash is already bonded." + ] + }, + { + "name": "AlreadyPaired", + "documentation": [ + " Controller is already paired." + ] + }, + { + "name": "EmptyTargets", + "documentation": [ + " Targets cannot be empty." + ] + }, + { + "name": "DuplicateIndex", + "documentation": [ + " Duplicate index." + ] + }, + { + "name": "InvalidSlashIndex", + "documentation": [ + " Slash record index out of bounds." + ] + }, + { + "name": "InsufficientValue", + "documentation": [ + " Can not bond with value less than minimum balance." + ] + }, + { + "name": "NoMoreChunks", + "documentation": [ + " Can not schedule more unlock chunks." + ] + }, + { + "name": "NoUnlockChunk", + "documentation": [ + " Can not rebond without unlocking chunks." + ] + } + ] + }, + { + "name": "Session", + "storage": { + "prefix": "Session", + "items": [ + { + "name": "Validators", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of validators." + ] + }, + { + "name": "CurrentIndex", + "modifier": "Default", + "type": { + "Plain": "SessionIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Current index of the session." + ] + }, + { + "name": "QueuedChanged", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the underlying economic identities or weighting behind the validators", + " has changed in the queued validator set." + ] + }, + { + "name": "QueuedKeys", + "modifier": "Default", + "type": { + "Plain": "Vec<(ValidatorId,Keys)>" + }, + "fallback": "0x00", + "documentation": [ + " The queued keys for the next session. When the next session begins, these keys", + " will be used to determine the validator's session keys." + ] + }, + { + "name": "DisabledValidators", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Indices of disabled validators.", + "", + " The set is cleared when `on_session_ending` returns a new set of identities." + ] + }, + { + "name": "NextKeys", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "Bytes", + "key2": "ValidatorId", + "value": "Keys", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00", + "documentation": [ + " The next session keys for a validator.", + "", + " The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of", + " the trie. Having all data in the same branch should prevent slowing down other queries." + ] + }, + { + "name": "KeyOwner", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "Bytes", + "key2": "(KeyTypeId,Bytes)", + "value": "ValidatorId", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00", + "documentation": [ + " The owner of a key. The second key is the `KeyTypeId` + the encoded key.", + "", + " The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of", + " the trie. Having all data in the same branch should prevent slowing down other queries." + ] + } + ] + }, + "calls": [ + { + "name": "set_keys", + "args": [ + { + "name": "keys", + "type": "Keys" + }, + { + "name": "proof", + "type": "Bytes" + } + ], + "documentation": [ + " Sets the session key(s) of the function caller to `key`.", + " Allows an account to set its session key prior to becoming a validator.", + " This doesn't take effect until the next session.", + "", + " The dispatch origin of this function must be signed.", + "", + " # ", + " - O(log n) in number of accounts.", + " - One extra DB entry.", + " # " + ] + } + ], + "events": [ + { + "name": "NewSession", + "args": [ + "SessionIndex" + ], + "documentation": [ + " New session has happened. Note that the argument is the session index, not the block", + " number as the type might suggest." + ] + } + ], + "constants": [ + { + "name": "DEDUP_KEY_PREFIX", + "type": "Bytes", + "value": "0x343a73657373696f6e3a6b657973", + "documentation": [ + " Used as first key for `NextKeys` and `KeyOwner` to put all the data into the same branch", + " of the trie." + ] + } + ], + "errors": [ + { + "name": "InvalidProof", + "documentation": [ + " Invalid ownership proof." + ] + }, + { + "name": "NoAssociatedValidatorId", + "documentation": [ + " No associated validator ID for account." + ] + }, + { + "name": "DuplicatedKey", + "documentation": [ + " Registered duplicate key." + ] + } + ] + }, + { + "name": "Democracy", + "storage": { + "prefix": "Democracy", + "items": [ + { + "name": "PublicPropCount", + "modifier": "Default", + "type": { + "Plain": "PropIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of (public) proposals that have been made so far." + ] + }, + { + "name": "PublicProps", + "modifier": "Default", + "type": { + "Plain": "Vec<(PropIndex,Hash,AccountId)>" + }, + "fallback": "0x00", + "documentation": [ + " The public proposals. Unsorted. The second item is the proposal's hash." + ] + }, + { + "name": "Preimages", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "(Bytes,AccountId,BalanceOf,BlockNumber)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map of hashes to the proposal preimage, along with who registered it and their deposit.", + " The block number is the block at which it was deposited." + ] + }, + { + "name": "DepositOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "PropIndex", + "value": "(BalanceOf,Vec)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Those who have locked a deposit." + ] + }, + { + "name": "ReferendumCount", + "modifier": "Default", + "type": { + "Plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The next free referendum index, aka the number of referenda started so far." + ] + }, + { + "name": "LowestUnbaked", + "modifier": "Default", + "type": { + "Plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The lowest referendum index representing an unbaked referendum. Equal to", + " `ReferendumCount` if there isn't a unbaked referendum." + ] + }, + { + "name": "ReferendumInfoOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "ReferendumIndex", + "value": "ReferendumInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information concerning any given referendum." + ] + }, + { + "name": "DispatchQueue", + "modifier": "Default", + "type": { + "Plain": "Vec<(BlockNumber,Hash,ReferendumIndex)>" + }, + "fallback": "0x00", + "documentation": [ + " Queue of successful referenda to be dispatched. Stored ordered by block number." + ] + }, + { + "name": "VotersFor", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "ReferendumIndex", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Get the voters for the current proposal." + ] + }, + { + "name": "VoteOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "(ReferendumIndex,AccountId)", + "value": "Vote", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Get the vote in a given referendum of a particular voter. The result is meaningful only", + " if `voters_for` includes the voter when called with the referendum (you'll get the", + " default `Vote` value otherwise). If you don't want to check `voters_for`, then you can", + " also check for simple existence with `VoteOf::exists` first." + ] + }, + { + "name": "Proxy", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Who is able to vote for whom. Value is the fund-holding account, key is the", + " vote-transaction-sending account." + ] + }, + { + "name": "Delegations", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "(AccountId,Conviction)", + "linked": true + } + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Get the account (and lock periods) to which another account is delegating vote." + ] + }, + { + "name": "LastTabledWasExternal", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the last referendum tabled was submitted externally. False if it was a public", + " proposal." + ] + }, + { + "name": "NextExternal", + "modifier": "Optional", + "type": { + "Plain": "(Hash,VoteThreshold)" + }, + "fallback": "0x00", + "documentation": [ + " The referendum to be tabled whenever it would be valid to table an external proposal.", + " This happens when a referendum needs to be tabled and one of two conditions are met:", + " - `LastTabledWasExternal` is `false`; or", + " - `PublicProps` is empty." + ] + }, + { + "name": "Blacklist", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "(BlockNumber,Vec)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A record of who vetoed what. Maps proposal hash to a possible existent block number", + " (until when it may not be resubmitted) and who vetoed it." + ] + }, + { + "name": "Cancellations", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "bool", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Record of all proposals that have been subject to emergency cancellation." + ] + } + ] + }, + "calls": [ + { + "name": "propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken.", + "", + " # ", + " - O(1).", + " - Two DB changes, one DB entry.", + " # " + ] + }, + { + "name": "second", + "args": [ + { + "name": "proposal", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken.", + "", + " # ", + " - O(1).", + " - One DB entry.", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "name": "vote", + "type": "Vote" + } + ], + "documentation": [ + " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", + " otherwise it is a vote to keep the status quo.", + "", + " # ", + " - O(1).", + " - One DB change, one DB entry.", + " # " + ] + }, + { + "name": "proxy_vote", + "args": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "name": "vote", + "type": "Vote" + } + ], + "documentation": [ + " Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact", + " the proposal; otherwise it is a vote to keep the status quo.", + "", + " # ", + " - O(1).", + " - One DB change, one DB entry.", + " # " + ] + }, + { + "name": "emergency_cancel", + "args": [ + { + "name": "ref_index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", + " referendum." + ] + }, + { + "name": "external_propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a referendum to be tabled once it is legal to schedule an external", + " referendum." + ] + }, + { + "name": "external_propose_majority", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", + " an external referendum.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call." + ] + }, + { + "name": "external_propose_default", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", + " schedule an external referendum.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call." + ] + }, + { + "name": "fast_track", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "voting_period", + "type": "BlockNumber" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Schedule the currently externally-proposed majority-carries referendum to be tabled", + " immediately. If there is no externally-proposed referendum currently, or if there is one", + " but it is not a majority-carries referendum then it fails.", + "", + " - `proposal_hash`: The hash of the current external proposal.", + " - `voting_period`: The period that is allowed for voting on this proposal. Increased to", + " `EmergencyVotingPeriod` if too low.", + " - `delay`: The number of block after voting has ended in approval and this should be", + " enacted. This doesn't have a minimum amount." + ] + }, + { + "name": "veto_external", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Veto and blacklist the external proposal hash." + ] + }, + { + "name": "cancel_referendum", + "args": [ + { + "name": "ref_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a referendum." + ] + }, + { + "name": "cancel_queued", + "args": [ + { + "name": "which", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Cancel a proposal queued for enactment." + ] + }, + { + "name": "set_proxy", + "args": [ + { + "name": "proxy", + "type": "AccountId" + } + ], + "documentation": [ + " Specify a proxy. Called by the stash.", + "", + " # ", + " - One extra DB entry.", + " # " + ] + }, + { + "name": "resign_proxy", + "args": [], + "documentation": [ + " Clear the proxy. Called by the proxy.", + "", + " # ", + " - One DB clear.", + " # " + ] + }, + { + "name": "remove_proxy", + "args": [ + { + "name": "proxy", + "type": "AccountId" + } + ], + "documentation": [ + " Clear the proxy. Called by the stash.", + "", + " # ", + " - One DB clear.", + " # " + ] + }, + { + "name": "delegate", + "args": [ + { + "name": "to", + "type": "AccountId" + }, + { + "name": "conviction", + "type": "Conviction" + } + ], + "documentation": [ + " Delegate vote.", + "", + " # ", + " - One extra DB entry.", + " # " + ] + }, + { + "name": "undelegate", + "args": [], + "documentation": [ + " Undelegate vote.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "clear_public_proposals", + "args": [], + "documentation": [ + " Veto and blacklist the proposal hash. Must be from Root origin." + ] + }, + { + "name": "note_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", + " in the dispatch queue but does require a deposit, returned once enacted." + ] + }, + { + "name": "note_imminent_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This requires the proposal to be", + " in the dispatch queue. No deposit is needed." + ] + }, + { + "name": "reap_preimage", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Remove an expired proposal preimage and collect the deposit.", + "", + " This will only work after `VotingPeriod` blocks from the time that the preimage was", + " noted, if it's the same account doing it. If it's a different account, then it'll only", + " work an additional `EnactmentPeriod` later." + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "PropIndex", + "Balance" + ], + "documentation": [ + " A motion has been proposed by a public account." + ] + }, + { + "name": "Tabled", + "args": [ + "PropIndex", + "Balance", + "Vec" + ], + "documentation": [ + " A public proposal has been tabled for referendum vote." + ] + }, + { + "name": "ExternalTabled", + "args": [], + "documentation": [ + " An external proposal has been tabled." + ] + }, + { + "name": "Started", + "args": [ + "ReferendumIndex", + "VoteThreshold" + ], + "documentation": [ + " A referendum has begun." + ] + }, + { + "name": "Passed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been approved by referendum." + ] + }, + { + "name": "NotPassed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been rejected by referendum." + ] + }, + { + "name": "Cancelled", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A referendum has been cancelled." + ] + }, + { + "name": "Executed", + "args": [ + "ReferendumIndex", + "bool" + ], + "documentation": [ + " A proposal has been enacted." + ] + }, + { + "name": "Delegated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " An account has delegated their vote to another account." + ] + }, + { + "name": "Undelegated", + "args": [ + "AccountId" + ], + "documentation": [ + " An account has cancelled a previous delegation operation." + ] + }, + { + "name": "Vetoed", + "args": [ + "AccountId", + "Hash", + "BlockNumber" + ], + "documentation": [ + " An external proposal has been vetoed." + ] + }, + { + "name": "PreimageNoted", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal's preimage was noted, and the deposit taken." + ] + }, + { + "name": "PreimageUsed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal preimage was removed and used (the deposit was returned)." + ] + }, + { + "name": "PreimageInvalid", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was invalid." + ] + }, + { + "name": "PreimageMissing", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was missing." + ] + }, + { + "name": "PreimageReaped", + "args": [ + "Hash", + "AccountId", + "Balance", + "AccountId" + ], + "documentation": [ + " A registered preimage was removed and the deposit collected by the reaper (last item)." + ] + } + ], + "constants": [ + { + "name": "EnactmentPeriod", + "type": "BlockNumber", + "value": "0x002f0d00", + "documentation": [ + " The minimum period of locking and the period between a proposal being approved and enacted.", + "", + " It should generally be a little more than the unstake period to ensure that", + " voting stakers have an opportunity to remove themselves from the system in the case where", + " they are on the losing side of a vote." + ] + }, + { + "name": "LaunchPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) new public referenda are launched." + ] + }, + { + "name": "VotingPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "MinimumDeposit", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "documentation": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "EmergencyVotingPeriod", + "type": "BlockNumber", + "value": "0x80510100", + "documentation": [ + " Minimum voting period allowed for an emergency referendum." + ] + }, + { + "name": "CooloffPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " Period in blocks where an external proposal may not be re-submitted after being vetoed." + ] + }, + { + "name": "PreimageByteDeposit", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount of balance that must be deposited per byte of preimage stored." + ] + } + ], + "errors": [ + { + "name": "ValueLow", + "documentation": [ + " Value too low" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal does not exist" + ] + }, + { + "name": "NotProxy", + "documentation": [ + " Not a proxy" + ] + }, + { + "name": "BadIndex", + "documentation": [ + " Unknown index" + ] + }, + { + "name": "AlreadyCanceled", + "documentation": [ + " Cannot cancel the same proposal twice" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Proposal already made" + ] + }, + { + "name": "ProposalBlacklisted", + "documentation": [ + " Proposal still blacklisted" + ] + }, + { + "name": "NotSimpleMajority", + "documentation": [ + " Next external proposal not simple majority" + ] + }, + { + "name": "InvalidHash", + "documentation": [ + " Invalid hash" + ] + }, + { + "name": "NoProposal", + "documentation": [ + " No external proposal" + ] + }, + { + "name": "AlreadyVetoed", + "documentation": [ + " Identity may not veto a proposal twice" + ] + }, + { + "name": "AlreadyProxy", + "documentation": [ + " Already a proxy" + ] + }, + { + "name": "WrongProxy", + "documentation": [ + " Wrong proxy" + ] + }, + { + "name": "NotDelegated", + "documentation": [ + " Not delegated" + ] + }, + { + "name": "DuplicatePreimage", + "documentation": [ + " Preimage already noted" + ] + }, + { + "name": "NotImminent", + "documentation": [ + " Not imminent" + ] + }, + { + "name": "Early", + "documentation": [ + " Too early" + ] + }, + { + "name": "Imminent", + "documentation": [ + " Imminent" + ] + }, + { + "name": "PreimageMissing", + "documentation": [ + " Preimage not found" + ] + }, + { + "name": "ReferendumInvalid", + "documentation": [ + " Vote given for invalid referendum" + ] + }, + { + "name": "PreimageInvalid", + "documentation": [ + " Invalid preimage" + ] + }, + { + "name": "NoneWaiting", + "documentation": [ + " No proposals waiting" + ] + } + ] + }, + { + "name": "Council", + "storage": { + "prefix": "Instance1Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + } + ], + "documentation": [ + " Set the collective's membership manually to `new_members`. Be nice to the chain and", + " provide it pre-sorted.", + "", + " Requires root origin." + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective." + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " # ", + " - Bounded storage reads and writes.", + " - Argument `threshold` has bearing on weight.", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " # ", + " - Bounded storage read and writes.", + " - Will be slightly heavier if the proposal is approved / disapproved after the vote.", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`)." + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`)." + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold." + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold." + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "bool" + ], + "documentation": [ + " A motion was executed; `bool` is true if returned without error." + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "bool" + ], + "documentation": [ + " A single member did some action; `bool` is true if returned without error." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "NotMember", + "documentation": [ + " Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "documentation": [ + " Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "documentation": [ + " Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "documentation": [ + " Members are already initialized!" + ] + } + ] + }, + { + "name": "TechnicalCommittee", + "storage": { + "prefix": "Instance2Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + } + ], + "documentation": [ + " Set the collective's membership manually to `new_members`. Be nice to the chain and", + " provide it pre-sorted.", + "", + " Requires root origin." + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective." + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " # ", + " - Bounded storage reads and writes.", + " - Argument `threshold` has bearing on weight.", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " # ", + " - Bounded storage read and writes.", + " - Will be slightly heavier if the proposal is approved / disapproved after the vote.", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`)." + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`)." + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold." + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold." + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "bool" + ], + "documentation": [ + " A motion was executed; `bool` is true if returned without error." + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "bool" + ], + "documentation": [ + " A single member did some action; `bool` is true if returned without error." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "NotMember", + "documentation": [ + " Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "documentation": [ + " Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "documentation": [ + " Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "documentation": [ + " Members are already initialized!" + ] + } + ] + }, + { + "name": "Elections", + "storage": { + "prefix": "PhragmenElection", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec<(AccountId,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The current elected membership. Sorted based on account id." + ] + }, + { + "name": "RunnersUp", + "modifier": "Default", + "type": { + "Plain": "Vec<(AccountId,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The current runners_up. Sorted based on low to high merit (worse to best runner)." + ] + }, + { + "name": "ElectionRounds", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The total number of vote rounds that have happened, excluding the upcoming one." + ] + }, + { + "name": "VotesOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Vec", + "linked": true + } + }, + "fallback": "0x00", + "documentation": [ + " Votes of a particular voter, with the round index of the votes." + ] + }, + { + "name": "StakeOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "BalanceOf", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " Locked stake of a voter." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The present candidate list. Sorted based on account-id. A current member or a runner can", + " never enter this vector and is always implicitly assumed to be a candidate." + ] + } + ] + }, + "calls": [ + { + "name": "vote", + "args": [ + { + "name": "votes", + "type": "Vec" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Vote for a set of candidates for the upcoming round of election.", + "", + " The `votes` should:", + " - not be empty.", + " - be less than the number of candidates.", + "", + " Upon voting, `value` units of `who`'s balance is locked and a bond amount is reserved.", + " It is the responsibility of the caller to not place all of their balance into the lock", + " and keep some for further transactions.", + "", + " # ", + " #### State", + " Reads: O(1)", + " Writes: O(V) given `V` votes. V is bounded by 16.", + " # " + ] + }, + { + "name": "remove_voter", + "args": [], + "documentation": [ + " Remove `origin` as a voter. This removes the lock and returns the bond.", + "", + " # ", + " #### State", + " Reads: O(1)", + " Writes: O(1)", + " # " + ] + }, + { + "name": "report_defunct_voter", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Report `target` for being an defunct voter. In case of a valid report, the reporter is", + " rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and", + " their bond is slashed.", + "", + " A defunct voter is defined to be:", + " - a voter whose current submitted votes are all invalid. i.e. all of them are no", + " longer a candidate nor an active member.", + "", + " # ", + " #### State", + " Reads: O(NLogM) given M current candidates and N votes for `target`.", + " Writes: O(1)", + " # " + ] + }, + { + "name": "submit_candidacy", + "args": [], + "documentation": [ + " Submit oneself for candidacy.", + "", + " A candidate will either:", + " - Lose at the end of the term and forfeit their deposit.", + " - Win and become a member. Members will eventually get their stash back.", + " - Become a runner-up. Runners-ups are reserved members in case one gets forcefully", + " removed.", + "", + " # ", + " #### State", + " Reads: O(LogN) Given N candidates.", + " Writes: O(1)", + " # " + ] + }, + { + "name": "renounce_candidacy", + "args": [], + "documentation": [ + " Renounce one's intention to be a candidate for the next election round. 3 potential", + " outcomes exist:", + " - `origin` is a candidate and not elected in any set. In this case, the bond is", + " unreserved, returned and origin is removed as a candidate.", + " - `origin` is a current runner up. In this case, the bond is unreserved, returned and", + " origin is removed as a runner.", + " - `origin` is a current member. In this case, the bond is unreserved and origin is", + " removed as a member, consequently not being a candidate for the next round anymore.", + " Similar to [`remove_voter`], if replacement runners exists, they are immediately used." + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove a particular member from the set. This is effective immediately and the bond of", + " the outgoing member is slashed.", + "", + " If a runner-up is available, then the best runner-up will be removed and replaces the", + " outgoing member. Otherwise, a new phragmen round is started.", + "", + " Note that this does not affect the designated block number of the next election.", + "", + " # ", + " #### State", + " Reads: O(do_phragmen)", + " Writes: O(do_phragmen)", + " # " + ] + } + ], + "events": [ + { + "name": "NewTerm", + "args": [ + "Vec<(AccountId,Balance)>" + ], + "documentation": [ + " A new term with new members. This indicates that enough candidates existed, not that", + " enough have has been elected. The inner value must be examined for this purpose." + ] + }, + { + "name": "EmptyTerm", + "args": [], + "documentation": [ + " No (or not enough) candidates existed for this round." + ] + }, + { + "name": "MemberKicked", + "args": [ + "AccountId" + ], + "documentation": [ + " A member has been removed. This should always be followed by either `NewTerm` ot", + " `EmptyTerm`." + ] + }, + { + "name": "MemberRenounced", + "args": [ + "AccountId" + ], + "documentation": [ + " A member has renounced their candidacy." + ] + }, + { + "name": "VoterReported", + "args": [ + "AccountId", + "AccountId", + "bool" + ], + "documentation": [ + " A voter (first element) was reported (byt the second element) with the the report being", + " successful or not (third element)." + ] + } + ], + "constants": [ + { + "name": "CandidacyBond", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [] + }, + { + "name": "VotingBond", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [] + }, + { + "name": "DesiredMembers", + "type": "u32", + "value": "0x0d000000", + "documentation": [] + }, + { + "name": "DesiredRunnersUp", + "type": "u32", + "value": "0x07000000", + "documentation": [] + }, + { + "name": "TermDuration", + "type": "BlockNumber", + "value": "0x80130300", + "documentation": [] + } + ], + "errors": [ + { + "name": "UnableToVote", + "documentation": [ + " Cannot vote when no candidates or members exist." + ] + }, + { + "name": "NoVotes", + "documentation": [ + " Must vote for at least one candidate." + ] + }, + { + "name": "TooManyVotes", + "documentation": [ + " Cannot vote more than candidates." + ] + }, + { + "name": "MaximumVotesExceeded", + "documentation": [ + " Cannot vote more than maximum allowed." + ] + }, + { + "name": "LowBalance", + "documentation": [ + " Cannot vote with stake less than minimum balance." + ] + }, + { + "name": "UnableToPayBond", + "documentation": [ + " Voter can not pay voting bond." + ] + }, + { + "name": "MustBeVoter", + "documentation": [ + " Must be a voter." + ] + }, + { + "name": "ReportSelf", + "documentation": [ + " Cannot report self." + ] + }, + { + "name": "DuplicatedCandidate", + "documentation": [ + " Duplicated candidate submission." + ] + }, + { + "name": "MemberSubmit", + "documentation": [ + " Member cannot re-submit candidacy." + ] + }, + { + "name": "RunnerSubmit", + "documentation": [ + " Runner cannot re-submit candidacy." + ] + }, + { + "name": "InsufficientCandidateFunds", + "documentation": [ + " Candidate does not have enough funds." + ] + }, + { + "name": "InvalidOrigin", + "documentation": [ + " Origin is not a candidate, member or a runner up." + ] + }, + { + "name": "NotMember", + "documentation": [ + " Not a member." + ] + } + ] + }, + { + "name": "TechnicalMembership", + "storage": { + "prefix": "Instance1Membership", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current membership, stored as an ordered Vec." + ] + } + ] + }, + "calls": [ + { + "name": "add_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Add a member `who` to the set.", + "", + " May only be called from `AddOrigin` or root." + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Remove a member `who` from the set.", + "", + " May only be called from `RemoveOrigin` or root." + ] + }, + { + "name": "swap_member", + "args": [ + { + "name": "remove", + "type": "AccountId" + }, + { + "name": "add", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out one member `remove` for another `add`.", + "", + " May only be called from `SwapOrigin` or root." + ] + }, + { + "name": "reset_members", + "args": [ + { + "name": "members", + "type": "Vec" + } + ], + "documentation": [ + " Change the membership to a new set, disregarding the existing membership. Be nice and", + " pass `members` pre-sorted.", + "", + " May only be called from `ResetOrigin` or root." + ] + }, + { + "name": "change_key", + "args": [ + { + "name": "new", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out the sending member for some other key `new`.", + "", + " May only be called from `Signed` origin of a current member." + ] + } + ], + "events": [ + { + "name": "MemberAdded", + "args": [], + "documentation": [ + " The given member was added; see the transaction for who." + ] + }, + { + "name": "MemberRemoved", + "args": [], + "documentation": [ + " The given member was removed; see the transaction for who." + ] + }, + { + "name": "MembersSwapped", + "args": [], + "documentation": [ + " Two members were swapped; see the transaction for who." + ] + }, + { + "name": "MembersReset", + "args": [], + "documentation": [ + " The membership was reset; see the transaction for who the new set is." + ] + }, + { + "name": "KeyChanged", + "args": [], + "documentation": [ + " One of the members' keys changed." + ] + }, + { + "name": "Dummy", + "args": [ + "PhantomData" + ], + "documentation": [ + " Phantom member, never used." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "FinalityTracker", + "storage": null, + "calls": [ + { + "name": "final_hint", + "args": [ + { + "name": "hint", + "type": "Compact" + } + ], + "documentation": [ + " Hint that the author of this block thinks the best finalized", + " block is the given number." + ] + } + ], + "events": null, + "constants": [ + { + "name": "WindowSize", + "type": "BlockNumber", + "value": "0x65000000", + "documentation": [ + " The number of recent samples to keep from this chain. Default is 101." + ] + }, + { + "name": "ReportLatency", + "type": "BlockNumber", + "value": "0xe8030000", + "documentation": [ + " The delay after which point things become suspicious. Default is 1000." + ] + } + ], + "errors": [ + { + "name": "AlreadyUpdated", + "documentation": [ + " Final hint must be updated only once in the block" + ] + }, + { + "name": "BadHint", + "documentation": [ + " Finalized height above block number" + ] + } + ] + }, + { + "name": "Grandpa", + "storage": { + "prefix": "GrandpaFinality", + "items": [ + { + "name": "Authorities", + "modifier": "Default", + "type": { + "Plain": "AuthorityList" + }, + "fallback": "0x00", + "documentation": [ + " DEPRECATED", + "", + " This used to store the current authority set, which has been migrated to the well-known", + " GRANDPA_AUTHORITES_KEY unhashed key." + ] + }, + { + "name": "State", + "modifier": "Default", + "type": { + "Plain": "StoredState" + }, + "fallback": "0x00", + "documentation": [ + " State of the current authority set." + ] + }, + { + "name": "PendingChange", + "modifier": "Optional", + "type": { + "Plain": "StoredPendingChange" + }, + "fallback": "0x00", + "documentation": [ + " Pending change: (signaled at, scheduled change)." + ] + }, + { + "name": "NextForced", + "modifier": "Optional", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00", + "documentation": [ + " next block number where we can force a change." + ] + }, + { + "name": "Stalled", + "modifier": "Optional", + "type": { + "Plain": "(BlockNumber,BlockNumber)" + }, + "fallback": "0x00", + "documentation": [ + " `true` if we are currently stalled." + ] + }, + { + "name": "CurrentSetId", + "modifier": "Default", + "type": { + "Plain": "SetId" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The number of changes (both in terms of keys and underlying economic responsibilities)", + " in the \"set\" of Grandpa validators from genesis." + ] + }, + { + "name": "SetIdSession", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "SetId", + "value": "SessionIndex", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from grandpa set ID to the index of the *most recent* session for which its members were responsible." + ] + } + ] + }, + "calls": [ + { + "name": "report_misbehavior", + "args": [ + { + "name": "_report", + "type": "Bytes" + } + ], + "documentation": [ + " Report some misbehavior." + ] + } + ], + "events": [ + { + "name": "NewAuthorities", + "args": [ + "AuthorityList" + ], + "documentation": [ + " New authority set has been applied." + ] + }, + { + "name": "Paused", + "args": [], + "documentation": [ + " Current authority set has been paused." + ] + }, + { + "name": "Resumed", + "args": [], + "documentation": [ + " Current authority set has been resumed." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "PauseFailed", + "documentation": [ + " Attempt to signal GRANDPA pause when the authority set isn't live", + " (either paused or already pending pause)." + ] + }, + { + "name": "ResumeFailed", + "documentation": [ + " Attempt to signal GRANDPA resume when the authority set isn't paused", + " (either live or already pending resume)." + ] + }, + { + "name": "ChangePending", + "documentation": [ + " Attempt to signal GRANDPA change with one already pending." + ] + }, + { + "name": "TooSoon", + "documentation": [ + " Cannot signal forced change so soon after last." + ] + } + ] + }, + { + "name": "Treasury", + "storage": { + "prefix": "Treasury", + "items": [ + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "ProposalIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Number of proposals that have been made." + ] + }, + { + "name": "Proposals", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "ProposalIndex", + "value": "TreasuryProposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Proposals that have been made." + ] + }, + { + "name": "Approvals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Proposal indices that have been approved but not yet awarded." + ] + }, + { + "name": "Tips", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "Hash", + "value": "OpenTip", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Tips that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", + " This has the insecure enumerable hash function since the key itself is already", + " guaranteed to be a secure hash." + ] + }, + { + "name": "Reasons", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "Hash", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Simple preimage lookup from the reason's hash to the original data. Again, has an", + " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." + ] + } + ] + }, + "calls": [ + { + "name": "propose_spend", + "args": [ + { + "name": "value", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "LookupSource" + } + ], + "documentation": [ + " Put forward a suggestion for spending. A deposit proportional to the value", + " is reserved and slashed if the proposal is rejected. It is returned once the", + " proposal is awarded.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB change, one extra DB entry.", + " # " + ] + }, + { + "name": "reject_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Reject a proposed spend. The original deposit will be slashed.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB clear.", + " # " + ] + }, + { + "name": "approve_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", + " and the original deposit will be returned.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB change.", + " # " + ] + }, + { + "name": "report_awesome", + "args": [ + { + "name": "reason", + "type": "Bytes" + }, + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Report something `reason` that deserves a tip and claim any eventual the finder's fee.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", + " `TipReportDepositPerByte` for each byte in `reason`.", + "", + " - `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + " - `who`: The account which should be credited for the tip.", + "", + " Emits `NewTip` if successful.", + "", + " # ", + " - `O(R)` where `R` length of `reason`.", + " - One balance operation.", + " - One storage mutation (codec `O(R)`).", + " - One event.", + " # " + ] + }, + { + "name": "retract_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "documentation": [ + " Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", + "", + " If successful, the original deposit will be unreserved.", + "", + " The dispatch origin for this call must be _Signed_ and the tip identified by `hash`", + " must have been reported by the signing account through `report_awesome` (and not", + " through `tip_new`).", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + " Emits `TipRetracted` if successful.", + "", + " # ", + " - `O(T)`", + " - One balance operation.", + " - Two storage removals (one read, codec `O(T)`).", + " - One event.", + " # " + ] + }, + { + "name": "tip_new", + "args": [ + { + "name": "reason", + "type": "Bytes" + }, + { + "name": "who", + "type": "AccountId" + }, + { + "name": "tip_value", + "type": "BalanceOf" + } + ], + "documentation": [ + " Give a tip for something new; no finder's fee will be taken.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must be a", + " member of the `Tippers` set.", + "", + " - `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + " - `who`: The account which should be credited for the tip.", + " - `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + " Emits `NewTip` if successful.", + "", + " # ", + " - `O(R + T)` where `R` length of `reason`, `T` is the number of tippers. `T` is", + " naturally capped as a membership set, `R` is limited through transaction-size.", + " - Two storage insertions (codecs `O(R)`, `O(T)`), one read `O(1)`.", + " - One event.", + " # " + ] + }, + { + "name": "tip", + "args": [ + { + "name": "hash", + "type": "Hash" + }, + { + "name": "tip_value", + "type": "BalanceOf" + } + ], + "documentation": [ + " Declare a tip value for an already-open tip.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must be a", + " member of the `Tippers` set.", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary", + " account ID.", + " - `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + " Emits `TipClosing` if the threshold of tippers has been reached and the countdown period", + " has started.", + "", + " # ", + " - `O(T)`", + " - One storage mutation (codec `O(T)`), one storage read `O(1)`.", + " - Up to one event.", + " # " + ] + }, + { + "name": "close_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "documentation": [ + " Close and payout a tip.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " The tip identified by `hash` must have finished its countdown period.", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + " # ", + " - `O(T)`", + " - One storage retrieval (codec `O(T)`) and two removals.", + " - Up to three balance operations.", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "ProposalIndex" + ], + "documentation": [ + " New proposal." + ] + }, + { + "name": "Spending", + "args": [ + "Balance" + ], + "documentation": [ + " We have ended a spend period and will now allocate funds." + ] + }, + { + "name": "Awarded", + "args": [ + "ProposalIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " Some funds have been allocated." + ] + }, + { + "name": "Rejected", + "args": [ + "ProposalIndex", + "Balance" + ], + "documentation": [ + " A proposal was rejected; funds were slashed." + ] + }, + { + "name": "Burnt", + "args": [ + "Balance" + ], + "documentation": [ + " Some of our funds have been burnt." + ] + }, + { + "name": "Rollover", + "args": [ + "Balance" + ], + "documentation": [ + " Spending has finished; this is the amount that rolls over until next spend." + ] + }, + { + "name": "Deposit", + "args": [ + "Balance" + ], + "documentation": [ + " Some funds have been deposited." + ] + }, + { + "name": "NewTip", + "args": [ + "Hash" + ], + "documentation": [ + " A new tip suggestion has been opened." + ] + }, + { + "name": "TipClosing", + "args": [ + "Hash" + ], + "documentation": [ + " A tip suggestion has reached threshold and is closing." + ] + }, + { + "name": "TipClosed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A tip suggestion has been closed." + ] + }, + { + "name": "TipRetracted", + "args": [ + "Hash" + ], + "documentation": [ + " A tip suggestion has been retracted." + ] + } + ], + "constants": [ + { + "name": "ProposalBond", + "type": "Permill", + "value": "0x50c30000", + "documentation": [ + " Fraction of a proposal's value that should be bonded in order to place the proposal.", + " An accepted proposal gets these back. A rejected proposal does not." + ] + }, + { + "name": "ProposalBondMinimum", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "SpendPeriod", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " Period between successive spends." + ] + }, + { + "name": "Burn", + "type": "Permill", + "value": "0x20a10700", + "documentation": [ + " Percentage of spare funds (if any) that are burnt per spend period." + ] + }, + { + "name": "TipCountdown", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " The period for which a tip remains open after is has achieved threshold tippers." + ] + }, + { + "name": "TipFindersFee", + "type": "Percent", + "value": "0x14", + "documentation": [ + " The amount of the final tip which goes to the original reporter of the tip." + ] + }, + { + "name": "TipReportDepositBase", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The amount held on deposit for placing a tip report." + ] + }, + { + "name": "TipReportDepositPerByte", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount held on deposit per byte within the tip report reason." + ] + } + ], + "errors": [ + { + "name": "InsufficientProposersBalance", + "documentation": [ + " Proposer's balance is too low." + ] + }, + { + "name": "InvalidProposalIndex", + "documentation": [ + " No proposal at that index." + ] + }, + { + "name": "ReasonTooBig", + "documentation": [ + " The reason given is just too big." + ] + }, + { + "name": "AlreadyKnown", + "documentation": [ + " The tip was already found/started." + ] + }, + { + "name": "UnknownTip", + "documentation": [ + " The tip hash is unknown." + ] + }, + { + "name": "NotFinder", + "documentation": [ + " The account attempting to retract the tip is not the finder of the tip." + ] + }, + { + "name": "StillOpen", + "documentation": [ + " The tip cannot be claimed/closed because there are not enough tippers yet." + ] + }, + { + "name": "Premature", + "documentation": [ + " The tip cannot be claimed/closed because it's still in the countdown period." + ] + } + ] + }, + { + "name": "Contracts", + "storage": { + "prefix": "Contract", + "items": [ + { + "name": "GasSpent", + "modifier": "Default", + "type": { + "Plain": "Gas" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Gas spent so far in this block." + ] + }, + { + "name": "CurrentSchedule", + "modifier": "Default", + "type": { + "Plain": "Schedule" + }, + "fallback": "0x0000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af0000000000000001000000000000000100000000000000040000000000010010000000004000000020000000", + "documentation": [ + " Current cost schedule for contracts." + ] + }, + { + "name": "PristineCode", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "CodeHash", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from an original code hash to the original code, untouched by instrumentation." + ] + }, + { + "name": "CodeStorage", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "CodeHash", + "value": "PrefabWasmModule", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping between an original code hash and instrumented wasm code, ready for execution." + ] + }, + { + "name": "AccountCounter", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The subtrie counter." + ] + }, + { + "name": "ContractInfoOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "ContractInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The code associated with a given account." + ] + }, + { + "name": "GasPrice", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x01000000000000000000000000000000", + "documentation": [ + " The price of one unit of gas." + ] + } + ] + }, + "calls": [ + { + "name": "update_schedule", + "args": [ + { + "name": "schedule", + "type": "Schedule" + } + ], + "documentation": [ + " Updates the schedule for metering contracts.", + "", + " The schedule must have a greater version than the stored schedule." + ] + }, + { + "name": "put_code", + "args": [ + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Stores the given binary Wasm code into the chain's storage and returns its `codehash`.", + " You can instantiate contracts only with stored code." + ] + }, + { + "name": "call", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Makes a call to an account, optionally transferring some balance.", + "", + " * If the account is a smart-contract account, the associated code will be", + " executed and any value will be transferred.", + " * If the account is a regular account, any value will be transferred.", + " * If no account exists and the call value is not less than `existential_deposit`,", + " a regular account will be created and any value will be transferred." + ] + }, + { + "name": "instantiate", + "args": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code_hash", + "type": "CodeHash" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Instantiates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance.", + "", + " Instantiation is executed as follows:", + "", + " - The destination address is computed based on the sender and hash of the code.", + " - The smart-contract account is created at the computed address.", + " - The `ctor_code` is executed in the context of the newly-created account. Buffer returned", + " after the execution is saved as the `code` of the account. That code will be invoked", + " upon any call received by this account.", + " - The contract is initialized." + ] + }, + { + "name": "claim_surcharge", + "args": [ + { + "name": "dest", + "type": "AccountId" + }, + { + "name": "aux_sender", + "type": "Option" + } + ], + "documentation": [ + " Allows block producers to claim a small reward for evicting a contract. If a block producer", + " fails to do so, a regular users will be allowed to claim the reward.", + "", + " If contract is not evicted as a result of this call, no actions are taken and", + " the sender is not eligible for the reward." + ] + } + ], + "events": [ + { + "name": "Transfer", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Transfer happened `from` to `to` with given `value` as part of a `call` or `instantiate`." + ] + }, + { + "name": "Instantiated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Contract deployed by address at the specified address." + ] + }, + { + "name": "CodeStored", + "args": [ + "Hash" + ], + "documentation": [ + " Code with the specified hash has been stored." + ] + }, + { + "name": "ScheduleUpdated", + "args": [ + "u32" + ], + "documentation": [ + " Triggered when the current schedule is updated." + ] + }, + { + "name": "Dispatched", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A call was dispatched from the given account. The bool signals whether it was", + " successful execution or not." + ] + }, + { + "name": "Contract", + "args": [ + "AccountId", + "Bytes" + ], + "documentation": [ + " An event from contract of account." + ] + } + ], + "constants": [ + { + "name": "SignedClaimHandicap", + "type": "BlockNumber", + "value": "0x02000000", + "documentation": [ + " Number of block delay an extrinsic claim surcharge has.", + "", + " When claim surcharge is called by an extrinsic the rent is checked", + " for current_block - delay" + ] + }, + { + "name": "TombstoneDeposit", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The minimum amount required to generate a tombstone." + ] + }, + { + "name": "StorageSizeOffset", + "type": "u32", + "value": "0x08000000", + "documentation": [ + " Size of a contract at the time of instantiaion. This is a simple way to ensure that", + " empty contracts eventually gets deleted." + ] + }, + { + "name": "RentByteFee", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Price of a byte of storage per one block interval. Should be greater than 0." + ] + }, + { + "name": "RentDepositOffset", + "type": "BalanceOf", + "value": "0x00008a5d784563010000000000000000", + "documentation": [ + " The amount of funds a contract should deposit in order to offset", + " the cost of one byte.", + "", + " Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,", + " then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent.", + " But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000,", + " then it would pay 500 BU/day." + ] + }, + { + "name": "SurchargeReward", + "type": "BalanceOf", + "value": "0x0080a1a76b4a35000000000000000000", + "documentation": [ + " Reward that is received by the party whose touch has led", + " to removal of a contract." + ] + }, + { + "name": "TransferFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to make a transfer." + ] + }, + { + "name": "CreationFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to create an account." + ] + }, + { + "name": "TransactionBaseFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the base." + ] + }, + { + "name": "TransactionByteFee", + "type": "BalanceOf", + "value": "0x00e40b54020000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + }, + { + "name": "ContractFee", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The fee required to instantiate a contract instance. A reasonable default value", + " is 21." + ] + }, + { + "name": "CallBaseFee", + "type": "Gas", + "value": "0xe803000000000000", + "documentation": [ + " The base fee charged for calling into a contract. A reasonable default", + " value is 135." + ] + }, + { + "name": "InstantiateBaseFee", + "type": "Gas", + "value": "0xe803000000000000", + "documentation": [ + " The base fee charged for instantiating a contract. A reasonable default value", + " is 175." + ] + }, + { + "name": "MaxDepth", + "type": "u32", + "value": "0x20000000", + "documentation": [ + " The maximum nesting level of a call/instantiate stack. A reasonable default", + " value is 100." + ] + }, + { + "name": "MaxValueSize", + "type": "u32", + "value": "0x00400000", + "documentation": [ + " The maximum size of a storage value in bytes. A reasonable default is 16 KiB." + ] + }, + { + "name": "BlockGasLimit", + "type": "Gas", + "value": "0x8096980000000000", + "documentation": [ + " The maximum amount of gas that could be expended per block. A reasonable", + " default value is 10_000_000." + ] + } + ], + "errors": [ + { + "name": "InvalidScheduleVersion", + "documentation": [ + " A new schedule must have a greater version than the current one." + ] + }, + { + "name": "InvalidSurchargeClaim", + "documentation": [ + " An origin must be signed or inherent and auxiliary sender only provided on inherent." + ] + }, + { + "name": "InvalidSourceContract", + "documentation": [ + " Cannot restore from nonexisting or tombstone contract." + ] + }, + { + "name": "InvalidDestinationContract", + "documentation": [ + " Cannot restore to nonexisting or alive contract." + ] + }, + { + "name": "InvalidTombstone", + "documentation": [ + " Tombstones don't match." + ] + }, + { + "name": "InvalidContractOrigin", + "documentation": [ + " An origin TrieId written in the current block." + ] + } + ] + }, + { + "name": "Sudo", + "storage": { + "prefix": "Sudo", + "items": [ + { + "name": "Key", + "modifier": "Default", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The `AccountId` of the sudo key." + ] + } + ] + }, + "calls": [ + { + "name": "sudo", + "args": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Root` origin.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Unknown weight of derivative `proposal` execution.", + " # " + ] + }, + { + "name": "set_key", + "args": [ + { + "name": "new", + "type": "LookupSource" + } + ], + "documentation": [ + " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB change.", + " # " + ] + }, + { + "name": "sudo_as", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Signed` origin from", + " a given account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Unknown weight of derivative `proposal` execution.", + " # " + ] + } + ], + "events": [ + { + "name": "Sudid", + "args": [ + "bool" + ], + "documentation": [ + " A sudo just took place." + ] + }, + { + "name": "KeyChanged", + "args": [ + "AccountId" + ], + "documentation": [ + " The sudoer just switched identity; the old key is supplied." + ] + }, + { + "name": "SudoAsDone", + "args": [ + "bool" + ], + "documentation": [ + " A sudo just took place." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "RequireSudo", + "documentation": [ + " Sender must be the Sudo account" + ] + } + ] + }, + { + "name": "ImOnline", + "storage": { + "prefix": "ImOnline", + "items": [ + { + "name": "GossipAt", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The block number when we should gossip." + ] + }, + { + "name": "Keys", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of keys that may issue a heartbeat." + ] + }, + { + "name": "ReceivedHeartbeats", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "SessionIndex", + "key2": "AuthIndex", + "value": "Bytes", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00", + "documentation": [ + " For each session index, we keep a mapping of `AuthIndex`", + " to `offchain::OpaqueNetworkState`." + ] + }, + { + "name": "AuthoredBlocks", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "SessionIndex", + "key2": "ValidatorId", + "value": "u32", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00000000", + "documentation": [ + " For each session index, we keep a mapping of `T::ValidatorId` to the", + " number of blocks authored by the given authority." + ] + } + ] + }, + "calls": [ + { + "name": "heartbeat", + "args": [ + { + "name": "heartbeat", + "type": "Heartbeat" + }, + { + "name": "_signature", + "type": "Signature" + } + ], + "documentation": [] + } + ], + "events": [ + { + "name": "HeartbeatReceived", + "args": [ + "AuthorityId" + ], + "documentation": [ + " A new heartbeat was received from `AuthorityId`" + ] + }, + { + "name": "AllGood", + "args": [], + "documentation": [ + " At the end of the session, no offence was committed." + ] + }, + { + "name": "SomeOffline", + "args": [ + "Vec" + ], + "documentation": [ + " At the end of the session, at least once validator was found to be offline." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "InvalidKey", + "documentation": [ + " Non existent public key." + ] + }, + { + "name": "DuplicatedHeartbeat", + "documentation": [ + " Duplicated heartbeat." + ] + } + ] + }, + { + "name": "AuthorityDiscovery", + "storage": null, + "calls": [], + "events": null, + "constants": [], + "errors": [] + }, + { + "name": "Offences", + "storage": { + "prefix": "Offences", + "items": [ + { + "name": "Reports", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "ReportIdOf", + "value": "OffenceDetails", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The primary structure that holds all offence records keyed by report identifiers." + ] + }, + { + "name": "ConcurrentReportsIndex", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Blake2_256", + "key1": "Kind", + "key2": "OpaqueTimeSlot", + "value": "Vec", + "key2Hasher": "Blake2_256" + } + }, + "fallback": "0x00", + "documentation": [ + " A vector of reports of the same kind that happened at the same time slot." + ] + }, + { + "name": "ReportsByKindIndex", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "Kind", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Enumerates all reports of a kind along with the time they happened.", + "", + " All reports are sorted by the time of offence.", + "", + " Note that the actual type of this mapping is `Vec`, this is because values of", + " different types are not supported at the moment so we are doing the manual serialization." + ] + } + ] + }, + "calls": [], + "events": [ + { + "name": "Offence", + "args": [ + "Kind", + "OpaqueTimeSlot" + ], + "documentation": [ + " There is an offence reported of the given `kind` happened at the `session_index` and", + " (kind-specific) time slot. This event is not deposited for duplicate slashes." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "RandomnessCollectiveFlip", + "storage": { + "prefix": "RandomnessCollectiveFlip", + "items": [ + { + "name": "RandomMaterial", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Series of block headers from the last 81 blocks that acts as random seed material. This", + " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", + " the oldest hash." + ] + } + ] + }, + "calls": [], + "events": null, + "constants": [], + "errors": [] + }, + { + "name": "Identity", + "storage": { + "prefix": "Sudo", + "items": [ + { + "name": "IdentityOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Registration", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information that is pertinent to identify the entity behind an account." + ] + }, + { + "name": "SuperOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "(AccountId,Data)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The super-identity of an alternative \"sub\" identity together with its name, within that", + " context. If the account is not some other account's sub-identity, then just `None`." + ] + }, + { + "name": "SubsOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "(BalanceOf,Vec)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " Alternative \"sub\" identities of this account.", + "", + " The first item is the deposit, the second is a vector of the accounts." + ] + }, + { + "name": "Registrars", + "modifier": "Default", + "type": { + "Plain": "Vec>" + }, + "fallback": "0x00", + "documentation": [ + " The set of registrars. Not expected to get very big as can only be added through a", + " special origin (likely a council motion).", + "", + " The index into this can be cast to `RegistrarIndex` to get a valid value." + ] + } + ] + }, + "calls": [ + { + "name": "add_registrar", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Add a registrar to the system.", + "", + " The dispatch origin for this call must be `RegistrarOrigin` or `Root`.", + "", + " - `account`: the account of the registrar.", + "", + " Emits `RegistrarAdded` if successful.", + "", + " # ", + " - `O(R)` where `R` registrar-count (governance-bounded).", + " - One storage mutation (codec `O(R)`).", + " - One event.", + " # " + ] + }, + { + "name": "set_identity", + "args": [ + { + "name": "info", + "type": "IdentityInfo" + } + ], + "documentation": [ + " Set an account's identity information and reserve the appropriate deposit.", + "", + " If the account already has identity information, the deposit is taken as part payment", + " for the new deposit.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " identity.", + "", + " - `info`: The identity information.", + "", + " Emits `IdentitySet` if successful.", + "", + " # ", + " - `O(X + R)` where `X` additional-field-count (deposit-bounded).", + " - At most two balance operations.", + " - One storage mutation (codec `O(X + R)`).", + " - One event.", + " # " + ] + }, + { + "name": "set_subs", + "args": [ + { + "name": "subs", + "type": "Vec<(AccountId,Data)>" + } + ], + "documentation": [ + " Set the sub-accounts of the sender.", + "", + " Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", + " and an amount `SubAccountDeposit` will be reserved for each item in `subs`.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " identity.", + "", + " - `subs`: The identity's sub-accounts.", + "", + " # ", + " - `O(S)` where `S` subs-count (hard- and deposit-bounded).", + " - At most two balance operations.", + " - At most O(2 * S + 1) storage mutations; codec complexity `O(1 * S + S * 1)`);", + " one storage-exists.", + " # " + ] + }, + { + "name": "clear_identity", + "args": [], + "documentation": [ + " Clear an account's identity info and all sub-account and return all deposits.", + "", + " Payment: All reserved balances on the account are returned.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " identity.", + "", + " Emits `IdentityCleared` if successful.", + "", + " # ", + " - `O(R + S + X)`.", + " - One balance-reserve operation.", + " - `S + 2` storage deletions.", + " - One event.", + " # " + ] + }, + { + "name": "request_judgement", + "args": [ + { + "name": "reg_index", + "type": "Compact" + }, + { + "name": "max_fee", + "type": "Compact" + } + ], + "documentation": [ + " Request a judgement from a registrar.", + "", + " Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", + " given.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a", + " registered identity.", + "", + " - `reg_index`: The index of the registrar whose judgement is requested.", + " - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:", + "", + " ```nocompile", + " Self::registrars(reg_index).uwnrap().fee", + " ```", + "", + " Emits `JudgementRequested` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-reserve operation.", + " - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`.", + " - One event.", + " # " + ] + }, + { + "name": "cancel_request", + "args": [ + { + "name": "reg_index", + "type": "RegistrarIndex" + } + ], + "documentation": [ + " Cancel a previous request.", + "", + " Payment: A previously reserved deposit is returned on success.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a", + " registered identity.", + "", + " - `reg_index`: The index of the registrar whose judgement is no longer requested.", + "", + " Emits `JudgementUnrequested` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-reserve operation.", + " - One storage mutation `O(R + X)`.", + " - One event.", + " # " + ] + }, + { + "name": "set_fee", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "fee", + "type": "Compact" + } + ], + "documentation": [ + " Set the fee required for a judgement to be requested from a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `fee`: the new fee.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " # " + ] + }, + { + "name": "set_account_id", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "new", + "type": "AccountId" + } + ], + "documentation": [ + " Change the account associated with a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `new`: the new account ID.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " # " + ] + }, + { + "name": "set_fields", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "fields", + "type": "IdentityFields" + } + ], + "documentation": [ + " Set the field information for a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `fields`: the fields that the registrar concerns themselves with.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " # " + ] + }, + { + "name": "provide_judgement", + "args": [ + { + "name": "reg_index", + "type": "Compact" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "judgement", + "type": "IdentityJudgement" + } + ], + "documentation": [ + " Provide a judgement for an account's identity.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `reg_index`.", + "", + " - `reg_index`: the index of the registrar whose judgement is being made.", + " - `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + " - `judgement`: the judgement of the registrar of index `reg_index` about `target`.", + "", + " Emits `JudgementGiven` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-transfer operation.", + " - Up to one account-lookup operation.", + " - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`.", + " - One event.", + " # " + ] + }, + { + "name": "kill_identity", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove an account's identity and sub-account information and slash the deposits.", + "", + " Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", + " `Slash`. Verification request deposits are not returned; they should be cancelled", + " manually using `cancel_request`.", + "", + " The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`.", + "", + " - `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + "", + " Emits `IdentityKilled` if successful.", + "", + " # ", + " - `O(R + S + X)`.", + " - One balance-reserve operation.", + " - `S + 2` storage mutations.", + " - One event.", + " # " + ] + } + ], + "events": [ + { + "name": "IdentitySet", + "args": [ + "AccountId" + ], + "documentation": [ + " A name was set or reset (which will remove all judgements)." + ] + }, + { + "name": "IdentityCleared", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was cleared, and the given balance returned." + ] + }, + { + "name": "IdentityKilled", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was removed and the given balance slashed." + ] + }, + { + "name": "JudgementRequested", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement was asked from a registrar." + ] + }, + { + "name": "JudgementUnrequested", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement request was retracted." + ] + }, + { + "name": "JudgementGiven", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement was given by a registrar." + ] + }, + { + "name": "RegistrarAdded", + "args": [ + "RegistrarIndex" + ], + "documentation": [ + " A registrar was added." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "TooManySubAccounts", + "documentation": [ + " Too many subs-accounts." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Account isn't found." + ] + }, + { + "name": "NotNamed", + "documentation": [ + " Account isn't named." + ] + }, + { + "name": "EmptyIndex", + "documentation": [ + " Empty index." + ] + }, + { + "name": "FeeChanged", + "documentation": [ + " Fee is changed." + ] + }, + { + "name": "NoIdentity", + "documentation": [ + " No identity found." + ] + }, + { + "name": "StickyJudgement", + "documentation": [ + " Sticky judgement." + ] + }, + { + "name": "JudgementGiven", + "documentation": [ + " Judgement given." + ] + }, + { + "name": "InvalidJudgement", + "documentation": [ + " Invalid judgement." + ] + }, + { + "name": "InvalidIndex", + "documentation": [ + " The index is invalid." + ] + }, + { + "name": "InvalidTarget", + "documentation": [ + " The target is invalid." + ] + } + ] + }, + { + "name": "Society", + "storage": { + "prefix": "Society", + "items": [ + { + "name": "Founder", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The first member." + ] + }, + { + "name": "Rules", + "modifier": "Optional", + "type": { + "Plain": "Hash" + }, + "fallback": "0x00", + "documentation": [ + " A hash of the rules of this society concerning membership. Can only be set once and", + " only by the founder." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of candidates; bidders that are attempting to become members." + ] + }, + { + "name": "SuspendedCandidates", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "(BalanceOf,BidKind)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of suspended candidates." + ] + }, + { + "name": "Pot", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " Amount of our account balance that is specifically for the next round's bid(s)." + ] + }, + { + "name": "Head", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The most primary from the most recently approved members." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of members, ordered." + ] + }, + { + "name": "SuspendedMembers", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "bool", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of suspended members." + ] + }, + { + "name": "Bids", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current bids, stored ordered by the value of the bid." + ] + }, + { + "name": "Vouching", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "VouchingStatus", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Members currently vouching or banned from vouching again" + ] + }, + { + "name": "Payouts", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "Vec<(BlockNumber,BalanceOf)>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Pending payouts; ordered by block number, with the amount that should be paid out." + ] + }, + { + "name": "Strikes", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "StrikeCount", + "linked": false + } + }, + "fallback": "0x00000000", + "documentation": [ + " The ongoing number of losing votes cast by the member." + ] + }, + { + "name": "Votes", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "AccountId", + "value": "SocietyVote", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Double map from Candidate -> Voter -> (Maybe) Vote." + ] + }, + { + "name": "Defender", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The defending member currently being challenged." + ] + }, + { + "name": "DefenderVotes", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "SocietyVote", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes for the defender." + ] + }, + { + "name": "MaxMembers", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The max number of members for the society at one time." + ] + } + ] + }, + "calls": [ + { + "name": "bid", + "args": [ + { + "name": "value", + "type": "BalanceOf" + } + ], + "documentation": [ + " A user outside of the society can make a bid for entry.", + "", + " Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", + " when the bid becomes a member, or if the bid calls `unbid`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `value`: A one time payment the bid would like to receive when joining the society.", + "", + " # ", + " Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)", + " - Storage Reads:", + " \t- One storage read to check for suspended candidate. O(1)", + " \t- One storage read to check for suspended member. O(1)", + " \t- One storage read to retrieve all current bids. O(B)", + " \t- One storage read to retrieve all current candidates. O(C)", + " \t- One storage read to retrieve all members. O(M)", + " - Storage Writes:", + " \t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)", + " \t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + " - Notable Computation:", + " \t- O(B + C + log M) search to check user is not already a part of society.", + " \t- O(log B) search to insert the new bid sorted.", + " - External Module Operations:", + " \t- One balance reserve operation. O(X)", + " \t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + " - Events:", + " \t- One event for new bid.", + " \t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + " Total Complexity: O(M + B + C + logM + logB + X)", + " # " + ] + }, + { + "name": "unbid", + "args": [ + { + "name": "pos", + "type": "u32" + } + ], + "documentation": [ + " A bidder can remove their bid for entry into society.", + " By doing so, they will have their candidate deposit returned or", + " they will unvouch their voucher.", + "", + " Payment: The bid deposit is unreserved if the user made a bid.", + "", + " The dispatch origin for this call must be _Signed_ and a bidder.", + "", + " Parameters:", + " - `pos`: Position in the `Bids` vector of the bid who wants to unbid.", + "", + " # ", + " Key: B (len of bids), X (balance unreserve)", + " - One storage read and write to retrieve and update the bids. O(B)", + " - Either one unreserve balance action O(X) or one vouching storage removal. O(1)", + " - One event.", + "", + " Total Complexity: O(B + X)", + " # " + ] + }, + { + "name": "vouch", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "value", + "type": "BalanceOf" + }, + { + "name": "tip", + "type": "BalanceOf" + } + ], + "documentation": [ + " As a member, vouch for someone to join society by placing a bid on their behalf.", + "", + " There is no deposit required to vouch for a new bid, but a member can only vouch for", + " one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by", + " the suspension judgement origin, the member will be banned from vouching again.", + "", + " As a vouching member, you can claim a tip if the candidate is accepted. This tip will", + " be paid as a portion of the reward the member will receive for joining the society.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `who`: The user who you would like to vouch for.", + " - `value`: The total reward to be paid between you and the candidate if they become", + " a member in the society.", + " - `tip`: Your cut of the total `value` payout when the candidate is inducted into", + " the society. Tips larger than `value` will be saturated upon payout.", + "", + " # ", + " Key: B (len of bids), C (len of candidates), M (len of members)", + " - Storage Reads:", + " \t- One storage read to retrieve all members. O(M)", + " \t- One storage read to check member is not already vouching. O(1)", + " \t- One storage read to check for suspended candidate. O(1)", + " \t- One storage read to check for suspended member. O(1)", + " \t- One storage read to retrieve all current bids. O(B)", + " \t- One storage read to retrieve all current candidates. O(C)", + " - Storage Writes:", + " \t- One storage write to insert vouching status to the member. O(1)", + " \t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)", + " \t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + " - Notable Computation:", + " \t- O(log M) search to check sender is a member.", + " \t- O(B + C + log M) search to check user is not already a part of society.", + " \t- O(log B) search to insert the new bid sorted.", + " - External Module Operations:", + " \t- One balance reserve operation. O(X)", + " \t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + " - Events:", + " \t- One event for vouch.", + " \t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + " Total Complexity: O(M + B + C + logM + logB + X)", + " # " + ] + }, + { + "name": "unvouch", + "args": [ + { + "name": "pos", + "type": "u32" + } + ], + "documentation": [ + " As a vouching member, unvouch a bid. This only works while vouched user is", + " only a bidder (and not a candidate).", + "", + " The dispatch origin for this call must be _Signed_ and a vouching member.", + "", + " Parameters:", + " - `pos`: Position in the `Bids` vector of the bid who should be unvouched.", + "", + " # ", + " Key: B (len of bids)", + " - One storage read O(1) to check the signer is a vouching member.", + " - One storage mutate to retrieve and update the bids. O(B)", + " - One vouching storage removal. O(1)", + " - One event.", + "", + " Total Complexity: O(B)", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "candidate", + "type": "LookupSource" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " As a member, vote on a candidate.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `candidate`: The candidate that the member would like to bid on.", + " - `approve`: A boolean which says if the candidate should be", + " approved (`true`) or rejected (`false`).", + "", + " # ", + " Key: C (len of candidates), M (len of members)", + " - One storage read O(M) and O(log M) search to check user is a member.", + " - One account lookup.", + " - One storage read O(C) and O(C) search to check that user is a candidate.", + " - One storage write to add vote to votes. O(1)", + " - One event.", + "", + " Total Complexity: O(M + logM + C)", + " # " + ] + }, + { + "name": "defender_vote", + "args": [ + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " As a member, vote on the defender.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `approve`: A boolean which says if the candidate should be", + " approved (`true`) or rejected (`false`).", + "", + " # ", + " - Key: M (len of members)", + " - One storage read O(M) and O(log M) search to check user is a member.", + " - One storage write to add vote to votes. O(1)", + " - One event.", + "", + " Total Complexity: O(M + logM)", + " # " + ] + }, + { + "name": "payout", + "args": [], + "documentation": [ + " Transfer the first matured payout for the sender and remove it from the records.", + "", + " NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts.", + "", + " Payment: The member will receive a payment equal to their first matured", + " payout to their free balance.", + "", + " The dispatch origin for this call must be _Signed_ and a member with", + " payouts remaining.", + "", + " # ", + " Key: M (len of members), P (number of payouts for a particular member)", + " - One storage read O(M) and O(log M) search to check signer is a member.", + " - One storage read O(P) to get all payouts for a member.", + " - One storage read O(1) to get the current block number.", + " - One currency transfer call. O(X)", + " - One storage write or removal to update the member's payouts. O(P)", + "", + " Total Complexity: O(M + logM + P + X)", + " # " + ] + }, + { + "name": "found", + "args": [ + { + "name": "founder", + "type": "AccountId" + }, + { + "name": "max_members", + "type": "u32" + }, + { + "name": "rules", + "type": "Bytes" + } + ], + "documentation": [ + " Found the society.", + "", + " This is done as a discrete action in order to allow for the", + " module to be included into a running chain and can only be done once.", + "", + " The dispatch origin for this call must be from the _FounderSetOrigin_.", + "", + " Parameters:", + " - `founder` - The first member and head of the newly founded society.", + " - `max_members` - The initial max number of members for the society.", + " - `rules` - The rules of this society concerning membership.", + "", + " # ", + " - Two storage mutates to set `Head` and `Founder`. O(1)", + " - One storage write to add the first member to society. O(1)", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + }, + { + "name": "unfound", + "args": [], + "documentation": [ + " Anull the founding of the society.", + "", + " The dispatch origin for this call must be Signed, and the signing account must be both", + " the `Founder` and the `Head`. This implies that it may only be done when there is one", + " member.", + "", + " # ", + " - Two storage reads O(1).", + " - Four storage removals O(1).", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + }, + { + "name": "judge_suspended_member", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "forgive", + "type": "bool" + } + ], + "documentation": [ + " Allow suspension judgement origin to make judgement on a suspended member.", + "", + " If a suspended member is forgiven, we simply add them back as a member, not affecting", + " any of the existing storage items for that member.", + "", + " If a suspended member is rejected, remove all associated storage items, including", + " their payouts, and remove any vouched bids they currently have.", + "", + " The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + " Parameters:", + " - `who` - The suspended member to be judged.", + " - `forgive` - A boolean representing whether the suspension judgement origin", + " forgives (`true`) or rejects (`false`) a suspended member.", + "", + " # ", + " Key: B (len of bids), M (len of members)", + " - One storage read to check `who` is a suspended member. O(1)", + " - Up to one storage write O(M) with O(log M) binary search to add a member back to society.", + " - Up to 3 storage removals O(1) to clean up a removed member.", + " - Up to one storage write O(B) with O(B) search to remove vouched bid from bids.", + " - Up to one additional event if unvouch takes place.", + " - One storage removal. O(1)", + " - One event for the judgement.", + "", + " Total Complexity: O(M + logM + B)", + " # " + ] + }, + { + "name": "judge_suspended_candidate", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "judgement", + "type": "SocietyJudgement" + } + ], + "documentation": [ + " Allow suspended judgement origin to make judgement on a suspended candidate.", + "", + " If the judgement is `Approve`, we add them to society as a member with the appropriate", + " payment for joining society.", + "", + " If the judgement is `Reject`, we either slash the deposit of the bid, giving it back", + " to the society treasury, or we ban the voucher from vouching again.", + "", + " If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go", + " through the induction process again.", + "", + " The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + " Parameters:", + " - `who` - The suspended candidate to be judged.", + " - `judgement` - `Approve`, `Reject`, or `Rebid`.", + "", + " # ", + " Key: B (len of bids), M (len of members), X (balance action)", + " - One storage read to check `who` is a suspended candidate.", + " - One storage removal of the suspended candidate.", + " - Approve Logic", + " \t- One storage read to get the available pot to pay users with. O(1)", + " \t- One storage write to update the available pot. O(1)", + " \t- One storage read to get the current block number. O(1)", + " \t- One storage read to get all members. O(M)", + " \t- Up to one unreserve currency action.", + " \t- Up to two new storage writes to payouts.", + " \t- Up to one storage write with O(log M) binary search to add a member to society.", + " - Reject Logic", + " \t- Up to one repatriate reserved currency action. O(X)", + " \t- Up to one storage write to ban the vouching member from vouching again.", + " - Rebid Logic", + " \t- Storage mutate with O(log B) binary search to place the user back into bids.", + " - Up to one additional event if unvouch takes place.", + " - One storage removal.", + " - One event for the judgement.", + "", + " Total Complexity: O(M + logM + B + X)", + " # " + ] + }, + { + "name": "set_max_members", + "args": [ + { + "name": "max", + "type": "u32" + } + ], + "documentation": [ + " Allows root origin to change the maximum number of members in society.", + " Max membership count must be greater than 1.", + "", + " The dispatch origin for this call must be from _ROOT_.", + "", + " Parameters:", + " - `max` - The maximum number of members for the society.", + "", + " # ", + " - One storage write to update the max. O(1)", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + } + ], + "events": [ + { + "name": "Founded", + "args": [ + "AccountId" + ], + "documentation": [ + " The society is founded by the given identity." + ] + }, + { + "name": "Bid", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A membership bid just happened. The given account is the candidate's ID and their offer", + " is the second." + ] + }, + { + "name": "Vouch", + "args": [ + "AccountId", + "Balance", + "AccountId" + ], + "documentation": [ + " A membership bid just happened by vouching. The given account is the candidate's ID and", + " their offer is the second. The vouching party is the third." + ] + }, + { + "name": "AutoUnbid", + "args": [ + "AccountId" + ], + "documentation": [ + " A candidate was dropped (due to an excess of bids in the system)." + ] + }, + { + "name": "Unbid", + "args": [ + "AccountId" + ], + "documentation": [ + " A candidate was dropped (by their request)." + ] + }, + { + "name": "Unvouch", + "args": [ + "AccountId" + ], + "documentation": [ + " A candidate was dropped (by request of who vouched for them)." + ] + }, + { + "name": "Inducted", + "args": [ + "AccountId", + "Vec" + ], + "documentation": [ + " A group of candidates have been inducted. The batch's primary is the first value, the", + " batch in full is the second." + ] + }, + { + "name": "SuspendedMemberJudgement", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A suspended member has been judged" + ] + }, + { + "name": "CandidateSuspended", + "args": [ + "AccountId" + ], + "documentation": [ + " A candidate has been suspended" + ] + }, + { + "name": "MemberSuspended", + "args": [ + "AccountId" + ], + "documentation": [ + " A member has been suspended" + ] + }, + { + "name": "Challenged", + "args": [ + "AccountId" + ], + "documentation": [ + " A member has been challenged" + ] + }, + { + "name": "Vote", + "args": [ + "AccountId", + "AccountId", + "bool" + ], + "documentation": [ + " A vote has been placed (candidate, voter, vote)" + ] + }, + { + "name": "DefenderVote", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A vote has been placed for a defending member (voter, vote)" + ] + }, + { + "name": "NewMaxMembers", + "args": [ + "u32" + ], + "documentation": [ + " A new max member count has been set" + ] + }, + { + "name": "Unfounded", + "args": [ + "AccountId" + ], + "documentation": [ + " Society is unfounded." + ] + } + ], + "constants": [ + { + "name": "CandidateDeposit", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [ + " The minimum amount of a deposit required for a bid to be made." + ] + }, + { + "name": "WrongSideDeduction", + "type": "BalanceOf", + "value": "0x0080f420e6b500000000000000000000", + "documentation": [ + " The amount of the unpaid reward that gets deducted in the case that either a skeptic", + " doesn't vote or someone votes in the wrong way." + ] + }, + { + "name": "MaxStrikes", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " The number of times a member may vote the wrong way (or not at all, when they are a skeptic)", + " before they become suspended." + ] + }, + { + "name": "PeriodSpend", + "type": "BalanceOf", + "value": "0x0000c52ebca2b1000000000000000000", + "documentation": [ + " The amount of incentive paid within each period. Doesn't include VoterTip." + ] + }, + { + "name": "RotationPeriod", + "type": "BlockNumber", + "value": "0x00770100", + "documentation": [ + " The number of blocks between candidate/membership rotation periods." + ] + }, + { + "name": "ChallengePeriod", + "type": "BlockNumber", + "value": "0x80130300", + "documentation": [ + " The number of blocks between membership challenges." + ] + } + ], + "errors": [ + { + "name": "BadPosition", + "documentation": [ + " An incorrect position was provided." + ] + }, + { + "name": "NotMember", + "documentation": [ + " User is not a member." + ] + }, + { + "name": "AlreadyMember", + "documentation": [ + " User is already a member." + ] + }, + { + "name": "Suspended", + "documentation": [ + " User is suspended." + ] + }, + { + "name": "NotSuspended", + "documentation": [ + " User is not suspended." + ] + }, + { + "name": "NoPayout", + "documentation": [ + " Nothing to payout." + ] + }, + { + "name": "AlreadyFounded", + "documentation": [ + " Society already founded." + ] + }, + { + "name": "InsufficientPot", + "documentation": [ + " Not enough in pot to accept candidate." + ] + }, + { + "name": "AlreadyVouching", + "documentation": [ + " Member is already vouching or banned from vouching again." + ] + }, + { + "name": "NotVouching", + "documentation": [ + " Member is not vouching." + ] + }, + { + "name": "Head", + "documentation": [ + " Cannot remove the head of the chain." + ] + }, + { + "name": "Founder", + "documentation": [ + " Cannot remove the founder." + ] + }, + { + "name": "AlreadyBid", + "documentation": [ + " User has already made a bid." + ] + }, + { + "name": "AlreadyCandidate", + "documentation": [ + " User is already a candidate." + ] + }, + { + "name": "NotCandidate", + "documentation": [ + " User is not a candidate." + ] + }, + { + "name": "MaxMembers", + "documentation": [ + " Too many members in the society." + ] + }, + { + "name": "NotFounder", + "documentation": [ + " The caller is not the founder." + ] + }, + { + "name": "NotHead", + "documentation": [ + " The caller is not the head." + ] + } + ] + }, + { + "name": "Recovery", + "storage": { + "prefix": "Recovery", + "items": [ + { + "name": "Recoverable", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "RecoveryConfig", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of recoverable accounts and their recovery configuration." + ] + }, + { + "name": "ActiveRecoveries", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "AccountId", + "value": "ActiveRecovery", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Active recovery attempts.", + "", + " First account is the account to be recovered, and the second account", + " is the user trying to recover the account." + ] + }, + { + "name": "Recovered", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_256", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The final list of recovered accounts.", + "", + " Map from the recovered account to the user who can access it." + ] + } + ] + }, + "calls": [ + { + "name": "as_recovered", + "args": [ + { + "name": "account", + "type": "AccountId" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Send a call through a recovered account.", + "", + " The dispatch origin for this call must be _Signed_ and registered to", + " be able to make calls on behalf of the recovered account.", + "", + " Parameters:", + " - `account`: The recovered account you want to make a call on-behalf-of.", + " - `call`: The call you want to make with the recovered account.", + "", + " # ", + " - The weight of the `call`.", + " - One storage lookup to check account is recovered by `who`. O(1)", + " # " + ] + }, + { + "name": "set_recovered", + "args": [ + { + "name": "lost", + "type": "AccountId" + }, + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " Allow ROOT to bypass the recovery process and set an a rescuer account", + " for a lost account directly.", + "", + " The dispatch origin for this call must be _ROOT_.", + "", + " Parameters:", + " - `lost`: The \"lost account\" to be recovered.", + " - `rescuer`: The \"rescuer account\" which can call as the lost account.", + "", + " # ", + " - One storage write O(1)", + " - One event", + " # " + ] + }, + { + "name": "create_recovery", + "args": [ + { + "name": "friends", + "type": "Vec" + }, + { + "name": "threshold", + "type": "u16" + }, + { + "name": "delay_period", + "type": "BlockNumber" + } + ], + "documentation": [ + " Create a recovery configuration for your account. This makes your account recoverable.", + "", + " Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", + " will be reserved for storing the recovery configuration. This deposit is returned", + " in full when the user calls `remove_recovery`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `friends`: A list of friends you trust to vouch for recovery attempts.", + " Should be ordered and contain no duplicate values.", + " - `threshold`: The number of friends that must vouch for a recovery attempt", + " before the account can be recovered. Should be less than or equal to", + " the length of the list of friends.", + " - `delay_period`: The number of blocks after a recovery attempt is initialized", + " that needs to pass before the account can be recovered.", + "", + " # ", + " - Key: F (len of friends)", + " - One storage read to check that account is not already recoverable. O(1).", + " - A check that the friends list is sorted and unique. O(F)", + " - One currency reserve operation. O(X)", + " - One storage write. O(1). Codec O(F).", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "initiate_recovery", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Initiate the process for recovering a recoverable account.", + "", + " Payment: `RecoveryDeposit` balance will be reserved for initiating the", + " recovery process. This deposit will always be repatriated to the account", + " trying to be recovered. See `close_recovery`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `account`: The lost account that you want to recover. This account", + " needs to be recoverable (i.e. have a recovery configuration).", + "", + " # ", + " - One storage read to check that account is recoverable. O(F)", + " - One storage read to check that this recovery process hasn't already started. O(1)", + " - One currency reserve operation. O(X)", + " - One storage read to get the current block number. O(1)", + " - One storage write. O(1).", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "vouch_recovery", + "args": [ + { + "name": "lost", + "type": "AccountId" + }, + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " Allow a \"friend\" of a recoverable account to vouch for an active recovery", + " process for that account.", + "", + " The dispatch origin for this call must be _Signed_ and must be a \"friend\"", + " for the recoverable account.", + "", + " Parameters:", + " - `lost`: The lost account that you want to recover.", + " - `rescuer`: The account trying to rescue the lost account that you", + " want to vouch for.", + "", + " The combination of these two parameters must point to an active recovery", + " process.", + "", + " # ", + " Key: F (len of friends in config), V (len of vouching friends)", + " - One storage read to get the recovery configuration. O(1), Codec O(F)", + " - One storage read to get the active recovery process. O(1), Codec O(V)", + " - One binary search to confirm caller is a friend. O(logF)", + " - One binary search to confirm caller has not already vouched. O(logV)", + " - One storage write. O(1), Codec O(V).", + " - One event.", + "", + " Total Complexity: O(F + logF + V + logV)", + " # " + ] + }, + { + "name": "claim_recovery", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Allow a successful rescuer to claim their recovered account.", + "", + " The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", + " who has successfully completed the account recovery process: collected", + " `threshold` or more vouches, waited `delay_period` blocks since initiation.", + "", + " Parameters:", + " - `account`: The lost account that you want to claim has been successfully", + " recovered by you.", + "", + " # ", + " Key: F (len of friends in config), V (len of vouching friends)", + " - One storage read to get the recovery configuration. O(1), Codec O(F)", + " - One storage read to get the active recovery process. O(1), Codec O(V)", + " - One storage read to get the current block number. O(1)", + " - One storage write. O(1), Codec O(V).", + " - One event.", + "", + " Total Complexity: O(F + V)", + " # " + ] + }, + { + "name": "close_recovery", + "args": [ + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " As the controller of a recoverable account, close an active recovery", + " process for your account.", + "", + " Payment: By calling this function, the recoverable account will receive", + " the recovery deposit `RecoveryDeposit` placed by the rescuer.", + "", + " The dispatch origin for this call must be _Signed_ and must be a", + " recoverable account with an active recovery process for it.", + "", + " Parameters:", + " - `rescuer`: The account trying to rescue this recoverable account.", + "", + " # ", + " Key: V (len of vouching friends)", + " - One storage read/remove to get the active recovery process. O(1), Codec O(V)", + " - One balance call to repatriate reserved. O(X)", + " - One event.", + "", + " Total Complexity: O(V + X)", + " # " + ] + }, + { + "name": "remove_recovery", + "args": [], + "documentation": [ + " Remove the recovery process for your account.", + "", + " NOTE: The user must make sure to call `close_recovery` on all active", + " recovery attempts before calling this function else it will fail.", + "", + " Payment: By calling this function the recoverable account will unreserve", + " their recovery configuration deposit.", + " (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)", + "", + " The dispatch origin for this call must be _Signed_ and must be a", + " recoverable account (i.e. has a recovery configuration).", + "", + " # ", + " Key: F (len of friends)", + " - One storage read to get the prefix iterator for active recoveries. O(1)", + " - One storage read/remove to get the recovery configuration. O(1), Codec O(F)", + " - One balance call to unreserved. O(X)", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + } + ], + "events": [ + { + "name": "RecoveryCreated", + "args": [ + "AccountId" + ], + "documentation": [ + " A recovery process has been set up for an account" + ] + }, + { + "name": "RecoveryInitiated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process has been initiated for account_1 by account_2" + ] + }, + { + "name": "RecoveryVouched", + "args": [ + "AccountId", + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process for account_1 by account_2 has been vouched for by account_3" + ] + }, + { + "name": "RecoveryClosed", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process for account_1 by account_2 has been closed" + ] + }, + { + "name": "AccountRecovered", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Account_1 has been successfully recovered by account_2" + ] + }, + { + "name": "RecoveryRemoved", + "args": [ + "AccountId" + ], + "documentation": [ + " A recovery process has been removed for an account" + ] + } + ], + "constants": [], + "errors": [] + } + ] + } + } +} diff --git a/packages/polkadot/tests/meta/v11.hex b/packages/polkadot/tests/meta/v11.hex new file mode 100644 index 00000000..65a31332 --- /dev/null +++ b/packages/polkadot/tests/meta/v11.hex @@ -0,0 +1 @@ +0x6d6574610b801853797374656d011853797374656d3c1c4163636f756e7401010230543a3a4163636f756e744964944163636f756e74496e666f3c543a3a496e6465782c20543a3a4163636f756e74446174613e00150100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004e8205468652066756c6c206163636f756e7420696e666f726d6174696f6e20666f72206120706172746963756c6172206163636f756e742049442e3845787472696e736963436f756e7400000c753332040004b820546f74616c2065787472696e7369637320636f756e7420666f72207468652063757272656e7420626c6f636b2e2c426c6f636b576569676874010064776569676874733a3a45787472696e7369637357656967687440000000000000000000000000000000000488205468652063757272656e742077656967687420666f722074686520626c6f636b2e40416c6c45787472696e736963734c656e00000c753332040004410120546f74616c206c656e6774682028696e2062797465732920666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e24426c6f636b4861736801010538543a3a426c6f636b4e756d6265721c543a3a48617368008000000000000000000000000000000000000000000000000000000000000000000498204d6170206f6620626c6f636b206e756d6265727320746f20626c6f636b206861736865732e3445787472696e736963446174610101050c7533321c5665633c75383e000400043d012045787472696e73696373206461746120666f72207468652063757272656e7420626c6f636b20286d61707320616e2065787472696e736963277320696e64657820746f206974732064617461292e184e756d626572010038543a3a426c6f636b4e756d6265721000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000004702048617368206f66207468652070726576696f757320626c6f636b2e3845787472696e73696373526f6f7401001c543a3a486173688000000000000000000000000000000000000000000000000000000000000000000415012045787472696e7369637320726f6f74206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e1844696765737401002c4469676573744f663c543e040004f020446967657374206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e184576656e747301008c5665633c4576656e745265636f72643c543a3a4576656e742c20543a3a486173683e3e040004a0204576656e7473206465706f736974656420666f72207468652063757272656e7420626c6f636b2e284576656e74436f756e740100284576656e74496e646578100000000004b820546865206e756d626572206f66206576656e747320696e2074686520604576656e74733c543e60206c6973742e2c4576656e74546f706963730101021c543a3a48617368845665633c28543a3a426c6f636b4e756d6265722c204576656e74496e646578293e000400282501204d617070696e67206265747765656e206120746f7069632028726570726573656e74656420627920543a3a486173682920616e64206120766563746f72206f6620696e646578657394206f66206576656e747320696e2074686520603c4576656e74733c543e3e60206c6973742e00510120416c6c20746f70696320766563746f727320686176652064657465726d696e69737469632073746f72616765206c6f636174696f6e7320646570656e64696e67206f6e2074686520746f7069632e2054686973450120616c6c6f7773206c696768742d636c69656e747320746f206c6576657261676520746865206368616e67657320747269652073746f7261676520747261636b696e67206d656368616e69736d20616e64e420696e2063617365206f66206368616e67657320666574636820746865206c697374206f66206576656e7473206f6620696e7465726573742e004d01205468652076616c756520686173207468652074797065206028543a3a426c6f636b4e756d6265722c204576656e74496e646578296020626563617573652069662077652075736564206f6e6c79206a7573744d012074686520604576656e74496e64657860207468656e20696e20636173652069662074686520746f70696320686173207468652073616d6520636f6e74656e7473206f6e20746865206e65787420626c6f636b0101206e6f206e6f74696669636174696f6e2077696c6c20626520747269676765726564207468757320746865206576656e74206d69676874206265206c6f73742e484c61737452756e74696d65557067726164650000584c61737452756e74696d6555706772616465496e666f04000455012053746f726573207468652060737065635f76657273696f6e6020616e642060737065635f6e616d6560206f66207768656e20746865206c6173742072756e74696d6520757067726164652068617070656e65642e38457865637574696f6e50686173650000145068617365040004882054686520657865637574696f6e207068617365206f662074686520626c6f636b2e01282866696c6c5f626c6f636b04185f726174696f1c50657262696c6c040901204120646973706174636820746861742077696c6c2066696c6c2074686520626c6f636b2077656967687420757020746f2074686520676976656e20726174696f2e1872656d61726b041c5f72656d61726b1c5665633c75383e1c6c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e002c2023203c7765696768743e24202d20604f28312960e0202d2042617365205765696768743a20302e36363520c2b5732c20696e646570656e64656e74206f662072656d61726b206c656e6774682e50202d204e6f204442206f7065726174696f6e732e302023203c2f7765696768743e387365745f686561705f7061676573041470616765730c75363420fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e002c2023203c7765696768743e24202d20604f283129604c202d20312073746f726167652077726974652e64202d2042617365205765696768743a20312e34303520c2b57360202d203120777269746520746f20484541505f5041474553302023203c2f7765696768743e207365745f636f64650410636f64651c5665633c75383e28682053657420746865206e65772072756e74696d6520636f64652e002c2023203c7765696768743e3501202d20604f2843202b2053296020776865726520604360206c656e677468206f662060636f64656020616e642060536020636f6d706c6578697479206f66206063616e5f7365745f636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e7901202d20312063616c6c20746f206063616e5f7365745f636f6465603a20604f28532960202863616c6c73206073705f696f3a3a6d6973633a3a72756e74696d655f76657273696f6e6020776869636820697320657870656e73697665292e2c202d2031206576656e742e7d012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652c206275742067656e6572616c6c792074686973206973207665727920657870656e736976652e902057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f636f64655f776974686f75745f636865636b730410636f64651c5665633c75383e201d012053657420746865206e65772072756e74696d6520636f646520776974686f757420646f696e6720616e7920636865636b73206f662074686520676976656e2060636f6465602e002c2023203c7765696768743e90202d20604f2843296020776865726520604360206c656e677468206f662060636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e2c202d2031206576656e742e75012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652e2057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f6368616e6765735f747269655f636f6e666967044c6368616e6765735f747269655f636f6e666967804f7074696f6e3c4368616e67657354726965436f6e66696775726174696f6e3e28a02053657420746865206e6577206368616e676573207472696520636f6e66696775726174696f6e2e002c2023203c7765696768743e24202d20604f28312960b0202d20312073746f72616765207772697465206f722064656c6574652028636f64656320604f28312960292ed8202d20312063616c6c20746f20606465706f7369745f6c6f67603a20557365732060617070656e6460204150492c20736f204f28312964202d2042617365205765696768743a20372e32313820c2b57334202d204442205765696768743aa820202020202d205772697465733a204368616e67657320547269652c2053797374656d20446967657374302023203c2f7765696768743e2c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e206c2053657420736f6d65206974656d73206f662073746f726167652e002c2023203c7765696768743e94202d20604f2849296020776865726520604960206c656e677468206f6620606974656d73607c202d206049602073746f72616765207772697465732028604f28312960292e74202d2042617365205765696768743a20302e353638202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e306b696c6c5f73746f7261676504106b657973205665633c4b65793e2078204b696c6c20736f6d65206974656d732066726f6d2073746f726167652e002c2023203c7765696768743efc202d20604f28494b296020776865726520604960206c656e677468206f6620606b6579736020616e6420604b60206c656e677468206f66206f6e65206b657964202d206049602073746f726167652064656c6574696f6e732e70202d2042617365205765696768743a202e333738202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e2c6b696c6c5f70726566697808187072656669780c4b6579205f7375626b6579730c7533322c1501204b696c6c20616c6c2073746f72616765206974656d7320776974682061206b657920746861742073746172747320776974682074686520676976656e207072656669782e003d01202a2a4e4f54453a2a2a2057652072656c79206f6e2074686520526f6f74206f726967696e20746f2070726f7669646520757320746865206e756d626572206f66207375626b65797320756e64657241012074686520707265666978207765206172652072656d6f76696e6720746f2061636375726174656c792063616c63756c6174652074686520776569676874206f6620746869732066756e6374696f6e2e002c2023203c7765696768743edc202d20604f285029602077686572652060506020616d6f756e74206f66206b65797320776974682070726566697820607072656669786064202d206050602073746f726167652064656c6574696f6e732e74202d2042617365205765696768743a20302e383334202a205020c2b57380202d205772697465733a204e756d626572206f66207375626b657973202b2031302023203c2f7765696768743e1c7375696369646500286501204b696c6c207468652073656e64696e67206163636f756e742c20617373756d696e6720746865726520617265206e6f207265666572656e636573206f75747374616e64696e6720616e642074686520636f6d706f7369746590206461746120697320657175616c20746f206974732064656661756c742076616c75652e002c2023203c7765696768743e24202d20604f283129607c202d20312073746f72616765207265616420616e642064656c6574696f6e2e54202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d5c2042617365205765696768743a20382e36323620c2b5731101204e6f2044422052656164206f72205772697465206f7065726174696f6e7320626563617573652063616c6c657220697320616c726561647920696e206f7665726c6179302023203c2f7765696768743e01144045787472696e7369635375636365737304304469737061746368496e666f04b020416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e205b696e666f5d3c45787472696e7369634661696c6564083444697370617463684572726f72304469737061746368496e666f048c20416e2065787472696e736963206661696c65642e205b6572726f722c20696e666f5d2c436f64655570646174656400045420603a636f6465602077617320757064617465642e284e65774163636f756e7404244163636f756e74496404742041206e6577205b6163636f756e745d2077617320637265617465642e344b696c6c65644163636f756e7404244163636f756e744964046420416e205b6163636f756e745d20776173207265617065642e1838426c6f636b48617368436f756e7438543a3a426c6f636b4e756d626572106009000004d820546865206d6178696d756d206e756d626572206f6620626c6f636b7320746f20616c6c6f7720696e206d6f7274616c20657261732e484d6178696d756d426c6f636b576569676874185765696768742000204aa9d1010000047c20546865206d6178696d756d20776569676874206f66206120626c6f636b2e2044625765696768743c52756e74696d6544625765696768744040787d010000000000e1f505000000000409012054686520776569676874206f662072756e74696d65206461746162617365206f7065726174696f6e73207468652072756e74696d652063616e20696e766f6b652e50426c6f636b457865637574696f6e576569676874185765696768742000f2052a0100000004510120546865206261736520776569676874206f6620657865637574696e67206120626c6f636b2c20696e646570656e64656e74206f6620746865207472616e73616374696f6e7320696e2074686520626c6f636b2e4c45787472696e736963426173655765696768741857656967687420405973070000000004790120546865206261736520776569676874206f6620616e2045787472696e73696320696e2074686520626c6f636b2c20696e646570656e64656e74206f6620746865206f662065787472696e736963206265696e672065786563757465642e484d6178696d756d426c6f636b4c656e6774680c753332100000500004a820546865206d6178696d756d206c656e677468206f66206120626c6f636b2028696e206279746573292e143c496e76616c6964537065634e616d6508150120546865206e616d65206f662073706563696669636174696f6e20646f6573206e6f74206d61746368206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e685370656356657273696f6e4e65656473546f496e637265617365084501205468652073706563696669636174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e744661696c6564546f4578747261637452756e74696d6556657273696f6e0cf0204661696c656420746f2065787472616374207468652072756e74696d652076657273696f6e2066726f6d20746865206e65772072756e74696d652e000d01204569746865722063616c6c696e672060436f72655f76657273696f6e60206f72206465636f64696e67206052756e74696d6556657273696f6e60206661696c65642e4c4e6f6e44656661756c74436f6d706f7369746504010120537569636964652063616c6c6564207768656e20746865206163636f756e7420686173206e6f6e2d64656661756c7420636f6d706f7369746520646174612e3c4e6f6e5a65726f526566436f756e740439012054686572652069732061206e6f6e2d7a65726f207265666572656e636520636f756e742070726576656e74696e6720746865206163636f756e742066726f6d206265696e67207075726765642e1c5574696c697479000108146261746368041463616c6c735c5665633c3c542061732054726169743e3a3a43616c6c3e50802053656e642061206261746368206f662064697370617463682063616c6c732e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e006101204966206f726967696e20697320726f6f74207468656e2063616c6c2061726520646973706174636820776974686f757420636865636b696e67206f726967696e2066696c7465722e20285468697320696e636c75646573c820627970617373696e6720606672616d655f73797374656d3a3a54726169743a3a4261736543616c6c46696c74657260292e002c2023203c7765696768743e90202d2042617365207765696768743a2031342e3339202b202e393837202a206320c2b573b8202d20506c7573207468652073756d206f66207468652077656967687473206f6620746865206063616c6c73602ec4202d20506c7573206f6e65206164646974696f6e616c206576656e742e202872657065617420726561642f777269746529302023203c2f7765696768743e00590120546869732077696c6c2072657475726e20604f6b6020696e20616c6c2063697263756d7374616e6365732e20546f2064657465726d696e65207468652073756363657373206f66207468652062617463682c20616e3501206576656e74206973206465706f73697465642e20496620612063616c6c206661696c656420616e64207468652062617463682077617320696e7465727275707465642c207468656e20746865590120604261746368496e74657272757074656460206576656e74206973206465706f73697465642c20616c6f6e67207769746820746865206e756d626572206f66207375636365737366756c2063616c6c73206d616465510120616e6420746865206572726f72206f6620746865206661696c65642063616c6c2e20496620616c6c2077657265207375636365737366756c2c207468656e2074686520604261746368436f6d706c657465646050206576656e74206973206465706f73697465642e3461735f646572697661746976650814696e6465780c7531361063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e34e02053656e6420612063616c6c207468726f75676820616e20696e64657865642070736575646f6e796d206f66207468652073656e6465722e0059012046696c7465722066726f6d206f726967696e206172652070617373656420616c6f6e672e205468652063616c6c2077696c6c2062652064697370617463686564207769746820616e206f726967696e207768696368c020757365207468652073616d652066696c74657220617320746865206f726967696e206f6620746869732063616c6c2e004901204e4f54453a20496620796f75206e65656420746f20656e73757265207468617420616e79206163636f756e742d62617365642066696c746572696e67206973206e6f7420686f6e6f7265642028692e652e6501206265636175736520796f7520657870656374206070726f78796020746f2068617665206265656e2075736564207072696f7220696e207468652063616c6c20737461636b20616e6420796f7520646f206e6f742077616e745501207468652063616c6c207265737472696374696f6e7320746f206170706c7920746f20616e79207375622d6163636f756e7473292c207468656e20757365206061735f6d756c74695f7468726573686f6c645f31608020696e20746865204d756c74697369672070616c6c657420696e73746561642e00f8204e4f54453a205072696f7220746f2076657273696f6e202a31322c2074686973207761732063616c6c6564206061735f6c696d697465645f737562602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0108404261746368496e746572727570746564080c7533323444697370617463684572726f72085901204261746368206f66206469737061746368657320646964206e6f7420636f6d706c6574652066756c6c792e20496e646578206f66206669727374206661696c696e6720646973706174636820676976656e2c206173882077656c6c20617320746865206572726f722e205b696e6465782c206572726f725d384261746368436f6d706c657465640004cc204261746368206f66206469737061746368657320636f6d706c657465642066756c6c792077697468206e6f206572726f722e000010426162650110426162652c2845706f6368496e64657801000c75363420000000000000000004542043757272656e742065706f636820696e6465782e2c417574686f72697469657301009c5665633c28417574686f7269747949642c2042616265417574686f72697479576569676874293e0400046c2043757272656e742065706f636820617574686f7269746965732e2c47656e65736973536c6f7401000c75363420000000000000000008f82054686520736c6f74206174207768696368207468652066697273742065706f63682061637475616c6c7920737461727465642e205468697320697320309020756e74696c2074686520666972737420626c6f636b206f662074686520636861696e2e2c43757272656e74536c6f7401000c75363420000000000000000004542043757272656e7420736c6f74206e756d6265722e2852616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e65737380000000000000000000000000000000000000000000000000000000000000000028b8205468652065706f63682072616e646f6d6e65737320666f7220746865202a63757272656e742a2065706f63682e002c20232053656375726974790005012054686973204d555354204e4f54206265207573656420666f722067616d626c696e672c2061732069742063616e20626520696e666c75656e6365642062792061f8206d616c6963696f75732076616c696461746f7220696e207468652073686f7274207465726d2e204974204d4159206265207573656420696e206d616e7915012063727970746f677261706869632070726f746f636f6c732c20686f77657665722c20736f206c6f6e67206173206f6e652072656d656d6265727320746861742074686973150120286c696b652065766572797468696e6720656c7365206f6e2d636861696e29206974206973207075626c69632e20466f72206578616d706c652c2069742063616e206265050120757365642077686572652061206e756d626572206973206e656564656420746861742063616e6e6f742068617665206265656e2063686f73656e20627920616e0d01206164766572736172792c20666f7220707572706f7365732073756368206173207075626c69632d636f696e207a65726f2d6b6e6f776c656467652070726f6f66732e3c4e65787445706f6368436f6e6669670000504e657874436f6e66696744657363726970746f7204000498204e6578742065706f636820636f6e66696775726174696f6e2c206966206368616e6765642e384e65787452616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e657373800000000000000000000000000000000000000000000000000000000000000000045c204e6578742065706f63682072616e646f6d6e6573732e305365676d656e74496e64657801000c7533321000000000247c2052616e646f6d6e65737320756e64657220636f6e737472756374696f6e2e00f4205765206d616b6520612074726164656f6666206265747765656e2073746f7261676520616363657373657320616e64206c697374206c656e6774682e01012057652073746f72652074686520756e6465722d636f6e737472756374696f6e2072616e646f6d6e65737320696e207365676d656e7473206f6620757020746f942060554e4445525f434f4e535452554354494f4e5f5345474d454e545f4c454e475448602e00ec204f6e63652061207365676d656e7420726561636865732074686973206c656e6774682c20776520626567696e20746865206e657874206f6e652e090120576520726573657420616c6c207365676d656e747320616e642072657475726e20746f206030602061742074686520626567696e6e696e67206f662065766572791c2065706f63682e44556e646572436f6e737472756374696f6e0101050c7533326c5665633c7363686e6f72726b656c3a3a52616e646f6d6e6573733e0004000415012054574f582d4e4f54453a20605365676d656e74496e6465786020697320616e20696e6372656173696e6720696e74656765722c20736f2074686973206973206f6b61792e2c496e697469616c697a656400003c4d6179626552616e646f6d6e65737304000801012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e292077686963682069732060536f6d65601d01206966207065722d626c6f636b20696e697469616c697a6174696f6e2068617320616c7265616479206265656e2063616c6c656420666f722063757272656e7420626c6f636b2e204c6174656e657373010038543a3a426c6f636b4e756d626572100000000014d820486f77206c617465207468652063757272656e7420626c6f636b20697320636f6d706172656420746f2069747320706172656e742e001501205468697320656e74727920697320706f70756c617465642061732070617274206f6620626c6f636b20657865637574696f6e20616e6420697320636c65616e65642075701101206f6e20626c6f636b2066696e616c697a6174696f6e2e205175657279696e6720746869732073746f7261676520656e747279206f757473696465206f6620626c6f636bb020657865637574696f6e20636f6e746578742073686f756c6420616c77617973207969656c64207a65726f2e01084c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66200d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e00083445706f63684475726174696f6e0c75363420c800000000000000080d0120546865206e756d626572206f66202a2a736c6f74732a2a207468617420616e2065706f63682074616b65732e20576520636f75706c652073657373696f6e7320746ffc2065706f6368732c20692e652e2077652073746172742061206e65772073657373696f6e206f6e636520746865206e65772065706f636820626567696e732e444578706563746564426c6f636b54696d6524543a3a4d6f6d656e7420b80b00000000000014050120546865206578706563746564206176657261676520626c6f636b2074696d6520617420776869636820424142452073686f756c64206265206372656174696e67110120626c6f636b732e2053696e636520424142452069732070726f626162696c6973746963206974206973206e6f74207472697669616c20746f20666967757265206f75740501207768617420746865206578706563746564206176657261676520626c6f636b2074696d652073686f756c64206265206261736564206f6e2074686520736c6f740901206475726174696f6e20616e642074686520736563757269747920706172616d657465722060636020287768657265206031202d20636020726570726573656e7473a0207468652070726f626162696c697479206f66206120736c6f74206265696e6720656d707479292e002454696d657374616d70012454696d657374616d70080c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f01040c736574040c6e6f7748436f6d706163743c543a3a4d6f6d656e743e3c5820536574207468652063757272656e742074696d652e00590120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6ed82070686173652c20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e004501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062794420604d696e696d756d506572696f64602e00d820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060496e686572656e74602e002c2023203c7765696768743ed0202d20604f285429602077686572652060546020636f6d706c6578697479206f6620606f6e5f74696d657374616d705f73657460a101202d20312073746f72616765207265616420616e6420312073746f72616765206d75746174696f6e2028636f64656320604f28312960292e202862656361757365206f6620604469645570646174653a3a74616b656020696e20606f6e5f66696e616c697a656029b4202d2031206576656e742068616e646c657220606f6e5f74696d657374616d705f7365746020604f285429602e302023203c2f7765696768743e0004344d696e696d756d506572696f6424543a3a4d6f6d656e7420dc0500000000000010690120546865206d696e696d756d20706572696f64206265747765656e20626c6f636b732e204265776172652074686174207468697320697320646966666572656e7420746f20746865202a65787065637465642a20706572696f64690120746861742074686520626c6f636b2070726f64756374696f6e206170706172617475732070726f76696465732e20596f75722063686f73656e20636f6e73656e7375732073797374656d2077696c6c2067656e6572616c6c79650120776f726b2077697468207468697320746f2064657465726d696e6520612073656e7369626c6520626c6f636b2074696d652e20652e672e20466f7220417572612c2069742077696c6c20626520646f75626c6520746869737020706572696f64206f6e2064656661756c742073657474696e67732e0028417574686f72736869700128417574686f72736869700c18556e636c65730100e85665633c556e636c65456e7472794974656d3c543a3a426c6f636b4e756d6265722c20543a3a486173682c20543a3a4163636f756e7449643e3e0400041c20556e636c657318417574686f72000030543a3a4163636f756e7449640400046420417574686f72206f662063757272656e7420626c6f636b2e30446964536574556e636c6573010010626f6f6c040004bc205768657468657220756e636c6573207765726520616c72656164792073657420696e207468697320626c6f636b2e0104287365745f756e636c657304286e65775f756e636c6573385665633c543a3a4865616465723e04642050726f76696465206120736574206f6620756e636c65732e00001c48496e76616c6964556e636c65506172656e74048c2054686520756e636c6520706172656e74206e6f7420696e2074686520636861696e2e40556e636c6573416c7265616479536574048420556e636c657320616c72656164792073657420696e2074686520626c6f636b2e34546f6f4d616e79556e636c6573044420546f6f206d616e7920756e636c65732e3047656e65736973556e636c6504582054686520756e636c652069732067656e657369732e30546f6f48696768556e636c6504802054686520756e636c6520697320746f6f206869676820696e20636861696e2e50556e636c65416c7265616479496e636c75646564047c2054686520756e636c6520697320616c726561647920696e636c756465642e204f6c64556e636c6504b82054686520756e636c652069736e277420726563656e7420656e6f75676820746f20626520696e636c756465642e1c496e6469636573011c496e646963657304204163636f756e74730001023c543a3a4163636f756e74496e6465788828543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20626f6f6c29000400048820546865206c6f6f6b75702066726f6d20696e64657820746f206163636f756e742e011414636c61696d0414696e6465783c543a3a4163636f756e74496e6465784c9c2041737369676e20616e2070726576696f75736c7920756e61737369676e656420696e6465782e00e0205061796d656e743a20604465706f736974602069732072657365727665642066726f6d207468652073656e646572206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e00f4202d2060696e646578603a2074686520696e64657820746f20626520636c61696d65642e2054686973206d757374206e6f7420626520696e207573652e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d64202d2042617365205765696768743a2032382e363920c2b57394202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e207472616e73666572080c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e6465785461012041737369676e20616e20696e64657820616c7265616479206f776e6564206279207468652073656e64657220746f20616e6f74686572206163636f756e742e205468652062616c616e6365207265736572766174696f6ebc206973206566666563746976656c79207472616e7366657272656420746f20746865206e6577206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002901202d2060696e646578603a2074686520696e64657820746f2062652072652d61737369676e65642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e68202d204f6e65207472616e73666572206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d64202d2042617365205765696768743a2033332e373420c2b57334202d204442205765696768743ae4202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429e8202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429302023203c2f7765696768743e10667265650414696e6465783c543a3a4163636f756e74496e6465784c98204672656520757020616e20696e646578206f776e6564206279207468652073656e6465722e006101205061796d656e743a20416e792070726576696f7573206465706f73697420706c6163656420666f722074686520696e64657820697320756e726573657276656420696e207468652073656e646572206163636f756e742e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206f776e2074686520696e6465782e001101202d2060696e646578603a2074686520696e64657820746f2062652066726565642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e008820456d6974732060496e646578467265656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d64202d2042617365205765696768743a2032352e353320c2b57394202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e38666f7263655f7472616e736665720c0c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e64657818667265657a6510626f6f6c58590120466f72636520616e20696e64657820746f20616e206163636f756e742e205468697320646f65736e277420726571756972652061206465706f7369742e2049662074686520696e64657820697320616c7265616479ec2068656c642c207468656e20616e79206465706f736974206973207265696d62757273656420746f206974732063757272656e74206f776e65722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00a8202d2060696e646578603a2074686520696e64657820746f206265202872652d2961737369676e65642e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e4501202d2060667265657a65603a2069662073657420746f206074727565602c2077696c6c20667265657a652074686520696e64657820736f2069742063616e6e6f74206265207472616e736665727265642e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e7c202d20557020746f206f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d64202d2042617365205765696768743a2032362e383320c2b57334202d204442205765696768743af8202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229fc202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229302023203c2f7765696768743e18667265657a650414696e6465783c543a3a4163636f756e74496e64657848690120467265657a6520616e20696e64657820736f2069742077696c6c20616c7761797320706f696e7420746f207468652073656e646572206163636f756e742e205468697320636f6e73756d657320746865206465706f7369742e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d7573742068617665206170206e6f6e2d66726f7a656e206163636f756e742060696e646578602e00b0202d2060696e646578603a2074686520696e64657820746f2062652066726f7a656e20696e20706c6163652e008c20456d6974732060496e64657846726f7a656e60206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e74202d20557020746f206f6e6520736c617368206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d64202d2042617365205765696768743a2033302e383620c2b57394202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e010c34496e64657841737369676e656408244163636f756e744964304163636f756e74496e64657804ac2041206163636f756e7420696e646578207761732061737369676e65642e205b77686f2c20696e6465785d28496e646578467265656404304163636f756e74496e64657804e02041206163636f756e7420696e64657820686173206265656e2066726565642075702028756e61737369676e6564292e205b696e6465785d2c496e64657846726f7a656e08304163636f756e74496e646578244163636f756e7449640421012041206163636f756e7420696e64657820686173206265656e2066726f7a656e20746f206974732063757272656e74206163636f756e742049442e205b77686f2c20696e6465785d041c4465706f7369743042616c616e63654f663c543e4000407a10f35a0000000000000000000004ac20546865206465706f736974206e656564656420666f7220726573657276696e6720616e20696e6465782e002042616c616e636573012042616c616e6365731034546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004982054686520746f74616c20756e6974732069737375656420696e207468652073797374656d2e1c4163636f756e7401010230543a3a4163636f756e7449645c4163636f756e74446174613c543a3a42616c616e63653e000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c6c205468652062616c616e6365206f6620616e206163636f756e742e004101204e4f54453a2054686973206973206f6e6c79207573656420696e20746865206361736520746861742074686973206d6f64756c65206973207573656420746f2073746f72652062616c616e6365732e144c6f636b7301010230543a3a4163636f756e744964705665633c42616c616e63654c6f636b3c543a3a42616c616e63653e3e00040008b820416e79206c6971756964697479206c6f636b73206f6e20736f6d65206163636f756e742062616c616e6365732e2501204e4f54453a2053686f756c64206f6e6c79206265206163636573736564207768656e2073657474696e672c206368616e67696e6720616e642066726565696e672061206c6f636b2e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076322e302e3020666f72206e6577206e6574776f726b732e0110207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e6cd8205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572206163636f756e742e00090120607472616e73666572602077696c6c207365742074686520604672656542616c616e636560206f66207468652073656e64657220616e642072656365697665722e21012049742077696c6c2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d2062792074686520605472616e73666572466565602e1501204966207468652073656e6465722773206163636f756e742069732062656c6f7720746865206578697374656e7469616c206465706f736974206173206120726573756c74b4206f6620746865207472616e736665722c20746865206163636f756e742077696c6c206265207265617065642e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605369676e65646020627920746865207472616e736163746f722e002c2023203c7765696768743e3101202d20446570656e64656e74206f6e20617267756d656e747320627574206e6f7420637269746963616c2c20676976656e2070726f70657220696d706c656d656e746174696f6e7320666f72cc202020696e70757420636f6e6669672074797065732e205365652072656c617465642066756e6374696f6e732062656c6f772e6901202d20497420636f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e642077726974657320696e7465726e616c6c7920616e64206e6f20636f6d706c657820636f6d7075746174696f6e2e004c2052656c617465642066756e6374696f6e733a0051012020202d2060656e737572655f63616e5f77697468647261776020697320616c776179732063616c6c656420696e7465726e616c6c792062757420686173206120626f756e64656420636f6d706c65786974792e2d012020202d205472616e7366657272696e672062616c616e63657320746f206163636f756e7473207468617420646964206e6f74206578697374206265666f72652077696c6c206361757365d420202020202060543a3a4f6e4e65774163636f756e743a3a6f6e5f6e65775f6163636f756e746020746f2062652063616c6c65642e61012020202d2052656d6f76696e6720656e6f7567682066756e64732066726f6d20616e206163636f756e742077696c6c20747269676765722060543a3a4475737452656d6f76616c3a3a6f6e5f756e62616c616e636564602e49012020202d20607472616e736665725f6b6565705f616c6976656020776f726b73207468652073616d652077617920617320607472616e73666572602c206275742068617320616e206164646974696f6e616cf82020202020636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c20746865206f726967696e206163636f756e742e88202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d4501202d2042617365205765696768743a2037332e363420c2b5732c20776f7273742063617365207363656e6172696f20286163636f756e7420637265617465642c206163636f756e742072656d6f76656429dc202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374696e6174696f6e206163636f756e741501202d204f726967696e206163636f756e7420697320616c726561647920696e206d656d6f72792c20736f206e6f204442206f7065726174696f6e7320666f72207468656d2e302023203c2f7765696768743e2c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365206e65775f667265654c436f6d706163743c543a3a42616c616e63653e306e65775f72657365727665644c436f6d706163743c543a3a42616c616e63653e489420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e00210120546869732077696c6c20616c74657220604672656542616c616e63656020616e642060526573657276656442616c616e63656020696e2073746f726167652e2069742077696c6c090120616c736f2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d202860546f74616c49737375616e636560292e190120496620746865206e65772066726565206f722072657365727665642062616c616e63652069732062656c6f7720746865206578697374656e7469616c206465706f7369742c01012069742077696c6c20726573657420746865206163636f756e74206e6f6e63652028606672616d655f73797374656d3a3a4163636f756e744e6f6e636560292e00b420546865206469737061746368206f726967696e20666f7220746869732063616c6c2069732060726f6f74602e002c2023203c7765696768743e80202d20496e646570656e64656e74206f662074686520617267756d656e74732ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e58202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c202d2042617365205765696768743a6820202020202d204372656174696e673a2032372e353620c2b5736420202020202d204b696c6c696e673a2033352e313120c2b57398202d204442205765696768743a203120526561642c203120577269746520746f206077686f60302023203c2f7765696768743e38666f7263655f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e1851012045786163746c7920617320607472616e73666572602c2065786365707420746865206f726967696e206d75737420626520726f6f7420616e642074686520736f75726365206163636f756e74206d61792062652c207370656369666965642e2c2023203c7765696768743e4101202d2053616d65206173207472616e736665722c20627574206164646974696f6e616c207265616420616e6420777269746520626563617573652074686520736f75726365206163636f756e74206973902020206e6f7420617373756d656420746f20626520696e20746865206f7665726c61792e302023203c2f7765696768743e4c7472616e736665725f6b6565705f616c6976650810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e2c51012053616d6520617320746865205b607472616e73666572605d2063616c6c2c206275742077697468206120636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c2074686540206f726967696e206163636f756e742e00bc20393925206f66207468652074696d6520796f752077616e74205b607472616e73666572605d20696e73746561642e00c4205b607472616e73666572605d3a207374727563742e4d6f64756c652e68746d6c236d6574686f642e7472616e736665722c2023203c7765696768743ee8202d2043686561706572207468616e207472616e736665722062656361757365206163636f756e742063616e6e6f74206265206b696c6c65642e60202d2042617365205765696768743a2035312e3420c2b5731d01202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374202873656e64657220697320696e206f7665726c617920616c7265616479292c20233c2f7765696768743e01201c456e646f77656408244163636f756e7449641c42616c616e6365041d0120416e206163636f756e74207761732063726561746564207769746820736f6d6520667265652062616c616e63652e205b6163636f756e742c20667265655f62616c616e63655d20447573744c6f737408244163636f756e7449641c42616c616e636508410120416e206163636f756e74207761732072656d6f7665642077686f73652062616c616e636520776173206e6f6e2d7a65726f206275742062656c6f77204578697374656e7469616c4465706f7369742cc820726573756c74696e6720696e20616e206f75747269676874206c6f73732e205b6163636f756e742c2062616c616e63655d205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e63650498205472616e73666572207375636365656465642e205b66726f6d2c20746f2c2076616c75655d2842616c616e63655365740c244163636f756e7449641c42616c616e63651c42616c616e636504c420412062616c616e6365207761732073657420627920726f6f742e205b77686f2c20667265652c2072657365727665645d1c4465706f73697408244163636f756e7449641c42616c616e636504190120536f6d6520616d6f756e7420776173206465706f73697465642028652e672e20666f72207472616e73616374696f6e2066656573292e205b77686f2c206465706f7369745d20526573657276656408244163636f756e7449641c42616c616e636504190120536f6d652062616c616e63652077617320726573657276656420286d6f7665642066726f6d206672656520746f207265736572766564292e205b77686f2c2076616c75655d28556e726573657276656408244163636f756e7449641c42616c616e636504210120536f6d652062616c616e63652077617320756e726573657276656420286d6f7665642066726f6d20726573657276656420746f2066726565292e205b77686f2c2076616c75655d4852657365727665526570617472696174656410244163636f756e744964244163636f756e7449641c42616c616e6365185374617475730c510120536f6d652062616c616e636520776173206d6f7665642066726f6d207468652072657365727665206f6620746865206669727374206163636f756e7420746f20746865207365636f6e64206163636f756e742edc2046696e616c20617267756d656e7420696e64696361746573207468652064657374696e6174696f6e2062616c616e636520747970652ea0205b66726f6d2c20746f2c2062616c616e63652c2064657374696e6174696f6e5f7374617475735d04484578697374656e7469616c4465706f73697428543a3a42616c616e63654000407a10f35a0000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f206b65657020616e206163636f756e74206f70656e2e203856657374696e6742616c616e6365049c2056657374696e672062616c616e636520746f6f206869676820746f2073656e642076616c7565544c69717569646974795265737472696374696f6e7304c8204163636f756e74206c6971756964697479207265737472696374696f6e732070726576656e74207769746864726177616c204f766572666c6f77047420476f7420616e206f766572666c6f7720616674657220616464696e674c496e73756666696369656e7442616c616e636504782042616c616e636520746f6f206c6f7720746f2073656e642076616c7565484578697374656e7469616c4465706f73697404ec2056616c756520746f6f206c6f7720746f20637265617465206163636f756e742064756520746f206578697374656e7469616c206465706f736974244b656570416c6976650490205472616e736665722f7061796d656e7420776f756c64206b696c6c206163636f756e745c4578697374696e6756657374696e675363686564756c6504cc20412076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e742c446561644163636f756e74048c2042656e6566696369617279206163636f756e74206d757374207072652d6578697374485472616e73616374696f6e5061796d656e7401485472616e73616374696f6e5061796d656e7408444e6578744665654d756c7469706c6965720100284d756c7469706c69657240000064a7b3b6e00d0000000000000000003853746f7261676556657273696f6e01002052656c6561736573040000000008485472616e73616374696f6e427974654665653042616c616e63654f663c543e4000e40b54020000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e2c576569676874546f466565a45665633c576569676874546f466565436f656666696369656e743c42616c616e63654f663c543e3e3e5c0401000000000000000000000000000000000000000001040d012054686520706f6c796e6f6d69616c2074686174206973206170706c69656420696e206f7264657220746f20646572697665206665652066726f6d207765696768742e001c5374616b696e67011c5374616b696e678c30486973746f7279446570746801000c75333210540000001c8c204e756d626572206f66206572617320746f206b65657020696e20686973746f72792e00390120496e666f726d6174696f6e206973206b65707420666f72206572617320696e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e006101204d757374206265206d6f7265207468616e20746865206e756d626572206f6620657261732064656c617965642062792073657373696f6e206f74686572776973652e20492e652e2061637469766520657261206d757374390120616c7761797320626520696e20686973746f72792e20492e652e20606163746976655f657261203e2063757272656e745f657261202d20686973746f72795f646570746860206d757374206265302067756172616e746565642e3856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321000000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e34496e76756c6e657261626c65730100445665633c543a3a4163636f756e7449643e04000c590120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c79206b69636b65642e20497427732061205665632073696e636520746865792772654d01206561737920746f20696e697469616c697a6520616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f7572ac20696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e18426f6e64656400010530543a3a4163636f756e74496430543a3a4163636f756e744964000400040101204d61702066726f6d20616c6c206c6f636b65642022737461736822206163636f756e747320746f2074686520636f6e74726f6c6c6572206163636f756e742e184c656467657200010230543a3a4163636f756e744964a45374616b696e674c65646765723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400044501204d61702066726f6d20616c6c2028756e6c6f636b6564292022636f6e74726f6c6c657222206163636f756e747320746f2074686520696e666f20726567617264696e6720746865207374616b696e672e14506179656501010530543a3a4163636f756e7449647c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e00040004e42057686572652074686520726577617264207061796d656e742073686f756c64206265206d6164652e204b657965642062792073746173682e2856616c696461746f727301010530543a3a4163636f756e7449643856616c696461746f72507265667300040004450120546865206d61702066726f6d202877616e6e616265292076616c696461746f72207374617368206b657920746f2074686520707265666572656e636573206f6620746861742076616c696461746f722e284e6f6d696e61746f727300010530543a3a4163636f756e744964644e6f6d696e6174696f6e733c543a3a4163636f756e7449643e00040004650120546865206d61702066726f6d206e6f6d696e61746f72207374617368206b657920746f2074686520736574206f66207374617368206b657973206f6620616c6c2076616c696461746f727320746f206e6f6d696e6174652e2843757272656e74457261000020457261496e6465780400105c205468652063757272656e742065726120696e6465782e006501205468697320697320746865206c617465737420706c616e6e6564206572612c20646570656e64696e67206f6e20686f77207468652053657373696f6e2070616c6c657420717565756573207468652076616c696461746f7280207365742c206974206d6967687420626520616374697665206f72206e6f742e24416374697665457261000034416374697665457261496e666f040010d820546865206163746976652065726120696e666f726d6174696f6e2c20697420686f6c647320696e64657820616e642073746172742e00b820546865206163746976652065726120697320746865206572612063757272656e746c792072657761726465642e2d012056616c696461746f7220736574206f66207468697320657261206d75737420626520657175616c20746f206053657373696f6e496e746572666163653a3a76616c696461746f7273602e5445726173537461727453657373696f6e496e64657800010520457261496e6465783053657373696f6e496e646578000400043101205468652073657373696f6e20696e646578206174207768696368207468652065726120737461727420666f7220746865206c6173742060484953544f52595f44455054486020657261732e2c457261735374616b65727301020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000001878204578706f73757265206f662076616c696461746f72206174206572612e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e48457261735374616b657273436c697070656401020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000002c9820436c6970706564204578706f73757265206f662076616c696461746f72206174206572612e00590120546869732069732073696d696c617220746f205b60457261735374616b657273605d20627574206e756d626572206f66206e6f6d696e61746f7273206578706f736564206973207265647563656420746f20746865dc2060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732e1d0120284e6f74653a20746865206669656c642060746f74616c6020616e6420606f776e60206f6620746865206578706f737572652072656d61696e7320756e6368616e676564292ef42054686973206973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e005d012054686973206973206b657965642066697374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e484572617356616c696461746f72507265667301020520457261496e64657830543a3a4163636f756e7449643856616c696461746f7250726566730504001411012053696d696c617220746f2060457261735374616b657273602c207468697320686f6c64732074686520707265666572656e636573206f662076616c696461746f72732e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4c4572617356616c696461746f7252657761726400010520457261496e6465783042616c616e63654f663c543e0004000c09012054686520746f74616c2076616c696461746f7220657261207061796f757420666f7220746865206c6173742060484953544f52595f44455054486020657261732e0021012045726173207468617420686176656e27742066696e697368656420796574206f7220686173206265656e2072656d6f76656420646f65736e27742068617665207265776172642e4045726173526577617264506f696e747301010520457261496e64657874457261526577617264506f696e74733c543a3a4163636f756e7449643e0014000000000008ac205265776172647320666f7220746865206c6173742060484953544f52595f44455054486020657261732e250120496620726577617264206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207265776172642069732072657475726e65642e3845726173546f74616c5374616b6501010520457261496e6465783042616c616e63654f663c543e00400000000000000000000000000000000008ec2054686520746f74616c20616d6f756e74207374616b656420666f7220746865206c6173742060484953544f52595f44455054486020657261732e1d0120496620746f74616c206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207374616b652069732072657475726e65642e20466f72636545726101001c466f7263696e6704000454204d6f6465206f662065726120666f7263696e672e4c536c6173685265776172644672616374696f6e01001c50657262696c6c10000000000cf8205468652070657263656e74616765206f662074686520736c617368207468617420697320646973747269627574656420746f207265706f72746572732e00e4205468652072657374206f662074686520736c61736865642076616c75652069732068616e646c6564206279207468652060536c617368602e4c43616e63656c6564536c6173685061796f757401003042616c616e63654f663c543e40000000000000000000000000000000000815012054686520616d6f756e74206f662063757272656e637920676976656e20746f207265706f7274657273206f66206120736c617368206576656e7420776869636820776173ec2063616e63656c65642062792065787472616f7264696e6172792063697263756d7374616e6365732028652e672e20676f7665726e616e6365292e40556e6170706c696564536c617368657301010520457261496e646578bc5665633c556e6170706c696564536c6173683c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e00040004c420416c6c20756e6170706c69656420736c61736865732074686174206172652071756575656420666f72206c617465722e28426f6e646564457261730100745665633c28457261496e6465782c2053657373696f6e496e646578293e04001025012041206d617070696e672066726f6d207374696c6c2d626f6e646564206572617320746f207468652066697273742073657373696f6e20696e646578206f662074686174206572612e00c8204d75737420636f6e7461696e7320696e666f726d6174696f6e20666f72206572617320666f72207468652072616e67653abc20605b6163746976655f657261202d20626f756e64696e675f6475726174696f6e3b206163746976655f6572615d604c56616c696461746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449645c2850657262696c6c2c2042616c616e63654f663c543e2905040008450120416c6c20736c617368696e67206576656e7473206f6e2076616c696461746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682070726f706f7274696f6e7020616e6420736c6173682076616c7565206f6620746865206572612e4c4e6f6d696e61746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449643042616c616e63654f663c543e05040004610120416c6c20736c617368696e67206576656e7473206f6e206e6f6d696e61746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682076616c7565206f6620746865206572612e34536c617368696e675370616e7300010530543a3a4163636f756e7449645c736c617368696e673a3a536c617368696e675370616e73000400048c20536c617368696e67207370616e7320666f72207374617368206163636f756e74732e245370616e536c6173680101058c28543a3a4163636f756e7449642c20736c617368696e673a3a5370616e496e6465782988736c617368696e673a3a5370616e5265636f72643c42616c616e63654f663c543e3e00800000000000000000000000000000000000000000000000000000000000000000083d01205265636f72647320696e666f726d6174696f6e2061626f757420746865206d6178696d756d20736c617368206f6620612073746173682077697468696e206120736c617368696e67207370616e2cb82061732077656c6c20617320686f77206d7563682072657761726420686173206265656e2070616964206f75742e584561726c69657374556e6170706c696564536c617368000020457261496e646578040004fc20546865206561726c696573742065726120666f72207768696368207765206861766520612070656e64696e672c20756e6170706c69656420736c6173682e48536e617073686f7456616c696461746f72730000445665633c543a3a4163636f756e7449643e040008650120536e617073686f74206f662076616c696461746f72732061742074686520626567696e6e696e67206f66207468652063757272656e7420656c656374696f6e2077696e646f772e20546869732073686f756c64206f6e6c791901206861766520612076616c7565207768656e205b60457261456c656374696f6e537461747573605d203d3d2060456c656374696f6e5374617475733a3a4f70656e285f29602e48536e617073686f744e6f6d696e61746f72730000445665633c543a3a4163636f756e7449643e040008650120536e617073686f74206f66206e6f6d696e61746f72732061742074686520626567696e6e696e67206f66207468652063757272656e7420656c656374696f6e2077696e646f772e20546869732073686f756c64206f6e6c791901206861766520612076616c7565207768656e205b60457261456c656374696f6e537461747573605d203d3d2060456c656374696f6e5374617475733a3a4f70656e285f29602e34517565756564456c65637465640000a8456c656374696f6e526573756c743c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e04000c650120546865206e6578742076616c696461746f72207365742e2041742074686520656e64206f6620616e206572612c206966207468697320697320617661696c61626c652028706f74656e7469616c6c792066726f6d20746865610120726573756c74206f6620616e206f6666636861696e20776f726b6572292c20697420697320696d6d6564696174656c7920757365642e204f74686572776973652c20746865206f6e2d636861696e20656c656374696f6e342069732065786563757465642e2c51756575656453636f7265000034456c656374696f6e53636f7265040004b0205468652073636f7265206f66207468652063757272656e74205b60517565756564456c6563746564605d2e44457261456c656374696f6e537461747573010078456c656374696f6e5374617475733c543a3a426c6f636b4e756d6265723e040008490120466c616720746f20636f6e74726f6c2074686520657865637574696f6e206f6620746865206f6666636861696e20656c656374696f6e2e205768656e20604f70656e285f29602c207765206163636570746c20736f6c7574696f6e7320746f206265207375626d69747465642e54497343757272656e7453657373696f6e46696e616c010010626f6f6c0400084d012054727565206966207468652063757272656e74202a2a706c616e6e65642a2a2073657373696f6e2069732066696e616c2e204e6f74652074686174207468697320646f6573206e6f742074616b65206572615820666f7263696e6720696e746f206163636f756e742e3853746f7261676556657273696f6e01002052656c6561736573040310cc2054727565206966206e6574776f726b20686173206265656e20757067726164656420746f20746869732076657273696f6e2e7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076332e302e3020666f72206e6577206e6574776f726b732e016010626f6e640c28636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e1470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e5865012054616b6520746865206f726967696e206163636f756e74206173206120737461736820616e64206c6f636b207570206076616c756560206f66206974732062616c616e63652e2060636f6e74726f6c6c6572602077696c6c8420626520746865206163636f756e74207468617420636f6e74726f6c732069742e003101206076616c756560206d757374206265206d6f7265207468616e2074686520606d696e696d756d5f62616c616e636560207370656369666965642062792060543a3a43757272656e6379602e00250120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20627920746865207374617368206163636f756e742e004020456d6974732060426f6e646564602e002c2023203c7765696768743ed4202d20496e646570656e64656e74206f662074686520617267756d656e74732e204d6f64657261746520636f6d706c65786974792e20202d204f2831292e68202d20546872656520657874726120444220656e74726965732e005101204e4f54453a2054776f206f66207468652073746f726167652077726974657320286053656c663a3a626f6e646564602c206053656c663a3a7061796565602920617265205f6e657665725f20636c65616e6564410120756e6c6573732074686520606f726967696e602066616c6c732062656c6f77205f6578697374656e7469616c206465706f7369745f20616e6420676574732072656d6f76656420617320647573742e4c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d5c2042617365205765696768743a2036372e383720c2b5732c204442205765696768743a3101202d20526561643a20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c2043757272656e74204572612c20486973746f72792044657074682c204c6f636b73e0202d2057726974653a20426f6e6465642c2050617965652c205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e28626f6e645f657874726104386d61785f6164646974696f6e616c54436f6d706163743c42616c616e63654f663c543e3e5865012041646420736f6d6520657874726120616d6f756e742074686174206861766520617070656172656420696e207468652073746173682060667265655f62616c616e63656020696e746f207468652062616c616e63652075703420666f72207374616b696e672e00510120557365207468697320696620746865726520617265206164646974696f6e616c2066756e647320696e20796f7572207374617368206163636f756e74207468617420796f75207769736820746f20626f6e642e650120556e6c696b65205b60626f6e64605d206f72205b60756e626f6e64605d20746869732066756e6374696f6e20646f6573206e6f7420696d706f736520616e79206c696d69746174696f6e206f6e2074686520616d6f756e744c20746861742063616e2062652061646465642e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c657220616e64f82069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004020456d6974732060426f6e646564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e20202d204f2831292e40202d204f6e6520444220656e7472792e34202d2d2d2d2d2d2d2d2d2d2d2d5c2042617365205765696768743a2035342e383820c2b5732c204442205765696768743a1501202d20526561643a2045726120456c656374696f6e205374617475732c20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c204c6f636b73a4202d2057726974653a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e18756e626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e805501205363686564756c65206120706f7274696f6e206f662074686520737461736820746f20626520756e6c6f636b656420726561647920666f72207472616e73666572206f75742061667465722074686520626f6e64010120706572696f6420656e64732e2049662074686973206c656176657320616e20616d6f756e74206163746976656c7920626f6e646564206c657373207468616e250120543a3a43757272656e63793a3a6d696e696d756d5f62616c616e636528292c207468656e20697420697320696e6372656173656420746f207468652066756c6c20616d6f756e742e004901204f6e63652074686520756e6c6f636b20706572696f6420697320646f6e652c20796f752063616e2063616c6c206077697468647261775f756e626f6e6465646020746f2061637475616c6c79206d6f7665c0207468652066756e6473206f7574206f66206d616e6167656d656e7420726561647920666f72207472616e736665722e003d01204e6f206d6f7265207468616e2061206c696d69746564206e756d626572206f6620756e6c6f636b696e67206368756e6b73202873656520604d41585f554e4c4f434b494e475f4348554e4b5360293d012063616e20636f2d657869737473206174207468652073616d652074696d652e20496e207468617420636173652c205b6043616c6c3a3a77697468647261775f756e626f6e646564605d206e656564fc20746f2062652063616c6c656420666972737420746f2072656d6f766520736f6d65206f6620746865206368756e6b732028696620706f737369626c65292e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004820456d6974732060556e626f6e646564602e00982053656520616c736f205b6043616c6c3a3a77697468647261775f756e626f6e646564605d2e002c2023203c7765696768743e4101202d20496e646570656e64656e74206f662074686520617267756d656e74732e204c696d697465642062757420706f74656e7469616c6c79206578706c6f697461626c6520636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732e6501202d20456163682063616c6c20287265717569726573207468652072656d61696e646572206f662074686520626f6e6465642062616c616e636520746f2062652061626f766520606d696e696d756d5f62616c616e63656029710120202077696c6c2063617573652061206e657720656e74727920746f20626520696e73657274656420696e746f206120766563746f722028604c65646765722e756e6c6f636b696e676029206b65707420696e2073746f726167652e5101202020546865206f6e6c792077617920746f20636c65616e207468652061666f72656d656e74696f6e65642073746f72616765206974656d20697320616c736f20757365722d636f6e74726f6c6c6564207669615c2020206077697468647261775f756e626f6e646564602e40202d204f6e6520444220656e7472792e2c202d2d2d2d2d2d2d2d2d2d5c2042617365205765696768743a2035302e333420c2b5732c204442205765696768743a2901202d20526561643a2045726120456c656374696f6e205374617475732c204c65646765722c2043757272656e74204572612c204c6f636b732c205b4f726967696e204163636f756e745da4202d2057726974653a205b4f726967696e204163636f756e745d2c204c6f636b732c204c656467657228203c2f7765696768743e4477697468647261775f756e626f6e64656404486e756d5f736c617368696e675f7370616e730c753332782d012052656d6f766520616e7920756e6c6f636b6564206368756e6b732066726f6d207468652060756e6c6f636b696e67602071756575652066726f6d206f7572206d616e6167656d656e742e003501205468697320657373656e7469616c6c7920667265657320757020746861742062616c616e636520746f206265207573656420627920746865207374617368206163636f756e7420746f20646f4c2077686174657665722069742077616e74732e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004c20456d697473206057697468647261776e602e006c2053656520616c736f205b6043616c6c3a3a756e626f6e64605d2e002c2023203c7765696768743e5501202d20436f756c6420626520646570656e64656e74206f6e2074686520606f726967696e6020617267756d656e7420616e6420686f77206d7563682060756e6c6f636b696e6760206368756e6b732065786973742e45012020497420696d706c6965732060636f6e736f6c69646174655f756e6c6f636b656460207768696368206c6f6f7073206f76657220604c65646765722e756e6c6f636b696e67602c207768696368206973f42020696e6469726563746c7920757365722d636f6e74726f6c6c65642e20536565205b60756e626f6e64605d20666f72206d6f72652064657461696c2e7901202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732c20796574207468652073697a65206f6620776869636820636f756c64206265206c61726765206261736564206f6e20606c6564676572602ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d090120436f6d706c6578697479204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2072656d6f7665342042617365205765696768743a74205570646174653a2035302e3532202b202e303238202a205320c2b5732501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c204c6f636b732c205b4f726967696e204163636f756e745da8202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c656467657270204b696c6c3a2037392e3431202b20322e333636202a205320c2b5738501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c20426f6e6465642c20536c617368696e67205370616e732c205b4f726967696e204163636f756e745d2c204c6f636b73b101202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c205b4f726967696e204163636f756e745d2c204c6f636b7374202d2057726974657320456163683a205370616e536c617368202a20530d01204e4f54453a2057656967687420616e6e6f746174696f6e20697320746865206b696c6c207363656e6172696f2c20776520726566756e64206f74686572776973652e302023203c2f7765696768743e2076616c6964617465041470726566733856616c696461746f72507265667344e8204465636c617265207468652064657369726520746f2076616c696461746520666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e30202d2d2d2d2d2d2d2d2d2d2d5c2042617365205765696768743a2031372e313320c2b5732c204442205765696768743a90202d20526561643a2045726120456c656374696f6e205374617475732c204c656467657280202d2057726974653a204e6f6d696e61746f72732c2056616c696461746f7273302023203c2f7765696768743e206e6f6d696e617465041c74617267657473a05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e4c1101204465636c617265207468652064657369726520746f206e6f6d696e6174652060746172676574736020666f7220746865206f726967696e20636f6e74726f6c6c65722e00510120456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e20546869732063616e206f6e6c792062652063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e3101202d20546865207472616e73616374696f6e277320636f6d706c65786974792069732070726f706f7274696f6e616c20746f207468652073697a65206f662060746172676574736020284e2901012077686963682069732063617070656420617420436f6d7061637441737369676e6d656e74733a3a4c494d495420284d41585f4e4f4d494e4154494f4e53292ed8202d20426f74682074686520726561647320616e642077726974657320666f6c6c6f7720612073696d696c6172207061747465726e2e28202d2d2d2d2d2d2d2d2d842042617365205765696768743a2032322e3334202b202e3336202a204e20c2b57384207768657265204e20697320746865206e756d626572206f6620746172676574732c204442205765696768743ac8202d2052656164733a2045726120456c656374696f6e205374617475732c204c65646765722c2043757272656e742045726184202d205772697465733a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e146368696c6c0044c8204465636c617265206e6f2064657369726520746f206569746865722076616c6964617465206f72206e6f6d696e6174652e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e54202d20436f6e7461696e73206f6e6520726561642ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e24202d2d2d2d2d2d2d2d5c2042617365205765696768743a2031362e353320c2b5732c204442205765696768743a88202d20526561643a20457261456c656374696f6e5374617475732c204c656467657280202d2057726974653a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e247365745f7061796565041470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e40b8202852652d2973657420746865207061796d656e742074617267657420666f72206120636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e28202d2d2d2d2d2d2d2d2d64202d2042617365205765696768743a2031312e333320c2b57334202d204442205765696768743a4c20202020202d20526561643a204c65646765724c20202020202d2057726974653a205061796565302023203c2f7765696768743e387365745f636f6e74726f6c6c65720428636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654090202852652d297365742074686520636f6e74726f6c6c6572206f6620612073746173682e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e2c202d2d2d2d2d2d2d2d2d2d5c2042617365205765696768743a2032352e323220c2b5732c204442205765696768743af4202d20526561643a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572f8202d2057726974653a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572302023203c2f7765696768743e4c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e209420536574732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e5c2042617365205765696768743a20312e37313720c2b5735c2057726974653a2056616c696461746f7220436f756e74302023203c2f7765696768743e60696e6372656173655f76616c696461746f725f636f756e7404286164646974696f6e616c30436f6d706163743c7533323e20ac20496e6372656d656e74732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e5c2042617365205765696768743a20312e37313720c2b5737020526561642f57726974653a2056616c696461746f7220436f756e74302023203c2f7765696768743e547363616c655f76616c696461746f725f636f756e740418666163746f721c50657263656e7420d4205363616c652075702074686520696465616c206e756d626572206f662076616c696461746f7273206279206120666163746f722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e5c2042617365205765696768743a20312e37313720c2b5737020526561642f57726974653a2056616c696461746f7220436f756e74302023203c2f7765696768743e34666f7263655f6e6f5f657261730024b020466f72636520746865726520746f206265206e6f206e6577206572617320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e64202d2042617365205765696768743a20312e38353720c2b57348202d2057726974653a20466f726365457261302023203c2f7765696768743e34666f7263655f6e65775f65726100284d0120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f6620746865206e6578742073657373696f6e2e20416674657220746869732c2069742077696c6c206265a020726573657420746f206e6f726d616c20286e6f6e2d666f7263656429206265686176696f75722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e64202d2042617365205765696768743a20312e39353920c2b57344202d20577269746520466f726365457261302023203c2f7765696768743e447365745f696e76756c6e657261626c6573042876616c696461746f7273445665633c543a3a4163636f756e7449643e24cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e1c202d204f28562990202d2042617365205765696768743a20322e323038202b202e303036202a205620c2b5735c202d2057726974653a20496e76756c6e657261626c6573302023203c2f7765696768743e34666f7263655f756e7374616b650814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c7533322c0d0120466f72636520612063757272656e74207374616b657220746f206265636f6d6520636f6d706c6574656c7920756e7374616b65642c20696d6d6564696174656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743eec204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2062652072656d6f7665648c2042617365205765696768743a2035332e3037202b20322e333635202a205320c2b573b82052656164733a20426f6e6465642c20536c617368696e67205370616e732c204163636f756e742c204c6f636b738501205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c204163636f756e742c204c6f636b736c2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e50666f7263655f6e65775f6572615f616c776179730020050120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f662073657373696f6e7320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e60202d2042617365205765696768743a20322e303520c2b57348202d2057726974653a20466f726365457261302023203c2f7765696768743e5463616e63656c5f64656665727265645f736c617368080c65726120457261496e64657834736c6173685f696e6469636573205665633c7533323e38982043616e63656c20656e6163746d656e74206f66206120646566657272656420736c6173682e00b42043616e2062652063616c6c6564206279207468652060543a3a536c61736843616e63656c4f726967696e602e00050120506172616d65746572733a2065726120616e6420696e6469636573206f662074686520736c617368657320666f7220746861742065726120746f206b696c6c2e002c2023203c7765696768743e5420436f6d706c65786974793a204f2855202b205329b82077697468205520756e6170706c69656420736c6173686573207765696768746564207769746820553d31303030d420616e64205320697320746865206e756d626572206f6620736c61736820696e646963657320746f2062652063616e63656c65642e74202d20426173653a2035383730202b2033342e3631202a205320c2b57368202d20526561643a20556e6170706c69656420536c61736865736c202d2057726974653a20556e6170706c69656420536c6173686573302023203c2f7765696768743e387061796f75745f7374616b657273083c76616c696461746f725f737461736830543a3a4163636f756e7449640c65726120457261496e64657864110120506179206f757420616c6c20746865207374616b65727320626568696e6420612073696e676c652076616c696461746f7220666f7220612073696e676c65206572612e004d01202d206076616c696461746f725f73746173686020697320746865207374617368206163636f756e74206f66207468652076616c696461746f722e205468656972206e6f6d696e61746f72732c20757020746f290120202060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602c2077696c6c20616c736f207265636569766520746865697220726577617264732e3501202d206065726160206d617920626520616e7920657261206265747765656e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e00590120546865206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e20416e79206163636f756e742063616e2063616c6c20746869732066756e6374696f6e2c206576656e20696678206974206973206e6f74206f6e65206f6620746865207374616b6572732e00010120546869732063616e206f6e6c792062652063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e0101202d2054696d6520636f6d706c65786974793a206174206d6f7374204f284d61784e6f6d696e61746f72526577617264656450657256616c696461746f72292ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e30202d2d2d2d2d2d2d2d2d2d2d1d01204e20697320746865204e756d626572206f66207061796f75747320666f72207468652076616c696461746f722028696e636c7564696e67207468652076616c696461746f7229342042617365205765696768743a0101202d205265776172642044657374696e6174696f6e205374616b65643a20313130202b2035342e32202a204e20c2b57320284d656469616e20536c6f706573294101202d205265776172642044657374696e6174696f6e20436f6e74726f6c6c657220284372656174696e67293a20313230202b2034312e3935202a204e20c2b57320284d656469616e20536c6f706573292c204442205765696768743a2901202d20526561643a20457261456c656374696f6e5374617475732c2043757272656e744572612c20486973746f727944657074682c204572617356616c696461746f725265776172642c2d01202020202020202020457261735374616b657273436c69707065642c2045726173526577617264506f696e74732c204572617356616c696461746f725072656673202838206974656d73291101202d205265616420456163683a20426f6e6465642c204c65646765722c2050617965652c204c6f636b732c2053797374656d204163636f756e74202835206974656d7329d8202d20577269746520456163683a2053797374656d204163636f756e742c204c6f636b732c204c6564676572202833206974656d7329302023203c2f7765696768743e187265626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e3ce0205265626f6e64206120706f7274696f6e206f6620746865207374617368207363686564756c656420746f20626520756e6c6f636b65642e00550120546865206469737061746368206f726967696e206d757374206265207369676e65642062792074686520636f6e74726f6c6c65722c20616e642069742063616e206265206f6e6c792063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ed4202d2054696d6520636f6d706c65786974793a204f284c292c207768657265204c20697320756e6c6f636b696e67206368756e6b7394202d20426f756e64656420627920604d41585f554e4c4f434b494e475f4348554e4b53602ef4202d2053746f72616765206368616e6765733a2043616e277420696e6372656173652073746f726167652c206f6e6c792064656372656173652069742e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d98202d2042617365205765696768743a2033342e353120c2b573202a202e303438204c20c2b57334202d204442205765696768743a010120202020202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c204c6f636b732c205b4f726967696e204163636f756e745db820202020202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e447365745f686973746f72795f646570746808446e65775f686973746f72795f646570746844436f6d706163743c457261496e6465783e485f6572615f6974656d735f64656c6574656430436f6d706163743c7533323e543101205365742060486973746f72794465707468602076616c75652e20546869732066756e6374696f6e2077696c6c2064656c65746520616e7920686973746f727920696e666f726d6174696f6e80207768656e2060486973746f727944657074686020697320726564756365642e003020506172616d65746572733a1101202d20606e65775f686973746f72795f6465707468603a20546865206e657720686973746f727920646570746820796f7520776f756c64206c696b6520746f207365742e4901202d20606572615f6974656d735f64656c65746564603a20546865206e756d626572206f66206974656d7320746861742077696c6c2062652064656c6574656420627920746869732064697370617463682e450120202020546869732073686f756c64207265706f727420616c6c207468652073746f72616765206974656d7320746861742077696c6c2062652064656c6574656420627920636c656172696e67206f6c6445012020202065726120686973746f72792e204e656564656420746f207265706f727420616e2061636375726174652077656967687420666f72207468652064697370617463682e2054727573746564206279a02020202060526f6f746020746f207265706f727420616e206163637572617465206e756d6265722e0054204f726967696e206d75737420626520726f6f742e002c2023203c7765696768743ee0202d20453a204e756d626572206f6620686973746f7279206465707468732072656d6f7665642c20692e652e203130202d3e2037203d203374202d2042617365205765696768743a2032392e3133202a204520c2b57334202d204442205765696768743aa020202020202d2052656164733a2043757272656e74204572612c20486973746f72792044657074687020202020202d205772697465733a20486973746f7279204465707468310120202020202d20436c6561722050726566697820456163683a20457261205374616b6572732c204572615374616b657273436c69707065642c204572617356616c696461746f725072656673810120202020202d2057726974657320456163683a204572617356616c696461746f725265776172642c2045726173526577617264506f696e74732c2045726173546f74616c5374616b652c2045726173537461727453657373696f6e496e646578302023203c2f7765696768743e28726561705f73746173680814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c7533324039012052656d6f766520616c6c20646174612073747275637475726520636f6e6365726e696e672061207374616b65722f7374617368206f6e6365206974732062616c616e6365206973207a65726f2e6101205468697320697320657373656e7469616c6c79206571756976616c656e7420746f206077697468647261775f756e626f6e64656460206578636570742069742063616e2062652063616c6c656420627920616e796f6e65c020616e6420746865207461726765742060737461736860206d7573742068617665206e6f2066756e6473206c6566742e009020546869732063616e2062652063616c6c65642066726f6d20616e79206f726967696e2e000101202d20607374617368603a20546865207374617368206163636f756e7420746f20726561702e204974732062616c616e6365206d757374206265207a65726f2e002c2023203c7765696768743e250120436f6d706c65786974793a204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e73206f6e20746865206163636f756e742e8c2042617365205765696768743a2037352e3934202b20322e333936202a205320c2b5732c204442205765696768743ad8202d2052656164733a205374617368204163636f756e742c20426f6e6465642c20536c617368696e67205370616e732c204c6f636b73a501202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c205374617368204163636f756e742c204c6f636b7374202d2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e607375626d69745f656c656374696f6e5f736f6c7574696f6e141c77696e6e6572734c5665633c56616c696461746f72496e6465783e1c636f6d7061637448436f6d7061637441737369676e6d656e74731473636f726534456c656374696f6e53636f72650c65726120457261496e6465781073697a6530456c656374696f6e53697a65bce4205375626d697420616e20656c656374696f6e20726573756c7420746f2074686520636861696e2e2049662074686520736f6c7574696f6e3a003420312e2069732076616c69642e150120322e206861732061206265747465722073636f7265207468616e206120706f74656e7469616c6c79206578697374696e6720736f6c7574696f6e206f6e20636861696e2e0084207468656e2c2069742077696c6c206265205f7075745f206f6e20636861696e2e00ac204120736f6c7574696f6e20636f6e7369737473206f662074776f20706965636573206f6620646174613a00f420312e206077696e6e657273603a206120666c617420766563746f72206f6620616c6c207468652077696e6e657273206f662074686520726f756e642e510120322e206061737369676e6d656e7473603a2074686520636f6d706163742076657273696f6e206f6620616e2061737369676e6d656e7420766563746f72207468617420656e636f6465732074686520656467653020202020776569676874732e00210120426f7468206f66207768696368206d617920626520636f6d7075746564207573696e67205f70687261676d656e5f2c206f7220616e79206f7468657220616c676f726974686d2e00a8204164646974696f6e616c6c792c20746865207375626d6974746572206d7573742070726f766964653a00c8202d20546865206073636f7265602074686174207468657920636c61696d20746865697220736f6c7574696f6e206861732e004d0120426f74682076616c696461746f727320616e64206e6f6d696e61746f72732077696c6c20626520726570726573656e74656420627920696e646963657320696e2074686520736f6c7574696f6e2e205468651d0120696e64696365732073686f756c6420726573706563742074686520636f72726573706f6e64696e6720747970657320285b6056616c696461746f72496e646578605d20616e643101205b604e6f6d696e61746f72496e646578605d292e204d6f72656f7665722c20746865792073686f756c642062652076616c6964207768656e207573656420746f20696e64657820696e746f5101205b60536e617073686f7456616c696461746f7273605d20616e64205b60536e617073686f744e6f6d696e61746f7273605d2e20416e7920696e76616c696420696e6465782077696c6c20636175736520746865610120736f6c7574696f6e20746f2062652072656a65637465642e2054686573652074776f2073746f72616765206974656d73206172652073657420647572696e672074686520656c656374696f6e2077696e646f7720616e6498206d6179206265207573656420746f2064657465726d696e652074686520696e64696365732e0060204120736f6c7574696f6e2069732076616c69642069663a00e420302e204974206973207375626d6974746564207768656e205b60457261456c656374696f6e537461747573605d20697320604f70656e602ef820312e2049747320636c61696d65642073636f726520697320657175616c20746f207468652073636f726520636f6d7075746564206f6e2d636861696e2eac20322e2050726573656e74732074686520636f7272656374206e756d626572206f662077696e6e6572732e550120332e20416c6c20696e6465786573206d7573742062652076616c7565206163636f7264696e6720746f2074686520736e617073686f7420766563746f72732e20416c6c20656467652076616c756573206d7573745d0120202020616c736f20626520636f727265637420616e642073686f756c64206e6f74206f766572666c6f7720746865206772616e756c6172697479206f662074686520726174696f20747970652028692e652e2032353640202020206f722062696c6c696f6e292e0d0120342e20466f72206561636820656467652c20616c6c2074617267657473206172652061637475616c6c79206e6f6d696e617465642062792074686520766f7465722e6c20352e2048617320636f72726563742073656c662d766f7465732e00c0204120736f6c7574696f6e732073636f726520697320636f6e736973746564206f66203320706172616d65746572733a00650120312e20606d696e207b20737570706f72742e746f74616c207d6020666f72206561636820737570706f7274206f6620612077696e6e65722e20546869732076616c75652073686f756c64206265206d6178696d697a65642e650120322e206073756d207b20737570706f72742e746f74616c207d6020666f72206561636820737570706f7274206f6620612077696e6e65722e20546869732076616c75652073686f756c64206265206d696e696d697a65642e410120332e206073756d207b20737570706f72742e746f74616c5e32207d6020666f72206561636820737570706f7274206f6620612077696e6e65722e20546869732076616c75652073686f756c642062659c202020206d696e696d697a65642028746f20656e73757265206c6573732076617269616e636529002c2023203c7765696768743e7020536565206063726174653a3a77656967687460206d6f64756c652e302023203c2f7765696768743e847375626d69745f656c656374696f6e5f736f6c7574696f6e5f756e7369676e6564141c77696e6e6572734c5665633c56616c696461746f72496e6465783e1c636f6d7061637448436f6d7061637441737369676e6d656e74731473636f726534456c656374696f6e53636f72650c65726120457261496e6465781073697a6530456c656374696f6e53697a6524c020556e7369676e65642076657273696f6e206f6620607375626d69745f656c656374696f6e5f736f6c7574696f6e602e005d01204e6f746520746861742074686973206d757374207061737320746865205b6056616c6964617465556e7369676e6564605d20636865636b207768696368206f6e6c7920616c6c6f7773207472616e73616374696f6e7361012066726f6d20746865206c6f63616c206e6f646520746f20626520696e636c756465642e20496e206f7468657220776f7264732c206f6e6c792074686520626c6f636b20617574686f722063616e20696e636c756465206168207472616e73616374696f6e20696e2074686520626c6f636b2e002c2023203c7765696768743e7020536565206063726174653a3a77656967687460206d6f64756c652e302023203c2f7765696768743e0124244572615061796f75740c20457261496e6465781c42616c616e63651c42616c616e63650c59012054686520657261207061796f757420686173206265656e207365743b207468652066697273742062616c616e6365206973207468652076616c696461746f722d7061796f75743b20746865207365636f6e64206973c4207468652072656d61696e6465722066726f6d20746865206d6178696d756d20616d6f756e74206f66207265776172642ea4205b6572615f696e6465782c2076616c696461746f725f7061796f75742c2072656d61696e6465725d1852657761726408244163636f756e7449641c42616c616e636504f420546865207374616b657220686173206265656e207265776172646564206279207468697320616d6f756e742e205b73746173682c20616d6f756e745d14536c61736808244163636f756e7449641c42616c616e6365082501204f6e652076616c696461746f722028616e6420697473206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e50205b76616c696461746f722c20616d6f756e745d684f6c64536c617368696e675265706f7274446973636172646564043053657373696f6e496e646578081d0120416e206f6c6420736c617368696e67207265706f72742066726f6d2061207072696f72206572612077617320646973636172646564206265636175736520697420636f756c6488206e6f742062652070726f6365737365642e205b73657373696f6e5f696e6465785d3c5374616b696e67456c656374696f6e043c456c656374696f6e436f6d7075746504ec2041206e657720736574206f66207374616b6572732077617320656c656374656420776974682074686520676976656e205b636f6d707574655d2e38536f6c7574696f6e53746f726564043c456c656374696f6e436f6d707574650411012041206e657720736f6c7574696f6e20666f7220746865207570636f6d696e6720656c656374696f6e20686173206265656e2073746f7265642e205b636f6d707574655d18426f6e64656408244163636f756e7449641c42616c616e636510cc20416e206163636f756e742068617320626f6e646564207468697320616d6f756e742e205b73746173682c20616d6f756e745d005101204e4f54453a2054686973206576656e74206973206f6e6c7920656d6974746564207768656e2066756e64732061726520626f6e64656420766961206120646973706174636861626c652e204e6f7461626c792c25012069742077696c6c206e6f7420626520656d697474656420666f72207374616b696e672072657761726473207768656e20746865792061726520616464656420746f207374616b652e20556e626f6e64656408244163636f756e7449641c42616c616e636504d420416e206163636f756e742068617320756e626f6e646564207468697320616d6f756e742e205b73746173682c20616d6f756e745d2457697468647261776e08244163636f756e7449641c42616c616e6365085d0120416e206163636f756e74206861732063616c6c6564206077697468647261775f756e626f6e6465646020616e642072656d6f76656420756e626f6e64696e67206368756e6b7320776f727468206042616c616e636560a82066726f6d2074686520756e6c6f636b696e672071756575652e205b73746173682c20616d6f756e745d1c3853657373696f6e735065724572613053657373696f6e496e64657810060000000470204e756d626572206f662073657373696f6e7320706572206572612e3c426f6e64696e674475726174696f6e20457261496e64657810a002000004e4204e756d626572206f6620657261732074686174207374616b65642066756e6473206d7573742072656d61696e20626f6e64656420666f722e48536c61736844656665724475726174696f6e20457261496e64657810a8000000140101204e756d626572206f662065726173207468617420736c6173686573206172652064656665727265642062792c20616674657220636f6d7075746174696f6e2e00bc20546869732073686f756c64206265206c657373207468616e2074686520626f6e64696e67206475726174696f6e2e2d012053657420746f203020696620736c61736865732073686f756c64206265206170706c69656420696d6d6564696174656c792c20776974686f7574206f70706f7274756e69747920666f723820696e74657276656e74696f6e2e44456c656374696f6e4c6f6f6b616865616438543a3a426c6f636b4e756d62657210320000001c710120546865206e756d626572206f6620626c6f636b73206265666f72652074686520656e64206f6620746865206572612066726f6d20776869636820656c656374696f6e207375626d697373696f6e732061726520616c6c6f7765642e006d012053657474696e67207468697320746f207a65726f2077696c6c2064697361626c6520746865206f6666636861696e20636f6d7075746520616e64206f6e6c79206f6e2d636861696e207365712d70687261676d656e2077696c6c2420626520757365642e007501205468697320697320626f756e646564206279206265696e672077697468696e20746865206c6173742073657373696f6e2e2048656e63652c2073657474696e6720697420746f20612076616c7565206d6f7265207468616e207468659c206c656e677468206f6620612073657373696f6e2077696c6c20626520706f696e746c6573732e344d6178497465726174696f6e730c753332100a0000000c2901204d6178696d756d206e756d626572206f662062616c616e63696e6720697465726174696f6e7320746f2072756e20696e20746865206f6666636861696e207375626d697373696f6e2e00ec2049662073657420746f20302c2062616c616e63655f736f6c7574696f6e2077696c6c206e6f7420626520657865637574656420617420616c6c2e504d696e536f6c7574696f6e53636f726542756d701c50657262696c6c1020a1070004610120546865207468726573686f6c64206f6620696d70726f76656d656e7420746861742073686f756c642062652070726f766964656420666f722061206e657720736f6c7574696f6e20746f2062652061636365707465642e804d61784e6f6d696e61746f72526577617264656450657256616c696461746f720c753332104000000010f820546865206d6178696d756d206e756d626572206f66206e6f6d696e61746f727320726577617264656420666f7220656163682076616c696461746f722e00690120466f7220656163682076616c696461746f72206f6e6c79207468652060244d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732063616e20636c61696d2101207468656972207265776172642e2054686973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e7c344e6f74436f6e74726f6c6c65720468204e6f74206120636f6e74726f6c6c6572206163636f756e742e204e6f7453746173680454204e6f742061207374617368206163636f756e742e34416c7265616479426f6e646564046420537461736820697320616c726561647920626f6e6465642e34416c7265616479506169726564047820436f6e74726f6c6c657220697320616c7265616479207061697265642e30456d70747954617267657473046420546172676574732063616e6e6f7420626520656d7074792e384475706c6963617465496e6465780444204475706c696361746520696e6465782e44496e76616c6964536c617368496e646578048820536c617368207265636f726420696e646578206f7574206f6620626f756e64732e44496e73756666696369656e7456616c756504cc2043616e206e6f7420626f6e6420776974682076616c7565206c657373207468616e206d696e696d756d2062616c616e63652e304e6f4d6f72654368756e6b7304942043616e206e6f74207363686564756c65206d6f726520756e6c6f636b206368756e6b732e344e6f556e6c6f636b4368756e6b04a42043616e206e6f74207265626f6e6420776974686f757420756e6c6f636b696e67206368756e6b732e3046756e64656454617267657404cc20417474656d7074696e6720746f2074617267657420612073746173682074686174207374696c6c206861732066756e64732e48496e76616c6964457261546f526577617264045c20496e76616c69642065726120746f207265776172642e68496e76616c69644e756d6265724f664e6f6d696e6174696f6e73047c20496e76616c6964206e756d626572206f66206e6f6d696e6174696f6e732e484e6f74536f72746564416e64556e697175650484204974656d7320617265206e6f7420736f7274656420616e6420756e697175652e38416c7265616479436c61696d6564040d01205265776172647320666f72207468697320657261206861766520616c7265616479206265656e20636c61696d656420666f7220746869732076616c696461746f722e7c4f6666636861696e456c656374696f6e4561726c795375626d697373696f6e04e420546865207375626d697474656420726573756c74206973207265636569766564206f7574206f6620746865206f70656e2077696e646f772e784f6666636861696e456c656374696f6e5765616b5375626d697373696f6e04010120546865207375626d697474656420726573756c74206973206e6f7420617320676f6f6420617320746865206f6e652073746f726564206f6e20636861696e2e4c536e617073686f74556e617661696c61626c6504d02054686520736e617073686f742064617461206f66207468652063757272656e742077696e646f77206973206d697373696e672e804f6666636861696e456c656374696f6e426f67757357696e6e6572436f756e7404b020496e636f7272656374206e756d626572206f662077696e6e65727320776572652070726573656e7465642e6c4f6666636861696e456c656374696f6e426f67757357696e6e6572086101204f6e65206f6620746865207375626d69747465642077696e6e657273206973206e6f7420616e206163746976652063616e646964617465206f6e20636861696e2028696e646578206973206f7574206f662072616e67653820696e20736e617073686f74292e704f6666636861696e456c656374696f6e426f677573436f6d70616374085d01204572726f72207768696c65206275696c64696e67207468652061737369676e6d656e7420747970652066726f6d2074686520636f6d706163742e20546869732063616e2068617070656e20696620616e20696e646578a820697320696e76616c69642c206f72206966207468652077656967687473205f6f766572666c6f775f2e784f6666636861696e456c656374696f6e426f6775734e6f6d696e61746f72041501204f6e65206f6620746865207375626d6974746564206e6f6d696e61746f7273206973206e6f7420616e20616374697665206e6f6d696e61746f72206f6e20636861696e2e7c4f6666636861696e456c656374696f6e426f6775734e6f6d696e6174696f6e044d01204f6e65206f6620746865207375626d6974746564206e6f6d696e61746f72732068617320616e206564676520746f20776869636820746865792068617665206e6f7420766f746564206f6e20636861696e2e844f6666636861696e456c656374696f6e536c61736865644e6f6d696e6174696f6e086101204f6e65206f6620746865207375626d6974746564206e6f6d696e61746f72732068617320616e2065646765207768696368206973207375626d6974746564206265666f726520746865206c617374206e6f6e2d7a65726f5420736c617368206f6620746865207461726765742e744f6666636861696e456c656374696f6e426f67757353656c66566f746504250120412073656c6620766f7465206d757374206f6e6c79206265206f726967696e617465642066726f6d20612076616c696461746f7220746f204f4e4c59207468656d73656c7665732e644f6666636861696e456c656374696f6e426f6775734564676504450120546865207375626d697474656420726573756c742068617320756e6b6e6f776e206564676573207468617420617265206e6f7420616d6f6e67207468652070726573656e7465642077696e6e6572732e684f6666636861696e456c656374696f6e426f67757353636f72650419012054686520636c61696d65642073636f726520646f6573206e6f74206d61746368207769746820746865206f6e6520636f6d70757465642066726f6d2074686520646174612e844f6666636861696e456c656374696f6e426f677573456c656374696f6e53697a6504782054686520656c656374696f6e2073697a6520697320696e76616c69642e3843616c6c4e6f74416c6c6f776564044901205468652063616c6c206973206e6f7420616c6c6f7765642061742074686520676976656e2074696d652064756520746f207265737472696374696f6e73206f6620656c656374696f6e20706572696f642e54496e636f7272656374486973746f7279446570746804c420496e636f72726563742070726576696f757320686973746f727920646570746820696e7075742070726f76696465642e58496e636f7272656374536c617368696e675370616e7304b420496e636f7272656374206e756d626572206f6620736c617368696e67207370616e732070726f76696465642e1c53657373696f6e011c53657373696f6e1c2856616c696461746f727301004c5665633c543a3a56616c696461746f7249643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3043757272656e74496e64657801003053657373696f6e496e646578100000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e345175657565644368616e676564010010626f6f6c040008390120547275652069662074686520756e6465726c79696e672065636f6e6f6d6963206964656e746974696573206f7220776569676874696e6720626568696e64207468652076616c696461746f7273a420686173206368616e67656420696e20746865207175657565642076616c696461746f72207365742e285175657565644b6579730100785665633c28543a3a56616c696461746f7249642c20543a3a4b657973293e0400083d012054686520717565756564206b65797320666f7220746865206e6578742073657373696f6e2e205768656e20746865206e6578742073657373696f6e20626567696e732c207468657365206b657973e02077696c6c206265207573656420746f2064657465726d696e65207468652076616c696461746f7227732073657373696f6e206b6579732e4844697361626c656456616c696461746f72730100205665633c7533323e04000c8020496e6469636573206f662064697361626c65642076616c696461746f72732e003501205468652073657420697320636c6561726564207768656e20606f6e5f73657373696f6e5f656e64696e67602072657475726e732061206e657720736574206f66206964656e7469746965732e204e6578744b65797300010538543a3a56616c696461746f7249641c543a3a4b657973000400049c20546865206e6578742073657373696f6e206b65797320666f7220612076616c696461746f722e204b65794f776e657200010550284b65795479706549642c205665633c75383e2938543a3a56616c696461746f72496400040004090120546865206f776e6572206f662061206b65792e20546865206b65792069732074686520604b657954797065496460202b2074686520656e636f646564206b65792e0108207365745f6b65797308106b6579731c543a3a4b6579731470726f6f661c5665633c75383e38e82053657473207468652073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c657220746f20606b657973602e210120416c6c6f777320616e206163636f756e7420746f20736574206974732073657373696f6e206b6579207072696f7220746f206265636f6d696e6720612076616c696461746f722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a20606f726967696e206163636f756e74602c2060543a3a56616c696461746f7249644f66602c20604e6578744b65797360a4202d2044625772697465733a20606f726967696e206163636f756e74602c20604e6578744b6579736084202d204462526561647320706572206b65792069643a20604b65794f776e65726088202d20446257726974657320706572206b65792069643a20604b65794f776e657260302023203c2f7765696768743e2870757267655f6b6579730030cc2052656d6f76657320616e792073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c65722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743eb4202d20436f6d706c65786974793a20604f2831296020696e206e756d626572206f66206b65792074797065732e590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a2060543a3a56616c696461746f7249644f66602c20604e6578744b657973602c20606f726967696e206163636f756e7460a4202d2044625772697465733a20604e6578744b657973602c20606f726967696e206163636f756e74608c202d20446257726974657320706572206b65792069643a20604b65794f776e64657260302023203c2f7765696768743e0104284e657753657373696f6e043053657373696f6e496e646578085d01204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e7420697320746865205b73657373696f6e5f696e6465785d2c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e001030496e76616c696450726f6f66046420496e76616c6964206f776e6572736869702070726f6f662e5c4e6f4173736f63696174656456616c696461746f72496404a0204e6f206173736f6369617465642076616c696461746f7220494420666f72206163636f756e742e344475706c6963617465644b657904682052656769737465726564206475706c6963617465206b65792e184e6f4b65797304a8204e6f206b65797320617265206173736f63696174656420776974682074686973206163636f756e742e2444656d6f6372616379012444656d6f6372616379383c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f707301009c5665633c2850726f70496e6465782c20543a3a486173682c20543a3a4163636f756e744964293e040004210120546865207075626c69632070726f706f73616c732e20556e736f727465642e20546865207365636f6e64206974656d206973207468652070726f706f73616c277320686173682e244465706f7369744f660001052450726f70496e64657884285665633c543a3a4163636f756e7449643e2c2042616c616e63654f663c543e290004000c842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e00d82054574f582d4e4f54453a20536166652c20617320696e6372656173696e6720696e7465676572206b6579732061726520736166652e24507265696d616765730001061c543a3a48617368e8507265696d6167655374617475733c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e000400086101204d6170206f662068617368657320746f207468652070726f706f73616c20707265696d6167652c20616c6f6e6720776974682077686f207265676973746572656420697420616e64207468656972206465706f7369742ee42054686520626c6f636b206e756d6265722069732074686520626c6f636b20617420776869636820697420776173206465706f73697465642e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e344c6f77657374556e62616b656401003c5265666572656e64756d496e646578100000000008250120546865206c6f77657374207265666572656e64756d20696e64657820726570726573656e74696e6720616e20756e62616b6564207265666572656e64756d2e20457175616c20746fdc20605265666572656e64756d436f756e74602069662074686572652069736e2774206120756e62616b6564207265666572656e64756d2e405265666572656e64756d496e666f4f660001053c5265666572656e64756d496e646578d45265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a486173682c2042616c616e63654f663c543e3e0004000cb420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e0009012054574f582d4e4f54453a205341464520617320696e646578657320617265206e6f7420756e64657220616e2061747461636b6572e280997320636f6e74726f6c2e20566f74696e674f6601010530543a3a4163636f756e744964c8566f74696e673c42616c616e63654f663c543e2c20543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00d8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105d0120416c6c20766f74657320666f72206120706172746963756c617220766f7465722e2057652073746f7265207468652062616c616e636520666f7220746865206e756d626572206f6620766f74657320746861742077655d012068617665207265636f726465642e20546865207365636f6e64206974656d2069732074686520746f74616c20616d6f756e74206f662064656c65676174696f6e732c20746861742077696c6c2062652061646465642e00e82054574f582d4e4f54453a205341464520617320604163636f756e7449646073206172652063727970746f2068617368657320616e797761792e144c6f636b7300010530543a3a4163636f756e74496438543a3a426c6f636b4e756d626572000400105d01204163636f756e747320666f7220776869636820746865726520617265206c6f636b7320696e20616374696f6e207768696368206d61792062652072656d6f76656420617420736f6d6520706f696e7420696e207468655101206675747572652e205468652076616c75652069732074686520626c6f636b206e756d62657220617420776869636820746865206c6f636b206578706972657320616e64206d61792062652072656d6f7665642e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e544c6173745461626c656457617345787465726e616c010010626f6f6c0400085901205472756520696620746865206c617374207265666572656e64756d207461626c656420776173207375626d69747465642065787465726e616c6c792e2046616c7365206966206974207761732061207075626c6963282070726f706f73616c2e304e65787445787465726e616c00006028543a3a486173682c20566f74655468726573686f6c6429040010590120546865207265666572656e64756d20746f206265207461626c6564207768656e6576657220697420776f756c642062652076616c696420746f207461626c6520616e2065787465726e616c2070726f706f73616c2e550120546869732068617070656e73207768656e2061207265666572656e64756d206e6565647320746f206265207461626c656420616e64206f6e65206f662074776f20636f6e646974696f6e7320617265206d65743aa4202d20604c6173745461626c656457617345787465726e616c60206973206066616c7365603b206f7268202d20605075626c696350726f70736020697320656d7074792e24426c61636b6c6973740001061c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290004000851012041207265636f7264206f662077686f207665746f656420776861742e204d6170732070726f706f73616c206861736820746f206120706f737369626c65206578697374656e7420626c6f636b206e756d626572e82028756e74696c207768656e206974206d6179206e6f742062652072657375626d69747465642920616e642077686f207665746f65642069742e3443616e63656c6c6174696f6e730101061c543a3a4861736810626f6f6c000400042901205265636f7264206f6620616c6c2070726f706f73616c7320746861742068617665206265656e207375626a65637420746f20656d657267656e63792063616e63656c6c6174696f6e2e3853746f7261676556657273696f6e00002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e015c1c70726f706f7365083470726f706f73616c5f686173681c543a3a486173681476616c756554436f6d706163743c42616c616e63654f663c543e3e3ca02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e00190120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573748420686176652066756e647320746f20636f76657220746865206465706f7369742e00d8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20707265696d6167652e1901202d206076616c7565603a2054686520616d6f756e74206f66206465706f73697420286d757374206265206174206c6561737420604d696e696d756d4465706f73697460292e004820456d697473206050726f706f736564602e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960b4202d2044622072656164733a20605075626c696350726f70436f756e74602c20605075626c696350726f707360ec202d204462207772697465733a20605075626c696350726f70436f756e74602c20605075626c696350726f7073602c20604465706f7369744f6660302023203c2f7765696768743e187365636f6e64082070726f706f73616c48436f6d706163743c50726f70496e6465783e4c7365636f6e64735f75707065725f626f756e6430436f6d706163743c7533323e38b8205369676e616c732061677265656d656e742077697468206120706172746963756c61722070726f706f73616c2e00050120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e6465721501206d75737420686176652066756e647320746f20636f76657220746865206465706f7369742c20657175616c20746f20746865206f726967696e616c206465706f7369742e00cc202d206070726f706f73616c603a2054686520696e646578206f66207468652070726f706f73616c20746f207365636f6e642e4501202d20607365636f6e64735f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e207468652063757272656e74206e756d626572206f66207365636f6e6473206f6e2074686973290120202070726f706f73616c2e2045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e002c2023203c7765696768743e3901202d20436f6d706c65786974793a20604f28532960207768657265205320697320746865206e756d626572206f66207365636f6e647320612070726f706f73616c20616c7265616479206861732e60202d2044622072656164733a20604465706f7369744f666064202d204462207772697465733a20604465706f7369744f6660302023203c2f7765696768743e10766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f7465644163636f756e74566f74653c42616c616e63654f663c543e3e38350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00e0202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f20766f746520666f722e88202d2060766f7465603a2054686520766f746520636f6e66696775726174696f6e2e002c2023203c7765696768743e4901202d20436f6d706c65786974793a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722068617320766f746564206f6e2ea42020207765696768742069732063686172676564206173206966206d6178696d756d20766f7465732ef4202d2044622072656164733a20605265666572656e64756d496e666f4f66602c2060566f74696e674f66602c206062616c616e636573206c6f636b7360f8202d204462207772697465733a20605265666572656e64756d496e666f4f66602c2060566f74696e674f66602c206062616c616e636573206c6f636b7360302023203c2f7765696768743e40656d657267656e63795f63616e63656c04247265665f696e6465783c5265666572656e64756d496e646578305101205363686564756c6520616e20656d657267656e63792063616e63656c6c6174696f6e206f662061207265666572656e64756d2e2043616e6e6f742068617070656e20747769636520746f207468652073616d6530207265666572656e64756d2e00fc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206043616e63656c6c6174696f6e4f726967696e602e00d4202d607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e002c2023203c7765696768743e58202d20436f6d706c65786974793a20604f283129602ec0202d2044622072656164733a20605265666572656e64756d496e666f4f66602c206043616e63656c6c6174696f6e7360c4202d204462207772697465733a20605265666572656e64756d496e666f4f66602c206043616e63656c6c6174696f6e7360302023203c2f7765696768743e4065787465726e616c5f70726f706f7365043470726f706f73616c5f686173681c543a3a48617368343101205363686564756c652061207265666572656e64756d20746f206265207461626c6564206f6e6365206974206973206c6567616c20746f207363686564756c6520616e2065787465726e616c30207265666572656e64756d2e00ec20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206045787465726e616c4f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e002c2023203c7765696768743e2d01202d20436f6d706c657869747920604f2856296020776974682056206e756d626572206f66207665746f65727320696e2074686520626c61636b6c697374206f662070726f706f73616c2ebc2020204465636f64696e6720766563206f66206c656e67746820562e2043686172676564206173206d6178696d756da0202d2044622072656164733a20604e65787445787465726e616c602c2060426c61636b6c6973746070202d204462207772697465733a20604e65787445787465726e616c60302023203c2f7765696768743e6465787465726e616c5f70726f706f73655f6d616a6f72697479043470726f706f73616c5f686173681c543a3a48617368385901205363686564756c652061206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f207363686564756c656020616e2065787465726e616c207265666572656e64756d2e00f020546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c4d616a6f726974794f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f283129606c202d2044622077726974653a20604e65787445787465726e616c60302023203c2f7765696768743e6065787465726e616c5f70726f706f73655f64656661756c74043470726f706f73616c5f686173681c543a3a48617368384901205363686564756c652061206e656761746976652d7475726e6f75742d62696173207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f84207363686564756c6520616e2065787465726e616c207265666572656e64756d2e00ec20546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c44656661756c744f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f283129606c202d2044622077726974653a20604e65787445787465726e616c60302023203c2f7765696768743e28666173745f747261636b0c3470726f706f73616c5f686173681c543a3a4861736834766f74696e675f706572696f6438543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d626572505101205363686564756c65207468652063757272656e746c792065787465726e616c6c792d70726f706f736564206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564650120696d6d6564696174656c792e204966207468657265206973206e6f2065787465726e616c6c792d70726f706f736564207265666572656e64756d2063757272656e746c792c206f72206966207468657265206973206f6e65ec20627574206974206973206e6f742061206d616a6f726974792d63617272696573207265666572656e64756d207468656e206974206661696c732e00d420546865206469737061746368206f6620746869732063616c6c206d757374206265206046617374547261636b4f726967696e602e00f8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652063757272656e742065787465726e616c2070726f706f73616c2e6101202d2060766f74696e675f706572696f64603a2054686520706572696f64207468617420697320616c6c6f77656420666f7220766f74696e67206f6e20746869732070726f706f73616c2e20496e6372656173656420746f982020206046617374547261636b566f74696e67506572696f646020696620746f6f206c6f772e5501202d206064656c6179603a20546865206e756d626572206f6620626c6f636b20616674657220766f74696e672068617320656e64656420696e20617070726f76616c20616e6420746869732073686f756c64206265bc202020656e61637465642e205468697320646f65736e277420686176652061206d696e696d756d20616d6f756e742e004420456d697473206053746172746564602e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960b8202d2044622072656164733a20604e65787445787465726e616c602c20605265666572656e64756d436f756e74600d01202d204462207772697465733a20604e65787445787465726e616c602c20605265666572656e64756d436f756e74602c20605265666572656e64756d496e666f4f666060202d2042617365205765696768743a2033302e3120c2b573302023203c2f7765696768743e347665746f5f65787465726e616c043470726f706f73616c5f686173681c543a3a4861736838bc205665746f20616e6420626c61636b6c697374207468652065787465726e616c2070726f706f73616c20686173682e00dc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d75737420626520605665746f4f726967696e602e003101202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c20746f207665746f20616e6420626c61636b6c6973742e004020456d69747320605665746f6564602e002c2023203c7765696768743e1901202d20436f6d706c65786974793a20604f2856202b206c6f6728562929602077686572652056206973206e756d626572206f6620606578697374696e67207665746f657273604501202020506572666f726d7320612062696e61727920736561726368206f6e20606578697374696e675f7665746f657273602077686963682073686f756c64206e6f742062652076657279206c617267652ea0202d2044622072656164733a20604e65787445787465726e616c602c2060426c61636b6c69737460a4202d204462207772697465733a20604e65787445787465726e616c602c2060426c61636b6c69737460302023203c2f7765696768743e4463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e28542052656d6f76652061207265666572656e64756d2e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00d8202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e002c2023203c7765696768743e58202d20436f6d706c65786974793a20604f283129602e80202d204462207772697465733a20605265666572656e64756d496e666f4f6660302023203c2f7765696768743e3463616e63656c5f717565756564041477686963683c5265666572656e64756d496e6465782ca02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00c8202d20607768696368603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e002c2023203c7765696768743e3501202d20604f284429602077686572652060446020697320746865206974656d7320696e207468652064697370617463682071756575652e205765696768746564206173206044203d203130602ec8202d2044622072656164733a20607363686564756c6572206c6f6f6b7570602c207363686564756c6572206167656e646160cc202d204462207772697465733a20607363686564756c6572206c6f6f6b7570602c207363686564756c6572206167656e646160302023203c2f7765696768743e2064656c65676174650c08746f30543a3a4163636f756e74496428636f6e76696374696f6e28436f6e76696374696f6e1c62616c616e63653042616c616e63654f663c543e683d012044656c65676174652074686520766f74696e6720706f77657220287769746820736f6d6520676976656e20636f6e76696374696f6e29206f66207468652073656e64696e67206163636f756e742e005901205468652062616c616e63652064656c656761746564206973206c6f636b656420666f72206173206c6f6e6720617320697427732064656c6567617465642c20616e64207468657265616674657220666f7220746865cc2074696d6520617070726f70726961746520666f722074686520636f6e76696374696f6e2773206c6f636b20706572696f642e00610120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e696e67206163636f756e74206d757374206569746865723a782020202d2062652064656c65676174696e6720616c72656164793b206f725d012020202d2068617665206e6f20766f74696e67206163746976697479202869662074686572652069732c207468656e2069742077696c6c206e65656420746f2062652072656d6f7665642f636f6e736f6c6964617465649820202020207468726f7567682060726561705f766f746560206f722060756e766f746560292e004901202d2060746f603a20546865206163636f756e742077686f736520766f74696e6720746865206074617267657460206163636f756e74277320766f74696e6720706f7765722077696c6c20666f6c6c6f772e5901202d2060636f6e76696374696f6e603a2054686520636f6e76696374696f6e20746861742077696c6c20626520617474616368656420746f207468652064656c65676174656420766f7465732e205768656e2074686545012020206163636f756e7420697320756e64656c6567617465642c207468652066756e64732077696c6c206265206c6f636b656420666f722074686520636f72726573706f6e64696e6720706572696f642e5501202d206062616c616e6365603a2054686520616d6f756e74206f6620746865206163636f756e7427732062616c616e636520746f206265207573656420696e2064656c65676174696e672e2054686973206d757374c82020206e6f74206265206d6f7265207468616e20746865206163636f756e7427732063757272656e742062616c616e63652e004c20456d697473206044656c656761746564602e002c2023203c7765696768743e5901202d20436f6d706c65786974793a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732ec4202d2044622072656164733a20332a60566f74696e674f66602c20606f726967696e206163636f756e74206c6f636b7360c8202d204462207772697465733a20332a60566f74696e674f66602c20606f726967696e206163636f756e74206c6f636b7360a4202d2044622072656164732070657220766f7465733a20605265666572656e64756d496e666f4f6660a8202d204462207772697465732070657220766f7465733a20605265666572656e64756d496e666f4f6660302023203c2f7765696768743e28756e64656c65676174650048d020556e64656c65676174652074686520766f74696e6720706f776572206f66207468652073656e64696e67206163636f756e742e00610120546f6b656e73206d617920626520756e6c6f636b656420666f6c6c6f77696e67206f6e636520616e20616d6f756e74206f662074696d6520636f6e73697374656e74207769746820746865206c6f636b20706572696f64e0206f662074686520636f6e76696374696f6e2077697468207768696368207468652064656c65676174696f6e20776173206973737565642e00490120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265582063757272656e746c792064656c65676174696e672e005420456d6974732060556e64656c656761746564602e002c2023203c7765696768743e5901202d20436f6d706c65786974793a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732e64202d2044622072656164733a20322a60566f74696e674f666068202d204462207772697465733a20322a60566f74696e674f6660a4202d2044622072656164732070657220766f7465733a20605265666572656e64756d496e666f4f6660a8202d204462207772697465732070657220766f7465733a20605265666572656e64756d496e666f4f6660302023203c2f7765696768743e58636c6561725f7075626c69635f70726f706f73616c7300207420436c6561727320616c6c207075626c69632070726f706f73616c732e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e002c2023203c7765696768743e28202d20604f283129602e6c202d204462207772697465733a20605075626c696350726f707360302023203c2f7765696768743e346e6f74655f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e3861012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e205468697320646f65736e27742072657175697265207468652070726f706f73616c20746f206265250120696e207468652064697370617463682071756575652062757420646f657320726571756972652061206465706f7369742c2072657475726e6564206f6e636520656e61637465642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e002c2023203c7765696768743e6901202d20436f6d706c65786974793a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e60202d2044622072656164733a2060507265696d616765736064202d204462207772697465733a2060507265696d6167657360302023203c2f7765696768743e646e6f74655f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e040d012053616d6520617320606e6f74655f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e586e6f74655f696d6d696e656e745f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e4045012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e2054686973207265717569726573207468652070726f706f73616c20746f206265410120696e207468652064697370617463682071756575652e204e6f206465706f736974206973206e65656465642e205768656e20746869732063616c6c206973207375636365737366756c2c20692e652e39012074686520707265696d61676520686173206e6f74206265656e2075706c6f61646564206265666f726520616e64206d61746368657320736f6d6520696d6d696e656e742070726f706f73616c2c40206e6f2066656520697320706169642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e002c2023203c7765696768743e6901202d20436f6d706c65786974793a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e60202d2044622072656164733a2060507265696d616765736064202d204462207772697465733a2060507265696d6167657360302023203c2f7765696768743e886e6f74655f696d6d696e656e745f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e0431012053616d6520617320606e6f74655f696d6d696e656e745f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e34726561705f707265696d616765083470726f706f73616c5f686173681c543a3a486173686070726f706f73616c5f6c656e5f75707065725f626f756e6430436f6d706163743c7533323e4cf42052656d6f766520616e20657870697265642070726f706f73616c20707265696d61676520616e6420636f6c6c65637420746865206465706f7369742e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00d0202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f6620612070726f706f73616c2e2d01202d206070726f706f73616c5f6c656e6774685f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e206c656e677468206f66207468652070726f706f73616c2e010120202045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e00510120546869732077696c6c206f6e6c7920776f726b2061667465722060566f74696e67506572696f646020626c6f636b732066726f6d207468652074696d6520746861742074686520707265696d616765207761735d01206e6f7465642c2069662069742773207468652073616d65206163636f756e7420646f696e672069742e2049662069742773206120646966666572656e74206163636f756e742c207468656e206974276c6c206f6e6c79b020776f726b20616e206164646974696f6e616c2060456e6163746d656e74506572696f6460206c617465722e006020456d6974732060507265696d616765526561706564602e002c2023203c7765696768743ed0202d20436f6d706c65786974793a20604f284429602077686572652044206973206c656e677468206f662070726f706f73616c2ebc202d2044622072656164733a2060507265696d61676573602c2070726f7669646572206163636f756e742064617461bc202d204462207772697465733a2060507265696d61676573602070726f7669646572206163636f756e742064617461302023203c2f7765696768743e18756e6c6f636b041874617267657430543a3a4163636f756e7449642ca420556e6c6f636b20746f6b656e732074686174206861766520616e2065787069726564206c6f636b2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00bc202d2060746172676574603a20546865206163636f756e7420746f2072656d6f766520746865206c6f636b206f6e2e002c2023203c7765696768743ed4202d20436f6d706c657869747920604f2852296020776974682052206e756d626572206f6620766f7465206f66207461726765742eec202d2044622072656164733a2060566f74696e674f66602c206062616c616e636573206c6f636b73602c2060746172676574206163636f756e7460f0202d204462207772697465733a2060566f74696e674f66602c206062616c616e636573206c6f636b73602c2060746172676574206163636f756e7460302023203c2f7765696768743e2c72656d6f76655f766f74650414696e6465783c5265666572656e64756d496e6465787c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e00102049663a8c202d20746865207265666572656e64756d207761732063616e63656c6c65642c206f7280202d20746865207265666572656e64756d206973206f6e676f696e672c206f7294202d20746865207265666572656e64756d2068617320656e6465642073756368207468617401012020202d2074686520766f7465206f6620746865206163636f756e742077617320696e206f70706f736974696f6e20746f2074686520726573756c743b206f72d82020202d20746865726520776173206e6f20636f6e76696374696f6e20746f20746865206163636f756e74277320766f74653b206f72882020202d20746865206163636f756e74206d61646520612073706c697420766f74656101202e2e2e7468656e2074686520766f74652069732072656d6f76656420636c65616e6c7920616e64206120666f6c6c6f77696e672063616c6c20746f2060756e6c6f636b60206d617920726573756c7420696e206d6f72655c2066756e6473206265696e6720617661696c61626c652e00ac2049662c20686f77657665722c20746865207265666572656e64756d2068617320656e64656420616e643af0202d2069742066696e697368656420636f72726573706f6e64696e6720746f2074686520766f7465206f6620746865206163636f756e742c20616e64e0202d20746865206163636f756e74206d6164652061207374616e6461726420766f7465207769746820636f6e76696374696f6e2c20616e64c0202d20746865206c6f636b20706572696f64206f662074686520636f6e76696374696f6e206973206e6f74206f7665725d01202e2e2e7468656e20746865206c6f636b2077696c6c206265206167677265676174656420696e746f20746865206f766572616c6c206163636f756e742773206c6f636b2c207768696368206d617920696e766f6c76655d01202a6f7665726c6f636b696e672a20287768657265207468652074776f206c6f636b732061726520636f6d62696e656420696e746f20612073696e676c65206c6f636b207468617420697320746865206d6178696d756de8206f6620626f74682074686520616d6f756e74206c6f636b656420616e64207468652074696d65206973206974206c6f636b656420666f72292e004d0120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e6572206d7573742068617665206120766f74658c207265676973746572656420666f72207265666572656e64756d2060696e646578602e00f8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e002c2023203c7765696768743e4101202d20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652eac202d2044622072656164733a20605265666572656e64756d496e666f4f66602c2060566f74696e674f6660b0202d204462207772697465733a20605265666572656e64756d496e666f4f66602c2060566f74696e674f6660302023203c2f7765696768743e4472656d6f76655f6f746865725f766f7465081874617267657430543a3a4163636f756e74496414696e6465783c5265666572656e64756d496e6465784c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e0051012049662074686520607461726765746020697320657175616c20746f20746865207369676e65722c207468656e20746869732066756e6374696f6e2069732065786163746c79206571756976616c656e7420746f3101206072656d6f76655f766f7465602e204966206e6f7420657175616c20746f20746865207369676e65722c207468656e2074686520766f7465206d757374206861766520657870697265642c590120656974686572206265636175736520746865207265666572656e64756d207761732063616e63656c6c65642c20626563617573652074686520766f746572206c6f737420746865207265666572656e64756d206f729c20626563617573652074686520636f6e76696374696f6e20706572696f64206973206f7665722e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e005101202d2060746172676574603a20546865206163636f756e74206f662074686520766f746520746f2062652072656d6f7665643b2074686973206163636f756e74206d757374206861766520766f74656420666f72582020207265666572656e64756d2060696e646578602ef8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e002c2023203c7765696768743e4101202d20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652eac202d2044622072656164733a20605265666572656e64756d496e666f4f66602c2060566f74696e674f6660b0202d204462207772697465733a20605265666572656e64756d496e666f4f66602c2060566f74696e674f6660302023203c2f7765696768743e38656e6163745f70726f706f73616c083470726f706f73616c5f686173681c543a3a4861736814696e6465783c5265666572656e64756d496e64657804510120456e61637420612070726f706f73616c2066726f6d2061207265666572656e64756d2e20466f72206e6f77207765206a757374206d616b65207468652077656967687420626520746865206d6178696d756d2e01442050726f706f736564082450726f70496e6465781c42616c616e63650429012041206d6f74696f6e20686173206265656e2070726f706f7365642062792061207075626c6963206163636f756e742e205b70726f706f73616c5f696e6465782c206465706f7369745d185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e0475012041207075626c69632070726f706f73616c20686173206265656e207461626c656420666f72207265666572656e64756d20766f74652e205b70726f706f73616c5f696e6465782c206465706f7369742c206465706f7369746f72735d3845787465726e616c5461626c656400049820416e2065787465726e616c2070726f706f73616c20686173206265656e207461626c65642e1c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c6404bc2041207265666572656e64756d2068617320626567756e2e205b7265665f696e6465782c207468726573686f6c645d18506173736564043c5265666572656e64756d496e64657804e020412070726f706f73616c20686173206265656e20617070726f766564206279207265666572656e64756d2e205b7265665f696e6465785d244e6f74506173736564043c5265666572656e64756d496e64657804e020412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e205b7265665f696e6465785d2443616e63656c6c6564043c5265666572656e64756d496e64657804b42041207265666572656e64756d20686173206265656e2063616e63656c6c65642e205b7265665f696e6465785d204578656375746564083c5265666572656e64756d496e64657810626f6f6c04c020412070726f706f73616c20686173206265656e20656e61637465642e205b7265665f696e6465782c2069735f6f6b5d2444656c65676174656408244163636f756e744964244163636f756e74496404190120416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e205b77686f2c207461726765745d2c556e64656c65676174656404244163636f756e74496404f020416e205b6163636f756e745d206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e185665746f65640c244163636f756e74496410486173682c426c6f636b4e756d62657204090120416e2065787465726e616c2070726f706f73616c20686173206265656e207665746f65642e205b77686f2c2070726f706f73616c5f686173682c20756e74696c5d34507265696d6167654e6f7465640c1048617368244163636f756e7449641c42616c616e636504590120412070726f706f73616c277320707265696d61676520776173206e6f7465642c20616e6420746865206465706f7369742074616b656e2e205b70726f706f73616c5f686173682c2077686f2c206465706f7369745d30507265696d616765557365640c1048617368244163636f756e7449641c42616c616e636508150120412070726f706f73616c20707265696d616765207761732072656d6f76656420616e6420757365642028746865206465706f736974207761732072657475726e6564292e8c205b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369745d3c507265696d616765496e76616c69640810486173683c5265666572656e64756d496e64657804790120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d6167652077617320696e76616c69642e205b70726f706f73616c5f686173682c207265665f696e6465785d3c507265696d6167654d697373696e670810486173683c5265666572656e64756d496e64657804790120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d61676520776173206d697373696e672e205b70726f706f73616c5f686173682c207265665f696e6465785d38507265696d616765526561706564101048617368244163636f756e7449641c42616c616e6365244163636f756e744964082d012041207265676973746572656420707265696d616765207761732072656d6f76656420616e6420746865206465706f73697420636f6c6c656374656420627920746865207265617065722eac205b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369742c207265617065725d20556e6c6f636b656404244163636f756e74496404b420416e205b6163636f756e745d20686173206265656e20756e6c6f636b6564207375636365737366756c6c792e203c456e6163746d656e74506572696f6438543a3a426c6f636b4e756d62657210002f0d0014710120546865206d696e696d756d20706572696f64206f66206c6f636b696e6720616e642074686520706572696f64206265747765656e20612070726f706f73616c206265696e6720617070726f76656420616e6420656e61637465642e0031012049742073686f756c642067656e6572616c6c792062652061206c6974746c65206d6f7265207468616e2074686520756e7374616b6520706572696f6420746f20656e737572652074686174690120766f74696e67207374616b657273206861766520616e206f70706f7274756e69747920746f2072656d6f7665207468656d73656c7665732066726f6d207468652073797374656d20696e2074686520636173652077686572659c207468657920617265206f6e20746865206c6f73696e672073696465206f66206120766f74652e304c61756e6368506572696f6438543a3a426c6f636b4e756d62657210004e0c0004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e30566f74696e67506572696f6438543a3a426c6f636b4e756d62657210004e0c0004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e384d696e696d756d4465706f7369743042616c616e63654f663c543e400000c16ff2862300000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e5446617374547261636b566f74696e67506572696f6438543a3a426c6f636b4e756d626572108051010004ec204d696e696d756d20766f74696e6720706572696f6420616c6c6f77656420666f7220616e20656d657267656e6379207265666572656e64756d2e34436f6f6c6f6666506572696f6438543a3a426c6f636b4e756d62657210004e0c0004610120506572696f6420696e20626c6f636b7320776865726520616e2065787465726e616c2070726f706f73616c206d6179206e6f742062652072652d7375626d6974746564206166746572206265696e67207665746f65642e4c507265696d616765427974654465706f7369743042616c616e63654f663c543e400010a5d4e800000000000000000000000429012054686520616d6f756e74206f662062616c616e63652074686174206d757374206265206465706f7369746564207065722062797465206f6620707265696d6167652073746f7265642e204d6178566f7465730c753332106400000004b020546865206d6178696d756d206e756d626572206f6620766f74657320666f7220616e206163636f756e742e842056616c75654c6f7704382056616c756520746f6f206c6f773c50726f706f73616c4d697373696e6704602050726f706f73616c20646f6573206e6f7420657869737420426164496e646578043820556e6b6e6f776e20696e6465783c416c726561647943616e63656c656404982043616e6e6f742063616e63656c207468652073616d652070726f706f73616c207477696365444475706c696361746550726f706f73616c04582050726f706f73616c20616c7265616479206d6164654c50726f706f73616c426c61636b6c6973746564046c2050726f706f73616c207374696c6c20626c61636b6c6973746564444e6f7453696d706c654d616a6f7269747904ac204e6578742065787465726e616c2070726f706f73616c206e6f742073696d706c65206d616a6f726974792c496e76616c696448617368043420496e76616c69642068617368284e6f50726f706f73616c0454204e6f2065787465726e616c2070726f706f73616c34416c72656164795665746f6564049c204964656e74697479206d6179206e6f74207665746f20612070726f706f73616c207477696365304e6f7444656c6567617465640438204e6f742064656c656761746564444475706c6963617465507265696d616765045c20507265696d61676520616c7265616479206e6f7465642c4e6f74496d6d696e656e740434204e6f7420696d6d696e656e7420546f6f4561726c79042820546f6f206561726c7920496d6d696e656e74042420496d6d696e656e743c507265696d6167654d697373696e67044c20507265696d616765206e6f7420666f756e64445265666572656e64756d496e76616c6964048820566f746520676976656e20666f7220696e76616c6964207265666572656e64756d3c507265696d616765496e76616c6964044420496e76616c696420707265696d6167652c4e6f6e6557616974696e670454204e6f2070726f706f73616c732077616974696e67244e6f744c6f636b656404a42054686520746172676574206163636f756e7420646f6573206e6f7420686176652061206c6f636b2e284e6f744578706972656404f020546865206c6f636b206f6e20746865206163636f756e7420746f20626520756e6c6f636b656420686173206e6f742079657420657870697265642e204e6f74566f74657204c82054686520676976656e206163636f756e7420646964206e6f7420766f7465206f6e20746865207265666572656e64756d2e304e6f5065726d697373696f6e04cc20546865206163746f7220686173206e6f207065726d697373696f6e20746f20636f6e647563742074686520616374696f6e2e44416c726561647944656c65676174696e67048c20546865206163636f756e7420697320616c72656164792064656c65676174696e672e204f766572666c6f7704a420416e20756e657870656374656420696e7465676572206f766572666c6f77206f636375727265642e24556e646572666c6f7704a820416e20756e657870656374656420696e746567657220756e646572666c6f77206f636375727265642e44496e73756666696369656e7446756e647304010120546f6f206869676820612062616c616e6365207761732070726f7669646564207468617420746865206163636f756e742063616e6e6f74206166666f72642e344e6f7444656c65676174696e6704a420546865206163636f756e74206973206e6f742063757272656e746c792064656c65676174696e672e28566f746573457869737408590120546865206163636f756e742063757272656e746c792068617320766f74657320617474616368656420746f20697420616e6420746865206f7065726174696f6e2063616e6e6f74207375636365656420756e74696cec207468657365206172652072656d6f7665642c20656974686572207468726f7567682060756e766f746560206f722060726561705f766f7465602e44496e7374616e744e6f74416c6c6f77656404dc2054686520696e7374616e74207265666572656e64756d206f726967696e2069732063757272656e746c7920646973616c6c6f7765642e204e6f6e73656e736504982044656c65676174696f6e20746f206f6e6573656c66206d616b6573206e6f2073656e73652e3c57726f6e675570706572426f756e64045420496e76616c696420757070657220626f756e642e3c4d6178566f746573526561636865640484204d6178696d756d206e756d626572206f6620766f74657320726561636865642e1c436f756e63696c014c496e7374616e636531436f6c6c656374697665182450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368643c542061732054726169743c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e7449640400085d0120546865206d656d6265722077686f2070726f7669646573207468652064656661756c7420766f746520666f7220616e79206f74686572206d656d62657273207468617420646f206e6f7420766f7465206265666f7265e4207468652074696d656f75742e204966204e6f6e652c207468656e206e6f206d656d6265722068617320746861742070726976696c6567652e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c30f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e002c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e6c510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed0205b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292ea4205b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e40205b70726f706f73616c5f686173685d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e40205b70726f706f73616c5f686173685d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e60205b70726f706f73616c5f686173682c20726573756c745d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e60205b70726f706f73616c5f686173682c20726573756c745d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e64205b70726f706f73616c5f686173682c207965732c206e6f5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e48546563686e6963616c436f6d6d6974746565014c496e7374616e636532436f6c6c656374697665182450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368643c542061732054726169743c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e7449640400085d0120546865206d656d6265722077686f2070726f7669646573207468652064656661756c7420766f746520666f7220616e79206f74686572206d656d62657273207468617420646f206e6f7420766f7465206265666f7265e4207468652074696d656f75742e204966204e6f6e652c207468656e206e6f206d656d6265722068617320746861742070726976696c6567652e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c30f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e002c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e6c510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed0205b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292ea4205b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e40205b70726f706f73616c5f686173685d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e40205b70726f706f73616c5f686173685d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e60205b70726f706f73616c5f686173682c20726573756c745d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e60205b70726f706f73616c5f686173682c20726573756c745d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e64205b70726f706f73616c5f686173682c207965732c206e6f5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e24456c656374696f6e73014050687261676d656e456c656374696f6e141c4d656d626572730100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e040004f0205468652063757272656e7420656c6563746564206d656d626572736869702e20536f72746564206261736564206f6e206163636f756e742069642e2452756e6e65727355700100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e0400044901205468652063757272656e742072756e6e6572735f75702e20536f72746564206261736564206f6e206c6f7720746f2068696768206d657269742028776f72736520746f20626573742072756e6e6572292e38456c656374696f6e526f756e647301000c75333210000000000441012054686520746f74616c206e756d626572206f6620766f746520726f756e6473207468617420686176652068617070656e65642c206578636c7564696e6720746865207570636f6d696e67206f6e652e18566f74696e6701010530543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e29004400000000000000000000000000000000000cb820566f74657320616e64206c6f636b6564207374616b65206f66206120706172746963756c617220766f7465722e00c02054574f582d4e4f54453a205341464520617320604163636f756e7449646020697320612063727970746f20686173682843616e646964617465730100445665633c543a3a4163636f756e7449643e0400085901205468652070726573656e742063616e646964617465206c6973742e20536f72746564206261736564206f6e206163636f756e742d69642e20412063757272656e74206d656d626572206f722072756e6e65722d757041012063616e206e6576657220656e746572207468697320766563746f7220616e6420697320616c7761797320696d706c696369746c7920617373756d656420746f20626520612063616e6469646174652e011810766f74650814766f746573445665633c543a3a4163636f756e7449643e1476616c756554436f6d706163743c42616c616e63654f663c543e3e645d0120566f746520666f72206120736574206f662063616e6469646174657320666f7220746865207570636f6d696e6720726f756e64206f6620656c656374696f6e2e20546869732063616e2062652063616c6c656420746fe4207365742074686520696e697469616c20766f7465732c206f722075706461746520616c7265616479206578697374696e6720766f7465732e0055012055706f6e20696e697469616c20766f74696e672c206076616c75656020756e697473206f66206077686f6027732062616c616e6365206973206c6f636b656420616e64206120626f6e6420616d6f756e74206973282072657365727665642e0050205468652060766f746573602073686f756c643a482020202d206e6f7420626520656d7074792e59012020202d206265206c657373207468616e20746865206e756d626572206f6620706f737369626c652063616e646964617465732e204e6f7465207468617420616c6c2063757272656e74206d656d6265727320616e641501202020202072756e6e6572732d75702061726520616c736f206175746f6d61746963616c6c792063616e6469646174657320666f7220746865206e65787420726f756e642e005d012049742069732074686520726573706f6e736962696c697479206f66207468652063616c6c657220746f206e6f7420706c61636520616c6c206f662074686569722062616c616e636520696e746f20746865206c6f636ba020616e64206b65657020736f6d6520666f722066757274686572207472616e73616374696f6e732e002c2023203c7765696768743e5c2042617365207765696768743a2034372e393320c2b573342053746174652072656164733ad820092d2043616e646964617465732e6c656e2829202b204d656d626572732e6c656e2829202b2052756e6e65727355702e6c656e28295420092d20566f74696e67202869735f766f74657229d420092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665202b20746f74616c5f62616c616e6365295d38205374617465207772697465733a2820092d20566f74696e672020092d204c6f636b1d0120092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665202d2d206f6e6c79207768656e206372656174696e672061206e657720766f746572295d302023203c2f7765696768743e3072656d6f76655f766f746572003421012052656d6f766520606f726967696e60206173206120766f7465722e20546869732072656d6f76657320746865206c6f636b20616e642072657475726e732074686520626f6e642e002c2023203c7765696768743e582042617365207765696768743a2033362e3820c2b573a820416c6c207374617465206163636573732069732066726f6d20646f5f72656d6f76655f766f7465722e342053746174652072656164733a2820092d20566f74696e675820092d205b4163636f756e74446174612877686f295d38205374617465207772697465733a2820092d20566f74696e672420092d204c6f636b735820092d205b4163636f756e74446174612877686f295d302023203c2f7765696768743e507265706f72745f646566756e63745f766f746572041c646566756e6374c4446566756e6374566f7465723c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e6c5d01205265706f727420607461726765746020666f72206265696e6720616e20646566756e637420766f7465722e20496e2063617365206f6620612076616c6964207265706f72742c20746865207265706f727465722069735d012072657761726465642062792074686520626f6e6420616d6f756e74206f662060746172676574602e204f74686572776973652c20746865207265706f7274657220697473656c662069732072656d6f76656420616e645c20746865697220626f6e6420697320736c61736865642e0088204120646566756e637420766f74657220697320646566696e656420746f2062653a4d012020202d206120766f7465722077686f73652063757272656e74207375626d697474656420766f7465732061726520616c6c20696e76616c69642e20692e652e20616c6c206f66207468656d20617265206e6ff020202020206c6f6e67657220612063616e646964617465206e6f7220616e20616374697665206d656d626572206f7220612072756e6e65722d75702e0000690120546865206f726967696e206d7573742070726f7669646520746865206e756d626572206f662063757272656e742063616e6469646174657320616e6420766f746573206f6620746865207265706f7274656420746172676574c020666f722074686520707572706f7365206f66206163637572617465207765696768742063616c63756c6174696f6e2e002c2023203c7765696768743eb4204e6f204261736520776569676874206261736564206f6e206d696e2073717561726520616e616c797369732ea420436f6d706c6578697479206f662063616e6469646174655f636f756e743a20312e37353520c2b5739020436f6d706c6578697479206f6620766f74655f636f756e743a2031382e353120c2b573342053746174652072656164733a542020092d20566f74696e67287265706f7274657229502020092d2043616e6469646174652e6c656e28294c2020092d20566f74696e672854617267657429d82020092d2043616e646964617465732c204d656d626572732c2052756e6e6572735570202869735f646566756e63745f766f7465722938205374617465207772697465733a7020092d204c6f636b287265706f72746572207c7c2074617267657429dc20092d205b4163636f756e7442616c616e6365287265706f72746572295d202b204163636f756e7442616c616e636528746172676574297820092d20566f74696e67287265706f72746572207c7c20746172676574295901204e6f74653a207468652064622061636365737320697320776f7273652077697468207265737065637420746f2064622c207768696368206973207768656e20746865207265706f727420697320636f72726563742e302023203c2f7765696768743e407375626d69745f63616e646964616379043c63616e6469646174655f636f756e7430436f6d706163743c7533323e5478205375626d6974206f6e6573656c6620666f722063616e6469646163792e006420412063616e6469646174652077696c6c206569746865723aec2020202d204c6f73652061742074686520656e64206f6620746865207465726d20616e6420666f7266656974207468656972206465706f7369742e2d012020202d2057696e20616e64206265636f6d652061206d656d6265722e204d656d626572732077696c6c206576656e7475616c6c7920676574207468656972207374617368206261636b2e55012020202d204265636f6d6520612072756e6e65722d75702e2052756e6e6572732d75707320617265207265736572766564206d656d6265727320696e2063617365206f6e65206765747320666f72636566756c6c7934202020202072656d6f7665642e002c2023203c7765696768743e60204261736520776569676874203d2033332e333320c2b573a420436f6d706c6578697479206f662063616e6469646174655f636f756e743a20302e33373520c2b573342053746174652072656164733a5020092d2043616e646964617465732e6c656e28293820092d2043616e646964617465732c20092d204d656d626572733420092d2052756e6e65727355706420092d205b4163636f756e7442616c616e63652877686f295d38205374617465207772697465733a6420092d205b4163636f756e7442616c616e63652877686f295d3820092d2043616e64696461746573302023203c2f7765696768743e4872656e6f756e63655f63616e646964616379042872656e6f756e63696e672852656e6f756e63696e679851012052656e6f756e6365206f6e65277320696e74656e74696f6e20746f20626520612063616e64696461746520666f7220746865206e65787420656c656374696f6e20726f756e642e203320706f74656e7469616c40206f7574636f6d65732065786973743a4101202d20606f726967696e6020697320612063616e64696461746520616e64206e6f7420656c656374656420696e20616e79207365742e20496e207468697320636173652c2074686520626f6e64206973f4202020756e72657365727665642c2072657475726e656420616e64206f726967696e2069732072656d6f76656420617320612063616e6469646174652e5901202d20606f726967696e6020697320612063757272656e742072756e6e65722d75702e20496e207468697320636173652c2074686520626f6e6420697320756e72657365727665642c2072657475726e656420616e64902020206f726967696e2069732072656d6f76656420617320612072756e6e65722d75702e4d01202d20606f726967696e6020697320612063757272656e74206d656d6265722e20496e207468697320636173652c2074686520626f6e6420697320756e726573657276656420616e64206f726967696e206973590120202072656d6f7665642061732061206d656d6265722c20636f6e73657175656e746c79206e6f74206265696e6720612063616e64696461746520666f7220746865206e65787420726f756e6420616e796d6f72652e650120202053696d696c617220746f205b6072656d6f76655f766f746572605d2c206966207265706c6163656d656e742072756e6e657273206578697374732c20746865792061726520696d6d6564696174656c7920757365642e24203c7765696768743e7820496620612063616e6469646174652069732072656e6f756e63696e673a60200942617365207765696768743a2031372e323820c2b573a82009436f6d706c6578697479206f662063616e6469646174655f636f756e743a20302e32333520c2b57338200953746174652072656164733a3c2009092d2043616e64696461746573982009092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665295d3c20095374617465207772697465733a3c2009092d2043616e64696461746573982009092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665295d64204966206d656d6265722069732072656e6f756e63696e673a60200942617365207765696768743a2034362e323520c2b57338200953746174652072656164733ad02009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d3c20095374617465207772697465733ad02009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d642049662072756e6e65722069732072656e6f756e63696e673a60200942617365207765696768743a2034362e323520c2b57338200953746174652072656164733aac2009092d2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d3c20095374617465207772697465733aac2009092d2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d000d0120576569676874206e6f74653a205468652063616c6c20696e746f206368616e67654d656d62657273206e65656420746f206265206163636f756e74656420666f722e28203c2f7765696768743e3472656d6f76655f6d656d626572080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653c6861735f7265706c6163656d656e7410626f6f6c485d012052656d6f7665206120706172746963756c6172206d656d6265722066726f6d20746865207365742e20546869732069732065666665637469766520696d6d6564696174656c7920616e642074686520626f6e64206f668020746865206f7574676f696e67206d656d62657220697320736c61736865642e00590120496620612072756e6e65722d757020697320617661696c61626c652c207468656e2074686520626573742072756e6e65722d75702077696c6c2062652072656d6f76656420616e64207265706c61636573207468650101206f7574676f696e67206d656d6265722e204f74686572776973652c2061206e65772070687261676d656e20656c656374696f6e20697320737461727465642e004501204e6f74652074686174207468697320646f6573206e6f7420616666656374207468652064657369676e6174656420626c6f636b206e756d626572206f6620746865206e65787420656c656374696f6e2e002c2023203c7765696768743e6820496620776520686176652061207265706c6163656d656e743a6820092d2042617365207765696768743a2035302e393320c2b5734020092d2053746174652072656164733a502009092d2052756e6e65727355702e6c656e2829cc2009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572294420092d205374617465207772697465733acc2009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d62657229650120456c73652c2073696e63652074686973206973206120726f6f742063616c6c20616e642077696c6c20676f20696e746f2070687261676d656e2c20776520617373756d652066756c6c20626c6f636b20666f72206e6f772e302023203c2f7765696768743e01141c4e65775465726d04645665633c284163636f756e7449642c2042616c616e6365293e1061012041206e6577207465726d2077697468205b6e65775f6d656d626572735d2e205468697320696e64696361746573207468617420656e6f7567682063616e64696461746573206578697374656420746f2072756e20746865590120656c656374696f6e2c206e6f74207468617420656e6f756768206861766520686173206265656e20656c65637465642e2054686520696e6e65722076616c7565206d757374206265206578616d696e656420666f726101207468697320707572706f73652e204120604e65775465726d285b5d296020696e64696361746573207468617420736f6d652063616e6469646174657320676f7420746865697220626f6e6420736c617368656420616e645901206e6f6e65207765726520656c65637465642c207768696c73742060456d7074795465726d60206d65616e732074686174206e6f2063616e64696461746573206578697374656420746f20626567696e20776974682e24456d7074795465726d00083501204e6f20286f72206e6f7420656e6f756768292063616e64696461746573206578697374656420666f72207468697320726f756e642e205468697320697320646966666572656e742066726f6dc420604e65775465726d285b5d29602e2053656520746865206465736372697074696f6e206f6620604e65775465726d602e304d656d6265724b69636b656404244163636f756e744964084d012041205b6d656d6265725d20686173206265656e2072656d6f7665642e20546869732073686f756c6420616c7761797320626520666f6c6c6f7765642062792065697468657220604e65775465726d60206f74342060456d7074795465726d602e3c4d656d62657252656e6f756e63656404244163636f756e74496404a82041205b6d656d6265725d206861732072656e6f756e6365642074686569722063616e6469646163792e34566f7465725265706f727465640c244163636f756e744964244163636f756e74496410626f6f6c080901204120766f74657220776173207265706f7274656420776974682074686520746865207265706f7274206265696e67207375636365737366756c206f72206e6f742e6c205b766f7465722c207265706f727465722c20737563636573735d183443616e646964616379426f6e643042616c616e63654f663c543e400080c6a47e8d030000000000000000000028566f74696e67426f6e643042616c616e63654f663c543e4000407a10f35a000000000000000000000038446573697265644d656d626572730c753332100d00000000404465736972656452756e6e65727355700c753332100700000000305465726d4475726174696f6e38543a3a426c6f636b4e756d626572108013030000204d6f64756c654964384c6f636b4964656e74696669657220706872656c656374004430556e61626c65546f566f746504c42043616e6e6f7420766f7465207768656e206e6f2063616e64696461746573206f72206d656d626572732065786973742e1c4e6f566f7465730498204d75737420766f746520666f72206174206c65617374206f6e652063616e6469646174652e30546f6f4d616e79566f74657304882043616e6e6f7420766f7465206d6f7265207468616e2063616e646964617465732e504d6178696d756d566f7465734578636565646564049c2043616e6e6f7420766f7465206d6f7265207468616e206d6178696d756d20616c6c6f7765642e284c6f7742616c616e636504c82043616e6e6f7420766f74652077697468207374616b65206c657373207468616e206d696e696d756d2062616c616e63652e3c556e61626c65546f506179426f6e64047c20566f7465722063616e206e6f742070617920766f74696e6720626f6e642e2c4d7573744265566f7465720444204d757374206265206120766f7465722e285265706f727453656c6604502043616e6e6f74207265706f72742073656c662e4c4475706c69636174656443616e6469646174650484204475706c6963617465642063616e646964617465207375626d697373696f6e2e304d656d6265725375626d6974048c204d656d6265722063616e6e6f742072652d7375626d69742063616e6469646163792e3052756e6e65725375626d6974048c2052756e6e65722063616e6e6f742072652d7375626d69742063616e6469646163792e68496e73756666696369656e7443616e64696461746546756e647304982043616e64696461746520646f6573206e6f74206861766520656e6f7567682066756e64732e244e6f744d656d6265720438204e6f742061206d656d6265722e54496e76616c696443616e646964617465436f756e7404e4205468652070726f766964656420636f756e74206f66206e756d626572206f662063616e6469646174657320697320696e636f72726563742e40496e76616c6964566f7465436f756e7404d0205468652070726f766964656420636f756e74206f66206e756d626572206f6620766f74657320697320696e636f72726563742e44496e76616c696452656e6f756e63696e67040101205468652072656e6f756e63696e67206f726967696e2070726573656e74656420612077726f6e67206052656e6f756e63696e676020706172616d657465722e48496e76616c69645265706c6163656d656e740401012050726564696374696f6e20726567617264696e67207265706c6163656d656e74206166746572206d656d6265722072656d6f76616c2069732077726f6e672e4c546563686e6963616c4d656d62657273686970014c496e7374616e6365314d656d62657273686970081c4d656d626572730100445665633c543a3a4163636f756e7449643e040004c8205468652063757272656e74206d656d626572736869702c2073746f72656420617320616e206f726465726564205665632e145072696d65000030543a3a4163636f756e744964040004a4205468652063757272656e74207072696d65206d656d6265722c206966206f6e65206578697374732e011c286164645f6d656d626572040c77686f30543a3a4163636f756e7449640c7c204164642061206d656d626572206077686f6020746f20746865207365742e00a0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a4164644f726967696e602e3472656d6f76655f6d656d626572040c77686f30543a3a4163636f756e7449640c902052656d6f76652061206d656d626572206077686f602066726f6d20746865207365742e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656d6f76654f726967696e602e2c737761705f6d656d626572081872656d6f766530543a3a4163636f756e7449640c61646430543a3a4163636f756e74496414c02053776170206f7574206f6e65206d656d626572206072656d6f76656020666f7220616e6f746865722060616464602e00a4204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a537761704f726967696e602e001101205072696d65206d656d62657273686970206973202a6e6f742a207061737365642066726f6d206072656d6f76656020746f2060616464602c20696620657874616e742e3472657365745f6d656d62657273041c6d656d62657273445665633c543a3a4163636f756e7449643e105901204368616e676520746865206d656d6265727368697020746f2061206e6577207365742c20646973726567617264696e6720746865206578697374696e67206d656d626572736869702e204265206e69636520616e646c207061737320606d656d6265727360207072652d736f727465642e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52657365744f726967696e602e286368616e67655f6b6579040c6e657730543a3a4163636f756e74496414d82053776170206f7574207468652073656e64696e67206d656d62657220666f7220736f6d65206f74686572206b657920606e6577602e00f4204d6179206f6e6c792062652063616c6c65642066726f6d20605369676e656460206f726967696e206f6620612063757272656e74206d656d6265722e002101205072696d65206d656d62657273686970206973207061737365642066726f6d20746865206f726967696e206163636f756e7420746f20606e6577602c20696620657874616e742e247365745f7072696d65040c77686f30543a3a4163636f756e7449640cc02053657420746865207072696d65206d656d6265722e204d75737420626520612063757272656e74206d656d6265722e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e2c636c6561725f7072696d65000c982052656d6f766520746865207072696d65206d656d626572206966206974206578697374732e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e01182c4d656d62657241646465640004e42054686520676976656e206d656d626572207761732061646465643b2073656520746865207472616e73616374696f6e20666f722077686f2e344d656d62657252656d6f7665640004ec2054686520676976656e206d656d626572207761732072656d6f7665643b2073656520746865207472616e73616374696f6e20666f722077686f2e384d656d62657273537761707065640004dc2054776f206d656d62657273207765726520737761707065643b2073656520746865207472616e73616374696f6e20666f722077686f2e304d656d6265727352657365740004190120546865206d656d62657273686970207761732072657365743b2073656520746865207472616e73616374696f6e20666f722077686f20746865206e6577207365742069732e284b65794368616e676564000488204f6e65206f6620746865206d656d6265727327206b657973206368616e6765642e1444756d6d7904bc73705f7374643a3a6d61726b65723a3a5068616e746f6d446174613c284163636f756e7449642c204576656e74293e0470205068616e746f6d206d656d6265722c206e6576657220757365642e00003c46696e616c697479547261636b65720001042866696e616c5f68696e74041068696e745c436f6d706163743c543a3a426c6f636b4e756d6265723e08f42048696e7420746861742074686520617574686f72206f66207468697320626c6f636b207468696e6b732074686520626573742066696e616c697a65646c20626c6f636b2069732074686520676976656e206e756d6265722e00082857696e646f7753697a6538543a3a426c6f636b4e756d626572106500000004190120546865206e756d626572206f6620726563656e742073616d706c657320746f206b6565702066726f6d207468697320636861696e2e2044656661756c74206973203130312e345265706f72744c6174656e637938543a3a426c6f636b4e756d62657210e8030000041d01205468652064656c617920616674657220776869636820706f696e74207468696e6773206265636f6d6520737573706963696f75732e2044656661756c7420697320313030302e0838416c72656164795570646174656404c82046696e616c2068696e74206d7573742062652075706461746564206f6e6c79206f6e636520696e2074686520626c6f636b1c42616448696e7404902046696e616c697a6564206865696768742061626f766520626c6f636b206e756d6265721c4772616e647061013c4772616e64706146696e616c6974791814537461746501006c53746f72656453746174653c543a3a426c6f636b4e756d6265723e04000490205374617465206f66207468652063757272656e7420617574686f72697479207365742e3450656e64696e674368616e676500008c53746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265723e040004c42050656e64696e67206368616e67653a20287369676e616c65642061742c207363686564756c6564206368616e6765292e284e657874466f72636564000038543a3a426c6f636b4e756d626572040004bc206e65787420626c6f636b206e756d6265722077686572652077652063616e20666f7263652061206368616e67652e1c5374616c6c656400008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d626572290400049020607472756560206966207765206172652063757272656e746c79207374616c6c65642e3043757272656e7453657449640100145365744964200000000000000000085d0120546865206e756d626572206f66206368616e6765732028626f746820696e207465726d73206f66206b65797320616e6420756e6465726c79696e672065636f6e6f6d696320726573706f6e736962696c697469657329c420696e20746865202273657422206f66204772616e6470612076616c696461746f72732066726f6d2067656e657369732e30536574496453657373696f6e0001051453657449643053657373696f6e496e6465780004001059012041206d617070696e672066726f6d206772616e6470612073657420494420746f2074686520696e646578206f6620746865202a6d6f737420726563656e742a2073657373696f6e20666f722077686963682069747368206d656d62657273207765726520726573706f6e7369626c652e00b82054574f582d4e4f54453a2060536574496460206973206e6f7420756e646572207573657220636f6e74726f6c2e010c4c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66240d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e00110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e306e6f74655f7374616c6c6564081464656c617938543a3a426c6f636b4e756d6265726c626573745f66696e616c697a65645f626c6f636b5f6e756d62657238543a3a426c6f636b4e756d6265721c1d01204e6f74652074686174207468652063757272656e7420617574686f7269747920736574206f6620746865204752414e4450412066696e616c69747920676164676574206861732901207374616c6c65642e20546869732077696c6c2074726967676572206120666f7263656420617574686f7269747920736574206368616e67652061742074686520626567696e6e696e672101206f6620746865206e6578742073657373696f6e2c20746f20626520656e6163746564206064656c61796020626c6f636b7320616674657220746861742e205468652064656c617915012073686f756c64206265206869676820656e6f75676820746f20736166656c7920617373756d6520746861742074686520626c6f636b207369676e616c6c696e6720746865290120666f72636564206368616e67652077696c6c206e6f742062652072652d6f726765642028652e672e203130303020626c6f636b73292e20546865204752414e44504120766f7465727329012077696c6c20737461727420746865206e657720617574686f7269747920736574207573696e672074686520676976656e2066696e616c697a656420626c6f636b20617320626173652e5c204f6e6c792063616c6c61626c6520627920726f6f742e010c384e6577417574686f7269746965730434417574686f726974794c69737404d0204e657720617574686f726974792073657420686173206265656e206170706c6965642e205b617574686f726974795f7365745d1850617573656400049c2043757272656e7420617574686f726974792073657420686173206265656e207061757365642e1c526573756d65640004a02043757272656e7420617574686f726974792073657420686173206265656e20726573756d65642e001c2c50617573654661696c656408090120417474656d707420746f207369676e616c204752414e445041207061757365207768656e2074686520617574686f72697479207365742069736e2774206c697665a8202865697468657220706175736564206f7220616c72656164792070656e64696e67207061757365292e30526573756d654661696c656408150120417474656d707420746f207369676e616c204752414e44504120726573756d65207768656e2074686520617574686f72697479207365742069736e277420706175736564a42028656974686572206c697665206f7220616c72656164792070656e64696e6720726573756d65292e344368616e676550656e64696e6704ec20417474656d707420746f207369676e616c204752414e445041206368616e67652077697468206f6e6520616c72656164792070656e64696e672e1c546f6f536f6f6e04c02043616e6e6f74207369676e616c20666f72636564206368616e676520736f20736f6f6e206166746572206c6173742e60496e76616c69644b65794f776e65727368697050726f6f660435012041206b6579206f776e6572736869702070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e60496e76616c696445717569766f636174696f6e50726f6f6604350120416e2065717569766f636174696f6e2070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e584475706c69636174654f6666656e63655265706f7274041901204120676976656e2065717569766f636174696f6e207265706f72742069732076616c69642062757420616c72656164792070726576696f75736c79207265706f727465642e20547265617375727901205472656173757279143450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c730001053450726f706f73616c496e6465789050726f706f73616c3c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100485665633c50726f706f73616c496e6465783e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e10546970730001051c543a3a48617368f04f70656e5469703c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265722c20543a3a486173683e0004000c59012054697073207468617420617265206e6f742079657420636f6d706c657465642e204b65796564206279207468652068617368206f66206028726561736f6e2c2077686f29602066726f6d207468652076616c75652e3d012054686973206861732074686520696e73656375726520656e756d657261626c6520686173682066756e6374696f6e2073696e636520746865206b657920697473656c6620697320616c7265616479802067756172616e7465656420746f20626520612073656375726520686173682e1c526561736f6e730001061c543a3a486173681c5665633c75383e0004000849012053696d706c6520707265696d616765206c6f6f6b75702066726f6d2074686520726561736f6e2773206861736820746f20746865206f726967696e616c20646174612e20416761696e2c2068617320616e610120696e73656375726520656e756d657261626c6520686173682073696e636520746865206b65792069732067756172616e7465656420746f2062652074686520726573756c74206f6620612073656375726520686173682e01203470726f706f73655f7370656e64081476616c756554436f6d706163743c42616c616e63654f663c543e3e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365242d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129b4202d20446252656164733a206050726f706f73616c436f756e74602c20606f726967696e206163636f756e7460ec202d2044625772697465733a206050726f706f73616c436f756e74602c206050726f706f73616c73602c20606f726967696e206163636f756e7460302023203c2f7765696768743e3c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e24fc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656a6563744f726967696e602e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129d0202d20446252656164733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460d4202d2044625772697465733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460302023203c2f7765696768743e40617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e285d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e50202d20436f6d706c65786974793a204f2831292e90202d20446252656164733a206050726f706f73616c73602c2060417070726f76616c73605c202d20446257726974653a2060417070726f76616c7360302023203c2f7765696768743e387265706f72745f617765736f6d650818726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e7449644c5d01205265706f727420736f6d657468696e672060726561736f6e60207468617420646573657276657320612074697020616e6420636c61696d20616e79206576656e7475616c207468652066696e6465722773206665652e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c206173d420605469705265706f72744465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743ecc202d20436f6d706c65786974793a20604f2852296020776865726520605260206c656e677468206f662060726561736f6e602e942020202d20656e636f64696e6720616e642068617368696e67206f662027726561736f6e27c4202d20446252656164733a2060526561736f6e73602c206054697073602c206077686f206163636f756e742064617461609c202d2044625772697465733a206054697073602c206077686f206163636f756e74206461746160302023203c2f7765696768743e2c726574726163745f7469700410686173681c543a3a486173684c550120526574726163742061207072696f72207469702d7265706f72742066726f6d20607265706f72745f617765736f6d65602c20616e642063616e63656c207468652070726f63657373206f662074697070696e672e00e0204966207375636365737366756c2c20746865206f726967696e616c206465706f7369742077696c6c20626520756e72657365727665642e00510120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642074686520746970206964656e746966696564206279206068617368604501206d7573742068617665206265656e207265706f7274656420627920746865207369676e696e67206163636f756e74207468726f75676820607265706f72745f617765736f6d65602028616e64206e6f7450207468726f75676820607469705f6e657760292e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e009020456d697473206054697052657472616374656460206966207375636365737366756c2e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960dc2020202d20446570656e6473206f6e20746865206c656e677468206f662060543a3a48617368602077686963682069732066697865642e90202d20446252656164733a206054697073602c20606f726967696e206163636f756e7460c0202d2044625772697465733a2060526561736f6e73602c206054697073602c20606f726967696e206163636f756e7460302023203c2f7765696768743e1c7469705f6e65770c18726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e744964247469705f76616c75653042616c616e63654f663c543e58f4204769766520612074697020666f7220736f6d657468696e67206e65773b206e6f2066696e6465722773206665652077696c6c2062652074616b656e2e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743e5501202d20436f6d706c65786974793a20604f2852202b2054296020776865726520605260206c656e677468206f662060726561736f6e602c2060546020697320746865206e756d626572206f6620746970706572732ec02020202d20604f285429603a206465636f64696e6720605469707065726020766563206f66206c656e6774682060546009012020202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e0d0120202020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602ee42020202d20604f285229603a2068617368696e6720616e6420656e636f64696e67206f6620726561736f6e206f66206c656e6774682060526080202d20446252656164733a206054697070657273602c2060526561736f6e736078202d2044625772697465733a2060526561736f6e73602c20605469707360302023203c2f7765696768743e0c7469700810686173681c543a3a48617368247469705f76616c75653042616c616e63654f663c543e64b4204465636c6172652061207469702076616c756520666f7220616e20616c72656164792d6f70656e207469702e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f66207468652068617368206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279382020206163636f756e742049442e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e00650120456d6974732060546970436c6f73696e676020696620746865207468726573686f6c64206f66207469707065727320686173206265656e207265616368656420616e642074686520636f756e74646f776e20706572696f64342068617320737461727465642e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e15012020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602c20696e736572742074697020616e6420636865636b20636c6f73696e672c0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602e00610120202041637475616c6c792077656967687420636f756c64206265206c6f77657220617320697420646570656e6473206f6e20686f77206d616e7920746970732061726520696e20604f70656e5469706020627574206974d4202020697320776569676874656420617320696620616c6d6f73742066756c6c20692e65206f66206c656e6774682060542d31602e74202d20446252656164733a206054697070657273602c206054697073604c202d2044625772697465733a20605469707360302023203c2f7765696768743e24636c6f73655f7469700410686173681c543a3a48617368446020436c6f736520616e64207061796f75742061207469702e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0019012054686520746970206964656e74696669656420627920606861736860206d75737420686176652066696e69736865642069747320636f756e74646f776e20706572696f642e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e9c2020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602e0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602eac202d20446252656164733a206054697073602c206054697070657273602c20607469702066696e64657260dc202d2044625772697465733a2060526561736f6e73602c206054697073602c206054697070657273602c20607469702066696e64657260302023203c2f7765696768743e012c2050726f706f736564043450726f706f73616c496e646578047c204e65772070726f706f73616c2e205b70726f706f73616c5f696e6465785d205370656e64696e67041c42616c616e6365043501205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e205b6275646765745f72656d61696e696e675d1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e74496404150120536f6d652066756e64732068617665206265656e20616c6c6f63617465642e205b70726f706f73616c5f696e6465782c2061776172642c2062656e65666963696172795d2052656a6563746564083450726f706f73616c496e6465781c42616c616e6365041d0120412070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e205b70726f706f73616c5f696e6465782c20736c61736865645d144275726e74041c42616c616e636504a820536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e205b6275726e5d20526f6c6c6f766572041c42616c616e6365047d01205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e205b6275646765745f72656d61696e696e675d1c4465706f736974041c42616c616e636504a820536f6d652066756e64732068617665206265656e206465706f73697465642e205b6465706f7369745d184e657754697004104861736804c42041206e6577207469702073756767657374696f6e20686173206265656e206f70656e65642e205b7469705f686173685d28546970436c6f73696e670410486173680409012041207469702073756767657374696f6e206861732072656163686564207468726573686f6c6420616e6420697320636c6f73696e672e205b7469705f686173685d24546970436c6f7365640c1048617368244163636f756e7449641c42616c616e636504e82041207469702073756767657374696f6e20686173206265656e20636c6f7365642e205b7469705f686173682c2077686f2c207061796f75745d3054697052657472616374656404104861736804c02041207469702073756767657374696f6e20686173206265656e207265747261637465642e205b7469705f686173685d243050726f706f73616c426f6e641c5065726d696c6c1050c30000085501204672616374696f6e206f6620612070726f706f73616c27732076616c756520746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c616365207468652070726f706f73616c2e110120416e2061636365707465642070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f6573206e6f742e4c50726f706f73616c426f6e644d696e696d756d3042616c616e63654f663c543e4000407a10f35a00000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f6438543a3a426c6f636b4e756d6265721080700000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e1c5065726d696c6c1020a107000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e30546970436f756e74646f776e38543a3a426c6f636b4e756d62657210807000000445012054686520706572696f6420666f722077686963682061207469702072656d61696e73206f70656e20616674657220697320686173206163686965766564207468726573686f6c6420746970706572732e3454697046696e646572734665651c50657263656e7404140431012054686520616d6f756e74206f66207468652066696e616c2074697020776869636820676f657320746f20746865206f726967696e616c207265706f72746572206f6620746865207469702e505469705265706f72744465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004d42054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120746970207265706f72742e5c5469705265706f72744465706f736974506572427974653042616c616e63654f663c543e400010a5d4e800000000000000000000000409012054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e2074686520746970207265706f727420726561736f6e2e204d6f64756c654964204d6f64756c6549642070792f7472737279041901205468652074726561737572792773206d6f64756c652069642c207573656420666f72206465726976696e672069747320736f7665726569676e206163636f756e742049442e2070496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e50496e76616c696450726f706f73616c496e646578046c204e6f2070726f706f73616c206174207468617420696e6465782e30526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e30416c72656164794b6e6f776e048c20546865207469702077617320616c726561647920666f756e642f737461727465642e28556e6b6e6f776e54697004642054686520746970206861736820697320756e6b6e6f776e2e244e6f7446696e64657204210120546865206163636f756e7420617474656d7074696e6720746f20726574726163742074686520746970206973206e6f74207468652066696e646572206f6620746865207469702e245374696c6c4f70656e042d0120546865207469702063616e6e6f7420626520636c61696d65642f636c6f736564206265636175736520746865726520617265206e6f7420656e6f7567682074697070657273207965742e245072656d617475726504350120546865207469702063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e24436f6e7472616374730124436f6e747261637473143c43757272656e745363686564756c650100205363686564756c6535020000000020a107000000000020a107000000000020a107000000000020a107000000000020a107000000000020a107000000000020a1070000000000e0f7050400000000e024370500000000e0f705040000000020a107000000000020a107000000000080f0fa020000000000e1f505000000000400000000000100100000000040000000200000000000080004942043757272656e7420636f7374207363686564756c6520666f7220636f6e7472616374732e305072697374696e65436f64650001062c436f6465486173683c543e1c5665633c75383e0004000465012041206d617070696e672066726f6d20616e206f726967696e616c20636f6465206861736820746f20746865206f726967696e616c20636f64652c20756e746f756368656420627920696e737472756d656e746174696f6e2e2c436f646553746f726167650001062c436f6465486173683c543e587761736d3a3a5072656661625761736d4d6f64756c650004000465012041206d617070696e67206265747765656e20616e206f726967696e616c20636f6465206861736820616e6420696e737472756d656e746564207761736d20636f64652c20726561647920666f7220657865637574696f6e2e384163636f756e74436f756e74657201000c753634200000000000000000045420546865207375627472696520636f756e7465722e38436f6e7472616374496e666f4f6600010530543a3a4163636f756e7449643c436f6e7472616374496e666f3c543e0004000ca82054686520636f6465206173736f6369617465642077697468206120676976656e206163636f756e742e00d02054574f582d4e4f54453a20534146452073696e636520604163636f756e7449646020697320612073656375726520686173682e01143c7570646174655f7363686564756c6504207363686564756c65205363686564756c650cb4205570646174657320746865207363686564756c6520666f72206d65746572696e6720636f6e7472616374732e000d0120546865207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652073746f726564207363686564756c652e207075745f636f64650410636f64651c5665633c75383e085d012053746f7265732074686520676976656e2062696e617279205761736d20636f646520696e746f2074686520636861696e27732073746f7261676520616e642072657475726e73206974732060636f646568617368602ed420596f752063616e20696e7374616e746961746520636f6e747261637473206f6e6c7920776974682073746f72656420636f64652e1063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e10646174611c5665633c75383e1c0901204d616b657320612063616c6c20746f20616e206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e002901202a20496620746865206163636f756e74206973206120736d6172742d636f6e7472616374206163636f756e742c20746865206173736f63696174656420636f64652077696c6c206265b020657865637574656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e1901202a20496620746865206163636f756e74206973206120726567756c6172206163636f756e742c20616e792076616c75652077696c6c206265207472616e736665727265642e4901202a204966206e6f206163636f756e742065786973747320616e64207468652063616c6c2076616c7565206973206e6f74206c657373207468616e20606578697374656e7469616c5f6465706f736974602c1501206120726567756c6172206163636f756e742077696c6c206265206372656174656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e2c696e7374616e74696174651024656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e24636f64655f686173682c436f6465486173683c543e10646174611c5665633c75383e28bd0120496e7374616e7469617465732061206e657720636f6e74726163742066726f6d207468652060636f646568617368602067656e65726174656420627920607075745f636f6465602c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e009820496e7374616e74696174696f6e20697320657865637574656420617320666f6c6c6f77733a004101202d205468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e64657220616e642068617368206f662074686520636f64652e0501202d2054686520736d6172742d636f6e7472616374206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732e6d01202d20546865206063746f725f636f64656020697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792d63726561746564206163636f756e742e204275666665722072657475726e65645d0120202061667465722074686520657865637574696f6e206973207361766564206173207468652060636f646560206f6620746865206163636f756e742e205468617420636f64652077696c6c20626520696e766f6b6564a820202075706f6e20616e792063616c6c2072656365697665642062792074686973206163636f756e742e7c202d2054686520636f6e747261637420697320696e697469616c697a65642e3c636c61696d5f73757263686172676508106465737430543a3a4163636f756e744964286175785f73656e646572504f7074696f6e3c543a3a4163636f756e7449643e14710120416c6c6f777320626c6f636b2070726f64756365727320746f20636c61696d206120736d616c6c2072657761726420666f72206576696374696e67206120636f6e74726163742e204966206120626c6f636b2070726f64756365721501206661696c7320746f20646f20736f2c206120726567756c61722075736572732077696c6c20626520616c6c6f77656420746f20636c61696d20746865207265776172642e00390120496620636f6e7472616374206973206e6f742065766963746564206173206120726573756c74206f6620746869732063616c6c2c206e6f20616374696f6e73206172652074616b656e20616e64ac207468652073656e646572206973206e6f7420656c696769626c6520666f7220746865207265776172642e011830496e7374616e74696174656408244163636f756e744964244163636f756e74496404250120436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e205b6f776e65722c20636f6e74726163745d1c4576696374656408244163636f756e74496410626f6f6c1ce420436f6e747261637420686173206265656e206576696374656420616e64206973206e6f7720696e20746f6d6273746f6e652073746174652e58205b636f6e74726163742c20746f6d6273746f6e655d042024202320506172616d73000d01202d2060636f6e7472616374603a20604163636f756e744964603a20546865206163636f756e74204944206f6620746865206576696374656420636f6e74726163742e3501202d2060746f6d6273746f6e65603a2060626f6f6c603a205472756520696620746865206576696374656420636f6e7472616374206c65667420626568696e64206120746f6d6273746f6e652e20526573746f72656410244163636f756e744964244163636f756e74496410486173681c42616c616e636524c020526573746f726174696f6e20666f72206120636f6e747261637420686173206265656e207375636365737366756c2ea4205b646f6e6f722c20646573742c20636f64655f686173682c2072656e745f616c6c6f77616e63655d042024202320506172616d7300f4202d2060646f6e6f72603a20604163636f756e744964603a204163636f756e74204944206f662074686520726573746f72696e6720636f6e7472616374ec202d206064657374603a20604163636f756e744964603a204163636f756e74204944206f662074686520726573746f72656420636f6e7472616374e8202d2060636f64655f68617368603a206048617368603a20436f64652068617368206f662074686520726573746f72656420636f6e74726163741901202d206072656e745f616c6c6f77616e63653a206042616c616e6365603a2052656e7420616c6c6f77616e6365206f662074686520726573746f72656420636f6e747261637428436f646553746f72656404104861736808b820436f646520776974682074686520737065636966696564206861736820686173206265656e2073746f7265642e30205b636f64655f686173685d3c5363686564756c6555706461746564040c75333204c820547269676765726564207768656e207468652063757272656e74205b7363686564756c655d20697320757064617465642e44436f6e7472616374457865637574696f6e08244163636f756e7449641c5665633c75383e08090120416e206576656e74206465706f73697465642075706f6e20657865637574696f6e206f66206120636f6e74726163742066726f6d20746865206163636f756e742e40205b6163636f756e742c20646174615d204c5369676e6564436c61696d48616e646963617038543a3a426c6f636b4e756d626572100200000010e0204e756d626572206f6620626c6f636b2064656c617920616e2065787472696e73696320636c61696d20737572636861726765206861732e000d01205768656e20636c61696d207375726368617267652069732063616c6c656420627920616e2065787472696e736963207468652072656e7420697320636865636b65646820666f722063757272656e745f626c6f636b202d2064656c617940546f6d6273746f6e654465706f7369743042616c616e63654f663c543e4000a0acb903000000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f2067656e6572617465206120746f6d6273746f6e652e4453746f7261676553697a654f66667365740c753332100800000018710120412073697a65206f666673657420666f7220616e20636f6e74726163742e2041206a7573742063726561746564206163636f756e74207769746820756e746f75636865642073746f726167652077696c6c20686176652074686174e0206d756368206f662073746f726167652066726f6d20746865207065727370656374697665206f66207468652073746174652072656e742e006101205468697320697320612073696d706c652077617920746f20656e73757265207468617420636f6e747261637473207769746820656d7074792073746f72616765206576656e7475616c6c79206765742064656c657465646501206279206d616b696e67207468656d207061792072656e742e2054686973206372656174657320616e20696e63656e7469766520746f2072656d6f7665207468656d206561726c7920696e206f7264657220746f2073617665182072656e742e2c52656e74427974654665653042616c616e63654f663c543e4000286bee000000000000000000000000043501205072696365206f6620612062797465206f662073746f7261676520706572206f6e6520626c6f636b20696e74657276616c2e2053686f756c642062652067726561746572207468616e20302e4452656e744465706f7369744f66667365743042616c616e63654f663c543e400010a5d4e800000000000000000000001c05012054686520616d6f756e74206f662066756e6473206120636f6e74726163742073686f756c64206465706f73697420696e206f7264657220746f206f6666736574582074686520636f7374206f66206f6e6520627974652e006901204c6574277320737570706f736520746865206465706f73697420697320312c303030204255202862616c616e636520756e697473292f6279746520616e64207468652072656e7420697320312042552f627974652f6461792c5901207468656e206120636f6e7472616374207769746820312c3030302c3030302042552074686174207573657320312c303030206279746573206f662073746f7261676520776f756c6420706179206e6f2072656e742e4d0120427574206966207468652062616c616e6365207265647563656420746f203530302c30303020425520616e64207468652073746f7261676520737461796564207468652073616d6520617420312c3030302c78207468656e20697420776f756c6420706179203530302042552f6461792e3c5375726368617267655265776172643042616c616e63654f663c543e40005cb2ec22000000000000000000000008e4205265776172642074686174206973207265636569766564206279207468652070617274792077686f736520746f75636820686173206c65646820746f2072656d6f76616c206f66206120636f6e74726163742e204d617844657074680c753332102000000008310120546865206d6178696d756d206e657374696e67206c6576656c206f6620612063616c6c2f696e7374616e746961746520737461636b2e204120726561736f6e61626c652064656661756c74382076616c7565206973203130302e304d617856616c756553697a650c753332100040000004390120546865206d6178696d756d2073697a65206f6620612073746f726167652076616c756520696e2062797465732e204120726561736f6e61626c652064656661756c74206973203136204b69422e4858496e76616c69645363686564756c6556657273696f6e0405012041206e6577207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652063757272656e74206f6e652e54496e76616c6964537572636861726765436c61696d04550120416e206f726967696e206d757374206265207369676e6564206f7220696e686572656e7420616e6420617578696c696172792073656e646572206f6e6c792070726f7669646564206f6e20696e686572656e742e54496e76616c6964536f75726365436f6e747261637404dc2043616e6e6f7420726573746f72652066726f6d206e6f6e6578697374696e67206f7220746f6d6273746f6e6520636f6e74726163742e68496e76616c696444657374696e6174696f6e436f6e747261637404c42043616e6e6f7420726573746f726520746f206e6f6e6578697374696e67206f7220616c69766520636f6e74726163742e40496e76616c6964546f6d6273746f6e65046020546f6d6273746f6e657320646f6e2774206d617463682e54496e76616c6964436f6e74726163744f726967696e04bc20416e206f726967696e20547269654964207772697474656e20696e207468652063757272656e7420626c6f636b2e204f75744f6647617304bc2054686520657865637574656420636f6e7472616374206578686175737465642069747320676173206c696d69742e504f7574707574427566666572546f6f536d616c6c04050120546865206f75747075742062756666657220737570706c69656420746f206120636f6e7472616374204150492063616c6c2077617320746f6f20736d616c6c2e6442656c6f7753756273697374656e63655468726573686f6c6410210120506572666f726d696e672074686520726571756573746564207472616e7366657220776f756c6420686176652062726f756768742074686520636f6e74726163742062656c6f773d01207468652073756273697374656e6365207468726573686f6c642e204e6f207472616e7366657220697320616c6c6f77656420746f20646f207468697320696e206f7264657220746f20616c6c6f77450120666f72206120746f6d6273746f6e6520746f20626520637265617465642e2055736520607365616c5f7465726d696e6174656020746f2072656d6f7665206120636f6e747261637420776974686f757470206c656176696e67206120746f6d6273746f6e6520626568696e642e504e6577436f6e74726163744e6f7446756e64656408390120546865206e65776c79206372656174656420636f6e74726163742069732062656c6f77207468652073756273697374656e6365207468726573686f6c6420616674657220657865637574696e6721012069747320636f6e74727563746f722e204e6f20636f6e7472616374732061726520616c6c6f77656420746f2065786973742062656c6f772074686174207468726573686f6c642e385472616e736665724661696c65640c250120506572666f726d696e672074686520726571756573746564207472616e73666572206661696c656420666f72206120726561736f6e206f726967696e6174696e6720696e2074686531012063686f73656e2063757272656e637920696d706c656d656e746174696f6e206f66207468652072756e74696d652e204d6f73742070726f6261626c79207468652062616c616e63652069738c20746f6f206c6f77206f72206c6f636b732061726520706c61636564206f6e2069742e4c4d617843616c6c44657074685265616368656408250120506572666f726d696e6720612063616c6c207761732064656e6965642062656361757365207468652063616c6c696e67206465707468207265616368656420746865206c696d697498206f6620776861742069732073706563696669656420696e20746865207363686564756c652e2c4e6f7443616c6c61626c650831012054686520636f6e74726163742074686174207761732063616c6c656420697320656974686572206e6f20636f6e747261637420617420616c6c20286120706c61696e206163636f756e74294c206f72206973206120746f6d6273746f6e652e30436f6465546f6f4c617267650455012054686520636f646520737570706c69656420746f20607075745f636f646560206578636565647320746865206c696d69742073706563696669656420696e207468652063757272656e74207363686564756c652e30436f64654e6f74466f756e6404c8204e6f20636f646520636f756c6420626520666f756e642061742074686520737570706c69656420636f646520686173682e2c4f75744f66426f756e6473042901204120627566666572206f757473696465206f662073616e64626f78206d656d6f7279207761732070617373656420746f206120636f6e7472616374204150492066756e6374696f6e2e384465636f64696e674661696c6564042d0120496e7075742070617373656420746f206120636f6e7472616374204150492066756e6374696f6e206661696c656420746f206465636f646520617320657870656374656420747970652e3c436f6e747261637454726170706564048c20436f6e7472616374207472617070656420647572696e6720657865637574696f6e2e105375646f01105375646f040c4b6579010030543a3a4163636f756e74496480000000000000000000000000000000000000000000000000000000000000000004842054686520604163636f756e74496460206f6620746865207375646f206b65792e0110107375646f041063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e2839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e547375646f5f756e636865636b65645f776569676874081063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e1c5f776569676874185765696768742839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e310120546869732066756e6374696f6e20646f6573206e6f7420636865636b2074686520776569676874206f66207468652063616c6c2c20616e6420696e737465616420616c6c6f777320746865b4205375646f207573657220746f20737065636966792074686520776569676874206f66207468652063616c6c2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292ed0202d2054686520776569676874206f6620746869732063616c6c20697320646566696e6564206279207468652063616c6c65722e302023203c2f7765696768743e1c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652475012041757468656e74696361746573207468652063757272656e74207375646f206b657920616e6420736574732074686520676976656e204163636f756e7449642028606e6577602920617320746865206e6577207375646f206b65792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e1c7375646f5f6173080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e2c51012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c207769746820605369676e656460206f726967696e2066726f6d44206120676976656e206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e010c14537564696404384469737061746368526573756c7404842041207375646f206a75737420746f6f6b20706c6163652e205b726573756c745d284b65794368616e67656404244163636f756e74496404f820546865205b7375646f65725d206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e285375646f4173446f6e650410626f6f6c04842041207375646f206a75737420746f6f6b20706c6163652e205b726573756c745d00042c526571756972655375646f04802053656e646572206d75737420626520746865205375646f206163636f756e7420496d4f6e6c696e650120496d4f6e6c696e6510384865617274626561744166746572010038543a3a426c6f636b4e756d62657210000000001831012054686520626c6f636b206e756d6265722061667465722077686963682069742773206f6b20746f2073656e64206865617274626561747320696e2063757272656e742073657373696f6e2e0011012041742074686520626567696e6e696e67206f6620656163682073657373696f6e20776520736574207468697320746f20612076616c756520746861742073686f756c64d02066616c6c20726f7567686c7920696e20746865206d6964646c65206f66207468652073657373696f6e206475726174696f6e2e010120546865206964656120697320746f206669727374207761697420666f72207468652076616c696461746f727320746f2070726f64756365206120626c6f636b390120696e207468652063757272656e742073657373696f6e2c20736f20746861742074686520686561727462656174206c61746572206f6e2077696c6c206e6f74206265206e65636573736172792e104b65797301004c5665633c543a3a417574686f7269747949643e040004d0205468652063757272656e7420736574206f66206b6579732074686174206d61792069737375652061206865617274626561742e485265636569766564486561727462656174730002053053657373696f6e496e6465782441757468496e6465781c5665633c75383e05040008f020466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206041757468496e6465786020746f8020606f6666636861696e3a3a4f70617175654e6574776f726b5374617465602e38417574686f726564426c6f636b730102053053657373696f6e496e64657838543a3a56616c696461746f7249640c75333205100000000008150120466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f662060543a3a56616c696461746f7249646020746f20746865c8206e756d626572206f6620626c6f636b7320617574686f7265642062792074686520676976656e20617574686f726974792e0104246865617274626561740824686561727462656174644865617274626561743c543a3a426c6f636b4e756d6265723e285f7369676e6174757265bc3c543a3a417574686f7269747949642061732052756e74696d654170705075626c69633e3a3a5369676e6174757265282c2023203c7765696768743e2101202d20436f6d706c65786974793a20604f284b202b20452960207768657265204b206973206c656e677468206f6620604b6579736020616e642045206973206c656e677468206f66b4202020604865617274626561742e6e6574776f726b5f73746174652e65787465726e616c5f6164647265737360008c2020202d20604f284b29603a206465636f64696e67206f66206c656e67746820604b60b02020202d20604f284529603a206465636f64696e672f656e636f64696e67206f66206c656e677468206045603d01202d20446252656164733a2070616c6c65745f73657373696f6e206056616c696461746f7273602c2070616c6c65745f73657373696f6e206043757272656e74496e646578602c20604b657973602c5c202020605265636569766564486561727462656174736084202d2044625772697465733a206052656365697665644865617274626561747360302023203c2f7765696768743e010c444865617274626561745265636569766564042c417574686f72697479496404fc2041206e657720686561727462656174207761732072656365697665642066726f6d2060417574686f72697479496460205b617574686f726974795f69645d1c416c6c476f6f640004d42041742074686520656e64206f66207468652073657373696f6e2c206e6f206f6666656e63652077617320636f6d6d69747465642e2c536f6d654f66666c696e6504605665633c4964656e74696669636174696f6e5475706c653e0435012041742074686520656e64206f66207468652073657373696f6e2c206174206c65617374206f6e652076616c696461746f722077617320666f756e6420746f206265205b6f66666c696e655d2e000828496e76616c69644b65790464204e6f6e206578697374656e74207075626c6963206b65792e4c4475706c6963617465644865617274626561740458204475706c696361746564206865617274626561742e48417574686f72697479446973636f76657279000100000000204f6666656e63657301204f6666656e636573101c5265706f727473000105345265706f727449644f663c543ed04f6666656e636544657461696c733c543a3a4163636f756e7449642c20543a3a4964656e74696669636174696f6e5475706c653e00040004490120546865207072696d61727920737472756374757265207468617420686f6c647320616c6c206f6666656e6365207265636f726473206b65796564206279207265706f7274206964656e746966696572732e4044656665727265644f6666656e6365730100645665633c44656665727265644f6666656e63654f663c543e3e0400086501204465666572726564207265706f72747320746861742068617665206265656e2072656a656374656420627920746865206f6666656e63652068616e646c657220616e64206e65656420746f206265207375626d6974746564442061742061206c617465722074696d652e58436f6e63757272656e745265706f727473496e646578010205104b696e64384f706171756554696d65536c6f74485665633c5265706f727449644f663c543e3e050400042901204120766563746f72206f66207265706f727473206f66207468652073616d65206b696e6420746861742068617070656e6564206174207468652073616d652074696d6520736c6f742e485265706f72747342794b696e64496e646578010105104b696e641c5665633c75383e00040018110120456e756d65726174657320616c6c207265706f727473206f662061206b696e6420616c6f6e672077697468207468652074696d6520746865792068617070656e65642e00bc20416c6c207265706f7274732061726520736f72746564206279207468652074696d65206f66206f6666656e63652e004901204e6f74652074686174207468652061637475616c2074797065206f662074686973206d617070696e6720697320605665633c75383e602c207468697320697320626563617573652076616c756573206f66690120646966666572656e7420747970657320617265206e6f7420737570706f7274656420617420746865206d6f6d656e7420736f2077652061726520646f696e6720746865206d616e75616c2073657269616c697a6174696f6e2e010001041c4f6666656e63650c104b696e64384f706171756554696d65536c6f7410626f6f6c10550120546865726520697320616e206f6666656e6365207265706f72746564206f662074686520676976656e20606b696e64602068617070656e656420617420746865206073657373696f6e5f696e6465786020616e644d0120286b696e642d7370656369666963292074696d6520736c6f742e2054686973206576656e74206973206e6f74206465706f736974656420666f72206475706c696361746520736c61736865732e206c6173741d0120656c656d656e7420696e64696361746573206f6620746865206f6666656e636520776173206170706c69656420287472756529206f7220717565756564202866616c736529206c205b6b696e642c2074696d65736c6f742c206170706c6965645d2e000028486973746f726963616c00000000006052616e646f6d6e657373436f6c6c656374697665466c6970016052616e646f6d6e657373436f6c6c656374697665466c6970043852616e646f6d4d6174657269616c0100305665633c543a3a486173683e04000c610120536572696573206f6620626c6f636b20686561646572732066726f6d20746865206c61737420383120626c6f636b73207468617420616374732061732072616e646f6d2073656564206d6174657269616c2e2054686973610120697320617272616e67656420617320612072696e672062756666657220776974682060626c6f636b5f6e756d626572202520383160206265696e672074686520696e64657820696e746f20746865206056656360206f664420746865206f6c6465737420686173682e0100000000204964656e7469747901204964656e7469747910284964656e746974794f6600010530543a3a4163636f756e74496468526567697374726174696f6e3c42616c616e63654f663c543e3e0004000c210120496e666f726d6174696f6e20746861742069732070657274696e656e7420746f206964656e746966792074686520656e7469747920626568696e6420616e206163636f756e742e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e1c53757065724f6600010230543a3a4163636f756e7449645028543a3a4163636f756e7449642c204461746129000400086101205468652073757065722d6964656e74697479206f6620616e20616c7465726e6174697665202273756222206964656e7469747920746f676574686572207769746820697473206e616d652c2077697468696e2074686174510120636f6e746578742e20496620746865206163636f756e74206973206e6f7420736f6d65206f74686572206163636f756e742773207375622d6964656e746974792c207468656e206a75737420604e6f6e65602e18537562734f6601010530543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e290044000000000000000000000000000000000014b820416c7465726e6174697665202273756222206964656e746974696573206f662074686973206163636f756e742e001d0120546865206669727374206974656d20697320746865206465706f7369742c20746865207365636f6e64206973206120766563746f72206f6620746865206163636f756e74732e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e28526567697374726172730100d85665633c4f7074696f6e3c526567697374726172496e666f3c42616c616e63654f663c543e2c20543a3a4163636f756e7449643e3e3e0400104d012054686520736574206f6620726567697374726172732e204e6f7420657870656374656420746f206765742076657279206269672061732063616e206f6e6c79206265206164646564207468726f7567682061a8207370656369616c206f726967696e20286c696b656c79206120636f756e63696c206d6f74696f6e292e0029012054686520696e64657820696e746f20746869732063616e206265206361737420746f2060526567697374726172496e6465786020746f2067657420612076616c69642076616c75652e013c346164645f726567697374726172041c6163636f756e7430543a3a4163636f756e744964347c2041646420612072656769737472617220746f207468652073797374656d2e00010120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060543a3a5265676973747261724f726967696e602e00ac202d20606163636f756e74603a20746865206163636f756e74206f6620746865207265676973747261722e009820456d6974732060526567697374726172416464656460206966207375636365737366756c2e002c2023203c7765696768743e2901202d20604f2852296020776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e64656420616e6420636f64652d626f756e646564292e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e307365745f6964656e746974790410696e666f304964656e74697479496e666f4c2d012053657420616e206163636f756e742773206964656e7469747920696e666f726d6174696f6e20616e6420726573657276652074686520617070726f707269617465206465706f7369742e00590120496620746865206163636f756e7420616c726561647920686173206964656e7469747920696e666f726d6174696f6e2c20746865206465706f7369742069732074616b656e2061732070617274207061796d656e745420666f7220746865206e6577206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0090202d2060696e666f603a20546865206964656e7469747920696e666f726d6174696f6e2e008c20456d69747320604964656e7469747953657460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2858202b205827202b2052296021012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e64656429e42020202d20776865726520605260206a756467656d656e74732d636f756e7420287265676973747261722d636f756e742d626f756e6465642984202d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e2501202d204f6e652073746f72616765206d75746174696f6e2028636f6465632d7265616420604f285827202b205229602c20636f6465632d777269746520604f2858202b20522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e207365745f73756273041073756273645665633c28543a3a4163636f756e7449642c2044617461293e54902053657420746865207375622d6163636f756e7473206f66207468652073656e6465722e005901205061796d656e743a20416e79206167677265676174652062616c616e63652072657365727665642062792070726576696f757320607365745f73756273602063616c6c732077696c6c2062652072657475726e6564310120616e6420616e20616d6f756e7420605375624163636f756e744465706f736974602077696c6c20626520726573657276656420666f722065616368206974656d20696e206073756273602e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e00b4202d206073756273603a20546865206964656e74697479277320286e657729207375622d6163636f756e74732e002c2023203c7765696768743e34202d20604f2850202b20532960e82020202d20776865726520605060206f6c642d737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e88202d204174206d6f7374206f6e652062616c616e6365206f7065726174696f6e732e18202d2044423ae02020202d206050202b2053602073746f72616765206d75746174696f6e732028636f64656320636f6d706c657869747920604f2831296029c02020202d204f6e652073746f7261676520726561642028636f64656320636f6d706c657869747920604f28502960292ec42020202d204f6e652073746f726167652077726974652028636f64656320636f6d706c657869747920604f28532960292ed42020202d204f6e652073746f726167652d6578697374732028604964656e746974794f663a3a636f6e7461696e735f6b657960292e302023203c2f7765696768743e38636c6561725f6964656e7469747900483d0120436c65617220616e206163636f756e742773206964656e7469747920696e666f20616e6420616c6c207375622d6163636f756e747320616e642072657475726e20616c6c206465706f736974732e00f0205061796d656e743a20416c6c2072657365727665642062616c616e636573206f6e20746865206163636f756e74206172652072657475726e65642e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e009c20456d69747320604964656e74697479436c656172656460206966207375636365737366756c2e002c2023203c7765696768743e44202d20604f2852202b2053202b20582960d02020202d20776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e25012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e646564292e8c202d204f6e652062616c616e63652d756e72657365727665206f7065726174696f6e2ecc202d206032602073746f7261676520726561647320616e64206053202b2032602073746f726167652064656c6574696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e44726571756573745f6a756467656d656e7408247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e1c6d61785f66656554436f6d706163743c42616c616e63654f663c543e3e5c9820526571756573742061206a756467656d656e742066726f6d2061207265676973747261722e005901205061796d656e743a204174206d6f737420606d61785f666565602077696c6c20626520726573657276656420666f72207061796d656e7420746f2074686520726567697374726172206966206a756467656d656e741c20676976656e2e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e002101202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973207265717565737465642e5901202d20606d61785f666565603a20546865206d6178696d756d206665652074686174206d617920626520706169642e20546869732073686f756c64206a757374206265206175746f2d706f70756c617465642061733a0034206060606e6f636f6d70696c65bc2053656c663a3a7265676973747261727328292e676574287265675f696e646578292e756e7772617028292e666565102060606000a820456d69747320604a756467656d656e7452657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2858202b205229602e34202d204f6e65206576656e742e302023203c2f7765696768743e3863616e63656c5f7265717565737404247265675f696e64657838526567697374726172496e646578446c2043616e63656c20612070726576696f757320726571756573742e00fc205061796d656e743a20412070726576696f75736c79207265736572766564206465706f7369742069732072657475726e6564206f6e20737563636573732e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e004901202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206e6f206c6f6e676572207265717565737465642e00b020456d69747320604a756467656d656e74556e72657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e8c202d204f6e652073746f72616765206d75746174696f6e20604f2852202b205829602e30202d204f6e65206576656e74302023203c2f7765696768743e1c7365745f6665650814696e6465785c436f6d706163743c526567697374726172496e6465783e0c66656554436f6d706163743c42616c616e63654f663c543e3e341d0120536574207468652066656520726571756972656420666f722061206a756467656d656e7420746f206265207265717565737465642066726f6d2061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e58202d2060666565603a20746865206e6577206665652e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e333135202b2052202a20302e33323920c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e387365745f6163636f756e745f69640814696e6465785c436f6d706163743c526567697374726172496e6465783e0c6e657730543a3a4163636f756e74496434c0204368616e676520746865206163636f756e74206173736f63696174656420776974682061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e74202d20606e6577603a20746865206e6577206163636f756e742049442e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee4202d2042656e63686d61726b3a20382e383233202b2052202a20302e333220c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e287365745f6669656c64730814696e6465785c436f6d706163743c526567697374726172496e6465783e186669656c6473384964656e746974794669656c647334ac2053657420746865206669656c6420696e666f726d6174696f6e20666f722061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e1101202d20606669656c6473603a20746865206669656c64732074686174207468652072656769737472617220636f6e6365726e73207468656d73656c76657320776974682e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e343634202b2052202a20302e33323520c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e4470726f766964655f6a756467656d656e740c247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365246a756467656d656e745c4a756467656d656e743c42616c616e63654f663c543e3e4cbc2050726f766964652061206a756467656d656e7420666f7220616e206163636f756e742773206964656e746974792e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74b4206f6620746865207265676973747261722077686f736520696e64657820697320607265675f696e646578602e002501202d20607265675f696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206265696e67206d6164652e5901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e4d01202d20606a756467656d656e74603a20746865206a756467656d656e74206f662074686520726567697374726172206f6620696e64657820607265675f696e646578602061626f75742060746172676574602e009820456d69747320604a756467656d656e74476976656e60206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e88202d204f6e652062616c616e63652d7472616e73666572206f7065726174696f6e2e98202d20557020746f206f6e65206163636f756e742d6c6f6f6b7570206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2852202b205829602e34202d204f6e65206576656e742e302023203c2f7765696768743e346b696c6c5f6964656e7469747904187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654c45012052656d6f766520616e206163636f756e742773206964656e7469747920616e64207375622d6163636f756e7420696e666f726d6174696f6e20616e6420736c61736820746865206465706f736974732e006501205061796d656e743a2052657365727665642062616c616e6365732066726f6d20607365745f737562736020616e6420607365745f6964656e74697479602061726520736c617368656420616e642068616e646c656420627949012060536c617368602e20566572696669636174696f6e2072657175657374206465706f7369747320617265206e6f742072657475726e65643b20746865792073686f756c642062652063616e63656c6c656484206d616e75616c6c79207573696e67206063616e63656c5f72657175657374602e00fc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206d617463682060543a3a466f7263654f726967696e602e005901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e009820456d69747320604964656e746974794b696c6c656460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2852202b2053202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e74202d206053202b2032602073746f72616765206d75746174696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e1c6164645f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365106461746110446174611cb0204164642074686520676976656e206163636f756e7420746f207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656e616d655f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651064617461104461746110d020416c74657220746865206173736f636961746564206e616d65206f662074686520676976656e207375622d6163636f756e742e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656d6f76655f737562040c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651cc42052656d6f76652074686520676976656e206163636f756e742066726f6d207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e20717569745f7375620028902052656d6f7665207468652073656e6465722061732061207375622d6163636f756e742e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c206265207265706174726961746564b820746f207468652073656e64657220282a6e6f742a20746865206f726967696e616c206465706f7369746f72292e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206861766520612072656769737465726564402073757065722d6964656e746974792e004901204e4f54453a20546869732073686f756c64206e6f74206e6f726d616c6c7920626520757365642c206275742069732070726f766964656420696e207468652063617365207468617420746865206e6f6e2d150120636f6e74726f6c6c6572206f6620616e206163636f756e74206973206d616c6963696f75736c7920726567697374657265642061732061207375622d6163636f756e742e01282c4964656e7469747953657404244163636f756e7449640409012041206e616d652077617320736574206f72207265736574202877686963682077696c6c2072656d6f766520616c6c206a756467656d656e7473292e205b77686f5d3c4964656e74697479436c656172656408244163636f756e7449641c42616c616e6365040d012041206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e205b77686f2c206465706f7369745d384964656e746974794b696c6c656408244163636f756e7449641c42616c616e63650405012041206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e205b77686f2c206465706f7369745d484a756467656d656e7452657175657374656408244163636f756e74496438526567697374726172496e64657804fc2041206a756467656d656e74207761732061736b65642066726f6d2061207265676973747261722e205b77686f2c207265676973747261725f696e6465785d504a756467656d656e74556e72657175657374656408244163636f756e74496438526567697374726172496e64657804e82041206a756467656d656e74207265717565737420776173207265747261637465642e205b77686f2c207265676973747261725f696e6465785d384a756467656d656e74476976656e08244163636f756e74496438526567697374726172496e6465780401012041206a756467656d656e742077617320676976656e2062792061207265676973747261722e205b7461726765742c207265676973747261725f696e6465785d3852656769737472617241646465640438526567697374726172496e64657804a4204120726567697374726172207761732061646465642e205b7265676973747261725f696e6465785d405375624964656e7469747941646465640c244163636f756e744964244163636f756e7449641c42616c616e6365044d012041207375622d6964656e746974792077617320616464656420746f20616e206964656e7469747920616e6420746865206465706f73697420706169642e205b7375622c206d61696e2c206465706f7369745d485375624964656e7469747952656d6f7665640c244163636f756e744964244163636f756e7449641c42616c616e6365080d012041207375622d6964656e74697479207761732072656d6f7665642066726f6d20616e206964656e7469747920616e6420746865206465706f7369742066726565642e54205b7375622c206d61696e2c206465706f7369745d485375624964656e746974795265766f6b65640c244163636f756e744964244163636f756e7449641c42616c616e6365081d012041207375622d6964656e746974792077617320636c65617265642c20616e642074686520676976656e206465706f7369742072657061747269617465642066726f6d207468652101206d61696e206964656e74697479206163636f756e7420746f20746865207375622d6964656e74697479206163636f756e742e205b7375622c206d61696e2c206465706f7369745d183042617369634465706f7369743042616c616e63654f663c543e400080c6a47e8d0300000000000000000004d82054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564206964656e746974792e304669656c644465706f7369743042616c616e63654f663c543e4000a031a95fe300000000000000000000042d012054686520616d6f756e742068656c64206f6e206465706f73697420706572206164646974696f6e616c206669656c6420666f7220612072656769737465726564206964656e746974792e445375624163636f756e744465706f7369743042616c616e63654f663c543e400080f420e6b5000000000000000000000c65012054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564207375626163636f756e742e20546869732073686f756c64206163636f756e7420666f7220746865206661637471012074686174206f6e652073746f72616765206974656d27732076616c75652077696c6c20696e637265617365206279207468652073697a65206f6620616e206163636f756e742049442c20616e642074686572652077696c6c206265290120616e6f746865722074726965206974656d2077686f73652076616c7565206973207468652073697a65206f6620616e206163636f756e7420494420706c75732033322062797465732e384d61785375624163636f756e74730c7533321064000000040d0120546865206d6178696d756d206e756d626572206f66207375622d6163636f756e747320616c6c6f77656420706572206964656e746966696564206163636f756e742e4c4d61784164646974696f6e616c4669656c64730c7533321064000000086501204d6178696d756d206e756d626572206f66206164646974696f6e616c206669656c64732074686174206d61792062652073746f72656420696e20616e2049442e204e656564656420746f20626f756e642074686520492f4fe020726571756972656420746f2061636365737320616e206964656e746974792c206275742063616e2062652070726574747920686967682e344d6178526567697374726172730c7533321014000000085101204d61786d696d756d206e756d626572206f66207265676973747261727320616c6c6f77656420696e207468652073797374656d2e204e656564656420746f20626f756e642074686520636f6d706c65786974797c206f662c20652e672e2c207570646174696e67206a756467656d656e74732e4048546f6f4d616e795375624163636f756e7473046020546f6f206d616e7920737562732d6163636f756e74732e204e6f74466f756e640454204163636f756e742069736e277420666f756e642e204e6f744e616d65640454204163636f756e742069736e2774206e616d65642e28456d707479496e646578043420456d70747920696e6465782e284665654368616e676564044020466565206973206368616e6765642e284e6f4964656e74697479044c204e6f206964656e7469747920666f756e642e3c537469636b794a756467656d656e74044820537469636b79206a756467656d656e742e384a756467656d656e74476976656e0444204a756467656d656e7420676976656e2e40496e76616c69644a756467656d656e74044c20496e76616c6964206a756467656d656e742e30496e76616c6964496e64657804582054686520696e64657820697320696e76616c69642e34496e76616c6964546172676574045c205468652074617267657420697320696e76616c69642e34546f6f4d616e794669656c6473047020546f6f206d616e79206164646974696f6e616c206669656c64732e44546f6f4d616e795265676973747261727304ec204d6178696d756d20616d6f756e74206f66207265676973747261727320726561636865642e2043616e6e6f742061646420616e79206d6f72652e38416c7265616479436c61696d65640474204163636f756e7420494420697320616c7265616479206e616d65642e184e6f7453756204742053656e646572206973206e6f742061207375622d6163636f756e742e204e6f744f776e6564048c205375622d6163636f756e742069736e2774206f776e65642062792073656e6465722e1c536f6369657479011c536f6369657479401c466f756e646572000030543a3a4163636f756e7449640400044820546865206669727374206d656d6265722e1452756c657300001c543a3a48617368040008510120412068617368206f66207468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e2043616e206f6e6c7920626520736574206f6e636520616e6454206f6e6c792062792074686520666f756e6465722e2843616e6469646174657301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e0400043901205468652063757272656e7420736574206f662063616e646964617465733b206269646465727320746861742061726520617474656d7074696e6720746f206265636f6d65206d656d626572732e4c53757370656e64656443616e6469646174657300010530543a3a4163636f756e744964e42842616c616e63654f663c542c20493e2c204269644b696e643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e2900040004842054686520736574206f662073757370656e6465642063616e646964617465732e0c506f7401003c42616c616e63654f663c542c20493e400000000000000000000000000000000004410120416d6f756e74206f66206f7572206163636f756e742062616c616e63652074686174206973207370656369666963616c6c7920666f7220746865206e65787420726f756e642773206269642873292e1048656164000030543a3a4163636f756e744964040004e820546865206d6f7374207072696d6172792066726f6d20746865206d6f737420726563656e746c7920617070726f766564206d656d626572732e1c4d656d626572730100445665633c543a3a4163636f756e7449643e04000494205468652063757272656e7420736574206f66206d656d626572732c206f7264657265642e4053757370656e6465644d656d6265727301010530543a3a4163636f756e74496410626f6f6c00040004782054686520736574206f662073757370656e646564206d656d626572732e104269647301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e040004e8205468652063757272656e7420626964732c2073746f726564206f726465726564206279207468652076616c7565206f6620746865206269642e20566f756368696e6700010530543a3a4163636f756e74496438566f756368696e6753746174757300040004e4204d656d626572732063757272656e746c7920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e1c5061796f75747301010530543a3a4163636f756e744964985665633c28543a3a426c6f636b4e756d6265722c2042616c616e63654f663c542c20493e293e000400044d012050656e64696e67207061796f7574733b206f72646572656420627920626c6f636b206e756d6265722c20776974682074686520616d6f756e7420746861742073686f756c642062652070616964206f75742e1c537472696b657301010530543a3a4163636f756e7449642c537472696b65436f756e7400100000000004dc20546865206f6e676f696e67206e756d626572206f66206c6f73696e6720766f746573206361737420627920746865206d656d6265722e14566f74657300020530543a3a4163636f756e74496430543a3a4163636f756e74496410566f746505040004d020446f75626c65206d61702066726f6d2043616e646964617465202d3e20566f746572202d3e20284d617962652920566f74652e20446566656e646572000030543a3a4163636f756e744964040004c42054686520646566656e64696e67206d656d6265722063757272656e746c79206265696e67206368616c6c656e6765642e34446566656e646572566f74657300010530543a3a4163636f756e74496410566f7465000400046020566f74657320666f722074686520646566656e6465722e284d61784d656d6265727301000c753332100000000004dc20546865206d6178206e756d626572206f66206d656d6265727320666f722074686520736f6369657479206174206f6e652074696d652e01300c626964041476616c75653c42616c616e63654f663c542c20493e84e020412075736572206f757473696465206f662074686520736f63696574792063616e206d616b6520612062696420666f7220656e7472792e003901205061796d656e743a206043616e6469646174654465706f736974602077696c6c20626520726573657276656420666f72206d616b696e672061206269642e2049742069732072657475726e6564f0207768656e2074686520626964206265636f6d65732061206d656d6265722c206f7220696620746865206269642063616c6c732060756e626964602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a5901202d206076616c7565603a2041206f6e652074696d65207061796d656e74207468652062696420776f756c64206c696b6520746f2072656365697665207768656e206a6f696e696e672074686520736f63696574792e002c2023203c7765696768743e5501204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520726573657276652944202d2053746f726167652052656164733aec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f284329c820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d2948202d2053746f72616765205772697465733a810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3a2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6820092d204f6e65206576656e7420666f72206e6577206269642efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e14756e626964040c706f730c7533324cd82041206269646465722063616e2072656d6f76652074686569722062696420666f7220656e74727920696e746f20736f63696574792e010120427920646f696e6720736f2c20746865792077696c6c20686176652074686569722063616e646964617465206465706f7369742072657475726e6564206f728420746865792077696c6c20756e766f75636820746865697220766f75636865722e00fc205061796d656e743a2054686520626964206465706f73697420697320756e7265736572766564206966207468652075736572206d6164652061206269642e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206269646465722e003020506172616d65746572733a1901202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2077616e747320746f20756e6269642e002c2023203c7765696768743eb0204b65793a204220286c656e206f662062696473292c2058202862616c616e636520756e72657365727665290d01202d204f6e652073746f72616765207265616420616e6420777269746520746f20726574726965766520616e64207570646174652074686520626964732e204f2842294501202d20456974686572206f6e6520756e726573657276652062616c616e636520616374696f6e204f285829206f72206f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2842202b205829302023203c2f7765696768743e14766f7563680c0c77686f30543a3a4163636f756e7449641476616c75653c42616c616e63654f663c542c20493e0c7469703c42616c616e63654f663c542c20493eb045012041732061206d656d6265722c20766f75636820666f7220736f6d656f6e6520746f206a6f696e20736f636965747920627920706c6163696e67206120626964206f6e20746865697220626568616c662e005501205468657265206973206e6f206465706f73697420726571756972656420746f20766f75636820666f722061206e6577206269642c206275742061206d656d6265722063616e206f6e6c7920766f75636820666f725d01206f6e652062696420617420612074696d652e2049662074686520626964206265636f6d657320612073757370656e6465642063616e64696461746520616e6420756c74696d6174656c792072656a65637465642062794101207468652073757370656e73696f6e206a756467656d656e74206f726967696e2c20746865206d656d6265722077696c6c2062652062616e6e65642066726f6d20766f756368696e6720616761696e2e005901204173206120766f756368696e67206d656d6265722c20796f752063616e20636c61696d206120746970206966207468652063616e6469646174652069732061636365707465642e2054686973207469702077696c6c51012062652070616964206173206120706f7274696f6e206f66207468652072657761726420746865206d656d6265722077696c6c207265636569766520666f72206a6f696e696e672074686520736f63696574792e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733acc202d206077686f603a2054686520757365722077686f20796f7520776f756c64206c696b6520746f20766f75636820666f722e5101202d206076616c7565603a2054686520746f74616c2072657761726420746f2062652070616964206265747765656e20796f7520616e64207468652063616e6469646174652069662074686579206265636f6d65642061206d656d62657220696e2074686520736f63696574792e4901202d2060746970603a20596f757220637574206f662074686520746f74616c206076616c756560207061796f7574207768656e207468652063616e64696461746520697320696e64756374656420696e746f15012074686520736f63696574792e2054697073206c6172676572207468616e206076616c7565602077696c6c206265207361747572617465642075706f6e207061796f75742e002c2023203c7765696768743e0101204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d626572732944202d2053746f726167652052656164733ac820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d29090120092d204f6e652073746f72616765207265616420746f20636865636b206d656d626572206973206e6f7420616c726561647920766f756368696e672e204f283129ec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f28432948202d2053746f72616765205772697465733a0d0120092d204f6e652073746f7261676520777269746520746f20696e7365727420766f756368696e672073746174757320746f20746865206d656d6265722e204f283129810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3ac020092d204f286c6f67204d292073656172636820746f20636865636b2073656e6465722069732061206d656d6265722e2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6020092d204f6e65206576656e7420666f7220766f7563682efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e1c756e766f756368040c706f730c753332442d01204173206120766f756368696e67206d656d6265722c20756e766f7563682061206269642e2054686973206f6e6c7920776f726b73207768696c6520766f7563686564207573657220697394206f6e6c792061206269646465722028616e64206e6f7420612063616e646964617465292e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206120766f756368696e67206d656d6265722e003020506172616d65746572733a2d01202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2073686f756c6420626520756e766f75636865642e002c2023203c7765696768743e54204b65793a204220286c656e206f662062696473290901202d204f6e652073746f726167652072656164204f28312920746f20636865636b20746865207369676e6572206973206120766f756368696e67206d656d6265722eec202d204f6e652073746f72616765206d757461746520746f20726574726965766520616e64207570646174652074686520626964732e204f28422994202d204f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f284229302023203c2f7765696768743e10766f7465082463616e6469646174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c617070726f766510626f6f6c4c882041732061206d656d6265722c20766f7465206f6e20612063616e6469646174652e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733a0d01202d206063616e646964617465603a205468652063616e646964617465207468617420746865206d656d62657220776f756c64206c696b6520746f20626964206f6e2ef4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265d82020202020202020202020202020617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743ebc204b65793a204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722e58202d204f6e65206163636f756e74206c6f6f6b75702e2d01202d204f6e652073746f726167652072656164204f28432920616e64204f2843292073656172636820746f20636865636b2074686174207573657220697320612063616e6469646174652ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204329302023203c2f7765696768743e34646566656e6465725f766f7465041c617070726f766510626f6f6c408c2041732061206d656d6265722c20766f7465206f6e2074686520646566656e6465722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733af4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265a420617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743e68202d204b65793a204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e007820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d29302023203c2f7765696768743e187061796f757400504501205472616e7366657220746865206669727374206d617475726564207061796f757420666f72207468652073656e64657220616e642072656d6f76652069742066726f6d20746865207265636f7264732e006901204e4f54453a20546869732065787472696e736963206e6565647320746f2062652063616c6c6564206d756c7469706c652074696d657320746f20636c61696d206d756c7469706c65206d617475726564207061796f7574732e002101205061796d656e743a20546865206d656d6265722077696c6c20726563656976652061207061796d656e7420657175616c20746f207468656972206669727374206d61747572656478207061796f757420746f20746865697220667265652062616c616e63652e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d62657220776974684c207061796f7574732072656d61696e696e672e002c2023203c7765696768743e1d01204b65793a204d20286c656e206f66206d656d62657273292c205020286e756d626572206f66207061796f75747320666f72206120706172746963756c6172206d656d626572292501202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b207369676e65722069732061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28502920746f2067657420616c6c207061796f75747320666f722061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28312920746f20676574207468652063757272656e7420626c6f636b206e756d6265722e8c202d204f6e652063757272656e6379207472616e736665722063616c6c2e204f2858291101202d204f6e652073746f72616765207772697465206f722072656d6f76616c20746f2075706461746520746865206d656d6265722773207061796f7574732e204f285029009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2050202b205829302023203c2f7765696768743e14666f756e640c1c666f756e64657230543a3a4163636f756e7449642c6d61785f6d656d626572730c7533321472756c65731c5665633c75383e4c4c20466f756e642074686520736f63696574792e00f0205468697320697320646f6e65206173206120646973637265746520616374696f6e20696e206f7264657220746f20616c6c6f7720666f72207468651901206d6f64756c6520746f20626520696e636c7564656420696e746f20612072756e6e696e6720636861696e20616e642063616e206f6e6c7920626520646f6e65206f6e63652e001d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f466f756e6465725365744f726967696e5f2e003020506172616d65746572733a1901202d2060666f756e64657260202d20546865206669727374206d656d62657220616e642068656164206f6620746865206e65776c7920666f756e64656420736f63696574792e1501202d20606d61785f6d656d6265727360202d2054686520696e697469616c206d6178206e756d626572206f66206d656d6265727320666f722074686520736f63696574792ef4202d206072756c657360202d205468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e002c2023203c7765696768743ee0202d2054776f2073746f72616765206d75746174657320746f207365742060486561646020616e642060466f756e646572602e204f283129f4202d204f6e652073746f7261676520777269746520746f2061646420746865206669727374206d656d62657220746f20736f63696574792e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e1c756e666f756e6400348c20416e6e756c2074686520666f756e64696e67206f662074686520736f63696574792e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205369676e65642c20616e6420746865207369676e696e67206163636f756e74206d75737420626520626f74685901207468652060466f756e6465726020616e6420746865206048656164602e205468697320696d706c6965732074686174206974206d6179206f6e6c7920626520646f6e65207768656e207468657265206973206f6e6520206d656d6265722e002c2023203c7765696768743e68202d2054776f2073746f72616765207265616473204f2831292e78202d20466f75722073746f726167652072656d6f76616c73204f2831292e34202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e586a756467655f73757370656e6465645f6d656d626572080c77686f30543a3a4163636f756e7449641c666f726769766510626f6f6c6c2d0120416c6c6f772073757370656e73696f6e206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e646564206d656d6265722e00590120496620612073757370656e646564206d656d62657220697320666f72676976656e2c2077652073696d706c7920616464207468656d206261636b2061732061206d656d6265722c206e6f7420616666656374696e67cc20616e79206f6620746865206578697374696e672073746f72616765206974656d7320666f722074686174206d656d6265722e00490120496620612073757370656e646564206d656d6265722069732072656a65637465642c2072656d6f766520616c6c206173736f6369617465642073746f72616765206974656d732c20696e636c7564696e670101207468656972207061796f7574732c20616e642072656d6f766520616e7920766f7563686564206269647320746865792063757272656e746c7920686176652e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ab4202d206077686f60202d205468652073757370656e646564206d656d62657220746f206265206a75646765642e3501202d2060666f726769766560202d204120626f6f6c65616e20726570726573656e74696e672077686574686572207468652073757370656e73696f6e206a756467656d656e74206f726967696e2501202020202020202020202020202020666f726769766573202860747275656029206f722072656a6563747320286066616c7365602920612073757370656e646564206d656d6265722e002c2023203c7765696768743ea4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d6265727329f8202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e646564206d656d6265722e204f2831297101202d20557020746f206f6e652073746f72616765207772697465204f284d292077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d626572206261636b20746f20736f63696574792ef8202d20557020746f20332073746f726167652072656d6f76616c73204f28312920746f20636c65616e20757020612072656d6f766564206d656d6265722e4501202d20557020746f206f6e652073746f72616765207772697465204f2842292077697468204f2842292073656172636820746f2072656d6f766520766f7563686564206269642066726f6d20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e70202d204f6e652073746f726167652072656d6f76616c2e204f2831297c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204229302023203c2f7765696768743e646a756467655f73757370656e6465645f63616e646964617465080c77686f30543a3a4163636f756e744964246a756467656d656e74244a756467656d656e74a0350120416c6c6f772073757370656e646564206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e6465642063616e6469646174652e005d0120496620746865206a756467656d656e742069732060417070726f7665602c20776520616464207468656d20746f20736f63696574792061732061206d656d62657220776974682074686520617070726f70726961746574207061796d656e7420666f72206a6f696e696e6720736f63696574792e00550120496620746865206a756467656d656e74206973206052656a656374602c2077652065697468657220736c61736820746865206465706f736974206f6620746865206269642c20676976696e67206974206261636b110120746f2074686520736f63696574792074726561737572792c206f722077652062616e2074686520766f75636865722066726f6d20766f756368696e6720616761696e2e005d0120496620746865206a756467656d656e7420697320605265626964602c20776520707574207468652063616e646964617465206261636b20696e207468652062696420706f6f6c20616e64206c6574207468656d20676f94207468726f7567682074686520696e64756374696f6e2070726f6365737320616761696e2e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ac0202d206077686f60202d205468652073757370656e6465642063616e64696461746520746f206265206a75646765642ec4202d20606a756467656d656e7460202d2060417070726f7665602c206052656a656374602c206f7220605265626964602e002c2023203c7765696768743ef4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520616374696f6e29f0202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e6465642063616e6469646174652ec8202d204f6e652073746f726167652072656d6f76616c206f66207468652073757370656e6465642063616e6469646174652e40202d20417070726f7665204c6f676963150120092d204f6e652073746f72616765207265616420746f206765742074686520617661696c61626c6520706f7420746f2070617920757365727320776974682e204f283129dc20092d204f6e652073746f7261676520777269746520746f207570646174652074686520617661696c61626c6520706f742e204f283129e820092d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f283129b420092d204f6e652073746f72616765207265616420746f2067657420616c6c206d656d626572732e204f284d29a020092d20557020746f206f6e6520756e726573657276652063757272656e637920616374696f6e2eb020092d20557020746f2074776f206e65772073746f726167652077726974657320746f207061796f7574732e4d0120092d20557020746f206f6e652073746f726167652077726974652077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d62657220746f20736f63696574792e3c202d2052656a656374204c6f676963dc20092d20557020746f206f6e6520726570617472696174652072657365727665642063757272656e637920616374696f6e2e204f2858292d0120092d20557020746f206f6e652073746f7261676520777269746520746f2062616e2074686520766f756368696e67206d656d6265722066726f6d20766f756368696e6720616761696e2e38202d205265626964204c6f676963410120092d2053746f72616765206d75746174652077697468204f286c6f672042292062696e6172792073656172636820746f20706c616365207468652075736572206261636b20696e746f20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e5c202d204f6e652073746f726167652072656d6f76616c2e7c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2042202b205829302023203c2f7765696768743e3c7365745f6d61785f6d656d62657273040c6d61780c753332381d0120416c6c6f777320726f6f74206f726967696e20746f206368616e676520746865206d6178696d756d206e756d626572206f66206d656d6265727320696e20736f63696574792eb4204d6178206d656d6265727368697020636f756e74206d7573742062652067726561746572207468616e20312e00dc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d205f524f4f545f2e003020506172616d65746572733ae4202d20606d617860202d20546865206d6178696d756d206e756d626572206f66206d656d6265727320666f722074686520736f63696574792e002c2023203c7765696768743eb0202d204f6e652073746f7261676520777269746520746f2075706461746520746865206d61782e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e01401c466f756e64656404244163636f756e74496404e02054686520736f636965747920697320666f756e6465642062792074686520676976656e206964656e746974792e205b666f756e6465725d0c42696408244163636f756e7449641c42616c616e63650861012041206d656d6265727368697020626964206a7573742068617070656e65642e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e64207468656972206f666665729420697320746865207365636f6e642e205b63616e6469646174655f69642c206f666665725d14566f7563680c244163636f756e7449641c42616c616e6365244163636f756e7449640861012041206d656d6265727368697020626964206a7573742068617070656e656420627920766f756368696e672e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e647101207468656972206f6666657220697320746865207365636f6e642e2054686520766f756368696e67207061727479206973207468652074686972642e205b63616e6469646174655f69642c206f666665722c20766f756368696e675d244175746f556e62696404244163636f756e7449640411012041205b63616e6469646174655d207761732064726f70706564202864756520746f20616e20657863657373206f66206269647320696e207468652073797374656d292e14556e62696404244163636f756e74496404b82041205b63616e6469646174655d207761732064726f70706564202862792074686569722072657175657374292e1c556e766f75636804244163636f756e7449640401012041205b63616e6469646174655d207761732064726f70706564202862792072657175657374206f662077686f20766f756368656420666f72207468656d292e20496e64756374656408244163636f756e744964385665633c4163636f756e7449643e08590120412067726f7570206f662063616e646964617465732068617665206265656e20696e6475637465642e205468652062617463682773207072696d617279206973207468652066697273742076616c75652c20746865cc20626174636820696e2066756c6c20697320746865207365636f6e642e205b7072696d6172792c2063616e646964617465735d6053757370656e6465644d656d6265724a756467656d656e7408244163636f756e74496410626f6f6c04c820412073757370656e646564206d656d62657220686173206265656e206a75646765642e205b77686f2c206a75646765645d4843616e64696461746553757370656e64656404244163636f756e74496404842041205b63616e6469646174655d20686173206265656e2073757370656e6465643c4d656d62657253757370656e64656404244163636f756e74496404782041205b6d656d6265725d20686173206265656e2073757370656e646564284368616c6c656e67656404244163636f756e744964047c2041205b6d656d6265725d20686173206265656e206368616c6c656e67656410566f74650c244163636f756e744964244163636f756e74496410626f6f6c04c0204120766f746520686173206265656e20706c61636564205b63616e6469646174652c20766f7465722c20766f74655d30446566656e646572566f746508244163636f756e74496410626f6f6c04f0204120766f746520686173206265656e20706c6163656420666f72206120646566656e64696e67206d656d626572205b766f7465722c20766f74655d344e65774d61784d656d62657273040c75333204982041206e6577205b6d61785d206d656d62657220636f756e7420686173206265656e2073657424556e666f756e64656404244163636f756e744964048020536f636965747920697320756e666f756e6465642e205b666f756e6465725d1c4465706f736974041c42616c616e636504f020536f6d652066756e64732077657265206465706f736974656420696e746f2074686520736f6369657479206163636f756e742e205b76616c75655d1c4043616e6469646174654465706f7369743c42616c616e63654f663c542c20493e400080c6a47e8d0300000000000000000004fc20546865206d696e696d756d20616d6f756e74206f662061206465706f73697420726571756972656420666f7220612062696420746f206265206d6164652e4857726f6e6753696465446564756374696f6e3c42616c616e63654f663c542c20493e400080f420e6b5000000000000000000000855012054686520616d6f756e74206f662074686520756e70616964207265776172642074686174206765747320646564756374656420696e207468652063617365207468617420656974686572206120736b6570746963c020646f65736e277420766f7465206f7220736f6d656f6e6520766f74657320696e207468652077726f6e67207761792e284d6178537472696b65730c753332100a00000008750120546865206e756d626572206f662074696d65732061206d656d626572206d617920766f7465207468652077726f6e672077617920286f72206e6f7420617420616c6c2c207768656e207468657920617265206120736b65707469632978206265666f72652074686579206265636f6d652073757370656e6465642e2c506572696f645370656e643c42616c616e63654f663c542c20493e400000c52ebca2b1000000000000000000042d012054686520616d6f756e74206f6620696e63656e7469766520706169642077697468696e206561636820706572696f642e20446f65736e277420696e636c75646520566f7465725469702e38526f746174696f6e506572696f6438543a3a426c6f636b4e756d626572100077010004110120546865206e756d626572206f6620626c6f636b73206265747765656e2063616e6469646174652f6d656d6265727368697020726f746174696f6e20706572696f64732e3c4368616c6c656e6765506572696f6438543a3a426c6f636b4e756d626572108013030004d020546865206e756d626572206f6620626c6f636b73206265747765656e206d656d62657273686970206368616c6c656e6765732e204d6f64756c654964204d6f64756c6549642070792f736f63696504682054686520736f636965746965732773206d6f64756c65206964482c426164506f736974696f6e049020416e20696e636f727265637420706f736974696f6e207761732070726f76696465642e244e6f744d656d62657204582055736572206973206e6f742061206d656d6265722e34416c72656164794d656d6265720468205573657220697320616c72656164792061206d656d6265722e2453757370656e646564044c20557365722069732073757370656e6465642e304e6f7453757370656e646564045c2055736572206973206e6f742073757370656e6465642e204e6f5061796f7574044c204e6f7468696e6720746f207061796f75742e38416c7265616479466f756e646564046420536f636965747920616c726561647920666f756e6465642e3c496e73756666696369656e74506f74049c204e6f7420656e6f75676820696e20706f7420746f206163636570742063616e6469646174652e3c416c7265616479566f756368696e6704e8204d656d62657220697320616c726561647920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e2e2c4e6f74566f756368696e670460204d656d626572206973206e6f7420766f756368696e672e104865616404942043616e6e6f742072656d6f7665207468652068656164206f662074686520636861696e2e1c466f756e646572046c2043616e6e6f742072656d6f76652074686520666f756e6465722e28416c7265616479426964047420557365722068617320616c7265616479206d6164652061206269642e40416c726561647943616e6469646174650474205573657220697320616c726561647920612063616e6469646174652e304e6f7443616e64696461746504642055736572206973206e6f7420612063616e6469646174652e284d61784d656d62657273048420546f6f206d616e79206d656d6265727320696e2074686520736f63696574792e284e6f74466f756e646572047c205468652063616c6c6572206973206e6f742074686520666f756e6465722e1c4e6f74486561640470205468652063616c6c6572206973206e6f742074686520686561642e205265636f7665727901205265636f766572790c2c5265636f76657261626c6500010530543a3a4163636f756e744964e85265636f76657279436f6e6669673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e0004000409012054686520736574206f66207265636f76657261626c65206163636f756e747320616e64207468656972207265636f7665727920636f6e66696775726174696f6e2e404163746976655265636f76657269657300020530543a3a4163636f756e74496430543a3a4163636f756e744964e84163746976655265636f766572793c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e050400106820416374697665207265636f7665727920617474656d7074732e001501204669727374206163636f756e7420697320746865206163636f756e7420746f206265207265636f76657265642c20616e6420746865207365636f6e64206163636f756e74ac20697320746865207573657220747279696e6720746f207265636f76657220746865206163636f756e742e1450726f787900010230543a3a4163636f756e74496430543a3a4163636f756e7449640004000c9020546865206c697374206f6620616c6c6f7765642070726f7879206163636f756e74732e00f8204d61702066726f6d2074686520757365722077686f2063616e2061636365737320697420746f20746865207265636f7665726564206163636f756e742e01243061735f7265636f7665726564081c6163636f756e7430543a3a4163636f756e7449641063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e34a42053656e6420612063616c6c207468726f7567682061207265636f7665726564206163636f756e742e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a2501202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f752077616e7420746f206d616b6520612063616c6c206f6e2d626568616c662d6f662e0101202d206063616c6c603a205468652063616c6c20796f752077616e7420746f206d616b65207769746820746865207265636f7665726564206163636f756e742e002c2023203c7765696768743e94202d2054686520776569676874206f6620746865206063616c6c60202b2031302c3030302e0901202d204f6e652073746f72616765206c6f6f6b757020746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e347365745f7265636f766572656408106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e744964341d0120416c6c6f7720524f4f5420746f2062797061737320746865207265636f766572792070726f6365737320616e642073657420616e20612072657363756572206163636f756e747420666f722061206c6f7374206163636f756e74206469726563746c792e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f524f4f545f2e003020506172616d65746572733ab8202d20606c6f7374603a2054686520226c6f7374206163636f756e742220746f206265207265636f76657265642e1d01202d206072657363756572603a20546865202272657363756572206163636f756e74222077686963682063616e2063616c6c20617320746865206c6f7374206163636f756e742e002c2023203c7765696768743e64202d204f6e652073746f72616765207772697465204f28312930202d204f6e65206576656e74302023203c2f7765696768743e3c6372656174655f7265636f766572790c1c667269656e6473445665633c543a3a4163636f756e7449643e247468726573686f6c640c7531363064656c61795f706572696f6438543a3a426c6f636b4e756d6265726c5d01204372656174652061207265636f7665727920636f6e66696775726174696f6e20666f7220796f7572206163636f756e742e2054686973206d616b657320796f7572206163636f756e74207265636f76657261626c652e003101205061796d656e743a2060436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732062616c616e636549012077696c6c20626520726573657276656420666f722073746f72696e6720746865207265636f7665727920636f6e66696775726174696f6e2e2054686973206465706f7369742069732072657475726e6564bc20696e2066756c6c207768656e2074686520757365722063616c6c73206072656d6f76655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2501202d2060667269656e6473603a2041206c697374206f6620667269656e647320796f7520747275737420746f20766f75636820666f72207265636f7665727920617474656d7074732ed420202053686f756c64206265206f72646572656420616e6420636f6e7461696e206e6f206475706c69636174652076616c7565732e3101202d20607468726573686f6c64603a20546865206e756d626572206f6620667269656e64732074686174206d75737420766f75636820666f722061207265636f7665727920617474656d70741d012020206265666f726520746865206163636f756e742063616e206265207265636f76657265642e2053686f756c64206265206c657373207468616e206f7220657175616c20746f94202020746865206c656e677468206f6620746865206c697374206f6620667269656e64732e3d01202d206064656c61795f706572696f64603a20546865206e756d626572206f6620626c6f636b732061667465722061207265636f7665727920617474656d707420697320696e697469616c697a6564e820202074686174206e6565647320746f2070617373206265666f726520746865206163636f756e742063616e206265207265636f76657265642e002c2023203c7765696768743e68202d204b65793a204620286c656e206f6620667269656e6473292d01202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973206e6f7420616c7265616479207265636f76657261626c652e204f2831292eec202d204120636865636b20746861742074686520667269656e6473206c69737420697320736f7274656420616e6420756e697175652e204f2846299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f2858299c202d204f6e652073746f726167652077726974652e204f2831292e20436f646563204f2846292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e44696e6974696174655f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496458ec20496e697469617465207468652070726f6365737320666f72207265636f766572696e672061207265636f76657261626c65206163636f756e742e001d01205061796d656e743a20605265636f766572794465706f736974602062616c616e63652077696c6c20626520726573657276656420666f7220696e6974696174696e67207468652501207265636f766572792070726f636573732e2054686973206465706f7369742077696c6c20616c7761797320626520726570617472696174656420746f20746865206163636f756e74b820747279696e6720746f206265207265636f76657265642e205365652060636c6f73655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e2054686973206163636f756e7401012020206e6565647320746f206265207265636f76657261626c652028692e652e20686176652061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743ef8202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973207265636f76657261626c652e204f2846295101202d204f6e652073746f72616765207265616420746f20636865636b20746861742074686973207265636f766572792070726f63657373206861736e277420616c726561647920737461727465642e204f2831299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f285829e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831296c202d204f6e652073746f726167652077726974652e204f2831292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e38766f7563685f7265636f7665727908106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e74496464290120416c6c6f7720612022667269656e6422206f662061207265636f76657261626c65206163636f756e7420746f20766f75636820666f7220616e20616374697665207265636f76657279682070726f6365737320666f722074686174206163636f756e742e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d75737420626520612022667269656e64227420666f7220746865207265636f76657261626c65206163636f756e742e003020506172616d65746572733ad4202d20606c6f7374603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f2072657363756520746865206c6f7374206163636f756e74207468617420796f755420202077616e7420746f20766f75636820666f722e0025012054686520636f6d62696e6174696f6e206f662074686573652074776f20706172616d6574657273206d75737420706f696e7420746f20616e20616374697665207265636f76657279242070726f636573732e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629ec202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c6572206973206120667269656e642e204f286c6f6746291d01202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c657220686173206e6f7420616c726561647920766f75636865642e204f286c6f6756299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e00a420546f74616c20436f6d706c65786974793a204f2846202b206c6f6746202b2056202b206c6f675629302023203c2f7765696768743e38636c61696d5f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496450f420416c6c6f772061207375636365737366756c207265736375657220746f20636c61696d207468656972207265636f7665726564206163636f756e742e002d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061202272657363756572221d012077686f20686173207375636365737366756c6c7920636f6d706c6574656420746865206163636f756e74207265636f766572792070726f636573733a20636f6c6c6563746564310120607468726573686f6c6460206f72206d6f726520766f75636865732c20776169746564206064656c61795f706572696f646020626c6f636b732073696e636520696e6974696174696f6e2e003020506172616d65746572733a2d01202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f20636c61696d20686173206265656e207375636365737366756c6c79502020207265636f766572656420627920796f752e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205629302023203c2f7765696768743e38636c6f73655f7265636f76657279041c7265736375657230543a3a4163636f756e7449645015012041732074686520636f6e74726f6c6c6572206f662061207265636f76657261626c65206163636f756e742c20636c6f736520616e20616374697665207265636f76657279682070726f6365737320666f7220796f7572206163636f756e742e002101205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e2c20746865207265636f76657261626c65206163636f756e742077696c6c2072656365697665f820746865207265636f76657279206465706f73697420605265636f766572794465706f7369746020706c616365642062792074686520726573637565722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061f0207265636f76657261626c65206163636f756e74207769746820616e20616374697665207265636f766572792070726f6365737320666f722069742e003020506172616d65746572733a1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f207265736375652074686973207265636f76657261626c65206163636f756e742e002c2023203c7765696768743e84204b65793a205620286c656e206f6620766f756368696e6720667269656e6473293d01202d204f6e652073746f7261676520726561642f72656d6f766520746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629c0202d204f6e652062616c616e63652063616c6c20746f20726570617472696174652072657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2856202b205829302023203c2f7765696768743e3c72656d6f76655f7265636f7665727900545d012052656d6f766520746865207265636f766572792070726f6365737320666f7220796f7572206163636f756e742e205265636f7665726564206163636f756e747320617265207374696c6c2061636365737369626c652e001501204e4f54453a205468652075736572206d757374206d616b65207375726520746f2063616c6c2060636c6f73655f7265636f7665727960206f6e20616c6c206163746976650901207265636f7665727920617474656d707473206265666f72652063616c6c696e6720746869732066756e6374696f6e20656c73652069742077696c6c206661696c2e002501205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e20746865207265636f76657261626c65206163636f756e742077696c6c20756e7265736572766598207468656972207265636f7665727920636f6e66696775726174696f6e206465706f7369742ef4202860436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732900050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061e4207265636f76657261626c65206163636f756e742028692e652e206861732061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743e60204b65793a204620286c656e206f6620667269656e6473292901202d204f6e652073746f72616765207265616420746f206765742074686520707265666978206974657261746f7220666f7220616374697665207265636f7665726965732e204f2831293901202d204f6e652073746f7261676520726561642f72656d6f766520746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846299c202d204f6e652062616c616e63652063616c6c20746f20756e72657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e4063616e63656c5f7265636f7665726564041c6163636f756e7430543a3a4163636f756e7449642ce02043616e63656c20746865206162696c69747920746f20757365206061735f7265636f76657265646020666f7220606163636f756e74602e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a1901202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f75206172652061626c6520746f2063616c6c206f6e2d626568616c662d6f662e002c2023203c7765696768743e1101202d204f6e652073746f72616765206d75746174696f6e20746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e01183c5265636f766572794372656174656404244163636f756e74496404d42041207265636f766572792070726f6365737320686173206265656e2073657420757020666f7220616e205b6163636f756e745d2e445265636f76657279496e6974696174656408244163636f756e744964244163636f756e744964082d012041207265636f766572792070726f6365737320686173206265656e20696e6974696174656420666f72206c6f7374206163636f756e742062792072657363756572206163636f756e742e40205b6c6f73742c20726573637565725d3c5265636f76657279566f75636865640c244163636f756e744964244163636f756e744964244163636f756e744964085d012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20766f756368656420666f722062792073656e6465722e60205b6c6f73742c20726573637565722c2073656e6465725d385265636f76657279436c6f73656408244163636f756e744964244163636f756e7449640821012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20636c6f7365642e40205b6c6f73742c20726573637565725d404163636f756e745265636f766572656408244163636f756e744964244163636f756e744964080501204c6f7374206163636f756e7420686173206265656e207375636365737366756c6c79207265636f76657265642062792072657363756572206163636f756e742e40205b6c6f73742c20726573637565725d3c5265636f7665727952656d6f76656404244163636f756e74496404d82041207265636f766572792070726f6365737320686173206265656e2072656d6f76656420666f7220616e205b6163636f756e745d2e1044436f6e6669674465706f736974426173653042616c616e63654f663c543e4000406352bfc60100000000000000000004550120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e4c467269656e644465706f736974466163746f723042616c616e63654f663c543e4000203d88792d000000000000000000000469012054686520616d6f756e74206f662063757272656e6379206e656564656420706572206164646974696f6e616c2075736572207768656e206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e284d6178467269656e64730c753136080900040d0120546865206d6178696d756d20616d6f756e74206f6620667269656e647320616c6c6f77656420696e2061207265636f7665727920636f6e66696775726174696f6e2e3c5265636f766572794465706f7369743042616c616e63654f663c543e4000406352bfc601000000000000000000041d0120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72207374617274696e672061207265636f766572792e40284e6f74416c6c6f77656404f42055736572206973206e6f7420616c6c6f77656420746f206d616b6520612063616c6c206f6e20626568616c66206f662074686973206163636f756e74345a65726f5468726573686f6c640490205468726573686f6c64206d7573742062652067726561746572207468616e207a65726f404e6f74456e6f756768467269656e647304d420467269656e6473206c697374206d7573742062652067726561746572207468616e207a65726f20616e64207468726573686f6c64284d6178467269656e647304ac20467269656e6473206c697374206d757374206265206c657373207468616e206d617820667269656e6473244e6f74536f7274656404cc20467269656e6473206c697374206d75737420626520736f7274656420616e642066726565206f66206475706c696361746573384e6f745265636f76657261626c6504a02054686973206163636f756e74206973206e6f742073657420757020666f72207265636f7665727948416c72656164795265636f76657261626c6504b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f7665727938416c72656164795374617274656404e02041207265636f766572792070726f636573732068617320616c7265616479207374617274656420666f722074686973206163636f756e74284e6f745374617274656404d02041207265636f766572792070726f6365737320686173206e6f74207374617274656420666f7220746869732072657363756572244e6f74467269656e6404ac2054686973206163636f756e74206973206e6f74206120667269656e642077686f2063616e20766f7563682c44656c6179506572696f64041d012054686520667269656e64206d757374207761697420756e74696c207468652064656c617920706572696f6420746f20766f75636820666f722074686973207265636f7665727938416c7265616479566f756368656404c0205468697320757365722068617320616c726561647920766f756368656420666f722074686973207265636f76657279245468726573686f6c6404ec20546865207468726573686f6c6420666f72207265636f766572696e672074686973206163636f756e7420686173206e6f74206265656e206d65742c5374696c6c41637469766504010120546865726520617265207374696c6c20616374697665207265636f7665727920617474656d7074732074686174206e65656420746f20626520636c6f736564204f766572666c6f77049c2054686572652077617320616e206f766572666c6f7720696e20612063616c63756c6174696f6e30416c726561647950726f787904b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f766572791c56657374696e67011c56657374696e67041c56657374696e6700010230543a3a4163636f756e744964a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e00040004d820496e666f726d6174696f6e20726567617264696e67207468652076657374696e67206f66206120676976656e206163636f756e742e011010766573740044bc20556e6c6f636b20616e79207665737465642066756e6473206f66207468652073656e646572206163636f756e742e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652066756e6473207374696c6c68206c6f636b656420756e6465722074686973206d6f64756c652e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20322052656164732c203220577269746573fc20202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d010120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d34202d2042656e63686d61726b3aec20202020202d20556e6c6f636b65643a2034382e3736202b202e303438202a206c20c2b57320286d696e2073717561726520616e616c7973697329e420202020202d204c6f636b65643a2034342e3433202b202e323834202a206c20c2b57320286d696e2073717561726520616e616c7973697329ad01202d205573696e6720353020c2b5732066697865642e20417373756d696e67206c657373207468616e203530206c6f636b73206f6e20616e7920757365722c20656c7365207765206d61792077616e7420666163746f7220696e206e756d626572206f66206c6f636b732e302023203c2f7765696768743e28766573745f6f7468657204187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654cbc20556e6c6f636b20616e79207665737465642066756e6473206f662061206074617267657460206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501202d2060746172676574603a20546865206163636f756e742077686f7365207665737465642066756e64732073686f756c6420626520756e6c6f636b65642e204d75737420686176652066756e6473207374696c6c68206c6f636b656420756e6465722074686973206d6f64756c652e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c203320577269746573f420202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e74f820202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e7434202d2042656e63686d61726b3ae820202020202d20556e6c6f636b65643a2034342e33202b202e323934202a206c20c2b57320286d696e2073717561726520616e616c7973697329e420202020202d204c6f636b65643a2034382e3136202b202e313033202a206c20c2b57320286d696e2073717561726520616e616c7973697329ad01202d205573696e6720353020c2b5732066697865642e20417373756d696e67206c657373207468616e203530206c6f636b73206f6e20616e7920757365722c20656c7365207765206d61792077616e7420666163746f7220696e206e756d626572206f66206c6f636b732e302023203c2f7765696768743e3c7665737465645f7472616e7366657208187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e486820437265617465206120766573746564207472616e736665722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e001501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c2033205772697465733d0120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745d410120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745de0202d2042656e63686d61726b3a203130302e33202b202e333635202a206c20c2b57320286d696e2073717561726520616e616c7973697329b101202d205573696e672031303020c2b5732066697865642e20417373756d696e67206c657373207468616e203530206c6f636b73206f6e20616e7920757365722c20656c7365207765206d61792077616e7420666163746f7220696e206e756d626572206f66206c6f636b732e302023203c2f7765696768743e54666f7263655f7665737465645f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e4c6420466f726365206120766573746564207472616e736665722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00ec202d2060736f75726365603a20546865206163636f756e742077686f73652066756e64732073686f756c64206265207472616e736665727265642e1501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20342052656164732c203420577269746573350120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74390120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74e0202d2042656e63686d61726b3a203130302e33202b202e333635202a206c20c2b57320286d696e2073717561726520616e616c7973697329b101202d205573696e672031303020c2b5732066697865642e20417373756d696e67206c657373207468616e203530206c6f636b73206f6e20616e7920757365722c20656c7365207765206d61792077616e7420666163746f7220696e206e756d626572206f66206c6f636b732e302023203c2f7765696768743e01083856657374696e675570646174656408244163636f756e7449641c42616c616e63650c59012054686520616d6f756e742076657374656420686173206265656e20757064617465642e205468697320636f756c6420696e646963617465206d6f72652066756e64732061726520617661696c61626c652e205468651d012062616c616e636520676976656e2069732074686520616d6f756e74207768696368206973206c65667420756e7665737465642028616e642074687573206c6f636b6564292e2050205b6163636f756e742c20756e7665737465645d4056657374696e67436f6d706c6574656404244163636f756e74496404150120416e205b6163636f756e745d20686173206265636f6d652066756c6c79207665737465642e204e6f20667572746865722076657374696e672063616e2068617070656e2e04444d696e5665737465645472616e736665723042616c616e63654f663c543e400000c16ff28623000000000000000000041d0120546865206d696e696d756d20616d6f756e7420746f206265207472616e7366657272656420746f206372656174652061206e65772076657374696e67207363686564756c652e0c284e6f7456657374696e67048820546865206163636f756e7420676976656e206973206e6f742076657374696e672e5c4578697374696e6756657374696e675363686564756c65045d0120416e206578697374696e672076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e7420746861742063616e6e6f7420626520636c6f6262657265642e24416d6f756e744c6f7704090120416d6f756e74206265696e67207472616e7366657272656420697320746f6f206c6f7720746f2063726561746520612076657374696e67207363686564756c652e245363686564756c657201245363686564756c65720c184167656e646101010538543a3a426c6f636b4e756d6265726d015665633c4f7074696f6e3c5363686564756c65643c3c542061732054726169743e3a3a43616c6c2c20543a3a426c6f636b4e756d6265722c20543a3a0a50616c6c6574734f726967696e2c20543a3a4163636f756e7449643e3e3e000400044d01204974656d7320746f2062652065786563757465642c20696e64657865642062792074686520626c6f636b206e756d626572207468617420746865792073686f756c64206265206578656375746564206f6e2e184c6f6f6b75700001051c5665633c75383e6c5461736b416464726573733c543a3a426c6f636b4e756d6265723e000400040101204c6f6f6b75702066726f6d206964656e7469747920746f2074686520626c6f636b206e756d62657220616e6420696e646578206f6620746865207461736b2e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e0118207363686564756c6510107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e287420416e6f6e796d6f75736c79207363686564756c652061207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7390202d2042617365205765696768743a2032322e3239202b202e313236202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64615020202020202d2057726974653a204167656e64613d01202d2057696c6c20757365206261736520776569676874206f662032352077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e1863616e63656c08107768656e38543a3a426c6f636b4e756d62657214696e6465780c75333228982043616e63656c20616e20616e6f6e796d6f75736c79207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032322e3135202b20322e383639202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64617020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f6e616d6564140869641c5665633c75383e107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e285c205363686564756c652061206e616d6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c738c202d2042617365205765696768743a2032392e36202b202e313539202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704d01202d2057696c6c20757365206261736520776569676874206f662033352077686963682073686f756c6420626520676f6f6420666f72206d6f7265207468616e203330207363686564756c65642063616c6c73302023203c2f7765696768743e3063616e63656c5f6e616d6564040869641c5665633c75383e287c2043616e63656c2061206e616d6564207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032342e3931202b20322e393037202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f61667465721014616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e14ac20416e6f6e796d6f75736c79207363686564756c652061207461736b20616674657220612064656c61792e002c2023203c7765696768743e582053616d65206173205b607363686564756c65605d2e302023203c2f7765696768743e507363686564756c655f6e616d65645f6166746572140869641c5665633c75383e14616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e1494205363686564756c652061206e616d6564207461736b20616674657220612064656c61792e002c2023203c7765696768743e702053616d65206173205b607363686564756c655f6e616d6564605d2e302023203c2f7765696768743e010c245363686564756c6564082c426c6f636b4e756d6265720c753332048c205363686564756c656420736f6d65207461736b2e205b7768656e2c20696e6465785d2043616e63656c6564082c426c6f636b4e756d6265720c75333204882043616e63656c656420736f6d65207461736b2e205b7768656e2c20696e6465785d28446973706174636865640c605461736b416464726573733c426c6f636b4e756d6265723e3c4f7074696f6e3c5665633c75383e3e384469737061746368526573756c7404a4204469737061746368656420736f6d65207461736b2e205b7461736b2c2069642c20726573756c745d000c404661696c6564546f5363686564756c650468204661696c656420746f207363686564756c6520612063616c6c384661696c6564546f43616e63656c0488204661696c656420746f2063616e63656c2061207363686564756c65642063616c6c5c546172676574426c6f636b4e756d626572496e5061737404a820476976656e2074617267657420626c6f636b206e756d62657220697320696e2074686520706173742e1450726f7879011450726f7879081c50726f7869657301010530543a3a4163636f756e7449644501285665633c50726f7879446566696e6974696f6e3c543a3a4163636f756e7449642c20543a3a50726f7879547970652c20543a3a426c6f636b4e756d6265723e3e2c0a2042616c616e63654f663c543e29004400000000000000000000000000000000000845012054686520736574206f66206163636f756e742070726f786965732e204d61707320746865206163636f756e74207768696368206861732064656c65676174656420746f20746865206163636f756e7473210120776869636820617265206265696e672064656c65676174656420746f2c20746f67657468657220776974682074686520616d6f756e742068656c64206f6e206465706f7369742e34416e6e6f756e63656d656e747301010530543a3a4163636f756e7449643d01285665633c416e6e6f756e63656d656e743c543a3a4163636f756e7449642c2043616c6c486173684f663c543e2c20543a3a426c6f636b4e756d6265723e3e2c0a2042616c616e63654f663c543e290044000000000000000000000000000000000004ac2054686520616e6e6f756e63656d656e7473206d616465206279207468652070726f787920286b6579292e01281470726f78790c107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e3c51012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f726973656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e246164645f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d6265722c490120526567697374657220612070726f7879206163636f756e7420666f72207468652073656e64657220746861742069732061626c6520746f206d616b652063616c6c73206f6e2069747320626568616c662e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f206d616b6520612070726f78792e0101202d206070726f78795f74797065603a20546865207065726d697373696f6e7320616c6c6f77656420666f7220746869732070726f7879206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3072656d6f76655f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d6265722cac20556e726567697374657220612070726f7879206163636f756e7420666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2901202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f2072656d6f766520617320612070726f78792e4501202d206070726f78795f74797065603a20546865207065726d697373696f6e732063757272656e746c7920656e61626c656420666f72207468652072656d6f7665642070726f7879206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3872656d6f76655f70726f786965730028b820556e726567697374657220616c6c2070726f7879206163636f756e747320666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901205741524e494e473a2054686973206d61792062652063616c6c6564206f6e206163636f756e747320637265617465642062792060616e6f6e796d6f7573602c20686f776576657220696620646f6e652c207468656e5d012074686520756e726573657276656420666565732077696c6c20626520696e61636365737369626c652e202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e24616e6f6e796d6f75730c2870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d62657214696e6465780c7531365c3d0120537061776e2061206672657368206e6577206163636f756e7420746861742069732067756172616e7465656420746f206265206f746865727769736520696e61636365737369626c652c20616e64010120696e697469616c697a65206974207769746820612070726f7879206f66206070726f78795f747970656020666f7220606f726967696e602073656e6465722e0070205265717569726573206120605369676e656460206f726967696e2e005501202d206070726f78795f74797065603a205468652074797065206f66207468652070726f78792074686174207468652073656e6465722077696c6c2062652072656769737465726564206173206f766572207468655101206e6577206163636f756e742e20546869732077696c6c20616c6d6f737420616c7761797320626520746865206d6f7374207065726d697373697665206050726f7879547970656020706f737369626c6520746f7c20616c6c6f7720666f72206d6178696d756d20666c65786962696c6974792e5501202d2060696e646578603a204120646973616d626967756174696f6e20696e6465782c20696e206361736520746869732069732063616c6c6564206d756c7469706c652074696d657320696e207468652073616d656101207472616e73616374696f6e2028652e672e207769746820607574696c6974793a3a626174636860292e20556e6c65737320796f75277265207573696e67206062617463686020796f752070726f6261626c79206a757374442077616e7420746f20757365206030602e5101202d206064656c6179603a2054686520616e6e6f756e63656d656e7420706572696f64207265717569726564206f662074686520696e697469616c2070726f78792e2057696c6c2067656e6572616c6c7920626518207a65726f2e005501204661696c73207769746820604475706c69636174656020696620746869732068617320616c7265616479206265656e2063616c6c656420696e2074686973207472616e73616374696f6e2c2066726f6d207468659c2073616d652073656e6465722c2077697468207468652073616d6520706172616d65746572732e00e8204661696c732069662074686572652061726520696e73756666696369656e742066756e647320746f2070617920666f72206465706f7369742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e9020544f444f3a204d69676874206265206f76657220636f756e74696e6720312072656164386b696c6c5f616e6f6e796d6f7573141c737061776e657230543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f78795479706514696e6465780c753136186865696768745c436f6d706163743c543a3a426c6f636b4e756d6265723e246578745f696e64657830436f6d706163743c7533323e50b82052656d6f76657320612070726576696f75736c7920737061776e656420616e6f6e796d6f75732070726f78792e004d01205741524e494e473a202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a20416e792066756e64732068656c6420696e2069742077696c6c2062653820696e61636365737369626c652e005d01205265717569726573206120605369676e656460206f726967696e2c20616e64207468652073656e646572206163636f756e74206d7573742068617665206265656e206372656174656420627920612063616c6c20746fac2060616e6f6e796d6f757360207769746820636f72726573706f6e64696e6720706172616d65746572732e005101202d2060737061776e6572603a20546865206163636f756e742074686174206f726967696e616c6c792063616c6c65642060616e6f6e796d6f75736020746f206372656174652074686973206163636f756e742e5101202d2060696e646578603a2054686520646973616d626967756174696f6e20696e646578206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e2050726f6261626c79206030602e0501202d206070726f78795f74797065603a205468652070726f78792074797065206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e4101202d2060686569676874603a2054686520686569676874206f662074686520636861696e207768656e207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e4d01202d20606578745f696e646578603a205468652065787472696e73696320696e64657820696e207768696368207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e004d01204661696c73207769746820604e6f5065726d697373696f6e6020696e2063617365207468652063616c6c6572206973206e6f7420612070726576696f75736c79206372656174656420616e6f6e796d6f7573f4206163636f756e742077686f73652060616e6f6e796d6f7573602063616c6c2068617320636f72726573706f6e64696e6720706172616d65746572732e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e20616e6e6f756e636508107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e540901205075626c697368207468652068617368206f6620612070726f78792d63616c6c20746861742077696c6c206265206d61646520696e20746865206675747572652e0061012054686973206d7573742062652063616c6c656420736f6d65206e756d626572206f6620626c6f636b73206265666f72652074686520636f72726573706f6e64696e67206070726f78796020697320617474656d707465642901206966207468652064656c6179206173736f6369617465642077697468207468652070726f78792072656c6174696f6e736869702069732067726561746572207468616e207a65726f2e001501204e6f206d6f7265207468616e20604d617850656e64696e676020616e6e6f756e63656d656e7473206d6179206265206d61646520617420616e79206f6e652074696d652e000d0120546869732077696c6c2074616b652061206465706f736974206f662060416e6e6f756e63656d656e744465706f736974466163746f72602061732077656c6c2061731d012060416e6e6f756e63656d656e744465706f736974426173656020696620746865726520617265206e6f206f746865722070656e64696e6720616e6e6f756e63656d656e74732e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420612070726f7879206f6620607265616c602e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656d6f76655f616e6e6f756e63656d656e7408107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40742052656d6f7665206120676976656e20616e6e6f756e63656d656e742e005d01204d61792062652063616c6c656420627920612070726f7879206163636f756e7420746f2072656d6f766520612063616c6c20746865792070726576696f75736c7920616e6e6f756e63656420616e642072657475726e3420746865206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656a6563745f616e6e6f756e63656d656e74082064656c656761746530543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40b42052656d6f76652074686520676976656e20616e6e6f756e63656d656e74206f6620612064656c65676174652e006501204d61792062652063616c6c6564206279206120746172676574202870726f7869656429206163636f756e7420746f2072656d6f766520612063616c6c2074686174206f6e65206f662074686569722064656c656761746573290120286064656c656761746560292068617320616e6e6f756e63656420746865792077616e7420746f20657865637574652e20546865206465706f7369742069732072657475726e65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733af8202d206064656c6567617465603a20546865206163636f756e7420746861742070726576696f75736c7920616e6e6f756e636564207468652063616c6c2ec0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e3c70726f78795f616e6e6f756e636564102064656c656761746530543a3a4163636f756e744964107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e4451012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f726973656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e010c3450726f7879457865637574656404384469737061746368526573756c7404e420412070726f78792077617320657865637574656420636f72726563746c792c20776974682074686520676976656e205b726573756c745d2e40416e6f6e796d6f75734372656174656410244163636f756e744964244163636f756e7449642450726f7879547970650c75313608ec20416e6f6e796d6f7573206163636f756e7420686173206265656e2063726561746564206279206e65772070726f7879207769746820676976656e610120646973616d626967756174696f6e20696e64657820616e642070726f787920747970652e205b616e6f6e796d6f75732c2077686f2c2070726f78795f747970652c20646973616d626967756174696f6e5f696e6465785d24416e6e6f756e6365640c244163636f756e744964244163636f756e744964104861736804490120416e20616e6e6f756e63656d656e742077617320706c6163656420746f206d616b6520612063616c6c20696e20746865206675747572652e205b7265616c2c2070726f78792c2063616c6c5f686173685d184050726f78794465706f736974426173653042616c616e63654f663c543e4000f09e544c390000000000000000000004110120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e6720612070726f78792e4850726f78794465706f736974466163746f723042616c616e63654f663c543e400060aa7714b40000000000000000000004bc2054686520616d6f756e74206f662063757272656e6379206e6565646564207065722070726f78792061646465642e284d617850726f786965730c75313608200004f020546865206d6178696d756d20616d6f756e74206f662070726f7869657320616c6c6f77656420666f7220612073696e676c65206163636f756e742e284d617850656e64696e670c7533321020000000047820604d617850656e64696e6760206d6574616461746120736861646f772e5c416e6e6f756e63656d656e744465706f736974426173653042616c616e63654f663c543e4000f09e544c390000000000000000000004ac2060416e6e6f756e63656d656e744465706f7369744261736560206d6574616461746120736861646f772e64416e6e6f756e63656d656e744465706f736974466163746f723042616c616e63654f663c543e4000c054ef28680100000000000000000004b42060416e6e6f756e63656d656e744465706f736974466163746f7260206d6574616461746120736861646f772e1c1c546f6f4d616e790425012054686572652061726520746f6f206d616e792070726f786965732072656769737465726564206f7220746f6f206d616e7920616e6e6f756e63656d656e74732070656e64696e672e204e6f74466f756e6404782050726f787920726567697374726174696f6e206e6f7420666f756e642e204e6f7450726f787904d02053656e646572206973206e6f7420612070726f7879206f6620746865206163636f756e7420746f2062652070726f786965642e2c556e70726f787961626c6504250120412063616c6c20776869636820697320696e636f6d70617469626c652077697468207468652070726f7879207479706527732066696c7465722077617320617474656d707465642e244475706c69636174650470204163636f756e7420697320616c726561647920612070726f78792e304e6f5065726d697373696f6e0419012043616c6c206d6179206e6f74206265206d6164652062792070726f78792062656361757365206974206d617920657363616c617465206974732070726976696c656765732e2c556e616e6e6f756e63656404d420416e6e6f756e63656d656e742c206966206d61646520617420616c6c2c20776173206d61646520746f6f20726563656e746c792e204d756c746973696701204d756c746973696708244d756c74697369677300020530543a3a4163636f756e744964205b75383b2033325dd04d756c74697369673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e02040004942054686520736574206f66206f70656e206d756c7469736967206f7065726174696f6e732e1443616c6c73000106205b75383b2033325da0284f706171756543616c6c2c20543a3a4163636f756e7449642c2042616c616e63654f663c543e290004000001105061735f6d756c74695f7468726573686f6c645f3108446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e1063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e44550120496d6d6564696174656c792064697370617463682061206d756c74692d7369676e61747572652063616c6c207573696e6720612073696e676c6520617070726f76616c2066726f6d207468652063616c6c65722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e004101202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f206172652070617274206f66207468650501206d756c74692d7369676e61747572652c2062757420646f206e6f7420706172746963697061746520696e2074686520617070726f76616c2070726f636573732e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e00bc20526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c742e002c2023203c7765696768743e1d01204f285a202b204329207768657265205a20697320746865206c656e677468206f66207468652063616c6c20616e6420432069747320657865637574696f6e207765696768742e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d2042617365205765696768743a2033332e3732202b20302e303032202a205a20c2b57348202d204442205765696768743a204e6f6e654c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e2061735f6d756c746918247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e1063616c6c284f706171756543616c6c2873746f72655f63616c6c10626f6f6c286d61785f77656967687418576569676874cc590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e00b42049662074686572652061726520656e6f7567682c207468656e206469737061746368207468652063616c6c2e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e002101204e4f54453a20556e6c6573732074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2067656e6572616c6c792077616e7420746f207573651d012060617070726f76655f61735f6d756c74696020696e73746561642c2073696e6365206974206f6e6c7920726571756972657320612068617368206f66207468652063616c6c2e005d0120526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c7420696620607468726573686f6c64602069732065786163746c79206031602e204f74686572776973655901206f6e20737563636573732c20726573756c7420697320604f6b6020616e642074686520726573756c742066726f6d2074686520696e746572696f722063616c6c2c206966206974207761732065786563757465642ce0206d617920626520666f756e6420696e20746865206465706f736974656420604d756c7469736967457865637574656460206576656e742e002c2023203c7765696768743e54202d20604f2853202b205a202b2043616c6c29602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2e2501202d204f6e652063616c6c20656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285a296020776865726520605a602069732074782d6c656e2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e70202d2054686520776569676874206f6620746865206063616c6c602e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c202d2042617365205765696768743ae020202020202d204372656174653a2020202020202020202034312e3839202b20302e313138202a2053202b202e303032202a205a20c2b573e020202020202d2043726561746520772f2053746f72653a2035332e3537202b20302e313139202a2053202b202e303033202a205a20c2b573e020202020202d20417070726f76653a20202020202020202033312e3339202b20302e313336202a2053202b202e303032202a205a20c2b573e020202020202d20436f6d706c6574653a202020202020202033392e3934202b20302e323620202a2053202b202e303032202a205a20c2b57334202d204442205765696768743a250120202020202d2052656164733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c6029290120202020202d205772697465733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c60294c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e40617070726f76655f61735f6d756c746914247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e2463616c6c5f68617368205b75383b2033325d286d61785f776569676874185765696768749c590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e003901204e4f54453a2049662074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2077616e7420746f20757365206061735f6d756c74696020696e73746561642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c202d2042617365205765696768743a8020202020202d204372656174653a2034342e3731202b20302e303838202a20538420202020202d20417070726f76653a2033312e3438202b20302e313136202a205334202d204442205765696768743abc20202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745dc020202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d302023203c2f7765696768743e3c63616e63656c5f61735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e2474696d65706f696e746454696d65706f696e743c543a3a426c6f636b4e756d6265723e2463616c6c5f68617368205b75383b2033325d6c59012043616e63656c2061207072652d6578697374696e672c206f6e2d676f696e67206d756c7469736967207472616e73616374696f6e2e20416e79206465706f7369742072657365727665642070726576696f75736c79c820666f722074686973206f7065726174696f6e2077696c6c20626520756e7265736572766564206f6e20737563636573732e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e6101202d206074696d65706f696e74603a205468652074696d65706f696e742028626c6f636b206e756d62657220616e64207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c7c207472616e73616374696f6e20666f7220746869732064697370617463682ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602e34202d204f6e65206576656e742e88202d20492f4f3a2031207265616420604f285329602c206f6e652072656d6f76652e74202d2053746f726167653a2072656d6f766573206f6e65206974656d2e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d84202d2042617365205765696768743a2033362e3037202b20302e313234202a205334202d204442205765696768743a190120202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c731d0120202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c73302023203c2f7765696768743e01102c4e65774d756c74697369670c244163636f756e744964244163636f756e7449642043616c6c486173680415012041206e6577206d756c7469736967206f7065726174696f6e2068617320626567756e2e205b617070726f76696e672c206d756c74697369672c2063616c6c5f686173685d404d756c7469736967417070726f76616c10244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c48617368047d012041206d756c7469736967206f7065726174696f6e20686173206265656e20617070726f76656420627920736f6d656f6e652e205b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685d404d756c7469736967457865637574656414244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c48617368384469737061746368526573756c740451012041206d756c7469736967206f7065726174696f6e20686173206265656e2065786563757465642e205b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685d444d756c746973696743616e63656c6c656410244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c486173680459012041206d756c7469736967206f7065726174696f6e20686173206265656e2063616e63656c6c65642e205b63616e63656c6c696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685d0038404d696e696d756d5468726573686f6c640480205468726573686f6c64206d7573742062652032206f7220677265617465722e3c416c7265616479417070726f76656404b02043616c6c20697320616c726561647920617070726f7665642062792074686973207369676e61746f72792e444e6f417070726f76616c734e656564656404a02043616c6c20646f65736e2774206e65656420616e7920286d6f72652920617070726f76616c732e44546f6f4665775369676e61746f7269657304ac2054686572652061726520746f6f20666577207369676e61746f7269657320696e20746865206c6973742e48546f6f4d616e795369676e61746f7269657304b02054686572652061726520746f6f206d616e79207369676e61746f7269657320696e20746865206c6973742e545369676e61746f726965734f75744f664f7264657204110120546865207369676e61746f7269657320776572652070726f7669646564206f7574206f66206f726465723b20746865792073686f756c64206265206f7264657265642e4c53656e646572496e5369676e61746f72696573041101205468652073656e6465722077617320636f6e7461696e656420696e20746865206f74686572207369676e61746f726965733b2069742073686f756c646e27742062652e204e6f74466f756e6404e0204d756c7469736967206f7065726174696f6e206e6f7420666f756e64207768656e20617474656d7074696e6720746f2063616e63656c2e204e6f744f776e6572043101204f6e6c7920746865206163636f756e742074686174206f726967696e616c6c79206372656174656420746865206d756c74697369672069732061626c6520746f2063616e63656c2069742e2c4e6f54696d65706f696e74042101204e6f2074696d65706f696e742077617320676976656e2c2079657420746865206d756c7469736967206f7065726174696f6e20697320616c726561647920756e6465727761792e3857726f6e6754696d65706f696e74043101204120646966666572656e742074696d65706f696e742077617320676976656e20746f20746865206d756c7469736967206f7065726174696f6e207468617420697320756e6465727761792e4c556e657870656374656454696d65706f696e7404f820412074696d65706f696e742077617320676976656e2c20796574206e6f206d756c7469736967206f7065726174696f6e20697320756e6465727761792e30576569676874546f6f4c6f7704d420546865206d6178696d756d2077656967687420696e666f726d6174696f6e2070726f76696465642077617320746f6f206c6f772e34416c726561647953746f72656404a420546865206461746120746f2062652073746f72656420697320616c72656164792073746f7265642e041c40436865636b5370656356657273696f6e38436865636b547856657273696f6e30436865636b47656e6573697338436865636b4d6f7274616c69747928436865636b4e6f6e63652c436865636b576569676874604368617267655472616e73616374696f6e5061796d656e74 \ No newline at end of file diff --git a/packages/polkadot/tests/meta/v11.json b/packages/polkadot/tests/meta/v11.json new file mode 100644 index 00000000..1f1b05e8 --- /dev/null +++ b/packages/polkadot/tests/meta/v11.json @@ -0,0 +1,11686 @@ +{ + "magicNumber": 1635018093, + "metadata": { + "V11": { + "modules": [ + { + "name": "System", + "storage": { + "prefix": "System", + "items": [ + { + "name": "Account", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "AccountInfo", + "linked": false + } + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The full account information for a particular account ID." + ] + }, + { + "name": "ExtrinsicCount", + "modifier": "Optional", + "type": { + "Plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total extrinsics count for the current block." + ] + }, + { + "name": "BlockWeight", + "modifier": "Default", + "type": { + "Plain": "ExtrinsicsWeight" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The current weight for the block." + ] + }, + { + "name": "AllExtrinsicsLen", + "modifier": "Optional", + "type": { + "Plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total length (in bytes) for all extrinsics put together, for the current block." + ] + }, + { + "name": "BlockHash", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "BlockNumber", + "value": "Hash", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Map of block numbers to block hashes." + ] + }, + { + "name": "ExtrinsicData", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "u32", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Extrinsics data for the current block (maps an extrinsic's index to its data)." + ] + }, + { + "name": "Number", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The current block number being processed. Set by `execute_block`." + ] + }, + { + "name": "ParentHash", + "modifier": "Default", + "type": { + "Plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Hash of the previous block." + ] + }, + { + "name": "ExtrinsicsRoot", + "modifier": "Default", + "type": { + "Plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Extrinsics root of the current block, also part of the block header." + ] + }, + { + "name": "Digest", + "modifier": "Default", + "type": { + "Plain": "DigestOf" + }, + "fallback": "0x00", + "documentation": [ + " Digest of the current block, also part of the block header." + ] + }, + { + "name": "Events", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Events deposited for the current block." + ] + }, + { + "name": "EventCount", + "modifier": "Default", + "type": { + "Plain": "EventIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of events in the `Events` list." + ] + }, + { + "name": "EventTopics", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "Hash", + "value": "Vec<(BlockNumber,EventIndex)>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Mapping between a topic (represented by T::Hash) and a vector of indexes", + " of events in the `>` list.", + "", + " All topic vectors have deterministic storage locations depending on the topic. This", + " allows light-clients to leverage the changes trie storage tracking mechanism and", + " in case of changes fetch the list of events of interest.", + "", + " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just", + " the `EventIndex` then in case if the topic has the same contents on the next block", + " no notification will be triggered thus the event might be lost." + ] + }, + { + "name": "LastRuntimeUpgrade", + "modifier": "Optional", + "type": { + "Plain": "LastRuntimeUpgradeInfo" + }, + "fallback": "0x00", + "documentation": [ + " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened." + ] + }, + { + "name": "ExecutionPhase", + "modifier": "Optional", + "type": { + "Plain": "Phase" + }, + "fallback": "0x00", + "documentation": [ + " The execution phase of the block." + ] + } + ] + }, + "calls": [ + { + "name": "fill_block", + "args": [ + { + "name": "_ratio", + "type": "Perbill" + } + ], + "documentation": [ + " A dispatch that will fill the block weight up to the given ratio." + ] + }, + { + "name": "remark", + "args": [ + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Make some on-chain remark.", + "", + " # ", + " - `O(1)`", + " - Base Weight: 0.665 µs, independent of remark length.", + " - No DB operations.", + " # " + ] + }, + { + "name": "set_heap_pages", + "args": [ + { + "name": "pages", + "type": "u64" + } + ], + "documentation": [ + " Set the number of pages in the WebAssembly environment's heap.", + "", + " # ", + " - `O(1)`", + " - 1 storage write.", + " - Base Weight: 1.405 µs", + " - 1 write to HEAP_PAGES", + " # " + ] + }, + { + "name": "set_code", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new runtime code.", + "", + " # ", + " - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`", + " - 1 storage write (codec `O(C)`).", + " - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive).", + " - 1 event.", + " The weight of this function is dependent on the runtime, but generally this is very expensive.", + " We will treat this as a full block.", + " # " + ] + }, + { + "name": "set_code_without_checks", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new runtime code without doing any checks of the given `code`.", + "", + " # ", + " - `O(C)` where `C` length of `code`", + " - 1 storage write (codec `O(C)`).", + " - 1 event.", + " The weight of this function is dependent on the runtime. We will treat this as a full block.", + " # " + ] + }, + { + "name": "set_changes_trie_config", + "args": [ + { + "name": "changes_trie_config", + "type": "Option" + } + ], + "documentation": [ + " Set the new changes trie configuration.", + "", + " # ", + " - `O(1)`", + " - 1 storage write or delete (codec `O(1)`).", + " - 1 call to `deposit_log`: Uses `append` API, so O(1)", + " - Base Weight: 7.218 µs", + " - DB Weight:", + " - Writes: Changes Trie, System Digest", + " # " + ] + }, + { + "name": "set_storage", + "args": [ + { + "name": "items", + "type": "Vec" + } + ], + "documentation": [ + " Set some items of storage.", + "", + " # ", + " - `O(I)` where `I` length of `items`", + " - `I` storage writes (`O(1)`).", + " - Base Weight: 0.568 * i µs", + " - Writes: Number of items", + " # " + ] + }, + { + "name": "kill_storage", + "args": [ + { + "name": "keys", + "type": "Vec" + } + ], + "documentation": [ + " Kill some items from storage.", + "", + " # ", + " - `O(IK)` where `I` length of `keys` and `K` length of one key", + " - `I` storage deletions.", + " - Base Weight: .378 * i µs", + " - Writes: Number of items", + " # " + ] + }, + { + "name": "kill_prefix", + "args": [ + { + "name": "prefix", + "type": "Key" + }, + { + "name": "_subkeys", + "type": "u32" + } + ], + "documentation": [ + " Kill all storage items with a key that starts with the given prefix.", + "", + " **NOTE:** We rely on the Root origin to provide us the number of subkeys under", + " the prefix we are removing to accurately calculate the weight of this function.", + "", + " # ", + " - `O(P)` where `P` amount of keys with prefix `prefix`", + " - `P` storage deletions.", + " - Base Weight: 0.834 * P µs", + " - Writes: Number of subkeys + 1", + " # " + ] + }, + { + "name": "suicide", + "args": [], + "documentation": [ + " Kill the sending account, assuming there are no references outstanding and the composite", + " data is equal to its default value.", + "", + " # ", + " - `O(1)`", + " - 1 storage read and deletion.", + " --------------------", + " Base Weight: 8.626 µs", + " No DB Read or Write operations because caller is already in overlay", + " # " + ] + } + ], + "events": [ + { + "name": "ExtrinsicSuccess", + "args": [ + "DispatchInfo" + ], + "documentation": [ + " An extrinsic completed successfully. [info]" + ] + }, + { + "name": "ExtrinsicFailed", + "args": [ + "DispatchError", + "DispatchInfo" + ], + "documentation": [ + " An extrinsic failed. [error, info]" + ] + }, + { + "name": "CodeUpdated", + "args": [], + "documentation": [ + " `:code` was updated." + ] + }, + { + "name": "NewAccount", + "args": [ + "AccountId" + ], + "documentation": [ + " A new [account] was created." + ] + }, + { + "name": "KilledAccount", + "args": [ + "AccountId" + ], + "documentation": [ + " An [account] was reaped." + ] + } + ], + "constants": [ + { + "name": "BlockHashCount", + "type": "BlockNumber", + "value": "0x60090000", + "documentation": [ + " The maximum number of blocks to allow in mortal eras." + ] + }, + { + "name": "MaximumBlockWeight", + "type": "Weight", + "value": "0x00204aa9d1010000", + "documentation": [ + " The maximum weight of a block." + ] + }, + { + "name": "DbWeight", + "type": "RuntimeDbWeight", + "value": "0x40787d010000000000e1f50500000000", + "documentation": [ + " The weight of runtime database operations the runtime can invoke." + ] + }, + { + "name": "BlockExecutionWeight", + "type": "Weight", + "value": "0x00f2052a01000000", + "documentation": [ + " The base weight of executing a block, independent of the transactions in the block." + ] + }, + { + "name": "ExtrinsicBaseWeight", + "type": "Weight", + "value": "0x4059730700000000", + "documentation": [ + " The base weight of an Extrinsic in the block, independent of the of extrinsic being executed." + ] + }, + { + "name": "MaximumBlockLength", + "type": "u32", + "value": "0x00005000", + "documentation": [ + " The maximum length of a block (in bytes)." + ] + } + ], + "errors": [ + { + "name": "InvalidSpecName", + "documentation": [ + " The name of specification does not match between the current runtime", + " and the new runtime." + ] + }, + { + "name": "SpecVersionNeedsToIncrease", + "documentation": [ + " The specification version is not allowed to decrease between the current runtime", + " and the new runtime." + ] + }, + { + "name": "FailedToExtractRuntimeVersion", + "documentation": [ + " Failed to extract the runtime version from the new runtime.", + "", + " Either calling `Core_version` or decoding `RuntimeVersion` failed." + ] + }, + { + "name": "NonDefaultComposite", + "documentation": [ + " Suicide called when the account has non-default composite data." + ] + }, + { + "name": "NonZeroRefCount", + "documentation": [ + " There is a non-zero reference count preventing the account from being purged." + ] + } + ] + }, + { + "name": "Utility", + "storage": null, + "calls": [ + { + "name": "batch", + "args": [ + { + "name": "calls", + "type": "Vec" + } + ], + "documentation": [ + " Send a batch of dispatch calls.", + "", + " May be called from any origin.", + "", + " - `calls`: The calls to be dispatched from the same origin.", + "", + " If origin is root then call are dispatch without checking origin filter. (This includes", + " bypassing `frame_system::Trait::BaseCallFilter`).", + "", + " # ", + " - Base weight: 14.39 + .987 * c µs", + " - Plus the sum of the weights of the `calls`.", + " - Plus one additional event. (repeat read/write)", + " # ", + "", + " This will return `Ok` in all circumstances. To determine the success of the batch, an", + " event is deposited. If a call failed and the batch was interrupted, then the", + " `BatchInterrupted` event is deposited, along with the number of successful calls made", + " and the error of the failed call. If all were successful, then the `BatchCompleted`", + " event is deposited." + ] + }, + { + "name": "as_derivative", + "args": [ + { + "name": "index", + "type": "u16" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Send a call through an indexed pseudonym of the sender.", + "", + " Filter from origin are passed along. The call will be dispatched with an origin which", + " use the same filter as the origin of this call.", + "", + " NOTE: If you need to ensure that any account-based filtering is not honored (i.e.", + " because you expect `proxy` to have been used prior in the call stack and you do not want", + " the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`", + " in the Multisig pallet instead.", + "", + " NOTE: Prior to version *12, this was called `as_limited_sub`.", + "", + " The dispatch origin for this call must be _Signed_." + ] + } + ], + "events": [ + { + "name": "BatchInterrupted", + "args": [ + "u32", + "DispatchError" + ], + "documentation": [ + " Batch of dispatches did not complete fully. Index of first failing dispatch given, as", + " well as the error. [index, error]" + ] + }, + { + "name": "BatchCompleted", + "args": [], + "documentation": [ + " Batch of dispatches completed fully with no error." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "Babe", + "storage": { + "prefix": "Babe", + "items": [ + { + "name": "EpochIndex", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current epoch index." + ] + }, + { + "name": "Authorities", + "modifier": "Default", + "type": { + "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + }, + "fallback": "0x00", + "documentation": [ + " Current epoch authorities." + ] + }, + { + "name": "GenesisSlot", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The slot at which the first epoch actually started. This is 0", + " until the first block of the chain." + ] + }, + { + "name": "CurrentSlot", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current slot number." + ] + }, + { + "name": "Randomness", + "modifier": "Default", + "type": { + "Plain": "Randomness" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The epoch randomness for the *current* epoch.", + "", + " # Security", + "", + " This MUST NOT be used for gambling, as it can be influenced by a", + " malicious validator in the short term. It MAY be used in many", + " cryptographic protocols, however, so long as one remembers that this", + " (like everything else on-chain) it is public. For example, it can be", + " used where a number is needed that cannot have been chosen by an", + " adversary, for purposes such as public-coin zero-knowledge proofs." + ] + }, + { + "name": "NextEpochConfig", + "modifier": "Optional", + "type": { + "Plain": "NextConfigDescriptor" + }, + "fallback": "0x00", + "documentation": [ + " Next epoch configuration, if changed." + ] + }, + { + "name": "NextRandomness", + "modifier": "Default", + "type": { + "Plain": "Randomness" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Next epoch randomness." + ] + }, + { + "name": "SegmentIndex", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Randomness under construction.", + "", + " We make a tradeoff between storage accesses and list length.", + " We store the under-construction randomness in segments of up to", + " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.", + "", + " Once a segment reaches this length, we begin the next one.", + " We reset all segments and return to `0` at the beginning of every", + " epoch." + ] + }, + { + "name": "UnderConstruction", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "u32", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay." + ] + }, + { + "name": "Initialized", + "modifier": "Optional", + "type": { + "Plain": "MaybeRandomness" + }, + "fallback": "0x00", + "documentation": [ + " Temporary value (cleared at block finalization) which is `Some`", + " if per-block initialization has already been called for current block." + ] + }, + { + "name": "Lateness", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " How late the current block is compared to its parent.", + "", + " This entry is populated as part of block execution and is cleaned up", + " on block finalization. Querying this storage entry outside of block", + " execution context should always yield zero." + ] + } + ] + }, + "calls": [ + { + "name": "report_equivocation", + "args": [ + { + "name": "equivocation_proof", + "type": "BabeEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report authority equivocation/misbehavior. This method will verify", + " the equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence will", + " be reported." + ] + }, + { + "name": "report_equivocation_unsigned", + "args": [ + { + "name": "equivocation_proof", + "type": "BabeEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report authority equivocation/misbehavior. This method will verify", + " the equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence will", + " be reported.", + " This extrinsic must be called unsigned and it is expected that only", + " block authors will call it (validated in `ValidateUnsigned`), as such", + " if the block author is defined it will be defined as the equivocation", + " reporter." + ] + } + ], + "events": null, + "constants": [ + { + "name": "EpochDuration", + "type": "u64", + "value": "0xc800000000000000", + "documentation": [ + " The number of **slots** that an epoch takes. We couple sessions to", + " epochs, i.e. we start a new session once the new epoch begins." + ] + }, + { + "name": "ExpectedBlockTime", + "type": "Moment", + "value": "0xb80b000000000000", + "documentation": [ + " The expected average block time at which BABE should be creating", + " blocks. Since BABE is probabilistic it is not trivial to figure out", + " what the expected average block time should be based on the slot", + " duration and the security parameter `c` (where `1 - c` represents", + " the probability of a slot being empty)." + ] + } + ], + "errors": [] + }, + { + "name": "Timestamp", + "storage": { + "prefix": "Timestamp", + "items": [ + { + "name": "Now", + "modifier": "Default", + "type": { + "Plain": "Moment" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current time for the current block." + ] + }, + { + "name": "DidUpdate", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Did the timestamp get updated in this block?" + ] + } + ] + }, + "calls": [ + { + "name": "set", + "args": [ + { + "name": "now", + "type": "Compact" + } + ], + "documentation": [ + " Set the current time.", + "", + " This call should be invoked exactly once per block. It will panic at the finalization", + " phase, if this call hasn't been invoked by that time.", + "", + " The timestamp should be greater than the previous one by the amount specified by", + " `MinimumPeriod`.", + "", + " The dispatch origin for this call must be `Inherent`.", + "", + " # ", + " - `O(T)` where `T` complexity of `on_timestamp_set`", + " - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`)", + " - 1 event handler `on_timestamp_set` `O(T)`.", + " # " + ] + } + ], + "events": null, + "constants": [ + { + "name": "MinimumPeriod", + "type": "Moment", + "value": "0xdc05000000000000", + "documentation": [ + " The minimum period between blocks. Beware that this is different to the *expected* period", + " that the block production apparatus provides. Your chosen consensus system will generally", + " work with this to determine a sensible block time. e.g. For Aura, it will be double this", + " period on default settings." + ] + } + ], + "errors": [] + }, + { + "name": "Authorship", + "storage": { + "prefix": "Authorship", + "items": [ + { + "name": "Uncles", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Uncles" + ] + }, + { + "name": "Author", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " Author of current block." + ] + }, + { + "name": "DidSetUncles", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Whether uncles were already set in this block." + ] + } + ] + }, + "calls": [ + { + "name": "set_uncles", + "args": [ + { + "name": "new_uncles", + "type": "Vec
" + } + ], + "documentation": [ + " Provide a set of uncles." + ] + } + ], + "events": null, + "constants": [], + "errors": [ + { + "name": "InvalidUncleParent", + "documentation": [ + " The uncle parent not in the chain." + ] + }, + { + "name": "UnclesAlreadySet", + "documentation": [ + " Uncles already set in the block." + ] + }, + { + "name": "TooManyUncles", + "documentation": [ + " Too many uncles." + ] + }, + { + "name": "GenesisUncle", + "documentation": [ + " The uncle is genesis." + ] + }, + { + "name": "TooHighUncle", + "documentation": [ + " The uncle is too high in chain." + ] + }, + { + "name": "UncleAlreadyIncluded", + "documentation": [ + " The uncle is already included." + ] + }, + { + "name": "OldUncle", + "documentation": [ + " The uncle isn't recent enough to be included." + ] + } + ] + }, + { + "name": "Indices", + "storage": { + "prefix": "Indices", + "items": [ + { + "name": "Accounts", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountIndex", + "value": "(AccountId,BalanceOf,bool)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The lookup from index to account." + ] + } + ] + }, + "calls": [ + { + "name": "claim", + "args": [ + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Assign an previously unassigned index.", + "", + " Payment: `Deposit` is reserved from the sender account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `index`: the index to be claimed. This must not be in use.", + "", + " Emits `IndexAssigned` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - One reserve operation.", + " - One event.", + " -------------------", + " - Base Weight: 28.69 µs", + " - DB Weight: 1 Read/Write (Accounts)", + " # " + ] + }, + { + "name": "transfer", + "args": [ + { + "name": "new", + "type": "AccountId" + }, + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Assign an index already owned by the sender to another account. The balance reservation", + " is effectively transferred to the new account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `index`: the index to be re-assigned. This must be owned by the sender.", + " - `new`: the new owner of the index. This function is a no-op if it is equal to sender.", + "", + " Emits `IndexAssigned` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - One transfer operation.", + " - One event.", + " -------------------", + " - Base Weight: 33.74 µs", + " - DB Weight:", + " - Reads: Indices Accounts, System Account (recipient)", + " - Writes: Indices Accounts, System Account (recipient)", + " # " + ] + }, + { + "name": "free", + "args": [ + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Free up an index owned by the sender.", + "", + " Payment: Any previous deposit placed for the index is unreserved in the sender account.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must own the index.", + "", + " - `index`: the index to be freed. This must be owned by the sender.", + "", + " Emits `IndexFreed` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - One reserve operation.", + " - One event.", + " -------------------", + " - Base Weight: 25.53 µs", + " - DB Weight: 1 Read/Write (Accounts)", + " # " + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "new", + "type": "AccountId" + }, + { + "name": "index", + "type": "AccountIndex" + }, + { + "name": "freeze", + "type": "bool" + } + ], + "documentation": [ + " Force an index to an account. This doesn't require a deposit. If the index is already", + " held, then any deposit is reimbursed to its current owner.", + "", + " The dispatch origin for this call must be _Root_.", + "", + " - `index`: the index to be (re-)assigned.", + " - `new`: the new owner of the index. This function is a no-op if it is equal to sender.", + " - `freeze`: if set to `true`, will freeze the index so it cannot be transferred.", + "", + " Emits `IndexAssigned` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - Up to one reserve operation.", + " - One event.", + " -------------------", + " - Base Weight: 26.83 µs", + " - DB Weight:", + " - Reads: Indices Accounts, System Account (original owner)", + " - Writes: Indices Accounts, System Account (original owner)", + " # " + ] + }, + { + "name": "freeze", + "args": [ + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Freeze an index so it will always point to the sender account. This consumes the deposit.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must have a", + " non-frozen account `index`.", + "", + " - `index`: the index to be frozen in place.", + "", + " Emits `IndexFrozen` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - Up to one slash operation.", + " - One event.", + " -------------------", + " - Base Weight: 30.86 µs", + " - DB Weight: 1 Read/Write (Accounts)", + " # " + ] + } + ], + "events": [ + { + "name": "IndexAssigned", + "args": [ + "AccountId", + "AccountIndex" + ], + "documentation": [ + " A account index was assigned. [who, index]" + ] + }, + { + "name": "IndexFreed", + "args": [ + "AccountIndex" + ], + "documentation": [ + " A account index has been freed up (unassigned). [index]" + ] + }, + { + "name": "IndexFrozen", + "args": [ + "AccountIndex", + "AccountId" + ], + "documentation": [ + " A account index has been frozen to its current account ID. [who, index]" + ] + } + ], + "constants": [ + { + "name": "Deposit", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The deposit needed for reserving an index." + ] + } + ], + "errors": [] + }, + { + "name": "Balances", + "storage": { + "prefix": "Balances", + "items": [ + { + "name": "TotalIssuance", + "modifier": "Default", + "type": { + "Plain": "Balance" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The total units issued in the system." + ] + }, + { + "name": "Account", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "AccountData", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The balance of an account.", + "", + " NOTE: This is only used in the case that this module is used to store balances." + ] + }, + { + "name": "Locks", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Any liquidity locks on some account balances.", + " NOTE: Should only be accessed when setting, changing and freeing a lock." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "Releases" + }, + "fallback": "0x00", + "documentation": [ + " Storage version of the pallet.", + "", + " This is set to v2.0.0 for new networks." + ] + } + ] + }, + "calls": [ + { + "name": "transfer", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Transfer some liquid free balance to another account.", + "", + " `transfer` will set the `FreeBalance` of the sender and receiver.", + " It will decrease the total issuance of the system by the `TransferFee`.", + " If the sender's account is below the existential deposit as a result", + " of the transfer, the account will be reaped.", + "", + " The dispatch origin for this call must be `Signed` by the transactor.", + "", + " # ", + " - Dependent on arguments but not critical, given proper implementations for", + " input config types. See related functions below.", + " - It contains a limited number of reads and writes internally and no complex computation.", + "", + " Related functions:", + "", + " - `ensure_can_withdraw` is always called internally but has a bounded complexity.", + " - Transferring balances to accounts that did not exist before will cause", + " `T::OnNewAccount::on_new_account` to be called.", + " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`.", + " - `transfer_keep_alive` works the same way as `transfer`, but has an additional", + " check that the transfer will not kill the origin account.", + " ---------------------------------", + " - Base Weight: 73.64 µs, worst case scenario (account created, account removed)", + " - DB Weight: 1 Read and 1 Write to destination account", + " - Origin account is already in memory, so no DB operations for them.", + " # " + ] + }, + { + "name": "set_balance", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "new_free", + "type": "Compact" + }, + { + "name": "new_reserved", + "type": "Compact" + } + ], + "documentation": [ + " Set the balances of a given account.", + "", + " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", + " also decrease the total issuance of the system (`TotalIssuance`).", + " If the new free or reserved balance is below the existential deposit,", + " it will reset the account nonce (`frame_system::AccountNonce`).", + "", + " The dispatch origin for this call is `root`.", + "", + " # ", + " - Independent of the arguments.", + " - Contains a limited number of reads and writes.", + " ---------------------", + " - Base Weight:", + " - Creating: 27.56 µs", + " - Killing: 35.11 µs", + " - DB Weight: 1 Read, 1 Write to `who`", + " # " + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Exactly as `transfer`, except the origin must be root and the source account may be", + " specified.", + " # ", + " - Same as transfer, but additional read and write because the source account is", + " not assumed to be in the overlay.", + " # " + ] + }, + { + "name": "transfer_keep_alive", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Same as the [`transfer`] call, but with a check that the transfer will not kill the", + " origin account.", + "", + " 99% of the time you want [`transfer`] instead.", + "", + " [`transfer`]: struct.Module.html#method.transfer", + " # ", + " - Cheaper than transfer because account cannot be killed.", + " - Base Weight: 51.4 µs", + " - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)", + " #" + ] + } + ], + "events": [ + { + "name": "Endowed", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account was created with some free balance. [account, free_balance]" + ] + }, + { + "name": "DustLost", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account was removed whose balance was non-zero but below ExistentialDeposit,", + " resulting in an outright loss. [account, balance]" + ] + }, + { + "name": "Transfer", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Transfer succeeded. [from, to, value]" + ] + }, + { + "name": "BalanceSet", + "args": [ + "AccountId", + "Balance", + "Balance" + ], + "documentation": [ + " A balance was set by root. [who, free, reserved]" + ] + }, + { + "name": "Deposit", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some amount was deposited (e.g. for transaction fees). [who, deposit]" + ] + }, + { + "name": "Reserved", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some balance was reserved (moved from free to reserved). [who, value]" + ] + }, + { + "name": "Unreserved", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some balance was unreserved (moved from reserved to free). [who, value]" + ] + }, + { + "name": "ReserveRepatriated", + "args": [ + "AccountId", + "AccountId", + "Balance", + "BalanceStatus" + ], + "documentation": [ + " Some balance was moved from the reserve of the first account to the second account.", + " Final argument indicates the destination balance type.", + " [from, to, balance, destination_status]" + ] + } + ], + "constants": [ + { + "name": "ExistentialDeposit", + "type": "Balance", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The minimum amount required to keep an account open." + ] + } + ], + "errors": [ + { + "name": "VestingBalance", + "documentation": [ + " Vesting balance too high to send value" + ] + }, + { + "name": "LiquidityRestrictions", + "documentation": [ + " Account liquidity restrictions prevent withdrawal" + ] + }, + { + "name": "Overflow", + "documentation": [ + " Got an overflow after adding" + ] + }, + { + "name": "InsufficientBalance", + "documentation": [ + " Balance too low to send value" + ] + }, + { + "name": "ExistentialDeposit", + "documentation": [ + " Value too low to create account due to existential deposit" + ] + }, + { + "name": "KeepAlive", + "documentation": [ + " Transfer/payment would kill account" + ] + }, + { + "name": "ExistingVestingSchedule", + "documentation": [ + " A vesting schedule already exists for this account" + ] + }, + { + "name": "DeadAccount", + "documentation": [ + " Beneficiary account must pre-exist" + ] + } + ] + }, + { + "name": "TransactionPayment", + "storage": { + "prefix": "TransactionPayment", + "items": [ + { + "name": "NextFeeMultiplier", + "modifier": "Default", + "type": { + "Plain": "Multiplier" + }, + "fallback": "0x000064a7b3b6e00d0000000000000000", + "documentation": [] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "Releases" + }, + "fallback": "0x00", + "documentation": [] + } + ] + }, + "calls": null, + "events": null, + "constants": [ + { + "name": "TransactionByteFee", + "type": "BalanceOf", + "value": "0x00e40b54020000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + }, + { + "name": "WeightToFee", + "type": "Vec", + "value": "0x0401000000000000000000000000000000000000000001", + "documentation": [ + " The polynomial that is applied in order to derive fee from weight." + ] + } + ], + "errors": [] + }, + { + "name": "Staking", + "storage": { + "prefix": "Staking", + "items": [ + { + "name": "HistoryDepth", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x54000000", + "documentation": [ + " Number of eras to keep in history.", + "", + " Information is kept for eras in `[current_era - history_depth; current_era]`.", + "", + " Must be more than the number of eras delayed by session otherwise. I.e. active era must", + " always be in history. I.e. `active_era > current_era - history_depth` must be", + " guaranteed." + ] + }, + { + "name": "ValidatorCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The ideal number of staking participants." + ] + }, + { + "name": "MinimumValidatorCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Minimum number of staking participants before emergency conditions are imposed." + ] + }, + { + "name": "Invulnerables", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", + " easy to initialize and the performance hit is minimal (we expect no more than four", + " invulnerables) and restricted to testnets." + ] + }, + { + "name": "Bonded", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all locked \"stash\" accounts to the controller account." + ] + }, + { + "name": "Ledger", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "StakingLedger", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." + ] + }, + { + "name": "Payee", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "RewardDestination", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Where the reward payment should be made. Keyed by stash." + ] + }, + { + "name": "Validators", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "ValidatorPrefs", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The map from (wannabe) validator stash key to the preferences of that validator." + ] + }, + { + "name": "Nominators", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Nominations", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The map from nominator stash key to the set of stash keys of all validators to nominate." + ] + }, + { + "name": "CurrentEra", + "modifier": "Optional", + "type": { + "Plain": "EraIndex" + }, + "fallback": "0x00", + "documentation": [ + " The current era index.", + "", + " This is the latest planned era, depending on how the Session pallet queues the validator", + " set, it might be active or not." + ] + }, + { + "name": "ActiveEra", + "modifier": "Optional", + "type": { + "Plain": "ActiveEraInfo" + }, + "fallback": "0x00", + "documentation": [ + " The active era information, it holds index and start.", + "", + " The active era is the era currently rewarded.", + " Validator set of this era must be equal to `SessionInterface::validators`." + ] + }, + { + "name": "ErasStartSessionIndex", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "SessionIndex", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The session index at which the era start for the last `HISTORY_DEPTH` eras." + ] + }, + { + "name": "ErasStakers", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "Exposure", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x000000", + "documentation": [ + " Exposure of validator at era.", + "", + " This is keyed first by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras.", + " If stakers hasn't been set or has been removed then empty exposure is returned." + ] + }, + { + "name": "ErasStakersClipped", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "Exposure", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x000000", + "documentation": [ + " Clipped Exposure of validator at era.", + "", + " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the", + " `T::MaxNominatorRewardedPerValidator` biggest stakers.", + " (Note: the field `total` and `own` of the exposure remains unchanged).", + " This is used to limit the i/o cost for the nominator payout.", + "", + " This is keyed fist by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras.", + " If stakers hasn't been set or has been removed then empty exposure is returned." + ] + }, + { + "name": "ErasValidatorPrefs", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "ValidatorPrefs", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Similar to `ErasStakers`, this holds the preferences of validators.", + "", + " This is keyed first by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras." + ] + }, + { + "name": "ErasValidatorReward", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "BalanceOf", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The total validator era payout for the last `HISTORY_DEPTH` eras.", + "", + " Eras that haven't finished yet or has been removed doesn't have reward." + ] + }, + { + "name": "ErasRewardPoints", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "EraRewardPoints", + "linked": false + } + }, + "fallback": "0x0000000000", + "documentation": [ + " Rewards for the last `HISTORY_DEPTH` eras.", + " If reward hasn't been set or has been removed then 0 reward is returned." + ] + }, + { + "name": "ErasTotalStake", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "BalanceOf", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The total amount staked for the last `HISTORY_DEPTH` eras.", + " If total hasn't been set or has been removed then 0 stake is returned." + ] + }, + { + "name": "ForceEra", + "modifier": "Default", + "type": { + "Plain": "Forcing" + }, + "fallback": "0x00", + "documentation": [ + " Mode of era forcing." + ] + }, + { + "name": "SlashRewardFraction", + "modifier": "Default", + "type": { + "Plain": "Perbill" + }, + "fallback": "0x00000000", + "documentation": [ + " The percentage of the slash that is distributed to reporters.", + "", + " The rest of the slashed value is handled by the `Slash`." + ] + }, + { + "name": "CanceledSlashPayout", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of currency given to reporters of a slash event which was", + " canceled by extraordinary circumstances (e.g. governance)." + ] + }, + { + "name": "UnappliedSlashes", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " All unapplied slashes that are queued for later." + ] + }, + { + "name": "BondedEras", + "modifier": "Default", + "type": { + "Plain": "Vec<(EraIndex,SessionIndex)>" + }, + "fallback": "0x00", + "documentation": [ + " A mapping from still-bonded eras to the first session index of that era.", + "", + " Must contains information for eras for the range:", + " `[active_era - bounding_duration; active_era]`" + ] + }, + { + "name": "ValidatorSlashInEra", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "(Perbill,BalanceOf)", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on validators, mapped by era to the highest slash proportion", + " and slash value of the era." + ] + }, + { + "name": "NominatorSlashInEra", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "BalanceOf", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on nominators, mapped by era to the highest slash value of the era." + ] + }, + { + "name": "SlashingSpans", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "SlashingSpans", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Slashing spans for stash accounts." + ] + }, + { + "name": "SpanSlash", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "(AccountId,SpanIndex)", + "value": "SpanRecord", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Records information about the maximum slash of a stash within a slashing span,", + " as well as how much reward has been paid out." + ] + }, + { + "name": "EarliestUnappliedSlash", + "modifier": "Optional", + "type": { + "Plain": "EraIndex" + }, + "fallback": "0x00", + "documentation": [ + " The earliest era for which we have a pending, unapplied slash." + ] + }, + { + "name": "SnapshotValidators", + "modifier": "Optional", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Snapshot of validators at the beginning of the current election window. This should only", + " have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`." + ] + }, + { + "name": "SnapshotNominators", + "modifier": "Optional", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Snapshot of nominators at the beginning of the current election window. This should only", + " have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`." + ] + }, + { + "name": "QueuedElected", + "modifier": "Optional", + "type": { + "Plain": "ElectionResult" + }, + "fallback": "0x00", + "documentation": [ + " The next validator set. At the end of an era, if this is available (potentially from the", + " result of an offchain worker), it is immediately used. Otherwise, the on-chain election", + " is executed." + ] + }, + { + "name": "QueuedScore", + "modifier": "Optional", + "type": { + "Plain": "ElectionScore" + }, + "fallback": "0x00", + "documentation": [ + " The score of the current [`QueuedElected`]." + ] + }, + { + "name": "EraElectionStatus", + "modifier": "Default", + "type": { + "Plain": "ElectionStatus" + }, + "fallback": "0x00", + "documentation": [ + " Flag to control the execution of the offchain election. When `Open(_)`, we accept", + " solutions to be submitted." + ] + }, + { + "name": "IsCurrentSessionFinal", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the current **planned** session is final. Note that this does not take era", + " forcing into account." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "Releases" + }, + "fallback": "0x03", + "documentation": [ + " True if network has been upgraded to this version.", + " Storage version of the pallet.", + "", + " This is set to v3.0.0 for new networks." + ] + } + ] + }, + "calls": [ + { + "name": "bond", + "args": [ + { + "name": "controller", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " Take the origin account as a stash and lock up `value` of its balance. `controller` will", + " be the account that controls it.", + "", + " `value` must be more than the `minimum_balance` specified by `T::Currency`.", + "", + " The dispatch origin for this call must be _Signed_ by the stash account.", + "", + " Emits `Bonded`.", + "", + " # ", + " - Independent of the arguments. Moderate complexity.", + " - O(1).", + " - Three extra DB entries.", + "", + " NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned", + " unless the `origin` falls below _existential deposit_ and gets removed as dust.", + " ------------------", + " Base Weight: 67.87 µs", + " DB Weight:", + " - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks", + " - Write: Bonded, Payee, [Origin Account], Locks, Ledger", + " # " + ] + }, + { + "name": "bond_extra", + "args": [ + { + "name": "max_additional", + "type": "Compact" + } + ], + "documentation": [ + " Add some extra amount that have appeared in the stash `free_balance` into the balance up", + " for staking.", + "", + " Use this if there are additional funds in your stash account that you wish to bond.", + " Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount", + " that can be added.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller and", + " it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " Emits `Bonded`.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - O(1).", + " - One DB entry.", + " ------------", + " Base Weight: 54.88 µs", + " DB Weight:", + " - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks", + " - Write: [Origin Account], Locks, Ledger", + " # " + ] + }, + { + "name": "unbond", + "args": [ + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", + " period ends. If this leaves an amount actively bonded less than", + " T::Currency::minimum_balance(), then it is increased to the full amount.", + "", + " Once the unlock period is done, you can call `withdraw_unbonded` to actually move", + " the funds out of management ready for transfer.", + "", + " No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)", + " can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need", + " to be called first to remove some of the chunks (if possible).", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " Emits `Unbonded`.", + "", + " See also [`Call::withdraw_unbonded`].", + "", + " # ", + " - Independent of the arguments. Limited but potentially exploitable complexity.", + " - Contains a limited number of reads.", + " - Each call (requires the remainder of the bonded balance to be above `minimum_balance`)", + " will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage.", + " The only way to clean the aforementioned storage item is also user-controlled via", + " `withdraw_unbonded`.", + " - One DB entry.", + " ----------", + " Base Weight: 50.34 µs", + " DB Weight:", + " - Read: Era Election Status, Ledger, Current Era, Locks, [Origin Account]", + " - Write: [Origin Account], Locks, Ledger", + " " + ] + }, + { + "name": "withdraw_unbonded", + "args": [ + { + "name": "num_slashing_spans", + "type": "u32" + } + ], + "documentation": [ + " Remove any unlocked chunks from the `unlocking` queue from our management.", + "", + " This essentially frees up that balance to be used by the stash account to do", + " whatever it wants.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " Emits `Withdrawn`.", + "", + " See also [`Call::unbond`].", + "", + " # ", + " - Could be dependent on the `origin` argument and how much `unlocking` chunks exist.", + " It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is", + " indirectly user-controlled. See [`unbond`] for more detail.", + " - Contains a limited number of reads, yet the size of which could be large based on `ledger`.", + " - Writes are limited to the `origin` account key.", + " ---------------", + " Complexity O(S) where S is the number of slashing spans to remove", + " Base Weight:", + " Update: 50.52 + .028 * S µs", + " - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account]", + " - Writes: [Origin Account], Locks, Ledger", + " Kill: 79.41 + 2.366 * S µs", + " - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin Account], Locks", + " - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, [Origin Account], Locks", + " - Writes Each: SpanSlash * S", + " NOTE: Weight annotation is the kill scenario, we refund otherwise.", + " # " + ] + }, + { + "name": "validate", + "args": [ + { + "name": "prefs", + "type": "ValidatorPrefs" + } + ], + "documentation": [ + " Declare the desire to validate for the origin controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " -----------", + " Base Weight: 17.13 µs", + " DB Weight:", + " - Read: Era Election Status, Ledger", + " - Write: Nominators, Validators", + " # " + ] + }, + { + "name": "nominate", + "args": [ + { + "name": "targets", + "type": "Vec" + } + ], + "documentation": [ + " Declare the desire to nominate `targets` for the origin controller.", + "", + " Effects will be felt at the beginning of the next era. This can only be called when", + " [`EraElectionStatus`] is `Closed`.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - The transaction's complexity is proportional to the size of `targets` (N)", + " which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).", + " - Both the reads and writes follow a similar pattern.", + " ---------", + " Base Weight: 22.34 + .36 * N µs", + " where N is the number of targets", + " DB Weight:", + " - Reads: Era Election Status, Ledger, Current Era", + " - Writes: Validators, Nominators", + " # " + ] + }, + { + "name": "chill", + "args": [], + "documentation": [ + " Declare no desire to either validate or nominate.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains one read.", + " - Writes are limited to the `origin` account key.", + " --------", + " Base Weight: 16.53 µs", + " DB Weight:", + " - Read: EraElectionStatus, Ledger", + " - Write: Validators, Nominators", + " # " + ] + }, + { + "name": "set_payee", + "args": [ + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " (Re-)set the payment target for a controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " ---------", + " - Base Weight: 11.33 µs", + " - DB Weight:", + " - Read: Ledger", + " - Write: Payee", + " # " + ] + }, + { + "name": "set_controller", + "args": [ + { + "name": "controller", + "type": "LookupSource" + } + ], + "documentation": [ + " (Re-)set the controller of a stash.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " ----------", + " Base Weight: 25.22 µs", + " DB Weight:", + " - Read: Bonded, Ledger New Controller, Ledger Old Controller", + " - Write: Bonded, Ledger New Controller, Ledger Old Controller", + " # " + ] + }, + { + "name": "set_validator_count", + "args": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Sets the ideal number of validators.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " Base Weight: 1.717 µs", + " Write: Validator Count", + " # " + ] + }, + { + "name": "increase_validator_count", + "args": [ + { + "name": "additional", + "type": "Compact" + } + ], + "documentation": [ + " Increments the ideal number of validators.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " Base Weight: 1.717 µs", + " Read/Write: Validator Count", + " # " + ] + }, + { + "name": "scale_validator_count", + "args": [ + { + "name": "factor", + "type": "Percent" + } + ], + "documentation": [ + " Scale up the ideal number of validators by a factor.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " Base Weight: 1.717 µs", + " Read/Write: Validator Count", + " # " + ] + }, + { + "name": "force_no_eras", + "args": [], + "documentation": [ + " Force there to be no new eras indefinitely.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " - No arguments.", + " - Base Weight: 1.857 µs", + " - Write: ForceEra", + " # " + ] + }, + { + "name": "force_new_era", + "args": [], + "documentation": [ + " Force there to be a new era at the end of the next session. After this, it will be", + " reset to normal (non-forced) behaviour.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " - No arguments.", + " - Base Weight: 1.959 µs", + " - Write ForceEra", + " # " + ] + }, + { + "name": "set_invulnerables", + "args": [ + { + "name": "validators", + "type": "Vec" + } + ], + "documentation": [ + " Set the validators who cannot be slashed (if any).", + "", + " The dispatch origin must be Root.", + "", + " # ", + " - O(V)", + " - Base Weight: 2.208 + .006 * V µs", + " - Write: Invulnerables", + " # " + ] + }, + { + "name": "force_unstake", + "args": [ + { + "name": "stash", + "type": "AccountId" + }, + { + "name": "num_slashing_spans", + "type": "u32" + } + ], + "documentation": [ + " Force a current staker to become completely unstaked, immediately.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " O(S) where S is the number of slashing spans to be removed", + " Base Weight: 53.07 + 2.365 * S µs", + " Reads: Bonded, Slashing Spans, Account, Locks", + " Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks", + " Writes Each: SpanSlash * S", + " # " + ] + }, + { + "name": "force_new_era_always", + "args": [], + "documentation": [ + " Force there to be a new era at the end of sessions indefinitely.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " - Base Weight: 2.05 µs", + " - Write: ForceEra", + " # " + ] + }, + { + "name": "cancel_deferred_slash", + "args": [ + { + "name": "era", + "type": "EraIndex" + }, + { + "name": "slash_indices", + "type": "Vec" + } + ], + "documentation": [ + " Cancel enactment of a deferred slash.", + "", + " Can be called by the `T::SlashCancelOrigin`.", + "", + " Parameters: era and indices of the slashes for that era to kill.", + "", + " # ", + " Complexity: O(U + S)", + " with U unapplied slashes weighted with U=1000", + " and S is the number of slash indices to be canceled.", + " - Base: 5870 + 34.61 * S µs", + " - Read: Unapplied Slashes", + " - Write: Unapplied Slashes", + " # " + ] + }, + { + "name": "payout_stakers", + "args": [ + { + "name": "validator_stash", + "type": "AccountId" + }, + { + "name": "era", + "type": "EraIndex" + } + ], + "documentation": [ + " Pay out all the stakers behind a single validator for a single era.", + "", + " - `validator_stash` is the stash account of the validator. Their nominators, up to", + " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards.", + " - `era` may be any era between `[current_era - history_depth; current_era]`.", + "", + " The origin of this call must be _Signed_. Any account can call this function, even if", + " it is not one of the stakers.", + "", + " This can only be called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Time complexity: at most O(MaxNominatorRewardedPerValidator).", + " - Contains a limited number of reads and writes.", + " -----------", + " N is the Number of payouts for the validator (including the validator)", + " Base Weight:", + " - Reward Destination Staked: 110 + 54.2 * N µs (Median Slopes)", + " - Reward Destination Controller (Creating): 120 + 41.95 * N µs (Median Slopes)", + " DB Weight:", + " - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward,", + " ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items)", + " - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items)", + " - Write Each: System Account, Locks, Ledger (3 items)", + " # " + ] + }, + { + "name": "rebond", + "args": [ + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Rebond a portion of the stash scheduled to be unlocked.", + "", + " The dispatch origin must be signed by the controller, and it can be only called when", + " [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Time complexity: O(L), where L is unlocking chunks", + " - Bounded by `MAX_UNLOCKING_CHUNKS`.", + " - Storage changes: Can't increase storage, only decrease it.", + " ---------------", + " - Base Weight: 34.51 µs * .048 L µs", + " - DB Weight:", + " - Reads: EraElectionStatus, Ledger, Locks, [Origin Account]", + " - Writes: [Origin Account], Locks, Ledger", + " # " + ] + }, + { + "name": "set_history_depth", + "args": [ + { + "name": "new_history_depth", + "type": "Compact" + }, + { + "name": "_era_items_deleted", + "type": "Compact" + } + ], + "documentation": [ + " Set `HistoryDepth` value. This function will delete any history information", + " when `HistoryDepth` is reduced.", + "", + " Parameters:", + " - `new_history_depth`: The new history depth you would like to set.", + " - `era_items_deleted`: The number of items that will be deleted by this dispatch.", + " This should report all the storage items that will be deleted by clearing old", + " era history. Needed to report an accurate weight for the dispatch. Trusted by", + " `Root` to report an accurate number.", + "", + " Origin must be root.", + "", + " # ", + " - E: Number of history depths removed, i.e. 10 -> 7 = 3", + " - Base Weight: 29.13 * E µs", + " - DB Weight:", + " - Reads: Current Era, History Depth", + " - Writes: History Depth", + " - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs", + " - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex", + " # " + ] + }, + { + "name": "reap_stash", + "args": [ + { + "name": "stash", + "type": "AccountId" + }, + { + "name": "num_slashing_spans", + "type": "u32" + } + ], + "documentation": [ + " Remove all data structure concerning a staker/stash once its balance is zero.", + " This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone", + " and the target `stash` must have no funds left.", + "", + " This can be called from any origin.", + "", + " - `stash`: The stash account to reap. Its balance must be zero.", + "", + " # ", + " Complexity: O(S) where S is the number of slashing spans on the account.", + " Base Weight: 75.94 + 2.396 * S µs", + " DB Weight:", + " - Reads: Stash Account, Bonded, Slashing Spans, Locks", + " - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks", + " - Writes Each: SpanSlash * S", + " # " + ] + }, + { + "name": "submit_election_solution", + "args": [ + { + "name": "winners", + "type": "Vec" + }, + { + "name": "compact", + "type": "CompactAssignments" + }, + { + "name": "score", + "type": "ElectionScore" + }, + { + "name": "era", + "type": "EraIndex" + }, + { + "name": "size", + "type": "ElectionSize" + } + ], + "documentation": [ + " Submit an election result to the chain. If the solution:", + "", + " 1. is valid.", + " 2. has a better score than a potentially existing solution on chain.", + "", + " then, it will be _put_ on chain.", + "", + " A solution consists of two pieces of data:", + "", + " 1. `winners`: a flat vector of all the winners of the round.", + " 2. `assignments`: the compact version of an assignment vector that encodes the edge", + " weights.", + "", + " Both of which may be computed using _phragmen_, or any other algorithm.", + "", + " Additionally, the submitter must provide:", + "", + " - The `score` that they claim their solution has.", + "", + " Both validators and nominators will be represented by indices in the solution. The", + " indices should respect the corresponding types ([`ValidatorIndex`] and", + " [`NominatorIndex`]). Moreover, they should be valid when used to index into", + " [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the", + " solution to be rejected. These two storage items are set during the election window and", + " may be used to determine the indices.", + "", + " A solution is valid if:", + "", + " 0. It is submitted when [`EraElectionStatus`] is `Open`.", + " 1. Its claimed score is equal to the score computed on-chain.", + " 2. Presents the correct number of winners.", + " 3. All indexes must be value according to the snapshot vectors. All edge values must", + " also be correct and should not overflow the granularity of the ratio type (i.e. 256", + " or billion).", + " 4. For each edge, all targets are actually nominated by the voter.", + " 5. Has correct self-votes.", + "", + " A solutions score is consisted of 3 parameters:", + "", + " 1. `min { support.total }` for each support of a winner. This value should be maximized.", + " 2. `sum { support.total }` for each support of a winner. This value should be minimized.", + " 3. `sum { support.total^2 }` for each support of a winner. This value should be", + " minimized (to ensure less variance)", + "", + " # ", + " See `crate::weight` module.", + " # " + ] + }, + { + "name": "submit_election_solution_unsigned", + "args": [ + { + "name": "winners", + "type": "Vec" + }, + { + "name": "compact", + "type": "CompactAssignments" + }, + { + "name": "score", + "type": "ElectionScore" + }, + { + "name": "era", + "type": "EraIndex" + }, + { + "name": "size", + "type": "ElectionSize" + } + ], + "documentation": [ + " Unsigned version of `submit_election_solution`.", + "", + " Note that this must pass the [`ValidateUnsigned`] check which only allows transactions", + " from the local node to be included. In other words, only the block author can include a", + " transaction in the block.", + "", + " # ", + " See `crate::weight` module.", + " # " + ] + } + ], + "events": [ + { + "name": "EraPayout", + "args": [ + "EraIndex", + "Balance", + "Balance" + ], + "documentation": [ + " The era payout has been set; the first balance is the validator-payout; the second is", + " the remainder from the maximum amount of reward.", + " [era_index, validator_payout, remainder]" + ] + }, + { + "name": "Reward", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " The staker has been rewarded by this amount. [stash, amount]" + ] + }, + { + "name": "Slash", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " One validator (and its nominators) has been slashed by the given amount.", + " [validator, amount]" + ] + }, + { + "name": "OldSlashingReportDiscarded", + "args": [ + "SessionIndex" + ], + "documentation": [ + " An old slashing report from a prior era was discarded because it could", + " not be processed. [session_index]" + ] + }, + { + "name": "StakingElection", + "args": [ + "ElectionCompute" + ], + "documentation": [ + " A new set of stakers was elected with the given [compute]." + ] + }, + { + "name": "SolutionStored", + "args": [ + "ElectionCompute" + ], + "documentation": [ + " A new solution for the upcoming election has been stored. [compute]" + ] + }, + { + "name": "Bonded", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has bonded this amount. [stash, amount]", + "", + " NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,", + " it will not be emitted for staking rewards when they are added to stake." + ] + }, + { + "name": "Unbonded", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has unbonded this amount. [stash, amount]" + ] + }, + { + "name": "Withdrawn", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`", + " from the unlocking queue. [stash, amount]" + ] + } + ], + "constants": [ + { + "name": "SessionsPerEra", + "type": "SessionIndex", + "value": "0x06000000", + "documentation": [ + " Number of sessions per era." + ] + }, + { + "name": "BondingDuration", + "type": "EraIndex", + "value": "0xa0020000", + "documentation": [ + " Number of eras that staked funds must remain bonded for." + ] + }, + { + "name": "SlashDeferDuration", + "type": "EraIndex", + "value": "0xa8000000", + "documentation": [ + " Number of eras that slashes are deferred by, after computation.", + "", + " This should be less than the bonding duration.", + " Set to 0 if slashes should be applied immediately, without opportunity for", + " intervention." + ] + }, + { + "name": "ElectionLookahead", + "type": "BlockNumber", + "value": "0x32000000", + "documentation": [ + " The number of blocks before the end of the era from which election submissions are allowed.", + "", + " Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will", + " be used.", + "", + " This is bounded by being within the last session. Hence, setting it to a value more than the", + " length of a session will be pointless." + ] + }, + { + "name": "MaxIterations", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " Maximum number of balancing iterations to run in the offchain submission.", + "", + " If set to 0, balance_solution will not be executed at all." + ] + }, + { + "name": "MinSolutionScoreBump", + "type": "Perbill", + "value": "0x20a10700", + "documentation": [ + " The threshold of improvement that should be provided for a new solution to be accepted." + ] + }, + { + "name": "MaxNominatorRewardedPerValidator", + "type": "u32", + "value": "0x40000000", + "documentation": [ + " The maximum number of nominators rewarded for each validator.", + "", + " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim", + " their reward. This used to limit the i/o cost for the nominator payout." + ] + } + ], + "errors": [ + { + "name": "NotController", + "documentation": [ + " Not a controller account." + ] + }, + { + "name": "NotStash", + "documentation": [ + " Not a stash account." + ] + }, + { + "name": "AlreadyBonded", + "documentation": [ + " Stash is already bonded." + ] + }, + { + "name": "AlreadyPaired", + "documentation": [ + " Controller is already paired." + ] + }, + { + "name": "EmptyTargets", + "documentation": [ + " Targets cannot be empty." + ] + }, + { + "name": "DuplicateIndex", + "documentation": [ + " Duplicate index." + ] + }, + { + "name": "InvalidSlashIndex", + "documentation": [ + " Slash record index out of bounds." + ] + }, + { + "name": "InsufficientValue", + "documentation": [ + " Can not bond with value less than minimum balance." + ] + }, + { + "name": "NoMoreChunks", + "documentation": [ + " Can not schedule more unlock chunks." + ] + }, + { + "name": "NoUnlockChunk", + "documentation": [ + " Can not rebond without unlocking chunks." + ] + }, + { + "name": "FundedTarget", + "documentation": [ + " Attempting to target a stash that still has funds." + ] + }, + { + "name": "InvalidEraToReward", + "documentation": [ + " Invalid era to reward." + ] + }, + { + "name": "InvalidNumberOfNominations", + "documentation": [ + " Invalid number of nominations." + ] + }, + { + "name": "NotSortedAndUnique", + "documentation": [ + " Items are not sorted and unique." + ] + }, + { + "name": "AlreadyClaimed", + "documentation": [ + " Rewards for this era have already been claimed for this validator." + ] + }, + { + "name": "OffchainElectionEarlySubmission", + "documentation": [ + " The submitted result is received out of the open window." + ] + }, + { + "name": "OffchainElectionWeakSubmission", + "documentation": [ + " The submitted result is not as good as the one stored on chain." + ] + }, + { + "name": "SnapshotUnavailable", + "documentation": [ + " The snapshot data of the current window is missing." + ] + }, + { + "name": "OffchainElectionBogusWinnerCount", + "documentation": [ + " Incorrect number of winners were presented." + ] + }, + { + "name": "OffchainElectionBogusWinner", + "documentation": [ + " One of the submitted winners is not an active candidate on chain (index is out of range", + " in snapshot)." + ] + }, + { + "name": "OffchainElectionBogusCompact", + "documentation": [ + " Error while building the assignment type from the compact. This can happen if an index", + " is invalid, or if the weights _overflow_." + ] + }, + { + "name": "OffchainElectionBogusNominator", + "documentation": [ + " One of the submitted nominators is not an active nominator on chain." + ] + }, + { + "name": "OffchainElectionBogusNomination", + "documentation": [ + " One of the submitted nominators has an edge to which they have not voted on chain." + ] + }, + { + "name": "OffchainElectionSlashedNomination", + "documentation": [ + " One of the submitted nominators has an edge which is submitted before the last non-zero", + " slash of the target." + ] + }, + { + "name": "OffchainElectionBogusSelfVote", + "documentation": [ + " A self vote must only be originated from a validator to ONLY themselves." + ] + }, + { + "name": "OffchainElectionBogusEdge", + "documentation": [ + " The submitted result has unknown edges that are not among the presented winners." + ] + }, + { + "name": "OffchainElectionBogusScore", + "documentation": [ + " The claimed score does not match with the one computed from the data." + ] + }, + { + "name": "OffchainElectionBogusElectionSize", + "documentation": [ + " The election size is invalid." + ] + }, + { + "name": "CallNotAllowed", + "documentation": [ + " The call is not allowed at the given time due to restrictions of election period." + ] + }, + { + "name": "IncorrectHistoryDepth", + "documentation": [ + " Incorrect previous history depth input provided." + ] + }, + { + "name": "IncorrectSlashingSpans", + "documentation": [ + " Incorrect number of slashing spans provided." + ] + } + ] + }, + { + "name": "Session", + "storage": { + "prefix": "Session", + "items": [ + { + "name": "Validators", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of validators." + ] + }, + { + "name": "CurrentIndex", + "modifier": "Default", + "type": { + "Plain": "SessionIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Current index of the session." + ] + }, + { + "name": "QueuedChanged", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the underlying economic identities or weighting behind the validators", + " has changed in the queued validator set." + ] + }, + { + "name": "QueuedKeys", + "modifier": "Default", + "type": { + "Plain": "Vec<(ValidatorId,Keys)>" + }, + "fallback": "0x00", + "documentation": [ + " The queued keys for the next session. When the next session begins, these keys", + " will be used to determine the validator's session keys." + ] + }, + { + "name": "DisabledValidators", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Indices of disabled validators.", + "", + " The set is cleared when `on_session_ending` returns a new set of identities." + ] + }, + { + "name": "NextKeys", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "ValidatorId", + "value": "Keys", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The next session keys for a validator." + ] + }, + { + "name": "KeyOwner", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "(KeyTypeId,Bytes)", + "value": "ValidatorId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The owner of a key. The key is the `KeyTypeId` + the encoded key." + ] + } + ] + }, + "calls": [ + { + "name": "set_keys", + "args": [ + { + "name": "keys", + "type": "Keys" + }, + { + "name": "proof", + "type": "Bytes" + } + ], + "documentation": [ + " Sets the session key(s) of the function caller to `keys`.", + " Allows an account to set its session key prior to becoming a validator.", + " This doesn't take effect until the next session.", + "", + " The dispatch origin of this function must be signed.", + "", + " # ", + " - Complexity: `O(1)`", + " Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.", + " - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`", + " - DbWrites: `origin account`, `NextKeys`", + " - DbReads per key id: `KeyOwner`", + " - DbWrites per key id: `KeyOwner`", + " # " + ] + }, + { + "name": "purge_keys", + "args": [], + "documentation": [ + " Removes any session key(s) of the function caller.", + " This doesn't take effect until the next session.", + "", + " The dispatch origin of this function must be signed.", + "", + " # ", + " - Complexity: `O(1)` in number of key types.", + " Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.", + " - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`", + " - DbWrites: `NextKeys`, `origin account`", + " - DbWrites per key id: `KeyOwnder`", + " # " + ] + } + ], + "events": [ + { + "name": "NewSession", + "args": [ + "SessionIndex" + ], + "documentation": [ + " New session has happened. Note that the argument is the [session_index], not the block", + " number as the type might suggest." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "InvalidProof", + "documentation": [ + " Invalid ownership proof." + ] + }, + { + "name": "NoAssociatedValidatorId", + "documentation": [ + " No associated validator ID for account." + ] + }, + { + "name": "DuplicatedKey", + "documentation": [ + " Registered duplicate key." + ] + }, + { + "name": "NoKeys", + "documentation": [ + " No keys are associated with this account." + ] + } + ] + }, + { + "name": "Democracy", + "storage": { + "prefix": "Democracy", + "items": [ + { + "name": "PublicPropCount", + "modifier": "Default", + "type": { + "Plain": "PropIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of (public) proposals that have been made so far." + ] + }, + { + "name": "PublicProps", + "modifier": "Default", + "type": { + "Plain": "Vec<(PropIndex,Hash,AccountId)>" + }, + "fallback": "0x00", + "documentation": [ + " The public proposals. Unsorted. The second item is the proposal's hash." + ] + }, + { + "name": "DepositOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "PropIndex", + "value": "(Vec,BalanceOf)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Those who have locked a deposit.", + "", + " TWOX-NOTE: Safe, as increasing integer keys are safe." + ] + }, + { + "name": "Preimages", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "PreimageStatus", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map of hashes to the proposal preimage, along with who registered it and their deposit.", + " The block number is the block at which it was deposited." + ] + }, + { + "name": "ReferendumCount", + "modifier": "Default", + "type": { + "Plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The next free referendum index, aka the number of referenda started so far." + ] + }, + { + "name": "LowestUnbaked", + "modifier": "Default", + "type": { + "Plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The lowest referendum index representing an unbaked referendum. Equal to", + " `ReferendumCount` if there isn't a unbaked referendum." + ] + }, + { + "name": "ReferendumInfoOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "ReferendumIndex", + "value": "ReferendumInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information concerning any given referendum.", + "", + " TWOX-NOTE: SAFE as indexes are not under an attacker’s control." + ] + }, + { + "name": "VotingOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Voting", + "linked": false + } + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " All votes for a particular voter. We store the balance for the number of votes that we", + " have recorded. The second item is the total amount of delegations, that will be added.", + "", + " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway." + ] + }, + { + "name": "Locks", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "BlockNumber", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Accounts for which there are locks in action which may be removed at some point in the", + " future. The value is the block number at which the lock expires and may be removed.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "LastTabledWasExternal", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the last referendum tabled was submitted externally. False if it was a public", + " proposal." + ] + }, + { + "name": "NextExternal", + "modifier": "Optional", + "type": { + "Plain": "(Hash,VoteThreshold)" + }, + "fallback": "0x00", + "documentation": [ + " The referendum to be tabled whenever it would be valid to table an external proposal.", + " This happens when a referendum needs to be tabled and one of two conditions are met:", + " - `LastTabledWasExternal` is `false`; or", + " - `PublicProps` is empty." + ] + }, + { + "name": "Blacklist", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "(BlockNumber,Vec)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A record of who vetoed what. Maps proposal hash to a possible existent block number", + " (until when it may not be resubmitted) and who vetoed it." + ] + }, + { + "name": "Cancellations", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "bool", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Record of all proposals that have been subject to emergency cancellation." + ] + }, + { + "name": "StorageVersion", + "modifier": "Optional", + "type": { + "Plain": "Releases" + }, + "fallback": "0x00", + "documentation": [ + " Storage version of the pallet.", + "", + " New networks start with last version." + ] + } + ] + }, + "calls": [ + { + "name": "propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken.", + "", + " The dispatch origin of this call must be _Signed_ and the sender must", + " have funds to cover the deposit.", + "", + " - `proposal_hash`: The hash of the proposal preimage.", + " - `value`: The amount of deposit (must be at least `MinimumDeposit`).", + "", + " Emits `Proposed`.", + "", + " # ", + " - Complexity: `O(1)`", + " - Db reads: `PublicPropCount`, `PublicProps`", + " - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf`", + " # " + ] + }, + { + "name": "second", + "args": [ + { + "name": "proposal", + "type": "Compact" + }, + { + "name": "seconds_upper_bound", + "type": "Compact" + } + ], + "documentation": [ + " Signals agreement with a particular proposal.", + "", + " The dispatch origin of this call must be _Signed_ and the sender", + " must have funds to cover the deposit, equal to the original deposit.", + "", + " - `proposal`: The index of the proposal to second.", + " - `seconds_upper_bound`: an upper bound on the current number of seconds on this", + " proposal. Extrinsic is weighted according to this value with no refund.", + "", + " # ", + " - Complexity: `O(S)` where S is the number of seconds a proposal already has.", + " - Db reads: `DepositOf`", + " - Db writes: `DepositOf`", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "name": "vote", + "type": "AccountVote" + } + ], + "documentation": [ + " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", + " otherwise it is a vote to keep the status quo.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `ref_index`: The index of the referendum to vote for.", + " - `vote`: The vote configuration.", + "", + " # ", + " - Complexity: `O(R)` where R is the number of referendums the voter has voted on.", + " weight is charged as if maximum votes.", + " - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks`", + " - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks`", + " # " + ] + }, + { + "name": "emergency_cancel", + "args": [ + { + "name": "ref_index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", + " referendum.", + "", + " The dispatch origin of this call must be `CancellationOrigin`.", + "", + " -`ref_index`: The index of the referendum to cancel.", + "", + " # ", + " - Complexity: `O(1)`.", + " - Db reads: `ReferendumInfoOf`, `Cancellations`", + " - Db writes: `ReferendumInfoOf`, `Cancellations`", + " # " + ] + }, + { + "name": "external_propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a referendum to be tabled once it is legal to schedule an external", + " referendum.", + "", + " The dispatch origin of this call must be `ExternalOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal.", + "", + " # ", + " - Complexity `O(V)` with V number of vetoers in the blacklist of proposal.", + " Decoding vec of length V. Charged as maximum", + " - Db reads: `NextExternal`, `Blacklist`", + " - Db writes: `NextExternal`", + " # " + ] + }, + { + "name": "external_propose_majority", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", + " an external referendum.", + "", + " The dispatch of this call must be `ExternalMajorityOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call.", + "", + " # ", + " - Complexity: `O(1)`", + " - Db write: `NextExternal`", + " # " + ] + }, + { + "name": "external_propose_default", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", + " schedule an external referendum.", + "", + " The dispatch of this call must be `ExternalDefaultOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call.", + "", + " # ", + " - Complexity: `O(1)`", + " - Db write: `NextExternal`", + " # " + ] + }, + { + "name": "fast_track", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "voting_period", + "type": "BlockNumber" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Schedule the currently externally-proposed majority-carries referendum to be tabled", + " immediately. If there is no externally-proposed referendum currently, or if there is one", + " but it is not a majority-carries referendum then it fails.", + "", + " The dispatch of this call must be `FastTrackOrigin`.", + "", + " - `proposal_hash`: The hash of the current external proposal.", + " - `voting_period`: The period that is allowed for voting on this proposal. Increased to", + " `FastTrackVotingPeriod` if too low.", + " - `delay`: The number of block after voting has ended in approval and this should be", + " enacted. This doesn't have a minimum amount.", + "", + " Emits `Started`.", + "", + " # ", + " - Complexity: `O(1)`", + " - Db reads: `NextExternal`, `ReferendumCount`", + " - Db writes: `NextExternal`, `ReferendumCount`, `ReferendumInfoOf`", + " - Base Weight: 30.1 µs", + " # " + ] + }, + { + "name": "veto_external", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Veto and blacklist the external proposal hash.", + "", + " The dispatch origin of this call must be `VetoOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal to veto and blacklist.", + "", + " Emits `Vetoed`.", + "", + " # ", + " - Complexity: `O(V + log(V))` where V is number of `existing vetoers`", + " Performs a binary search on `existing_vetoers` which should not be very large.", + " - Db reads: `NextExternal`, `Blacklist`", + " - Db writes: `NextExternal`, `Blacklist`", + " # " + ] + }, + { + "name": "cancel_referendum", + "args": [ + { + "name": "ref_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a referendum.", + "", + " The dispatch origin of this call must be _Root_.", + "", + " - `ref_index`: The index of the referendum to cancel.", + "", + " # ", + " - Complexity: `O(1)`.", + " - Db writes: `ReferendumInfoOf`", + " # " + ] + }, + { + "name": "cancel_queued", + "args": [ + { + "name": "which", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Cancel a proposal queued for enactment.", + "", + " The dispatch origin of this call must be _Root_.", + "", + " - `which`: The index of the referendum to cancel.", + "", + " # ", + " - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`.", + " - Db reads: `scheduler lookup`, scheduler agenda`", + " - Db writes: `scheduler lookup`, scheduler agenda`", + " # " + ] + }, + { + "name": "delegate", + "args": [ + { + "name": "to", + "type": "AccountId" + }, + { + "name": "conviction", + "type": "Conviction" + }, + { + "name": "balance", + "type": "BalanceOf" + } + ], + "documentation": [ + " Delegate the voting power (with some given conviction) of the sending account.", + "", + " The balance delegated is locked for as long as it's delegated, and thereafter for the", + " time appropriate for the conviction's lock period.", + "", + " The dispatch origin of this call must be _Signed_, and the signing account must either:", + " - be delegating already; or", + " - have no voting activity (if there is, then it will need to be removed/consolidated", + " through `reap_vote` or `unvote`).", + "", + " - `to`: The account whose voting the `target` account's voting power will follow.", + " - `conviction`: The conviction that will be attached to the delegated votes. When the", + " account is undelegated, the funds will be locked for the corresponding period.", + " - `balance`: The amount of the account's balance to be used in delegating. This must", + " not be more than the account's current balance.", + "", + " Emits `Delegated`.", + "", + " # ", + " - Complexity: `O(R)` where R is the number of referendums the voter delegating to has", + " voted on. Weight is charged as if maximum votes.", + " - Db reads: 3*`VotingOf`, `origin account locks`", + " - Db writes: 3*`VotingOf`, `origin account locks`", + " - Db reads per votes: `ReferendumInfoOf`", + " - Db writes per votes: `ReferendumInfoOf`", + " # " + ] + }, + { + "name": "undelegate", + "args": [], + "documentation": [ + " Undelegate the voting power of the sending account.", + "", + " Tokens may be unlocked following once an amount of time consistent with the lock period", + " of the conviction with which the delegation was issued.", + "", + " The dispatch origin of this call must be _Signed_ and the signing account must be", + " currently delegating.", + "", + " Emits `Undelegated`.", + "", + " # ", + " - Complexity: `O(R)` where R is the number of referendums the voter delegating to has", + " voted on. Weight is charged as if maximum votes.", + " - Db reads: 2*`VotingOf`", + " - Db writes: 2*`VotingOf`", + " - Db reads per votes: `ReferendumInfoOf`", + " - Db writes per votes: `ReferendumInfoOf`", + " # " + ] + }, + { + "name": "clear_public_proposals", + "args": [], + "documentation": [ + " Clears all public proposals.", + "", + " The dispatch origin of this call must be _Root_.", + "", + " # ", + " - `O(1)`.", + " - Db writes: `PublicProps`", + " # " + ] + }, + { + "name": "note_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", + " in the dispatch queue but does require a deposit, returned once enacted.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `encoded_proposal`: The preimage of a proposal.", + "", + " Emits `PreimageNoted`.", + "", + " # ", + " - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit).", + " - Db reads: `Preimages`", + " - Db writes: `Preimages`", + " # " + ] + }, + { + "name": "note_preimage_operational", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Same as `note_preimage` but origin is `OperationalPreimageOrigin`." + ] + }, + { + "name": "note_imminent_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This requires the proposal to be", + " in the dispatch queue. No deposit is needed. When this call is successful, i.e.", + " the preimage has not been uploaded before and matches some imminent proposal,", + " no fee is paid.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `encoded_proposal`: The preimage of a proposal.", + "", + " Emits `PreimageNoted`.", + "", + " # ", + " - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit).", + " - Db reads: `Preimages`", + " - Db writes: `Preimages`", + " # " + ] + }, + { + "name": "note_imminent_preimage_operational", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`." + ] + }, + { + "name": "reap_preimage", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "proposal_len_upper_bound", + "type": "Compact" + } + ], + "documentation": [ + " Remove an expired proposal preimage and collect the deposit.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `proposal_hash`: The preimage hash of a proposal.", + " - `proposal_length_upper_bound`: an upper bound on length of the proposal.", + " Extrinsic is weighted according to this value with no refund.", + "", + " This will only work after `VotingPeriod` blocks from the time that the preimage was", + " noted, if it's the same account doing it. If it's a different account, then it'll only", + " work an additional `EnactmentPeriod` later.", + "", + " Emits `PreimageReaped`.", + "", + " # ", + " - Complexity: `O(D)` where D is length of proposal.", + " - Db reads: `Preimages`, provider account data", + " - Db writes: `Preimages` provider account data", + " # " + ] + }, + { + "name": "unlock", + "args": [ + { + "name": "target", + "type": "AccountId" + } + ], + "documentation": [ + " Unlock tokens that have an expired lock.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `target`: The account to remove the lock on.", + "", + " # ", + " - Complexity `O(R)` with R number of vote of target.", + " - Db reads: `VotingOf`, `balances locks`, `target account`", + " - Db writes: `VotingOf`, `balances locks`, `target account`", + " # " + ] + }, + { + "name": "remove_vote", + "args": [ + { + "name": "index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Remove a vote for a referendum.", + "", + " If:", + " - the referendum was cancelled, or", + " - the referendum is ongoing, or", + " - the referendum has ended such that", + " - the vote of the account was in opposition to the result; or", + " - there was no conviction to the account's vote; or", + " - the account made a split vote", + " ...then the vote is removed cleanly and a following call to `unlock` may result in more", + " funds being available.", + "", + " If, however, the referendum has ended and:", + " - it finished corresponding to the vote of the account, and", + " - the account made a standard vote with conviction, and", + " - the lock period of the conviction is not over", + " ...then the lock will be aggregated into the overall account's lock, which may involve", + " *overlocking* (where the two locks are combined into a single lock that is the maximum", + " of both the amount locked and the time is it locked for).", + "", + " The dispatch origin of this call must be _Signed_, and the signer must have a vote", + " registered for referendum `index`.", + "", + " - `index`: The index of referendum of the vote to be removed.", + "", + " # ", + " - `O(R + log R)` where R is the number of referenda that `target` has voted on.", + " Weight is calculated for the maximum number of vote.", + " - Db reads: `ReferendumInfoOf`, `VotingOf`", + " - Db writes: `ReferendumInfoOf`, `VotingOf`", + " # " + ] + }, + { + "name": "remove_other_vote", + "args": [ + { + "name": "target", + "type": "AccountId" + }, + { + "name": "index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Remove a vote for a referendum.", + "", + " If the `target` is equal to the signer, then this function is exactly equivalent to", + " `remove_vote`. If not equal to the signer, then the vote must have expired,", + " either because the referendum was cancelled, because the voter lost the referendum or", + " because the conviction period is over.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `target`: The account of the vote to be removed; this account must have voted for", + " referendum `index`.", + " - `index`: The index of referendum of the vote to be removed.", + "", + " # ", + " - `O(R + log R)` where R is the number of referenda that `target` has voted on.", + " Weight is calculated for the maximum number of vote.", + " - Db reads: `ReferendumInfoOf`, `VotingOf`", + " - Db writes: `ReferendumInfoOf`, `VotingOf`", + " # " + ] + }, + { + "name": "enact_proposal", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Enact a proposal from a referendum. For now we just make the weight be the maximum." + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "PropIndex", + "Balance" + ], + "documentation": [ + " A motion has been proposed by a public account. [proposal_index, deposit]" + ] + }, + { + "name": "Tabled", + "args": [ + "PropIndex", + "Balance", + "Vec" + ], + "documentation": [ + " A public proposal has been tabled for referendum vote. [proposal_index, deposit, depositors]" + ] + }, + { + "name": "ExternalTabled", + "args": [], + "documentation": [ + " An external proposal has been tabled." + ] + }, + { + "name": "Started", + "args": [ + "ReferendumIndex", + "VoteThreshold" + ], + "documentation": [ + " A referendum has begun. [ref_index, threshold]" + ] + }, + { + "name": "Passed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been approved by referendum. [ref_index]" + ] + }, + { + "name": "NotPassed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been rejected by referendum. [ref_index]" + ] + }, + { + "name": "Cancelled", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A referendum has been cancelled. [ref_index]" + ] + }, + { + "name": "Executed", + "args": [ + "ReferendumIndex", + "bool" + ], + "documentation": [ + " A proposal has been enacted. [ref_index, is_ok]" + ] + }, + { + "name": "Delegated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " An account has delegated their vote to another account. [who, target]" + ] + }, + { + "name": "Undelegated", + "args": [ + "AccountId" + ], + "documentation": [ + " An [account] has cancelled a previous delegation operation." + ] + }, + { + "name": "Vetoed", + "args": [ + "AccountId", + "Hash", + "BlockNumber" + ], + "documentation": [ + " An external proposal has been vetoed. [who, proposal_hash, until]" + ] + }, + { + "name": "PreimageNoted", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal's preimage was noted, and the deposit taken. [proposal_hash, who, deposit]" + ] + }, + { + "name": "PreimageUsed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal preimage was removed and used (the deposit was returned).", + " [proposal_hash, provider, deposit]" + ] + }, + { + "name": "PreimageInvalid", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was invalid. [proposal_hash, ref_index]" + ] + }, + { + "name": "PreimageMissing", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was missing. [proposal_hash, ref_index]" + ] + }, + { + "name": "PreimageReaped", + "args": [ + "Hash", + "AccountId", + "Balance", + "AccountId" + ], + "documentation": [ + " A registered preimage was removed and the deposit collected by the reaper.", + " [proposal_hash, provider, deposit, reaper]" + ] + }, + { + "name": "Unlocked", + "args": [ + "AccountId" + ], + "documentation": [ + " An [account] has been unlocked successfully." + ] + } + ], + "constants": [ + { + "name": "EnactmentPeriod", + "type": "BlockNumber", + "value": "0x002f0d00", + "documentation": [ + " The minimum period of locking and the period between a proposal being approved and enacted.", + "", + " It should generally be a little more than the unstake period to ensure that", + " voting stakers have an opportunity to remove themselves from the system in the case where", + " they are on the losing side of a vote." + ] + }, + { + "name": "LaunchPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) new public referenda are launched." + ] + }, + { + "name": "VotingPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "MinimumDeposit", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "documentation": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "FastTrackVotingPeriod", + "type": "BlockNumber", + "value": "0x80510100", + "documentation": [ + " Minimum voting period allowed for an emergency referendum." + ] + }, + { + "name": "CooloffPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " Period in blocks where an external proposal may not be re-submitted after being vetoed." + ] + }, + { + "name": "PreimageByteDeposit", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount of balance that must be deposited per byte of preimage stored." + ] + }, + { + "name": "MaxVotes", + "type": "u32", + "value": "0x64000000", + "documentation": [ + " The maximum number of votes for an account." + ] + } + ], + "errors": [ + { + "name": "ValueLow", + "documentation": [ + " Value too low" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal does not exist" + ] + }, + { + "name": "BadIndex", + "documentation": [ + " Unknown index" + ] + }, + { + "name": "AlreadyCanceled", + "documentation": [ + " Cannot cancel the same proposal twice" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Proposal already made" + ] + }, + { + "name": "ProposalBlacklisted", + "documentation": [ + " Proposal still blacklisted" + ] + }, + { + "name": "NotSimpleMajority", + "documentation": [ + " Next external proposal not simple majority" + ] + }, + { + "name": "InvalidHash", + "documentation": [ + " Invalid hash" + ] + }, + { + "name": "NoProposal", + "documentation": [ + " No external proposal" + ] + }, + { + "name": "AlreadyVetoed", + "documentation": [ + " Identity may not veto a proposal twice" + ] + }, + { + "name": "NotDelegated", + "documentation": [ + " Not delegated" + ] + }, + { + "name": "DuplicatePreimage", + "documentation": [ + " Preimage already noted" + ] + }, + { + "name": "NotImminent", + "documentation": [ + " Not imminent" + ] + }, + { + "name": "TooEarly", + "documentation": [ + " Too early" + ] + }, + { + "name": "Imminent", + "documentation": [ + " Imminent" + ] + }, + { + "name": "PreimageMissing", + "documentation": [ + " Preimage not found" + ] + }, + { + "name": "ReferendumInvalid", + "documentation": [ + " Vote given for invalid referendum" + ] + }, + { + "name": "PreimageInvalid", + "documentation": [ + " Invalid preimage" + ] + }, + { + "name": "NoneWaiting", + "documentation": [ + " No proposals waiting" + ] + }, + { + "name": "NotLocked", + "documentation": [ + " The target account does not have a lock." + ] + }, + { + "name": "NotExpired", + "documentation": [ + " The lock on the account to be unlocked has not yet expired." + ] + }, + { + "name": "NotVoter", + "documentation": [ + " The given account did not vote on the referendum." + ] + }, + { + "name": "NoPermission", + "documentation": [ + " The actor has no permission to conduct the action." + ] + }, + { + "name": "AlreadyDelegating", + "documentation": [ + " The account is already delegating." + ] + }, + { + "name": "Overflow", + "documentation": [ + " An unexpected integer overflow occurred." + ] + }, + { + "name": "Underflow", + "documentation": [ + " An unexpected integer underflow occurred." + ] + }, + { + "name": "InsufficientFunds", + "documentation": [ + " Too high a balance was provided that the account cannot afford." + ] + }, + { + "name": "NotDelegating", + "documentation": [ + " The account is not currently delegating." + ] + }, + { + "name": "VotesExist", + "documentation": [ + " The account currently has votes attached to it and the operation cannot succeed until", + " these are removed, either through `unvote` or `reap_vote`." + ] + }, + { + "name": "InstantNotAllowed", + "documentation": [ + " The instant referendum origin is currently disallowed." + ] + }, + { + "name": "Nonsense", + "documentation": [ + " Delegation to oneself makes no sense." + ] + }, + { + "name": "WrongUpperBound", + "documentation": [ + " Invalid upper bound." + ] + }, + { + "name": "MaxVotesReached", + "documentation": [ + " Maximum number of votes reached." + ] + } + ] + }, + { + "name": "Council", + "storage": { + "prefix": "Instance1Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The member who provides the default vote for any other members that do not vote before", + " the timeout. If None, then no member has that privilege." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + }, + { + "name": "prime", + "type": "Option" + }, + { + "name": "old_count", + "type": "MemberCount" + } + ], + "documentation": [ + " Set the collective's membership.", + "", + " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", + " - `prime`: The prime member whose vote sets the default.", + " - `old_count`: The upper bound for the previous number of members in storage.", + " Used for weight estimation.", + "", + " Requires root origin.", + "", + " NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", + " the weight estimations rely on it to estimate dispatchable weight.", + "", + " # ", + " ## Weight", + " - `O(MP + N)` where:", + " - `M` old-members-count (code- and governance-bounded)", + " - `N` new-members-count (code- and governance-bounded)", + " - `P` proposals-count (code-bounded)", + " - DB:", + " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members", + " - 1 storage read (codec `O(P)`) for reading the proposals", + " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", + " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", + " # " + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective.", + "", + " # ", + " ## Weight", + " - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`", + " - DB: 1 read (codec `O(M)`) + DB access of `proposal`", + " - 1 event", + " # " + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Add a new proposal to either be voted on or executed directly.", + "", + " Requires the sender to be member.", + "", + " `threshold` determines whether `proposal` is executed directly (`threshold < 2`)", + " or put up for voting.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1)` or `O(B + M + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - branching is influenced by `threshold` where:", + " - `P1` is proposal execution complexity (`threshold < 2`)", + " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", + " - DB:", + " - 1 storage read `is_member` (codec `O(M)`)", + " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", + " - DB accesses influenced by `threshold`:", + " - EITHER storage accesses done by `proposal` (`threshold < 2`)", + " - OR proposal insertion (`threshold <= 2`)", + " - 1 storage mutation `Proposals` (codec `O(P2)`)", + " - 1 storage mutation `ProposalCount` (codec `O(1)`)", + " - 1 storage write `ProposalOf` (codec `O(B)`)", + " - 1 storage write `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " Add an aye or nay vote for the sender to the given proposal.", + "", + " Requires the sender to be a member.", + "", + " # ", + " ## Weight", + " - `O(M)` where `M` is members-count (code- and governance-bounded)", + " - DB:", + " - 1 storage read `Members` (codec `O(M)`)", + " - 1 storage mutation `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "close", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "proposal_weight_bound", + "type": "Compact" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Close a vote that is either approved, disapproved or whose voting period has ended.", + "", + " May be called by any signed account in order to finish voting and close the proposal.", + "", + " If called before the end of the voting period it will only close the vote if it is", + " has enough votes to be approved or disapproved.", + "", + " If called after the end of the voting period abstentions are counted as rejections", + " unless there is a prime member set and the prime member cast an approval.", + "", + " + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.", + " + `length_bound`: The upper bound for the length of the proposal in storage. Checked via", + " `storage::read` so it is `size_of::() == 4` larger than the pure length.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1 + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - `P1` is the complexity of `proposal` preimage.", + " - `P2` is proposal-count (code-bounded)", + " - DB:", + " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", + " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)", + " - any mutations done while executing `proposal` (`P1`)", + " - up to 3 events", + " # " + ] + }, + { + "name": "disapprove_proposal", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", + "", + " Must be called by the Root origin.", + "", + " Parameters:", + " * `proposal_hash`: The hash of the proposal that should be disapproved.", + "", + " # ", + " Complexity: O(P) where P is the number of max proposals", + " DB Weight:", + " * Reads: Proposals", + " * Writes: Voting, Proposals, ProposalOf", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`).", + " [account, proposal_index, proposal_hash, threshold]" + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`).", + " [account, proposal_hash, voted, yes, no]" + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold.", + " [proposal_hash]" + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold.", + " [proposal_hash]" + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A motion was executed; result will be `Ok` if it returned without error.", + " [proposal_hash, result]" + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A single member did some action; result will be `Ok` if it returned without error.", + " [proposal_hash, result]" + ] + }, + { + "name": "Closed", + "args": [ + "Hash", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A proposal was closed because its threshold was reached or after its duration was up.", + " [proposal_hash, yes, no]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "NotMember", + "documentation": [ + " Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "documentation": [ + " Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "documentation": [ + " Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "documentation": [ + " Members are already initialized!" + ] + }, + { + "name": "TooEarly", + "documentation": [ + " The close call was made too early, before the end of the voting." + ] + }, + { + "name": "TooManyProposals", + "documentation": [ + " There can only be a maximum of `MaxProposals` active proposals." + ] + }, + { + "name": "WrongProposalWeight", + "documentation": [ + " The given weight bound for the proposal was too low." + ] + }, + { + "name": "WrongProposalLength", + "documentation": [ + " The given length bound for the proposal was too low." + ] + } + ] + }, + { + "name": "TechnicalCommittee", + "storage": { + "prefix": "Instance2Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The member who provides the default vote for any other members that do not vote before", + " the timeout. If None, then no member has that privilege." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + }, + { + "name": "prime", + "type": "Option" + }, + { + "name": "old_count", + "type": "MemberCount" + } + ], + "documentation": [ + " Set the collective's membership.", + "", + " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", + " - `prime`: The prime member whose vote sets the default.", + " - `old_count`: The upper bound for the previous number of members in storage.", + " Used for weight estimation.", + "", + " Requires root origin.", + "", + " NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", + " the weight estimations rely on it to estimate dispatchable weight.", + "", + " # ", + " ## Weight", + " - `O(MP + N)` where:", + " - `M` old-members-count (code- and governance-bounded)", + " - `N` new-members-count (code- and governance-bounded)", + " - `P` proposals-count (code-bounded)", + " - DB:", + " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members", + " - 1 storage read (codec `O(P)`) for reading the proposals", + " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", + " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", + " # " + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective.", + "", + " # ", + " ## Weight", + " - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`", + " - DB: 1 read (codec `O(M)`) + DB access of `proposal`", + " - 1 event", + " # " + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Add a new proposal to either be voted on or executed directly.", + "", + " Requires the sender to be member.", + "", + " `threshold` determines whether `proposal` is executed directly (`threshold < 2`)", + " or put up for voting.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1)` or `O(B + M + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - branching is influenced by `threshold` where:", + " - `P1` is proposal execution complexity (`threshold < 2`)", + " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", + " - DB:", + " - 1 storage read `is_member` (codec `O(M)`)", + " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", + " - DB accesses influenced by `threshold`:", + " - EITHER storage accesses done by `proposal` (`threshold < 2`)", + " - OR proposal insertion (`threshold <= 2`)", + " - 1 storage mutation `Proposals` (codec `O(P2)`)", + " - 1 storage mutation `ProposalCount` (codec `O(1)`)", + " - 1 storage write `ProposalOf` (codec `O(B)`)", + " - 1 storage write `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " Add an aye or nay vote for the sender to the given proposal.", + "", + " Requires the sender to be a member.", + "", + " # ", + " ## Weight", + " - `O(M)` where `M` is members-count (code- and governance-bounded)", + " - DB:", + " - 1 storage read `Members` (codec `O(M)`)", + " - 1 storage mutation `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "close", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "proposal_weight_bound", + "type": "Compact" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Close a vote that is either approved, disapproved or whose voting period has ended.", + "", + " May be called by any signed account in order to finish voting and close the proposal.", + "", + " If called before the end of the voting period it will only close the vote if it is", + " has enough votes to be approved or disapproved.", + "", + " If called after the end of the voting period abstentions are counted as rejections", + " unless there is a prime member set and the prime member cast an approval.", + "", + " + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.", + " + `length_bound`: The upper bound for the length of the proposal in storage. Checked via", + " `storage::read` so it is `size_of::() == 4` larger than the pure length.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1 + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - `P1` is the complexity of `proposal` preimage.", + " - `P2` is proposal-count (code-bounded)", + " - DB:", + " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", + " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)", + " - any mutations done while executing `proposal` (`P1`)", + " - up to 3 events", + " # " + ] + }, + { + "name": "disapprove_proposal", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", + "", + " Must be called by the Root origin.", + "", + " Parameters:", + " * `proposal_hash`: The hash of the proposal that should be disapproved.", + "", + " # ", + " Complexity: O(P) where P is the number of max proposals", + " DB Weight:", + " * Reads: Proposals", + " * Writes: Voting, Proposals, ProposalOf", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`).", + " [account, proposal_index, proposal_hash, threshold]" + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`).", + " [account, proposal_hash, voted, yes, no]" + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold.", + " [proposal_hash]" + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold.", + " [proposal_hash]" + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A motion was executed; result will be `Ok` if it returned without error.", + " [proposal_hash, result]" + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A single member did some action; result will be `Ok` if it returned without error.", + " [proposal_hash, result]" + ] + }, + { + "name": "Closed", + "args": [ + "Hash", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A proposal was closed because its threshold was reached or after its duration was up.", + " [proposal_hash, yes, no]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "NotMember", + "documentation": [ + " Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "documentation": [ + " Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "documentation": [ + " Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "documentation": [ + " Members are already initialized!" + ] + }, + { + "name": "TooEarly", + "documentation": [ + " The close call was made too early, before the end of the voting." + ] + }, + { + "name": "TooManyProposals", + "documentation": [ + " There can only be a maximum of `MaxProposals` active proposals." + ] + }, + { + "name": "WrongProposalWeight", + "documentation": [ + " The given weight bound for the proposal was too low." + ] + }, + { + "name": "WrongProposalLength", + "documentation": [ + " The given length bound for the proposal was too low." + ] + } + ] + }, + { + "name": "Elections", + "storage": { + "prefix": "PhragmenElection", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec<(AccountId,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The current elected membership. Sorted based on account id." + ] + }, + { + "name": "RunnersUp", + "modifier": "Default", + "type": { + "Plain": "Vec<(AccountId,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The current runners_up. Sorted based on low to high merit (worse to best runner)." + ] + }, + { + "name": "ElectionRounds", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The total number of vote rounds that have happened, excluding the upcoming one." + ] + }, + { + "name": "Voting", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(BalanceOf,Vec)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " Votes and locked stake of a particular voter.", + "", + " TWOX-NOTE: SAFE as `AccountId` is a crypto hash" + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The present candidate list. Sorted based on account-id. A current member or runner-up", + " can never enter this vector and is always implicitly assumed to be a candidate." + ] + } + ] + }, + "calls": [ + { + "name": "vote", + "args": [ + { + "name": "votes", + "type": "Vec" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Vote for a set of candidates for the upcoming round of election. This can be called to", + " set the initial votes, or update already existing votes.", + "", + " Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is", + " reserved.", + "", + " The `votes` should:", + " - not be empty.", + " - be less than the number of possible candidates. Note that all current members and", + " runners-up are also automatically candidates for the next round.", + "", + " It is the responsibility of the caller to not place all of their balance into the lock", + " and keep some for further transactions.", + "", + " # ", + " Base weight: 47.93 µs", + " State reads:", + " \t- Candidates.len() + Members.len() + RunnersUp.len()", + " \t- Voting (is_voter)", + " \t- [AccountBalance(who) (unreserve + total_balance)]", + " State writes:", + " \t- Voting", + " \t- Lock", + " \t- [AccountBalance(who) (unreserve -- only when creating a new voter)]", + " # " + ] + }, + { + "name": "remove_voter", + "args": [], + "documentation": [ + " Remove `origin` as a voter. This removes the lock and returns the bond.", + "", + " # ", + " Base weight: 36.8 µs", + " All state access is from do_remove_voter.", + " State reads:", + " \t- Voting", + " \t- [AccountData(who)]", + " State writes:", + " \t- Voting", + " \t- Locks", + " \t- [AccountData(who)]", + " # " + ] + }, + { + "name": "report_defunct_voter", + "args": [ + { + "name": "defunct", + "type": "DefunctVoter" + } + ], + "documentation": [ + " Report `target` for being an defunct voter. In case of a valid report, the reporter is", + " rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and", + " their bond is slashed.", + "", + " A defunct voter is defined to be:", + " - a voter whose current submitted votes are all invalid. i.e. all of them are no", + " longer a candidate nor an active member or a runner-up.", + "", + "", + " The origin must provide the number of current candidates and votes of the reported target", + " for the purpose of accurate weight calculation.", + "", + " # ", + " No Base weight based on min square analysis.", + " Complexity of candidate_count: 1.755 µs", + " Complexity of vote_count: 18.51 µs", + " State reads:", + " \t- Voting(reporter)", + " \t- Candidate.len()", + " \t- Voting(Target)", + " \t- Candidates, Members, RunnersUp (is_defunct_voter)", + " State writes:", + " \t- Lock(reporter || target)", + " \t- [AccountBalance(reporter)] + AccountBalance(target)", + " \t- Voting(reporter || target)", + " Note: the db access is worse with respect to db, which is when the report is correct.", + " # " + ] + }, + { + "name": "submit_candidacy", + "args": [ + { + "name": "candidate_count", + "type": "Compact" + } + ], + "documentation": [ + " Submit oneself for candidacy.", + "", + " A candidate will either:", + " - Lose at the end of the term and forfeit their deposit.", + " - Win and become a member. Members will eventually get their stash back.", + " - Become a runner-up. Runners-ups are reserved members in case one gets forcefully", + " removed.", + "", + " # ", + " Base weight = 33.33 µs", + " Complexity of candidate_count: 0.375 µs", + " State reads:", + " \t- Candidates.len()", + " \t- Candidates", + " \t- Members", + " \t- RunnersUp", + " \t- [AccountBalance(who)]", + " State writes:", + " \t- [AccountBalance(who)]", + " \t- Candidates", + " # " + ] + }, + { + "name": "renounce_candidacy", + "args": [ + { + "name": "renouncing", + "type": "Renouncing" + } + ], + "documentation": [ + " Renounce one's intention to be a candidate for the next election round. 3 potential", + " outcomes exist:", + " - `origin` is a candidate and not elected in any set. In this case, the bond is", + " unreserved, returned and origin is removed as a candidate.", + " - `origin` is a current runner-up. In this case, the bond is unreserved, returned and", + " origin is removed as a runner-up.", + " - `origin` is a current member. In this case, the bond is unreserved and origin is", + " removed as a member, consequently not being a candidate for the next round anymore.", + " Similar to [`remove_voter`], if replacement runners exists, they are immediately used.", + " ", + " If a candidate is renouncing:", + " \tBase weight: 17.28 µs", + " \tComplexity of candidate_count: 0.235 µs", + " \tState reads:", + " \t\t- Candidates", + " \t\t- [AccountBalance(who) (unreserve)]", + " \tState writes:", + " \t\t- Candidates", + " \t\t- [AccountBalance(who) (unreserve)]", + " If member is renouncing:", + " \tBase weight: 46.25 µs", + " \tState reads:", + " \t\t- Members, RunnersUp (remove_and_replace_member),", + " \t\t- [AccountData(who) (unreserve)]", + " \tState writes:", + " \t\t- Members, RunnersUp (remove_and_replace_member),", + " \t\t- [AccountData(who) (unreserve)]", + " If runner is renouncing:", + " \tBase weight: 46.25 µs", + " \tState reads:", + " \t\t- RunnersUp (remove_and_replace_member),", + " \t\t- [AccountData(who) (unreserve)]", + " \tState writes:", + " \t\t- RunnersUp (remove_and_replace_member),", + " \t\t- [AccountData(who) (unreserve)]", + "", + " Weight note: The call into changeMembers need to be accounted for.", + " " + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "has_replacement", + "type": "bool" + } + ], + "documentation": [ + " Remove a particular member from the set. This is effective immediately and the bond of", + " the outgoing member is slashed.", + "", + " If a runner-up is available, then the best runner-up will be removed and replaces the", + " outgoing member. Otherwise, a new phragmen election is started.", + "", + " Note that this does not affect the designated block number of the next election.", + "", + " # ", + " If we have a replacement:", + " \t- Base weight: 50.93 µs", + " \t- State reads:", + " \t\t- RunnersUp.len()", + " \t\t- Members, RunnersUp (remove_and_replace_member)", + " \t- State writes:", + " \t\t- Members, RunnersUp (remove_and_replace_member)", + " Else, since this is a root call and will go into phragmen, we assume full block for now.", + " # " + ] + } + ], + "events": [ + { + "name": "NewTerm", + "args": [ + "Vec<(AccountId,Balance)>" + ], + "documentation": [ + " A new term with [new_members]. This indicates that enough candidates existed to run the", + " election, not that enough have has been elected. The inner value must be examined for", + " this purpose. A `NewTerm([])` indicates that some candidates got their bond slashed and", + " none were elected, whilst `EmptyTerm` means that no candidates existed to begin with." + ] + }, + { + "name": "EmptyTerm", + "args": [], + "documentation": [ + " No (or not enough) candidates existed for this round. This is different from", + " `NewTerm([])`. See the description of `NewTerm`." + ] + }, + { + "name": "MemberKicked", + "args": [ + "AccountId" + ], + "documentation": [ + " A [member] has been removed. This should always be followed by either `NewTerm` ot", + " `EmptyTerm`." + ] + }, + { + "name": "MemberRenounced", + "args": [ + "AccountId" + ], + "documentation": [ + " A [member] has renounced their candidacy." + ] + }, + { + "name": "VoterReported", + "args": [ + "AccountId", + "AccountId", + "bool" + ], + "documentation": [ + " A voter was reported with the the report being successful or not.", + " [voter, reporter, success]" + ] + } + ], + "constants": [ + { + "name": "CandidacyBond", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [] + }, + { + "name": "VotingBond", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [] + }, + { + "name": "DesiredMembers", + "type": "u32", + "value": "0x0d000000", + "documentation": [] + }, + { + "name": "DesiredRunnersUp", + "type": "u32", + "value": "0x07000000", + "documentation": [] + }, + { + "name": "TermDuration", + "type": "BlockNumber", + "value": "0x80130300", + "documentation": [] + }, + { + "name": "ModuleId", + "type": "LockIdentifier", + "value": "0x706872656c656374", + "documentation": [] + } + ], + "errors": [ + { + "name": "UnableToVote", + "documentation": [ + " Cannot vote when no candidates or members exist." + ] + }, + { + "name": "NoVotes", + "documentation": [ + " Must vote for at least one candidate." + ] + }, + { + "name": "TooManyVotes", + "documentation": [ + " Cannot vote more than candidates." + ] + }, + { + "name": "MaximumVotesExceeded", + "documentation": [ + " Cannot vote more than maximum allowed." + ] + }, + { + "name": "LowBalance", + "documentation": [ + " Cannot vote with stake less than minimum balance." + ] + }, + { + "name": "UnableToPayBond", + "documentation": [ + " Voter can not pay voting bond." + ] + }, + { + "name": "MustBeVoter", + "documentation": [ + " Must be a voter." + ] + }, + { + "name": "ReportSelf", + "documentation": [ + " Cannot report self." + ] + }, + { + "name": "DuplicatedCandidate", + "documentation": [ + " Duplicated candidate submission." + ] + }, + { + "name": "MemberSubmit", + "documentation": [ + " Member cannot re-submit candidacy." + ] + }, + { + "name": "RunnerSubmit", + "documentation": [ + " Runner cannot re-submit candidacy." + ] + }, + { + "name": "InsufficientCandidateFunds", + "documentation": [ + " Candidate does not have enough funds." + ] + }, + { + "name": "NotMember", + "documentation": [ + " Not a member." + ] + }, + { + "name": "InvalidCandidateCount", + "documentation": [ + " The provided count of number of candidates is incorrect." + ] + }, + { + "name": "InvalidVoteCount", + "documentation": [ + " The provided count of number of votes is incorrect." + ] + }, + { + "name": "InvalidRenouncing", + "documentation": [ + " The renouncing origin presented a wrong `Renouncing` parameter." + ] + }, + { + "name": "InvalidReplacement", + "documentation": [ + " Prediction regarding replacement after member removal is wrong." + ] + } + ] + }, + { + "name": "TechnicalMembership", + "storage": { + "prefix": "Instance1Membership", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current membership, stored as an ordered Vec." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The current prime member, if one exists." + ] + } + ] + }, + "calls": [ + { + "name": "add_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Add a member `who` to the set.", + "", + " May only be called from `T::AddOrigin`." + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Remove a member `who` from the set.", + "", + " May only be called from `T::RemoveOrigin`." + ] + }, + { + "name": "swap_member", + "args": [ + { + "name": "remove", + "type": "AccountId" + }, + { + "name": "add", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out one member `remove` for another `add`.", + "", + " May only be called from `T::SwapOrigin`.", + "", + " Prime membership is *not* passed from `remove` to `add`, if extant." + ] + }, + { + "name": "reset_members", + "args": [ + { + "name": "members", + "type": "Vec" + } + ], + "documentation": [ + " Change the membership to a new set, disregarding the existing membership. Be nice and", + " pass `members` pre-sorted.", + "", + " May only be called from `T::ResetOrigin`." + ] + }, + { + "name": "change_key", + "args": [ + { + "name": "new", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out the sending member for some other key `new`.", + "", + " May only be called from `Signed` origin of a current member.", + "", + " Prime membership is passed from the origin account to `new`, if extant." + ] + }, + { + "name": "set_prime", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Set the prime member. Must be a current member.", + "", + " May only be called from `T::PrimeOrigin`." + ] + }, + { + "name": "clear_prime", + "args": [], + "documentation": [ + " Remove the prime member if it exists.", + "", + " May only be called from `T::PrimeOrigin`." + ] + } + ], + "events": [ + { + "name": "MemberAdded", + "args": [], + "documentation": [ + " The given member was added; see the transaction for who." + ] + }, + { + "name": "MemberRemoved", + "args": [], + "documentation": [ + " The given member was removed; see the transaction for who." + ] + }, + { + "name": "MembersSwapped", + "args": [], + "documentation": [ + " Two members were swapped; see the transaction for who." + ] + }, + { + "name": "MembersReset", + "args": [], + "documentation": [ + " The membership was reset; see the transaction for who the new set is." + ] + }, + { + "name": "KeyChanged", + "args": [], + "documentation": [ + " One of the members' keys changed." + ] + }, + { + "name": "Dummy", + "args": [ + "PhantomData" + ], + "documentation": [ + " Phantom member, never used." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "FinalityTracker", + "storage": null, + "calls": [ + { + "name": "final_hint", + "args": [ + { + "name": "hint", + "type": "Compact" + } + ], + "documentation": [ + " Hint that the author of this block thinks the best finalized", + " block is the given number." + ] + } + ], + "events": null, + "constants": [ + { + "name": "WindowSize", + "type": "BlockNumber", + "value": "0x65000000", + "documentation": [ + " The number of recent samples to keep from this chain. Default is 101." + ] + }, + { + "name": "ReportLatency", + "type": "BlockNumber", + "value": "0xe8030000", + "documentation": [ + " The delay after which point things become suspicious. Default is 1000." + ] + } + ], + "errors": [ + { + "name": "AlreadyUpdated", + "documentation": [ + " Final hint must be updated only once in the block" + ] + }, + { + "name": "BadHint", + "documentation": [ + " Finalized height above block number" + ] + } + ] + }, + { + "name": "Grandpa", + "storage": { + "prefix": "GrandpaFinality", + "items": [ + { + "name": "State", + "modifier": "Default", + "type": { + "Plain": "StoredState" + }, + "fallback": "0x00", + "documentation": [ + " State of the current authority set." + ] + }, + { + "name": "PendingChange", + "modifier": "Optional", + "type": { + "Plain": "StoredPendingChange" + }, + "fallback": "0x00", + "documentation": [ + " Pending change: (signaled at, scheduled change)." + ] + }, + { + "name": "NextForced", + "modifier": "Optional", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00", + "documentation": [ + " next block number where we can force a change." + ] + }, + { + "name": "Stalled", + "modifier": "Optional", + "type": { + "Plain": "(BlockNumber,BlockNumber)" + }, + "fallback": "0x00", + "documentation": [ + " `true` if we are currently stalled." + ] + }, + { + "name": "CurrentSetId", + "modifier": "Default", + "type": { + "Plain": "SetId" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The number of changes (both in terms of keys and underlying economic responsibilities)", + " in the \"set\" of Grandpa validators from genesis." + ] + }, + { + "name": "SetIdSession", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "SetId", + "value": "SessionIndex", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from grandpa set ID to the index of the *most recent* session for which its", + " members were responsible.", + "", + " TWOX-NOTE: `SetId` is not under user control." + ] + } + ] + }, + "calls": [ + { + "name": "report_equivocation", + "args": [ + { + "name": "equivocation_proof", + "type": "GrandpaEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report voter equivocation/misbehavior. This method will verify the", + " equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence", + " will be reported." + ] + }, + { + "name": "report_equivocation_unsigned", + "args": [ + { + "name": "equivocation_proof", + "type": "GrandpaEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report voter equivocation/misbehavior. This method will verify the", + " equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence", + " will be reported.", + "", + " This extrinsic must be called unsigned and it is expected that only", + " block authors will call it (validated in `ValidateUnsigned`), as such", + " if the block author is defined it will be defined as the equivocation", + " reporter." + ] + }, + { + "name": "note_stalled", + "args": [ + { + "name": "delay", + "type": "BlockNumber" + }, + { + "name": "best_finalized_block_number", + "type": "BlockNumber" + } + ], + "documentation": [ + " Note that the current authority set of the GRANDPA finality gadget has", + " stalled. This will trigger a forced authority set change at the beginning", + " of the next session, to be enacted `delay` blocks after that. The delay", + " should be high enough to safely assume that the block signalling the", + " forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters", + " will start the new authority set using the given finalized block as base.", + " Only callable by root." + ] + } + ], + "events": [ + { + "name": "NewAuthorities", + "args": [ + "AuthorityList" + ], + "documentation": [ + " New authority set has been applied. [authority_set]" + ] + }, + { + "name": "Paused", + "args": [], + "documentation": [ + " Current authority set has been paused." + ] + }, + { + "name": "Resumed", + "args": [], + "documentation": [ + " Current authority set has been resumed." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "PauseFailed", + "documentation": [ + " Attempt to signal GRANDPA pause when the authority set isn't live", + " (either paused or already pending pause)." + ] + }, + { + "name": "ResumeFailed", + "documentation": [ + " Attempt to signal GRANDPA resume when the authority set isn't paused", + " (either live or already pending resume)." + ] + }, + { + "name": "ChangePending", + "documentation": [ + " Attempt to signal GRANDPA change with one already pending." + ] + }, + { + "name": "TooSoon", + "documentation": [ + " Cannot signal forced change so soon after last." + ] + }, + { + "name": "InvalidKeyOwnershipProof", + "documentation": [ + " A key ownership proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "InvalidEquivocationProof", + "documentation": [ + " An equivocation proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "DuplicateOffenceReport", + "documentation": [ + " A given equivocation report is valid but already previously reported." + ] + } + ] + }, + { + "name": "Treasury", + "storage": { + "prefix": "Treasury", + "items": [ + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "ProposalIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Number of proposals that have been made." + ] + }, + { + "name": "Proposals", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "ProposalIndex", + "value": "TreasuryProposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Proposals that have been made." + ] + }, + { + "name": "Approvals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Proposal indices that have been approved but not yet awarded." + ] + }, + { + "name": "Tips", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "Hash", + "value": "OpenTip", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Tips that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", + " This has the insecure enumerable hash function since the key itself is already", + " guaranteed to be a secure hash." + ] + }, + { + "name": "Reasons", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Simple preimage lookup from the reason's hash to the original data. Again, has an", + " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." + ] + } + ] + }, + "calls": [ + { + "name": "propose_spend", + "args": [ + { + "name": "value", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "LookupSource" + } + ], + "documentation": [ + " Put forward a suggestion for spending. A deposit proportional to the value", + " is reserved and slashed if the proposal is rejected. It is returned once the", + " proposal is awarded.", + "", + " # ", + " - Complexity: O(1)", + " - DbReads: `ProposalCount`, `origin account`", + " - DbWrites: `ProposalCount`, `Proposals`, `origin account`", + " # " + ] + }, + { + "name": "reject_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Reject a proposed spend. The original deposit will be slashed.", + "", + " May only be called from `T::RejectOrigin`.", + "", + " # ", + " - Complexity: O(1)", + " - DbReads: `Proposals`, `rejected proposer account`", + " - DbWrites: `Proposals`, `rejected proposer account`", + " # " + ] + }, + { + "name": "approve_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", + " and the original deposit will be returned.", + "", + " May only be called from `T::ApproveOrigin`.", + "", + " # ", + " - Complexity: O(1).", + " - DbReads: `Proposals`, `Approvals`", + " - DbWrite: `Approvals`", + " # " + ] + }, + { + "name": "report_awesome", + "args": [ + { + "name": "reason", + "type": "Bytes" + }, + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Report something `reason` that deserves a tip and claim any eventual the finder's fee.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", + " `TipReportDepositPerByte` for each byte in `reason`.", + "", + " - `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + " - `who`: The account which should be credited for the tip.", + "", + " Emits `NewTip` if successful.", + "", + " # ", + " - Complexity: `O(R)` where `R` length of `reason`.", + " - encoding and hashing of 'reason'", + " - DbReads: `Reasons`, `Tips`, `who account data`", + " - DbWrites: `Tips`, `who account data`", + " # " + ] + }, + { + "name": "retract_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "documentation": [ + " Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", + "", + " If successful, the original deposit will be unreserved.", + "", + " The dispatch origin for this call must be _Signed_ and the tip identified by `hash`", + " must have been reported by the signing account through `report_awesome` (and not", + " through `tip_new`).", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + " Emits `TipRetracted` if successful.", + "", + " # ", + " - Complexity: `O(1)`", + " - Depends on the length of `T::Hash` which is fixed.", + " - DbReads: `Tips`, `origin account`", + " - DbWrites: `Reasons`, `Tips`, `origin account`", + " # " + ] + }, + { + "name": "tip_new", + "args": [ + { + "name": "reason", + "type": "Bytes" + }, + { + "name": "who", + "type": "AccountId" + }, + { + "name": "tip_value", + "type": "BalanceOf" + } + ], + "documentation": [ + " Give a tip for something new; no finder's fee will be taken.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must be a", + " member of the `Tippers` set.", + "", + " - `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + " - `who`: The account which should be credited for the tip.", + " - `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + " Emits `NewTip` if successful.", + "", + " # ", + " - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers.", + " - `O(T)`: decoding `Tipper` vec of length `T`", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + " - `O(R)`: hashing and encoding of reason of length `R`", + " - DbReads: `Tippers`, `Reasons`", + " - DbWrites: `Reasons`, `Tips`", + " # " + ] + }, + { + "name": "tip", + "args": [ + { + "name": "hash", + "type": "Hash" + }, + { + "name": "tip_value", + "type": "BalanceOf" + } + ], + "documentation": [ + " Declare a tip value for an already-open tip.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must be a", + " member of the `Tippers` set.", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary", + " account ID.", + " - `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + " Emits `TipClosing` if the threshold of tippers has been reached and the countdown period", + " has started.", + "", + " # ", + " - Complexity: `O(T)` where `T` is the number of tippers.", + " decoding `Tipper` vec of length `T`, insert tip and check closing,", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + "", + " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it", + " is weighted as if almost full i.e of length `T-1`.", + " - DbReads: `Tippers`, `Tips`", + " - DbWrites: `Tips`", + " # " + ] + }, + { + "name": "close_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "documentation": [ + " Close and payout a tip.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " The tip identified by `hash` must have finished its countdown period.", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + " # ", + " - Complexity: `O(T)` where `T` is the number of tippers.", + " decoding `Tipper` vec of length `T`.", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + " - DbReads: `Tips`, `Tippers`, `tip finder`", + " - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "ProposalIndex" + ], + "documentation": [ + " New proposal. [proposal_index]" + ] + }, + { + "name": "Spending", + "args": [ + "Balance" + ], + "documentation": [ + " We have ended a spend period and will now allocate funds. [budget_remaining]" + ] + }, + { + "name": "Awarded", + "args": [ + "ProposalIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " Some funds have been allocated. [proposal_index, award, beneficiary]" + ] + }, + { + "name": "Rejected", + "args": [ + "ProposalIndex", + "Balance" + ], + "documentation": [ + " A proposal was rejected; funds were slashed. [proposal_index, slashed]" + ] + }, + { + "name": "Burnt", + "args": [ + "Balance" + ], + "documentation": [ + " Some of our funds have been burnt. [burn]" + ] + }, + { + "name": "Rollover", + "args": [ + "Balance" + ], + "documentation": [ + " Spending has finished; this is the amount that rolls over until next spend. [budget_remaining]" + ] + }, + { + "name": "Deposit", + "args": [ + "Balance" + ], + "documentation": [ + " Some funds have been deposited. [deposit]" + ] + }, + { + "name": "NewTip", + "args": [ + "Hash" + ], + "documentation": [ + " A new tip suggestion has been opened. [tip_hash]" + ] + }, + { + "name": "TipClosing", + "args": [ + "Hash" + ], + "documentation": [ + " A tip suggestion has reached threshold and is closing. [tip_hash]" + ] + }, + { + "name": "TipClosed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A tip suggestion has been closed. [tip_hash, who, payout]" + ] + }, + { + "name": "TipRetracted", + "args": [ + "Hash" + ], + "documentation": [ + " A tip suggestion has been retracted. [tip_hash]" + ] + } + ], + "constants": [ + { + "name": "ProposalBond", + "type": "Permill", + "value": "0x50c30000", + "documentation": [ + " Fraction of a proposal's value that should be bonded in order to place the proposal.", + " An accepted proposal gets these back. A rejected proposal does not." + ] + }, + { + "name": "ProposalBondMinimum", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "SpendPeriod", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " Period between successive spends." + ] + }, + { + "name": "Burn", + "type": "Permill", + "value": "0x20a10700", + "documentation": [ + " Percentage of spare funds (if any) that are burnt per spend period." + ] + }, + { + "name": "TipCountdown", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " The period for which a tip remains open after is has achieved threshold tippers." + ] + }, + { + "name": "TipFindersFee", + "type": "Percent", + "value": "0x14", + "documentation": [ + " The amount of the final tip which goes to the original reporter of the tip." + ] + }, + { + "name": "TipReportDepositBase", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The amount held on deposit for placing a tip report." + ] + }, + { + "name": "TipReportDepositPerByte", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount held on deposit per byte within the tip report reason." + ] + }, + { + "name": "ModuleId", + "type": "ModuleId", + "value": "0x70792f7472737279", + "documentation": [ + " The treasury's module id, used for deriving its sovereign account ID." + ] + } + ], + "errors": [ + { + "name": "InsufficientProposersBalance", + "documentation": [ + " Proposer's balance is too low." + ] + }, + { + "name": "InvalidProposalIndex", + "documentation": [ + " No proposal at that index." + ] + }, + { + "name": "ReasonTooBig", + "documentation": [ + " The reason given is just too big." + ] + }, + { + "name": "AlreadyKnown", + "documentation": [ + " The tip was already found/started." + ] + }, + { + "name": "UnknownTip", + "documentation": [ + " The tip hash is unknown." + ] + }, + { + "name": "NotFinder", + "documentation": [ + " The account attempting to retract the tip is not the finder of the tip." + ] + }, + { + "name": "StillOpen", + "documentation": [ + " The tip cannot be claimed/closed because there are not enough tippers yet." + ] + }, + { + "name": "Premature", + "documentation": [ + " The tip cannot be claimed/closed because it's still in the countdown period." + ] + } + ] + }, + { + "name": "Contracts", + "storage": { + "prefix": "Contracts", + "items": [ + { + "name": "CurrentSchedule", + "modifier": "Default", + "type": { + "Plain": "Schedule" + }, + "fallback": "0x0000000020a107000000000020a107000000000020a107000000000020a107000000000020a107000000000020a107000000000020a1070000000000e0f7050400000000e024370500000000e0f705040000000020a107000000000020a107000000000080f0fa020000000000e1f5050000000004000000000001001000000000400000002000000000000800", + "documentation": [ + " Current cost schedule for contracts." + ] + }, + { + "name": "PristineCode", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "CodeHash", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from an original code hash to the original code, untouched by instrumentation." + ] + }, + { + "name": "CodeStorage", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "CodeHash", + "value": "PrefabWasmModule", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping between an original code hash and instrumented wasm code, ready for execution." + ] + }, + { + "name": "AccountCounter", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The subtrie counter." + ] + }, + { + "name": "ContractInfoOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "ContractInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The code associated with a given account.", + "", + " TWOX-NOTE: SAFE since `AccountId` is a secure hash." + ] + } + ] + }, + "calls": [ + { + "name": "update_schedule", + "args": [ + { + "name": "schedule", + "type": "Schedule" + } + ], + "documentation": [ + " Updates the schedule for metering contracts.", + "", + " The schedule must have a greater version than the stored schedule." + ] + }, + { + "name": "put_code", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Stores the given binary Wasm code into the chain's storage and returns its `codehash`.", + " You can instantiate contracts only with stored code." + ] + }, + { + "name": "call", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Makes a call to an account, optionally transferring some balance.", + "", + " * If the account is a smart-contract account, the associated code will be", + " executed and any value will be transferred.", + " * If the account is a regular account, any value will be transferred.", + " * If no account exists and the call value is not less than `existential_deposit`,", + " a regular account will be created and any value will be transferred." + ] + }, + { + "name": "instantiate", + "args": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code_hash", + "type": "CodeHash" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Instantiates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance.", + "", + " Instantiation is executed as follows:", + "", + " - The destination address is computed based on the sender and hash of the code.", + " - The smart-contract account is created at the computed address.", + " - The `ctor_code` is executed in the context of the newly-created account. Buffer returned", + " after the execution is saved as the `code` of the account. That code will be invoked", + " upon any call received by this account.", + " - The contract is initialized." + ] + }, + { + "name": "claim_surcharge", + "args": [ + { + "name": "dest", + "type": "AccountId" + }, + { + "name": "aux_sender", + "type": "Option" + } + ], + "documentation": [ + " Allows block producers to claim a small reward for evicting a contract. If a block producer", + " fails to do so, a regular users will be allowed to claim the reward.", + "", + " If contract is not evicted as a result of this call, no actions are taken and", + " the sender is not eligible for the reward." + ] + } + ], + "events": [ + { + "name": "Instantiated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Contract deployed by address at the specified address. [owner, contract]" + ] + }, + { + "name": "Evicted", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " Contract has been evicted and is now in tombstone state.", + " [contract, tombstone]", + " ", + " # Params", + "", + " - `contract`: `AccountId`: The account ID of the evicted contract.", + " - `tombstone`: `bool`: True if the evicted contract left behind a tombstone." + ] + }, + { + "name": "Restored", + "args": [ + "AccountId", + "AccountId", + "Hash", + "Balance" + ], + "documentation": [ + " Restoration for a contract has been successful.", + " [donor, dest, code_hash, rent_allowance]", + " ", + " # Params", + "", + " - `donor`: `AccountId`: Account ID of the restoring contract", + " - `dest`: `AccountId`: Account ID of the restored contract", + " - `code_hash`: `Hash`: Code hash of the restored contract", + " - `rent_allowance: `Balance`: Rent allowance of the restored contract" + ] + }, + { + "name": "CodeStored", + "args": [ + "Hash" + ], + "documentation": [ + " Code with the specified hash has been stored.", + " [code_hash]" + ] + }, + { + "name": "ScheduleUpdated", + "args": [ + "u32" + ], + "documentation": [ + " Triggered when the current [schedule] is updated." + ] + }, + { + "name": "ContractExecution", + "args": [ + "AccountId", + "Bytes" + ], + "documentation": [ + " An event deposited upon execution of a contract from the account.", + " [account, data]" + ] + } + ], + "constants": [ + { + "name": "SignedClaimHandicap", + "type": "BlockNumber", + "value": "0x02000000", + "documentation": [ + " Number of block delay an extrinsic claim surcharge has.", + "", + " When claim surcharge is called by an extrinsic the rent is checked", + " for current_block - delay" + ] + }, + { + "name": "TombstoneDeposit", + "type": "BalanceOf", + "value": "0x00a0acb9030000000000000000000000", + "documentation": [ + " The minimum amount required to generate a tombstone." + ] + }, + { + "name": "StorageSizeOffset", + "type": "u32", + "value": "0x08000000", + "documentation": [ + " A size offset for an contract. A just created account with untouched storage will have that", + " much of storage from the perspective of the state rent.", + "", + " This is a simple way to ensure that contracts with empty storage eventually get deleted", + " by making them pay rent. This creates an incentive to remove them early in order to save", + " rent." + ] + }, + { + "name": "RentByteFee", + "type": "BalanceOf", + "value": "0x00286bee000000000000000000000000", + "documentation": [ + " Price of a byte of storage per one block interval. Should be greater than 0." + ] + }, + { + "name": "RentDepositOffset", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount of funds a contract should deposit in order to offset", + " the cost of one byte.", + "", + " Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,", + " then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent.", + " But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000,", + " then it would pay 500 BU/day." + ] + }, + { + "name": "SurchargeReward", + "type": "BalanceOf", + "value": "0x005cb2ec220000000000000000000000", + "documentation": [ + " Reward that is received by the party whose touch has led", + " to removal of a contract." + ] + }, + { + "name": "MaxDepth", + "type": "u32", + "value": "0x20000000", + "documentation": [ + " The maximum nesting level of a call/instantiate stack. A reasonable default", + " value is 100." + ] + }, + { + "name": "MaxValueSize", + "type": "u32", + "value": "0x00400000", + "documentation": [ + " The maximum size of a storage value in bytes. A reasonable default is 16 KiB." + ] + } + ], + "errors": [ + { + "name": "InvalidScheduleVersion", + "documentation": [ + " A new schedule must have a greater version than the current one." + ] + }, + { + "name": "InvalidSurchargeClaim", + "documentation": [ + " An origin must be signed or inherent and auxiliary sender only provided on inherent." + ] + }, + { + "name": "InvalidSourceContract", + "documentation": [ + " Cannot restore from nonexisting or tombstone contract." + ] + }, + { + "name": "InvalidDestinationContract", + "documentation": [ + " Cannot restore to nonexisting or alive contract." + ] + }, + { + "name": "InvalidTombstone", + "documentation": [ + " Tombstones don't match." + ] + }, + { + "name": "InvalidContractOrigin", + "documentation": [ + " An origin TrieId written in the current block." + ] + }, + { + "name": "OutOfGas", + "documentation": [ + " The executed contract exhausted its gas limit." + ] + }, + { + "name": "OutputBufferTooSmall", + "documentation": [ + " The output buffer supplied to a contract API call was too small." + ] + }, + { + "name": "BelowSubsistenceThreshold", + "documentation": [ + " Performing the requested transfer would have brought the contract below", + " the subsistence threshold. No transfer is allowed to do this in order to allow", + " for a tombstone to be created. Use `seal_terminate` to remove a contract without", + " leaving a tombstone behind." + ] + }, + { + "name": "NewContractNotFunded", + "documentation": [ + " The newly created contract is below the subsistence threshold after executing", + " its contructor. No contracts are allowed to exist below that threshold." + ] + }, + { + "name": "TransferFailed", + "documentation": [ + " Performing the requested transfer failed for a reason originating in the", + " chosen currency implementation of the runtime. Most probably the balance is", + " too low or locks are placed on it." + ] + }, + { + "name": "MaxCallDepthReached", + "documentation": [ + " Performing a call was denied because the calling depth reached the limit", + " of what is specified in the schedule." + ] + }, + { + "name": "NotCallable", + "documentation": [ + " The contract that was called is either no contract at all (a plain account)", + " or is a tombstone." + ] + }, + { + "name": "CodeTooLarge", + "documentation": [ + " The code supplied to `put_code` exceeds the limit specified in the current schedule." + ] + }, + { + "name": "CodeNotFound", + "documentation": [ + " No code could be found at the supplied code hash." + ] + }, + { + "name": "OutOfBounds", + "documentation": [ + " A buffer outside of sandbox memory was passed to a contract API function." + ] + }, + { + "name": "DecodingFailed", + "documentation": [ + " Input passed to a contract API function failed to decode as expected type." + ] + }, + { + "name": "ContractTrapped", + "documentation": [ + " Contract trapped during execution." + ] + } + ] + }, + { + "name": "Sudo", + "storage": { + "prefix": "Sudo", + "items": [ + { + "name": "Key", + "modifier": "Default", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The `AccountId` of the sudo key." + ] + } + ] + }, + "calls": [ + { + "name": "sudo", + "args": [ + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Root` origin.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Weight of derivative `call` execution + 10,000.", + " # " + ] + }, + { + "name": "sudo_unchecked_weight", + "args": [ + { + "name": "call", + "type": "Call" + }, + { + "name": "_weight", + "type": "Weight" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Root` origin.", + " This function does not check the weight of the call, and instead allows the", + " Sudo user to specify the weight of the call.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - The weight of this call is defined by the caller.", + " # " + ] + }, + { + "name": "set_key", + "args": [ + { + "name": "new", + "type": "LookupSource" + } + ], + "documentation": [ + " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB change.", + " # " + ] + }, + { + "name": "sudo_as", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Signed` origin from", + " a given account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Weight of derivative `call` execution + 10,000.", + " # " + ] + } + ], + "events": [ + { + "name": "Sudid", + "args": [ + "DispatchResult" + ], + "documentation": [ + " A sudo just took place. [result]" + ] + }, + { + "name": "KeyChanged", + "args": [ + "AccountId" + ], + "documentation": [ + " The [sudoer] just switched identity; the old key is supplied." + ] + }, + { + "name": "SudoAsDone", + "args": [ + "bool" + ], + "documentation": [ + " A sudo just took place. [result]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "RequireSudo", + "documentation": [ + " Sender must be the Sudo account" + ] + } + ] + }, + { + "name": "ImOnline", + "storage": { + "prefix": "ImOnline", + "items": [ + { + "name": "HeartbeatAfter", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The block number after which it's ok to send heartbeats in current session.", + "", + " At the beginning of each session we set this to a value that should", + " fall roughly in the middle of the session duration.", + " The idea is to first wait for the validators to produce a block", + " in the current session, so that the heartbeat later on will not be necessary." + ] + }, + { + "name": "Keys", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of keys that may issue a heartbeat." + ] + }, + { + "name": "ReceivedHeartbeats", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "SessionIndex", + "key2": "AuthIndex", + "value": "Bytes", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " For each session index, we keep a mapping of `AuthIndex` to", + " `offchain::OpaqueNetworkState`." + ] + }, + { + "name": "AuthoredBlocks", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "SessionIndex", + "key2": "ValidatorId", + "value": "u32", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00000000", + "documentation": [ + " For each session index, we keep a mapping of `T::ValidatorId` to the", + " number of blocks authored by the given authority." + ] + } + ] + }, + "calls": [ + { + "name": "heartbeat", + "args": [ + { + "name": "heartbeat", + "type": "Heartbeat" + }, + { + "name": "_signature", + "type": "Signature" + } + ], + "documentation": [ + " # ", + " - Complexity: `O(K + E)` where K is length of `Keys` and E is length of", + " `Heartbeat.network_state.external_address`", + "", + " - `O(K)`: decoding of length `K`", + " - `O(E)`: decoding/encoding of length `E`", + " - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,", + " `ReceivedHeartbeats`", + " - DbWrites: `ReceivedHeartbeats`", + " # " + ] + } + ], + "events": [ + { + "name": "HeartbeatReceived", + "args": [ + "AuthorityId" + ], + "documentation": [ + " A new heartbeat was received from `AuthorityId` [authority_id]" + ] + }, + { + "name": "AllGood", + "args": [], + "documentation": [ + " At the end of the session, no offence was committed." + ] + }, + { + "name": "SomeOffline", + "args": [ + "Vec" + ], + "documentation": [ + " At the end of the session, at least one validator was found to be [offline]." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "InvalidKey", + "documentation": [ + " Non existent public key." + ] + }, + { + "name": "DuplicatedHeartbeat", + "documentation": [ + " Duplicated heartbeat." + ] + } + ] + }, + { + "name": "AuthorityDiscovery", + "storage": null, + "calls": [], + "events": null, + "constants": [], + "errors": [] + }, + { + "name": "Offences", + "storage": { + "prefix": "Offences", + "items": [ + { + "name": "Reports", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "ReportIdOf", + "value": "OffenceDetails", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The primary structure that holds all offence records keyed by report identifiers." + ] + }, + { + "name": "DeferredOffences", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Deferred reports that have been rejected by the offence handler and need to be submitted", + " at a later time." + ] + }, + { + "name": "ConcurrentReportsIndex", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "Kind", + "key2": "OpaqueTimeSlot", + "value": "Vec", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " A vector of reports of the same kind that happened at the same time slot." + ] + }, + { + "name": "ReportsByKindIndex", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "Kind", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Enumerates all reports of a kind along with the time they happened.", + "", + " All reports are sorted by the time of offence.", + "", + " Note that the actual type of this mapping is `Vec`, this is because values of", + " different types are not supported at the moment so we are doing the manual serialization." + ] + } + ] + }, + "calls": [], + "events": [ + { + "name": "Offence", + "args": [ + "Kind", + "OpaqueTimeSlot", + "bool" + ], + "documentation": [ + " There is an offence reported of the given `kind` happened at the `session_index` and", + " (kind-specific) time slot. This event is not deposited for duplicate slashes. last", + " element indicates of the offence was applied (true) or queued (false) ", + " [kind, timeslot, applied]." + ] + } + ], + "constants": [], + "errors": [] + }, + { + "name": "Historical", + "storage": null, + "calls": null, + "events": null, + "constants": [], + "errors": [] + }, + { + "name": "RandomnessCollectiveFlip", + "storage": { + "prefix": "RandomnessCollectiveFlip", + "items": [ + { + "name": "RandomMaterial", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Series of block headers from the last 81 blocks that acts as random seed material. This", + " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", + " the oldest hash." + ] + } + ] + }, + "calls": [], + "events": null, + "constants": [], + "errors": [] + }, + { + "name": "Identity", + "storage": { + "prefix": "Identity", + "items": [ + { + "name": "IdentityOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Registration", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information that is pertinent to identify the entity behind an account.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "SuperOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "(AccountId,Data)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The super-identity of an alternative \"sub\" identity together with its name, within that", + " context. If the account is not some other account's sub-identity, then just `None`." + ] + }, + { + "name": "SubsOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(BalanceOf,Vec)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " Alternative \"sub\" identities of this account.", + "", + " The first item is the deposit, the second is a vector of the accounts.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "Registrars", + "modifier": "Default", + "type": { + "Plain": "Vec>" + }, + "fallback": "0x00", + "documentation": [ + " The set of registrars. Not expected to get very big as can only be added through a", + " special origin (likely a council motion).", + "", + " The index into this can be cast to `RegistrarIndex` to get a valid value." + ] + } + ] + }, + "calls": [ + { + "name": "add_registrar", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Add a registrar to the system.", + "", + " The dispatch origin for this call must be `T::RegistrarOrigin`.", + "", + " - `account`: the account of the registrar.", + "", + " Emits `RegistrarAdded` if successful.", + "", + " # ", + " - `O(R)` where `R` registrar-count (governance-bounded and code-bounded).", + " - One storage mutation (codec `O(R)`).", + " - One event.", + " # " + ] + }, + { + "name": "set_identity", + "args": [ + { + "name": "info", + "type": "IdentityInfo" + } + ], + "documentation": [ + " Set an account's identity information and reserve the appropriate deposit.", + "", + " If the account already has identity information, the deposit is taken as part payment", + " for the new deposit.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `info`: The identity information.", + "", + " Emits `IdentitySet` if successful.", + "", + " # ", + " - `O(X + X' + R)`", + " - where `X` additional-field-count (deposit-bounded and code-bounded)", + " - where `R` judgements-count (registrar-count-bounded)", + " - One balance reserve operation.", + " - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`).", + " - One event.", + " # " + ] + }, + { + "name": "set_subs", + "args": [ + { + "name": "subs", + "type": "Vec<(AccountId,Data)>" + } + ], + "documentation": [ + " Set the sub-accounts of the sender.", + "", + " Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", + " and an amount `SubAccountDeposit` will be reserved for each item in `subs`.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " identity.", + "", + " - `subs`: The identity's (new) sub-accounts.", + "", + " # ", + " - `O(P + S)`", + " - where `P` old-subs-count (hard- and deposit-bounded).", + " - where `S` subs-count (hard- and deposit-bounded).", + " - At most one balance operations.", + " - DB:", + " - `P + S` storage mutations (codec complexity `O(1)`)", + " - One storage read (codec complexity `O(P)`).", + " - One storage write (codec complexity `O(S)`).", + " - One storage-exists (`IdentityOf::contains_key`).", + " # " + ] + }, + { + "name": "clear_identity", + "args": [], + "documentation": [ + " Clear an account's identity info and all sub-accounts and return all deposits.", + "", + " Payment: All reserved balances on the account are returned.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " identity.", + "", + " Emits `IdentityCleared` if successful.", + "", + " # ", + " - `O(R + S + X)`", + " - where `R` registrar-count (governance-bounded).", + " - where `S` subs-count (hard- and deposit-bounded).", + " - where `X` additional-field-count (deposit-bounded and code-bounded).", + " - One balance-unreserve operation.", + " - `2` storage reads and `S + 2` storage deletions.", + " - One event.", + " # " + ] + }, + { + "name": "request_judgement", + "args": [ + { + "name": "reg_index", + "type": "Compact" + }, + { + "name": "max_fee", + "type": "Compact" + } + ], + "documentation": [ + " Request a judgement from a registrar.", + "", + " Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", + " given.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a", + " registered identity.", + "", + " - `reg_index`: The index of the registrar whose judgement is requested.", + " - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:", + "", + " ```nocompile", + " Self::registrars().get(reg_index).unwrap().fee", + " ```", + "", + " Emits `JudgementRequested` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-reserve operation.", + " - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`.", + " - One event.", + " # " + ] + }, + { + "name": "cancel_request", + "args": [ + { + "name": "reg_index", + "type": "RegistrarIndex" + } + ], + "documentation": [ + " Cancel a previous request.", + "", + " Payment: A previously reserved deposit is returned on success.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a", + " registered identity.", + "", + " - `reg_index`: The index of the registrar whose judgement is no longer requested.", + "", + " Emits `JudgementUnrequested` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-reserve operation.", + " - One storage mutation `O(R + X)`.", + " - One event", + " # " + ] + }, + { + "name": "set_fee", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "fee", + "type": "Compact" + } + ], + "documentation": [ + " Set the fee required for a judgement to be requested from a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `fee`: the new fee.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " - Benchmark: 7.315 + R * 0.329 µs (min squares analysis)", + " # " + ] + }, + { + "name": "set_account_id", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "new", + "type": "AccountId" + } + ], + "documentation": [ + " Change the account associated with a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `new`: the new account ID.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " - Benchmark: 8.823 + R * 0.32 µs (min squares analysis)", + " # " + ] + }, + { + "name": "set_fields", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "fields", + "type": "IdentityFields" + } + ], + "documentation": [ + " Set the field information for a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `fields`: the fields that the registrar concerns themselves with.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " - Benchmark: 7.464 + R * 0.325 µs (min squares analysis)", + " # " + ] + }, + { + "name": "provide_judgement", + "args": [ + { + "name": "reg_index", + "type": "Compact" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "judgement", + "type": "IdentityJudgement" + } + ], + "documentation": [ + " Provide a judgement for an account's identity.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `reg_index`.", + "", + " - `reg_index`: the index of the registrar whose judgement is being made.", + " - `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + " - `judgement`: the judgement of the registrar of index `reg_index` about `target`.", + "", + " Emits `JudgementGiven` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-transfer operation.", + " - Up to one account-lookup operation.", + " - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`.", + " - One event.", + " # " + ] + }, + { + "name": "kill_identity", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove an account's identity and sub-account information and slash the deposits.", + "", + " Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", + " `Slash`. Verification request deposits are not returned; they should be cancelled", + " manually using `cancel_request`.", + "", + " The dispatch origin for this call must match `T::ForceOrigin`.", + "", + " - `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + "", + " Emits `IdentityKilled` if successful.", + "", + " # ", + " - `O(R + S + X)`.", + " - One balance-reserve operation.", + " - `S + 2` storage mutations.", + " - One event.", + " # " + ] + }, + { + "name": "add_sub", + "args": [ + { + "name": "sub", + "type": "LookupSource" + }, + { + "name": "data", + "type": "Data" + } + ], + "documentation": [ + " Add the given account to the sender's subs.", + "", + " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + " to the sender.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " sub identity of `sub`." + ] + }, + { + "name": "rename_sub", + "args": [ + { + "name": "sub", + "type": "LookupSource" + }, + { + "name": "data", + "type": "Data" + } + ], + "documentation": [ + " Alter the associated name of the given sub-account.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " sub identity of `sub`." + ] + }, + { + "name": "remove_sub", + "args": [ + { + "name": "sub", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove the given account from the sender's subs.", + "", + " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + " to the sender.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " sub identity of `sub`." + ] + }, + { + "name": "quit_sub", + "args": [], + "documentation": [ + " Remove the sender as a sub-account.", + "", + " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + " to the sender (*not* the original depositor).", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " super-identity.", + "", + " NOTE: This should not normally be used, but is provided in the case that the non-", + " controller of an account is maliciously registered as a sub-account." + ] + } + ], + "events": [ + { + "name": "IdentitySet", + "args": [ + "AccountId" + ], + "documentation": [ + " A name was set or reset (which will remove all judgements). [who]" + ] + }, + { + "name": "IdentityCleared", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was cleared, and the given balance returned. [who, deposit]" + ] + }, + { + "name": "IdentityKilled", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was removed and the given balance slashed. [who, deposit]" + ] + }, + { + "name": "JudgementRequested", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement was asked from a registrar. [who, registrar_index]" + ] + }, + { + "name": "JudgementUnrequested", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement request was retracted. [who, registrar_index]" + ] + }, + { + "name": "JudgementGiven", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement was given by a registrar. [target, registrar_index]" + ] + }, + { + "name": "RegistrarAdded", + "args": [ + "RegistrarIndex" + ], + "documentation": [ + " A registrar was added. [registrar_index]" + ] + }, + { + "name": "SubIdentityAdded", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " A sub-identity was added to an identity and the deposit paid. [sub, main, deposit]" + ] + }, + { + "name": "SubIdentityRemoved", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " A sub-identity was removed from an identity and the deposit freed.", + " [sub, main, deposit]" + ] + }, + { + "name": "SubIdentityRevoked", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " A sub-identity was cleared, and the given deposit repatriated from the", + " main identity account to the sub-identity account. [sub, main, deposit]" + ] + } + ], + "constants": [ + { + "name": "BasicDeposit", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [ + " The amount held on deposit for a registered identity." + ] + }, + { + "name": "FieldDeposit", + "type": "BalanceOf", + "value": "0x00a031a95fe300000000000000000000", + "documentation": [ + " The amount held on deposit per additional field for a registered identity." + ] + }, + { + "name": "SubAccountDeposit", + "type": "BalanceOf", + "value": "0x0080f420e6b500000000000000000000", + "documentation": [ + " The amount held on deposit for a registered subaccount. This should account for the fact", + " that one storage item's value will increase by the size of an account ID, and there will be", + " another trie item whose value is the size of an account ID plus 32 bytes." + ] + }, + { + "name": "MaxSubAccounts", + "type": "u32", + "value": "0x64000000", + "documentation": [ + " The maximum number of sub-accounts allowed per identified account." + ] + }, + { + "name": "MaxAdditionalFields", + "type": "u32", + "value": "0x64000000", + "documentation": [ + " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O", + " required to access an identity, but can be pretty high." + ] + }, + { + "name": "MaxRegistrars", + "type": "u32", + "value": "0x14000000", + "documentation": [ + " Maxmimum number of registrars allowed in the system. Needed to bound the complexity", + " of, e.g., updating judgements." + ] + } + ], + "errors": [ + { + "name": "TooManySubAccounts", + "documentation": [ + " Too many subs-accounts." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Account isn't found." + ] + }, + { + "name": "NotNamed", + "documentation": [ + " Account isn't named." + ] + }, + { + "name": "EmptyIndex", + "documentation": [ + " Empty index." + ] + }, + { + "name": "FeeChanged", + "documentation": [ + " Fee is changed." + ] + }, + { + "name": "NoIdentity", + "documentation": [ + " No identity found." + ] + }, + { + "name": "StickyJudgement", + "documentation": [ + " Sticky judgement." + ] + }, + { + "name": "JudgementGiven", + "documentation": [ + " Judgement given." + ] + }, + { + "name": "InvalidJudgement", + "documentation": [ + " Invalid judgement." + ] + }, + { + "name": "InvalidIndex", + "documentation": [ + " The index is invalid." + ] + }, + { + "name": "InvalidTarget", + "documentation": [ + " The target is invalid." + ] + }, + { + "name": "TooManyFields", + "documentation": [ + " Too many additional fields." + ] + }, + { + "name": "TooManyRegistrars", + "documentation": [ + " Maximum amount of registrars reached. Cannot add any more." + ] + }, + { + "name": "AlreadyClaimed", + "documentation": [ + " Account ID is already named." + ] + }, + { + "name": "NotSub", + "documentation": [ + " Sender is not a sub-account." + ] + }, + { + "name": "NotOwned", + "documentation": [ + " Sub-account isn't owned by sender." + ] + } + ] + }, + { + "name": "Society", + "storage": { + "prefix": "Society", + "items": [ + { + "name": "Founder", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The first member." + ] + }, + { + "name": "Rules", + "modifier": "Optional", + "type": { + "Plain": "Hash" + }, + "fallback": "0x00", + "documentation": [ + " A hash of the rules of this society concerning membership. Can only be set once and", + " only by the founder." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of candidates; bidders that are attempting to become members." + ] + }, + { + "name": "SuspendedCandidates", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(BalanceOf,BidKind)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of suspended candidates." + ] + }, + { + "name": "Pot", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " Amount of our account balance that is specifically for the next round's bid(s)." + ] + }, + { + "name": "Head", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The most primary from the most recently approved members." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of members, ordered." + ] + }, + { + "name": "SuspendedMembers", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "bool", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of suspended members." + ] + }, + { + "name": "Bids", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current bids, stored ordered by the value of the bid." + ] + }, + { + "name": "Vouching", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "VouchingStatus", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Members currently vouching or banned from vouching again" + ] + }, + { + "name": "Payouts", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Vec<(BlockNumber,BalanceOf)>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Pending payouts; ordered by block number, with the amount that should be paid out." + ] + }, + { + "name": "Strikes", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "StrikeCount", + "linked": false + } + }, + "fallback": "0x00000000", + "documentation": [ + " The ongoing number of losing votes cast by the member." + ] + }, + { + "name": "Votes", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "AccountId", + "value": "SocietyVote", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Double map from Candidate -> Voter -> (Maybe) Vote." + ] + }, + { + "name": "Defender", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The defending member currently being challenged." + ] + }, + { + "name": "DefenderVotes", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "SocietyVote", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes for the defender." + ] + }, + { + "name": "MaxMembers", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The max number of members for the society at one time." + ] + } + ] + }, + "calls": [ + { + "name": "bid", + "args": [ + { + "name": "value", + "type": "BalanceOf" + } + ], + "documentation": [ + " A user outside of the society can make a bid for entry.", + "", + " Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", + " when the bid becomes a member, or if the bid calls `unbid`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `value`: A one time payment the bid would like to receive when joining the society.", + "", + " # ", + " Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)", + " - Storage Reads:", + " \t- One storage read to check for suspended candidate. O(1)", + " \t- One storage read to check for suspended member. O(1)", + " \t- One storage read to retrieve all current bids. O(B)", + " \t- One storage read to retrieve all current candidates. O(C)", + " \t- One storage read to retrieve all members. O(M)", + " - Storage Writes:", + " \t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)", + " \t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + " - Notable Computation:", + " \t- O(B + C + log M) search to check user is not already a part of society.", + " \t- O(log B) search to insert the new bid sorted.", + " - External Module Operations:", + " \t- One balance reserve operation. O(X)", + " \t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + " - Events:", + " \t- One event for new bid.", + " \t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + " Total Complexity: O(M + B + C + logM + logB + X)", + " # " + ] + }, + { + "name": "unbid", + "args": [ + { + "name": "pos", + "type": "u32" + } + ], + "documentation": [ + " A bidder can remove their bid for entry into society.", + " By doing so, they will have their candidate deposit returned or", + " they will unvouch their voucher.", + "", + " Payment: The bid deposit is unreserved if the user made a bid.", + "", + " The dispatch origin for this call must be _Signed_ and a bidder.", + "", + " Parameters:", + " - `pos`: Position in the `Bids` vector of the bid who wants to unbid.", + "", + " # ", + " Key: B (len of bids), X (balance unreserve)", + " - One storage read and write to retrieve and update the bids. O(B)", + " - Either one unreserve balance action O(X) or one vouching storage removal. O(1)", + " - One event.", + "", + " Total Complexity: O(B + X)", + " # " + ] + }, + { + "name": "vouch", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "value", + "type": "BalanceOf" + }, + { + "name": "tip", + "type": "BalanceOf" + } + ], + "documentation": [ + " As a member, vouch for someone to join society by placing a bid on their behalf.", + "", + " There is no deposit required to vouch for a new bid, but a member can only vouch for", + " one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by", + " the suspension judgement origin, the member will be banned from vouching again.", + "", + " As a vouching member, you can claim a tip if the candidate is accepted. This tip will", + " be paid as a portion of the reward the member will receive for joining the society.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `who`: The user who you would like to vouch for.", + " - `value`: The total reward to be paid between you and the candidate if they become", + " a member in the society.", + " - `tip`: Your cut of the total `value` payout when the candidate is inducted into", + " the society. Tips larger than `value` will be saturated upon payout.", + "", + " # ", + " Key: B (len of bids), C (len of candidates), M (len of members)", + " - Storage Reads:", + " \t- One storage read to retrieve all members. O(M)", + " \t- One storage read to check member is not already vouching. O(1)", + " \t- One storage read to check for suspended candidate. O(1)", + " \t- One storage read to check for suspended member. O(1)", + " \t- One storage read to retrieve all current bids. O(B)", + " \t- One storage read to retrieve all current candidates. O(C)", + " - Storage Writes:", + " \t- One storage write to insert vouching status to the member. O(1)", + " \t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)", + " \t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + " - Notable Computation:", + " \t- O(log M) search to check sender is a member.", + " \t- O(B + C + log M) search to check user is not already a part of society.", + " \t- O(log B) search to insert the new bid sorted.", + " - External Module Operations:", + " \t- One balance reserve operation. O(X)", + " \t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + " - Events:", + " \t- One event for vouch.", + " \t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + " Total Complexity: O(M + B + C + logM + logB + X)", + " # " + ] + }, + { + "name": "unvouch", + "args": [ + { + "name": "pos", + "type": "u32" + } + ], + "documentation": [ + " As a vouching member, unvouch a bid. This only works while vouched user is", + " only a bidder (and not a candidate).", + "", + " The dispatch origin for this call must be _Signed_ and a vouching member.", + "", + " Parameters:", + " - `pos`: Position in the `Bids` vector of the bid who should be unvouched.", + "", + " # ", + " Key: B (len of bids)", + " - One storage read O(1) to check the signer is a vouching member.", + " - One storage mutate to retrieve and update the bids. O(B)", + " - One vouching storage removal. O(1)", + " - One event.", + "", + " Total Complexity: O(B)", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "candidate", + "type": "LookupSource" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " As a member, vote on a candidate.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `candidate`: The candidate that the member would like to bid on.", + " - `approve`: A boolean which says if the candidate should be", + " approved (`true`) or rejected (`false`).", + "", + " # ", + " Key: C (len of candidates), M (len of members)", + " - One storage read O(M) and O(log M) search to check user is a member.", + " - One account lookup.", + " - One storage read O(C) and O(C) search to check that user is a candidate.", + " - One storage write to add vote to votes. O(1)", + " - One event.", + "", + " Total Complexity: O(M + logM + C)", + " # " + ] + }, + { + "name": "defender_vote", + "args": [ + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " As a member, vote on the defender.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `approve`: A boolean which says if the candidate should be", + " approved (`true`) or rejected (`false`).", + "", + " # ", + " - Key: M (len of members)", + " - One storage read O(M) and O(log M) search to check user is a member.", + " - One storage write to add vote to votes. O(1)", + " - One event.", + "", + " Total Complexity: O(M + logM)", + " # " + ] + }, + { + "name": "payout", + "args": [], + "documentation": [ + " Transfer the first matured payout for the sender and remove it from the records.", + "", + " NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts.", + "", + " Payment: The member will receive a payment equal to their first matured", + " payout to their free balance.", + "", + " The dispatch origin for this call must be _Signed_ and a member with", + " payouts remaining.", + "", + " # ", + " Key: M (len of members), P (number of payouts for a particular member)", + " - One storage read O(M) and O(log M) search to check signer is a member.", + " - One storage read O(P) to get all payouts for a member.", + " - One storage read O(1) to get the current block number.", + " - One currency transfer call. O(X)", + " - One storage write or removal to update the member's payouts. O(P)", + "", + " Total Complexity: O(M + logM + P + X)", + " # " + ] + }, + { + "name": "found", + "args": [ + { + "name": "founder", + "type": "AccountId" + }, + { + "name": "max_members", + "type": "u32" + }, + { + "name": "rules", + "type": "Bytes" + } + ], + "documentation": [ + " Found the society.", + "", + " This is done as a discrete action in order to allow for the", + " module to be included into a running chain and can only be done once.", + "", + " The dispatch origin for this call must be from the _FounderSetOrigin_.", + "", + " Parameters:", + " - `founder` - The first member and head of the newly founded society.", + " - `max_members` - The initial max number of members for the society.", + " - `rules` - The rules of this society concerning membership.", + "", + " # ", + " - Two storage mutates to set `Head` and `Founder`. O(1)", + " - One storage write to add the first member to society. O(1)", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + }, + { + "name": "unfound", + "args": [], + "documentation": [ + " Annul the founding of the society.", + "", + " The dispatch origin for this call must be Signed, and the signing account must be both", + " the `Founder` and the `Head`. This implies that it may only be done when there is one", + " member.", + "", + " # ", + " - Two storage reads O(1).", + " - Four storage removals O(1).", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + }, + { + "name": "judge_suspended_member", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "forgive", + "type": "bool" + } + ], + "documentation": [ + " Allow suspension judgement origin to make judgement on a suspended member.", + "", + " If a suspended member is forgiven, we simply add them back as a member, not affecting", + " any of the existing storage items for that member.", + "", + " If a suspended member is rejected, remove all associated storage items, including", + " their payouts, and remove any vouched bids they currently have.", + "", + " The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + " Parameters:", + " - `who` - The suspended member to be judged.", + " - `forgive` - A boolean representing whether the suspension judgement origin", + " forgives (`true`) or rejects (`false`) a suspended member.", + "", + " # ", + " Key: B (len of bids), M (len of members)", + " - One storage read to check `who` is a suspended member. O(1)", + " - Up to one storage write O(M) with O(log M) binary search to add a member back to society.", + " - Up to 3 storage removals O(1) to clean up a removed member.", + " - Up to one storage write O(B) with O(B) search to remove vouched bid from bids.", + " - Up to one additional event if unvouch takes place.", + " - One storage removal. O(1)", + " - One event for the judgement.", + "", + " Total Complexity: O(M + logM + B)", + " # " + ] + }, + { + "name": "judge_suspended_candidate", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "judgement", + "type": "SocietyJudgement" + } + ], + "documentation": [ + " Allow suspended judgement origin to make judgement on a suspended candidate.", + "", + " If the judgement is `Approve`, we add them to society as a member with the appropriate", + " payment for joining society.", + "", + " If the judgement is `Reject`, we either slash the deposit of the bid, giving it back", + " to the society treasury, or we ban the voucher from vouching again.", + "", + " If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go", + " through the induction process again.", + "", + " The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + " Parameters:", + " - `who` - The suspended candidate to be judged.", + " - `judgement` - `Approve`, `Reject`, or `Rebid`.", + "", + " # ", + " Key: B (len of bids), M (len of members), X (balance action)", + " - One storage read to check `who` is a suspended candidate.", + " - One storage removal of the suspended candidate.", + " - Approve Logic", + " \t- One storage read to get the available pot to pay users with. O(1)", + " \t- One storage write to update the available pot. O(1)", + " \t- One storage read to get the current block number. O(1)", + " \t- One storage read to get all members. O(M)", + " \t- Up to one unreserve currency action.", + " \t- Up to two new storage writes to payouts.", + " \t- Up to one storage write with O(log M) binary search to add a member to society.", + " - Reject Logic", + " \t- Up to one repatriate reserved currency action. O(X)", + " \t- Up to one storage write to ban the vouching member from vouching again.", + " - Rebid Logic", + " \t- Storage mutate with O(log B) binary search to place the user back into bids.", + " - Up to one additional event if unvouch takes place.", + " - One storage removal.", + " - One event for the judgement.", + "", + " Total Complexity: O(M + logM + B + X)", + " # " + ] + }, + { + "name": "set_max_members", + "args": [ + { + "name": "max", + "type": "u32" + } + ], + "documentation": [ + " Allows root origin to change the maximum number of members in society.", + " Max membership count must be greater than 1.", + "", + " The dispatch origin for this call must be from _ROOT_.", + "", + " Parameters:", + " - `max` - The maximum number of members for the society.", + "", + " # ", + " - One storage write to update the max. O(1)", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + } + ], + "events": [ + { + "name": "Founded", + "args": [ + "AccountId" + ], + "documentation": [ + " The society is founded by the given identity. [founder]" + ] + }, + { + "name": "Bid", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A membership bid just happened. The given account is the candidate's ID and their offer", + " is the second. [candidate_id, offer]" + ] + }, + { + "name": "Vouch", + "args": [ + "AccountId", + "Balance", + "AccountId" + ], + "documentation": [ + " A membership bid just happened by vouching. The given account is the candidate's ID and", + " their offer is the second. The vouching party is the third. [candidate_id, offer, vouching]" + ] + }, + { + "name": "AutoUnbid", + "args": [ + "AccountId" + ], + "documentation": [ + " A [candidate] was dropped (due to an excess of bids in the system)." + ] + }, + { + "name": "Unbid", + "args": [ + "AccountId" + ], + "documentation": [ + " A [candidate] was dropped (by their request)." + ] + }, + { + "name": "Unvouch", + "args": [ + "AccountId" + ], + "documentation": [ + " A [candidate] was dropped (by request of who vouched for them)." + ] + }, + { + "name": "Inducted", + "args": [ + "AccountId", + "Vec" + ], + "documentation": [ + " A group of candidates have been inducted. The batch's primary is the first value, the", + " batch in full is the second. [primary, candidates]" + ] + }, + { + "name": "SuspendedMemberJudgement", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A suspended member has been judged. [who, judged]" + ] + }, + { + "name": "CandidateSuspended", + "args": [ + "AccountId" + ], + "documentation": [ + " A [candidate] has been suspended" + ] + }, + { + "name": "MemberSuspended", + "args": [ + "AccountId" + ], + "documentation": [ + " A [member] has been suspended" + ] + }, + { + "name": "Challenged", + "args": [ + "AccountId" + ], + "documentation": [ + " A [member] has been challenged" + ] + }, + { + "name": "Vote", + "args": [ + "AccountId", + "AccountId", + "bool" + ], + "documentation": [ + " A vote has been placed [candidate, voter, vote]" + ] + }, + { + "name": "DefenderVote", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A vote has been placed for a defending member [voter, vote]" + ] + }, + { + "name": "NewMaxMembers", + "args": [ + "u32" + ], + "documentation": [ + " A new [max] member count has been set" + ] + }, + { + "name": "Unfounded", + "args": [ + "AccountId" + ], + "documentation": [ + " Society is unfounded. [founder]" + ] + }, + { + "name": "Deposit", + "args": [ + "Balance" + ], + "documentation": [ + " Some funds were deposited into the society account. [value]" + ] + } + ], + "constants": [ + { + "name": "CandidateDeposit", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [ + " The minimum amount of a deposit required for a bid to be made." + ] + }, + { + "name": "WrongSideDeduction", + "type": "BalanceOf", + "value": "0x0080f420e6b500000000000000000000", + "documentation": [ + " The amount of the unpaid reward that gets deducted in the case that either a skeptic", + " doesn't vote or someone votes in the wrong way." + ] + }, + { + "name": "MaxStrikes", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " The number of times a member may vote the wrong way (or not at all, when they are a skeptic)", + " before they become suspended." + ] + }, + { + "name": "PeriodSpend", + "type": "BalanceOf", + "value": "0x0000c52ebca2b1000000000000000000", + "documentation": [ + " The amount of incentive paid within each period. Doesn't include VoterTip." + ] + }, + { + "name": "RotationPeriod", + "type": "BlockNumber", + "value": "0x00770100", + "documentation": [ + " The number of blocks between candidate/membership rotation periods." + ] + }, + { + "name": "ChallengePeriod", + "type": "BlockNumber", + "value": "0x80130300", + "documentation": [ + " The number of blocks between membership challenges." + ] + }, + { + "name": "ModuleId", + "type": "ModuleId", + "value": "0x70792f736f636965", + "documentation": [ + " The societies's module id" + ] + } + ], + "errors": [ + { + "name": "BadPosition", + "documentation": [ + " An incorrect position was provided." + ] + }, + { + "name": "NotMember", + "documentation": [ + " User is not a member." + ] + }, + { + "name": "AlreadyMember", + "documentation": [ + " User is already a member." + ] + }, + { + "name": "Suspended", + "documentation": [ + " User is suspended." + ] + }, + { + "name": "NotSuspended", + "documentation": [ + " User is not suspended." + ] + }, + { + "name": "NoPayout", + "documentation": [ + " Nothing to payout." + ] + }, + { + "name": "AlreadyFounded", + "documentation": [ + " Society already founded." + ] + }, + { + "name": "InsufficientPot", + "documentation": [ + " Not enough in pot to accept candidate." + ] + }, + { + "name": "AlreadyVouching", + "documentation": [ + " Member is already vouching or banned from vouching again." + ] + }, + { + "name": "NotVouching", + "documentation": [ + " Member is not vouching." + ] + }, + { + "name": "Head", + "documentation": [ + " Cannot remove the head of the chain." + ] + }, + { + "name": "Founder", + "documentation": [ + " Cannot remove the founder." + ] + }, + { + "name": "AlreadyBid", + "documentation": [ + " User has already made a bid." + ] + }, + { + "name": "AlreadyCandidate", + "documentation": [ + " User is already a candidate." + ] + }, + { + "name": "NotCandidate", + "documentation": [ + " User is not a candidate." + ] + }, + { + "name": "MaxMembers", + "documentation": [ + " Too many members in the society." + ] + }, + { + "name": "NotFounder", + "documentation": [ + " The caller is not the founder." + ] + }, + { + "name": "NotHead", + "documentation": [ + " The caller is not the head." + ] + } + ] + }, + { + "name": "Recovery", + "storage": { + "prefix": "Recovery", + "items": [ + { + "name": "Recoverable", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "RecoveryConfig", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of recoverable accounts and their recovery configuration." + ] + }, + { + "name": "ActiveRecoveries", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "AccountId", + "value": "ActiveRecovery", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Active recovery attempts.", + "", + " First account is the account to be recovered, and the second account", + " is the user trying to recover the account." + ] + }, + { + "name": "Proxy", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The list of allowed proxy accounts.", + "", + " Map from the user who can access it to the recovered account." + ] + } + ] + }, + "calls": [ + { + "name": "as_recovered", + "args": [ + { + "name": "account", + "type": "AccountId" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Send a call through a recovered account.", + "", + " The dispatch origin for this call must be _Signed_ and registered to", + " be able to make calls on behalf of the recovered account.", + "", + " Parameters:", + " - `account`: The recovered account you want to make a call on-behalf-of.", + " - `call`: The call you want to make with the recovered account.", + "", + " # ", + " - The weight of the `call` + 10,000.", + " - One storage lookup to check account is recovered by `who`. O(1)", + " # " + ] + }, + { + "name": "set_recovered", + "args": [ + { + "name": "lost", + "type": "AccountId" + }, + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " Allow ROOT to bypass the recovery process and set an a rescuer account", + " for a lost account directly.", + "", + " The dispatch origin for this call must be _ROOT_.", + "", + " Parameters:", + " - `lost`: The \"lost account\" to be recovered.", + " - `rescuer`: The \"rescuer account\" which can call as the lost account.", + "", + " # ", + " - One storage write O(1)", + " - One event", + " # " + ] + }, + { + "name": "create_recovery", + "args": [ + { + "name": "friends", + "type": "Vec" + }, + { + "name": "threshold", + "type": "u16" + }, + { + "name": "delay_period", + "type": "BlockNumber" + } + ], + "documentation": [ + " Create a recovery configuration for your account. This makes your account recoverable.", + "", + " Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", + " will be reserved for storing the recovery configuration. This deposit is returned", + " in full when the user calls `remove_recovery`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `friends`: A list of friends you trust to vouch for recovery attempts.", + " Should be ordered and contain no duplicate values.", + " - `threshold`: The number of friends that must vouch for a recovery attempt", + " before the account can be recovered. Should be less than or equal to", + " the length of the list of friends.", + " - `delay_period`: The number of blocks after a recovery attempt is initialized", + " that needs to pass before the account can be recovered.", + "", + " # ", + " - Key: F (len of friends)", + " - One storage read to check that account is not already recoverable. O(1).", + " - A check that the friends list is sorted and unique. O(F)", + " - One currency reserve operation. O(X)", + " - One storage write. O(1). Codec O(F).", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "initiate_recovery", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Initiate the process for recovering a recoverable account.", + "", + " Payment: `RecoveryDeposit` balance will be reserved for initiating the", + " recovery process. This deposit will always be repatriated to the account", + " trying to be recovered. See `close_recovery`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `account`: The lost account that you want to recover. This account", + " needs to be recoverable (i.e. have a recovery configuration).", + "", + " # ", + " - One storage read to check that account is recoverable. O(F)", + " - One storage read to check that this recovery process hasn't already started. O(1)", + " - One currency reserve operation. O(X)", + " - One storage read to get the current block number. O(1)", + " - One storage write. O(1).", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "vouch_recovery", + "args": [ + { + "name": "lost", + "type": "AccountId" + }, + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " Allow a \"friend\" of a recoverable account to vouch for an active recovery", + " process for that account.", + "", + " The dispatch origin for this call must be _Signed_ and must be a \"friend\"", + " for the recoverable account.", + "", + " Parameters:", + " - `lost`: The lost account that you want to recover.", + " - `rescuer`: The account trying to rescue the lost account that you", + " want to vouch for.", + "", + " The combination of these two parameters must point to an active recovery", + " process.", + "", + " # ", + " Key: F (len of friends in config), V (len of vouching friends)", + " - One storage read to get the recovery configuration. O(1), Codec O(F)", + " - One storage read to get the active recovery process. O(1), Codec O(V)", + " - One binary search to confirm caller is a friend. O(logF)", + " - One binary search to confirm caller has not already vouched. O(logV)", + " - One storage write. O(1), Codec O(V).", + " - One event.", + "", + " Total Complexity: O(F + logF + V + logV)", + " # " + ] + }, + { + "name": "claim_recovery", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Allow a successful rescuer to claim their recovered account.", + "", + " The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", + " who has successfully completed the account recovery process: collected", + " `threshold` or more vouches, waited `delay_period` blocks since initiation.", + "", + " Parameters:", + " - `account`: The lost account that you want to claim has been successfully", + " recovered by you.", + "", + " # ", + " Key: F (len of friends in config), V (len of vouching friends)", + " - One storage read to get the recovery configuration. O(1), Codec O(F)", + " - One storage read to get the active recovery process. O(1), Codec O(V)", + " - One storage read to get the current block number. O(1)", + " - One storage write. O(1), Codec O(V).", + " - One event.", + "", + " Total Complexity: O(F + V)", + " # " + ] + }, + { + "name": "close_recovery", + "args": [ + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " As the controller of a recoverable account, close an active recovery", + " process for your account.", + "", + " Payment: By calling this function, the recoverable account will receive", + " the recovery deposit `RecoveryDeposit` placed by the rescuer.", + "", + " The dispatch origin for this call must be _Signed_ and must be a", + " recoverable account with an active recovery process for it.", + "", + " Parameters:", + " - `rescuer`: The account trying to rescue this recoverable account.", + "", + " # ", + " Key: V (len of vouching friends)", + " - One storage read/remove to get the active recovery process. O(1), Codec O(V)", + " - One balance call to repatriate reserved. O(X)", + " - One event.", + "", + " Total Complexity: O(V + X)", + " # " + ] + }, + { + "name": "remove_recovery", + "args": [], + "documentation": [ + " Remove the recovery process for your account. Recovered accounts are still accessible.", + "", + " NOTE: The user must make sure to call `close_recovery` on all active", + " recovery attempts before calling this function else it will fail.", + "", + " Payment: By calling this function the recoverable account will unreserve", + " their recovery configuration deposit.", + " (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)", + "", + " The dispatch origin for this call must be _Signed_ and must be a", + " recoverable account (i.e. has a recovery configuration).", + "", + " # ", + " Key: F (len of friends)", + " - One storage read to get the prefix iterator for active recoveries. O(1)", + " - One storage read/remove to get the recovery configuration. O(1), Codec O(F)", + " - One balance call to unreserved. O(X)", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "cancel_recovered", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Cancel the ability to use `as_recovered` for `account`.", + "", + " The dispatch origin for this call must be _Signed_ and registered to", + " be able to make calls on behalf of the recovered account.", + "", + " Parameters:", + " - `account`: The recovered account you are able to call on-behalf-of.", + "", + " # ", + " - One storage mutation to check account is recovered by `who`. O(1)", + " # " + ] + } + ], + "events": [ + { + "name": "RecoveryCreated", + "args": [ + "AccountId" + ], + "documentation": [ + " A recovery process has been set up for an [account]." + ] + }, + { + "name": "RecoveryInitiated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process has been initiated for lost account by rescuer account.", + " [lost, rescuer]" + ] + }, + { + "name": "RecoveryVouched", + "args": [ + "AccountId", + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process for lost account by rescuer account has been vouched for by sender.", + " [lost, rescuer, sender]" + ] + }, + { + "name": "RecoveryClosed", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process for lost account by rescuer account has been closed.", + " [lost, rescuer]" + ] + }, + { + "name": "AccountRecovered", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Lost account has been successfully recovered by rescuer account.", + " [lost, rescuer]" + ] + }, + { + "name": "RecoveryRemoved", + "args": [ + "AccountId" + ], + "documentation": [ + " A recovery process has been removed for an [account]." + ] + } + ], + "constants": [ + { + "name": "ConfigDepositBase", + "type": "BalanceOf", + "value": "0x00406352bfc601000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for creating a recovery configuration." + ] + }, + { + "name": "FriendDepositFactor", + "type": "BalanceOf", + "value": "0x00203d88792d00000000000000000000", + "documentation": [ + " The amount of currency needed per additional user when creating a recovery configuration." + ] + }, + { + "name": "MaxFriends", + "type": "u16", + "value": "0x0900", + "documentation": [ + " The maximum amount of friends allowed in a recovery configuration." + ] + }, + { + "name": "RecoveryDeposit", + "type": "BalanceOf", + "value": "0x00406352bfc601000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for starting a recovery." + ] + } + ], + "errors": [ + { + "name": "NotAllowed", + "documentation": [ + " User is not allowed to make a call on behalf of this account" + ] + }, + { + "name": "ZeroThreshold", + "documentation": [ + " Threshold must be greater than zero" + ] + }, + { + "name": "NotEnoughFriends", + "documentation": [ + " Friends list must be greater than zero and threshold" + ] + }, + { + "name": "MaxFriends", + "documentation": [ + " Friends list must be less than max friends" + ] + }, + { + "name": "NotSorted", + "documentation": [ + " Friends list must be sorted and free of duplicates" + ] + }, + { + "name": "NotRecoverable", + "documentation": [ + " This account is not set up for recovery" + ] + }, + { + "name": "AlreadyRecoverable", + "documentation": [ + " This account is already set up for recovery" + ] + }, + { + "name": "AlreadyStarted", + "documentation": [ + " A recovery process has already started for this account" + ] + }, + { + "name": "NotStarted", + "documentation": [ + " A recovery process has not started for this rescuer" + ] + }, + { + "name": "NotFriend", + "documentation": [ + " This account is not a friend who can vouch" + ] + }, + { + "name": "DelayPeriod", + "documentation": [ + " The friend must wait until the delay period to vouch for this recovery" + ] + }, + { + "name": "AlreadyVouched", + "documentation": [ + " This user has already vouched for this recovery" + ] + }, + { + "name": "Threshold", + "documentation": [ + " The threshold for recovering this account has not been met" + ] + }, + { + "name": "StillActive", + "documentation": [ + " There are still active recovery attempts that need to be closed" + ] + }, + { + "name": "Overflow", + "documentation": [ + " There was an overflow in a calculation" + ] + }, + { + "name": "AlreadyProxy", + "documentation": [ + " This account is already set up for recovery" + ] + } + ] + }, + { + "name": "Vesting", + "storage": { + "prefix": "Vesting", + "items": [ + { + "name": "Vesting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "VestingInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information regarding the vesting of a given account." + ] + } + ] + }, + "calls": [ + { + "name": "vest", + "args": [], + "documentation": [ + " Unlock any vested funds of the sender account.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have funds still", + " locked under this module.", + "", + " Emits either `VestingCompleted` or `VestingUpdated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 2 Reads, 2 Writes", + " - Reads: Vesting Storage, Balances Locks, [Sender Account]", + " - Writes: Vesting Storage, Balances Locks, [Sender Account]", + " - Benchmark:", + " - Unlocked: 48.76 + .048 * l µs (min square analysis)", + " - Locked: 44.43 + .284 * l µs (min square analysis)", + " - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks.", + " # " + ] + }, + { + "name": "vest_other", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Unlock any vested funds of a `target` account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `target`: The account whose vested funds should be unlocked. Must have funds still", + " locked under this module.", + "", + " Emits either `VestingCompleted` or `VestingUpdated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 3 Reads, 3 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account", + " - Writes: Vesting Storage, Balances Locks, Target Account", + " - Benchmark:", + " - Unlocked: 44.3 + .294 * l µs (min square analysis)", + " - Locked: 48.16 + .103 * l µs (min square analysis)", + " - Using 50 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks.", + " # " + ] + }, + { + "name": "vested_transfer", + "args": [ + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "schedule", + "type": "VestingInfo" + } + ], + "documentation": [ + " Create a vested transfer.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `target`: The account that should be transferred the vested funds.", + " - `amount`: The amount of funds to transfer and will be vested.", + " - `schedule`: The vesting schedule attached to the transfer.", + "", + " Emits `VestingCreated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 3 Reads, 3 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]", + " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]", + " - Benchmark: 100.3 + .365 * l µs (min square analysis)", + " - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks.", + " # " + ] + }, + { + "name": "force_vested_transfer", + "args": [ + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "schedule", + "type": "VestingInfo" + } + ], + "documentation": [ + " Force a vested transfer.", + "", + " The dispatch origin for this call must be _Root_.", + "", + " - `source`: The account whose funds should be transferred.", + " - `target`: The account that should be transferred the vested funds.", + " - `amount`: The amount of funds to transfer and will be vested.", + " - `schedule`: The vesting schedule attached to the transfer.", + "", + " Emits `VestingCreated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 4 Reads, 4 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account", + " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account", + " - Benchmark: 100.3 + .365 * l µs (min square analysis)", + " - Using 100 µs fixed. Assuming less than 50 locks on any user, else we may want factor in number of locks.", + " # " + ] + } + ], + "events": [ + { + "name": "VestingUpdated", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " The amount vested has been updated. This could indicate more funds are available. The", + " balance given is the amount which is left unvested (and thus locked). ", + " [account, unvested]" + ] + }, + { + "name": "VestingCompleted", + "args": [ + "AccountId" + ], + "documentation": [ + " An [account] has become fully vested. No further vesting can happen." + ] + } + ], + "constants": [ + { + "name": "MinVestedTransfer", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "documentation": [ + " The minimum amount to be transferred to create a new vesting schedule." + ] + } + ], + "errors": [ + { + "name": "NotVesting", + "documentation": [ + " The account given is not vesting." + ] + }, + { + "name": "ExistingVestingSchedule", + "documentation": [ + " An existing vesting schedule already exists for this account that cannot be clobbered." + ] + }, + { + "name": "AmountLow", + "documentation": [ + " Amount being transferred is too low to create a vesting schedule." + ] + } + ] + }, + { + "name": "Scheduler", + "storage": { + "prefix": "Scheduler", + "items": [ + { + "name": "Agenda", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "BlockNumber", + "value": "Vec>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Items to be executed, indexed by the block number that they should be executed on." + ] + }, + { + "name": "Lookup", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "Bytes", + "value": "TaskAddress", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Lookup from identity to the block number and index of the task." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "Releases" + }, + "fallback": "0x00", + "documentation": [ + " Storage version of the pallet.", + "", + " New networks start with last version." + ] + } + ] + }, + "calls": [ + { + "name": "schedule", + "args": [ + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Anonymously schedule a task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 22.29 + .126 * S µs", + " - DB Weight:", + " - Read: Agenda", + " - Write: Agenda", + " - Will use base weight of 25 which should be good for up to 30 scheduled calls", + " # " + ] + }, + { + "name": "cancel", + "args": [ + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "index", + "type": "u32" + } + ], + "documentation": [ + " Cancel an anonymously scheduled task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 22.15 + 2.869 * S µs", + " - DB Weight:", + " - Read: Agenda", + " - Write: Agenda, Lookup", + " - Will use base weight of 100 which should be good for up to 30 scheduled calls", + " # " + ] + }, + { + "name": "schedule_named", + "args": [ + { + "name": "id", + "type": "Bytes" + }, + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Schedule a named task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 29.6 + .159 * S µs", + " - DB Weight:", + " - Read: Agenda, Lookup", + " - Write: Agenda, Lookup", + " - Will use base weight of 35 which should be good for more than 30 scheduled calls", + " # " + ] + }, + { + "name": "cancel_named", + "args": [ + { + "name": "id", + "type": "Bytes" + } + ], + "documentation": [ + " Cancel a named scheduled task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 24.91 + 2.907 * S µs", + " - DB Weight:", + " - Read: Agenda, Lookup", + " - Write: Agenda, Lookup", + " - Will use base weight of 100 which should be good for up to 30 scheduled calls", + " # " + ] + }, + { + "name": "schedule_after", + "args": [ + { + "name": "after", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Anonymously schedule a task after a delay.", + "", + " # ", + " Same as [`schedule`].", + " # " + ] + }, + { + "name": "schedule_named_after", + "args": [ + { + "name": "id", + "type": "Bytes" + }, + { + "name": "after", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Schedule a named task after a delay.", + "", + " # ", + " Same as [`schedule_named`].", + " # " + ] + } + ], + "events": [ + { + "name": "Scheduled", + "args": [ + "BlockNumber", + "u32" + ], + "documentation": [ + " Scheduled some task. [when, index]" + ] + }, + { + "name": "Canceled", + "args": [ + "BlockNumber", + "u32" + ], + "documentation": [ + " Canceled some task. [when, index]" + ] + }, + { + "name": "Dispatched", + "args": [ + "TaskAddress", + "Option", + "DispatchResult" + ], + "documentation": [ + " Dispatched some task. [task, id, result]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "FailedToSchedule", + "documentation": [ + " Failed to schedule a call" + ] + }, + { + "name": "FailedToCancel", + "documentation": [ + " Failed to cancel a scheduled call" + ] + }, + { + "name": "TargetBlockNumberInPast", + "documentation": [ + " Given target block number is in the past." + ] + } + ] + }, + { + "name": "Proxy", + "storage": { + "prefix": "Proxy", + "items": [ + { + "name": "Proxies", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(Vec,BalanceOf)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " The set of account proxies. Maps the account which has delegated to the accounts", + " which are being delegated to, together with the amount held on deposit." + ] + }, + { + "name": "Announcements", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(Vec,BalanceOf)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " The announcements made by the proxy (key)." + ] + } + ] + }, + "calls": [ + { + "name": "proxy", + "args": [ + { + "name": "real", + "type": "AccountId" + }, + { + "name": "force_proxy_type", + "type": "Option" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Dispatch the given `call` from an account that the sender is authorised for through", + " `add_proxy`.", + "", + " Removes any corresponding announcement(s).", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", + " - `call`: The call to be made by the `real` account.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "add_proxy", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Register a proxy account for the sender that is able to make calls on its behalf.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `proxy`: The account that the `caller` would like to make a proxy.", + " - `proxy_type`: The permissions allowed for this proxy account.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "remove_proxy", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Unregister a proxy account for the sender.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `proxy`: The account that the `caller` would like to remove as a proxy.", + " - `proxy_type`: The permissions currently enabled for the removed proxy account.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "remove_proxies", + "args": [], + "documentation": [ + " Unregister all proxy accounts for the sender.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " WARNING: This may be called on accounts created by `anonymous`, however if done, then", + " the unreserved fees will be inaccessible. **All access to this account will be lost.**", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "anonymous", + "args": [ + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "delay", + "type": "BlockNumber" + }, + { + "name": "index", + "type": "u16" + } + ], + "documentation": [ + " Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and", + " initialize it with a proxy of `proxy_type` for `origin` sender.", + "", + " Requires a `Signed` origin.", + "", + " - `proxy_type`: The type of the proxy that the sender will be registered as over the", + " new account. This will almost always be the most permissive `ProxyType` possible to", + " allow for maximum flexibility.", + " - `index`: A disambiguation index, in case this is called multiple times in the same", + " transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just", + " want to use `0`.", + " - `delay`: The announcement period required of the initial proxy. Will generally be", + " zero.", + "", + " Fails with `Duplicate` if this has already been called in this transaction, from the", + " same sender, with the same parameters.", + "", + " Fails if there are insufficient funds to pay for deposit.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # ", + " TODO: Might be over counting 1 read" + ] + }, + { + "name": "kill_anonymous", + "args": [ + { + "name": "spawner", + "type": "AccountId" + }, + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "index", + "type": "u16" + }, + { + "name": "height", + "type": "Compact" + }, + { + "name": "ext_index", + "type": "Compact" + } + ], + "documentation": [ + " Removes a previously spawned anonymous proxy.", + "", + " WARNING: **All access to this account will be lost.** Any funds held in it will be", + " inaccessible.", + "", + " Requires a `Signed` origin, and the sender account must have been created by a call to", + " `anonymous` with corresponding parameters.", + "", + " - `spawner`: The account that originally called `anonymous` to create this account.", + " - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.", + " - `proxy_type`: The proxy type originally passed to `anonymous`.", + " - `height`: The height of the chain when the call to `anonymous` was processed.", + " - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.", + "", + " Fails with `NoPermission` in case the caller is not a previously created anonymous", + " account whose `anonymous` call has corresponding parameters.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "announce", + "args": [ + { + "name": "real", + "type": "AccountId" + }, + { + "name": "call_hash", + "type": "CallHashOf" + } + ], + "documentation": [ + " Publish the hash of a proxy-call that will be made in the future.", + "", + " This must be called some number of blocks before the corresponding `proxy` is attempted", + " if the delay associated with the proxy relationship is greater than zero.", + "", + " No more than `MaxPending` announcements may be made at any one time.", + "", + " This will take a deposit of `AnnouncementDepositFactor` as well as", + " `AnnouncementDepositBase` if there are no other pending announcements.", + "", + " The dispatch origin for this call must be _Signed_ and a proxy of `real`.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `call_hash`: The hash of the call to be made by the `real` account.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + }, + { + "name": "remove_announcement", + "args": [ + { + "name": "real", + "type": "AccountId" + }, + { + "name": "call_hash", + "type": "CallHashOf" + } + ], + "documentation": [ + " Remove a given announcement.", + "", + " May be called by a proxy account to remove a call they previously announced and return", + " the deposit.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `call_hash`: The hash of the call to be made by the `real` account.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + }, + { + "name": "reject_announcement", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "call_hash", + "type": "CallHashOf" + } + ], + "documentation": [ + " Remove the given announcement of a delegate.", + "", + " May be called by a target (proxied) account to remove a call that one of their delegates", + " (`delegate`) has announced they want to execute. The deposit is returned.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `delegate`: The account that previously announced the call.", + " - `call_hash`: The hash of the call to be made.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + }, + { + "name": "proxy_announced", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "real", + "type": "AccountId" + }, + { + "name": "force_proxy_type", + "type": "Option" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Dispatch the given `call` from an account that the sender is authorised for through", + " `add_proxy`.", + "", + " Removes any corresponding announcement(s).", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", + " - `call`: The call to be made by the `real` account.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + } + ], + "events": [ + { + "name": "ProxyExecuted", + "args": [ + "DispatchResult" + ], + "documentation": [ + " A proxy was executed correctly, with the given [result]." + ] + }, + { + "name": "AnonymousCreated", + "args": [ + "AccountId", + "AccountId", + "ProxyType", + "u16" + ], + "documentation": [ + " Anonymous account has been created by new proxy with given", + " disambiguation index and proxy type. [anonymous, who, proxy_type, disambiguation_index]" + ] + }, + { + "name": "Announced", + "args": [ + "AccountId", + "AccountId", + "Hash" + ], + "documentation": [ + " An announcement was placed to make a call in the future. [real, proxy, call_hash]" + ] + } + ], + "constants": [ + { + "name": "ProxyDepositBase", + "type": "BalanceOf", + "value": "0x00f09e544c3900000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for creating a proxy." + ] + }, + { + "name": "ProxyDepositFactor", + "type": "BalanceOf", + "value": "0x0060aa7714b400000000000000000000", + "documentation": [ + " The amount of currency needed per proxy added." + ] + }, + { + "name": "MaxProxies", + "type": "u16", + "value": "0x2000", + "documentation": [ + " The maximum amount of proxies allowed for a single account." + ] + }, + { + "name": "MaxPending", + "type": "u32", + "value": "0x20000000", + "documentation": [ + " `MaxPending` metadata shadow." + ] + }, + { + "name": "AnnouncementDepositBase", + "type": "BalanceOf", + "value": "0x00f09e544c3900000000000000000000", + "documentation": [ + " `AnnouncementDepositBase` metadata shadow." + ] + }, + { + "name": "AnnouncementDepositFactor", + "type": "BalanceOf", + "value": "0x00c054ef286801000000000000000000", + "documentation": [ + " `AnnouncementDepositFactor` metadata shadow." + ] + } + ], + "errors": [ + { + "name": "TooMany", + "documentation": [ + " There are too many proxies registered or too many announcements pending." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Proxy registration not found." + ] + }, + { + "name": "NotProxy", + "documentation": [ + " Sender is not a proxy of the account to be proxied." + ] + }, + { + "name": "Unproxyable", + "documentation": [ + " A call which is incompatible with the proxy type's filter was attempted." + ] + }, + { + "name": "Duplicate", + "documentation": [ + " Account is already a proxy." + ] + }, + { + "name": "NoPermission", + "documentation": [ + " Call may not be made by proxy because it may escalate its privileges." + ] + }, + { + "name": "Unannounced", + "documentation": [ + " Announcement, if made at all, was made too recently." + ] + } + ] + }, + { + "name": "Multisig", + "storage": { + "prefix": "Multisig", + "items": [ + { + "name": "Multisigs", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "[u8;32]", + "value": "Multisig", + "key2Hasher": "Blake2_128Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " The set of open multisig operations." + ] + }, + { + "name": "Calls", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "[u8;32]", + "value": "(OpaqueCall,AccountId,BalanceOf)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [] + } + ] + }, + "calls": [ + { + "name": "as_multi_threshold_1", + "args": [ + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Immediately dispatch a multi-signature call using a single approval from the caller.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `other_signatories`: The accounts (other than the sender) who are part of the", + " multi-signature, but do not participate in the approval process.", + " - `call`: The call to be executed.", + "", + " Result is equivalent to the dispatched result.", + "", + " # ", + " O(Z + C) where Z is the length of the call and C its execution weight.", + " -------------------------------", + " - Base Weight: 33.72 + 0.002 * Z µs", + " - DB Weight: None", + " - Plus Call Weight", + " # " + ] + }, + { + "name": "as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "maybe_timepoint", + "type": "Option" + }, + { + "name": "call", + "type": "OpaqueCall" + }, + { + "name": "store_call", + "type": "bool" + }, + { + "name": "max_weight", + "type": "Weight" + } + ], + "documentation": [ + " Register approval for a dispatch to be made from a deterministic composite account if", + " approved by a total of `threshold - 1` of `other_signatories`.", + "", + " If there are enough, then dispatch the call.", + "", + " Payment: `DepositBase` will be reserved if this is the first approval, plus", + " `threshold` times `DepositFactor`. It is returned once this dispatch happens or", + " is cancelled.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + " not the first approval, then it must be `Some`, with the timepoint (block number and", + " transaction index) of the first approval transaction.", + " - `call`: The call to be executed.", + "", + " NOTE: Unless this is the final approval, you will generally want to use", + " `approve_as_multi` instead, since it only requires a hash of the call.", + "", + " Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise", + " on success, result is `Ok` and the result from the interior call, if it was executed,", + " may be found in the deposited `MultisigExecuted` event.", + "", + " # ", + " - `O(S + Z + Call)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.", + " - One encode & hash, both of complexity `O(S)`.", + " - Up to one binary search and insert (`O(logS + S)`).", + " - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + " - One event.", + " - The weight of the `call`.", + " - Storage: inserts one item, value size bounded by `MaxSignatories`, with a", + " deposit taken for its lifetime of", + " `DepositBase + threshold * DepositFactor`.", + " -------------------------------", + " - Base Weight:", + " - Create: 41.89 + 0.118 * S + .002 * Z µs", + " - Create w/ Store: 53.57 + 0.119 * S + .003 * Z µs", + " - Approve: 31.39 + 0.136 * S + .002 * Z µs", + " - Complete: 39.94 + 0.26 * S + .002 * Z µs", + " - DB Weight:", + " - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`)", + " - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`)", + " - Plus Call Weight", + " # " + ] + }, + { + "name": "approve_as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "maybe_timepoint", + "type": "Option" + }, + { + "name": "call_hash", + "type": "[u8;32]" + }, + { + "name": "max_weight", + "type": "Weight" + } + ], + "documentation": [ + " Register approval for a dispatch to be made from a deterministic composite account if", + " approved by a total of `threshold - 1` of `other_signatories`.", + "", + " Payment: `DepositBase` will be reserved if this is the first approval, plus", + " `threshold` times `DepositFactor`. It is returned once this dispatch happens or", + " is cancelled.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + " not the first approval, then it must be `Some`, with the timepoint (block number and", + " transaction index) of the first approval transaction.", + " - `call_hash`: The hash of the call to be executed.", + "", + " NOTE: If this is the final approval, you will want to use `as_multi` instead.", + "", + " # ", + " - `O(S)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One encode & hash, both of complexity `O(S)`.", + " - Up to one binary search and insert (`O(logS + S)`).", + " - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + " - One event.", + " - Storage: inserts one item, value size bounded by `MaxSignatories`, with a", + " deposit taken for its lifetime of", + " `DepositBase + threshold * DepositFactor`.", + " ----------------------------------", + " - Base Weight:", + " - Create: 44.71 + 0.088 * S", + " - Approve: 31.48 + 0.116 * S", + " - DB Weight:", + " - Read: Multisig Storage, [Caller Account]", + " - Write: Multisig Storage, [Caller Account]", + " # " + ] + }, + { + "name": "cancel_as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "timepoint", + "type": "Timepoint" + }, + { + "name": "call_hash", + "type": "[u8;32]" + } + ], + "documentation": [ + " Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", + " for this operation will be unreserved on success.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `timepoint`: The timepoint (block number and transaction index) of the first approval", + " transaction for this dispatch.", + " - `call_hash`: The hash of the call to be executed.", + "", + " # ", + " - `O(S)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One encode & hash, both of complexity `O(S)`.", + " - One event.", + " - I/O: 1 read `O(S)`, one remove.", + " - Storage: removes one item.", + " ----------------------------------", + " - Base Weight: 36.07 + 0.124 * S", + " - DB Weight:", + " - Read: Multisig Storage, [Caller Account], Refund Account, Calls", + " - Write: Multisig Storage, [Caller Account], Refund Account, Calls", + " # " + ] + } + ], + "events": [ + { + "name": "NewMultisig", + "args": [ + "AccountId", + "AccountId", + "CallHash" + ], + "documentation": [ + " A new multisig operation has begun. [approving, multisig, call_hash]" + ] + }, + { + "name": "MultisigApproval", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "CallHash" + ], + "documentation": [ + " A multisig operation has been approved by someone. [approving, timepoint, multisig, call_hash]" + ] + }, + { + "name": "MultisigExecuted", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "CallHash", + "DispatchResult" + ], + "documentation": [ + " A multisig operation has been executed. [approving, timepoint, multisig, call_hash]" + ] + }, + { + "name": "MultisigCancelled", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "CallHash" + ], + "documentation": [ + " A multisig operation has been cancelled. [cancelling, timepoint, multisig, call_hash]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "MinimumThreshold", + "documentation": [ + " Threshold must be 2 or greater." + ] + }, + { + "name": "AlreadyApproved", + "documentation": [ + " Call is already approved by this signatory." + ] + }, + { + "name": "NoApprovalsNeeded", + "documentation": [ + " Call doesn't need any (more) approvals." + ] + }, + { + "name": "TooFewSignatories", + "documentation": [ + " There are too few signatories in the list." + ] + }, + { + "name": "TooManySignatories", + "documentation": [ + " There are too many signatories in the list." + ] + }, + { + "name": "SignatoriesOutOfOrder", + "documentation": [ + " The signatories were provided out of order; they should be ordered." + ] + }, + { + "name": "SenderInSignatories", + "documentation": [ + " The sender was contained in the other signatories; it shouldn't be." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Multisig operation not found when attempting to cancel." + ] + }, + { + "name": "NotOwner", + "documentation": [ + " Only the account that originally created the multisig is able to cancel it." + ] + }, + { + "name": "NoTimepoint", + "documentation": [ + " No timepoint was given, yet the multisig operation is already underway." + ] + }, + { + "name": "WrongTimepoint", + "documentation": [ + " A different timepoint was given to the multisig operation that is underway." + ] + }, + { + "name": "UnexpectedTimepoint", + "documentation": [ + " A timepoint was given, yet no multisig operation is underway." + ] + }, + { + "name": "WeightTooLow", + "documentation": [ + " The maximum weight information provided was too low." + ] + }, + { + "name": "AlreadyStored", + "documentation": [ + " The data to be stored is already stored." + ] + } + ] + } + ], + "extrinsic": { + "version": 4, + "signedExtensions": [ + "CheckSpecVersion", + "CheckTxVersion", + "CheckGenesis", + "CheckMortality", + "CheckNonce", + "CheckWeight", + "ChargeTransactionPayment" + ] + } + } + } +} diff --git a/packages/polkadot/tests/meta/v12.hex b/packages/polkadot/tests/meta/v12.hex new file mode 100644 index 00000000..1b0130db --- /dev/null +++ b/packages/polkadot/tests/meta/v12.hex @@ -0,0 +1 @@ +0x6d6574610c8c1853797374656d011853797374656d401c4163636f756e7401010230543a3a4163636f756e744964944163636f756e74496e666f3c543a3a496e6465782c20543a3a4163636f756e74446174613e00210100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004e8205468652066756c6c206163636f756e7420696e666f726d6174696f6e20666f72206120706172746963756c6172206163636f756e742049442e3845787472696e736963436f756e7400000c753332040004b820546f74616c2065787472696e7369637320636f756e7420666f72207468652063757272656e7420626c6f636b2e2c426c6f636b576569676874010038436f6e73756d6564576569676874600000000000000000000000000000000000000000000000000488205468652063757272656e742077656967687420666f722074686520626c6f636b2e40416c6c45787472696e736963734c656e00000c753332040004410120546f74616c206c656e6774682028696e2062797465732920666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e24426c6f636b4861736801010538543a3a426c6f636b4e756d6265721c543a3a48617368008000000000000000000000000000000000000000000000000000000000000000000498204d6170206f6620626c6f636b206e756d6265727320746f20626c6f636b206861736865732e3445787472696e736963446174610101050c7533321c5665633c75383e000400043d012045787472696e73696373206461746120666f72207468652063757272656e7420626c6f636b20286d61707320616e2065787472696e736963277320696e64657820746f206974732064617461292e184e756d626572010038543a3a426c6f636b4e756d6265721000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000004702048617368206f66207468652070726576696f757320626c6f636b2e3845787472696e73696373526f6f7401001c543a3a486173688000000000000000000000000000000000000000000000000000000000000000000415012045787472696e7369637320726f6f74206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e1844696765737401002c4469676573744f663c543e040004f020446967657374206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e184576656e747301008c5665633c4576656e745265636f72643c543a3a4576656e742c20543a3a486173683e3e040004a0204576656e7473206465706f736974656420666f72207468652063757272656e7420626c6f636b2e284576656e74436f756e740100284576656e74496e646578100000000004b820546865206e756d626572206f66206576656e747320696e2074686520604576656e74733c543e60206c6973742e2c4576656e74546f706963730101021c543a3a48617368845665633c28543a3a426c6f636b4e756d6265722c204576656e74496e646578293e000400282501204d617070696e67206265747765656e206120746f7069632028726570726573656e74656420627920543a3a486173682920616e64206120766563746f72206f6620696e646578657394206f66206576656e747320696e2074686520603c4576656e74733c543e3e60206c6973742e00510120416c6c20746f70696320766563746f727320686176652064657465726d696e69737469632073746f72616765206c6f636174696f6e7320646570656e64696e67206f6e2074686520746f7069632e2054686973450120616c6c6f7773206c696768742d636c69656e747320746f206c6576657261676520746865206368616e67657320747269652073746f7261676520747261636b696e67206d656368616e69736d20616e64e420696e2063617365206f66206368616e67657320666574636820746865206c697374206f66206576656e7473206f6620696e7465726573742e004d01205468652076616c756520686173207468652074797065206028543a3a426c6f636b4e756d6265722c204576656e74496e646578296020626563617573652069662077652075736564206f6e6c79206a7573744d012074686520604576656e74496e64657860207468656e20696e20636173652069662074686520746f70696320686173207468652073616d6520636f6e74656e7473206f6e20746865206e65787420626c6f636b0101206e6f206e6f74696669636174696f6e2077696c6c20626520747269676765726564207468757320746865206576656e74206d69676874206265206c6f73742e484c61737452756e74696d65557067726164650000584c61737452756e74696d6555706772616465496e666f04000455012053746f726573207468652060737065635f76657273696f6e6020616e642060737065635f6e616d6560206f66207768656e20746865206c6173742072756e74696d6520757067726164652068617070656e65642e545570677261646564546f553332526566436f756e74010010626f6f6c0400044d012054727565206966207765206861766520757067726164656420736f207468617420607479706520526566436f756e74602069732060753332602e2046616c7365202864656661756c7429206966206e6f742e38457865637574696f6e50686173650000145068617365040004882054686520657865637574696f6e207068617365206f662074686520626c6f636b2e01282866696c6c5f626c6f636b04185f726174696f1c50657262696c6c040901204120646973706174636820746861742077696c6c2066696c6c2074686520626c6f636b2077656967687420757020746f2074686520676976656e20726174696f2e1872656d61726b041c5f72656d61726b1c5665633c75383e1c6c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e002c2023203c7765696768743e24202d20604f28312960e0202d2042617365205765696768743a20302e36363520c2b5732c20696e646570656e64656e74206f662072656d61726b206c656e6774682e50202d204e6f204442206f7065726174696f6e732e302023203c2f7765696768743e387365745f686561705f7061676573041470616765730c75363420fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e002c2023203c7765696768743e24202d20604f283129604c202d20312073746f726167652077726974652e64202d2042617365205765696768743a20312e34303520c2b57360202d203120777269746520746f20484541505f5041474553302023203c2f7765696768743e207365745f636f64650410636f64651c5665633c75383e28682053657420746865206e65772072756e74696d6520636f64652e002c2023203c7765696768743e3501202d20604f2843202b2053296020776865726520604360206c656e677468206f662060636f64656020616e642060536020636f6d706c6578697479206f66206063616e5f7365745f636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e7901202d20312063616c6c20746f206063616e5f7365745f636f6465603a20604f28532960202863616c6c73206073705f696f3a3a6d6973633a3a72756e74696d655f76657273696f6e6020776869636820697320657870656e73697665292e2c202d2031206576656e742e7d012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652c206275742067656e6572616c6c792074686973206973207665727920657870656e736976652e902057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f636f64655f776974686f75745f636865636b730410636f64651c5665633c75383e201d012053657420746865206e65772072756e74696d6520636f646520776974686f757420646f696e6720616e7920636865636b73206f662074686520676976656e2060636f6465602e002c2023203c7765696768743e90202d20604f2843296020776865726520604360206c656e677468206f662060636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e2c202d2031206576656e742e75012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652e2057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f6368616e6765735f747269655f636f6e666967044c6368616e6765735f747269655f636f6e666967804f7074696f6e3c4368616e67657354726965436f6e66696775726174696f6e3e28a02053657420746865206e6577206368616e676573207472696520636f6e66696775726174696f6e2e002c2023203c7765696768743e24202d20604f28312960b0202d20312073746f72616765207772697465206f722064656c6574652028636f64656320604f28312960292ed8202d20312063616c6c20746f20606465706f7369745f6c6f67603a20557365732060617070656e6460204150492c20736f204f28312964202d2042617365205765696768743a20372e32313820c2b57334202d204442205765696768743aa820202020202d205772697465733a204368616e67657320547269652c2053797374656d20446967657374302023203c2f7765696768743e2c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e206c2053657420736f6d65206974656d73206f662073746f726167652e002c2023203c7765696768743e94202d20604f2849296020776865726520604960206c656e677468206f6620606974656d73607c202d206049602073746f72616765207772697465732028604f28312960292e74202d2042617365205765696768743a20302e353638202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e306b696c6c5f73746f7261676504106b657973205665633c4b65793e2078204b696c6c20736f6d65206974656d732066726f6d2073746f726167652e002c2023203c7765696768743efc202d20604f28494b296020776865726520604960206c656e677468206f6620606b6579736020616e6420604b60206c656e677468206f66206f6e65206b657964202d206049602073746f726167652064656c6574696f6e732e70202d2042617365205765696768743a202e333738202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e2c6b696c6c5f70726566697808187072656669780c4b6579205f7375626b6579730c7533322c1501204b696c6c20616c6c2073746f72616765206974656d7320776974682061206b657920746861742073746172747320776974682074686520676976656e207072656669782e003d01202a2a4e4f54453a2a2a2057652072656c79206f6e2074686520526f6f74206f726967696e20746f2070726f7669646520757320746865206e756d626572206f66207375626b65797320756e64657241012074686520707265666978207765206172652072656d6f76696e6720746f2061636375726174656c792063616c63756c6174652074686520776569676874206f6620746869732066756e6374696f6e2e002c2023203c7765696768743edc202d20604f285029602077686572652060506020616d6f756e74206f66206b65797320776974682070726566697820607072656669786064202d206050602073746f726167652064656c6574696f6e732e74202d2042617365205765696768743a20302e383334202a205020c2b57380202d205772697465733a204e756d626572206f66207375626b657973202b2031302023203c2f7765696768743e1c7375696369646500286501204b696c6c207468652073656e64696e67206163636f756e742c20617373756d696e6720746865726520617265206e6f207265666572656e636573206f75747374616e64696e6720616e642074686520636f6d706f7369746590206461746120697320657175616c20746f206974732064656661756c742076616c75652e002c2023203c7765696768743e24202d20604f283129607c202d20312073746f72616765207265616420616e642064656c6574696f6e2e54202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d5c2042617365205765696768743a20382e36323620c2b5731101204e6f2044422052656164206f72205772697465206f7065726174696f6e7320626563617573652063616c6c657220697320616c726561647920696e206f7665726c6179302023203c2f7765696768743e01144045787472696e7369635375636365737304304469737061746368496e666f04b820416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e205c5b696e666f5c5d3c45787472696e7369634661696c6564083444697370617463684572726f72304469737061746368496e666f049420416e2065787472696e736963206661696c65642e205c5b6572726f722c20696e666f5c5d2c436f64655570646174656400045420603a636f6465602077617320757064617465642e284e65774163636f756e7404244163636f756e744964047c2041206e6577205c5b6163636f756e745c5d2077617320637265617465642e344b696c6c65644163636f756e7404244163636f756e744964046c20416e205c5b6163636f756e745c5d20776173207265617065642e0c38426c6f636b48617368436f756e7438543a3a426c6f636b4e756d626572106009000004d820546865206d6178696d756d206e756d626572206f6620626c6f636b7320746f20616c6c6f7720696e206d6f7274616c20657261732e2044625765696768743c52756e74696d6544625765696768744040787d010000000000e1f505000000000409012054686520776569676874206f662072756e74696d65206461746162617365206f7065726174696f6e73207468652072756e74696d652063616e20696e766f6b652e30426c6f636b57656967687473506c696d6974733a3a426c6f636b57656967687473850100f2052a0100000000204aa9d1010000405973070000000001c06e96a62e010000010098f73e5d010000010000000000000000405973070000000001c0f6e810a30100000100204aa9d1010000010088526a740000004059730700000000000000046101205468652077656967687420636f6e66696775726174696f6e20286c696d697473202620626173652076616c7565732920666f72206561636820636c617373206f662065787472696e7369637320616e6420626c6f636b2e143c496e76616c6964537065634e616d6508150120546865206e616d65206f662073706563696669636174696f6e20646f6573206e6f74206d61746368206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e685370656356657273696f6e4e65656473546f496e637265617365084501205468652073706563696669636174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e744661696c6564546f4578747261637452756e74696d6556657273696f6e0cf0204661696c656420746f2065787472616374207468652072756e74696d652076657273696f6e2066726f6d20746865206e65772072756e74696d652e000d01204569746865722063616c6c696e672060436f72655f76657273696f6e60206f72206465636f64696e67206052756e74696d6556657273696f6e60206661696c65642e4c4e6f6e44656661756c74436f6d706f7369746504010120537569636964652063616c6c6564207768656e20746865206163636f756e7420686173206e6f6e2d64656661756c7420636f6d706f7369746520646174612e3c4e6f6e5a65726f526566436f756e740439012054686572652069732061206e6f6e2d7a65726f207265666572656e636520636f756e742070726576656e74696e6720746865206163636f756e742066726f6d206265696e67207075726765642e001c5574696c69747900010c146261746368041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e48802053656e642061206261746368206f662064697370617463682063616c6c732e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e006101204966206f726967696e20697320726f6f74207468656e2063616c6c2061726520646973706174636820776974686f757420636865636b696e67206f726967696e2066696c7465722e20285468697320696e636c75646573cc20627970617373696e6720606672616d655f73797374656d3a3a436f6e6669673a3a4261736543616c6c46696c74657260292e002c2023203c7765696768743e0501202d20436f6d706c65786974793a204f284329207768657265204320697320746865206e756d626572206f662063616c6c7320746f20626520626174636865642e302023203c2f7765696768743e00590120546869732077696c6c2072657475726e20604f6b6020696e20616c6c2063697263756d7374616e6365732e20546f2064657465726d696e65207468652073756363657373206f66207468652062617463682c20616e3501206576656e74206973206465706f73697465642e20496620612063616c6c206661696c656420616e64207468652062617463682077617320696e7465727275707465642c207468656e20746865590120604261746368496e74657272757074656460206576656e74206973206465706f73697465642c20616c6f6e67207769746820746865206e756d626572206f66207375636365737366756c2063616c6c73206d616465510120616e6420746865206572726f72206f6620746865206661696c65642063616c6c2e20496620616c6c2077657265207375636365737366756c2c207468656e2074686520604261746368436f6d706c657465646050206576656e74206973206465706f73697465642e3461735f646572697661746976650814696e6465780c7531361063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e34e02053656e6420612063616c6c207468726f75676820616e20696e64657865642070736575646f6e796d206f66207468652073656e6465722e0059012046696c7465722066726f6d206f726967696e206172652070617373656420616c6f6e672e205468652063616c6c2077696c6c2062652064697370617463686564207769746820616e206f726967696e207768696368c020757365207468652073616d652066696c74657220617320746865206f726967696e206f6620746869732063616c6c2e004901204e4f54453a20496620796f75206e65656420746f20656e73757265207468617420616e79206163636f756e742d62617365642066696c746572696e67206973206e6f7420686f6e6f7265642028692e652e6501206265636175736520796f7520657870656374206070726f78796020746f2068617665206265656e2075736564207072696f7220696e207468652063616c6c20737461636b20616e6420796f7520646f206e6f742077616e745501207468652063616c6c207265737472696374696f6e7320746f206170706c7920746f20616e79207375622d6163636f756e7473292c207468656e20757365206061735f6d756c74695f7468726573686f6c645f31608020696e20746865204d756c74697369672070616c6c657420696e73746561642e00f8204e4f54453a205072696f7220746f2076657273696f6e202a31322c2074686973207761732063616c6c6564206061735f6c696d697465645f737562602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e2462617463685f616c6c041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e34f02053656e642061206261746368206f662064697370617463682063616c6c7320616e642061746f6d6963616c6c792065786563757465207468656d2e2501205468652077686f6c65207472616e73616374696f6e2077696c6c20726f6c6c6261636b20616e64206661696c20696620616e79206f66207468652063616c6c73206661696c65642e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e006101204966206f726967696e20697320726f6f74207468656e2063616c6c2061726520646973706174636820776974686f757420636865636b696e67206f726967696e2066696c7465722e20285468697320696e636c75646573cc20627970617373696e6720606672616d655f73797374656d3a3a436f6e6669673a3a4261736543616c6c46696c74657260292e002c2023203c7765696768743e0501202d20436f6d706c65786974793a204f284329207768657265204320697320746865206e756d626572206f662063616c6c7320746f20626520626174636865642e302023203c2f7765696768743e0108404261746368496e746572727570746564080c7533323444697370617463684572726f72085901204261746368206f66206469737061746368657320646964206e6f7420636f6d706c6574652066756c6c792e20496e646578206f66206669727374206661696c696e6720646973706174636820676976656e2c206173902077656c6c20617320746865206572726f722e205c5b696e6465782c206572726f725c5d384261746368436f6d706c657465640004cc204261746368206f66206469737061746368657320636f6d706c657465642066756c6c792077697468206e6f206572726f722e0000011042616265011042616265302845706f6368496e64657801000c75363420000000000000000004542043757272656e742065706f636820696e6465782e2c417574686f72697469657301009c5665633c28417574686f7269747949642c2042616265417574686f72697479576569676874293e0400046c2043757272656e742065706f636820617574686f7269746965732e2c47656e65736973536c6f7401000c75363420000000000000000008f82054686520736c6f74206174207768696368207468652066697273742065706f63682061637475616c6c7920737461727465642e205468697320697320309020756e74696c2074686520666972737420626c6f636b206f662074686520636861696e2e2c43757272656e74536c6f7401000c75363420000000000000000004542043757272656e7420736c6f74206e756d6265722e2852616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e65737380000000000000000000000000000000000000000000000000000000000000000028b8205468652065706f63682072616e646f6d6e65737320666f7220746865202a63757272656e742a2065706f63682e002c20232053656375726974790005012054686973204d555354204e4f54206265207573656420666f722067616d626c696e672c2061732069742063616e20626520696e666c75656e6365642062792061f8206d616c6963696f75732076616c696461746f7220696e207468652073686f7274207465726d2e204974204d4159206265207573656420696e206d616e7915012063727970746f677261706869632070726f746f636f6c732c20686f77657665722c20736f206c6f6e67206173206f6e652072656d656d6265727320746861742074686973150120286c696b652065766572797468696e6720656c7365206f6e2d636861696e29206974206973207075626c69632e20466f72206578616d706c652c2069742063616e206265050120757365642077686572652061206e756d626572206973206e656564656420746861742063616e6e6f742068617665206265656e2063686f73656e20627920616e0d01206164766572736172792c20666f7220707572706f7365732073756368206173207075626c69632d636f696e207a65726f2d6b6e6f776c656467652070726f6f66732e3c4e65787445706f6368436f6e6669670000504e657874436f6e66696744657363726970746f7204000498204e6578742065706f636820636f6e66696775726174696f6e2c206966206368616e6765642e384e65787452616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e657373800000000000000000000000000000000000000000000000000000000000000000045c204e6578742065706f63682072616e646f6d6e6573732e305365676d656e74496e64657801000c7533321000000000247c2052616e646f6d6e65737320756e64657220636f6e737472756374696f6e2e00f4205765206d616b6520612074726164656f6666206265747765656e2073746f7261676520616363657373657320616e64206c697374206c656e6774682e01012057652073746f72652074686520756e6465722d636f6e737472756374696f6e2072616e646f6d6e65737320696e207365676d656e7473206f6620757020746f942060554e4445525f434f4e535452554354494f4e5f5345474d454e545f4c454e475448602e00ec204f6e63652061207365676d656e7420726561636865732074686973206c656e6774682c20776520626567696e20746865206e657874206f6e652e090120576520726573657420616c6c207365676d656e747320616e642072657475726e20746f206030602061742074686520626567696e6e696e67206f662065766572791c2065706f63682e44556e646572436f6e737472756374696f6e0101050c7533326c5665633c7363686e6f72726b656c3a3a52616e646f6d6e6573733e0004000415012054574f582d4e4f54453a20605365676d656e74496e6465786020697320616e20696e6372656173696e6720696e74656765722c20736f2074686973206973206f6b61792e2c496e697469616c697a656400003c4d6179626552616e646f6d6e65737304000801012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e292077686963682069732060536f6d65601d01206966207065722d626c6f636b20696e697469616c697a6174696f6e2068617320616c7265616479206265656e2063616c6c656420666f722063757272656e7420626c6f636b2e4c417574686f7256726652616e646f6d6e65737301003c4d6179626552616e646f6d6e65737304000c5d012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e29207468617420696e636c756465732074686520565246206f75747075742067656e6572617465645101206174207468697320626c6f636b2e2054686973206669656c642073686f756c6420616c7761797320626520706f70756c6174656420647572696e6720626c6f636b2070726f63657373696e6720756e6c6573731901207365636f6e6461727920706c61696e20736c6f74732061726520656e61626c65642028776869636820646f6e277420636f6e7461696e206120565246206f7574707574292e204c6174656e657373010038543a3a426c6f636b4e756d626572100000000014d820486f77206c617465207468652063757272656e7420626c6f636b20697320636f6d706172656420746f2069747320706172656e742e001501205468697320656e74727920697320706f70756c617465642061732070617274206f6620626c6f636b20657865637574696f6e20616e6420697320636c65616e65642075701101206f6e20626c6f636b2066696e616c697a6174696f6e2e205175657279696e6720746869732073746f7261676520656e747279206f757473696465206f6620626c6f636bb020657865637574696f6e20636f6e746578742073686f756c6420616c77617973207969656c64207a65726f2e01084c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66200d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e00083445706f63684475726174696f6e0c75363420c800000000000000080d0120546865206e756d626572206f66202a2a736c6f74732a2a207468617420616e2065706f63682074616b65732e20576520636f75706c652073657373696f6e7320746ffc2065706f6368732c20692e652e2077652073746172742061206e65772073657373696f6e206f6e636520746865206e65772065706f636820626567696e732e444578706563746564426c6f636b54696d6524543a3a4d6f6d656e7420b80b00000000000014050120546865206578706563746564206176657261676520626c6f636b2074696d6520617420776869636820424142452073686f756c64206265206372656174696e67110120626c6f636b732e2053696e636520424142452069732070726f626162696c6973746963206974206973206e6f74207472697669616c20746f20666967757265206f75740501207768617420746865206578706563746564206176657261676520626c6f636b2074696d652073686f756c64206265206261736564206f6e2074686520736c6f740901206475726174696f6e20616e642074686520736563757269747920706172616d657465722060636020287768657265206031202d20636020726570726573656e7473a0207468652070726f626162696c697479206f66206120736c6f74206265696e6720656d707479292e00022454696d657374616d70012454696d657374616d70080c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f01040c736574040c6e6f7748436f6d706163743c543a3a4d6f6d656e743e3c5820536574207468652063757272656e742074696d652e00590120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6ed82070686173652c20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e004501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062794420604d696e696d756d506572696f64602e00d820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060496e686572656e74602e002c2023203c7765696768743e3501202d20604f2831296020284e6f7465207468617420696d706c656d656e746174696f6e73206f6620604f6e54696d657374616d7053657460206d75737420616c736f20626520604f2831296029a101202d20312073746f72616765207265616420616e6420312073746f72616765206d75746174696f6e2028636f64656320604f28312960292e202862656361757365206f6620604469645570646174653a3a74616b656020696e20606f6e5f66696e616c697a656029d8202d2031206576656e742068616e646c657220606f6e5f74696d657374616d705f736574602e204d75737420626520604f283129602e302023203c2f7765696768743e0004344d696e696d756d506572696f6424543a3a4d6f6d656e7420dc0500000000000010690120546865206d696e696d756d20706572696f64206265747765656e20626c6f636b732e204265776172652074686174207468697320697320646966666572656e7420746f20746865202a65787065637465642a20706572696f64690120746861742074686520626c6f636b2070726f64756374696f6e206170706172617475732070726f76696465732e20596f75722063686f73656e20636f6e73656e7375732073797374656d2077696c6c2067656e6572616c6c79650120776f726b2077697468207468697320746f2064657465726d696e6520612073656e7369626c6520626c6f636b2074696d652e20652e672e20466f7220417572612c2069742077696c6c20626520646f75626c6520746869737020706572696f64206f6e2064656661756c742073657474696e67732e000328417574686f72736869700128417574686f72736869700c18556e636c65730100e85665633c556e636c65456e7472794974656d3c543a3a426c6f636b4e756d6265722c20543a3a486173682c20543a3a4163636f756e7449643e3e0400041c20556e636c657318417574686f72000030543a3a4163636f756e7449640400046420417574686f72206f662063757272656e7420626c6f636b2e30446964536574556e636c6573010010626f6f6c040004bc205768657468657220756e636c6573207765726520616c72656164792073657420696e207468697320626c6f636b2e0104287365745f756e636c657304286e65775f756e636c6573385665633c543a3a4865616465723e04642050726f76696465206120736574206f6620756e636c65732e00001c48496e76616c6964556e636c65506172656e74048c2054686520756e636c6520706172656e74206e6f7420696e2074686520636861696e2e40556e636c6573416c7265616479536574048420556e636c657320616c72656164792073657420696e2074686520626c6f636b2e34546f6f4d616e79556e636c6573044420546f6f206d616e7920756e636c65732e3047656e65736973556e636c6504582054686520756e636c652069732067656e657369732e30546f6f48696768556e636c6504802054686520756e636c6520697320746f6f206869676820696e20636861696e2e50556e636c65416c7265616479496e636c75646564047c2054686520756e636c6520697320616c726561647920696e636c756465642e204f6c64556e636c6504b82054686520756e636c652069736e277420726563656e7420656e6f75676820746f20626520696e636c756465642e041c496e6469636573011c496e646963657304204163636f756e74730001023c543a3a4163636f756e74496e6465788828543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20626f6f6c29000400048820546865206c6f6f6b75702066726f6d20696e64657820746f206163636f756e742e011414636c61696d0414696e6465783c543a3a4163636f756e74496e646578489c2041737369676e20616e2070726576696f75736c7920756e61737369676e656420696e6465782e00e0205061796d656e743a20604465706f736974602069732072657365727665642066726f6d207468652073656e646572206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e00f4202d2060696e646578603a2074686520696e64657820746f20626520636c61696d65642e2054686973206d757374206e6f7420626520696e207573652e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e207472616e73666572080c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e6465785061012041737369676e20616e20696e64657820616c7265616479206f776e6564206279207468652073656e64657220746f20616e6f74686572206163636f756e742e205468652062616c616e6365207265736572766174696f6ebc206973206566666563746976656c79207472616e7366657272656420746f20746865206e6577206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002901202d2060696e646578603a2074686520696e64657820746f2062652072652d61737369676e65642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e68202d204f6e65207472616e73666572206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743ae4202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429e8202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429302023203c2f7765696768743e10667265650414696e6465783c543a3a4163636f756e74496e6465784898204672656520757020616e20696e646578206f776e6564206279207468652073656e6465722e006101205061796d656e743a20416e792070726576696f7573206465706f73697420706c6163656420666f722074686520696e64657820697320756e726573657276656420696e207468652073656e646572206163636f756e742e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206f776e2074686520696e6465782e001101202d2060696e646578603a2074686520696e64657820746f2062652066726565642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e008820456d6974732060496e646578467265656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e38666f7263655f7472616e736665720c0c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e64657818667265657a6510626f6f6c54590120466f72636520616e20696e64657820746f20616e206163636f756e742e205468697320646f65736e277420726571756972652061206465706f7369742e2049662074686520696e64657820697320616c7265616479ec2068656c642c207468656e20616e79206465706f736974206973207265696d62757273656420746f206974732063757272656e74206f776e65722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00a8202d2060696e646578603a2074686520696e64657820746f206265202872652d2961737369676e65642e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e4501202d2060667265657a65603a2069662073657420746f206074727565602c2077696c6c20667265657a652074686520696e64657820736f2069742063616e6e6f74206265207472616e736665727265642e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e7c202d20557020746f206f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743af8202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229fc202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229302023203c2f7765696768743e18667265657a650414696e6465783c543a3a4163636f756e74496e64657844690120467265657a6520616e20696e64657820736f2069742077696c6c20616c7761797320706f696e7420746f207468652073656e646572206163636f756e742e205468697320636f6e73756d657320746865206465706f7369742e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d7573742068617665206170206e6f6e2d66726f7a656e206163636f756e742060696e646578602e00b0202d2060696e646578603a2074686520696e64657820746f2062652066726f7a656e20696e20706c6163652e008c20456d6974732060496e64657846726f7a656e60206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e74202d20557020746f206f6e6520736c617368206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e010c34496e64657841737369676e656408244163636f756e744964304163636f756e74496e64657804b42041206163636f756e7420696e646578207761732061737369676e65642e205c5b696e6465782c2077686f5c5d28496e646578467265656404304163636f756e74496e64657804e82041206163636f756e7420696e64657820686173206265656e2066726565642075702028756e61737369676e6564292e205c5b696e6465785c5d2c496e64657846726f7a656e08304163636f756e74496e646578244163636f756e7449640429012041206163636f756e7420696e64657820686173206265656e2066726f7a656e20746f206974732063757272656e74206163636f756e742049442e205c5b696e6465782c2077686f5c5d041c4465706f7369743042616c616e63654f663c543e4000407a10f35a0000000000000000000004ac20546865206465706f736974206e656564656420666f7220726573657276696e6720616e20696e6465782e00052042616c616e636573012042616c616e6365731034546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004982054686520746f74616c20756e6974732069737375656420696e207468652073797374656d2e1c4163636f756e7401010230543a3a4163636f756e7449645c4163636f756e74446174613c543a3a42616c616e63653e000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c6c205468652062616c616e6365206f6620616e206163636f756e742e004101204e4f54453a2054686973206973206f6e6c79207573656420696e20746865206361736520746861742074686973206d6f64756c65206973207573656420746f2073746f72652062616c616e6365732e144c6f636b7301010230543a3a4163636f756e744964705665633c42616c616e63654c6f636b3c543a3a42616c616e63653e3e00040008b820416e79206c6971756964697479206c6f636b73206f6e20736f6d65206163636f756e742062616c616e6365732e2501204e4f54453a2053686f756c64206f6e6c79206265206163636573736564207768656e2073657474696e672c206368616e67696e6720616e642066726565696e672061206c6f636b2e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076322e302e3020666f72206e6577206e6574776f726b732e0110207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e6cd8205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572206163636f756e742e00090120607472616e73666572602077696c6c207365742074686520604672656542616c616e636560206f66207468652073656e64657220616e642072656365697665722e21012049742077696c6c2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d2062792074686520605472616e73666572466565602e1501204966207468652073656e6465722773206163636f756e742069732062656c6f7720746865206578697374656e7469616c206465706f736974206173206120726573756c74b4206f6620746865207472616e736665722c20746865206163636f756e742077696c6c206265207265617065642e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605369676e65646020627920746865207472616e736163746f722e002c2023203c7765696768743e3101202d20446570656e64656e74206f6e20617267756d656e747320627574206e6f7420637269746963616c2c20676976656e2070726f70657220696d706c656d656e746174696f6e7320666f72cc202020696e70757420636f6e6669672074797065732e205365652072656c617465642066756e6374696f6e732062656c6f772e6901202d20497420636f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e642077726974657320696e7465726e616c6c7920616e64206e6f20636f6d706c657820636f6d7075746174696f6e2e004c2052656c617465642066756e6374696f6e733a0051012020202d2060656e737572655f63616e5f77697468647261776020697320616c776179732063616c6c656420696e7465726e616c6c792062757420686173206120626f756e64656420636f6d706c65786974792e2d012020202d205472616e7366657272696e672062616c616e63657320746f206163636f756e7473207468617420646964206e6f74206578697374206265666f72652077696c6c206361757365d420202020202060543a3a4f6e4e65774163636f756e743a3a6f6e5f6e65775f6163636f756e746020746f2062652063616c6c65642e61012020202d2052656d6f76696e6720656e6f7567682066756e64732066726f6d20616e206163636f756e742077696c6c20747269676765722060543a3a4475737452656d6f76616c3a3a6f6e5f756e62616c616e636564602e49012020202d20607472616e736665725f6b6565705f616c6976656020776f726b73207468652073616d652077617920617320607472616e73666572602c206275742068617320616e206164646974696f6e616cf82020202020636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c20746865206f726967696e206163636f756e742e88202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d4501202d2042617365205765696768743a2037332e363420c2b5732c20776f7273742063617365207363656e6172696f20286163636f756e7420637265617465642c206163636f756e742072656d6f76656429dc202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374696e6174696f6e206163636f756e741501202d204f726967696e206163636f756e7420697320616c726561647920696e206d656d6f72792c20736f206e6f204442206f7065726174696f6e7320666f72207468656d2e302023203c2f7765696768743e2c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365206e65775f667265654c436f6d706163743c543a3a42616c616e63653e306e65775f72657365727665644c436f6d706163743c543a3a42616c616e63653e489420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e00210120546869732077696c6c20616c74657220604672656542616c616e63656020616e642060526573657276656442616c616e63656020696e2073746f726167652e2069742077696c6c090120616c736f2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d202860546f74616c49737375616e636560292e190120496620746865206e65772066726565206f722072657365727665642062616c616e63652069732062656c6f7720746865206578697374656e7469616c206465706f7369742c01012069742077696c6c20726573657420746865206163636f756e74206e6f6e63652028606672616d655f73797374656d3a3a4163636f756e744e6f6e636560292e00b420546865206469737061746368206f726967696e20666f7220746869732063616c6c2069732060726f6f74602e002c2023203c7765696768743e80202d20496e646570656e64656e74206f662074686520617267756d656e74732ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e58202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c202d2042617365205765696768743a6820202020202d204372656174696e673a2032372e353620c2b5736420202020202d204b696c6c696e673a2033352e313120c2b57398202d204442205765696768743a203120526561642c203120577269746520746f206077686f60302023203c2f7765696768743e38666f7263655f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e1851012045786163746c7920617320607472616e73666572602c2065786365707420746865206f726967696e206d75737420626520726f6f7420616e642074686520736f75726365206163636f756e74206d61792062652c207370656369666965642e2c2023203c7765696768743e4101202d2053616d65206173207472616e736665722c20627574206164646974696f6e616c207265616420616e6420777269746520626563617573652074686520736f75726365206163636f756e74206973902020206e6f7420617373756d656420746f20626520696e20746865206f7665726c61792e302023203c2f7765696768743e4c7472616e736665725f6b6565705f616c6976650810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e2c51012053616d6520617320746865205b607472616e73666572605d2063616c6c2c206275742077697468206120636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c2074686540206f726967696e206163636f756e742e00bc20393925206f66207468652074696d6520796f752077616e74205b607472616e73666572605d20696e73746561642e00c4205b607472616e73666572605d3a207374727563742e4d6f64756c652e68746d6c236d6574686f642e7472616e736665722c2023203c7765696768743ee8202d2043686561706572207468616e207472616e736665722062656361757365206163636f756e742063616e6e6f74206265206b696c6c65642e60202d2042617365205765696768743a2035312e3420c2b5731d01202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374202873656e64657220697320696e206f7665726c617920616c7265616479292c20233c2f7765696768743e01201c456e646f77656408244163636f756e7449641c42616c616e636504250120416e206163636f756e74207761732063726561746564207769746820736f6d6520667265652062616c616e63652e205c5b6163636f756e742c20667265655f62616c616e63655c5d20447573744c6f737408244163636f756e7449641c42616c616e636508410120416e206163636f756e74207761732072656d6f7665642077686f73652062616c616e636520776173206e6f6e2d7a65726f206275742062656c6f77204578697374656e7469616c4465706f7369742cd020726573756c74696e6720696e20616e206f75747269676874206c6f73732e205c5b6163636f756e742c2062616c616e63655c5d205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e636504a0205472616e73666572207375636365656465642e205c5b66726f6d2c20746f2c2076616c75655c5d2842616c616e63655365740c244163636f756e7449641c42616c616e63651c42616c616e636504cc20412062616c616e6365207761732073657420627920726f6f742e205c5b77686f2c20667265652c2072657365727665645c5d1c4465706f73697408244163636f756e7449641c42616c616e636504210120536f6d6520616d6f756e7420776173206465706f73697465642028652e672e20666f72207472616e73616374696f6e2066656573292e205c5b77686f2c206465706f7369745c5d20526573657276656408244163636f756e7449641c42616c616e636504210120536f6d652062616c616e63652077617320726573657276656420286d6f7665642066726f6d206672656520746f207265736572766564292e205c5b77686f2c2076616c75655c5d28556e726573657276656408244163636f756e7449641c42616c616e636504290120536f6d652062616c616e63652077617320756e726573657276656420286d6f7665642066726f6d20726573657276656420746f2066726565292e205c5b77686f2c2076616c75655c5d4852657365727665526570617472696174656410244163636f756e744964244163636f756e7449641c42616c616e6365185374617475730c510120536f6d652062616c616e636520776173206d6f7665642066726f6d207468652072657365727665206f6620746865206669727374206163636f756e7420746f20746865207365636f6e64206163636f756e742edc2046696e616c20617267756d656e7420696e64696361746573207468652064657374696e6174696f6e2062616c616e636520747970652ea8205c5b66726f6d2c20746f2c2062616c616e63652c2064657374696e6174696f6e5f7374617475735c5d04484578697374656e7469616c4465706f73697428543a3a42616c616e63654000407a10f35a0000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f206b65657020616e206163636f756e74206f70656e2e203856657374696e6742616c616e6365049c2056657374696e672062616c616e636520746f6f206869676820746f2073656e642076616c7565544c69717569646974795265737472696374696f6e7304c8204163636f756e74206c6971756964697479207265737472696374696f6e732070726576656e74207769746864726177616c204f766572666c6f77047420476f7420616e206f766572666c6f7720616674657220616464696e674c496e73756666696369656e7442616c616e636504782042616c616e636520746f6f206c6f7720746f2073656e642076616c7565484578697374656e7469616c4465706f73697404ec2056616c756520746f6f206c6f7720746f20637265617465206163636f756e742064756520746f206578697374656e7469616c206465706f736974244b656570416c6976650490205472616e736665722f7061796d656e7420776f756c64206b696c6c206163636f756e745c4578697374696e6756657374696e675363686564756c6504cc20412076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e742c446561644163636f756e74048c2042656e6566696369617279206163636f756e74206d757374207072652d657869737406485472616e73616374696f6e5061796d656e7401485472616e73616374696f6e5061796d656e7408444e6578744665654d756c7469706c6965720100284d756c7469706c69657240000064a7b3b6e00d0000000000000000003853746f7261676556657273696f6e01002052656c6561736573040000000008485472616e73616374696f6e427974654665653042616c616e63654f663c543e4000e40b54020000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e2c576569676874546f466565a45665633c576569676874546f466565436f656666696369656e743c42616c616e63654f663c543e3e3e5c0401000000000000000000000000000000000000000001040d012054686520706f6c796e6f6d69616c2074686174206973206170706c69656420696e206f7264657220746f20646572697665206665652066726f6d207765696768742e00071c5374616b696e67011c5374616b696e678c30486973746f7279446570746801000c75333210540000001c8c204e756d626572206f66206572617320746f206b65657020696e20686973746f72792e00390120496e666f726d6174696f6e206973206b65707420666f72206572617320696e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e006101204d757374206265206d6f7265207468616e20746865206e756d626572206f6620657261732064656c617965642062792073657373696f6e206f74686572776973652e20492e652e2061637469766520657261206d757374390120616c7761797320626520696e20686973746f72792e20492e652e20606163746976655f657261203e2063757272656e745f657261202d20686973746f72795f646570746860206d757374206265302067756172616e746565642e3856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321000000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e34496e76756c6e657261626c65730100445665633c543a3a4163636f756e7449643e04000c590120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c79206b69636b65642e20497427732061205665632073696e636520746865792772654d01206561737920746f20696e697469616c697a6520616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f7572ac20696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e18426f6e64656400010530543a3a4163636f756e74496430543a3a4163636f756e744964000400040101204d61702066726f6d20616c6c206c6f636b65642022737461736822206163636f756e747320746f2074686520636f6e74726f6c6c6572206163636f756e742e184c656467657200010230543a3a4163636f756e744964a45374616b696e674c65646765723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400044501204d61702066726f6d20616c6c2028756e6c6f636b6564292022636f6e74726f6c6c657222206163636f756e747320746f2074686520696e666f20726567617264696e6720746865207374616b696e672e14506179656501010530543a3a4163636f756e7449647c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e00040004e42057686572652074686520726577617264207061796d656e742073686f756c64206265206d6164652e204b657965642062792073746173682e2856616c696461746f727301010530543a3a4163636f756e7449643856616c696461746f72507265667300040004450120546865206d61702066726f6d202877616e6e616265292076616c696461746f72207374617368206b657920746f2074686520707265666572656e636573206f6620746861742076616c696461746f722e284e6f6d696e61746f727300010530543a3a4163636f756e744964644e6f6d696e6174696f6e733c543a3a4163636f756e7449643e00040004650120546865206d61702066726f6d206e6f6d696e61746f72207374617368206b657920746f2074686520736574206f66207374617368206b657973206f6620616c6c2076616c696461746f727320746f206e6f6d696e6174652e2843757272656e74457261000020457261496e6465780400105c205468652063757272656e742065726120696e6465782e006501205468697320697320746865206c617465737420706c616e6e6564206572612c20646570656e64696e67206f6e20686f77207468652053657373696f6e2070616c6c657420717565756573207468652076616c696461746f7280207365742c206974206d6967687420626520616374697665206f72206e6f742e24416374697665457261000034416374697665457261496e666f040010d820546865206163746976652065726120696e666f726d6174696f6e2c20697420686f6c647320696e64657820616e642073746172742e00b820546865206163746976652065726120697320746865206572612063757272656e746c792072657761726465642e2d012056616c696461746f7220736574206f66207468697320657261206d75737420626520657175616c20746f206053657373696f6e496e746572666163653a3a76616c696461746f7273602e5445726173537461727453657373696f6e496e64657800010520457261496e6465783053657373696f6e496e646578000400043101205468652073657373696f6e20696e646578206174207768696368207468652065726120737461727420666f7220746865206c6173742060484953544f52595f44455054486020657261732e2c457261735374616b65727301020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000001878204578706f73757265206f662076616c696461746f72206174206572612e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e48457261735374616b657273436c697070656401020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000002c9820436c6970706564204578706f73757265206f662076616c696461746f72206174206572612e00590120546869732069732073696d696c617220746f205b60457261735374616b657273605d20627574206e756d626572206f66206e6f6d696e61746f7273206578706f736564206973207265647563656420746f20746865dc2060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732e1d0120284e6f74653a20746865206669656c642060746f74616c6020616e6420606f776e60206f6620746865206578706f737572652072656d61696e7320756e6368616e676564292ef42054686973206973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e005d012054686973206973206b657965642066697374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e484572617356616c696461746f72507265667301020520457261496e64657830543a3a4163636f756e7449643856616c696461746f7250726566730504001411012053696d696c617220746f2060457261735374616b657273602c207468697320686f6c64732074686520707265666572656e636573206f662076616c696461746f72732e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4c4572617356616c696461746f7252657761726400010520457261496e6465783042616c616e63654f663c543e0004000c09012054686520746f74616c2076616c696461746f7220657261207061796f757420666f7220746865206c6173742060484953544f52595f44455054486020657261732e0021012045726173207468617420686176656e27742066696e697368656420796574206f7220686173206265656e2072656d6f76656420646f65736e27742068617665207265776172642e4045726173526577617264506f696e747301010520457261496e64657874457261526577617264506f696e74733c543a3a4163636f756e7449643e0014000000000008ac205265776172647320666f7220746865206c6173742060484953544f52595f44455054486020657261732e250120496620726577617264206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207265776172642069732072657475726e65642e3845726173546f74616c5374616b6501010520457261496e6465783042616c616e63654f663c543e00400000000000000000000000000000000008ec2054686520746f74616c20616d6f756e74207374616b656420666f7220746865206c6173742060484953544f52595f44455054486020657261732e1d0120496620746f74616c206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207374616b652069732072657475726e65642e20466f72636545726101001c466f7263696e6704000454204d6f6465206f662065726120666f7263696e672e4c536c6173685265776172644672616374696f6e01001c50657262696c6c10000000000cf8205468652070657263656e74616765206f662074686520736c617368207468617420697320646973747269627574656420746f207265706f72746572732e00e4205468652072657374206f662074686520736c61736865642076616c75652069732068616e646c6564206279207468652060536c617368602e4c43616e63656c6564536c6173685061796f757401003042616c616e63654f663c543e40000000000000000000000000000000000815012054686520616d6f756e74206f662063757272656e637920676976656e20746f207265706f7274657273206f66206120736c617368206576656e7420776869636820776173ec2063616e63656c65642062792065787472616f7264696e6172792063697263756d7374616e6365732028652e672e20676f7665726e616e6365292e40556e6170706c696564536c617368657301010520457261496e646578bc5665633c556e6170706c696564536c6173683c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e00040004c420416c6c20756e6170706c69656420736c61736865732074686174206172652071756575656420666f72206c617465722e28426f6e646564457261730100745665633c28457261496e6465782c2053657373696f6e496e646578293e04001025012041206d617070696e672066726f6d207374696c6c2d626f6e646564206572617320746f207468652066697273742073657373696f6e20696e646578206f662074686174206572612e00c8204d75737420636f6e7461696e7320696e666f726d6174696f6e20666f72206572617320666f72207468652072616e67653abc20605b6163746976655f657261202d20626f756e64696e675f6475726174696f6e3b206163746976655f6572615d604c56616c696461746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449645c2850657262696c6c2c2042616c616e63654f663c543e2905040008450120416c6c20736c617368696e67206576656e7473206f6e2076616c696461746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682070726f706f7274696f6e7020616e6420736c6173682076616c7565206f6620746865206572612e4c4e6f6d696e61746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449643042616c616e63654f663c543e05040004610120416c6c20736c617368696e67206576656e7473206f6e206e6f6d696e61746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682076616c7565206f6620746865206572612e34536c617368696e675370616e7300010530543a3a4163636f756e7449645c736c617368696e673a3a536c617368696e675370616e73000400048c20536c617368696e67207370616e7320666f72207374617368206163636f756e74732e245370616e536c6173680101058c28543a3a4163636f756e7449642c20736c617368696e673a3a5370616e496e6465782988736c617368696e673a3a5370616e5265636f72643c42616c616e63654f663c543e3e00800000000000000000000000000000000000000000000000000000000000000000083d01205265636f72647320696e666f726d6174696f6e2061626f757420746865206d6178696d756d20736c617368206f6620612073746173682077697468696e206120736c617368696e67207370616e2cb82061732077656c6c20617320686f77206d7563682072657761726420686173206265656e2070616964206f75742e584561726c69657374556e6170706c696564536c617368000020457261496e646578040004fc20546865206561726c696573742065726120666f72207768696368207765206861766520612070656e64696e672c20756e6170706c69656420736c6173682e48536e617073686f7456616c696461746f72730000445665633c543a3a4163636f756e7449643e040008650120536e617073686f74206f662076616c696461746f72732061742074686520626567696e6e696e67206f66207468652063757272656e7420656c656374696f6e2077696e646f772e20546869732073686f756c64206f6e6c791901206861766520612076616c7565207768656e205b60457261456c656374696f6e537461747573605d203d3d2060456c656374696f6e5374617475733a3a4f70656e285f29602e48536e617073686f744e6f6d696e61746f72730000445665633c543a3a4163636f756e7449643e040008650120536e617073686f74206f66206e6f6d696e61746f72732061742074686520626567696e6e696e67206f66207468652063757272656e7420656c656374696f6e2077696e646f772e20546869732073686f756c64206f6e6c791901206861766520612076616c7565207768656e205b60457261456c656374696f6e537461747573605d203d3d2060456c656374696f6e5374617475733a3a4f70656e285f29602e34517565756564456c65637465640000a8456c656374696f6e526573756c743c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e04000c650120546865206e6578742076616c696461746f72207365742e2041742074686520656e64206f6620616e206572612c206966207468697320697320617661696c61626c652028706f74656e7469616c6c792066726f6d20746865610120726573756c74206f6620616e206f6666636861696e20776f726b6572292c20697420697320696d6d6564696174656c7920757365642e204f74686572776973652c20746865206f6e2d636861696e20656c656374696f6e342069732065786563757465642e2c51756575656453636f7265000034456c656374696f6e53636f7265040004b0205468652073636f7265206f66207468652063757272656e74205b60517565756564456c6563746564605d2e44457261456c656374696f6e537461747573010078456c656374696f6e5374617475733c543a3a426c6f636b4e756d6265723e040008490120466c616720746f20636f6e74726f6c2074686520657865637574696f6e206f6620746865206f6666636861696e20656c656374696f6e2e205768656e20604f70656e285f29602c207765206163636570746c20736f6c7574696f6e7320746f206265207375626d69747465642e54497343757272656e7453657373696f6e46696e616c010010626f6f6c0400084d012054727565206966207468652063757272656e74202a2a706c616e6e65642a2a2073657373696f6e2069732066696e616c2e204e6f74652074686174207468697320646f6573206e6f742074616b65206572615820666f7263696e6720696e746f206163636f756e742e3853746f7261676556657273696f6e01002052656c6561736573040310cc2054727565206966206e6574776f726b20686173206265656e20757067726164656420746f20746869732076657273696f6e2e7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076332e302e3020666f72206e6577206e6574776f726b732e016010626f6e640c28636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e1470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e5865012054616b6520746865206f726967696e206163636f756e74206173206120737461736820616e64206c6f636b207570206076616c756560206f66206974732062616c616e63652e2060636f6e74726f6c6c6572602077696c6c8420626520746865206163636f756e74207468617420636f6e74726f6c732069742e003101206076616c756560206d757374206265206d6f7265207468616e2074686520606d696e696d756d5f62616c616e636560207370656369666965642062792060543a3a43757272656e6379602e00250120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20627920746865207374617368206163636f756e742e004020456d6974732060426f6e646564602e002c2023203c7765696768743ed4202d20496e646570656e64656e74206f662074686520617267756d656e74732e204d6f64657261746520636f6d706c65786974792e20202d204f2831292e68202d20546872656520657874726120444220656e74726965732e005101204e4f54453a2054776f206f66207468652073746f726167652077726974657320286053656c663a3a626f6e646564602c206053656c663a3a7061796565602920617265205f6e657665725f20636c65616e6564410120756e6c6573732074686520606f726967696e602066616c6c732062656c6f77205f6578697374656e7469616c206465706f7369745f20616e6420676574732072656d6f76656420617320647573742e4c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a3101202d20526561643a20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c2043757272656e74204572612c20486973746f72792044657074682c204c6f636b73e0202d2057726974653a20426f6e6465642c2050617965652c205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e28626f6e645f657874726104386d61785f6164646974696f6e616c54436f6d706163743c42616c616e63654f663c543e3e5465012041646420736f6d6520657874726120616d6f756e742074686174206861766520617070656172656420696e207468652073746173682060667265655f62616c616e63656020696e746f207468652062616c616e63652075703420666f72207374616b696e672e00510120557365207468697320696620746865726520617265206164646974696f6e616c2066756e647320696e20796f7572207374617368206163636f756e74207468617420796f75207769736820746f20626f6e642e650120556e6c696b65205b60626f6e64605d206f72205b60756e626f6e64605d20746869732066756e6374696f6e20646f6573206e6f7420696d706f736520616e79206c696d69746174696f6e206f6e2074686520616d6f756e744c20746861742063616e2062652061646465642e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c657220616e64f82069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004020456d6974732060426f6e646564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e20202d204f2831292e40202d204f6e6520444220656e7472792e34202d2d2d2d2d2d2d2d2d2d2d2d2c204442205765696768743a1501202d20526561643a2045726120456c656374696f6e205374617475732c20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c204c6f636b73a4202d2057726974653a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e18756e626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e805501205363686564756c65206120706f7274696f6e206f662074686520737461736820746f20626520756e6c6f636b656420726561647920666f72207472616e73666572206f75742061667465722074686520626f6e64010120706572696f6420656e64732e2049662074686973206c656176657320616e20616d6f756e74206163746976656c7920626f6e646564206c657373207468616e250120543a3a43757272656e63793a3a6d696e696d756d5f62616c616e636528292c207468656e20697420697320696e6372656173656420746f207468652066756c6c20616d6f756e742e004901204f6e63652074686520756e6c6f636b20706572696f6420697320646f6e652c20796f752063616e2063616c6c206077697468647261775f756e626f6e6465646020746f2061637475616c6c79206d6f7665c0207468652066756e6473206f7574206f66206d616e6167656d656e7420726561647920666f72207472616e736665722e003d01204e6f206d6f7265207468616e2061206c696d69746564206e756d626572206f6620756e6c6f636b696e67206368756e6b73202873656520604d41585f554e4c4f434b494e475f4348554e4b5360293d012063616e20636f2d657869737473206174207468652073616d652074696d652e20496e207468617420636173652c205b6043616c6c3a3a77697468647261775f756e626f6e646564605d206e656564fc20746f2062652063616c6c656420666972737420746f2072656d6f766520736f6d65206f6620746865206368756e6b732028696620706f737369626c65292e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004820456d6974732060556e626f6e646564602e00982053656520616c736f205b6043616c6c3a3a77697468647261775f756e626f6e646564605d2e002c2023203c7765696768743e4101202d20496e646570656e64656e74206f662074686520617267756d656e74732e204c696d697465642062757420706f74656e7469616c6c79206578706c6f697461626c6520636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732e6501202d20456163682063616c6c20287265717569726573207468652072656d61696e646572206f662074686520626f6e6465642062616c616e636520746f2062652061626f766520606d696e696d756d5f62616c616e63656029710120202077696c6c2063617573652061206e657720656e74727920746f20626520696e73657274656420696e746f206120766563746f722028604c65646765722e756e6c6f636b696e676029206b65707420696e2073746f726167652e5101202020546865206f6e6c792077617920746f20636c65616e207468652061666f72656d656e74696f6e65642073746f72616765206974656d20697320616c736f20757365722d636f6e74726f6c6c6564207669615c2020206077697468647261775f756e626f6e646564602e40202d204f6e6520444220656e7472792e2c202d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a1d01202d20526561643a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e744572612c204c6f636b732c2042616c616e63654f662053746173682ca4202d2057726974653a204c6f636b732c204c65646765722c2042616c616e63654f662053746173682c28203c2f7765696768743e4477697468647261775f756e626f6e64656404486e756d5f736c617368696e675f7370616e730c7533327c2d012052656d6f766520616e7920756e6c6f636b6564206368756e6b732066726f6d207468652060756e6c6f636b696e67602071756575652066726f6d206f7572206d616e6167656d656e742e003501205468697320657373656e7469616c6c7920667265657320757020746861742062616c616e636520746f206265207573656420627920746865207374617368206163636f756e7420746f20646f4c2077686174657665722069742077616e74732e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004c20456d697473206057697468647261776e602e006c2053656520616c736f205b6043616c6c3a3a756e626f6e64605d2e002c2023203c7765696768743e5501202d20436f756c6420626520646570656e64656e74206f6e2074686520606f726967696e6020617267756d656e7420616e6420686f77206d7563682060756e6c6f636b696e6760206368756e6b732065786973742e45012020497420696d706c6965732060636f6e736f6c69646174655f756e6c6f636b656460207768696368206c6f6f7073206f76657220604c65646765722e756e6c6f636b696e67602c207768696368206973f42020696e6469726563746c7920757365722d636f6e74726f6c6c65642e20536565205b60756e626f6e64605d20666f72206d6f72652064657461696c2e7901202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732c20796574207468652073697a65206f6620776869636820636f756c64206265206c61726765206261736564206f6e20606c6564676572602ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d090120436f6d706c6578697479204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2072656d6f766520205570646174653a2501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c204c6f636b732c205b4f726967696e204163636f756e745da8202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c656467657218204b696c6c3a4501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c20426f6e6465642c20536c617368696e67205370616e732c205b4f726967696e8c2020204163636f756e745d2c204c6f636b732c2042616c616e63654f662073746173685101202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732cb02020205b4f726967696e204163636f756e745d2c204c6f636b732c2042616c616e63654f662073746173682e74202d2057726974657320456163683a205370616e536c617368202a20530d01204e4f54453a2057656967687420616e6e6f746174696f6e20697320746865206b696c6c207363656e6172696f2c20776520726566756e64206f74686572776973652e302023203c2f7765696768743e2076616c6964617465041470726566733856616c696461746f72507265667344e8204465636c617265207468652064657369726520746f2076616c696461746520666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e30202d2d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a90202d20526561643a2045726120456c656374696f6e205374617475732c204c656467657280202d2057726974653a204e6f6d696e61746f72732c2056616c696461746f7273302023203c2f7765696768743e206e6f6d696e617465041c74617267657473a05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e4c1101204465636c617265207468652064657369726520746f206e6f6d696e6174652060746172676574736020666f7220746865206f726967696e20636f6e74726f6c6c65722e00510120456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e20546869732063616e206f6e6c792062652063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e3101202d20546865207472616e73616374696f6e277320636f6d706c65786974792069732070726f706f7274696f6e616c20746f207468652073697a65206f662060746172676574736020284e2901012077686963682069732063617070656420617420436f6d7061637441737369676e6d656e74733a3a4c494d495420284d41585f4e4f4d494e4154494f4e53292ed8202d20426f74682074686520726561647320616e642077726974657320666f6c6c6f7720612073696d696c6172207061747465726e2e28202d2d2d2d2d2d2d2d2d34205765696768743a204f284e2984207768657265204e20697320746865206e756d626572206f6620746172676574732c204442205765696768743ac8202d2052656164733a2045726120456c656374696f6e205374617475732c204c65646765722c2043757272656e742045726184202d205772697465733a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e146368696c6c0044c8204465636c617265206e6f2064657369726520746f206569746865722076616c6964617465206f72206e6f6d696e6174652e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e54202d20436f6e7461696e73206f6e6520726561642ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e24202d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a88202d20526561643a20457261456c656374696f6e5374617475732c204c656467657280202d2057726974653a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e247365745f7061796565041470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e40b8202852652d2973657420746865207061796d656e742074617267657420666f72206120636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e28202d2d2d2d2d2d2d2d2d3c202d205765696768743a204f28312934202d204442205765696768743a4c20202020202d20526561643a204c65646765724c20202020202d2057726974653a205061796565302023203c2f7765696768743e387365745f636f6e74726f6c6c65720428636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654090202852652d297365742074686520636f6e74726f6c6c6572206f6620612073746173682e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e2c202d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743af4202d20526561643a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572f8202d2057726974653a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572302023203c2f7765696768743e4c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e209420536574732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e34205765696768743a204f2831295c2057726974653a2056616c696461746f7220436f756e74302023203c2f7765696768743e60696e6372656173655f76616c696461746f725f636f756e7404286164646974696f6e616c30436f6d706163743c7533323e1cac20496e6372656d656e74732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e842053616d65206173205b607365745f76616c696461746f725f636f756e74605d2e302023203c2f7765696768743e547363616c655f76616c696461746f725f636f756e740418666163746f721c50657263656e741cd4205363616c652075702074686520696465616c206e756d626572206f662076616c696461746f7273206279206120666163746f722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e842053616d65206173205b607365745f76616c696461746f725f636f756e74605d2e302023203c2f7765696768743e34666f7263655f6e6f5f657261730024b020466f72636520746865726520746f206265206e6f206e6577206572617320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e3c202d205765696768743a204f28312948202d2057726974653a20466f726365457261302023203c2f7765696768743e34666f7263655f6e65775f65726100284d0120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f6620746865206e6578742073657373696f6e2e20416674657220746869732c2069742077696c6c206265a020726573657420746f206e6f726d616c20286e6f6e2d666f7263656429206265686176696f75722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e3c202d205765696768743a204f28312944202d20577269746520466f726365457261302023203c2f7765696768743e447365745f696e76756c6e657261626c65730434696e76756c6e657261626c6573445665633c543a3a4163636f756e7449643e20cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e1c202d204f2856295c202d2057726974653a20496e76756c6e657261626c6573302023203c2f7765696768743e34666f7263655f756e7374616b650814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c753332280d0120466f72636520612063757272656e74207374616b657220746f206265636f6d6520636f6d706c6574656c7920756e7374616b65642c20696d6d6564696174656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743eec204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2062652072656d6f766564b82052656164733a20426f6e6465642c20536c617368696e67205370616e732c204163636f756e742c204c6f636b738501205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c204163636f756e742c204c6f636b736c2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e50666f7263655f6e65775f6572615f616c776179730020050120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f662073657373696f6e7320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e3c202d205765696768743a204f28312948202d2057726974653a20466f726365457261302023203c2f7765696768743e5463616e63656c5f64656665727265645f736c617368080c65726120457261496e64657834736c6173685f696e6469636573205665633c7533323e34982043616e63656c20656e6163746d656e74206f66206120646566657272656420736c6173682e00b42043616e2062652063616c6c6564206279207468652060543a3a536c61736843616e63656c4f726967696e602e00050120506172616d65746572733a2065726120616e6420696e6469636573206f662074686520736c617368657320666f7220746861742065726120746f206b696c6c2e002c2023203c7765696768743e5420436f6d706c65786974793a204f2855202b205329b82077697468205520756e6170706c69656420736c6173686573207765696768746564207769746820553d31303030d420616e64205320697320746865206e756d626572206f6620736c61736820696e646963657320746f2062652063616e63656c65642e68202d20526561643a20556e6170706c69656420536c61736865736c202d2057726974653a20556e6170706c69656420536c6173686573302023203c2f7765696768743e387061796f75745f7374616b657273083c76616c696461746f725f737461736830543a3a4163636f756e7449640c65726120457261496e64657870110120506179206f757420616c6c20746865207374616b65727320626568696e6420612073696e676c652076616c696461746f7220666f7220612073696e676c65206572612e004d01202d206076616c696461746f725f73746173686020697320746865207374617368206163636f756e74206f66207468652076616c696461746f722e205468656972206e6f6d696e61746f72732c20757020746f290120202060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602c2077696c6c20616c736f207265636569766520746865697220726577617264732e3501202d206065726160206d617920626520616e7920657261206265747765656e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e00590120546865206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e20416e79206163636f756e742063616e2063616c6c20746869732066756e6374696f6e2c206576656e20696678206974206973206e6f74206f6e65206f6620746865207374616b6572732e00010120546869732063616e206f6e6c792062652063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e0101202d2054696d6520636f6d706c65786974793a206174206d6f7374204f284d61784e6f6d696e61746f72526577617264656450657256616c696461746f72292ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e30202d2d2d2d2d2d2d2d2d2d2d1d01204e20697320746865204e756d626572206f66207061796f75747320666f72207468652076616c696461746f722028696e636c7564696e67207468652076616c696461746f722920205765696768743a88202d205265776172642044657374696e6174696f6e205374616b65643a204f284e29c4202d205265776172642044657374696e6174696f6e20436f6e74726f6c6c657220284372656174696e67293a204f284e292c204442205765696768743a2901202d20526561643a20457261456c656374696f6e5374617475732c2043757272656e744572612c20486973746f727944657074682c204572617356616c696461746f725265776172642c2d01202020202020202020457261735374616b657273436c69707065642c2045726173526577617264506f696e74732c204572617356616c696461746f725072656673202838206974656d73291101202d205265616420456163683a20426f6e6465642c204c65646765722c2050617965652c204c6f636b732c2053797374656d204163636f756e74202835206974656d7329d8202d20577269746520456163683a2053797374656d204163636f756e742c204c6f636b732c204c6564676572202833206974656d73290051012020204e4f54453a20776569676874732061726520617373756d696e672074686174207061796f75747320617265206d61646520746f20616c697665207374617368206163636f756e7420285374616b6564292e5901202020506179696e67206576656e2061206465616420636f6e74726f6c6c65722069732063686561706572207765696768742d776973652e20576520646f6e277420646f20616e7920726566756e647320686572652e302023203c2f7765696768743e187265626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e38e0205265626f6e64206120706f7274696f6e206f6620746865207374617368207363686564756c656420746f20626520756e6c6f636b65642e00550120546865206469737061746368206f726967696e206d757374206265207369676e65642062792074686520636f6e74726f6c6c65722c20616e642069742063616e206265206f6e6c792063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ed4202d2054696d6520636f6d706c65786974793a204f284c292c207768657265204c20697320756e6c6f636b696e67206368756e6b7394202d20426f756e64656420627920604d41585f554e4c4f434b494e475f4348554e4b53602ef4202d2053746f72616765206368616e6765733a2043616e277420696e6372656173652073746f726167652c206f6e6c792064656372656173652069742e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a010120202020202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c204c6f636b732c205b4f726967696e204163636f756e745db820202020202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e447365745f686973746f72795f646570746808446e65775f686973746f72795f646570746844436f6d706163743c457261496e6465783e485f6572615f6974656d735f64656c6574656430436f6d706163743c7533323e543101205365742060486973746f72794465707468602076616c75652e20546869732066756e6374696f6e2077696c6c2064656c65746520616e7920686973746f727920696e666f726d6174696f6e80207768656e2060486973746f727944657074686020697320726564756365642e003020506172616d65746572733a1101202d20606e65775f686973746f72795f6465707468603a20546865206e657720686973746f727920646570746820796f7520776f756c64206c696b6520746f207365742e4901202d20606572615f6974656d735f64656c65746564603a20546865206e756d626572206f66206974656d7320746861742077696c6c2062652064656c6574656420627920746869732064697370617463682e450120202020546869732073686f756c64207265706f727420616c6c207468652073746f72616765206974656d7320746861742077696c6c2062652064656c6574656420627920636c656172696e67206f6c6445012020202065726120686973746f72792e204e656564656420746f207265706f727420616e2061636375726174652077656967687420666f72207468652064697370617463682e2054727573746564206279a02020202060526f6f746020746f207265706f727420616e206163637572617465206e756d6265722e0054204f726967696e206d75737420626520726f6f742e002c2023203c7765696768743ee0202d20453a204e756d626572206f6620686973746f7279206465707468732072656d6f7665642c20692e652e203130202d3e2037203d20333c202d205765696768743a204f28452934202d204442205765696768743aa020202020202d2052656164733a2043757272656e74204572612c20486973746f72792044657074687020202020202d205772697465733a20486973746f7279204465707468310120202020202d20436c6561722050726566697820456163683a20457261205374616b6572732c204572615374616b657273436c69707065642c204572617356616c696461746f725072656673810120202020202d2057726974657320456163683a204572617356616c696461746f725265776172642c2045726173526577617264506f696e74732c2045726173546f74616c5374616b652c2045726173537461727453657373696f6e496e646578302023203c2f7765696768743e28726561705f73746173680814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c7533323c39012052656d6f766520616c6c20646174612073747275637475726520636f6e6365726e696e672061207374616b65722f7374617368206f6e6365206974732062616c616e6365206973207a65726f2e6101205468697320697320657373656e7469616c6c79206571756976616c656e7420746f206077697468647261775f756e626f6e64656460206578636570742069742063616e2062652063616c6c656420627920616e796f6e65c020616e6420746865207461726765742060737461736860206d7573742068617665206e6f2066756e6473206c6566742e009020546869732063616e2062652063616c6c65642066726f6d20616e79206f726967696e2e000101202d20607374617368603a20546865207374617368206163636f756e7420746f20726561702e204974732062616c616e6365206d757374206265207a65726f2e002c2023203c7765696768743e250120436f6d706c65786974793a204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e73206f6e20746865206163636f756e742e2c204442205765696768743ad8202d2052656164733a205374617368204163636f756e742c20426f6e6465642c20536c617368696e67205370616e732c204c6f636b73a501202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c205374617368204163636f756e742c204c6f636b7374202d2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e607375626d69745f656c656374696f6e5f736f6c7574696f6e141c77696e6e6572734c5665633c56616c696461746f72496e6465783e1c636f6d7061637448436f6d7061637441737369676e6d656e74731473636f726534456c656374696f6e53636f72650c65726120457261496e6465781073697a6530456c656374696f6e53697a65c4e4205375626d697420616e20656c656374696f6e20726573756c7420746f2074686520636861696e2e2049662074686520736f6c7574696f6e3a003420312e2069732076616c69642e150120322e206861732061206265747465722073636f7265207468616e206120706f74656e7469616c6c79206578697374696e6720736f6c7574696f6e206f6e20636861696e2e0084207468656e2c2069742077696c6c206265205f7075745f206f6e20636861696e2e00ac204120736f6c7574696f6e20636f6e7369737473206f662074776f20706965636573206f6620646174613a00f420312e206077696e6e657273603a206120666c617420766563746f72206f6620616c6c207468652077696e6e657273206f662074686520726f756e642e510120322e206061737369676e6d656e7473603a2074686520636f6d706163742076657273696f6e206f6620616e2061737369676e6d656e7420766563746f72207468617420656e636f6465732074686520656467653020202020776569676874732e00210120426f7468206f66207768696368206d617920626520636f6d7075746564207573696e67205f70687261676d656e5f2c206f7220616e79206f7468657220616c676f726974686d2e00a8204164646974696f6e616c6c792c20746865207375626d6974746572206d7573742070726f766964653a00c8202d20546865206073636f7265602074686174207468657920636c61696d20746865697220736f6c7574696f6e206861732e004d0120426f74682076616c696461746f727320616e64206e6f6d696e61746f72732077696c6c20626520726570726573656e74656420627920696e646963657320696e2074686520736f6c7574696f6e2e205468651d0120696e64696365732073686f756c6420726573706563742074686520636f72726573706f6e64696e6720747970657320285b6056616c696461746f72496e646578605d20616e643101205b604e6f6d696e61746f72496e646578605d292e204d6f72656f7665722c20746865792073686f756c642062652076616c6964207768656e207573656420746f20696e64657820696e746f5101205b60536e617073686f7456616c696461746f7273605d20616e64205b60536e617073686f744e6f6d696e61746f7273605d2e20416e7920696e76616c696420696e6465782077696c6c20636175736520746865610120736f6c7574696f6e20746f2062652072656a65637465642e2054686573652074776f2073746f72616765206974656d73206172652073657420647572696e672074686520656c656374696f6e2077696e646f7720616e6498206d6179206265207573656420746f2064657465726d696e652074686520696e64696365732e0060204120736f6c7574696f6e2069732076616c69642069663a00e420302e204974206973207375626d6974746564207768656e205b60457261456c656374696f6e537461747573605d20697320604f70656e602ef820312e2049747320636c61696d65642073636f726520697320657175616c20746f207468652073636f726520636f6d7075746564206f6e2d636861696e2eac20322e2050726573656e74732074686520636f7272656374206e756d626572206f662077696e6e6572732e550120332e20416c6c20696e6465786573206d7573742062652076616c7565206163636f7264696e6720746f2074686520736e617073686f7420766563746f72732e20416c6c20656467652076616c756573206d7573745d0120202020616c736f20626520636f727265637420616e642073686f756c64206e6f74206f766572666c6f7720746865206772616e756c6172697479206f662074686520726174696f20747970652028692e652e2032353640202020206f722062696c6c696f6e292e0d0120342e20466f72206561636820656467652c20616c6c2074617267657473206172652061637475616c6c79206e6f6d696e617465642062792074686520766f7465722e6c20352e2048617320636f72726563742073656c662d766f7465732e00c0204120736f6c7574696f6e732073636f726520697320636f6e736973746564206f66203320706172616d65746572733a00650120312e20606d696e207b20737570706f72742e746f74616c207d6020666f72206561636820737570706f7274206f6620612077696e6e65722e20546869732076616c75652073686f756c64206265206d6178696d697a65642e650120322e206073756d207b20737570706f72742e746f74616c207d6020666f72206561636820737570706f7274206f6620612077696e6e65722e20546869732076616c75652073686f756c64206265206d696e696d697a65642e410120332e206073756d207b20737570706f72742e746f74616c5e32207d6020666f72206561636820737570706f7274206f6620612077696e6e65722e20546869732076616c75652073686f756c642062659c202020206d696e696d697a65642028746f20656e73757265206c6573732076617269616e636529002c2023203c7765696768743e190120546865207472616e73616374696f6e20697320617373756d656420746f20626520746865206c6f6e6765737420706174682c20612062657474657220736f6c7574696f6e2ea42020202d20496e697469616c20736f6c7574696f6e20697320616c6d6f7374207468652073616d652e45012020202d20576f72736520736f6c7574696f6e20697320726574726163656420696e207072652d64697370617463682d636865636b73207768696368207365747320697473206f776e207765696768742e302023203c2f7765696768743e847375626d69745f656c656374696f6e5f736f6c7574696f6e5f756e7369676e6564141c77696e6e6572734c5665633c56616c696461746f72496e6465783e1c636f6d7061637448436f6d7061637441737369676e6d656e74731473636f726534456c656374696f6e53636f72650c65726120457261496e6465781073697a6530456c656374696f6e53697a6524c020556e7369676e65642076657273696f6e206f6620607375626d69745f656c656374696f6e5f736f6c7574696f6e602e005d01204e6f746520746861742074686973206d757374207061737320746865205b6056616c6964617465556e7369676e6564605d20636865636b207768696368206f6e6c7920616c6c6f7773207472616e73616374696f6e7361012066726f6d20746865206c6f63616c206e6f646520746f20626520696e636c756465642e20496e206f7468657220776f7264732c206f6e6c792074686520626c6f636b20617574686f722063616e20696e636c756465206168207472616e73616374696f6e20696e2074686520626c6f636b2e002c2023203c7765696768743e8820536565205b607375626d69745f656c656374696f6e5f736f6c7574696f6e605d2e302023203c2f7765696768743e0124244572615061796f75740c20457261496e6465781c42616c616e63651c42616c616e63650c59012054686520657261207061796f757420686173206265656e207365743b207468652066697273742062616c616e6365206973207468652076616c696461746f722d7061796f75743b20746865207365636f6e64206973c4207468652072656d61696e6465722066726f6d20746865206d6178696d756d20616d6f756e74206f66207265776172642eac205c5b6572615f696e6465782c2076616c696461746f725f7061796f75742c2072656d61696e6465725c5d1852657761726408244163636f756e7449641c42616c616e636504fc20546865207374616b657220686173206265656e207265776172646564206279207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d14536c61736808244163636f756e7449641c42616c616e6365082501204f6e652076616c696461746f722028616e6420697473206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e58205c5b76616c696461746f722c20616d6f756e745c5d684f6c64536c617368696e675265706f7274446973636172646564043053657373696f6e496e646578081d0120416e206f6c6420736c617368696e67207265706f72742066726f6d2061207072696f72206572612077617320646973636172646564206265636175736520697420636f756c6490206e6f742062652070726f6365737365642e205c5b73657373696f6e5f696e6465785c5d3c5374616b696e67456c656374696f6e043c456c656374696f6e436f6d7075746504f42041206e657720736574206f66207374616b6572732077617320656c656374656420776974682074686520676976656e205c5b636f6d707574655c5d2e38536f6c7574696f6e53746f726564043c456c656374696f6e436f6d707574650419012041206e657720736f6c7574696f6e20666f7220746865207570636f6d696e6720656c656374696f6e20686173206265656e2073746f7265642e205c5b636f6d707574655c5d18426f6e64656408244163636f756e7449641c42616c616e636510d420416e206163636f756e742068617320626f6e646564207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d005101204e4f54453a2054686973206576656e74206973206f6e6c7920656d6974746564207768656e2066756e64732061726520626f6e64656420766961206120646973706174636861626c652e204e6f7461626c792c25012069742077696c6c206e6f7420626520656d697474656420666f72207374616b696e672072657761726473207768656e20746865792061726520616464656420746f207374616b652e20556e626f6e64656408244163636f756e7449641c42616c616e636504dc20416e206163636f756e742068617320756e626f6e646564207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d2457697468647261776e08244163636f756e7449641c42616c616e6365085d0120416e206163636f756e74206861732063616c6c6564206077697468647261775f756e626f6e6465646020616e642072656d6f76656420756e626f6e64696e67206368756e6b7320776f727468206042616c616e636560b02066726f6d2074686520756e6c6f636b696e672071756575652e205c5b73746173682c20616d6f756e745c5d1c3853657373696f6e735065724572613053657373696f6e496e64657810060000000470204e756d626572206f662073657373696f6e7320706572206572612e3c426f6e64696e674475726174696f6e20457261496e64657810a002000004e4204e756d626572206f6620657261732074686174207374616b65642066756e6473206d7573742072656d61696e20626f6e64656420666f722e48536c61736844656665724475726174696f6e20457261496e64657810a8000000140101204e756d626572206f662065726173207468617420736c6173686573206172652064656665727265642062792c20616674657220636f6d7075746174696f6e2e00bc20546869732073686f756c64206265206c657373207468616e2074686520626f6e64696e67206475726174696f6e2e2d012053657420746f203020696620736c61736865732073686f756c64206265206170706c69656420696d6d6564696174656c792c20776974686f7574206f70706f7274756e69747920666f723820696e74657276656e74696f6e2e44456c656374696f6e4c6f6f6b616865616438543a3a426c6f636b4e756d62657210320000001c710120546865206e756d626572206f6620626c6f636b73206265666f72652074686520656e64206f6620746865206572612066726f6d20776869636820656c656374696f6e207375626d697373696f6e732061726520616c6c6f7765642e006d012053657474696e67207468697320746f207a65726f2077696c6c2064697361626c6520746865206f6666636861696e20636f6d7075746520616e64206f6e6c79206f6e2d636861696e207365712d70687261676d656e2077696c6c2420626520757365642e007501205468697320697320626f756e646564206279206265696e672077697468696e20746865206c6173742073657373696f6e2e2048656e63652c2073657474696e6720697420746f20612076616c7565206d6f7265207468616e207468659c206c656e677468206f6620612073657373696f6e2077696c6c20626520706f696e746c6573732e344d6178497465726174696f6e730c753332100a0000000c2901204d6178696d756d206e756d626572206f662062616c616e63696e6720697465726174696f6e7320746f2072756e20696e20746865206f6666636861696e207375626d697373696f6e2e00ec2049662073657420746f20302c2062616c616e63655f736f6c7574696f6e2077696c6c206e6f7420626520657865637574656420617420616c6c2e504d696e536f6c7574696f6e53636f726542756d701c50657262696c6c1020a1070004610120546865207468726573686f6c64206f6620696d70726f76656d656e7420746861742073686f756c642062652070726f766964656420666f722061206e657720736f6c7574696f6e20746f2062652061636365707465642e804d61784e6f6d696e61746f72526577617264656450657256616c696461746f720c753332100001000010f820546865206d6178696d756d206e756d626572206f66206e6f6d696e61746f727320726577617264656420666f7220656163682076616c696461746f722e00690120466f7220656163682076616c696461746f72206f6e6c79207468652060244d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732063616e20636c61696d2101207468656972207265776172642e2054686973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e7c344e6f74436f6e74726f6c6c65720468204e6f74206120636f6e74726f6c6c6572206163636f756e742e204e6f7453746173680454204e6f742061207374617368206163636f756e742e34416c7265616479426f6e646564046420537461736820697320616c726561647920626f6e6465642e34416c7265616479506169726564047820436f6e74726f6c6c657220697320616c7265616479207061697265642e30456d70747954617267657473046420546172676574732063616e6e6f7420626520656d7074792e384475706c6963617465496e6465780444204475706c696361746520696e6465782e44496e76616c6964536c617368496e646578048820536c617368207265636f726420696e646578206f7574206f6620626f756e64732e44496e73756666696369656e7456616c756504cc2043616e206e6f7420626f6e6420776974682076616c7565206c657373207468616e206d696e696d756d2062616c616e63652e304e6f4d6f72654368756e6b7304942043616e206e6f74207363686564756c65206d6f726520756e6c6f636b206368756e6b732e344e6f556e6c6f636b4368756e6b04a42043616e206e6f74207265626f6e6420776974686f757420756e6c6f636b696e67206368756e6b732e3046756e64656454617267657404cc20417474656d7074696e6720746f2074617267657420612073746173682074686174207374696c6c206861732066756e64732e48496e76616c6964457261546f526577617264045c20496e76616c69642065726120746f207265776172642e68496e76616c69644e756d6265724f664e6f6d696e6174696f6e73047c20496e76616c6964206e756d626572206f66206e6f6d696e6174696f6e732e484e6f74536f72746564416e64556e697175650484204974656d7320617265206e6f7420736f7274656420616e6420756e697175652e38416c7265616479436c61696d6564040d01205265776172647320666f72207468697320657261206861766520616c7265616479206265656e20636c61696d656420666f7220746869732076616c696461746f722e7c4f6666636861696e456c656374696f6e4561726c795375626d697373696f6e04e420546865207375626d697474656420726573756c74206973207265636569766564206f7574206f6620746865206f70656e2077696e646f772e784f6666636861696e456c656374696f6e5765616b5375626d697373696f6e04010120546865207375626d697474656420726573756c74206973206e6f7420617320676f6f6420617320746865206f6e652073746f726564206f6e20636861696e2e4c536e617073686f74556e617661696c61626c6504d02054686520736e617073686f742064617461206f66207468652063757272656e742077696e646f77206973206d697373696e672e804f6666636861696e456c656374696f6e426f67757357696e6e6572436f756e7404b020496e636f7272656374206e756d626572206f662077696e6e65727320776572652070726573656e7465642e6c4f6666636861696e456c656374696f6e426f67757357696e6e6572086101204f6e65206f6620746865207375626d69747465642077696e6e657273206973206e6f7420616e206163746976652063616e646964617465206f6e20636861696e2028696e646578206973206f7574206f662072616e67653820696e20736e617073686f74292e704f6666636861696e456c656374696f6e426f677573436f6d70616374085d01204572726f72207768696c65206275696c64696e67207468652061737369676e6d656e7420747970652066726f6d2074686520636f6d706163742e20546869732063616e2068617070656e20696620616e20696e646578a820697320696e76616c69642c206f72206966207468652077656967687473205f6f766572666c6f775f2e784f6666636861696e456c656374696f6e426f6775734e6f6d696e61746f72041501204f6e65206f6620746865207375626d6974746564206e6f6d696e61746f7273206973206e6f7420616e20616374697665206e6f6d696e61746f72206f6e20636861696e2e7c4f6666636861696e456c656374696f6e426f6775734e6f6d696e6174696f6e044d01204f6e65206f6620746865207375626d6974746564206e6f6d696e61746f72732068617320616e206564676520746f20776869636820746865792068617665206e6f7420766f746564206f6e20636861696e2e844f6666636861696e456c656374696f6e536c61736865644e6f6d696e6174696f6e086101204f6e65206f6620746865207375626d6974746564206e6f6d696e61746f72732068617320616e2065646765207768696368206973207375626d6974746564206265666f726520746865206c617374206e6f6e2d7a65726f5420736c617368206f6620746865207461726765742e744f6666636861696e456c656374696f6e426f67757353656c66566f746504250120412073656c6620766f7465206d757374206f6e6c79206265206f726967696e617465642066726f6d20612076616c696461746f7220746f204f4e4c59207468656d73656c7665732e644f6666636861696e456c656374696f6e426f6775734564676504450120546865207375626d697474656420726573756c742068617320756e6b6e6f776e206564676573207468617420617265206e6f7420616d6f6e67207468652070726573656e7465642077696e6e6572732e684f6666636861696e456c656374696f6e426f67757353636f72650419012054686520636c61696d65642073636f726520646f6573206e6f74206d61746368207769746820746865206f6e6520636f6d70757465642066726f6d2074686520646174612e844f6666636861696e456c656374696f6e426f677573456c656374696f6e53697a6504782054686520656c656374696f6e2073697a6520697320696e76616c69642e3843616c6c4e6f74416c6c6f776564044901205468652063616c6c206973206e6f7420616c6c6f7765642061742074686520676976656e2074696d652064756520746f207265737472696374696f6e73206f6620656c656374696f6e20706572696f642e54496e636f7272656374486973746f7279446570746804c420496e636f72726563742070726576696f757320686973746f727920646570746820696e7075742070726f76696465642e58496e636f7272656374536c617368696e675370616e7304b420496e636f7272656374206e756d626572206f6620736c617368696e67207370616e732070726f76696465642e081c53657373696f6e011c53657373696f6e1c2856616c696461746f727301004c5665633c543a3a56616c696461746f7249643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3043757272656e74496e64657801003053657373696f6e496e646578100000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e345175657565644368616e676564010010626f6f6c040008390120547275652069662074686520756e6465726c79696e672065636f6e6f6d6963206964656e746974696573206f7220776569676874696e6720626568696e64207468652076616c696461746f7273a420686173206368616e67656420696e20746865207175657565642076616c696461746f72207365742e285175657565644b6579730100785665633c28543a3a56616c696461746f7249642c20543a3a4b657973293e0400083d012054686520717565756564206b65797320666f7220746865206e6578742073657373696f6e2e205768656e20746865206e6578742073657373696f6e20626567696e732c207468657365206b657973e02077696c6c206265207573656420746f2064657465726d696e65207468652076616c696461746f7227732073657373696f6e206b6579732e4844697361626c656456616c696461746f72730100205665633c7533323e04000c8020496e6469636573206f662064697361626c65642076616c696461746f72732e003501205468652073657420697320636c6561726564207768656e20606f6e5f73657373696f6e5f656e64696e67602072657475726e732061206e657720736574206f66206964656e7469746965732e204e6578744b65797300010538543a3a56616c696461746f7249641c543a3a4b657973000400049c20546865206e6578742073657373696f6e206b65797320666f7220612076616c696461746f722e204b65794f776e657200010550284b65795479706549642c205665633c75383e2938543a3a56616c696461746f72496400040004090120546865206f776e6572206f662061206b65792e20546865206b65792069732074686520604b657954797065496460202b2074686520656e636f646564206b65792e0108207365745f6b65797308106b6579731c543a3a4b6579731470726f6f661c5665633c75383e38e82053657473207468652073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c657220746f20606b657973602e210120416c6c6f777320616e206163636f756e7420746f20736574206974732073657373696f6e206b6579207072696f7220746f206265636f6d696e6720612076616c696461746f722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a20606f726967696e206163636f756e74602c2060543a3a56616c696461746f7249644f66602c20604e6578744b65797360a4202d2044625772697465733a20606f726967696e206163636f756e74602c20604e6578744b6579736084202d204462526561647320706572206b65792069643a20604b65794f776e65726088202d20446257726974657320706572206b65792069643a20604b65794f776e657260302023203c2f7765696768743e2870757267655f6b6579730030cc2052656d6f76657320616e792073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c65722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743eb4202d20436f6d706c65786974793a20604f2831296020696e206e756d626572206f66206b65792074797065732e590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a2060543a3a56616c696461746f7249644f66602c20604e6578744b657973602c20606f726967696e206163636f756e7460a4202d2044625772697465733a20604e6578744b657973602c20606f726967696e206163636f756e74608c202d20446257726974657320706572206b65792069643a20604b65794f776e64657260302023203c2f7765696768743e0104284e657753657373696f6e043053657373696f6e496e646578086501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e7420697320746865205c5b73657373696f6e5f696e6465785c5d2c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e001030496e76616c696450726f6f66046420496e76616c6964206f776e6572736869702070726f6f662e5c4e6f4173736f63696174656456616c696461746f72496404a0204e6f206173736f6369617465642076616c696461746f7220494420666f72206163636f756e742e344475706c6963617465644b657904682052656769737465726564206475706c6963617465206b65792e184e6f4b65797304a8204e6f206b65797320617265206173736f63696174656420776974682074686973206163636f756e742e092444656d6f6372616379012444656d6f6372616379383c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f707301009c5665633c2850726f70496e6465782c20543a3a486173682c20543a3a4163636f756e744964293e040004210120546865207075626c69632070726f706f73616c732e20556e736f727465642e20546865207365636f6e64206974656d206973207468652070726f706f73616c277320686173682e244465706f7369744f660001052450726f70496e64657884285665633c543a3a4163636f756e7449643e2c2042616c616e63654f663c543e290004000c842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e00d82054574f582d4e4f54453a20536166652c20617320696e6372656173696e6720696e7465676572206b6579732061726520736166652e24507265696d616765730001061c543a3a48617368e8507265696d6167655374617475733c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e000400086101204d6170206f662068617368657320746f207468652070726f706f73616c20707265696d6167652c20616c6f6e6720776974682077686f207265676973746572656420697420616e64207468656972206465706f7369742ee42054686520626c6f636b206e756d6265722069732074686520626c6f636b20617420776869636820697420776173206465706f73697465642e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e344c6f77657374556e62616b656401003c5265666572656e64756d496e646578100000000008250120546865206c6f77657374207265666572656e64756d20696e64657820726570726573656e74696e6720616e20756e62616b6564207265666572656e64756d2e20457175616c20746fdc20605265666572656e64756d436f756e74602069662074686572652069736e2774206120756e62616b6564207265666572656e64756d2e405265666572656e64756d496e666f4f660001053c5265666572656e64756d496e646578d45265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a486173682c2042616c616e63654f663c543e3e0004000cb420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e0009012054574f582d4e4f54453a205341464520617320696e646578657320617265206e6f7420756e64657220616e2061747461636b6572e280997320636f6e74726f6c2e20566f74696e674f6601010530543a3a4163636f756e744964c8566f74696e673c42616c616e63654f663c543e2c20543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00d8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105d0120416c6c20766f74657320666f72206120706172746963756c617220766f7465722e2057652073746f7265207468652062616c616e636520666f7220746865206e756d626572206f6620766f74657320746861742077655d012068617665207265636f726465642e20546865207365636f6e64206974656d2069732074686520746f74616c20616d6f756e74206f662064656c65676174696f6e732c20746861742077696c6c2062652061646465642e00e82054574f582d4e4f54453a205341464520617320604163636f756e7449646073206172652063727970746f2068617368657320616e797761792e144c6f636b7300010530543a3a4163636f756e74496438543a3a426c6f636b4e756d626572000400105d01204163636f756e747320666f7220776869636820746865726520617265206c6f636b7320696e20616374696f6e207768696368206d61792062652072656d6f76656420617420736f6d6520706f696e7420696e207468655101206675747572652e205468652076616c75652069732074686520626c6f636b206e756d62657220617420776869636820746865206c6f636b206578706972657320616e64206d61792062652072656d6f7665642e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e544c6173745461626c656457617345787465726e616c010010626f6f6c0400085901205472756520696620746865206c617374207265666572656e64756d207461626c656420776173207375626d69747465642065787465726e616c6c792e2046616c7365206966206974207761732061207075626c6963282070726f706f73616c2e304e65787445787465726e616c00006028543a3a486173682c20566f74655468726573686f6c6429040010590120546865207265666572656e64756d20746f206265207461626c6564207768656e6576657220697420776f756c642062652076616c696420746f207461626c6520616e2065787465726e616c2070726f706f73616c2e550120546869732068617070656e73207768656e2061207265666572656e64756d206e6565647320746f206265207461626c656420616e64206f6e65206f662074776f20636f6e646974696f6e7320617265206d65743aa4202d20604c6173745461626c656457617345787465726e616c60206973206066616c7365603b206f7268202d20605075626c696350726f70736020697320656d7074792e24426c61636b6c6973740001061c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290004000851012041207265636f7264206f662077686f207665746f656420776861742e204d6170732070726f706f73616c206861736820746f206120706f737369626c65206578697374656e7420626c6f636b206e756d626572e82028756e74696c207768656e206974206d6179206e6f742062652072657375626d69747465642920616e642077686f207665746f65642069742e3443616e63656c6c6174696f6e730101061c543a3a4861736810626f6f6c000400042901205265636f7264206f6620616c6c2070726f706f73616c7320746861742068617665206265656e207375626a65637420746f20656d657267656e63792063616e63656c6c6174696f6e2e3853746f7261676556657273696f6e00002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e01641c70726f706f7365083470726f706f73616c5f686173681c543a3a486173681476616c756554436f6d706163743c42616c616e63654f663c543e3e2ca02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e00190120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573748420686176652066756e647320746f20636f76657220746865206465706f7369742e00d8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20707265696d6167652e1901202d206076616c7565603a2054686520616d6f756e74206f66206465706f73697420286d757374206265206174206c6561737420604d696e696d756d4465706f73697460292e004820456d697473206050726f706f736564602e003c205765696768743a20604f28702960187365636f6e64082070726f706f73616c48436f6d706163743c50726f70496e6465783e4c7365636f6e64735f75707065725f626f756e6430436f6d706163743c7533323e28b8205369676e616c732061677265656d656e742077697468206120706172746963756c61722070726f706f73616c2e00050120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e6465721501206d75737420686176652066756e647320746f20636f76657220746865206465706f7369742c20657175616c20746f20746865206f726967696e616c206465706f7369742e00cc202d206070726f706f73616c603a2054686520696e646578206f66207468652070726f706f73616c20746f207365636f6e642e4501202d20607365636f6e64735f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e207468652063757272656e74206e756d626572206f66207365636f6e6473206f6e2074686973290120202070726f706f73616c2e2045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e002101205765696768743a20604f28532960207768657265205320697320746865206e756d626572206f66207365636f6e647320612070726f706f73616c20616c7265616479206861732e10766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f7465644163636f756e74566f74653c42616c616e63654f663c543e3e24350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00e0202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f20766f746520666f722e88202d2060766f7465603a2054686520766f746520636f6e66696775726174696f6e2e003101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722068617320766f746564206f6e2e40656d657267656e63795f63616e63656c04247265665f696e6465783c5265666572656e64756d496e646578205101205363686564756c6520616e20656d657267656e63792063616e63656c6c6174696f6e206f662061207265666572656e64756d2e2043616e6e6f742068617070656e20747769636520746f207468652073616d6530207265666572656e64756d2e00fc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206043616e63656c6c6174696f6e4f726967696e602e00d4202d607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e0040205765696768743a20604f283129602e4065787465726e616c5f70726f706f7365043470726f706f73616c5f686173681c543a3a48617368243101205363686564756c652061207265666572656e64756d20746f206265207461626c6564206f6e6365206974206973206c6567616c20746f207363686564756c6520616e2065787465726e616c30207265666572656e64756d2e00ec20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206045787465726e616c4f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e001901205765696768743a20604f2856296020776974682056206e756d626572206f66207665746f65727320696e2074686520626c61636b6c697374206f662070726f706f73616c2ebc2020204465636f64696e6720766563206f66206c656e67746820562e2043686172676564206173206d6178696d756d6465787465726e616c5f70726f706f73655f6d616a6f72697479043470726f706f73616c5f686173681c543a3a486173682c5901205363686564756c652061206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f207363686564756c656020616e2065787465726e616c207265666572656e64756d2e00f020546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c4d616a6f726974794f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e003c205765696768743a20604f283129606065787465726e616c5f70726f706f73655f64656661756c74043470726f706f73616c5f686173681c543a3a486173682c4901205363686564756c652061206e656761746976652d7475726e6f75742d62696173207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f84207363686564756c6520616e2065787465726e616c207265666572656e64756d2e00ec20546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c44656661756c744f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e003c205765696768743a20604f2831296028666173745f747261636b0c3470726f706f73616c5f686173681c543a3a4861736834766f74696e675f706572696f6438543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d6265723c5101205363686564756c65207468652063757272656e746c792065787465726e616c6c792d70726f706f736564206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564650120696d6d6564696174656c792e204966207468657265206973206e6f2065787465726e616c6c792d70726f706f736564207265666572656e64756d2063757272656e746c792c206f72206966207468657265206973206f6e65ec20627574206974206973206e6f742061206d616a6f726974792d63617272696573207265666572656e64756d207468656e206974206661696c732e00d420546865206469737061746368206f6620746869732063616c6c206d757374206265206046617374547261636b4f726967696e602e00f8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652063757272656e742065787465726e616c2070726f706f73616c2e6101202d2060766f74696e675f706572696f64603a2054686520706572696f64207468617420697320616c6c6f77656420666f7220766f74696e67206f6e20746869732070726f706f73616c2e20496e6372656173656420746f982020206046617374547261636b566f74696e67506572696f646020696620746f6f206c6f772e5501202d206064656c6179603a20546865206e756d626572206f6620626c6f636b20616674657220766f74696e672068617320656e64656420696e20617070726f76616c20616e6420746869732073686f756c64206265bc202020656e61637465642e205468697320646f65736e277420686176652061206d696e696d756d20616d6f756e742e004420456d697473206053746172746564602e003c205765696768743a20604f28312960347665746f5f65787465726e616c043470726f706f73616c5f686173681c543a3a4861736824bc205665746f20616e6420626c61636b6c697374207468652065787465726e616c2070726f706f73616c20686173682e00dc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d75737420626520605665746f4f726967696e602e003101202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c20746f207665746f20616e6420626c61636b6c6973742e004020456d69747320605665746f6564602e000101205765696768743a20604f2856202b206c6f6728562929602077686572652056206973206e756d626572206f6620606578697374696e67207665746f657273604463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e1c542052656d6f76652061207265666572656e64756d2e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00d8202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e00482023205765696768743a20604f283129602e3463616e63656c5f717565756564041477686963683c5265666572656e64756d496e6465781ca02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00c8202d20607768696368603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e004d01205765696768743a20604f284429602077686572652060446020697320746865206974656d7320696e207468652064697370617463682071756575652e205765696768746564206173206044203d203130602e2064656c65676174650c08746f30543a3a4163636f756e74496428636f6e76696374696f6e28436f6e76696374696f6e1c62616c616e63653042616c616e63654f663c543e503d012044656c65676174652074686520766f74696e6720706f77657220287769746820736f6d6520676976656e20636f6e76696374696f6e29206f66207468652073656e64696e67206163636f756e742e005901205468652062616c616e63652064656c656761746564206973206c6f636b656420666f72206173206c6f6e6720617320697427732064656c6567617465642c20616e64207468657265616674657220666f7220746865cc2074696d6520617070726f70726961746520666f722074686520636f6e76696374696f6e2773206c6f636b20706572696f642e00610120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e696e67206163636f756e74206d757374206569746865723a782020202d2062652064656c65676174696e6720616c72656164793b206f725d012020202d2068617665206e6f20766f74696e67206163746976697479202869662074686572652069732c207468656e2069742077696c6c206e65656420746f2062652072656d6f7665642f636f6e736f6c6964617465649820202020207468726f7567682060726561705f766f746560206f722060756e766f746560292e004901202d2060746f603a20546865206163636f756e742077686f736520766f74696e6720746865206074617267657460206163636f756e74277320766f74696e6720706f7765722077696c6c20666f6c6c6f772e5901202d2060636f6e76696374696f6e603a2054686520636f6e76696374696f6e20746861742077696c6c20626520617474616368656420746f207468652064656c65676174656420766f7465732e205768656e2074686545012020206163636f756e7420697320756e64656c6567617465642c207468652066756e64732077696c6c206265206c6f636b656420666f722074686520636f72726573706f6e64696e6720706572696f642e5501202d206062616c616e6365603a2054686520616d6f756e74206f6620746865206163636f756e7427732062616c616e636520746f206265207573656420696e2064656c65676174696e672e2054686973206d757374c82020206e6f74206265206d6f7265207468616e20746865206163636f756e7427732063757272656e742062616c616e63652e004c20456d697473206044656c656761746564602e004101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732e28756e64656c65676174650030d020556e64656c65676174652074686520766f74696e6720706f776572206f66207468652073656e64696e67206163636f756e742e00610120546f6b656e73206d617920626520756e6c6f636b656420666f6c6c6f77696e67206f6e636520616e20616d6f756e74206f662074696d6520636f6e73697374656e74207769746820746865206c6f636b20706572696f64e0206f662074686520636f6e76696374696f6e2077697468207768696368207468652064656c65676174696f6e20776173206973737565642e00490120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265582063757272656e746c792064656c65676174696e672e005420456d6974732060556e64656c656761746564602e004101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732e58636c6561725f7075626c69635f70726f706f73616c7300147420436c6561727320616c6c207075626c69632070726f706f73616c732e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e0040205765696768743a20604f283129602e346e6f74655f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e2861012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e205468697320646f65736e27742072657175697265207468652070726f706f73616c20746f206265250120696e207468652064697370617463682071756575652062757420646f657320726571756972652061206465706f7369742c2072657475726e6564206f6e636520656e61637465642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e005101205765696768743a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e646e6f74655f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e040d012053616d6520617320606e6f74655f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e586e6f74655f696d6d696e656e745f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e3045012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e2054686973207265717569726573207468652070726f706f73616c20746f206265410120696e207468652064697370617463682071756575652e204e6f206465706f736974206973206e65656465642e205768656e20746869732063616c6c206973207375636365737366756c2c20692e652e39012074686520707265696d61676520686173206e6f74206265656e2075706c6f61646564206265666f726520616e64206d61746368657320736f6d6520696d6d696e656e742070726f706f73616c2c40206e6f2066656520697320706169642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e005101205765696768743a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e886e6f74655f696d6d696e656e745f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e0431012053616d6520617320606e6f74655f696d6d696e656e745f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e34726561705f707265696d616765083470726f706f73616c5f686173681c543a3a486173686070726f706f73616c5f6c656e5f75707065725f626f756e6430436f6d706163743c7533323e3cf42052656d6f766520616e20657870697265642070726f706f73616c20707265696d61676520616e6420636f6c6c65637420746865206465706f7369742e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00d0202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f6620612070726f706f73616c2e2d01202d206070726f706f73616c5f6c656e6774685f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e206c656e677468206f66207468652070726f706f73616c2e010120202045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e00510120546869732077696c6c206f6e6c7920776f726b2061667465722060566f74696e67506572696f646020626c6f636b732066726f6d207468652074696d6520746861742074686520707265696d616765207761735d01206e6f7465642c2069662069742773207468652073616d65206163636f756e7420646f696e672069742e2049662069742773206120646966666572656e74206163636f756e742c207468656e206974276c6c206f6e6c79b020776f726b20616e206164646974696f6e616c2060456e6163746d656e74506572696f6460206c617465722e006020456d6974732060507265696d616765526561706564602e00b8205765696768743a20604f284429602077686572652044206973206c656e677468206f662070726f706f73616c2e18756e6c6f636b041874617267657430543a3a4163636f756e7449641ca420556e6c6f636b20746f6b656e732074686174206861766520616e2065787069726564206c6f636b2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00bc202d2060746172676574603a20546865206163636f756e7420746f2072656d6f766520746865206c6f636b206f6e2e00c0205765696768743a20604f2852296020776974682052206e756d626572206f6620766f7465206f66207461726765742e2c72656d6f76655f766f74650414696e6465783c5265666572656e64756d496e6465786c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e00102049663a8c202d20746865207265666572656e64756d207761732063616e63656c6c65642c206f7280202d20746865207265666572656e64756d206973206f6e676f696e672c206f7294202d20746865207265666572656e64756d2068617320656e6465642073756368207468617401012020202d2074686520766f7465206f6620746865206163636f756e742077617320696e206f70706f736974696f6e20746f2074686520726573756c743b206f72d82020202d20746865726520776173206e6f20636f6e76696374696f6e20746f20746865206163636f756e74277320766f74653b206f72882020202d20746865206163636f756e74206d61646520612073706c697420766f74656101202e2e2e7468656e2074686520766f74652069732072656d6f76656420636c65616e6c7920616e64206120666f6c6c6f77696e672063616c6c20746f2060756e6c6f636b60206d617920726573756c7420696e206d6f72655c2066756e6473206265696e6720617661696c61626c652e00ac2049662c20686f77657665722c20746865207265666572656e64756d2068617320656e64656420616e643af0202d2069742066696e697368656420636f72726573706f6e64696e6720746f2074686520766f7465206f6620746865206163636f756e742c20616e64e0202d20746865206163636f756e74206d6164652061207374616e6461726420766f7465207769746820636f6e76696374696f6e2c20616e64c0202d20746865206c6f636b20706572696f64206f662074686520636f6e76696374696f6e206973206e6f74206f7665725d01202e2e2e7468656e20746865206c6f636b2077696c6c206265206167677265676174656420696e746f20746865206f766572616c6c206163636f756e742773206c6f636b2c207768696368206d617920696e766f6c76655d01202a6f7665726c6f636b696e672a20287768657265207468652074776f206c6f636b732061726520636f6d62696e656420696e746f20612073696e676c65206c6f636b207468617420697320746865206d6178696d756de8206f6620626f74682074686520616d6f756e74206c6f636b656420616e64207468652074696d65206973206974206c6f636b656420666f72292e004d0120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e6572206d7573742068617665206120766f74658c207265676973746572656420666f72207265666572656e64756d2060696e646578602e00f8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e005901205765696768743a20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652e4472656d6f76655f6f746865725f766f7465081874617267657430543a3a4163636f756e74496414696e6465783c5265666572656e64756d496e6465783c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e0051012049662074686520607461726765746020697320657175616c20746f20746865207369676e65722c207468656e20746869732066756e6374696f6e2069732065786163746c79206571756976616c656e7420746f3101206072656d6f76655f766f7465602e204966206e6f7420657175616c20746f20746865207369676e65722c207468656e2074686520766f7465206d757374206861766520657870697265642c590120656974686572206265636175736520746865207265666572656e64756d207761732063616e63656c6c65642c20626563617573652074686520766f746572206c6f737420746865207265666572656e64756d206f729c20626563617573652074686520636f6e76696374696f6e20706572696f64206973206f7665722e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e005101202d2060746172676574603a20546865206163636f756e74206f662074686520766f746520746f2062652072656d6f7665643b2074686973206163636f756e74206d757374206861766520766f74656420666f72582020207265666572656e64756d2060696e646578602ef8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e005901205765696768743a20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652e38656e6163745f70726f706f73616c083470726f706f73616c5f686173681c543a3a4861736814696e6465783c5265666572656e64756d496e64657804510120456e61637420612070726f706f73616c2066726f6d2061207265666572656e64756d2e20466f72206e6f77207765206a757374206d616b65207468652077656967687420626520746865206d6178696d756d2e24626c61636b6c697374083470726f706f73616c5f686173681c543a3a486173683c6d617962655f7265665f696e6465785c4f7074696f6e3c5265666572656e64756d496e6465783e3c4901205065726d616e656e746c7920706c61636520612070726f706f73616c20696e746f2074686520626c61636b6c6973742e20546869732070726576656e74732069742066726f6d2065766572206265696e67402070726f706f73656420616761696e2e0055012049662063616c6c6564206f6e206120717565756564207075626c6963206f722065787465726e616c2070726f706f73616c2c207468656e20746869732077696c6c20726573756c7420696e206974206265696e6755012072656d6f7665642e2049662074686520607265665f696e6465786020737570706c69656420697320616e20616374697665207265666572656e64756d2077697468207468652070726f706f73616c20686173682c6c207468656e2069742077696c6c2062652063616e63656c6c65642e00f020546865206469737061746368206f726967696e206f6620746869732063616c6c206d7573742062652060426c61636b6c6973744f726967696e602e00fc202d206070726f706f73616c5f68617368603a205468652070726f706f73616c206861736820746f20626c61636b6c697374207065726d616e656e746c792e4901202d20607265665f696e646578603a20416e206f6e676f696e67207265666572656e64756d2077686f73652068617368206973206070726f706f73616c5f68617368602c2077686963682077696c6c2062652c2063616e63656c6c65642e004501205765696768743a20604f28702960202874686f756768206173207468697320697320616e20686967682d70726976696c6567652064697370617463682c20776520617373756d6520697420686173206154202020726561736f6e61626c652076616c7565292e3c63616e63656c5f70726f706f73616c042870726f705f696e64657848436f6d706163743c50726f70496e6465783e1c4c2052656d6f766520612070726f706f73616c2e00050120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206043616e63656c50726f706f73616c4f726967696e602e00d4202d206070726f705f696e646578603a2054686520696e646578206f66207468652070726f706f73616c20746f2063616e63656c2e00e8205765696768743a20604f28702960207768657265206070203d205075626c696350726f70733a3a3c543e3a3a6465636f64655f6c656e28296001482050726f706f736564082450726f70496e6465781c42616c616e63650431012041206d6f74696f6e20686173206265656e2070726f706f7365642062792061207075626c6963206163636f756e742e205c5b70726f706f73616c5f696e6465782c206465706f7369745c5d185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e047d012041207075626c69632070726f706f73616c20686173206265656e207461626c656420666f72207265666572656e64756d20766f74652e205c5b70726f706f73616c5f696e6465782c206465706f7369742c206465706f7369746f72735c5d3845787465726e616c5461626c656400049820416e2065787465726e616c2070726f706f73616c20686173206265656e207461626c65642e1c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c6404c42041207265666572656e64756d2068617320626567756e2e205c5b7265665f696e6465782c207468726573686f6c645c5d18506173736564043c5265666572656e64756d496e64657804e820412070726f706f73616c20686173206265656e20617070726f766564206279207265666572656e64756d2e205c5b7265665f696e6465785c5d244e6f74506173736564043c5265666572656e64756d496e64657804e820412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e205c5b7265665f696e6465785c5d2443616e63656c6c6564043c5265666572656e64756d496e64657804bc2041207265666572656e64756d20686173206265656e2063616e63656c6c65642e205c5b7265665f696e6465785c5d204578656375746564083c5265666572656e64756d496e64657810626f6f6c04c820412070726f706f73616c20686173206265656e20656e61637465642e205c5b7265665f696e6465782c2069735f6f6b5c5d2444656c65676174656408244163636f756e744964244163636f756e74496404210120416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e205c5b77686f2c207461726765745c5d2c556e64656c65676174656404244163636f756e74496404f820416e205c5b6163636f756e745c5d206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e185665746f65640c244163636f756e74496410486173682c426c6f636b4e756d62657204110120416e2065787465726e616c2070726f706f73616c20686173206265656e207665746f65642e205c5b77686f2c2070726f706f73616c5f686173682c20756e74696c5c5d34507265696d6167654e6f7465640c1048617368244163636f756e7449641c42616c616e636504610120412070726f706f73616c277320707265696d61676520776173206e6f7465642c20616e6420746865206465706f7369742074616b656e2e205c5b70726f706f73616c5f686173682c2077686f2c206465706f7369745c5d30507265696d616765557365640c1048617368244163636f756e7449641c42616c616e636508150120412070726f706f73616c20707265696d616765207761732072656d6f76656420616e6420757365642028746865206465706f736974207761732072657475726e6564292e94205c5b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369745c5d3c507265696d616765496e76616c69640810486173683c5265666572656e64756d496e646578080d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d6167652077617320696e76616c69642e74205c5b70726f706f73616c5f686173682c207265665f696e6465785c5d3c507265696d6167654d697373696e670810486173683c5265666572656e64756d496e646578080d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d61676520776173206d697373696e672e74205c5b70726f706f73616c5f686173682c207265665f696e6465785c5d38507265696d616765526561706564101048617368244163636f756e7449641c42616c616e6365244163636f756e744964082d012041207265676973746572656420707265696d616765207761732072656d6f76656420616e6420746865206465706f73697420636f6c6c656374656420627920746865207265617065722eb4205c5b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369742c207265617065725c5d20556e6c6f636b656404244163636f756e74496404bc20416e205c5b6163636f756e745c5d20686173206265656e20756e6c6f636b6564207375636365737366756c6c792e2c426c61636b6c697374656404104861736804d820412070726f706f73616c205c5b686173685c5d20686173206265656e20626c61636b6c6973746564207065726d616e656e746c792e203c456e6163746d656e74506572696f6438543a3a426c6f636b4e756d62657210002f0d0014710120546865206d696e696d756d20706572696f64206f66206c6f636b696e6720616e642074686520706572696f64206265747765656e20612070726f706f73616c206265696e6720617070726f76656420616e6420656e61637465642e0031012049742073686f756c642067656e6572616c6c792062652061206c6974746c65206d6f7265207468616e2074686520756e7374616b6520706572696f6420746f20656e737572652074686174690120766f74696e67207374616b657273206861766520616e206f70706f7274756e69747920746f2072656d6f7665207468656d73656c7665732066726f6d207468652073797374656d20696e2074686520636173652077686572659c207468657920617265206f6e20746865206c6f73696e672073696465206f66206120766f74652e304c61756e6368506572696f6438543a3a426c6f636b4e756d62657210004e0c0004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e30566f74696e67506572696f6438543a3a426c6f636b4e756d62657210004e0c0004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e384d696e696d756d4465706f7369743042616c616e63654f663c543e400000c16ff2862300000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e5446617374547261636b566f74696e67506572696f6438543a3a426c6f636b4e756d626572108051010004ec204d696e696d756d20766f74696e6720706572696f6420616c6c6f77656420666f7220616e20656d657267656e6379207265666572656e64756d2e34436f6f6c6f6666506572696f6438543a3a426c6f636b4e756d62657210004e0c0004610120506572696f6420696e20626c6f636b7320776865726520616e2065787465726e616c2070726f706f73616c206d6179206e6f742062652072652d7375626d6974746564206166746572206265696e67207665746f65642e4c507265696d616765427974654465706f7369743042616c616e63654f663c543e400010a5d4e800000000000000000000000429012054686520616d6f756e74206f662062616c616e63652074686174206d757374206265206465706f7369746564207065722062797465206f6620707265696d6167652073746f7265642e204d6178566f7465730c753332106400000004b020546865206d6178696d756d206e756d626572206f6620766f74657320666f7220616e206163636f756e742e8c2056616c75654c6f7704382056616c756520746f6f206c6f773c50726f706f73616c4d697373696e6704602050726f706f73616c20646f6573206e6f7420657869737420426164496e646578043820556e6b6e6f776e20696e6465783c416c726561647943616e63656c656404982043616e6e6f742063616e63656c207468652073616d652070726f706f73616c207477696365444475706c696361746550726f706f73616c04582050726f706f73616c20616c7265616479206d6164654c50726f706f73616c426c61636b6c6973746564046c2050726f706f73616c207374696c6c20626c61636b6c6973746564444e6f7453696d706c654d616a6f7269747904ac204e6578742065787465726e616c2070726f706f73616c206e6f742073696d706c65206d616a6f726974792c496e76616c696448617368043420496e76616c69642068617368284e6f50726f706f73616c0454204e6f2065787465726e616c2070726f706f73616c34416c72656164795665746f6564049c204964656e74697479206d6179206e6f74207665746f20612070726f706f73616c207477696365304e6f7444656c6567617465640438204e6f742064656c656761746564444475706c6963617465507265696d616765045c20507265696d61676520616c7265616479206e6f7465642c4e6f74496d6d696e656e740434204e6f7420696d6d696e656e7420546f6f4561726c79042820546f6f206561726c7920496d6d696e656e74042420496d6d696e656e743c507265696d6167654d697373696e67044c20507265696d616765206e6f7420666f756e64445265666572656e64756d496e76616c6964048820566f746520676976656e20666f7220696e76616c6964207265666572656e64756d3c507265696d616765496e76616c6964044420496e76616c696420707265696d6167652c4e6f6e6557616974696e670454204e6f2070726f706f73616c732077616974696e67244e6f744c6f636b656404a42054686520746172676574206163636f756e7420646f6573206e6f7420686176652061206c6f636b2e284e6f744578706972656404f020546865206c6f636b206f6e20746865206163636f756e7420746f20626520756e6c6f636b656420686173206e6f742079657420657870697265642e204e6f74566f74657204c82054686520676976656e206163636f756e7420646964206e6f7420766f7465206f6e20746865207265666572656e64756d2e304e6f5065726d697373696f6e04cc20546865206163746f7220686173206e6f207065726d697373696f6e20746f20636f6e647563742074686520616374696f6e2e44416c726561647944656c65676174696e67048c20546865206163636f756e7420697320616c72656164792064656c65676174696e672e204f766572666c6f7704a420416e20756e657870656374656420696e7465676572206f766572666c6f77206f636375727265642e24556e646572666c6f7704a820416e20756e657870656374656420696e746567657220756e646572666c6f77206f636375727265642e44496e73756666696369656e7446756e647304010120546f6f206869676820612062616c616e6365207761732070726f7669646564207468617420746865206163636f756e742063616e6e6f74206166666f72642e344e6f7444656c65676174696e6704a420546865206163636f756e74206973206e6f742063757272656e746c792064656c65676174696e672e28566f746573457869737408590120546865206163636f756e742063757272656e746c792068617320766f74657320617474616368656420746f20697420616e6420746865206f7065726174696f6e2063616e6e6f74207375636365656420756e74696cec207468657365206172652072656d6f7665642c20656974686572207468726f7567682060756e766f746560206f722060726561705f766f7465602e44496e7374616e744e6f74416c6c6f77656404dc2054686520696e7374616e74207265666572656e64756d206f726967696e2069732063757272656e746c7920646973616c6c6f7765642e204e6f6e73656e736504982044656c65676174696f6e20746f206f6e6573656c66206d616b6573206e6f2073656e73652e3c57726f6e675570706572426f756e64045420496e76616c696420757070657220626f756e642e3c4d6178566f746573526561636865640484204d6178696d756d206e756d626572206f6620766f74657320726561636865642e38496e76616c69645769746e6573730490205468652070726f7669646564207769746e65737320646174612069732077726f6e672e40546f6f4d616e7950726f706f73616c730494204d6178696d756d206e756d626572206f662070726f706f73616c7320726561636865642e0a1c436f756e63696c014c496e7374616e636531436f6c6c656374697665182450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368683c5420617320436f6e6669673c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e744964040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c38f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e004d01205472616e73616374696f6e20666565732077696c6c2062652077616976656420696620746865206d656d62657220697320766f74696e67206f6e20616e7920706172746963756c61722070726f706f73616c690120666f72207468652066697273742074696d6520616e64207468652063616c6c206973207375636365737366756c2e2053756273657175656e7420766f7465206368616e6765732077696c6c206368617267652061206665652e2c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e78510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e0065012049662074686520636c6f7365206f7065726174696f6e20636f6d706c65746573207375636365737366756c6c79207769746820646973617070726f76616c2c20746865207472616e73616374696f6e206665652077696c6c6101206265207761697665642e204f746865727769736520657865637574696f6e206f662074686520617070726f766564206f7065726174696f6e2077696c6c206265206368617267656420746f207468652063616c6c65722e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed8205c5b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645c5d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292eac205c5b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5c5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e6c205c5b70726f706f73616c5f686173682c207965732c206e6f5c5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e0b48546563686e6963616c436f6d6d6974746565014c496e7374616e636532436f6c6c656374697665182450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368683c5420617320436f6e6669673c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e744964040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c38f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e004d01205472616e73616374696f6e20666565732077696c6c2062652077616976656420696620746865206d656d62657220697320766f74696e67206f6e20616e7920706172746963756c61722070726f706f73616c690120666f72207468652066697273742074696d6520616e64207468652063616c6c206973207375636365737366756c2e2053756273657175656e7420766f7465206368616e6765732077696c6c206368617267652061206665652e2c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e78510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e0065012049662074686520636c6f7365206f7065726174696f6e20636f6d706c65746573207375636365737366756c6c79207769746820646973617070726f76616c2c20746865207472616e73616374696f6e206665652077696c6c6101206265207761697665642e204f746865727769736520657865637574696f6e206f662074686520617070726f766564206f7065726174696f6e2077696c6c206265206368617267656420746f207468652063616c6c65722e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed8205c5b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645c5d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292eac205c5b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5c5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e6c205c5b70726f706f73616c5f686173682c207965732c206e6f5c5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e0c24456c656374696f6e73014050687261676d656e456c656374696f6e141c4d656d626572730100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e040004f0205468652063757272656e7420656c6563746564206d656d626572736869702e20536f72746564206261736564206f6e206163636f756e742069642e2452756e6e65727355700100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e0400042d01205468652063757272656e742072756e6e6572735f75702e20536f72746564206261736564206f6e206c6f7720746f2068696768206d657269742028776f72736520746f2062657374292e38456c656374696f6e526f756e647301000c75333210000000000441012054686520746f74616c206e756d626572206f6620766f746520726f756e6473207468617420686176652068617070656e65642c206578636c7564696e6720746865207570636f6d696e67206f6e652e18566f74696e6701010530543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e29004400000000000000000000000000000000000cb820566f74657320616e64206c6f636b6564207374616b65206f66206120706172746963756c617220766f7465722e00c02054574f582d4e4f54453a205341464520617320604163636f756e7449646020697320612063727970746f20686173682843616e646964617465730100445665633c543a3a4163636f756e7449643e0400085901205468652070726573656e742063616e646964617465206c6973742e20536f72746564206261736564206f6e206163636f756e742d69642e20412063757272656e74206d656d626572206f722072756e6e65722d757041012063616e206e6576657220656e746572207468697320766563746f7220616e6420697320616c7761797320696d706c696369746c7920617373756d656420746f20626520612063616e6469646174652e011810766f74650814766f746573445665633c543a3a4163636f756e7449643e1476616c756554436f6d706163743c42616c616e63654f663c543e3e685d0120566f746520666f72206120736574206f662063616e6469646174657320666f7220746865207570636f6d696e6720726f756e64206f6620656c656374696f6e2e20546869732063616e2062652063616c6c656420746fe4207365742074686520696e697469616c20766f7465732c206f722075706461746520616c7265616479206578697374696e6720766f7465732e0055012055706f6e20696e697469616c20766f74696e672c206076616c75656020756e697473206f66206077686f6027732062616c616e6365206973206c6f636b656420616e64206120626f6e6420616d6f756e74206973282072657365727665642e0050205468652060766f746573602073686f756c643a482020202d206e6f7420626520656d7074792e59012020202d206265206c657373207468616e20746865206e756d626572206f6620706f737369626c652063616e646964617465732e204e6f7465207468617420616c6c2063757272656e74206d656d6265727320616e641501202020202072756e6e6572732d75702061726520616c736f206175746f6d61746963616c6c792063616e6469646174657320666f7220746865206e65787420726f756e642e005d012049742069732074686520726573706f6e736962696c697479206f66207468652063616c6c657220746f206e6f7420706c61636520616c6c206f662074686569722062616c616e636520696e746f20746865206c6f636ba020616e64206b65657020736f6d6520666f722066757274686572207472616e73616374696f6e732e002c2023203c7765696768743e5c2042617365207765696768743a2034372e393320c2b573342053746174652072656164733ad820092d2043616e646964617465732e6c656e2829202b204d656d626572732e6c656e2829202b2052756e6e65727355702e6c656e28295420092d20566f74696e67202869735f766f746572292020092d204c6f636bd420092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665202b20746f74616c5f62616c616e6365295d38205374617465207772697465733a2820092d20566f74696e672020092d204c6f636b1d0120092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665202d2d206f6e6c79207768656e206372656174696e672061206e657720766f746572295d302023203c2f7765696768743e3072656d6f76655f766f746572003421012052656d6f766520606f726967696e60206173206120766f7465722e20546869732072656d6f76657320746865206c6f636b20616e642072657475726e732074686520626f6e642e002c2023203c7765696768743e582042617365207765696768743a2033362e3820c2b573a820416c6c207374617465206163636573732069732066726f6d20646f5f72656d6f76655f766f7465722e342053746174652072656164733a2820092d20566f74696e675820092d205b4163636f756e74446174612877686f295d38205374617465207772697465733a2820092d20566f74696e672420092d204c6f636b735820092d205b4163636f756e74446174612877686f295d302023203c2f7765696768743e507265706f72745f646566756e63745f766f746572041c646566756e6374c4446566756e6374566f7465723c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e6c5d01205265706f727420607461726765746020666f72206265696e6720616e20646566756e637420766f7465722e20496e2063617365206f6620612076616c6964207265706f72742c20746865207265706f727465722069735d012072657761726465642062792074686520626f6e6420616d6f756e74206f662060746172676574602e204f74686572776973652c20746865207265706f7274657220697473656c662069732072656d6f76656420616e645c20746865697220626f6e6420697320736c61736865642e0088204120646566756e637420766f74657220697320646566696e656420746f2062653a4d012020202d206120766f7465722077686f73652063757272656e74207375626d697474656420766f7465732061726520616c6c20696e76616c69642e20692e652e20616c6c206f66207468656d20617265206e6ff020202020206c6f6e67657220612063616e646964617465206e6f7220616e20616374697665206d656d626572206f7220612072756e6e65722d75702e0000690120546865206f726967696e206d7573742070726f7669646520746865206e756d626572206f662063757272656e742063616e6469646174657320616e6420766f746573206f6620746865207265706f7274656420746172676574c020666f722074686520707572706f7365206f66206163637572617465207765696768742063616c63756c6174696f6e2e002c2023203c7765696768743eb4204e6f204261736520776569676874206261736564206f6e206d696e2073717561726520616e616c797369732ea420436f6d706c6578697479206f662063616e6469646174655f636f756e743a20312e37353520c2b5739020436f6d706c6578697479206f6620766f74655f636f756e743a2031382e353120c2b573342053746174652072656164733a542020092d20566f74696e67287265706f7274657229502020092d2043616e6469646174652e6c656e28294c2020092d20566f74696e672854617267657429d82020092d2043616e646964617465732c204d656d626572732c2052756e6e6572735570202869735f646566756e63745f766f7465722938205374617465207772697465733a7020092d204c6f636b287265706f72746572207c7c2074617267657429dc20092d205b4163636f756e7442616c616e6365287265706f72746572295d202b204163636f756e7442616c616e636528746172676574297820092d20566f74696e67287265706f72746572207c7c20746172676574295901204e6f74653a207468652064622061636365737320697320776f7273652077697468207265737065637420746f2064622c207768696368206973207768656e20746865207265706f727420697320636f72726563742e302023203c2f7765696768743e407375626d69745f63616e646964616379043c63616e6469646174655f636f756e7430436f6d706163743c7533323e5078205375626d6974206f6e6573656c6620666f722063616e6469646163792e006420412063616e6469646174652077696c6c206569746865723aec2020202d204c6f73652061742074686520656e64206f6620746865207465726d20616e6420666f7266656974207468656972206465706f7369742e2d012020202d2057696e20616e64206265636f6d652061206d656d6265722e204d656d626572732077696c6c206576656e7475616c6c7920676574207468656972207374617368206261636b2e55012020202d204265636f6d6520612072756e6e65722d75702e2052756e6e6572732d75707320617265207265736572766564206d656d6265727320696e2063617365206f6e65206765747320666f72636566756c6c7934202020202072656d6f7665642e002c2023203c7765696768743e60204261736520776569676874203d2033332e333320c2b573a420436f6d706c6578697479206f662063616e6469646174655f636f756e743a20302e33373520c2b573342053746174652072656164733a3820092d2043616e646964617465732c20092d204d656d626572733420092d2052756e6e65727355706420092d205b4163636f756e7442616c616e63652877686f295d38205374617465207772697465733a6420092d205b4163636f756e7442616c616e63652877686f295d3820092d2043616e64696461746573302023203c2f7765696768743e4872656e6f756e63655f63616e646964616379042872656e6f756e63696e672852656e6f756e63696e679051012052656e6f756e6365206f6e65277320696e74656e74696f6e20746f20626520612063616e64696461746520666f7220746865206e65787420656c656374696f6e20726f756e642e203320706f74656e7469616c40206f7574636f6d65732065786973743a4101202d20606f726967696e6020697320612063616e64696461746520616e64206e6f7420656c656374656420696e20616e79207365742e20496e207468697320636173652c2074686520626f6e64206973f4202020756e72657365727665642c2072657475726e656420616e64206f726967696e2069732072656d6f76656420617320612063616e6469646174652e5901202d20606f726967696e6020697320612063757272656e742072756e6e65722d75702e20496e207468697320636173652c2074686520626f6e6420697320756e72657365727665642c2072657475726e656420616e64902020206f726967696e2069732072656d6f76656420617320612072756e6e65722d75702e4d01202d20606f726967696e6020697320612063757272656e74206d656d6265722e20496e207468697320636173652c2074686520626f6e6420697320756e726573657276656420616e64206f726967696e206973590120202072656d6f7665642061732061206d656d6265722c20636f6e73657175656e746c79206e6f74206265696e6720612063616e64696461746520666f7220746865206e65787420726f756e6420616e796d6f72652e650120202053696d696c617220746f205b6072656d6f76655f766f746572605d2c206966207265706c6163656d656e742072756e6e657273206578697374732c20746865792061726520696d6d6564696174656c7920757365642e24203c7765696768743e7820496620612063616e6469646174652069732072656e6f756e63696e673a60200942617365207765696768743a2031372e323820c2b573a82009436f6d706c6578697479206f662063616e6469646174655f636f756e743a20302e32333520c2b57338200953746174652072656164733a3c2009092d2043616e64696461746573982009092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665295d3c20095374617465207772697465733a3c2009092d2043616e64696461746573982009092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665295d64204966206d656d6265722069732072656e6f756e63696e673a60200942617365207765696768743a2034362e323520c2b57338200953746174652072656164733ad02009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d3c20095374617465207772697465733ad02009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d642049662072756e6e65722069732072656e6f756e63696e673a60200942617365207765696768743a2034362e323520c2b57338200953746174652072656164733aac2009092d2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d3c20095374617465207772697465733aac2009092d2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d28203c2f7765696768743e3472656d6f76655f6d656d626572080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653c6861735f7265706c6163656d656e7410626f6f6c485d012052656d6f7665206120706172746963756c6172206d656d6265722066726f6d20746865207365742e20546869732069732065666665637469766520696d6d6564696174656c7920616e642074686520626f6e64206f668020746865206f7574676f696e67206d656d62657220697320736c61736865642e00590120496620612072756e6e65722d757020697320617661696c61626c652c207468656e2074686520626573742072756e6e65722d75702077696c6c2062652072656d6f76656420616e64207265706c61636573207468650101206f7574676f696e67206d656d6265722e204f74686572776973652c2061206e65772070687261676d656e20656c656374696f6e20697320737461727465642e004501204e6f74652074686174207468697320646f6573206e6f7420616666656374207468652064657369676e6174656420626c6f636b206e756d626572206f6620746865206e65787420656c656374696f6e2e002c2023203c7765696768743e6820496620776520686176652061207265706c6163656d656e743a6820092d2042617365207765696768743a2035302e393320c2b5734020092d2053746174652072656164733a502009092d2052756e6e65727355702e6c656e2829cc2009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572294420092d205374617465207772697465733acc2009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d62657229650120456c73652c2073696e63652074686973206973206120726f6f742063616c6c20616e642077696c6c20676f20696e746f2070687261676d656e2c20776520617373756d652066756c6c20626c6f636b20666f72206e6f772e302023203c2f7765696768743e01201c4e65775465726d04645665633c284163636f756e7449642c2042616c616e6365293e1069012041206e6577207465726d2077697468205c5b6e65775f6d656d626572735c5d2e205468697320696e64696361746573207468617420656e6f7567682063616e64696461746573206578697374656420746f2072756e20746865590120656c656374696f6e2c206e6f74207468617420656e6f756768206861766520686173206265656e20656c65637465642e2054686520696e6e65722076616c7565206d757374206265206578616d696e656420666f726901207468697320707572706f73652e204120604e65775465726d285c5b5c5d296020696e64696361746573207468617420736f6d652063616e6469646174657320676f7420746865697220626f6e6420736c617368656420616e645901206e6f6e65207765726520656c65637465642c207768696c73742060456d7074795465726d60206d65616e732074686174206e6f2063616e64696461746573206578697374656420746f20626567696e20776974682e24456d7074795465726d00083501204e6f20286f72206e6f7420656e6f756768292063616e64696461746573206578697374656420666f72207468697320726f756e642e205468697320697320646966666572656e742066726f6dcc20604e65775465726d285c5b5c5d29602e2053656520746865206465736372697074696f6e206f6620604e65775465726d602e34456c656374696f6e4572726f720004e820496e7465726e616c206572726f722068617070656e6564207768696c6520747279696e6720746f20706572666f726d20656c656374696f6e2e304d656d6265724b69636b656404244163636f756e7449640855012041205c5b6d656d6265725c5d20686173206265656e2072656d6f7665642e20546869732073686f756c6420616c7761797320626520666f6c6c6f7765642062792065697468657220604e65775465726d60206f72342060456d7074795465726d602e4043616e646964617465536c617368656408244163636f756e7449641c42616c616e6365043d0120412063616e6469646174652077617320736c61736865642064756520746f206661696c696e6720746f206f627461696e20612073656174206173206d656d626572206f722072756e6e65722d75704453656174486f6c646572536c617368656408244163636f756e7449641c42616c616e63650471012041207365617420686f6c64657220286d656d626572206f722072756e6e65722d7570292077617320736c61736865642064756520746f206661696c696e6720746f2072657461696e696e6720746865697220706f736974696f6e2e3c4d656d62657252656e6f756e63656404244163636f756e74496404b02041205c5b6d656d6265725c5d206861732072656e6f756e6365642074686569722063616e6469646163792e34566f7465725265706f727465640c244163636f756e744964244163636f756e74496410626f6f6c080901204120766f74657220776173207265706f7274656420776974682074686520746865207265706f7274206265696e67207375636365737366756c206f72206e6f742e74205c5b766f7465722c207265706f727465722c20737563636573735c5d183443616e646964616379426f6e643042616c616e63654f663c543e400080c6a47e8d030000000000000000000028566f74696e67426f6e643042616c616e63654f663c543e4000407a10f35a000000000000000000000038446573697265644d656d626572730c753332100d00000000404465736972656452756e6e65727355700c753332100700000000305465726d4475726174696f6e38543a3a426c6f636b4e756d626572108013030000204d6f64756c654964384c6f636b4964656e74696669657220706872656c656374004430556e61626c65546f566f746504c42043616e6e6f7420766f7465207768656e206e6f2063616e64696461746573206f72206d656d626572732065786973742e1c4e6f566f7465730498204d75737420766f746520666f72206174206c65617374206f6e652063616e6469646174652e30546f6f4d616e79566f74657304882043616e6e6f7420766f7465206d6f7265207468616e2063616e646964617465732e504d6178696d756d566f7465734578636565646564049c2043616e6e6f7420766f7465206d6f7265207468616e206d6178696d756d20616c6c6f7765642e284c6f7742616c616e636504c82043616e6e6f7420766f74652077697468207374616b65206c657373207468616e206d696e696d756d2062616c616e63652e3c556e61626c65546f506179426f6e64047c20566f7465722063616e206e6f742070617920766f74696e6720626f6e642e2c4d7573744265566f7465720444204d757374206265206120766f7465722e285265706f727453656c6604502043616e6e6f74207265706f72742073656c662e4c4475706c69636174656443616e6469646174650484204475706c6963617465642063616e646964617465207375626d697373696f6e2e304d656d6265725375626d6974048c204d656d6265722063616e6e6f742072652d7375626d69742063616e6469646163792e3052756e6e65725375626d6974048c2052756e6e65722063616e6e6f742072652d7375626d69742063616e6469646163792e68496e73756666696369656e7443616e64696461746546756e647304982043616e64696461746520646f6573206e6f74206861766520656e6f7567682066756e64732e244e6f744d656d6265720438204e6f742061206d656d6265722e54496e76616c696443616e646964617465436f756e7404e4205468652070726f766964656420636f756e74206f66206e756d626572206f662063616e6469646174657320697320696e636f72726563742e40496e76616c6964566f7465436f756e7404d0205468652070726f766964656420636f756e74206f66206e756d626572206f6620766f74657320697320696e636f72726563742e44496e76616c696452656e6f756e63696e67040101205468652072656e6f756e63696e67206f726967696e2070726573656e74656420612077726f6e67206052656e6f756e63696e676020706172616d657465722e48496e76616c69645265706c6163656d656e740401012050726564696374696f6e20726567617264696e67207265706c6163656d656e74206166746572206d656d6265722072656d6f76616c2069732077726f6e672e0d4c546563686e6963616c4d656d62657273686970014c496e7374616e6365314d656d62657273686970081c4d656d626572730100445665633c543a3a4163636f756e7449643e040004c8205468652063757272656e74206d656d626572736869702c2073746f72656420617320616e206f726465726564205665632e145072696d65000030543a3a4163636f756e744964040004a4205468652063757272656e74207072696d65206d656d6265722c206966206f6e65206578697374732e011c286164645f6d656d626572040c77686f30543a3a4163636f756e7449640c7c204164642061206d656d626572206077686f6020746f20746865207365742e00a0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a4164644f726967696e602e3472656d6f76655f6d656d626572040c77686f30543a3a4163636f756e7449640c902052656d6f76652061206d656d626572206077686f602066726f6d20746865207365742e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656d6f76654f726967696e602e2c737761705f6d656d626572081872656d6f766530543a3a4163636f756e7449640c61646430543a3a4163636f756e74496414c02053776170206f7574206f6e65206d656d626572206072656d6f76656020666f7220616e6f746865722060616464602e00a4204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a537761704f726967696e602e001101205072696d65206d656d62657273686970206973202a6e6f742a207061737365642066726f6d206072656d6f76656020746f2060616464602c20696620657874616e742e3472657365745f6d656d62657273041c6d656d62657273445665633c543a3a4163636f756e7449643e105901204368616e676520746865206d656d6265727368697020746f2061206e6577207365742c20646973726567617264696e6720746865206578697374696e67206d656d626572736869702e204265206e69636520616e646c207061737320606d656d6265727360207072652d736f727465642e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52657365744f726967696e602e286368616e67655f6b6579040c6e657730543a3a4163636f756e74496414d82053776170206f7574207468652073656e64696e67206d656d62657220666f7220736f6d65206f74686572206b657920606e6577602e00f4204d6179206f6e6c792062652063616c6c65642066726f6d20605369676e656460206f726967696e206f6620612063757272656e74206d656d6265722e002101205072696d65206d656d62657273686970206973207061737365642066726f6d20746865206f726967696e206163636f756e7420746f20606e6577602c20696620657874616e742e247365745f7072696d65040c77686f30543a3a4163636f756e7449640cc02053657420746865207072696d65206d656d6265722e204d75737420626520612063757272656e74206d656d6265722e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e2c636c6561725f7072696d65000c982052656d6f766520746865207072696d65206d656d626572206966206974206578697374732e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e01182c4d656d62657241646465640004e42054686520676976656e206d656d626572207761732061646465643b2073656520746865207472616e73616374696f6e20666f722077686f2e344d656d62657252656d6f7665640004ec2054686520676976656e206d656d626572207761732072656d6f7665643b2073656520746865207472616e73616374696f6e20666f722077686f2e384d656d62657273537761707065640004dc2054776f206d656d62657273207765726520737761707065643b2073656520746865207472616e73616374696f6e20666f722077686f2e304d656d6265727352657365740004190120546865206d656d62657273686970207761732072657365743b2073656520746865207472616e73616374696f6e20666f722077686f20746865206e6577207365742069732e284b65794368616e676564000488204f6e65206f6620746865206d656d6265727327206b657973206368616e6765642e1444756d6d7904bc73705f7374643a3a6d61726b65723a3a5068616e746f6d446174613c284163636f756e7449642c204576656e74293e0470205068616e746f6d206d656d6265722c206e6576657220757365642e00000e1c4772616e647061013c4772616e64706146696e616c6974791814537461746501006c53746f72656453746174653c543a3a426c6f636b4e756d6265723e04000490205374617465206f66207468652063757272656e7420617574686f72697479207365742e3450656e64696e674368616e676500008c53746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265723e040004c42050656e64696e67206368616e67653a20287369676e616c65642061742c207363686564756c6564206368616e6765292e284e657874466f72636564000038543a3a426c6f636b4e756d626572040004bc206e65787420626c6f636b206e756d6265722077686572652077652063616e20666f7263652061206368616e67652e1c5374616c6c656400008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d626572290400049020607472756560206966207765206172652063757272656e746c79207374616c6c65642e3043757272656e7453657449640100145365744964200000000000000000085d0120546865206e756d626572206f66206368616e6765732028626f746820696e207465726d73206f66206b65797320616e6420756e6465726c79696e672065636f6e6f6d696320726573706f6e736962696c697469657329c420696e20746865202273657422206f66204772616e6470612076616c696461746f72732066726f6d2067656e657369732e30536574496453657373696f6e0001051453657449643053657373696f6e496e6465780004001059012041206d617070696e672066726f6d206772616e6470612073657420494420746f2074686520696e646578206f6620746865202a6d6f737420726563656e742a2073657373696f6e20666f722077686963682069747368206d656d62657273207765726520726573706f6e7369626c652e00b82054574f582d4e4f54453a2060536574496460206973206e6f7420756e646572207573657220636f6e74726f6c2e010c4c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66240d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e00110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e306e6f74655f7374616c6c6564081464656c617938543a3a426c6f636b4e756d6265726c626573745f66696e616c697a65645f626c6f636b5f6e756d62657238543a3a426c6f636b4e756d6265721c1d01204e6f74652074686174207468652063757272656e7420617574686f7269747920736574206f6620746865204752414e4450412066696e616c69747920676164676574206861732901207374616c6c65642e20546869732077696c6c2074726967676572206120666f7263656420617574686f7269747920736574206368616e67652061742074686520626567696e6e696e672101206f6620746865206e6578742073657373696f6e2c20746f20626520656e6163746564206064656c61796020626c6f636b7320616674657220746861742e205468652064656c617915012073686f756c64206265206869676820656e6f75676820746f20736166656c7920617373756d6520746861742074686520626c6f636b207369676e616c6c696e6720746865290120666f72636564206368616e67652077696c6c206e6f742062652072652d6f726765642028652e672e203130303020626c6f636b73292e20546865204752414e44504120766f7465727329012077696c6c20737461727420746865206e657720617574686f7269747920736574207573696e672074686520676976656e2066696e616c697a656420626c6f636b20617320626173652e5c204f6e6c792063616c6c61626c6520627920726f6f742e010c384e6577417574686f7269746965730434417574686f726974794c69737404d8204e657720617574686f726974792073657420686173206265656e206170706c6965642e205c5b617574686f726974795f7365745c5d1850617573656400049c2043757272656e7420617574686f726974792073657420686173206265656e207061757365642e1c526573756d65640004a02043757272656e7420617574686f726974792073657420686173206265656e20726573756d65642e001c2c50617573654661696c656408090120417474656d707420746f207369676e616c204752414e445041207061757365207768656e2074686520617574686f72697479207365742069736e2774206c697665a8202865697468657220706175736564206f7220616c72656164792070656e64696e67207061757365292e30526573756d654661696c656408150120417474656d707420746f207369676e616c204752414e44504120726573756d65207768656e2074686520617574686f72697479207365742069736e277420706175736564a42028656974686572206c697665206f7220616c72656164792070656e64696e6720726573756d65292e344368616e676550656e64696e6704ec20417474656d707420746f207369676e616c204752414e445041206368616e67652077697468206f6e6520616c72656164792070656e64696e672e1c546f6f536f6f6e04c02043616e6e6f74207369676e616c20666f72636564206368616e676520736f20736f6f6e206166746572206c6173742e60496e76616c69644b65794f776e65727368697050726f6f660435012041206b6579206f776e6572736869702070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e60496e76616c696445717569766f636174696f6e50726f6f6604350120416e2065717569766f636174696f6e2070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e584475706c69636174654f6666656e63655265706f7274041901204120676976656e2065717569766f636174696f6e207265706f72742069732076616c69642062757420616c72656164792070726576696f75736c79207265706f727465642e0f205472656173757279012054726561737572790c3450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c730001053450726f706f73616c496e6465789c50726f706f73616c3c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e000400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100485665633c50726f706f73616c496e6465783e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e010c3470726f706f73655f7370656e64081476616c756560436f6d706163743c42616c616e63654f663c542c20493e3e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365242d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129b4202d20446252656164733a206050726f706f73616c436f756e74602c20606f726967696e206163636f756e7460ec202d2044625772697465733a206050726f706f73616c436f756e74602c206050726f706f73616c73602c20606f726967696e206163636f756e7460302023203c2f7765696768743e3c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e24fc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656a6563744f726967696e602e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129d0202d20446252656164733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460d4202d2044625772697465733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460302023203c2f7765696768743e40617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e285d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e50202d20436f6d706c65786974793a204f2831292e90202d20446252656164733a206050726f706f73616c73602c2060417070726f76616c73605c202d20446257726974653a2060417070726f76616c7360302023203c2f7765696768743e011c2050726f706f736564043450726f706f73616c496e6465780484204e65772070726f706f73616c2e205c5b70726f706f73616c5f696e6465785c5d205370656e64696e67041c42616c616e6365043d01205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e205c5b6275646765745f72656d61696e696e675c5d1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964041d0120536f6d652066756e64732068617665206265656e20616c6c6f63617465642e205c5b70726f706f73616c5f696e6465782c2061776172642c2062656e65666963696172795c5d2052656a6563746564083450726f706f73616c496e6465781c42616c616e636504250120412070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e205c5b70726f706f73616c5f696e6465782c20736c61736865645c5d144275726e74041c42616c616e636504b020536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e205c5b6275726e5c5d20526f6c6c6f766572041c42616c616e6365083101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e54205c5b6275646765745f72656d61696e696e675c5d1c4465706f736974041c42616c616e636504b020536f6d652066756e64732068617665206265656e206465706f73697465642e205c5b6465706f7369745c5d143050726f706f73616c426f6e641c5065726d696c6c1050c30000085501204672616374696f6e206f6620612070726f706f73616c27732076616c756520746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c616365207468652070726f706f73616c2e110120416e2061636365707465642070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f6573206e6f742e4c50726f706f73616c426f6e644d696e696d756d3c42616c616e63654f663c542c20493e4000407a10f35a00000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f6438543a3a426c6f636b4e756d6265721080700000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e1c5065726d696c6c1020a107000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e204d6f64756c654964204d6f64756c6549642070792f7472737279041901205468652074726561737572792773206d6f64756c652069642c207573656420666f72206465726976696e672069747320736f7665726569676e206163636f756e742049442e0870496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e30496e76616c6964496e6465780494204e6f2070726f706f73616c206f7220626f756e7479206174207468617420696e6465782e1024436f6e7472616374730124436f6e747261637473143c43757272656e745363686564756c6501002c5363686564756c653c543e950900000000000400000000020000000100008000000010000000001000000001000020000000000008002a0600001d620200846b03008b180000671d0000610a00001d180000cc2a00005c000000a17001003e020300f307000046070000e807000001080000f4190000db280000a908000013249208f8080000d0080000060b000007090000ad080000520800009c0800006f0a0000e7090000020a0000f30900002b0a0000f8090000d10900001b0a0000390a0000270a0000560f0000dc070000260a000036200000381c0000ec1f0000d51c0000780a0000bc0a00005f0a0000e40900003e0a0000330a0000470a0000270a00006cf1380000000000a0f938000000000040ff3800000000008ca77b00000000001a6c3800000000008876380000000000b481380000000000d4f981000000000028543800000000008a4c380000000000c87d5f00000000008a9f1c0000000000c8e57400000000000b01000000000000983c530000000000a90200000000000050de382a0000000038476124000000006467b209000000002418910000000000b2dfd100000000001a6fe7070000000039090000000000004e86990000000000dad35a1000000000cd07000000000000eaaf830a00000000a01f2a0200000000ae0500000000000008f7270b000000003675e30700000000f4753c09000000000102000000000000d20200000000000008efb81d000000000802000000000000e602000000000000b90a000000000000c25731000000000026100000000000007a8e330000000000d80c00000000000040c22f0000000000d305000000000000067f2f0000000000d70500000000000004942043757272656e7420636f7374207363686564756c6520666f7220636f6e7472616374732e305072697374696e65436f64650001062c436f6465486173683c543e1c5665633c75383e0004000465012041206d617070696e672066726f6d20616e206f726967696e616c20636f6465206861736820746f20746865206f726967696e616c20636f64652c20756e746f756368656420627920696e737472756d656e746174696f6e2e2c436f646553746f726167650001062c436f6465486173683c543e587761736d3a3a5072656661625761736d4d6f64756c650004000465012041206d617070696e67206265747765656e20616e206f726967696e616c20636f6465206861736820616e6420696e737472756d656e746564207761736d20636f64652c20726561647920666f7220657865637574696f6e2e384163636f756e74436f756e74657201000c753634200000000000000000045420546865207375627472696520636f756e7465722e38436f6e7472616374496e666f4f6600010530543a3a4163636f756e7449643c436f6e7472616374496e666f3c543e0004000ca82054686520636f6465206173736f6369617465642077697468206120676976656e206163636f756e742e00d02054574f582d4e4f54453a20534146452073696e636520604163636f756e7449646020697320612073656375726520686173682e01143c7570646174655f7363686564756c6504207363686564756c652c5363686564756c653c543e0cb4205570646174657320746865207363686564756c6520666f72206d65746572696e6720636f6e7472616374732e000d0120546865207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652073746f726564207363686564756c652e207075745f636f64650410636f64651c5665633c75383e085d012053746f7265732074686520676976656e2062696e617279205761736d20636f646520696e746f2074686520636861696e27732073746f7261676520616e642072657475726e73206974732060636f646568617368602ed420596f752063616e20696e7374616e746961746520636f6e747261637473206f6e6c7920776974682073746f72656420636f64652e1063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e10646174611c5665633c75383e1c0901204d616b657320612063616c6c20746f20616e206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e002901202a20496620746865206163636f756e74206973206120736d6172742d636f6e7472616374206163636f756e742c20746865206173736f63696174656420636f64652077696c6c206265b020657865637574656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e1901202a20496620746865206163636f756e74206973206120726567756c6172206163636f756e742c20616e792076616c75652077696c6c206265207472616e736665727265642e4901202a204966206e6f206163636f756e742065786973747320616e64207468652063616c6c2076616c7565206973206e6f74206c657373207468616e20606578697374656e7469616c5f6465706f736974602c1501206120726567756c6172206163636f756e742077696c6c206265206372656174656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e2c696e7374616e74696174651424656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e24636f64655f686173682c436f6465486173683c543e10646174611c5665633c75383e1073616c741c5665633c75383e34290120496e7374616e7469617465732061206e657720636f6e74726163742066726f6d207468652060636f64655f68617368602067656e65726174656420627920607075745f636f6465602c98206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e0065012054686520737570706c696564206073616c7460206973207573656420666f7220636f6e74726163742061646472657373206465726976696174696f6e2e205365652060666e20636f6e74726163745f61646472657373602e009820496e7374616e74696174696f6e20697320657865637574656420617320666f6c6c6f77733a004d01202d205468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e6465722c20636f64655f6861736820616e64207468652073616c742e0501202d2054686520736d6172742d636f6e7472616374206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732e6d01202d20546865206063746f725f636f64656020697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792d63726561746564206163636f756e742e204275666665722072657475726e65645d0120202061667465722074686520657865637574696f6e206973207361766564206173207468652060636f646560206f6620746865206163636f756e742e205468617420636f64652077696c6c20626520696e766f6b6564a820202075706f6e20616e792063616c6c2072656365697665642062792074686973206163636f756e742e7c202d2054686520636f6e747261637420697320696e697469616c697a65642e3c636c61696d5f73757263686172676508106465737430543a3a4163636f756e744964286175785f73656e646572504f7074696f6e3c543a3a4163636f756e7449643e14710120416c6c6f777320626c6f636b2070726f64756365727320746f20636c61696d206120736d616c6c2072657761726420666f72206576696374696e67206120636f6e74726163742e204966206120626c6f636b2070726f64756365721501206661696c7320746f20646f20736f2c206120726567756c61722075736572732077696c6c20626520616c6c6f77656420746f20636c61696d20746865207265776172642e00390120496620636f6e7472616374206973206e6f742065766963746564206173206120726573756c74206f6620746869732063616c6c2c206e6f20616374696f6e73206172652074616b656e20616e64ac207468652073656e646572206973206e6f7420656c696769626c6520666f7220746865207265776172642e011830496e7374616e74696174656408244163636f756e744964244163636f756e744964042d0120436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e205c5b6f776e65722c20636f6e74726163745c5d1c4576696374656408244163636f756e74496410626f6f6c1ce420436f6e747261637420686173206265656e206576696374656420616e64206973206e6f7720696e20746f6d6273746f6e652073746174652e60205c5b636f6e74726163742c20746f6d6273746f6e655c5d0024202320506172616d73000d01202d2060636f6e7472616374603a20604163636f756e744964603a20546865206163636f756e74204944206f6620746865206576696374656420636f6e74726163742e3501202d2060746f6d6273746f6e65603a2060626f6f6c603a205472756520696620746865206576696374656420636f6e7472616374206c65667420626568696e64206120746f6d6273746f6e652e20526573746f72656410244163636f756e744964244163636f756e74496410486173681c42616c616e636524c020526573746f726174696f6e20666f72206120636f6e747261637420686173206265656e207375636365737366756c2eac205c5b646f6e6f722c20646573742c20636f64655f686173682c2072656e745f616c6c6f77616e63655c5d0024202320506172616d7300f4202d2060646f6e6f72603a20604163636f756e744964603a204163636f756e74204944206f662074686520726573746f72696e6720636f6e7472616374ec202d206064657374603a20604163636f756e744964603a204163636f756e74204944206f662074686520726573746f72656420636f6e7472616374e8202d2060636f64655f68617368603a206048617368603a20436f64652068617368206f662074686520726573746f72656420636f6e74726163741901202d206072656e745f616c6c6f77616e63653a206042616c616e6365603a2052656e7420616c6c6f77616e6365206f662074686520726573746f72656420636f6e747261637428436f646553746f72656404104861736808b820436f646520776974682074686520737065636966696564206861736820686173206265656e2073746f7265642e38205c5b636f64655f686173685c5d3c5363686564756c6555706461746564040c75333204d020547269676765726564207768656e207468652063757272656e74205c5b7363686564756c655c5d20697320757064617465642e44436f6e7472616374457865637574696f6e08244163636f756e7449641c5665633c75383e08090120416e206576656e74206465706f73697465642075706f6e20657865637574696f6e206f66206120636f6e74726163742066726f6d20746865206163636f756e742e48205c5b6163636f756e742c20646174615c5d204c5369676e6564436c61696d48616e646963617038543a3a426c6f636b4e756d626572100200000010e0204e756d626572206f6620626c6f636b2064656c617920616e2065787472696e73696320636c61696d20737572636861726765206861732e000d01205768656e20636c61696d207375726368617267652069732063616c6c656420627920616e2065787472696e736963207468652072656e7420697320636865636b65646820666f722063757272656e745f626c6f636b202d2064656c617940546f6d6273746f6e654465706f7369743042616c616e63654f663c543e4000a0acb903000000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f2067656e6572617465206120746f6d6273746f6e652e4453746f7261676553697a654f66667365740c753332100800000018710120412073697a65206f666673657420666f7220616e20636f6e74726163742e2041206a7573742063726561746564206163636f756e74207769746820756e746f75636865642073746f726167652077696c6c20686176652074686174e0206d756368206f662073746f726167652066726f6d20746865207065727370656374697665206f66207468652073746174652072656e742e006101205468697320697320612073696d706c652077617920746f20656e73757265207468617420636f6e747261637473207769746820656d7074792073746f72616765206576656e7475616c6c79206765742064656c657465646501206279206d616b696e67207468656d207061792072656e742e2054686973206372656174657320616e20696e63656e7469766520746f2072656d6f7665207468656d206561726c7920696e206f7264657220746f2073617665182072656e742e2c52656e74427974654665653042616c616e63654f663c543e4000286bee000000000000000000000000043501205072696365206f6620612062797465206f662073746f7261676520706572206f6e6520626c6f636b20696e74657276616c2e2053686f756c642062652067726561746572207468616e20302e4452656e744465706f7369744f66667365743042616c616e63654f663c543e400010a5d4e800000000000000000000001c05012054686520616d6f756e74206f662066756e6473206120636f6e74726163742073686f756c64206465706f73697420696e206f7264657220746f206f6666736574582074686520636f7374206f66206f6e6520627974652e006901204c6574277320737570706f736520746865206465706f73697420697320312c303030204255202862616c616e636520756e697473292f6279746520616e64207468652072656e7420697320312042552f627974652f6461792c5901207468656e206120636f6e7472616374207769746820312c3030302c3030302042552074686174207573657320312c303030206279746573206f662073746f7261676520776f756c6420706179206e6f2072656e742e4d0120427574206966207468652062616c616e6365207265647563656420746f203530302c30303020425520616e64207468652073746f7261676520737461796564207468652073616d6520617420312c3030302c78207468656e20697420776f756c6420706179203530302042552f6461792e3c5375726368617267655265776172643042616c616e63654f663c543e40005cb2ec22000000000000000000000008e4205265776172642074686174206973207265636569766564206279207468652070617274792077686f736520746f75636820686173206c65646820746f2072656d6f76616c206f66206120636f6e74726163742e204d617844657074680c753332102000000008310120546865206d6178696d756d206e657374696e67206c6576656c206f6620612063616c6c2f696e7374616e746961746520737461636b2e204120726561736f6e61626c652064656661756c74382076616c7565206973203130302e304d617856616c756553697a650c753332100040000004390120546865206d6178696d756d2073697a65206f6620612073746f726167652076616c756520696e2062797465732e204120726561736f6e61626c652064656661756c74206973203136204b69422e5058496e76616c69645363686564756c6556657273696f6e0405012041206e6577207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652063757272656e74206f6e652e54496e76616c6964537572636861726765436c61696d04550120416e206f726967696e206d757374206265207369676e6564206f7220696e686572656e7420616e6420617578696c696172792073656e646572206f6e6c792070726f7669646564206f6e20696e686572656e742e54496e76616c6964536f75726365436f6e747261637404dc2043616e6e6f7420726573746f72652066726f6d206e6f6e6578697374696e67206f7220746f6d6273746f6e6520636f6e74726163742e68496e76616c696444657374696e6174696f6e436f6e747261637404c42043616e6e6f7420726573746f726520746f206e6f6e6578697374696e67206f7220616c69766520636f6e74726163742e40496e76616c6964546f6d6273746f6e65046020546f6d6273746f6e657320646f6e2774206d617463682e54496e76616c6964436f6e74726163744f726967696e04bc20416e206f726967696e20547269654964207772697474656e20696e207468652063757272656e7420626c6f636b2e204f75744f6647617304bc2054686520657865637574656420636f6e7472616374206578686175737465642069747320676173206c696d69742e504f7574707574427566666572546f6f536d616c6c04050120546865206f75747075742062756666657220737570706c69656420746f206120636f6e7472616374204150492063616c6c2077617320746f6f20736d616c6c2e6442656c6f7753756273697374656e63655468726573686f6c6410210120506572666f726d696e672074686520726571756573746564207472616e7366657220776f756c6420686176652062726f756768742074686520636f6e74726163742062656c6f773d01207468652073756273697374656e6365207468726573686f6c642e204e6f207472616e7366657220697320616c6c6f77656420746f20646f207468697320696e206f7264657220746f20616c6c6f77450120666f72206120746f6d6273746f6e6520746f20626520637265617465642e2055736520607365616c5f7465726d696e6174656020746f2072656d6f7665206120636f6e747261637420776974686f757470206c656176696e67206120746f6d6273746f6e6520626568696e642e504e6577436f6e74726163744e6f7446756e64656408390120546865206e65776c79206372656174656420636f6e74726163742069732062656c6f77207468652073756273697374656e6365207468726573686f6c6420616674657220657865637574696e6721012069747320636f6e74727563746f722e204e6f20636f6e7472616374732061726520616c6c6f77656420746f2065786973742062656c6f772074686174207468726573686f6c642e385472616e736665724661696c65640c250120506572666f726d696e672074686520726571756573746564207472616e73666572206661696c656420666f72206120726561736f6e206f726967696e6174696e6720696e2074686531012063686f73656e2063757272656e637920696d706c656d656e746174696f6e206f66207468652072756e74696d652e204d6f73742070726f6261626c79207468652062616c616e63652069738c20746f6f206c6f77206f72206c6f636b732061726520706c61636564206f6e2069742e4c4d617843616c6c44657074685265616368656408250120506572666f726d696e6720612063616c6c207761732064656e6965642062656361757365207468652063616c6c696e67206465707468207265616368656420746865206c696d697498206f6620776861742069732073706563696669656420696e20746865207363686564756c652e2c4e6f7443616c6c61626c650831012054686520636f6e74726163742074686174207761732063616c6c656420697320656974686572206e6f20636f6e747261637420617420616c6c20286120706c61696e206163636f756e74294c206f72206973206120746f6d6273746f6e652e30436f6465546f6f4c617267650455012054686520636f646520737570706c69656420746f20607075745f636f646560206578636565647320746865206c696d69742073706563696669656420696e207468652063757272656e74207363686564756c652e30436f64654e6f74466f756e6404c8204e6f20636f646520636f756c6420626520666f756e642061742074686520737570706c69656420636f646520686173682e2c4f75744f66426f756e6473042901204120627566666572206f757473696465206f662073616e64626f78206d656d6f7279207761732070617373656420746f206120636f6e7472616374204150492066756e6374696f6e2e384465636f64696e674661696c6564042d0120496e7075742070617373656420746f206120636f6e7472616374204150492066756e6374696f6e206661696c656420746f206465636f646520617320657870656374656420747970652e3c436f6e747261637454726170706564048c20436f6e7472616374207472617070656420647572696e6720657865637574696f6e2e3456616c7565546f6f4c6172676504d0205468652073697a6520646566696e656420696e2060543a3a4d617856616c756553697a6560207761732065786365656465642e405265656e7472616e636544656e6965640c41012054686520616374696f6e20706572666f726d6564206973206e6f7420616c6c6f776564207768696c652074686520636f6e747261637420706572666f726d696e6720697420697320616c72656164793d01206f6e207468652063616c6c20737461636b2e2054686f736520616374696f6e732061726520636f6e74726163742073656c66206465737472756374696f6e20616e6420726573746f726174696f6e40206f66206120746f6d6273746f6e652e11105375646f01105375646f040c4b6579010030543a3a4163636f756e74496480000000000000000000000000000000000000000000000000000000000000000004842054686520604163636f756e74496460206f6620746865207375646f206b65792e0110107375646f041063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e547375646f5f756e636865636b65645f776569676874081063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e1c5f776569676874185765696768742839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e310120546869732066756e6374696f6e20646f6573206e6f7420636865636b2074686520776569676874206f66207468652063616c6c2c20616e6420696e737465616420616c6c6f777320746865b4205375646f207573657220746f20737065636966792074686520776569676874206f66207468652063616c6c2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292ed0202d2054686520776569676874206f6620746869732063616c6c20697320646566696e6564206279207468652063616c6c65722e302023203c2f7765696768743e1c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652475012041757468656e74696361746573207468652063757272656e74207375646f206b657920616e6420736574732074686520676976656e204163636f756e7449642028606e6577602920617320746865206e6577207375646f206b65792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e1c7375646f5f6173080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2c51012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c207769746820605369676e656460206f726967696e2066726f6d44206120676976656e206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e010c14537564696404384469737061746368526573756c74048c2041207375646f206a75737420746f6f6b20706c6163652e205c5b726573756c745c5d284b65794368616e67656404244163636f756e74496404010120546865205c5b7375646f65725c5d206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e285375646f4173446f6e6504384469737061746368526573756c74048c2041207375646f206a75737420746f6f6b20706c6163652e205c5b726573756c745c5d00042c526571756972655375646f04802053656e646572206d75737420626520746865205375646f206163636f756e741220496d4f6e6c696e650120496d4f6e6c696e6510384865617274626561744166746572010038543a3a426c6f636b4e756d62657210000000001831012054686520626c6f636b206e756d6265722061667465722077686963682069742773206f6b20746f2073656e64206865617274626561747320696e2063757272656e742073657373696f6e2e0011012041742074686520626567696e6e696e67206f6620656163682073657373696f6e20776520736574207468697320746f20612076616c756520746861742073686f756c64d02066616c6c20726f7567686c7920696e20746865206d6964646c65206f66207468652073657373696f6e206475726174696f6e2e010120546865206964656120697320746f206669727374207761697420666f72207468652076616c696461746f727320746f2070726f64756365206120626c6f636b390120696e207468652063757272656e742073657373696f6e2c20736f20746861742074686520686561727462656174206c61746572206f6e2077696c6c206e6f74206265206e65636573736172792e104b65797301004c5665633c543a3a417574686f7269747949643e040004d0205468652063757272656e7420736574206f66206b6579732074686174206d61792069737375652061206865617274626561742e485265636569766564486561727462656174730002053053657373696f6e496e6465782441757468496e6465781c5665633c75383e05040008f020466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206041757468496e6465786020746f8020606f6666636861696e3a3a4f70617175654e6574776f726b5374617465602e38417574686f726564426c6f636b730102053053657373696f6e496e64657838543a3a56616c696461746f7249640c75333205100000000008150120466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f662060543a3a56616c696461746f7249646020746f20746865c8206e756d626572206f6620626c6f636b7320617574686f7265642062792074686520676976656e20617574686f726974792e0104246865617274626561740824686561727462656174644865617274626561743c543a3a426c6f636b4e756d6265723e285f7369676e6174757265bc3c543a3a417574686f7269747949642061732052756e74696d654170705075626c69633e3a3a5369676e6174757265242c2023203c7765696768743e4101202d20436f6d706c65786974793a20604f284b202b20452960207768657265204b206973206c656e677468206f6620604b6579736020286865617274626561742e76616c696461746f72735f6c656e290101202020616e642045206973206c656e677468206f6620606865617274626561742e6e6574776f726b5f73746174652e65787465726e616c5f61646472657373608c2020202d20604f284b29603a206465636f64696e67206f66206c656e67746820604b60b02020202d20604f284529603a206465636f64696e672f656e636f64696e67206f66206c656e677468206045603d01202d20446252656164733a2070616c6c65745f73657373696f6e206056616c696461746f7273602c2070616c6c65745f73657373696f6e206043757272656e74496e646578602c20604b657973602c5c202020605265636569766564486561727462656174736084202d2044625772697465733a206052656365697665644865617274626561747360302023203c2f7765696768743e010c444865617274626561745265636569766564042c417574686f7269747949640405012041206e657720686561727462656174207761732072656365697665642066726f6d2060417574686f72697479496460205c5b617574686f726974795f69645c5d1c416c6c476f6f640004d42041742074686520656e64206f66207468652073657373696f6e2c206e6f206f6666656e63652077617320636f6d6d69747465642e2c536f6d654f66666c696e6504605665633c4964656e74696669636174696f6e5475706c653e043d012041742074686520656e64206f66207468652073657373696f6e2c206174206c65617374206f6e652076616c696461746f722077617320666f756e6420746f206265205c5b6f66666c696e655c5d2e000828496e76616c69644b65790464204e6f6e206578697374656e74207075626c6963206b65792e4c4475706c6963617465644865617274626561740458204475706c696361746564206865617274626561742e1348417574686f72697479446973636f7665727900010000000014204f6666656e63657301204f6666656e636573101c5265706f727473000105345265706f727449644f663c543ed04f6666656e636544657461696c733c543a3a4163636f756e7449642c20543a3a4964656e74696669636174696f6e5475706c653e00040004490120546865207072696d61727920737472756374757265207468617420686f6c647320616c6c206f6666656e6365207265636f726473206b65796564206279207265706f7274206964656e746966696572732e4044656665727265644f6666656e6365730100645665633c44656665727265644f6666656e63654f663c543e3e0400086501204465666572726564207265706f72747320746861742068617665206265656e2072656a656374656420627920746865206f6666656e63652068616e646c657220616e64206e65656420746f206265207375626d6974746564442061742061206c617465722074696d652e58436f6e63757272656e745265706f727473496e646578010205104b696e64384f706171756554696d65536c6f74485665633c5265706f727449644f663c543e3e050400042901204120766563746f72206f66207265706f727473206f66207468652073616d65206b696e6420746861742068617070656e6564206174207468652073616d652074696d6520736c6f742e485265706f72747342794b696e64496e646578010105104b696e641c5665633c75383e00040018110120456e756d65726174657320616c6c207265706f727473206f662061206b696e6420616c6f6e672077697468207468652074696d6520746865792068617070656e65642e00bc20416c6c207265706f7274732061726520736f72746564206279207468652074696d65206f66206f6666656e63652e004901204e6f74652074686174207468652061637475616c2074797065206f662074686973206d617070696e6720697320605665633c75383e602c207468697320697320626563617573652076616c756573206f66690120646966666572656e7420747970657320617265206e6f7420737570706f7274656420617420746865206d6f6d656e7420736f2077652061726520646f696e6720746865206d616e75616c2073657269616c697a6174696f6e2e010001041c4f6666656e63650c104b696e64384f706171756554696d65536c6f7410626f6f6c10550120546865726520697320616e206f6666656e6365207265706f72746564206f662074686520676976656e20606b696e64602068617070656e656420617420746865206073657373696f6e5f696e6465786020616e644d0120286b696e642d7370656369666963292074696d6520736c6f742e2054686973206576656e74206973206e6f74206465706f736974656420666f72206475706c696361746520736c61736865732e206c617374190120656c656d656e7420696e64696361746573206f6620746865206f6666656e636520776173206170706c69656420287472756529206f7220717565756564202866616c73652974205c5b6b696e642c2074696d65736c6f742c206170706c6965645c5d2e00001528486973746f726963616c0000000000166052616e646f6d6e657373436f6c6c656374697665466c6970016052616e646f6d6e657373436f6c6c656374697665466c6970043852616e646f6d4d6174657269616c0100305665633c543a3a486173683e04000c610120536572696573206f6620626c6f636b20686561646572732066726f6d20746865206c61737420383120626c6f636b73207468617420616374732061732072616e646f6d2073656564206d6174657269616c2e2054686973610120697320617272616e67656420617320612072696e672062756666657220776974682060626c6f636b5f6e756d626572202520383160206265696e672074686520696e64657820696e746f20746865206056656360206f664420746865206f6c6465737420686173682e010000000017204964656e7469747901204964656e7469747910284964656e746974794f6600010530543a3a4163636f756e74496468526567697374726174696f6e3c42616c616e63654f663c543e3e0004000c210120496e666f726d6174696f6e20746861742069732070657274696e656e7420746f206964656e746966792074686520656e7469747920626568696e6420616e206163636f756e742e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e1c53757065724f6600010230543a3a4163636f756e7449645028543a3a4163636f756e7449642c204461746129000400086101205468652073757065722d6964656e74697479206f6620616e20616c7465726e6174697665202273756222206964656e7469747920746f676574686572207769746820697473206e616d652c2077697468696e2074686174510120636f6e746578742e20496620746865206163636f756e74206973206e6f7420736f6d65206f74686572206163636f756e742773207375622d6964656e746974792c207468656e206a75737420604e6f6e65602e18537562734f6601010530543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e290044000000000000000000000000000000000014b820416c7465726e6174697665202273756222206964656e746974696573206f662074686973206163636f756e742e001d0120546865206669727374206974656d20697320746865206465706f7369742c20746865207365636f6e64206973206120766563746f72206f6620746865206163636f756e74732e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e28526567697374726172730100d85665633c4f7074696f6e3c526567697374726172496e666f3c42616c616e63654f663c543e2c20543a3a4163636f756e7449643e3e3e0400104d012054686520736574206f6620726567697374726172732e204e6f7420657870656374656420746f206765742076657279206269672061732063616e206f6e6c79206265206164646564207468726f7567682061a8207370656369616c206f726967696e20286c696b656c79206120636f756e63696c206d6f74696f6e292e0029012054686520696e64657820696e746f20746869732063616e206265206361737420746f2060526567697374726172496e6465786020746f2067657420612076616c69642076616c75652e013c346164645f726567697374726172041c6163636f756e7430543a3a4163636f756e744964347c2041646420612072656769737472617220746f207468652073797374656d2e00010120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060543a3a5265676973747261724f726967696e602e00ac202d20606163636f756e74603a20746865206163636f756e74206f6620746865207265676973747261722e009820456d6974732060526567697374726172416464656460206966207375636365737366756c2e002c2023203c7765696768743e2901202d20604f2852296020776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e64656420616e6420636f64652d626f756e646564292e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e307365745f6964656e746974790410696e666f304964656e74697479496e666f4c2d012053657420616e206163636f756e742773206964656e7469747920696e666f726d6174696f6e20616e6420726573657276652074686520617070726f707269617465206465706f7369742e00590120496620746865206163636f756e7420616c726561647920686173206964656e7469747920696e666f726d6174696f6e2c20746865206465706f7369742069732074616b656e2061732070617274207061796d656e745420666f7220746865206e6577206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0090202d2060696e666f603a20546865206964656e7469747920696e666f726d6174696f6e2e008c20456d69747320604964656e7469747953657460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2858202b205827202b2052296021012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e64656429e42020202d20776865726520605260206a756467656d656e74732d636f756e7420287265676973747261722d636f756e742d626f756e6465642984202d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e2501202d204f6e652073746f72616765206d75746174696f6e2028636f6465632d7265616420604f285827202b205229602c20636f6465632d777269746520604f2858202b20522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e207365745f73756273041073756273645665633c28543a3a4163636f756e7449642c2044617461293e54902053657420746865207375622d6163636f756e7473206f66207468652073656e6465722e005901205061796d656e743a20416e79206167677265676174652062616c616e63652072657365727665642062792070726576696f757320607365745f73756273602063616c6c732077696c6c2062652072657475726e6564310120616e6420616e20616d6f756e7420605375624163636f756e744465706f736974602077696c6c20626520726573657276656420666f722065616368206974656d20696e206073756273602e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e00b4202d206073756273603a20546865206964656e74697479277320286e657729207375622d6163636f756e74732e002c2023203c7765696768743e34202d20604f2850202b20532960e82020202d20776865726520605060206f6c642d737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e88202d204174206d6f7374206f6e652062616c616e6365206f7065726174696f6e732e18202d2044423ae02020202d206050202b2053602073746f72616765206d75746174696f6e732028636f64656320636f6d706c657869747920604f2831296029c02020202d204f6e652073746f7261676520726561642028636f64656320636f6d706c657869747920604f28502960292ec42020202d204f6e652073746f726167652077726974652028636f64656320636f6d706c657869747920604f28532960292ed42020202d204f6e652073746f726167652d6578697374732028604964656e746974794f663a3a636f6e7461696e735f6b657960292e302023203c2f7765696768743e38636c6561725f6964656e7469747900483d0120436c65617220616e206163636f756e742773206964656e7469747920696e666f20616e6420616c6c207375622d6163636f756e747320616e642072657475726e20616c6c206465706f736974732e00f0205061796d656e743a20416c6c2072657365727665642062616c616e636573206f6e20746865206163636f756e74206172652072657475726e65642e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e009c20456d69747320604964656e74697479436c656172656460206966207375636365737366756c2e002c2023203c7765696768743e44202d20604f2852202b2053202b20582960d02020202d20776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e25012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e646564292e8c202d204f6e652062616c616e63652d756e72657365727665206f7065726174696f6e2ecc202d206032602073746f7261676520726561647320616e64206053202b2032602073746f726167652064656c6574696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e44726571756573745f6a756467656d656e7408247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e1c6d61785f66656554436f6d706163743c42616c616e63654f663c543e3e5c9820526571756573742061206a756467656d656e742066726f6d2061207265676973747261722e005901205061796d656e743a204174206d6f737420606d61785f666565602077696c6c20626520726573657276656420666f72207061796d656e7420746f2074686520726567697374726172206966206a756467656d656e741c20676976656e2e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e002101202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973207265717565737465642e5901202d20606d61785f666565603a20546865206d6178696d756d206665652074686174206d617920626520706169642e20546869732073686f756c64206a757374206265206175746f2d706f70756c617465642061733a0034206060606e6f636f6d70696c65bc2053656c663a3a7265676973747261727328292e676574287265675f696e646578292e756e7772617028292e666565102060606000a820456d69747320604a756467656d656e7452657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2858202b205229602e34202d204f6e65206576656e742e302023203c2f7765696768743e3863616e63656c5f7265717565737404247265675f696e64657838526567697374726172496e646578446c2043616e63656c20612070726576696f757320726571756573742e00fc205061796d656e743a20412070726576696f75736c79207265736572766564206465706f7369742069732072657475726e6564206f6e20737563636573732e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e004901202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206e6f206c6f6e676572207265717565737465642e00b020456d69747320604a756467656d656e74556e72657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e8c202d204f6e652073746f72616765206d75746174696f6e20604f2852202b205829602e30202d204f6e65206576656e74302023203c2f7765696768743e1c7365745f6665650814696e6465785c436f6d706163743c526567697374726172496e6465783e0c66656554436f6d706163743c42616c616e63654f663c543e3e341d0120536574207468652066656520726571756972656420666f722061206a756467656d656e7420746f206265207265717565737465642066726f6d2061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e58202d2060666565603a20746865206e6577206665652e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e333135202b2052202a20302e33323920c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e387365745f6163636f756e745f69640814696e6465785c436f6d706163743c526567697374726172496e6465783e0c6e657730543a3a4163636f756e74496434c0204368616e676520746865206163636f756e74206173736f63696174656420776974682061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e74202d20606e6577603a20746865206e6577206163636f756e742049442e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee4202d2042656e63686d61726b3a20382e383233202b2052202a20302e333220c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e287365745f6669656c64730814696e6465785c436f6d706163743c526567697374726172496e6465783e186669656c6473384964656e746974794669656c647334ac2053657420746865206669656c6420696e666f726d6174696f6e20666f722061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e1101202d20606669656c6473603a20746865206669656c64732074686174207468652072656769737472617220636f6e6365726e73207468656d73656c76657320776974682e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e343634202b2052202a20302e33323520c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e4470726f766964655f6a756467656d656e740c247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365246a756467656d656e745c4a756467656d656e743c42616c616e63654f663c543e3e4cbc2050726f766964652061206a756467656d656e7420666f7220616e206163636f756e742773206964656e746974792e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74b4206f6620746865207265676973747261722077686f736520696e64657820697320607265675f696e646578602e002501202d20607265675f696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206265696e67206d6164652e5901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e4d01202d20606a756467656d656e74603a20746865206a756467656d656e74206f662074686520726567697374726172206f6620696e64657820607265675f696e646578602061626f75742060746172676574602e009820456d69747320604a756467656d656e74476976656e60206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e88202d204f6e652062616c616e63652d7472616e73666572206f7065726174696f6e2e98202d20557020746f206f6e65206163636f756e742d6c6f6f6b7570206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2852202b205829602e34202d204f6e65206576656e742e302023203c2f7765696768743e346b696c6c5f6964656e7469747904187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654c45012052656d6f766520616e206163636f756e742773206964656e7469747920616e64207375622d6163636f756e7420696e666f726d6174696f6e20616e6420736c61736820746865206465706f736974732e006501205061796d656e743a2052657365727665642062616c616e6365732066726f6d20607365745f737562736020616e6420607365745f6964656e74697479602061726520736c617368656420616e642068616e646c656420627949012060536c617368602e20566572696669636174696f6e2072657175657374206465706f7369747320617265206e6f742072657475726e65643b20746865792073686f756c642062652063616e63656c6c656484206d616e75616c6c79207573696e67206063616e63656c5f72657175657374602e00fc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206d617463682060543a3a466f7263654f726967696e602e005901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e009820456d69747320604964656e746974794b696c6c656460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2852202b2053202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e74202d206053202b2032602073746f72616765206d75746174696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e1c6164645f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365106461746110446174611cb0204164642074686520676976656e206163636f756e7420746f207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656e616d655f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651064617461104461746110d020416c74657220746865206173736f636961746564206e616d65206f662074686520676976656e207375622d6163636f756e742e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656d6f76655f737562040c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651cc42052656d6f76652074686520676976656e206163636f756e742066726f6d207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e20717569745f7375620028902052656d6f7665207468652073656e6465722061732061207375622d6163636f756e742e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c206265207265706174726961746564b820746f207468652073656e64657220282a6e6f742a20746865206f726967696e616c206465706f7369746f72292e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206861766520612072656769737465726564402073757065722d6964656e746974792e004901204e4f54453a20546869732073686f756c64206e6f74206e6f726d616c6c7920626520757365642c206275742069732070726f766964656420696e207468652063617365207468617420746865206e6f6e2d150120636f6e74726f6c6c6572206f6620616e206163636f756e74206973206d616c6963696f75736c7920726567697374657265642061732061207375622d6163636f756e742e01282c4964656e7469747953657404244163636f756e7449640411012041206e616d652077617320736574206f72207265736574202877686963682077696c6c2072656d6f766520616c6c206a756467656d656e7473292e205c5b77686f5c5d3c4964656e74697479436c656172656408244163636f756e7449641c42616c616e63650415012041206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e205c5b77686f2c206465706f7369745c5d384964656e746974794b696c6c656408244163636f756e7449641c42616c616e6365040d012041206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e205c5b77686f2c206465706f7369745c5d484a756467656d656e7452657175657374656408244163636f756e74496438526567697374726172496e6465780405012041206a756467656d656e74207761732061736b65642066726f6d2061207265676973747261722e205c5b77686f2c207265676973747261725f696e6465785c5d504a756467656d656e74556e72657175657374656408244163636f756e74496438526567697374726172496e64657804f02041206a756467656d656e74207265717565737420776173207265747261637465642e205c5b77686f2c207265676973747261725f696e6465785c5d384a756467656d656e74476976656e08244163636f756e74496438526567697374726172496e6465780409012041206a756467656d656e742077617320676976656e2062792061207265676973747261722e205c5b7461726765742c207265676973747261725f696e6465785c5d3852656769737472617241646465640438526567697374726172496e64657804ac204120726567697374726172207761732061646465642e205c5b7265676973747261725f696e6465785c5d405375624964656e7469747941646465640c244163636f756e744964244163636f756e7449641c42616c616e63650455012041207375622d6964656e746974792077617320616464656420746f20616e206964656e7469747920616e6420746865206465706f73697420706169642e205c5b7375622c206d61696e2c206465706f7369745c5d485375624964656e7469747952656d6f7665640c244163636f756e744964244163636f756e7449641c42616c616e6365080d012041207375622d6964656e74697479207761732072656d6f7665642066726f6d20616e206964656e7469747920616e6420746865206465706f7369742066726565642e5c205c5b7375622c206d61696e2c206465706f7369745c5d485375624964656e746974795265766f6b65640c244163636f756e744964244163636f756e7449641c42616c616e6365081d012041207375622d6964656e746974792077617320636c65617265642c20616e642074686520676976656e206465706f7369742072657061747269617465642066726f6d207468652901206d61696e206964656e74697479206163636f756e7420746f20746865207375622d6964656e74697479206163636f756e742e205c5b7375622c206d61696e2c206465706f7369745c5d183042617369634465706f7369743042616c616e63654f663c543e400080c6a47e8d0300000000000000000004d82054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564206964656e746974792e304669656c644465706f7369743042616c616e63654f663c543e4000a031a95fe300000000000000000000042d012054686520616d6f756e742068656c64206f6e206465706f73697420706572206164646974696f6e616c206669656c6420666f7220612072656769737465726564206964656e746974792e445375624163636f756e744465706f7369743042616c616e63654f663c543e400080f420e6b5000000000000000000000c65012054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564207375626163636f756e742e20546869732073686f756c64206163636f756e7420666f7220746865206661637471012074686174206f6e652073746f72616765206974656d27732076616c75652077696c6c20696e637265617365206279207468652073697a65206f6620616e206163636f756e742049442c20616e642074686572652077696c6c206265290120616e6f746865722074726965206974656d2077686f73652076616c7565206973207468652073697a65206f6620616e206163636f756e7420494420706c75732033322062797465732e384d61785375624163636f756e74730c7533321064000000040d0120546865206d6178696d756d206e756d626572206f66207375622d6163636f756e747320616c6c6f77656420706572206964656e746966696564206163636f756e742e4c4d61784164646974696f6e616c4669656c64730c7533321064000000086501204d6178696d756d206e756d626572206f66206164646974696f6e616c206669656c64732074686174206d61792062652073746f72656420696e20616e2049442e204e656564656420746f20626f756e642074686520492f4fe020726571756972656420746f2061636365737320616e206964656e746974792c206275742063616e2062652070726574747920686967682e344d6178526567697374726172730c7533321014000000085101204d61786d696d756d206e756d626572206f66207265676973747261727320616c6c6f77656420696e207468652073797374656d2e204e656564656420746f20626f756e642074686520636f6d706c65786974797c206f662c20652e672e2c207570646174696e67206a756467656d656e74732e4048546f6f4d616e795375624163636f756e7473046020546f6f206d616e7920737562732d6163636f756e74732e204e6f74466f756e640454204163636f756e742069736e277420666f756e642e204e6f744e616d65640454204163636f756e742069736e2774206e616d65642e28456d707479496e646578043420456d70747920696e6465782e284665654368616e676564044020466565206973206368616e6765642e284e6f4964656e74697479044c204e6f206964656e7469747920666f756e642e3c537469636b794a756467656d656e74044820537469636b79206a756467656d656e742e384a756467656d656e74476976656e0444204a756467656d656e7420676976656e2e40496e76616c69644a756467656d656e74044c20496e76616c6964206a756467656d656e742e30496e76616c6964496e64657804582054686520696e64657820697320696e76616c69642e34496e76616c6964546172676574045c205468652074617267657420697320696e76616c69642e34546f6f4d616e794669656c6473047020546f6f206d616e79206164646974696f6e616c206669656c64732e44546f6f4d616e795265676973747261727304ec204d6178696d756d20616d6f756e74206f66207265676973747261727320726561636865642e2043616e6e6f742061646420616e79206d6f72652e38416c7265616479436c61696d65640474204163636f756e7420494420697320616c7265616479206e616d65642e184e6f7453756204742053656e646572206973206e6f742061207375622d6163636f756e742e204e6f744f776e6564048c205375622d6163636f756e742069736e2774206f776e65642062792073656e6465722e181c536f6369657479011c536f6369657479401c466f756e646572000030543a3a4163636f756e7449640400044820546865206669727374206d656d6265722e1452756c657300001c543a3a48617368040008510120412068617368206f66207468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e2043616e206f6e6c7920626520736574206f6e636520616e6454206f6e6c792062792074686520666f756e6465722e2843616e6469646174657301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e0400043901205468652063757272656e7420736574206f662063616e646964617465733b206269646465727320746861742061726520617474656d7074696e6720746f206265636f6d65206d656d626572732e4c53757370656e64656443616e6469646174657300010530543a3a4163636f756e744964e42842616c616e63654f663c542c20493e2c204269644b696e643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e2900040004842054686520736574206f662073757370656e6465642063616e646964617465732e0c506f7401003c42616c616e63654f663c542c20493e400000000000000000000000000000000004410120416d6f756e74206f66206f7572206163636f756e742062616c616e63652074686174206973207370656369666963616c6c7920666f7220746865206e65787420726f756e642773206269642873292e1048656164000030543a3a4163636f756e744964040004e820546865206d6f7374207072696d6172792066726f6d20746865206d6f737420726563656e746c7920617070726f766564206d656d626572732e1c4d656d626572730100445665633c543a3a4163636f756e7449643e04000494205468652063757272656e7420736574206f66206d656d626572732c206f7264657265642e4053757370656e6465644d656d6265727301010530543a3a4163636f756e74496410626f6f6c00040004782054686520736574206f662073757370656e646564206d656d626572732e104269647301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e040004e8205468652063757272656e7420626964732c2073746f726564206f726465726564206279207468652076616c7565206f6620746865206269642e20566f756368696e6700010530543a3a4163636f756e74496438566f756368696e6753746174757300040004e4204d656d626572732063757272656e746c7920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e1c5061796f75747301010530543a3a4163636f756e744964985665633c28543a3a426c6f636b4e756d6265722c2042616c616e63654f663c542c20493e293e000400044d012050656e64696e67207061796f7574733b206f72646572656420627920626c6f636b206e756d6265722c20776974682074686520616d6f756e7420746861742073686f756c642062652070616964206f75742e1c537472696b657301010530543a3a4163636f756e7449642c537472696b65436f756e7400100000000004dc20546865206f6e676f696e67206e756d626572206f66206c6f73696e6720766f746573206361737420627920746865206d656d6265722e14566f74657300020530543a3a4163636f756e74496430543a3a4163636f756e74496410566f746505040004d020446f75626c65206d61702066726f6d2043616e646964617465202d3e20566f746572202d3e20284d617962652920566f74652e20446566656e646572000030543a3a4163636f756e744964040004c42054686520646566656e64696e67206d656d6265722063757272656e746c79206265696e67206368616c6c656e6765642e34446566656e646572566f74657300010530543a3a4163636f756e74496410566f7465000400046020566f74657320666f722074686520646566656e6465722e284d61784d656d6265727301000c753332100000000004dc20546865206d6178206e756d626572206f66206d656d6265727320666f722074686520736f6369657479206174206f6e652074696d652e01300c626964041476616c75653c42616c616e63654f663c542c20493e84e020412075736572206f757473696465206f662074686520736f63696574792063616e206d616b6520612062696420666f7220656e7472792e003901205061796d656e743a206043616e6469646174654465706f736974602077696c6c20626520726573657276656420666f72206d616b696e672061206269642e2049742069732072657475726e6564f0207768656e2074686520626964206265636f6d65732061206d656d6265722c206f7220696620746865206269642063616c6c732060756e626964602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a5901202d206076616c7565603a2041206f6e652074696d65207061796d656e74207468652062696420776f756c64206c696b6520746f2072656365697665207768656e206a6f696e696e672074686520736f63696574792e002c2023203c7765696768743e5501204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520726573657276652944202d2053746f726167652052656164733aec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f284329c820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d2948202d2053746f72616765205772697465733a810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3a2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6820092d204f6e65206576656e7420666f72206e6577206269642efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e14756e626964040c706f730c7533324cd82041206269646465722063616e2072656d6f76652074686569722062696420666f7220656e74727920696e746f20736f63696574792e010120427920646f696e6720736f2c20746865792077696c6c20686176652074686569722063616e646964617465206465706f7369742072657475726e6564206f728420746865792077696c6c20756e766f75636820746865697220766f75636865722e00fc205061796d656e743a2054686520626964206465706f73697420697320756e7265736572766564206966207468652075736572206d6164652061206269642e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206269646465722e003020506172616d65746572733a1901202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2077616e747320746f20756e6269642e002c2023203c7765696768743eb0204b65793a204220286c656e206f662062696473292c2058202862616c616e636520756e72657365727665290d01202d204f6e652073746f72616765207265616420616e6420777269746520746f20726574726965766520616e64207570646174652074686520626964732e204f2842294501202d20456974686572206f6e6520756e726573657276652062616c616e636520616374696f6e204f285829206f72206f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2842202b205829302023203c2f7765696768743e14766f7563680c0c77686f30543a3a4163636f756e7449641476616c75653c42616c616e63654f663c542c20493e0c7469703c42616c616e63654f663c542c20493eb045012041732061206d656d6265722c20766f75636820666f7220736f6d656f6e6520746f206a6f696e20736f636965747920627920706c6163696e67206120626964206f6e20746865697220626568616c662e005501205468657265206973206e6f206465706f73697420726571756972656420746f20766f75636820666f722061206e6577206269642c206275742061206d656d6265722063616e206f6e6c7920766f75636820666f725d01206f6e652062696420617420612074696d652e2049662074686520626964206265636f6d657320612073757370656e6465642063616e64696461746520616e6420756c74696d6174656c792072656a65637465642062794101207468652073757370656e73696f6e206a756467656d656e74206f726967696e2c20746865206d656d6265722077696c6c2062652062616e6e65642066726f6d20766f756368696e6720616761696e2e005901204173206120766f756368696e67206d656d6265722c20796f752063616e20636c61696d206120746970206966207468652063616e6469646174652069732061636365707465642e2054686973207469702077696c6c51012062652070616964206173206120706f7274696f6e206f66207468652072657761726420746865206d656d6265722077696c6c207265636569766520666f72206a6f696e696e672074686520736f63696574792e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733acc202d206077686f603a2054686520757365722077686f20796f7520776f756c64206c696b6520746f20766f75636820666f722e5101202d206076616c7565603a2054686520746f74616c2072657761726420746f2062652070616964206265747765656e20796f7520616e64207468652063616e6469646174652069662074686579206265636f6d65642061206d656d62657220696e2074686520736f63696574792e4901202d2060746970603a20596f757220637574206f662074686520746f74616c206076616c756560207061796f7574207768656e207468652063616e64696461746520697320696e64756374656420696e746f15012074686520736f63696574792e2054697073206c6172676572207468616e206076616c7565602077696c6c206265207361747572617465642075706f6e207061796f75742e002c2023203c7765696768743e0101204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d626572732944202d2053746f726167652052656164733ac820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d29090120092d204f6e652073746f72616765207265616420746f20636865636b206d656d626572206973206e6f7420616c726561647920766f756368696e672e204f283129ec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f28432948202d2053746f72616765205772697465733a0d0120092d204f6e652073746f7261676520777269746520746f20696e7365727420766f756368696e672073746174757320746f20746865206d656d6265722e204f283129810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3ac020092d204f286c6f67204d292073656172636820746f20636865636b2073656e6465722069732061206d656d6265722e2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6020092d204f6e65206576656e7420666f7220766f7563682efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e1c756e766f756368040c706f730c753332442d01204173206120766f756368696e67206d656d6265722c20756e766f7563682061206269642e2054686973206f6e6c7920776f726b73207768696c6520766f7563686564207573657220697394206f6e6c792061206269646465722028616e64206e6f7420612063616e646964617465292e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206120766f756368696e67206d656d6265722e003020506172616d65746572733a2d01202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2073686f756c6420626520756e766f75636865642e002c2023203c7765696768743e54204b65793a204220286c656e206f662062696473290901202d204f6e652073746f726167652072656164204f28312920746f20636865636b20746865207369676e6572206973206120766f756368696e67206d656d6265722eec202d204f6e652073746f72616765206d757461746520746f20726574726965766520616e64207570646174652074686520626964732e204f28422994202d204f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f284229302023203c2f7765696768743e10766f7465082463616e6469646174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c617070726f766510626f6f6c4c882041732061206d656d6265722c20766f7465206f6e20612063616e6469646174652e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733a0d01202d206063616e646964617465603a205468652063616e646964617465207468617420746865206d656d62657220776f756c64206c696b6520746f20626964206f6e2ef4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265d82020202020202020202020202020617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743ebc204b65793a204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722e58202d204f6e65206163636f756e74206c6f6f6b75702e2d01202d204f6e652073746f726167652072656164204f28432920616e64204f2843292073656172636820746f20636865636b2074686174207573657220697320612063616e6469646174652ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204329302023203c2f7765696768743e34646566656e6465725f766f7465041c617070726f766510626f6f6c408c2041732061206d656d6265722c20766f7465206f6e2074686520646566656e6465722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733af4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265a420617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743e68202d204b65793a204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e007820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d29302023203c2f7765696768743e187061796f757400504501205472616e7366657220746865206669727374206d617475726564207061796f757420666f72207468652073656e64657220616e642072656d6f76652069742066726f6d20746865207265636f7264732e006901204e4f54453a20546869732065787472696e736963206e6565647320746f2062652063616c6c6564206d756c7469706c652074696d657320746f20636c61696d206d756c7469706c65206d617475726564207061796f7574732e002101205061796d656e743a20546865206d656d6265722077696c6c20726563656976652061207061796d656e7420657175616c20746f207468656972206669727374206d61747572656478207061796f757420746f20746865697220667265652062616c616e63652e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d62657220776974684c207061796f7574732072656d61696e696e672e002c2023203c7765696768743e1d01204b65793a204d20286c656e206f66206d656d62657273292c205020286e756d626572206f66207061796f75747320666f72206120706172746963756c6172206d656d626572292501202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b207369676e65722069732061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28502920746f2067657420616c6c207061796f75747320666f722061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28312920746f20676574207468652063757272656e7420626c6f636b206e756d6265722e8c202d204f6e652063757272656e6379207472616e736665722063616c6c2e204f2858291101202d204f6e652073746f72616765207772697465206f722072656d6f76616c20746f2075706461746520746865206d656d6265722773207061796f7574732e204f285029009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2050202b205829302023203c2f7765696768743e14666f756e640c1c666f756e64657230543a3a4163636f756e7449642c6d61785f6d656d626572730c7533321472756c65731c5665633c75383e4c4c20466f756e642074686520736f63696574792e00f0205468697320697320646f6e65206173206120646973637265746520616374696f6e20696e206f7264657220746f20616c6c6f7720666f72207468651901206d6f64756c6520746f20626520696e636c7564656420696e746f20612072756e6e696e6720636861696e20616e642063616e206f6e6c7920626520646f6e65206f6e63652e001d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f466f756e6465725365744f726967696e5f2e003020506172616d65746572733a1901202d2060666f756e64657260202d20546865206669727374206d656d62657220616e642068656164206f6620746865206e65776c7920666f756e64656420736f63696574792e1501202d20606d61785f6d656d6265727360202d2054686520696e697469616c206d6178206e756d626572206f66206d656d6265727320666f722074686520736f63696574792ef4202d206072756c657360202d205468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e002c2023203c7765696768743ee0202d2054776f2073746f72616765206d75746174657320746f207365742060486561646020616e642060466f756e646572602e204f283129f4202d204f6e652073746f7261676520777269746520746f2061646420746865206669727374206d656d62657220746f20736f63696574792e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e1c756e666f756e6400348c20416e6e756c2074686520666f756e64696e67206f662074686520736f63696574792e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205369676e65642c20616e6420746865207369676e696e67206163636f756e74206d75737420626520626f74685901207468652060466f756e6465726020616e6420746865206048656164602e205468697320696d706c6965732074686174206974206d6179206f6e6c7920626520646f6e65207768656e207468657265206973206f6e6520206d656d6265722e002c2023203c7765696768743e68202d2054776f2073746f72616765207265616473204f2831292e78202d20466f75722073746f726167652072656d6f76616c73204f2831292e34202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e586a756467655f73757370656e6465645f6d656d626572080c77686f30543a3a4163636f756e7449641c666f726769766510626f6f6c6c2d0120416c6c6f772073757370656e73696f6e206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e646564206d656d6265722e00590120496620612073757370656e646564206d656d62657220697320666f72676976656e2c2077652073696d706c7920616464207468656d206261636b2061732061206d656d6265722c206e6f7420616666656374696e67cc20616e79206f6620746865206578697374696e672073746f72616765206974656d7320666f722074686174206d656d6265722e00490120496620612073757370656e646564206d656d6265722069732072656a65637465642c2072656d6f766520616c6c206173736f6369617465642073746f72616765206974656d732c20696e636c7564696e670101207468656972207061796f7574732c20616e642072656d6f766520616e7920766f7563686564206269647320746865792063757272656e746c7920686176652e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ab4202d206077686f60202d205468652073757370656e646564206d656d62657220746f206265206a75646765642e3501202d2060666f726769766560202d204120626f6f6c65616e20726570726573656e74696e672077686574686572207468652073757370656e73696f6e206a756467656d656e74206f726967696e2501202020202020202020202020202020666f726769766573202860747275656029206f722072656a6563747320286066616c7365602920612073757370656e646564206d656d6265722e002c2023203c7765696768743ea4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d6265727329f8202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e646564206d656d6265722e204f2831297101202d20557020746f206f6e652073746f72616765207772697465204f284d292077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d626572206261636b20746f20736f63696574792ef8202d20557020746f20332073746f726167652072656d6f76616c73204f28312920746f20636c65616e20757020612072656d6f766564206d656d6265722e4501202d20557020746f206f6e652073746f72616765207772697465204f2842292077697468204f2842292073656172636820746f2072656d6f766520766f7563686564206269642066726f6d20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e70202d204f6e652073746f726167652072656d6f76616c2e204f2831297c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204229302023203c2f7765696768743e646a756467655f73757370656e6465645f63616e646964617465080c77686f30543a3a4163636f756e744964246a756467656d656e74244a756467656d656e74a0350120416c6c6f772073757370656e646564206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e6465642063616e6469646174652e005d0120496620746865206a756467656d656e742069732060417070726f7665602c20776520616464207468656d20746f20736f63696574792061732061206d656d62657220776974682074686520617070726f70726961746574207061796d656e7420666f72206a6f696e696e6720736f63696574792e00550120496620746865206a756467656d656e74206973206052656a656374602c2077652065697468657220736c61736820746865206465706f736974206f6620746865206269642c20676976696e67206974206261636b110120746f2074686520736f63696574792074726561737572792c206f722077652062616e2074686520766f75636865722066726f6d20766f756368696e6720616761696e2e005d0120496620746865206a756467656d656e7420697320605265626964602c20776520707574207468652063616e646964617465206261636b20696e207468652062696420706f6f6c20616e64206c6574207468656d20676f94207468726f7567682074686520696e64756374696f6e2070726f6365737320616761696e2e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ac0202d206077686f60202d205468652073757370656e6465642063616e64696461746520746f206265206a75646765642ec4202d20606a756467656d656e7460202d2060417070726f7665602c206052656a656374602c206f7220605265626964602e002c2023203c7765696768743ef4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520616374696f6e29f0202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e6465642063616e6469646174652ec8202d204f6e652073746f726167652072656d6f76616c206f66207468652073757370656e6465642063616e6469646174652e40202d20417070726f7665204c6f676963150120092d204f6e652073746f72616765207265616420746f206765742074686520617661696c61626c6520706f7420746f2070617920757365727320776974682e204f283129dc20092d204f6e652073746f7261676520777269746520746f207570646174652074686520617661696c61626c6520706f742e204f283129e820092d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f283129b420092d204f6e652073746f72616765207265616420746f2067657420616c6c206d656d626572732e204f284d29a020092d20557020746f206f6e6520756e726573657276652063757272656e637920616374696f6e2eb020092d20557020746f2074776f206e65772073746f726167652077726974657320746f207061796f7574732e4d0120092d20557020746f206f6e652073746f726167652077726974652077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d62657220746f20736f63696574792e3c202d2052656a656374204c6f676963dc20092d20557020746f206f6e6520726570617472696174652072657365727665642063757272656e637920616374696f6e2e204f2858292d0120092d20557020746f206f6e652073746f7261676520777269746520746f2062616e2074686520766f756368696e67206d656d6265722066726f6d20766f756368696e6720616761696e2e38202d205265626964204c6f676963410120092d2053746f72616765206d75746174652077697468204f286c6f672042292062696e6172792073656172636820746f20706c616365207468652075736572206261636b20696e746f20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e5c202d204f6e652073746f726167652072656d6f76616c2e7c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2042202b205829302023203c2f7765696768743e3c7365745f6d61785f6d656d62657273040c6d61780c753332381d0120416c6c6f777320726f6f74206f726967696e20746f206368616e676520746865206d6178696d756d206e756d626572206f66206d656d6265727320696e20736f63696574792eb4204d6178206d656d6265727368697020636f756e74206d7573742062652067726561746572207468616e20312e00dc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d205f524f4f545f2e003020506172616d65746572733ae4202d20606d617860202d20546865206d6178696d756d206e756d626572206f66206d656d6265727320666f722074686520736f63696574792e002c2023203c7765696768743eb0202d204f6e652073746f7261676520777269746520746f2075706461746520746865206d61782e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e01401c466f756e64656404244163636f756e74496404e82054686520736f636965747920697320666f756e6465642062792074686520676976656e206964656e746974792e205c5b666f756e6465725c5d0c42696408244163636f756e7449641c42616c616e63650861012041206d656d6265727368697020626964206a7573742068617070656e65642e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e64207468656972206f666665729c20697320746865207365636f6e642e205c5b63616e6469646174655f69642c206f666665725c5d14566f7563680c244163636f756e7449641c42616c616e6365244163636f756e7449640861012041206d656d6265727368697020626964206a7573742068617070656e656420627920766f756368696e672e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e647901207468656972206f6666657220697320746865207365636f6e642e2054686520766f756368696e67207061727479206973207468652074686972642e205c5b63616e6469646174655f69642c206f666665722c20766f756368696e675c5d244175746f556e62696404244163636f756e7449640419012041205c5b63616e6469646174655c5d207761732064726f70706564202864756520746f20616e20657863657373206f66206269647320696e207468652073797374656d292e14556e62696404244163636f756e74496404c02041205c5b63616e6469646174655c5d207761732064726f70706564202862792074686569722072657175657374292e1c556e766f75636804244163636f756e7449640409012041205c5b63616e6469646174655c5d207761732064726f70706564202862792072657175657374206f662077686f20766f756368656420666f72207468656d292e20496e64756374656408244163636f756e744964385665633c4163636f756e7449643e08590120412067726f7570206f662063616e646964617465732068617665206265656e20696e6475637465642e205468652062617463682773207072696d617279206973207468652066697273742076616c75652c20746865d420626174636820696e2066756c6c20697320746865207365636f6e642e205c5b7072696d6172792c2063616e646964617465735c5d6053757370656e6465644d656d6265724a756467656d656e7408244163636f756e74496410626f6f6c04d020412073757370656e646564206d656d62657220686173206265656e206a75646765642e205c5b77686f2c206a75646765645c5d4843616e64696461746553757370656e64656404244163636f756e744964048c2041205c5b63616e6469646174655c5d20686173206265656e2073757370656e6465643c4d656d62657253757370656e64656404244163636f756e74496404802041205c5b6d656d6265725c5d20686173206265656e2073757370656e646564284368616c6c656e67656404244163636f756e74496404842041205c5b6d656d6265725c5d20686173206265656e206368616c6c656e67656410566f74650c244163636f756e744964244163636f756e74496410626f6f6c04c8204120766f746520686173206265656e20706c61636564205c5b63616e6469646174652c20766f7465722c20766f74655c5d30446566656e646572566f746508244163636f756e74496410626f6f6c04f8204120766f746520686173206265656e20706c6163656420666f72206120646566656e64696e67206d656d626572205c5b766f7465722c20766f74655c5d344e65774d61784d656d62657273040c75333204a02041206e6577205c5b6d61785c5d206d656d62657220636f756e7420686173206265656e2073657424556e666f756e64656404244163636f756e744964048820536f636965747920697320756e666f756e6465642e205c5b666f756e6465725c5d1c4465706f736974041c42616c616e636504f820536f6d652066756e64732077657265206465706f736974656420696e746f2074686520736f6369657479206163636f756e742e205c5b76616c75655c5d1c4043616e6469646174654465706f7369743c42616c616e63654f663c542c20493e400080c6a47e8d0300000000000000000004fc20546865206d696e696d756d20616d6f756e74206f662061206465706f73697420726571756972656420666f7220612062696420746f206265206d6164652e4857726f6e6753696465446564756374696f6e3c42616c616e63654f663c542c20493e400080f420e6b5000000000000000000000855012054686520616d6f756e74206f662074686520756e70616964207265776172642074686174206765747320646564756374656420696e207468652063617365207468617420656974686572206120736b6570746963c020646f65736e277420766f7465206f7220736f6d656f6e6520766f74657320696e207468652077726f6e67207761792e284d6178537472696b65730c753332100a00000008750120546865206e756d626572206f662074696d65732061206d656d626572206d617920766f7465207468652077726f6e672077617920286f72206e6f7420617420616c6c2c207768656e207468657920617265206120736b65707469632978206265666f72652074686579206265636f6d652073757370656e6465642e2c506572696f645370656e643c42616c616e63654f663c542c20493e400000c52ebca2b1000000000000000000042d012054686520616d6f756e74206f6620696e63656e7469766520706169642077697468696e206561636820706572696f642e20446f65736e277420696e636c75646520566f7465725469702e38526f746174696f6e506572696f6438543a3a426c6f636b4e756d626572100077010004110120546865206e756d626572206f6620626c6f636b73206265747765656e2063616e6469646174652f6d656d6265727368697020726f746174696f6e20706572696f64732e3c4368616c6c656e6765506572696f6438543a3a426c6f636b4e756d626572108013030004d020546865206e756d626572206f6620626c6f636b73206265747765656e206d656d62657273686970206368616c6c656e6765732e204d6f64756c654964204d6f64756c6549642070792f736f63696504682054686520736f636965746965732773206d6f64756c65206964482c426164506f736974696f6e049020416e20696e636f727265637420706f736974696f6e207761732070726f76696465642e244e6f744d656d62657204582055736572206973206e6f742061206d656d6265722e34416c72656164794d656d6265720468205573657220697320616c72656164792061206d656d6265722e2453757370656e646564044c20557365722069732073757370656e6465642e304e6f7453757370656e646564045c2055736572206973206e6f742073757370656e6465642e204e6f5061796f7574044c204e6f7468696e6720746f207061796f75742e38416c7265616479466f756e646564046420536f636965747920616c726561647920666f756e6465642e3c496e73756666696369656e74506f74049c204e6f7420656e6f75676820696e20706f7420746f206163636570742063616e6469646174652e3c416c7265616479566f756368696e6704e8204d656d62657220697320616c726561647920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e2e2c4e6f74566f756368696e670460204d656d626572206973206e6f7420766f756368696e672e104865616404942043616e6e6f742072656d6f7665207468652068656164206f662074686520636861696e2e1c466f756e646572046c2043616e6e6f742072656d6f76652074686520666f756e6465722e28416c7265616479426964047420557365722068617320616c7265616479206d6164652061206269642e40416c726561647943616e6469646174650474205573657220697320616c726561647920612063616e6469646174652e304e6f7443616e64696461746504642055736572206973206e6f7420612063616e6469646174652e284d61784d656d62657273048420546f6f206d616e79206d656d6265727320696e2074686520736f63696574792e284e6f74466f756e646572047c205468652063616c6c6572206973206e6f742074686520666f756e6465722e1c4e6f74486561640470205468652063616c6c6572206973206e6f742074686520686561642e19205265636f7665727901205265636f766572790c2c5265636f76657261626c6500010530543a3a4163636f756e744964e85265636f76657279436f6e6669673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e0004000409012054686520736574206f66207265636f76657261626c65206163636f756e747320616e64207468656972207265636f7665727920636f6e66696775726174696f6e2e404163746976655265636f76657269657300020530543a3a4163636f756e74496430543a3a4163636f756e744964e84163746976655265636f766572793c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e050400106820416374697665207265636f7665727920617474656d7074732e001501204669727374206163636f756e7420697320746865206163636f756e7420746f206265207265636f76657265642c20616e6420746865207365636f6e64206163636f756e74ac20697320746865207573657220747279696e6720746f207265636f76657220746865206163636f756e742e1450726f787900010230543a3a4163636f756e74496430543a3a4163636f756e7449640004000c9020546865206c697374206f6620616c6c6f7765642070726f7879206163636f756e74732e00f8204d61702066726f6d2074686520757365722077686f2063616e2061636365737320697420746f20746865207265636f7665726564206163636f756e742e01243061735f7265636f7665726564081c6163636f756e7430543a3a4163636f756e7449641063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e34a42053656e6420612063616c6c207468726f7567682061207265636f7665726564206163636f756e742e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a2501202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f752077616e7420746f206d616b6520612063616c6c206f6e2d626568616c662d6f662e0101202d206063616c6c603a205468652063616c6c20796f752077616e7420746f206d616b65207769746820746865207265636f7665726564206163636f756e742e002c2023203c7765696768743e94202d2054686520776569676874206f6620746865206063616c6c60202b2031302c3030302e0901202d204f6e652073746f72616765206c6f6f6b757020746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e347365745f7265636f766572656408106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e744964341d0120416c6c6f7720524f4f5420746f2062797061737320746865207265636f766572792070726f6365737320616e642073657420616e20612072657363756572206163636f756e747420666f722061206c6f7374206163636f756e74206469726563746c792e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f524f4f545f2e003020506172616d65746572733ab8202d20606c6f7374603a2054686520226c6f7374206163636f756e742220746f206265207265636f76657265642e1d01202d206072657363756572603a20546865202272657363756572206163636f756e74222077686963682063616e2063616c6c20617320746865206c6f7374206163636f756e742e002c2023203c7765696768743e64202d204f6e652073746f72616765207772697465204f28312930202d204f6e65206576656e74302023203c2f7765696768743e3c6372656174655f7265636f766572790c1c667269656e6473445665633c543a3a4163636f756e7449643e247468726573686f6c640c7531363064656c61795f706572696f6438543a3a426c6f636b4e756d6265726c5d01204372656174652061207265636f7665727920636f6e66696775726174696f6e20666f7220796f7572206163636f756e742e2054686973206d616b657320796f7572206163636f756e74207265636f76657261626c652e003101205061796d656e743a2060436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732062616c616e636549012077696c6c20626520726573657276656420666f722073746f72696e6720746865207265636f7665727920636f6e66696775726174696f6e2e2054686973206465706f7369742069732072657475726e6564bc20696e2066756c6c207768656e2074686520757365722063616c6c73206072656d6f76655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2501202d2060667269656e6473603a2041206c697374206f6620667269656e647320796f7520747275737420746f20766f75636820666f72207265636f7665727920617474656d7074732ed420202053686f756c64206265206f72646572656420616e6420636f6e7461696e206e6f206475706c69636174652076616c7565732e3101202d20607468726573686f6c64603a20546865206e756d626572206f6620667269656e64732074686174206d75737420766f75636820666f722061207265636f7665727920617474656d70741d012020206265666f726520746865206163636f756e742063616e206265207265636f76657265642e2053686f756c64206265206c657373207468616e206f7220657175616c20746f94202020746865206c656e677468206f6620746865206c697374206f6620667269656e64732e3d01202d206064656c61795f706572696f64603a20546865206e756d626572206f6620626c6f636b732061667465722061207265636f7665727920617474656d707420697320696e697469616c697a6564e820202074686174206e6565647320746f2070617373206265666f726520746865206163636f756e742063616e206265207265636f76657265642e002c2023203c7765696768743e68202d204b65793a204620286c656e206f6620667269656e6473292d01202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973206e6f7420616c7265616479207265636f76657261626c652e204f2831292eec202d204120636865636b20746861742074686520667269656e6473206c69737420697320736f7274656420616e6420756e697175652e204f2846299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f2858299c202d204f6e652073746f726167652077726974652e204f2831292e20436f646563204f2846292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e44696e6974696174655f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496458ec20496e697469617465207468652070726f6365737320666f72207265636f766572696e672061207265636f76657261626c65206163636f756e742e001d01205061796d656e743a20605265636f766572794465706f736974602062616c616e63652077696c6c20626520726573657276656420666f7220696e6974696174696e67207468652501207265636f766572792070726f636573732e2054686973206465706f7369742077696c6c20616c7761797320626520726570617472696174656420746f20746865206163636f756e74b820747279696e6720746f206265207265636f76657265642e205365652060636c6f73655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e2054686973206163636f756e7401012020206e6565647320746f206265207265636f76657261626c652028692e652e20686176652061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743ef8202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973207265636f76657261626c652e204f2846295101202d204f6e652073746f72616765207265616420746f20636865636b20746861742074686973207265636f766572792070726f63657373206861736e277420616c726561647920737461727465642e204f2831299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f285829e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831296c202d204f6e652073746f726167652077726974652e204f2831292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e38766f7563685f7265636f7665727908106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e74496464290120416c6c6f7720612022667269656e6422206f662061207265636f76657261626c65206163636f756e7420746f20766f75636820666f7220616e20616374697665207265636f76657279682070726f6365737320666f722074686174206163636f756e742e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d75737420626520612022667269656e64227420666f7220746865207265636f76657261626c65206163636f756e742e003020506172616d65746572733ad4202d20606c6f7374603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f2072657363756520746865206c6f7374206163636f756e74207468617420796f755420202077616e7420746f20766f75636820666f722e0025012054686520636f6d62696e6174696f6e206f662074686573652074776f20706172616d6574657273206d75737420706f696e7420746f20616e20616374697665207265636f76657279242070726f636573732e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629ec202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c6572206973206120667269656e642e204f286c6f6746291d01202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c657220686173206e6f7420616c726561647920766f75636865642e204f286c6f6756299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e00a420546f74616c20436f6d706c65786974793a204f2846202b206c6f6746202b2056202b206c6f675629302023203c2f7765696768743e38636c61696d5f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496450f420416c6c6f772061207375636365737366756c207265736375657220746f20636c61696d207468656972207265636f7665726564206163636f756e742e002d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061202272657363756572221d012077686f20686173207375636365737366756c6c7920636f6d706c6574656420746865206163636f756e74207265636f766572792070726f636573733a20636f6c6c6563746564310120607468726573686f6c6460206f72206d6f726520766f75636865732c20776169746564206064656c61795f706572696f646020626c6f636b732073696e636520696e6974696174696f6e2e003020506172616d65746572733a2d01202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f20636c61696d20686173206265656e207375636365737366756c6c79502020207265636f766572656420627920796f752e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205629302023203c2f7765696768743e38636c6f73655f7265636f76657279041c7265736375657230543a3a4163636f756e7449645015012041732074686520636f6e74726f6c6c6572206f662061207265636f76657261626c65206163636f756e742c20636c6f736520616e20616374697665207265636f76657279682070726f6365737320666f7220796f7572206163636f756e742e002101205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e2c20746865207265636f76657261626c65206163636f756e742077696c6c2072656365697665f820746865207265636f76657279206465706f73697420605265636f766572794465706f7369746020706c616365642062792074686520726573637565722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061f0207265636f76657261626c65206163636f756e74207769746820616e20616374697665207265636f766572792070726f6365737320666f722069742e003020506172616d65746572733a1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f207265736375652074686973207265636f76657261626c65206163636f756e742e002c2023203c7765696768743e84204b65793a205620286c656e206f6620766f756368696e6720667269656e6473293d01202d204f6e652073746f7261676520726561642f72656d6f766520746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629c0202d204f6e652062616c616e63652063616c6c20746f20726570617472696174652072657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2856202b205829302023203c2f7765696768743e3c72656d6f76655f7265636f7665727900545d012052656d6f766520746865207265636f766572792070726f6365737320666f7220796f7572206163636f756e742e205265636f7665726564206163636f756e747320617265207374696c6c2061636365737369626c652e001501204e4f54453a205468652075736572206d757374206d616b65207375726520746f2063616c6c2060636c6f73655f7265636f7665727960206f6e20616c6c206163746976650901207265636f7665727920617474656d707473206265666f72652063616c6c696e6720746869732066756e6374696f6e20656c73652069742077696c6c206661696c2e002501205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e20746865207265636f76657261626c65206163636f756e742077696c6c20756e7265736572766598207468656972207265636f7665727920636f6e66696775726174696f6e206465706f7369742ef4202860436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732900050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061e4207265636f76657261626c65206163636f756e742028692e652e206861732061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743e60204b65793a204620286c656e206f6620667269656e6473292901202d204f6e652073746f72616765207265616420746f206765742074686520707265666978206974657261746f7220666f7220616374697665207265636f7665726965732e204f2831293901202d204f6e652073746f7261676520726561642f72656d6f766520746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846299c202d204f6e652062616c616e63652063616c6c20746f20756e72657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e4063616e63656c5f7265636f7665726564041c6163636f756e7430543a3a4163636f756e7449642ce02043616e63656c20746865206162696c69747920746f20757365206061735f7265636f76657265646020666f7220606163636f756e74602e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a1901202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f75206172652061626c6520746f2063616c6c206f6e2d626568616c662d6f662e002c2023203c7765696768743e1101202d204f6e652073746f72616765206d75746174696f6e20746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e01183c5265636f766572794372656174656404244163636f756e74496404dc2041207265636f766572792070726f6365737320686173206265656e2073657420757020666f7220616e205c5b6163636f756e745c5d2e445265636f76657279496e6974696174656408244163636f756e744964244163636f756e744964082d012041207265636f766572792070726f6365737320686173206265656e20696e6974696174656420666f72206c6f7374206163636f756e742062792072657363756572206163636f756e742e48205c5b6c6f73742c20726573637565725c5d3c5265636f76657279566f75636865640c244163636f756e744964244163636f756e744964244163636f756e744964085d012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20766f756368656420666f722062792073656e6465722e68205c5b6c6f73742c20726573637565722c2073656e6465725c5d385265636f76657279436c6f73656408244163636f756e744964244163636f756e7449640821012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20636c6f7365642e48205c5b6c6f73742c20726573637565725c5d404163636f756e745265636f766572656408244163636f756e744964244163636f756e744964080501204c6f7374206163636f756e7420686173206265656e207375636365737366756c6c79207265636f76657265642062792072657363756572206163636f756e742e48205c5b6c6f73742c20726573637565725c5d3c5265636f7665727952656d6f76656404244163636f756e74496404e02041207265636f766572792070726f6365737320686173206265656e2072656d6f76656420666f7220616e205c5b6163636f756e745c5d2e1044436f6e6669674465706f736974426173653042616c616e63654f663c543e4000406352bfc60100000000000000000004550120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e4c467269656e644465706f736974466163746f723042616c616e63654f663c543e4000203d88792d000000000000000000000469012054686520616d6f756e74206f662063757272656e6379206e656564656420706572206164646974696f6e616c2075736572207768656e206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e284d6178467269656e64730c753136080900040d0120546865206d6178696d756d20616d6f756e74206f6620667269656e647320616c6c6f77656420696e2061207265636f7665727920636f6e66696775726174696f6e2e3c5265636f766572794465706f7369743042616c616e63654f663c543e4000406352bfc601000000000000000000041d0120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72207374617274696e672061207265636f766572792e40284e6f74416c6c6f77656404f42055736572206973206e6f7420616c6c6f77656420746f206d616b6520612063616c6c206f6e20626568616c66206f662074686973206163636f756e74345a65726f5468726573686f6c640490205468726573686f6c64206d7573742062652067726561746572207468616e207a65726f404e6f74456e6f756768467269656e647304d420467269656e6473206c697374206d7573742062652067726561746572207468616e207a65726f20616e64207468726573686f6c64284d6178467269656e647304ac20467269656e6473206c697374206d757374206265206c657373207468616e206d617820667269656e6473244e6f74536f7274656404cc20467269656e6473206c697374206d75737420626520736f7274656420616e642066726565206f66206475706c696361746573384e6f745265636f76657261626c6504a02054686973206163636f756e74206973206e6f742073657420757020666f72207265636f7665727948416c72656164795265636f76657261626c6504b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f7665727938416c72656164795374617274656404e02041207265636f766572792070726f636573732068617320616c7265616479207374617274656420666f722074686973206163636f756e74284e6f745374617274656404d02041207265636f766572792070726f6365737320686173206e6f74207374617274656420666f7220746869732072657363756572244e6f74467269656e6404ac2054686973206163636f756e74206973206e6f74206120667269656e642077686f2063616e20766f7563682c44656c6179506572696f64041d012054686520667269656e64206d757374207761697420756e74696c207468652064656c617920706572696f6420746f20766f75636820666f722074686973207265636f7665727938416c7265616479566f756368656404c0205468697320757365722068617320616c726561647920766f756368656420666f722074686973207265636f76657279245468726573686f6c6404ec20546865207468726573686f6c6420666f72207265636f766572696e672074686973206163636f756e7420686173206e6f74206265656e206d65742c5374696c6c41637469766504010120546865726520617265207374696c6c20616374697665207265636f7665727920617474656d7074732074686174206e65656420746f20626520636c6f736564204f766572666c6f77049c2054686572652077617320616e206f766572666c6f7720696e20612063616c63756c6174696f6e30416c726561647950726f787904b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f766572791a1c56657374696e67011c56657374696e67041c56657374696e6700010230543a3a4163636f756e744964a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e00040004d820496e666f726d6174696f6e20726567617264696e67207468652076657374696e67206f66206120676976656e206163636f756e742e011010766573740034bc20556e6c6f636b20616e79207665737465642066756e6473206f66207468652073656e646572206163636f756e742e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652066756e6473207374696c6c68206c6f636b656420756e6465722074686973206d6f64756c652e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20322052656164732c203220577269746573fc20202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d010120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d302023203c2f7765696768743e28766573745f6f7468657204187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653cbc20556e6c6f636b20616e79207665737465642066756e6473206f662061206074617267657460206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501202d2060746172676574603a20546865206163636f756e742077686f7365207665737465642066756e64732073686f756c6420626520756e6c6f636b65642e204d75737420686176652066756e6473207374696c6c68206c6f636b656420756e6465722074686973206d6f64756c652e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c203320577269746573f420202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e74f820202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e74302023203c2f7765696768743e3c7665737465645f7472616e7366657208187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e406820437265617465206120766573746564207472616e736665722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e001501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c2033205772697465733d0120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745d410120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745d302023203c2f7765696768743e54666f7263655f7665737465645f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e446420466f726365206120766573746564207472616e736665722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00ec202d2060736f75726365603a20546865206163636f756e742077686f73652066756e64732073686f756c64206265207472616e736665727265642e1501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20342052656164732c203420577269746573350120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74390120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74302023203c2f7765696768743e01083856657374696e675570646174656408244163636f756e7449641c42616c616e63650c59012054686520616d6f756e742076657374656420686173206265656e20757064617465642e205468697320636f756c6420696e646963617465206d6f72652066756e64732061726520617661696c61626c652e2054686519012062616c616e636520676976656e2069732074686520616d6f756e74207768696368206973206c65667420756e7665737465642028616e642074687573206c6f636b6564292e58205c5b6163636f756e742c20756e7665737465645c5d4056657374696e67436f6d706c6574656404244163636f756e744964041d0120416e205c5b6163636f756e745c5d20686173206265636f6d652066756c6c79207665737465642e204e6f20667572746865722076657374696e672063616e2068617070656e2e04444d696e5665737465645472616e736665723042616c616e63654f663c543e400000c16ff28623000000000000000000041d0120546865206d696e696d756d20616d6f756e7420746f206265207472616e7366657272656420746f206372656174652061206e65772076657374696e67207363686564756c652e0c284e6f7456657374696e67048820546865206163636f756e7420676976656e206973206e6f742076657374696e672e5c4578697374696e6756657374696e675363686564756c65045d0120416e206578697374696e672076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e7420746861742063616e6e6f7420626520636c6f6262657265642e24416d6f756e744c6f7704090120416d6f756e74206265696e67207472616e7366657272656420697320746f6f206c6f7720746f2063726561746520612076657374696e67207363686564756c652e1b245363686564756c657201245363686564756c65720c184167656e646101010538543a3a426c6f636b4e756d62657271015665633c4f7074696f6e3c5363686564756c65643c3c5420617320436f6e6669673e3a3a43616c6c2c20543a3a426c6f636b4e756d6265722c20543a3a0a50616c6c6574734f726967696e2c20543a3a4163636f756e7449643e3e3e000400044d01204974656d7320746f2062652065786563757465642c20696e64657865642062792074686520626c6f636b206e756d626572207468617420746865792073686f756c64206265206578656375746564206f6e2e184c6f6f6b75700001051c5665633c75383e6c5461736b416464726573733c543a3a426c6f636b4e756d6265723e000400040101204c6f6f6b75702066726f6d206964656e7469747920746f2074686520626c6f636b206e756d62657220616e6420696e646578206f6620746865207461736b2e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e0118207363686564756c6510107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e287420416e6f6e796d6f75736c79207363686564756c652061207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7390202d2042617365205765696768743a2032322e3239202b202e313236202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64615020202020202d2057726974653a204167656e64613d01202d2057696c6c20757365206261736520776569676874206f662032352077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e1863616e63656c08107768656e38543a3a426c6f636b4e756d62657214696e6465780c75333228982043616e63656c20616e20616e6f6e796d6f75736c79207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032322e3135202b20322e383639202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64617020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f6e616d6564140869641c5665633c75383e107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e285c205363686564756c652061206e616d6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c738c202d2042617365205765696768743a2032392e36202b202e313539202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704d01202d2057696c6c20757365206261736520776569676874206f662033352077686963682073686f756c6420626520676f6f6420666f72206d6f7265207468616e203330207363686564756c65642063616c6c73302023203c2f7765696768743e3063616e63656c5f6e616d6564040869641c5665633c75383e287c2043616e63656c2061206e616d6564207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032342e3931202b20322e393037202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f61667465721014616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e14ac20416e6f6e796d6f75736c79207363686564756c652061207461736b20616674657220612064656c61792e002c2023203c7765696768743e582053616d65206173205b607363686564756c65605d2e302023203c2f7765696768743e507363686564756c655f6e616d65645f6166746572140869641c5665633c75383e14616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e1494205363686564756c652061206e616d6564207461736b20616674657220612064656c61792e002c2023203c7765696768743e702053616d65206173205b607363686564756c655f6e616d6564605d2e302023203c2f7765696768743e010c245363686564756c6564082c426c6f636b4e756d6265720c7533320494205363686564756c656420736f6d65207461736b2e205c5b7768656e2c20696e6465785c5d2043616e63656c6564082c426c6f636b4e756d6265720c75333204902043616e63656c656420736f6d65207461736b2e205c5b7768656e2c20696e6465785c5d28446973706174636865640c605461736b416464726573733c426c6f636b4e756d6265723e3c4f7074696f6e3c5665633c75383e3e384469737061746368526573756c7404ac204469737061746368656420736f6d65207461736b2e205c5b7461736b2c2069642c20726573756c745c5d0010404661696c6564546f5363686564756c650468204661696c656420746f207363686564756c6520612063616c6c204e6f74466f756e6404802043616e6e6f742066696e6420746865207363686564756c65642063616c6c2e5c546172676574426c6f636b4e756d626572496e5061737404a820476976656e2074617267657420626c6f636b206e756d62657220697320696e2074686520706173742e4852657363686564756c654e6f4368616e676504f42052657363686564756c65206661696c6564206265636175736520697420646f6573206e6f74206368616e6765207363686564756c65642074696d652e1c1450726f7879011450726f7879081c50726f7869657301010530543a3a4163636f756e7449644501285665633c50726f7879446566696e6974696f6e3c543a3a4163636f756e7449642c20543a3a50726f7879547970652c20543a3a426c6f636b4e756d6265723e3e2c0a2042616c616e63654f663c543e29004400000000000000000000000000000000000845012054686520736574206f66206163636f756e742070726f786965732e204d61707320746865206163636f756e74207768696368206861732064656c65676174656420746f20746865206163636f756e7473210120776869636820617265206265696e672064656c65676174656420746f2c20746f67657468657220776974682074686520616d6f756e742068656c64206f6e206465706f7369742e34416e6e6f756e63656d656e747301010530543a3a4163636f756e7449643d01285665633c416e6e6f756e63656d656e743c543a3a4163636f756e7449642c2043616c6c486173684f663c543e2c20543a3a426c6f636b4e756d6265723e3e2c0a2042616c616e63654f663c543e290044000000000000000000000000000000000004ac2054686520616e6e6f756e63656d656e7473206d616465206279207468652070726f787920286b6579292e01281470726f78790c107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e3c51012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f726973656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e246164645f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d62657234490120526567697374657220612070726f7879206163636f756e7420666f72207468652073656e64657220746861742069732061626c6520746f206d616b652063616c6c73206f6e2069747320626568616c662e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f206d616b6520612070726f78792e0101202d206070726f78795f74797065603a20546865207065726d697373696f6e7320616c6c6f77656420666f7220746869732070726f7879206163636f756e742e5101202d206064656c6179603a2054686520616e6e6f756e63656d656e7420706572696f64207265717569726564206f662074686520696e697469616c2070726f78792e2057696c6c2067656e6572616c6c7920626518207a65726f2e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3072656d6f76655f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d6265722cac20556e726567697374657220612070726f7879206163636f756e7420666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2901202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f2072656d6f766520617320612070726f78792e4501202d206070726f78795f74797065603a20546865207065726d697373696f6e732063757272656e746c7920656e61626c656420666f72207468652072656d6f7665642070726f7879206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3872656d6f76655f70726f786965730028b820556e726567697374657220616c6c2070726f7879206163636f756e747320666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901205741524e494e473a2054686973206d61792062652063616c6c6564206f6e206163636f756e747320637265617465642062792060616e6f6e796d6f7573602c20686f776576657220696620646f6e652c207468656e5d012074686520756e726573657276656420666565732077696c6c20626520696e61636365737369626c652e202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e24616e6f6e796d6f75730c2870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d62657214696e6465780c7531365c3d0120537061776e2061206672657368206e6577206163636f756e7420746861742069732067756172616e7465656420746f206265206f746865727769736520696e61636365737369626c652c20616e64010120696e697469616c697a65206974207769746820612070726f7879206f66206070726f78795f747970656020666f7220606f726967696e602073656e6465722e0070205265717569726573206120605369676e656460206f726967696e2e005501202d206070726f78795f74797065603a205468652074797065206f66207468652070726f78792074686174207468652073656e6465722077696c6c2062652072656769737465726564206173206f766572207468655101206e6577206163636f756e742e20546869732077696c6c20616c6d6f737420616c7761797320626520746865206d6f7374207065726d697373697665206050726f7879547970656020706f737369626c6520746f7c20616c6c6f7720666f72206d6178696d756d20666c65786962696c6974792e5501202d2060696e646578603a204120646973616d626967756174696f6e20696e6465782c20696e206361736520746869732069732063616c6c6564206d756c7469706c652074696d657320696e207468652073616d656101207472616e73616374696f6e2028652e672e207769746820607574696c6974793a3a626174636860292e20556e6c65737320796f75277265207573696e67206062617463686020796f752070726f6261626c79206a757374442077616e7420746f20757365206030602e5101202d206064656c6179603a2054686520616e6e6f756e63656d656e7420706572696f64207265717569726564206f662074686520696e697469616c2070726f78792e2057696c6c2067656e6572616c6c7920626518207a65726f2e005501204661696c73207769746820604475706c69636174656020696620746869732068617320616c7265616479206265656e2063616c6c656420696e2074686973207472616e73616374696f6e2c2066726f6d207468659c2073616d652073656e6465722c2077697468207468652073616d6520706172616d65746572732e00e8204661696c732069662074686572652061726520696e73756666696369656e742066756e647320746f2070617920666f72206465706f7369742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e9020544f444f3a204d69676874206265206f76657220636f756e74696e6720312072656164386b696c6c5f616e6f6e796d6f7573141c737061776e657230543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f78795479706514696e6465780c753136186865696768745c436f6d706163743c543a3a426c6f636b4e756d6265723e246578745f696e64657830436f6d706163743c7533323e50b82052656d6f76657320612070726576696f75736c7920737061776e656420616e6f6e796d6f75732070726f78792e004d01205741524e494e473a202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a20416e792066756e64732068656c6420696e2069742077696c6c2062653820696e61636365737369626c652e005d01205265717569726573206120605369676e656460206f726967696e2c20616e64207468652073656e646572206163636f756e74206d7573742068617665206265656e206372656174656420627920612063616c6c20746fac2060616e6f6e796d6f757360207769746820636f72726573706f6e64696e6720706172616d65746572732e005101202d2060737061776e6572603a20546865206163636f756e742074686174206f726967696e616c6c792063616c6c65642060616e6f6e796d6f75736020746f206372656174652074686973206163636f756e742e5101202d2060696e646578603a2054686520646973616d626967756174696f6e20696e646578206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e2050726f6261626c79206030602e0501202d206070726f78795f74797065603a205468652070726f78792074797065206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e4101202d2060686569676874603a2054686520686569676874206f662074686520636861696e207768656e207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e4d01202d20606578745f696e646578603a205468652065787472696e73696320696e64657820696e207768696368207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e004d01204661696c73207769746820604e6f5065726d697373696f6e6020696e2063617365207468652063616c6c6572206973206e6f7420612070726576696f75736c79206372656174656420616e6f6e796d6f7573f4206163636f756e742077686f73652060616e6f6e796d6f7573602063616c6c2068617320636f72726573706f6e64696e6720706172616d65746572732e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e20616e6e6f756e636508107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e540901205075626c697368207468652068617368206f6620612070726f78792d63616c6c20746861742077696c6c206265206d61646520696e20746865206675747572652e0061012054686973206d7573742062652063616c6c656420736f6d65206e756d626572206f6620626c6f636b73206265666f72652074686520636f72726573706f6e64696e67206070726f78796020697320617474656d707465642901206966207468652064656c6179206173736f6369617465642077697468207468652070726f78792072656c6174696f6e736869702069732067726561746572207468616e207a65726f2e001501204e6f206d6f7265207468616e20604d617850656e64696e676020616e6e6f756e63656d656e7473206d6179206265206d61646520617420616e79206f6e652074696d652e000d0120546869732077696c6c2074616b652061206465706f736974206f662060416e6e6f756e63656d656e744465706f736974466163746f72602061732077656c6c2061731d012060416e6e6f756e63656d656e744465706f736974426173656020696620746865726520617265206e6f206f746865722070656e64696e6720616e6e6f756e63656d656e74732e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420612070726f7879206f6620607265616c602e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656d6f76655f616e6e6f756e63656d656e7408107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40742052656d6f7665206120676976656e20616e6e6f756e63656d656e742e005d01204d61792062652063616c6c656420627920612070726f7879206163636f756e7420746f2072656d6f766520612063616c6c20746865792070726576696f75736c7920616e6e6f756e63656420616e642072657475726e3420746865206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656a6563745f616e6e6f756e63656d656e74082064656c656761746530543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40b42052656d6f76652074686520676976656e20616e6e6f756e63656d656e74206f6620612064656c65676174652e006501204d61792062652063616c6c6564206279206120746172676574202870726f7869656429206163636f756e7420746f2072656d6f766520612063616c6c2074686174206f6e65206f662074686569722064656c656761746573290120286064656c656761746560292068617320616e6e6f756e63656420746865792077616e7420746f20657865637574652e20546865206465706f7369742069732072657475726e65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733af8202d206064656c6567617465603a20546865206163636f756e7420746861742070726576696f75736c7920616e6e6f756e636564207468652063616c6c2ec0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e3c70726f78795f616e6e6f756e636564102064656c656761746530543a3a4163636f756e744964107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e4451012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f726973656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e010c3450726f7879457865637574656404384469737061746368526573756c7404ec20412070726f78792077617320657865637574656420636f72726563746c792c20776974682074686520676976656e205c5b726573756c745c5d2e40416e6f6e796d6f75734372656174656410244163636f756e744964244163636f756e7449642450726f7879547970650c75313608ec20416e6f6e796d6f7573206163636f756e7420686173206265656e2063726561746564206279206e65772070726f7879207769746820676976656e690120646973616d626967756174696f6e20696e64657820616e642070726f787920747970652e205c5b616e6f6e796d6f75732c2077686f2c2070726f78795f747970652c20646973616d626967756174696f6e5f696e6465785c5d24416e6e6f756e6365640c244163636f756e744964244163636f756e744964104861736804510120416e20616e6e6f756e63656d656e742077617320706c6163656420746f206d616b6520612063616c6c20696e20746865206675747572652e205c5b7265616c2c2070726f78792c2063616c6c5f686173685c5d184050726f78794465706f736974426173653042616c616e63654f663c543e4000f09e544c390000000000000000000004110120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e6720612070726f78792e4850726f78794465706f736974466163746f723042616c616e63654f663c543e400060aa7714b40000000000000000000004bc2054686520616d6f756e74206f662063757272656e6379206e6565646564207065722070726f78792061646465642e284d617850726f786965730c75313608200004f020546865206d6178696d756d20616d6f756e74206f662070726f7869657320616c6c6f77656420666f7220612073696e676c65206163636f756e742e284d617850656e64696e670c7533321020000000047820604d617850656e64696e6760206d6574616461746120736861646f772e5c416e6e6f756e63656d656e744465706f736974426173653042616c616e63654f663c543e4000f09e544c390000000000000000000004ac2060416e6e6f756e63656d656e744465706f7369744261736560206d6574616461746120736861646f772e64416e6e6f756e63656d656e744465706f736974466163746f723042616c616e63654f663c543e4000c054ef28680100000000000000000004b42060416e6e6f756e63656d656e744465706f736974466163746f7260206d6574616461746120736861646f772e1c1c546f6f4d616e790425012054686572652061726520746f6f206d616e792070726f786965732072656769737465726564206f7220746f6f206d616e7920616e6e6f756e63656d656e74732070656e64696e672e204e6f74466f756e6404782050726f787920726567697374726174696f6e206e6f7420666f756e642e204e6f7450726f787904d02053656e646572206973206e6f7420612070726f7879206f6620746865206163636f756e7420746f2062652070726f786965642e2c556e70726f787961626c6504250120412063616c6c20776869636820697320696e636f6d70617469626c652077697468207468652070726f7879207479706527732066696c7465722077617320617474656d707465642e244475706c69636174650470204163636f756e7420697320616c726561647920612070726f78792e304e6f5065726d697373696f6e0419012043616c6c206d6179206e6f74206265206d6164652062792070726f78792062656361757365206974206d617920657363616c617465206974732070726976696c656765732e2c556e616e6e6f756e63656404d420416e6e6f756e63656d656e742c206966206d61646520617420616c6c2c20776173206d61646520746f6f20726563656e746c792e1d204d756c746973696701204d756c746973696708244d756c74697369677300020530543a3a4163636f756e744964205b75383b2033325dd04d756c74697369673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e02040004942054686520736574206f66206f70656e206d756c7469736967206f7065726174696f6e732e1443616c6c73000106205b75383b2033325da0284f706171756543616c6c2c20543a3a4163636f756e7449642c2042616c616e63654f663c543e290004000001105061735f6d756c74695f7468726573686f6c645f3108446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e40550120496d6d6564696174656c792064697370617463682061206d756c74692d7369676e61747572652063616c6c207573696e6720612073696e676c6520617070726f76616c2066726f6d207468652063616c6c65722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e004101202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f206172652070617274206f66207468650501206d756c74692d7369676e61747572652c2062757420646f206e6f7420706172746963697061746520696e2074686520617070726f76616c2070726f636573732e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e00bc20526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c742e002c2023203c7765696768743e1d01204f285a202b204329207768657265205a20697320746865206c656e677468206f66207468652063616c6c20616e6420432069747320657865637574696f6e207765696768742e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d48202d204442205765696768743a204e6f6e654c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e2061735f6d756c746918247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e1063616c6c284f706171756543616c6c2873746f72655f63616c6c10626f6f6c286d61785f77656967687418576569676874b8590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e00b42049662074686572652061726520656e6f7567682c207468656e206469737061746368207468652063616c6c2e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e002101204e4f54453a20556e6c6573732074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2067656e6572616c6c792077616e7420746f207573651d012060617070726f76655f61735f6d756c74696020696e73746561642c2073696e6365206974206f6e6c7920726571756972657320612068617368206f66207468652063616c6c2e005d0120526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c7420696620607468726573686f6c64602069732065786163746c79206031602e204f74686572776973655901206f6e20737563636573732c20726573756c7420697320604f6b6020616e642074686520726573756c742066726f6d2074686520696e746572696f722063616c6c2c206966206974207761732065786563757465642ce0206d617920626520666f756e6420696e20746865206465706f736974656420604d756c7469736967457865637574656460206576656e742e002c2023203c7765696768743e54202d20604f2853202b205a202b2043616c6c29602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2e2501202d204f6e652063616c6c20656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285a296020776865726520605a602069732074782d6c656e2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e70202d2054686520776569676874206f6620746865206063616c6c602e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a250120202020202d2052656164733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c6029290120202020202d205772697465733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c60294c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e40617070726f76655f61735f6d756c746914247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e2463616c6c5f68617368205b75383b2033325d286d61785f7765696768741857656967687490590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e003901204e4f54453a2049662074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2077616e7420746f20757365206061735f6d756c74696020696e73746561642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743abc20202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745dc020202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d302023203c2f7765696768743e3c63616e63656c5f61735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e2474696d65706f696e746454696d65706f696e743c543a3a426c6f636b4e756d6265723e2463616c6c5f68617368205b75383b2033325d6859012043616e63656c2061207072652d6578697374696e672c206f6e2d676f696e67206d756c7469736967207472616e73616374696f6e2e20416e79206465706f7369742072657365727665642070726576696f75736c79c820666f722074686973206f7065726174696f6e2077696c6c20626520756e7265736572766564206f6e20737563636573732e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e6101202d206074696d65706f696e74603a205468652074696d65706f696e742028626c6f636b206e756d62657220616e64207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c7c207472616e73616374696f6e20666f7220746869732064697370617463682ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602e34202d204f6e65206576656e742e88202d20492f4f3a2031207265616420604f285329602c206f6e652072656d6f76652e74202d2053746f726167653a2072656d6f766573206f6e65206974656d2e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a190120202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c731d0120202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c73302023203c2f7765696768743e01102c4e65774d756c74697369670c244163636f756e744964244163636f756e7449642043616c6c48617368041d012041206e6577206d756c7469736967206f7065726174696f6e2068617320626567756e2e205c5b617070726f76696e672c206d756c74697369672c2063616c6c5f686173685c5d404d756c7469736967417070726f76616c10244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c4861736808cc2041206d756c7469736967206f7065726174696f6e20686173206265656e20617070726f76656420627920736f6d656f6e652eb8205c5b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d404d756c7469736967457865637574656414244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c48617368384469737061746368526573756c740459012041206d756c7469736967206f7065726174696f6e20686173206265656e2065786563757465642e205c5b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d444d756c746973696743616e63656c6c656410244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c486173680461012041206d756c7469736967206f7065726174696f6e20686173206265656e2063616e63656c6c65642e205c5b63616e63656c6c696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d0c2c4465706f736974426173653042616c616e63654f663c543e4000f01c0adbed0100000000000000000008710120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061206d756c746973696720657865637574696f6e206f7220746f2073746f72656c20612064697370617463682063616c6c20666f72206c617465722e344465706f736974466163746f723042616c616e63654f663c543e400000cc7b9fae000000000000000000000455012054686520616d6f756e74206f662063757272656e6379206e65656465642070657220756e6974207468726573686f6c64207768656e206372656174696e672061206d756c746973696720657865637574696f6e2e384d61785369676e61746f726965730c75313608640004010120546865206d6178696d756d20616d6f756e74206f66207369676e61746f7269657320616c6c6f77656420666f72206120676976656e206d756c74697369672e38404d696e696d756d5468726573686f6c640480205468726573686f6c64206d7573742062652032206f7220677265617465722e3c416c7265616479417070726f76656404b02043616c6c20697320616c726561647920617070726f7665642062792074686973207369676e61746f72792e444e6f417070726f76616c734e656564656404a02043616c6c20646f65736e2774206e65656420616e7920286d6f72652920617070726f76616c732e44546f6f4665775369676e61746f7269657304ac2054686572652061726520746f6f20666577207369676e61746f7269657320696e20746865206c6973742e48546f6f4d616e795369676e61746f7269657304b02054686572652061726520746f6f206d616e79207369676e61746f7269657320696e20746865206c6973742e545369676e61746f726965734f75744f664f7264657204110120546865207369676e61746f7269657320776572652070726f7669646564206f7574206f66206f726465723b20746865792073686f756c64206265206f7264657265642e4c53656e646572496e5369676e61746f72696573041101205468652073656e6465722077617320636f6e7461696e656420696e20746865206f74686572207369676e61746f726965733b2069742073686f756c646e27742062652e204e6f74466f756e6404e0204d756c7469736967206f7065726174696f6e206e6f7420666f756e64207768656e20617474656d7074696e6720746f2063616e63656c2e204e6f744f776e6572043101204f6e6c7920746865206163636f756e742074686174206f726967696e616c6c79206372656174656420746865206d756c74697369672069732061626c6520746f2063616e63656c2069742e2c4e6f54696d65706f696e74042101204e6f2074696d65706f696e742077617320676976656e2c2079657420746865206d756c7469736967206f7065726174696f6e20697320616c726561647920756e6465727761792e3857726f6e6754696d65706f696e74043101204120646966666572656e742074696d65706f696e742077617320676976656e20746f20746865206d756c7469736967206f7065726174696f6e207468617420697320756e6465727761792e4c556e657870656374656454696d65706f696e7404f820412074696d65706f696e742077617320676976656e2c20796574206e6f206d756c7469736967206f7065726174696f6e20697320756e6465727761792e30576569676874546f6f4c6f7704d420546865206d6178696d756d2077656967687420696e666f726d6174696f6e2070726f76696465642077617320746f6f206c6f772e34416c726561647953746f72656404a420546865206461746120746f2062652073746f72656420697320616c72656164792073746f7265642e1e20426f756e7469657301205472656173757279102c426f756e7479436f756e7401002c426f756e7479496e646578100000000004c0204e756d626572206f6620626f756e74792070726f706f73616c7320746861742068617665206265656e206d6164652e20426f756e746965730001052c426f756e7479496e646578c8426f756e74793c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e000400047820426f756e7469657320746861742068617665206265656e206d6164652e48426f756e74794465736372697074696f6e730001052c426f756e7479496e6465781c5665633c75383e000400048020546865206465736372697074696f6e206f66206561636820626f756e74792e3c426f756e7479417070726f76616c730100405665633c426f756e7479496e6465783e040004ec20426f756e747920696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f74207965742066756e6465642e01243870726f706f73655f626f756e7479081476616c756554436f6d706163743c42616c616e63654f663c543e3e2c6465736372697074696f6e1c5665633c75383e30582050726f706f73652061206e657720626f756e74792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c20617355012060446174614465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e2049742077696c6c20626520756e72657365727665642075706f6e20617070726f76616c2c68206f7220736c6173686564207768656e2072656a65637465642e00fc202d206063757261746f72603a205468652063757261746f72206163636f756e742077686f6d2077696c6c206d616e616765207468697320626f756e74792e68202d2060666565603a205468652063757261746f72206665652e2901202d206076616c7565603a2054686520746f74616c207061796d656e7420616d6f756e74206f66207468697320626f756e74792c2063757261746f722066656520696e636c756465642ec4202d20606465736372697074696f6e603a20546865206465736372697074696f6e206f66207468697320626f756e74792e38617070726f76655f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e20610120417070726f7665206120626f756e74792070726f706f73616c2e2041742061206c617465722074696d652c2074686520626f756e74792077696c6c2062652066756e64656420616e64206265636f6d6520616374697665ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e3c70726f706f73655f63757261746f720c24626f756e74795f696450436f6d706163743c426f756e7479496e6465783e1c63757261746f728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c66656554436f6d706163743c42616c616e63654f663c543e3e1c942041737369676e20612063757261746f7220746f20612066756e64656420626f756e74792e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e40756e61737369676e5f63757261746f720424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e488020556e61737369676e2063757261746f722066726f6d206120626f756e74792e00210120546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206052656a6563744f726967696e602061207369676e6564206f726967696e2e00690120496620746869732066756e6374696f6e2069732063616c6c656420627920746865206052656a6563744f726967696e602c20776520617373756d652074686174207468652063757261746f72206973206d616c6963696f75730d01206f7220696e6163746976652e204173206120726573756c742c2077652077696c6c20736c617368207468652063757261746f72207768656e20706f737369626c652e00650120496620746865206f726967696e206973207468652063757261746f722c2077652074616b6520746869732061732061207369676e20746865792061726520756e61626c6520746f20646f207468656972206a6f6220616e64610120746865792077696c6c696e676c7920676976652075702e20576520636f756c6420736c617368207468656d2c2062757420666f72206e6f7720776520616c6c6f77207468656d20746f207265636f7665722074686569723901206465706f73697420616e64206578697420776974686f75742069737375652e20285765206d61792077616e7420746f206368616e67652074686973206966206974206973206162757365642e290061012046696e616c6c792c20746865206f726967696e2063616e20626520616e796f6e6520696620616e64206f6e6c79206966207468652063757261746f722069732022696e616374697665222e205468697320616c6c6f7773650120616e796f6e6520696e2074686520636f6d6d756e69747920746f2063616c6c206f7574207468617420612063757261746f72206973206e6f7420646f696e67207468656972206475652064696c6967656e63652c20616e643d012077652073686f756c64207069636b2061206e65772063757261746f722e20496e20746869732063617365207468652063757261746f722073686f756c6420616c736f20626520736c61736865642e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e386163636570745f63757261746f720424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e209820416363657074207468652063757261746f7220726f6c6520666f72206120626f756e74792e2d012041206465706f7369742077696c6c2062652072657365727665642066726f6d2063757261746f7220616e6420726566756e642075706f6e207375636365737366756c207061796f75742e0094204d6179206f6e6c792062652063616c6c65642066726f6d207468652063757261746f722e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e3061776172645f626f756e74790824626f756e74795f696450436f6d706163743c426f756e7479496e6465783e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528990120417761726420626f756e747920746f20612062656e6566696369617279206163636f756e742e205468652062656e65666963696172792077696c6c2062652061626c6520746f20636c61696d207468652066756e647320616674657220612064656c61792e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652063757261746f72206f66207468697320626f756e74792e008c202d2060626f756e74795f6964603a20426f756e747920494420746f2061776172642e1d01202d206062656e6566696369617279603a205468652062656e6566696369617279206163636f756e742077686f6d2077696c6c207265636569766520746865207061796f75742e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e30636c61696d5f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e24f020436c61696d20746865207061796f75742066726f6d20616e206177617264656420626f756e7479206166746572207061796f75742064656c61792e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652062656e6566696369617279206f66207468697320626f756e74792e008c202d2060626f756e74795f6964603a20426f756e747920494420746f20636c61696d2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e30636c6f73655f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e283d012043616e63656c20612070726f706f736564206f722061637469766520626f756e74792e20416c6c207468652066756e64732077696c6c2062652073656e7420746f20747265617375727920616e64d0207468652063757261746f72206465706f7369742077696c6c20626520756e726573657276656420696620706f737369626c652e00cc204f6e6c792060543a3a52656a6563744f726967696e602069732061626c6520746f2063616e63656c206120626f756e74792e0090202d2060626f756e74795f6964603a20426f756e747920494420746f2063616e63656c2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e50657874656e645f626f756e74795f6578706972790824626f756e74795f696450436f6d706163743c426f756e7479496e6465783e1c5f72656d61726b1c5665633c75383e28b020457874656e6420746865206578706972792074696d65206f6620616e2061637469766520626f756e74792e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652063757261746f72206f66207468697320626f756e74792e0090202d2060626f756e74795f6964603a20426f756e747920494420746f20657874656e642e90202d206072656d61726b603a206164646974696f6e616c20696e666f726d6174696f6e2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e011c38426f756e747950726f706f736564042c426f756e7479496e646578047c204e657720626f756e74792070726f706f73616c2e205c5b696e6465785c5d38426f756e747952656a6563746564082c426f756e7479496e6465781c42616c616e6365041101204120626f756e74792070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e205c5b696e6465782c20626f6e645c5d48426f756e7479426563616d65416374697665042c426f756e7479496e64657804e4204120626f756e74792070726f706f73616c2069732066756e64656420616e6420626563616d65206163746976652e205c5b696e6465785c5d34426f756e747941776172646564082c426f756e7479496e646578244163636f756e74496404f4204120626f756e7479206973206177617264656420746f20612062656e65666963696172792e205c5b696e6465782c2062656e65666963696172795c5d34426f756e7479436c61696d65640c2c426f756e7479496e6465781c42616c616e6365244163636f756e744964040d01204120626f756e747920697320636c61696d65642062792062656e65666963696172792e205c5b696e6465782c207061796f75742c2062656e65666963696172795c5d38426f756e747943616e63656c6564042c426f756e7479496e6465780484204120626f756e74792069732063616e63656c6c65642e205c5b696e6465785c5d38426f756e7479457874656e646564042c426f756e7479496e646578049c204120626f756e74792065787069727920697320657874656e6465642e205c5b696e6465785c5d1848446174614465706f736974506572427974653042616c616e63654f663c543e400010a5d4e8000000000000000000000004fc2054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e20626f756e7479206465736372697074696f6e2e44426f756e74794465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004e82054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120626f756e74792070726f706f73616c2e60426f756e74794465706f7369745061796f757444656c617938543a3a426c6f636b4e756d6265721080700000045901205468652064656c617920706572696f6420666f72207768696368206120626f756e74792062656e6566696369617279206e65656420746f2077616974206265666f726520636c61696d20746865207061796f75742e50426f756e747943757261746f724465706f7369741c5065726d696c6c1020a10700046d012050657263656e74616765206f66207468652063757261746f722066656520746861742077696c6c20626520726573657276656420757066726f6e74206173206465706f73697420666f7220626f756e74792063757261746f722e48426f756e747956616c75654d696e696d756d3042616c616e63654f663c543e4000406352bfc6010000000000000000000470204d696e696d756d2076616c756520666f72206120626f756e74792e4c4d6178696d756d526561736f6e4c656e6774680c75333210004000000488204d6178696d756d2061636365707461626c6520726561736f6e206c656e6774682e2470496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e30496e76616c6964496e6465780494204e6f2070726f706f73616c206f7220626f756e7479206174207468617420696e6465782e30526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e40556e657870656374656453746174757304842054686520626f756e74792073746174757320697320756e65787065637465642e385265717569726543757261746f720460205265717569726520626f756e74792063757261746f722e30496e76616c696456616c7565045820496e76616c696420626f756e74792076616c75652e28496e76616c6964466565045020496e76616c696420626f756e7479206665652e3450656e64696e675061796f75740870204120626f756e7479207061796f75742069732070656e64696e672efc20546f2063616e63656c2074686520626f756e74792c20796f75206d75737420756e61737369676e20616e6420736c617368207468652063757261746f722e245072656d61747572650449012054686520626f756e746965732063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e1f1054697073012054726561737572790810546970730001051c543a3a48617368f04f70656e5469703c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265722c20543a3a486173683e0004000c650120546970734d6170207468617420617265206e6f742079657420636f6d706c657465642e204b65796564206279207468652068617368206f66206028726561736f6e2c2077686f29602066726f6d207468652076616c75652e3d012054686973206861732074686520696e73656375726520656e756d657261626c6520686173682066756e6374696f6e2073696e636520746865206b657920697473656c6620697320616c7265616479802067756172616e7465656420746f20626520612073656375726520686173682e1c526561736f6e730001061c543a3a486173681c5665633c75383e0004000849012053696d706c6520707265696d616765206c6f6f6b75702066726f6d2074686520726561736f6e2773206861736820746f20746865206f726967696e616c20646174612e20416761696e2c2068617320616e610120696e73656375726520656e756d657261626c6520686173682073696e636520746865206b65792069732067756172616e7465656420746f2062652074686520726573756c74206f6620612073656375726520686173682e0114387265706f72745f617765736f6d650818726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e7449644c5d01205265706f727420736f6d657468696e672060726561736f6e60207468617420646573657276657320612074697020616e6420636c61696d20616e79206576656e7475616c207468652066696e6465722773206665652e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c206173c02060446174614465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743ecc202d20436f6d706c65786974793a20604f2852296020776865726520605260206c656e677468206f662060726561736f6e602e942020202d20656e636f64696e6720616e642068617368696e67206f662027726561736f6e2774202d20446252656164733a2060526561736f6e73602c2060546970736078202d2044625772697465733a2060526561736f6e73602c20605469707360302023203c2f7765696768743e2c726574726163745f7469700410686173681c543a3a486173684c550120526574726163742061207072696f72207469702d7265706f72742066726f6d20607265706f72745f617765736f6d65602c20616e642063616e63656c207468652070726f63657373206f662074697070696e672e00e0204966207375636365737366756c2c20746865206f726967696e616c206465706f7369742077696c6c20626520756e72657365727665642e00510120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642074686520746970206964656e746966696564206279206068617368604501206d7573742068617665206265656e207265706f7274656420627920746865207369676e696e67206163636f756e74207468726f75676820607265706f72745f617765736f6d65602028616e64206e6f7450207468726f75676820607469705f6e657760292e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e009020456d697473206054697052657472616374656460206966207375636365737366756c2e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960dc2020202d20446570656e6473206f6e20746865206c656e677468206f662060543a3a48617368602077686963682069732066697865642e90202d20446252656164733a206054697073602c20606f726967696e206163636f756e7460c0202d2044625772697465733a2060526561736f6e73602c206054697073602c20606f726967696e206163636f756e7460302023203c2f7765696768743e1c7469705f6e65770c18726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e744964247469705f76616c756554436f6d706163743c42616c616e63654f663c543e3e58f4204769766520612074697020666f7220736f6d657468696e67206e65773b206e6f2066696e6465722773206665652077696c6c2062652074616b656e2e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743e5501202d20436f6d706c65786974793a20604f2852202b2054296020776865726520605260206c656e677468206f662060726561736f6e602c2060546020697320746865206e756d626572206f6620746970706572732ec02020202d20604f285429603a206465636f64696e6720605469707065726020766563206f66206c656e6774682060546009012020202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e0d0120202020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602ee42020202d20604f285229603a2068617368696e6720616e6420656e636f64696e67206f6620726561736f6e206f66206c656e6774682060526080202d20446252656164733a206054697070657273602c2060526561736f6e736078202d2044625772697465733a2060526561736f6e73602c20605469707360302023203c2f7765696768743e0c7469700810686173681c543a3a48617368247469705f76616c756554436f6d706163743c42616c616e63654f663c543e3e64b4204465636c6172652061207469702076616c756520666f7220616e20616c72656164792d6f70656e207469702e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f66207468652068617368206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279382020206163636f756e742049442e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e00650120456d6974732060546970436c6f73696e676020696620746865207468726573686f6c64206f66207469707065727320686173206265656e207265616368656420616e642074686520636f756e74646f776e20706572696f64342068617320737461727465642e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e15012020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602c20696e736572742074697020616e6420636865636b20636c6f73696e672c0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602e00610120202041637475616c6c792077656967687420636f756c64206265206c6f77657220617320697420646570656e6473206f6e20686f77206d616e7920746970732061726520696e20604f70656e5469706020627574206974d4202020697320776569676874656420617320696620616c6d6f73742066756c6c20692e65206f66206c656e6774682060542d31602e74202d20446252656164733a206054697070657273602c206054697073604c202d2044625772697465733a20605469707360302023203c2f7765696768743e24636c6f73655f7469700410686173681c543a3a48617368446020436c6f736520616e64207061796f75742061207469702e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0019012054686520746970206964656e74696669656420627920606861736860206d75737420686176652066696e69736865642069747320636f756e74646f776e20706572696f642e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e9c2020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602e0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602eac202d20446252656164733a206054697073602c206054697070657273602c20607469702066696e64657260dc202d2044625772697465733a2060526561736f6e73602c206054697073602c206054697070657273602c20607469702066696e64657260302023203c2f7765696768743e0110184e657754697004104861736804cc2041206e6577207469702073756767657374696f6e20686173206265656e206f70656e65642e205c5b7469705f686173685c5d28546970436c6f73696e670410486173680411012041207469702073756767657374696f6e206861732072656163686564207468726573686f6c6420616e6420697320636c6f73696e672e205c5b7469705f686173685c5d24546970436c6f7365640c1048617368244163636f756e7449641c42616c616e636504f02041207469702073756767657374696f6e20686173206265656e20636c6f7365642e205c5b7469705f686173682c2077686f2c207061796f75745c5d3054697052657472616374656404104861736804c82041207469702073756767657374696f6e20686173206265656e207265747261637465642e205c5b7469705f686173685c5d1430546970436f756e74646f776e38543a3a426c6f636b4e756d62657210807000000445012054686520706572696f6420666f722077686963682061207469702072656d61696e73206f70656e20616674657220697320686173206163686965766564207468726573686f6c6420746970706572732e3454697046696e646572734665651c50657263656e7404140431012054686520616d6f756e74206f66207468652066696e616c2074697020776869636820676f657320746f20746865206f726967696e616c207265706f72746572206f6620746865207469702e505469705265706f72744465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004d42054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120746970207265706f72742e48446174614465706f736974506572427974653042616c616e63654f663c543e400010a5d4e800000000000000000000000409012054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e2074686520746970207265706f727420726561736f6e2e4c4d6178696d756d526561736f6e4c656e6774680c75333210004000000488204d6178696d756d2061636365707461626c6520726561736f6e206c656e6774682e1830526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e30416c72656164794b6e6f776e048c20546865207469702077617320616c726561647920666f756e642f737461727465642e28556e6b6e6f776e54697004642054686520746970206861736820697320756e6b6e6f776e2e244e6f7446696e64657204210120546865206163636f756e7420617474656d7074696e6720746f20726574726163742074686520746970206973206e6f74207468652066696e646572206f6620746865207469702e245374696c6c4f70656e042d0120546865207469702063616e6e6f7420626520636c61696d65642f636c6f736564206265636175736520746865726520617265206e6f7420656e6f7567682074697070657273207965742e245072656d617475726504350120546865207469702063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e201841737365747301184173736574730814417373657400010228543a3a41737365744964d4417373657444657461696c733c543a3a42616c616e63652c20543a3a4163636f756e7449642c2042616c616e63654f663c543e2c3e00040004542044657461696c73206f6620616e2061737365742e1c4163636f756e7401020228543a3a4173736574496430543a3a4163636f756e74496460417373657442616c616e63653c543a3a42616c616e63653e02280000000000000000000004e420546865206e756d626572206f6620756e697473206f66206173736574732068656c6420627920616e7920676976656e206163636f756e742e013418637265617465100869644c436f6d706163743c543a3a417373657449643e1461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c6d61785f7a6f6d626965730c7533322c6d696e5f62616c616e636528543a3a42616c616e63655cec2049737375652061206e657720636c617373206f662066756e6769626c65206173736574732066726f6d2061207075626c6963206f726967696e2e00b82054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c792e00290120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d75737420686176652073756666696369656e742066756e647320667265652e00dc2046756e6473206f662073656e64657220617265207265736572766564206163636f7264696e6720746f2074686520666f726d756c613ae8206041737365744465706f73697442617365202b2041737365744465706f7369745065725a6f6d626965202a206d61785f7a6f6d62696573602e003020506172616d65746572733a5d01202d20606964603a20546865206964656e746966696572206f6620746865206e65772061737365742e2054686973206d757374206e6f742062652063757272656e746c7920696e2075736520746f206964656e746966794c20616e206578697374696e672061737365742e5d01202d20606f776e6572603a20546865206f776e6572206f66207468697320636c617373206f66206173736574732e20546865206f776e6572206861732066756c6c20737570657275736572207065726d697373696f6e737d01206f76657220746869732061737365742c20627574206d6179206c61746572206368616e676520616e6420636f6e66696775726520746865207065726d697373696f6e73207573696e6720607472616e736665725f6f776e657273686970604020616e6420607365745f7465616d602e5901202d20606d61785f7a6f6d62696573603a2054686520746f74616c206e756d626572206f66206163636f756e7473207768696368206d617920686f6c642061737365747320696e207468697320636c61737320796574742068617665206e6f206578697374656e7469616c206465706f7369742e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e009c20456d69747320604372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f2831296030666f7263655f637265617465100869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c6d61785f7a6f6d6269657330436f6d706163743c7533323e2c6d696e5f62616c616e63654c436f6d706163743c543a3a42616c616e63653e54fc2049737375652061206e657720636c617373206f662066756e6769626c65206173736574732066726f6d20612070726976696c65676564206f726967696e2e00b82054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c792e00a820546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e602e00a020556e6c696b652060637265617465602c206e6f2066756e6473206172652072657365727665642e005d01202d20606964603a20546865206964656e746966696572206f6620746865206e65772061737365742e2054686973206d757374206e6f742062652063757272656e746c7920696e2075736520746f206964656e746966794c20616e206578697374696e672061737365742e5d01202d20606f776e6572603a20546865206f776e6572206f66207468697320636c617373206f66206173736574732e20546865206f776e6572206861732066756c6c20737570657275736572207065726d697373696f6e737d01206f76657220746869732061737365742c20627574206d6179206c61746572206368616e676520616e6420636f6e66696775726520746865207065726d697373696f6e73207573696e6720607472616e736665725f6f776e657273686970604020616e6420607365745f7465616d602e5901202d20606d61785f7a6f6d62696573603a2054686520746f74616c206e756d626572206f66206163636f756e7473207768696368206d617920686f6c642061737365747320696e207468697320636c61737320796574742068617665206e6f206578697374656e7469616c206465706f7369742e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e00b020456d6974732060466f7263654372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f283129601c64657374726f79080869644c436f6d706163743c543a3a417373657449643e3c7a6f6d626965735f7769746e65737330436f6d706163743c7533323e28e02044657374726f79206120636c617373206f662066756e6769626c6520617373657473206f776e6564206279207468652073656e6465722e00390120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d75737420626520746865206f776e6572206f662074686520617373657420606964602e005101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652064657374726f7965642e2054686973206d757374206964656e7469667920616e206578697374696e671c2061737365742e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e00ec205765696768743a20604f287a296020776865726520607a6020697320746865206e756d626572206f66207a6f6d626965206163636f756e74732e34666f7263655f64657374726f79080869644c436f6d706163743c543a3a417373657449643e3c7a6f6d626965735f7769746e65737330436f6d706163743c7533323e28902044657374726f79206120636c617373206f662066756e6769626c65206173736574732e00a820546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e602e005101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652064657374726f7965642e2054686973206d757374206964656e7469667920616e206578697374696e671c2061737365742e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f28312960106d696e740c0869644c436f6d706163743c543a3a417373657449643e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e308c204d696e7420617373657473206f66206120706172746963756c617220636c6173732e003d0120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d7573742062652074686520497373756572206f662074686520617373657420606964602e000101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74206d696e7465642e1101202d206062656e6566696369617279603a20546865206163636f756e7420746f206265206372656469746564207769746820746865206d696e746564206173736574732ec8202d2060616d6f756e74603a2054686520616d6f756e74206f662074686520617373657420746f206265206d696e7465642e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f283129605901204d6f6465733a205072652d6578697374696e672062616c616e6365206f66206062656e6566696369617279603b204163636f756e74207072652d6578697374656e6365206f66206062656e6566696369617279602e106275726e0c0869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e3c490120526564756365207468652062616c616e6365206f66206077686f60206279206173206d75636820617320706f737369626c6520757020746f2060616d6f756e746020617373657473206f6620606964602e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204d616e61676572206f662074686520617373657420606964602e00dc204261696c732077697468206042616c616e63655a65726f6020696620746865206077686f6020697320616c726561647920646561642e000101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74206275726e65642ea4202d206077686f603a20546865206163636f756e7420746f20626520646562697465642066726f6d2e2d01202d2060616d6f756e74603a20546865206d6178696d756d20616d6f756e74206279207768696368206077686f6027732062616c616e63652073686f756c6420626520726564756365642e00550120456d69747320604275726e6564602077697468207468652061637475616c20616d6f756e74206275726e65642e20496620746869732074616b6573207468652062616c616e636520746f2062656c6f77207468653d01206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74206275726e656420697320696e6372656173656420746f2074616b6520697420746f207a65726f2e003c205765696768743a20604f283129600d01204d6f6465733a20506f73742d6578697374656e6365206f66206077686f603b20507265202620706f7374205a6f6d6269652d737461747573206f66206077686f602e207472616e736665720c0869644c436f6d706163743c543a3a417373657449643e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e48d4204d6f766520736f6d65206173736574732066726f6d207468652073656e646572206163636f756e7420746f20616e6f746865722e005c204f726967696e206d757374206265205369676e65642e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642ea0202d2060746172676574603a20546865206163636f756e7420746f2062652063726564697465642e5501202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652073656e64657227732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e64650120607461726765746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e6101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652073656e6465722062616c616e63652061626f7665207a65726f206275742062656c6f77c020746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605d01204d6f6465733a205072652d6578697374656e6365206f662060746172676574603b20506f73742d6578697374656e6365206f662073656e6465723b205072696f72202620706f7374207a6f6d6269652d737461747573b8206f662073656e6465723b204163636f756e74207072652d6578697374656e6365206f662060746172676574602e38666f7263655f7472616e73666572100869644c436f6d706163743c543a3a417373657449643e18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e4cb8204d6f766520736f6d65206173736574732066726f6d206f6e65206163636f756e7420746f20616e6f746865722e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642e9c202d2060736f75726365603a20546865206163636f756e7420746f20626520646562697465642e98202d206064657374603a20546865206163636f756e7420746f2062652063726564697465642e5d01202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652060736f757263656027732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e645d012060646573746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e5101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652060736f75726365602062616c616e63652061626f7665207a65726f20627574d82062656c6f7720746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605d01204d6f6465733a205072652d6578697374656e6365206f66206064657374603b20506f73742d6578697374656e6365206f662060736f75726365603b205072696f72202620706f7374207a6f6d6269652d737461747573b8206f662060736f75726365603b204163636f756e74207072652d6578697374656e6365206f66206064657374602e18667265657a65080869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528e420446973616c6c6f77206675727468657220756e70726976696c65676564207472616e73666572732066726f6d20616e206163636f756e742e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c642062652074686520467265657a6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e8c202d206077686f603a20546865206163636f756e7420746f2062652066726f7a656e2e004020456d697473206046726f7a656e602e003c205765696768743a20604f283129601074686177080869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528d020416c6c6f7720756e70726976696c65676564207472616e73666572732066726f6d20616e206163636f756e7420616761696e2e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e94202d206077686f603a20546865206163636f756e7420746f20626520756e66726f7a656e2e004020456d6974732060546861776564602e003c205765696768743a20604f28312960487472616e736665725f6f776e657273686970080869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652878204368616e676520746865204f776e6572206f6620616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2ea0202d20606f776e6572603a20546865206e6577204f776e6572206f6620746869732061737365742e005820456d69747320604f776e65724368616e676564602e003c205765696768743a20604f28312960207365745f7465616d100869644c436f6d706163743c543a3a417373657449643e186973737565728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c667265657a65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636530c8204368616e676520746865204973737565722c2041646d696e20616e6420467265657a6572206f6620616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2ea8202d2060697373756572603a20546865206e657720497373756572206f6620746869732061737365742ea0202d206061646d696e603a20546865206e65772041646d696e206f6620746869732061737365742eb0202d2060667265657a6572603a20546865206e657720467265657a6572206f6620746869732061737365742e005420456d69747320605465616d4368616e676564602e003c205765696768743a20604f283129603c7365745f6d61785f7a6f6d62696573080869644c436f6d706163743c543a3a417373657449643e2c6d61785f7a6f6d6269657330436f6d706163743c7533323e0001301c437265617465640c1c41737365744964244163636f756e744964244163636f756e74496404ec20536f6d6520617373657420636c6173732077617320637265617465642e205c5b61737365745f69642c2063726561746f722c206f776e65725c5d184973737565640c1c41737365744964244163636f756e7449641c42616c616e636504ec20536f6d65206173736574732077657265206973737565642e205c5b61737365745f69642c206f776e65722c20746f74616c5f737570706c795c5d2c5472616e73666572726564101c41737365744964244163636f756e744964244163636f756e7449641c42616c616e636504f420536f6d65206173736574732077657265207472616e736665727265642e205c5b61737365745f69642c2066726f6d2c20746f2c20616d6f756e745c5d184275726e65640c1c41737365744964244163636f756e7449641c42616c616e636504e420536f6d652061737365747320776572652064657374726f7965642e205c5b61737365745f69642c206f776e65722c2062616c616e63655c5d2c5465616d4368616e676564101c41737365744964244163636f756e744964244163636f756e744964244163636f756e74496404050120546865206d616e6167656d656e74207465616d206368616e676564205c5b61737365745f69642c206973737565722c2061646d696e2c20667265657a65725c5d304f776e65724368616e676564081c41737365744964244163636f756e744964049820546865206f776e6572206368616e676564205c5b61737365745f69642c206f776e65725c5d40466f7263655472616e73666572726564101c41737365744964244163636f756e744964244163636f756e7449641c42616c616e636504210120536f6d652061737365747320776173207472616e7366657272656420627920616e2061646d696e2e205c5b61737365745f69642c2066726f6d2c20746f2c20616d6f756e745c5d1846726f7a656e081c41737365744964244163636f756e74496404c420536f6d65206163636f756e74206077686f60207761732066726f7a656e2e205c5b61737365745f69642c2077686f5c5d18546861776564081c41737365744964244163636f756e74496404c420536f6d65206163636f756e74206077686f6020776173207468617765642e205c5b61737365745f69642c2077686f5c5d2444657374726f796564041c41737365744964047820416e20617373657420636c617373207761732064657374726f7965642e30466f72636543726561746564081c41737365744964244163636f756e74496404e020536f6d6520617373657420636c6173732077617320666f7263652d637265617465642e205c5b61737365745f69642c206f776e65725c5d444d61785a6f6d626965734368616e676564081c417373657449640c75333204350120546865206d6178696d756d20616d6f756e74206f66207a6f6d6269657320616c6c6f77656420686173206368616e6765642e205c5b61737365745f69642c206d61785f7a6f6d626965735c5d003028416d6f756e745a65726f0490205472616e7366657220616d6f756e742073686f756c64206265206e6f6e2d7a65726f2e2842616c616e63654c6f77041901204163636f756e742062616c616e6365206d7573742062652067726561746572207468616e206f7220657175616c20746f20746865207472616e7366657220616d6f756e742e2c42616c616e63655a65726f04702042616c616e63652073686f756c64206265206e6f6e2d7a65726f2e304e6f5065726d697373696f6e04ec20546865207369676e696e67206163636f756e7420686173206e6f207065726d697373696f6e20746f20646f20746865206f7065726174696f6e2e1c556e6b6e6f776e047c2054686520676976656e20617373657420494420697320756e6b6e6f776e2e1846726f7a656e047820546865206f726967696e206163636f756e742069732066726f7a656e2e14496e557365047c2054686520617373657420494420697320616c72656164792074616b656e2e38546f6f4d616e795a6f6d62696573048420546f6f206d616e79207a6f6d626965206163636f756e747320696e207573652e20526566734c65667404550120417474656d707420746f2064657374726f7920616e20617373657420636c617373207768656e206e6f6e2d7a6f6d6269652c207265666572656e63652d62656172696e67206163636f756e74732065786973742e284261645769746e657373047020496e76616c6964207769746e657373206461746120676976656e2e384d696e42616c616e63655a65726f0490204d696e696d756d2062616c616e63652073686f756c64206265206e6f6e2d7a65726f2e204f766572666c6f7704982041206d696e74206f7065726174696f6e206c65616420746f20616e206f766572666c6f772e210c4d6d72014c4d65726b6c654d6f756e7461696e52616e67650c20526f6f74486173680100583c5420617320436f6e6669673c493e3e3a3a486173688000000000000000000000000000000000000000000000000000000000000000000458204c6174657374204d4d5220526f6f7420686173682e384e756d6265724f664c656176657301000c75363420000000000000000004b02043757272656e742073697a65206f6620746865204d4d5220286e756d626572206f66206c6561766573292e144e6f6465730001060c753634583c5420617320436f6e6669673c493e3e3a3a48617368000400108020486173686573206f6620746865206e6f64657320696e20746865204d4d522e002d01204e6f7465207468697320636f6c6c656374696f6e206f6e6c7920636f6e7461696e73204d4d52207065616b732c2074686520696e6e6572206e6f6465732028616e64206c656176657329bc20617265207072756e656420616e64206f6e6c792073746f72656420696e20746865204f6666636861696e2044422e0000000022041c40436865636b5370656356657273696f6e38436865636b547856657273696f6e30436865636b47656e6573697338436865636b4d6f7274616c69747928436865636b4e6f6e63652c436865636b576569676874604368617267655472616e73616374696f6e5061796d656e74 \ No newline at end of file diff --git a/packages/polkadot/tests/meta/v12.json b/packages/polkadot/tests/meta/v12.json new file mode 100644 index 00000000..c5ab1b48 --- /dev/null +++ b/packages/polkadot/tests/meta/v12.json @@ -0,0 +1,12923 @@ +{ + "magicNumber": 1635018093, + "metadata": { + "V12": { + "modules": [ + { + "name": "System", + "storage": { + "prefix": "System", + "items": [ + { + "name": "Account", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "AccountInfo", + "linked": false + } + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The full account information for a particular account ID." + ] + }, + { + "name": "ExtrinsicCount", + "modifier": "Optional", + "type": { + "Plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total extrinsics count for the current block." + ] + }, + { + "name": "BlockWeight", + "modifier": "Default", + "type": { + "Plain": "ConsumedWeight" + }, + "fallback": "0x000000000000000000000000000000000000000000000000", + "documentation": [ + " The current weight for the block." + ] + }, + { + "name": "AllExtrinsicsLen", + "modifier": "Optional", + "type": { + "Plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total length (in bytes) for all extrinsics put together, for the current block." + ] + }, + { + "name": "BlockHash", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "BlockNumber", + "value": "Hash", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Map of block numbers to block hashes." + ] + }, + { + "name": "ExtrinsicData", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "u32", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Extrinsics data for the current block (maps an extrinsic's index to its data)." + ] + }, + { + "name": "Number", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The current block number being processed. Set by `execute_block`." + ] + }, + { + "name": "ParentHash", + "modifier": "Default", + "type": { + "Plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Hash of the previous block." + ] + }, + { + "name": "ExtrinsicsRoot", + "modifier": "Default", + "type": { + "Plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Extrinsics root of the current block, also part of the block header." + ] + }, + { + "name": "Digest", + "modifier": "Default", + "type": { + "Plain": "DigestOf" + }, + "fallback": "0x00", + "documentation": [ + " Digest of the current block, also part of the block header." + ] + }, + { + "name": "Events", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Events deposited for the current block." + ] + }, + { + "name": "EventCount", + "modifier": "Default", + "type": { + "Plain": "EventIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of events in the `Events` list." + ] + }, + { + "name": "EventTopics", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "Hash", + "value": "Vec<(BlockNumber,EventIndex)>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Mapping between a topic (represented by T::Hash) and a vector of indexes", + " of events in the `>` list.", + "", + " All topic vectors have deterministic storage locations depending on the topic. This", + " allows light-clients to leverage the changes trie storage tracking mechanism and", + " in case of changes fetch the list of events of interest.", + "", + " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just", + " the `EventIndex` then in case if the topic has the same contents on the next block", + " no notification will be triggered thus the event might be lost." + ] + }, + { + "name": "LastRuntimeUpgrade", + "modifier": "Optional", + "type": { + "Plain": "LastRuntimeUpgradeInfo" + }, + "fallback": "0x00", + "documentation": [ + " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened." + ] + }, + { + "name": "UpgradedToU32RefCount", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not." + ] + }, + { + "name": "ExecutionPhase", + "modifier": "Optional", + "type": { + "Plain": "Phase" + }, + "fallback": "0x00", + "documentation": [ + " The execution phase of the block." + ] + } + ] + }, + "calls": [ + { + "name": "fill_block", + "args": [ + { + "name": "_ratio", + "type": "Perbill" + } + ], + "documentation": [ + " A dispatch that will fill the block weight up to the given ratio." + ] + }, + { + "name": "remark", + "args": [ + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Make some on-chain remark.", + "", + " # ", + " - `O(1)`", + " - Base Weight: 0.665 µs, independent of remark length.", + " - No DB operations.", + " # " + ] + }, + { + "name": "set_heap_pages", + "args": [ + { + "name": "pages", + "type": "u64" + } + ], + "documentation": [ + " Set the number of pages in the WebAssembly environment's heap.", + "", + " # ", + " - `O(1)`", + " - 1 storage write.", + " - Base Weight: 1.405 µs", + " - 1 write to HEAP_PAGES", + " # " + ] + }, + { + "name": "set_code", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new runtime code.", + "", + " # ", + " - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`", + " - 1 storage write (codec `O(C)`).", + " - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive).", + " - 1 event.", + " The weight of this function is dependent on the runtime, but generally this is very expensive.", + " We will treat this as a full block.", + " # " + ] + }, + { + "name": "set_code_without_checks", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new runtime code without doing any checks of the given `code`.", + "", + " # ", + " - `O(C)` where `C` length of `code`", + " - 1 storage write (codec `O(C)`).", + " - 1 event.", + " The weight of this function is dependent on the runtime. We will treat this as a full block.", + " # " + ] + }, + { + "name": "set_changes_trie_config", + "args": [ + { + "name": "changes_trie_config", + "type": "Option" + } + ], + "documentation": [ + " Set the new changes trie configuration.", + "", + " # ", + " - `O(1)`", + " - 1 storage write or delete (codec `O(1)`).", + " - 1 call to `deposit_log`: Uses `append` API, so O(1)", + " - Base Weight: 7.218 µs", + " - DB Weight:", + " - Writes: Changes Trie, System Digest", + " # " + ] + }, + { + "name": "set_storage", + "args": [ + { + "name": "items", + "type": "Vec" + } + ], + "documentation": [ + " Set some items of storage.", + "", + " # ", + " - `O(I)` where `I` length of `items`", + " - `I` storage writes (`O(1)`).", + " - Base Weight: 0.568 * i µs", + " - Writes: Number of items", + " # " + ] + }, + { + "name": "kill_storage", + "args": [ + { + "name": "keys", + "type": "Vec" + } + ], + "documentation": [ + " Kill some items from storage.", + "", + " # ", + " - `O(IK)` where `I` length of `keys` and `K` length of one key", + " - `I` storage deletions.", + " - Base Weight: .378 * i µs", + " - Writes: Number of items", + " # " + ] + }, + { + "name": "kill_prefix", + "args": [ + { + "name": "prefix", + "type": "Key" + }, + { + "name": "_subkeys", + "type": "u32" + } + ], + "documentation": [ + " Kill all storage items with a key that starts with the given prefix.", + "", + " **NOTE:** We rely on the Root origin to provide us the number of subkeys under", + " the prefix we are removing to accurately calculate the weight of this function.", + "", + " # ", + " - `O(P)` where `P` amount of keys with prefix `prefix`", + " - `P` storage deletions.", + " - Base Weight: 0.834 * P µs", + " - Writes: Number of subkeys + 1", + " # " + ] + }, + { + "name": "suicide", + "args": [], + "documentation": [ + " Kill the sending account, assuming there are no references outstanding and the composite", + " data is equal to its default value.", + "", + " # ", + " - `O(1)`", + " - 1 storage read and deletion.", + " --------------------", + " Base Weight: 8.626 µs", + " No DB Read or Write operations because caller is already in overlay", + " # " + ] + } + ], + "events": [ + { + "name": "ExtrinsicSuccess", + "args": [ + "DispatchInfo" + ], + "documentation": [ + " An extrinsic completed successfully. \\[info\\]" + ] + }, + { + "name": "ExtrinsicFailed", + "args": [ + "DispatchError", + "DispatchInfo" + ], + "documentation": [ + " An extrinsic failed. \\[error, info\\]" + ] + }, + { + "name": "CodeUpdated", + "args": [], + "documentation": [ + " `:code` was updated." + ] + }, + { + "name": "NewAccount", + "args": [ + "AccountId" + ], + "documentation": [ + " A new \\[account\\] was created." + ] + }, + { + "name": "KilledAccount", + "args": [ + "AccountId" + ], + "documentation": [ + " An \\[account\\] was reaped." + ] + } + ], + "constants": [ + { + "name": "BlockHashCount", + "type": "BlockNumber", + "value": "0x60090000", + "documentation": [ + " The maximum number of blocks to allow in mortal eras." + ] + }, + { + "name": "DbWeight", + "type": "RuntimeDbWeight", + "value": "0x40787d010000000000e1f50500000000", + "documentation": [ + " The weight of runtime database operations the runtime can invoke." + ] + }, + { + "name": "BlockWeights", + "type": "BlockWeights", + "value": "0x00f2052a0100000000204aa9d1010000405973070000000001c06e96a62e010000010098f73e5d010000010000000000000000405973070000000001c0f6e810a30100000100204aa9d1010000010088526a740000004059730700000000000000", + "documentation": [ + " The weight configuration (limits & base values) for each class of extrinsics and block." + ] + } + ], + "errors": [ + { + "name": "InvalidSpecName", + "documentation": [ + " The name of specification does not match between the current runtime", + " and the new runtime." + ] + }, + { + "name": "SpecVersionNeedsToIncrease", + "documentation": [ + " The specification version is not allowed to decrease between the current runtime", + " and the new runtime." + ] + }, + { + "name": "FailedToExtractRuntimeVersion", + "documentation": [ + " Failed to extract the runtime version from the new runtime.", + "", + " Either calling `Core_version` or decoding `RuntimeVersion` failed." + ] + }, + { + "name": "NonDefaultComposite", + "documentation": [ + " Suicide called when the account has non-default composite data." + ] + }, + { + "name": "NonZeroRefCount", + "documentation": [ + " There is a non-zero reference count preventing the account from being purged." + ] + } + ], + "index": 0 + }, + { + "name": "Utility", + "storage": null, + "calls": [ + { + "name": "batch", + "args": [ + { + "name": "calls", + "type": "Vec" + } + ], + "documentation": [ + " Send a batch of dispatch calls.", + "", + " May be called from any origin.", + "", + " - `calls`: The calls to be dispatched from the same origin.", + "", + " If origin is root then call are dispatch without checking origin filter. (This includes", + " bypassing `frame_system::Config::BaseCallFilter`).", + "", + " # ", + " - Complexity: O(C) where C is the number of calls to be batched.", + " # ", + "", + " This will return `Ok` in all circumstances. To determine the success of the batch, an", + " event is deposited. If a call failed and the batch was interrupted, then the", + " `BatchInterrupted` event is deposited, along with the number of successful calls made", + " and the error of the failed call. If all were successful, then the `BatchCompleted`", + " event is deposited." + ] + }, + { + "name": "as_derivative", + "args": [ + { + "name": "index", + "type": "u16" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Send a call through an indexed pseudonym of the sender.", + "", + " Filter from origin are passed along. The call will be dispatched with an origin which", + " use the same filter as the origin of this call.", + "", + " NOTE: If you need to ensure that any account-based filtering is not honored (i.e.", + " because you expect `proxy` to have been used prior in the call stack and you do not want", + " the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`", + " in the Multisig pallet instead.", + "", + " NOTE: Prior to version *12, this was called `as_limited_sub`.", + "", + " The dispatch origin for this call must be _Signed_." + ] + }, + { + "name": "batch_all", + "args": [ + { + "name": "calls", + "type": "Vec" + } + ], + "documentation": [ + " Send a batch of dispatch calls and atomically execute them.", + " The whole transaction will rollback and fail if any of the calls failed.", + "", + " May be called from any origin.", + "", + " - `calls`: The calls to be dispatched from the same origin.", + "", + " If origin is root then call are dispatch without checking origin filter. (This includes", + " bypassing `frame_system::Config::BaseCallFilter`).", + "", + " # ", + " - Complexity: O(C) where C is the number of calls to be batched.", + " # " + ] + } + ], + "events": [ + { + "name": "BatchInterrupted", + "args": [ + "u32", + "DispatchError" + ], + "documentation": [ + " Batch of dispatches did not complete fully. Index of first failing dispatch given, as", + " well as the error. \\[index, error\\]" + ] + }, + { + "name": "BatchCompleted", + "args": [], + "documentation": [ + " Batch of dispatches completed fully with no error." + ] + } + ], + "constants": [], + "errors": [], + "index": 1 + }, + { + "name": "Babe", + "storage": { + "prefix": "Babe", + "items": [ + { + "name": "EpochIndex", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current epoch index." + ] + }, + { + "name": "Authorities", + "modifier": "Default", + "type": { + "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + }, + "fallback": "0x00", + "documentation": [ + " Current epoch authorities." + ] + }, + { + "name": "GenesisSlot", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The slot at which the first epoch actually started. This is 0", + " until the first block of the chain." + ] + }, + { + "name": "CurrentSlot", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current slot number." + ] + }, + { + "name": "Randomness", + "modifier": "Default", + "type": { + "Plain": "Randomness" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The epoch randomness for the *current* epoch.", + "", + " # Security", + "", + " This MUST NOT be used for gambling, as it can be influenced by a", + " malicious validator in the short term. It MAY be used in many", + " cryptographic protocols, however, so long as one remembers that this", + " (like everything else on-chain) it is public. For example, it can be", + " used where a number is needed that cannot have been chosen by an", + " adversary, for purposes such as public-coin zero-knowledge proofs." + ] + }, + { + "name": "NextEpochConfig", + "modifier": "Optional", + "type": { + "Plain": "NextConfigDescriptor" + }, + "fallback": "0x00", + "documentation": [ + " Next epoch configuration, if changed." + ] + }, + { + "name": "NextRandomness", + "modifier": "Default", + "type": { + "Plain": "Randomness" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Next epoch randomness." + ] + }, + { + "name": "SegmentIndex", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Randomness under construction.", + "", + " We make a tradeoff between storage accesses and list length.", + " We store the under-construction randomness in segments of up to", + " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.", + "", + " Once a segment reaches this length, we begin the next one.", + " We reset all segments and return to `0` at the beginning of every", + " epoch." + ] + }, + { + "name": "UnderConstruction", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "u32", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay." + ] + }, + { + "name": "Initialized", + "modifier": "Optional", + "type": { + "Plain": "MaybeRandomness" + }, + "fallback": "0x00", + "documentation": [ + " Temporary value (cleared at block finalization) which is `Some`", + " if per-block initialization has already been called for current block." + ] + }, + { + "name": "AuthorVrfRandomness", + "modifier": "Default", + "type": { + "Plain": "MaybeRandomness" + }, + "fallback": "0x00", + "documentation": [ + " Temporary value (cleared at block finalization) that includes the VRF output generated", + " at this block. This field should always be populated during block processing unless", + " secondary plain slots are enabled (which don't contain a VRF output)." + ] + }, + { + "name": "Lateness", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " How late the current block is compared to its parent.", + "", + " This entry is populated as part of block execution and is cleaned up", + " on block finalization. Querying this storage entry outside of block", + " execution context should always yield zero." + ] + } + ] + }, + "calls": [ + { + "name": "report_equivocation", + "args": [ + { + "name": "equivocation_proof", + "type": "BabeEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report authority equivocation/misbehavior. This method will verify", + " the equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence will", + " be reported." + ] + }, + { + "name": "report_equivocation_unsigned", + "args": [ + { + "name": "equivocation_proof", + "type": "BabeEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report authority equivocation/misbehavior. This method will verify", + " the equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence will", + " be reported.", + " This extrinsic must be called unsigned and it is expected that only", + " block authors will call it (validated in `ValidateUnsigned`), as such", + " if the block author is defined it will be defined as the equivocation", + " reporter." + ] + } + ], + "events": null, + "constants": [ + { + "name": "EpochDuration", + "type": "u64", + "value": "0xc800000000000000", + "documentation": [ + " The number of **slots** that an epoch takes. We couple sessions to", + " epochs, i.e. we start a new session once the new epoch begins." + ] + }, + { + "name": "ExpectedBlockTime", + "type": "Moment", + "value": "0xb80b000000000000", + "documentation": [ + " The expected average block time at which BABE should be creating", + " blocks. Since BABE is probabilistic it is not trivial to figure out", + " what the expected average block time should be based on the slot", + " duration and the security parameter `c` (where `1 - c` represents", + " the probability of a slot being empty)." + ] + } + ], + "errors": [], + "index": 2 + }, + { + "name": "Timestamp", + "storage": { + "prefix": "Timestamp", + "items": [ + { + "name": "Now", + "modifier": "Default", + "type": { + "Plain": "Moment" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current time for the current block." + ] + }, + { + "name": "DidUpdate", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Did the timestamp get updated in this block?" + ] + } + ] + }, + "calls": [ + { + "name": "set", + "args": [ + { + "name": "now", + "type": "Compact" + } + ], + "documentation": [ + " Set the current time.", + "", + " This call should be invoked exactly once per block. It will panic at the finalization", + " phase, if this call hasn't been invoked by that time.", + "", + " The timestamp should be greater than the previous one by the amount specified by", + " `MinimumPeriod`.", + "", + " The dispatch origin for this call must be `Inherent`.", + "", + " # ", + " - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)", + " - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`)", + " - 1 event handler `on_timestamp_set`. Must be `O(1)`.", + " # " + ] + } + ], + "events": null, + "constants": [ + { + "name": "MinimumPeriod", + "type": "Moment", + "value": "0xdc05000000000000", + "documentation": [ + " The minimum period between blocks. Beware that this is different to the *expected* period", + " that the block production apparatus provides. Your chosen consensus system will generally", + " work with this to determine a sensible block time. e.g. For Aura, it will be double this", + " period on default settings." + ] + } + ], + "errors": [], + "index": 3 + }, + { + "name": "Authorship", + "storage": { + "prefix": "Authorship", + "items": [ + { + "name": "Uncles", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Uncles" + ] + }, + { + "name": "Author", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " Author of current block." + ] + }, + { + "name": "DidSetUncles", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Whether uncles were already set in this block." + ] + } + ] + }, + "calls": [ + { + "name": "set_uncles", + "args": [ + { + "name": "new_uncles", + "type": "Vec
" + } + ], + "documentation": [ + " Provide a set of uncles." + ] + } + ], + "events": null, + "constants": [], + "errors": [ + { + "name": "InvalidUncleParent", + "documentation": [ + " The uncle parent not in the chain." + ] + }, + { + "name": "UnclesAlreadySet", + "documentation": [ + " Uncles already set in the block." + ] + }, + { + "name": "TooManyUncles", + "documentation": [ + " Too many uncles." + ] + }, + { + "name": "GenesisUncle", + "documentation": [ + " The uncle is genesis." + ] + }, + { + "name": "TooHighUncle", + "documentation": [ + " The uncle is too high in chain." + ] + }, + { + "name": "UncleAlreadyIncluded", + "documentation": [ + " The uncle is already included." + ] + }, + { + "name": "OldUncle", + "documentation": [ + " The uncle isn't recent enough to be included." + ] + } + ], + "index": 4 + }, + { + "name": "Indices", + "storage": { + "prefix": "Indices", + "items": [ + { + "name": "Accounts", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountIndex", + "value": "(AccountId,BalanceOf,bool)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The lookup from index to account." + ] + } + ] + }, + "calls": [ + { + "name": "claim", + "args": [ + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Assign an previously unassigned index.", + "", + " Payment: `Deposit` is reserved from the sender account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `index`: the index to be claimed. This must not be in use.", + "", + " Emits `IndexAssigned` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - One reserve operation.", + " - One event.", + " -------------------", + " - DB Weight: 1 Read/Write (Accounts)", + " # " + ] + }, + { + "name": "transfer", + "args": [ + { + "name": "new", + "type": "AccountId" + }, + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Assign an index already owned by the sender to another account. The balance reservation", + " is effectively transferred to the new account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `index`: the index to be re-assigned. This must be owned by the sender.", + " - `new`: the new owner of the index. This function is a no-op if it is equal to sender.", + "", + " Emits `IndexAssigned` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - One transfer operation.", + " - One event.", + " -------------------", + " - DB Weight:", + " - Reads: Indices Accounts, System Account (recipient)", + " - Writes: Indices Accounts, System Account (recipient)", + " # " + ] + }, + { + "name": "free", + "args": [ + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Free up an index owned by the sender.", + "", + " Payment: Any previous deposit placed for the index is unreserved in the sender account.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must own the index.", + "", + " - `index`: the index to be freed. This must be owned by the sender.", + "", + " Emits `IndexFreed` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - One reserve operation.", + " - One event.", + " -------------------", + " - DB Weight: 1 Read/Write (Accounts)", + " # " + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "new", + "type": "AccountId" + }, + { + "name": "index", + "type": "AccountIndex" + }, + { + "name": "freeze", + "type": "bool" + } + ], + "documentation": [ + " Force an index to an account. This doesn't require a deposit. If the index is already", + " held, then any deposit is reimbursed to its current owner.", + "", + " The dispatch origin for this call must be _Root_.", + "", + " - `index`: the index to be (re-)assigned.", + " - `new`: the new owner of the index. This function is a no-op if it is equal to sender.", + " - `freeze`: if set to `true`, will freeze the index so it cannot be transferred.", + "", + " Emits `IndexAssigned` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - Up to one reserve operation.", + " - One event.", + " -------------------", + " - DB Weight:", + " - Reads: Indices Accounts, System Account (original owner)", + " - Writes: Indices Accounts, System Account (original owner)", + " # " + ] + }, + { + "name": "freeze", + "args": [ + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Freeze an index so it will always point to the sender account. This consumes the deposit.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must have a", + " non-frozen account `index`.", + "", + " - `index`: the index to be frozen in place.", + "", + " Emits `IndexFrozen` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - Up to one slash operation.", + " - One event.", + " -------------------", + " - DB Weight: 1 Read/Write (Accounts)", + " # " + ] + } + ], + "events": [ + { + "name": "IndexAssigned", + "args": [ + "AccountId", + "AccountIndex" + ], + "documentation": [ + " A account index was assigned. \\[index, who\\]" + ] + }, + { + "name": "IndexFreed", + "args": [ + "AccountIndex" + ], + "documentation": [ + " A account index has been freed up (unassigned). \\[index\\]" + ] + }, + { + "name": "IndexFrozen", + "args": [ + "AccountIndex", + "AccountId" + ], + "documentation": [ + " A account index has been frozen to its current account ID. \\[index, who\\]" + ] + } + ], + "constants": [ + { + "name": "Deposit", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The deposit needed for reserving an index." + ] + } + ], + "errors": [], + "index": 5 + }, + { + "name": "Balances", + "storage": { + "prefix": "Balances", + "items": [ + { + "name": "TotalIssuance", + "modifier": "Default", + "type": { + "Plain": "Balance" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The total units issued in the system." + ] + }, + { + "name": "Account", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "AccountData", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The balance of an account.", + "", + " NOTE: This is only used in the case that this module is used to store balances." + ] + }, + { + "name": "Locks", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Any liquidity locks on some account balances.", + " NOTE: Should only be accessed when setting, changing and freeing a lock." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "Releases" + }, + "fallback": "0x00", + "documentation": [ + " Storage version of the pallet.", + "", + " This is set to v2.0.0 for new networks." + ] + } + ] + }, + "calls": [ + { + "name": "transfer", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Transfer some liquid free balance to another account.", + "", + " `transfer` will set the `FreeBalance` of the sender and receiver.", + " It will decrease the total issuance of the system by the `TransferFee`.", + " If the sender's account is below the existential deposit as a result", + " of the transfer, the account will be reaped.", + "", + " The dispatch origin for this call must be `Signed` by the transactor.", + "", + " # ", + " - Dependent on arguments but not critical, given proper implementations for", + " input config types. See related functions below.", + " - It contains a limited number of reads and writes internally and no complex computation.", + "", + " Related functions:", + "", + " - `ensure_can_withdraw` is always called internally but has a bounded complexity.", + " - Transferring balances to accounts that did not exist before will cause", + " `T::OnNewAccount::on_new_account` to be called.", + " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`.", + " - `transfer_keep_alive` works the same way as `transfer`, but has an additional", + " check that the transfer will not kill the origin account.", + " ---------------------------------", + " - Base Weight: 73.64 µs, worst case scenario (account created, account removed)", + " - DB Weight: 1 Read and 1 Write to destination account", + " - Origin account is already in memory, so no DB operations for them.", + " # " + ] + }, + { + "name": "set_balance", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "new_free", + "type": "Compact" + }, + { + "name": "new_reserved", + "type": "Compact" + } + ], + "documentation": [ + " Set the balances of a given account.", + "", + " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", + " also decrease the total issuance of the system (`TotalIssuance`).", + " If the new free or reserved balance is below the existential deposit,", + " it will reset the account nonce (`frame_system::AccountNonce`).", + "", + " The dispatch origin for this call is `root`.", + "", + " # ", + " - Independent of the arguments.", + " - Contains a limited number of reads and writes.", + " ---------------------", + " - Base Weight:", + " - Creating: 27.56 µs", + " - Killing: 35.11 µs", + " - DB Weight: 1 Read, 1 Write to `who`", + " # " + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Exactly as `transfer`, except the origin must be root and the source account may be", + " specified.", + " # ", + " - Same as transfer, but additional read and write because the source account is", + " not assumed to be in the overlay.", + " # " + ] + }, + { + "name": "transfer_keep_alive", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Same as the [`transfer`] call, but with a check that the transfer will not kill the", + " origin account.", + "", + " 99% of the time you want [`transfer`] instead.", + "", + " [`transfer`]: struct.Module.html#method.transfer", + " # ", + " - Cheaper than transfer because account cannot be killed.", + " - Base Weight: 51.4 µs", + " - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)", + " #" + ] + } + ], + "events": [ + { + "name": "Endowed", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account was created with some free balance. \\[account, free_balance\\]" + ] + }, + { + "name": "DustLost", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account was removed whose balance was non-zero but below ExistentialDeposit,", + " resulting in an outright loss. \\[account, balance\\]" + ] + }, + { + "name": "Transfer", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Transfer succeeded. \\[from, to, value\\]" + ] + }, + { + "name": "BalanceSet", + "args": [ + "AccountId", + "Balance", + "Balance" + ], + "documentation": [ + " A balance was set by root. \\[who, free, reserved\\]" + ] + }, + { + "name": "Deposit", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some amount was deposited (e.g. for transaction fees). \\[who, deposit\\]" + ] + }, + { + "name": "Reserved", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some balance was reserved (moved from free to reserved). \\[who, value\\]" + ] + }, + { + "name": "Unreserved", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some balance was unreserved (moved from reserved to free). \\[who, value\\]" + ] + }, + { + "name": "ReserveRepatriated", + "args": [ + "AccountId", + "AccountId", + "Balance", + "BalanceStatus" + ], + "documentation": [ + " Some balance was moved from the reserve of the first account to the second account.", + " Final argument indicates the destination balance type.", + " \\[from, to, balance, destination_status\\]" + ] + } + ], + "constants": [ + { + "name": "ExistentialDeposit", + "type": "Balance", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The minimum amount required to keep an account open." + ] + } + ], + "errors": [ + { + "name": "VestingBalance", + "documentation": [ + " Vesting balance too high to send value" + ] + }, + { + "name": "LiquidityRestrictions", + "documentation": [ + " Account liquidity restrictions prevent withdrawal" + ] + }, + { + "name": "Overflow", + "documentation": [ + " Got an overflow after adding" + ] + }, + { + "name": "InsufficientBalance", + "documentation": [ + " Balance too low to send value" + ] + }, + { + "name": "ExistentialDeposit", + "documentation": [ + " Value too low to create account due to existential deposit" + ] + }, + { + "name": "KeepAlive", + "documentation": [ + " Transfer/payment would kill account" + ] + }, + { + "name": "ExistingVestingSchedule", + "documentation": [ + " A vesting schedule already exists for this account" + ] + }, + { + "name": "DeadAccount", + "documentation": [ + " Beneficiary account must pre-exist" + ] + } + ], + "index": 6 + }, + { + "name": "TransactionPayment", + "storage": { + "prefix": "TransactionPayment", + "items": [ + { + "name": "NextFeeMultiplier", + "modifier": "Default", + "type": { + "Plain": "Multiplier" + }, + "fallback": "0x000064a7b3b6e00d0000000000000000", + "documentation": [] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "Releases" + }, + "fallback": "0x00", + "documentation": [] + } + ] + }, + "calls": null, + "events": null, + "constants": [ + { + "name": "TransactionByteFee", + "type": "BalanceOf", + "value": "0x00e40b54020000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + }, + { + "name": "WeightToFee", + "type": "Vec", + "value": "0x0401000000000000000000000000000000000000000001", + "documentation": [ + " The polynomial that is applied in order to derive fee from weight." + ] + } + ], + "errors": [], + "index": 7 + }, + { + "name": "Staking", + "storage": { + "prefix": "Staking", + "items": [ + { + "name": "HistoryDepth", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x54000000", + "documentation": [ + " Number of eras to keep in history.", + "", + " Information is kept for eras in `[current_era - history_depth; current_era]`.", + "", + " Must be more than the number of eras delayed by session otherwise. I.e. active era must", + " always be in history. I.e. `active_era > current_era - history_depth` must be", + " guaranteed." + ] + }, + { + "name": "ValidatorCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The ideal number of staking participants." + ] + }, + { + "name": "MinimumValidatorCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Minimum number of staking participants before emergency conditions are imposed." + ] + }, + { + "name": "Invulnerables", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", + " easy to initialize and the performance hit is minimal (we expect no more than four", + " invulnerables) and restricted to testnets." + ] + }, + { + "name": "Bonded", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all locked \"stash\" accounts to the controller account." + ] + }, + { + "name": "Ledger", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "StakingLedger", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." + ] + }, + { + "name": "Payee", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "RewardDestination", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Where the reward payment should be made. Keyed by stash." + ] + }, + { + "name": "Validators", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "ValidatorPrefs", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The map from (wannabe) validator stash key to the preferences of that validator." + ] + }, + { + "name": "Nominators", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Nominations", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The map from nominator stash key to the set of stash keys of all validators to nominate." + ] + }, + { + "name": "CurrentEra", + "modifier": "Optional", + "type": { + "Plain": "EraIndex" + }, + "fallback": "0x00", + "documentation": [ + " The current era index.", + "", + " This is the latest planned era, depending on how the Session pallet queues the validator", + " set, it might be active or not." + ] + }, + { + "name": "ActiveEra", + "modifier": "Optional", + "type": { + "Plain": "ActiveEraInfo" + }, + "fallback": "0x00", + "documentation": [ + " The active era information, it holds index and start.", + "", + " The active era is the era currently rewarded.", + " Validator set of this era must be equal to `SessionInterface::validators`." + ] + }, + { + "name": "ErasStartSessionIndex", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "SessionIndex", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The session index at which the era start for the last `HISTORY_DEPTH` eras." + ] + }, + { + "name": "ErasStakers", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "Exposure", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x000000", + "documentation": [ + " Exposure of validator at era.", + "", + " This is keyed first by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras.", + " If stakers hasn't been set or has been removed then empty exposure is returned." + ] + }, + { + "name": "ErasStakersClipped", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "Exposure", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x000000", + "documentation": [ + " Clipped Exposure of validator at era.", + "", + " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the", + " `T::MaxNominatorRewardedPerValidator` biggest stakers.", + " (Note: the field `total` and `own` of the exposure remains unchanged).", + " This is used to limit the i/o cost for the nominator payout.", + "", + " This is keyed fist by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras.", + " If stakers hasn't been set or has been removed then empty exposure is returned." + ] + }, + { + "name": "ErasValidatorPrefs", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "ValidatorPrefs", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Similar to `ErasStakers`, this holds the preferences of validators.", + "", + " This is keyed first by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras." + ] + }, + { + "name": "ErasValidatorReward", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "BalanceOf", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The total validator era payout for the last `HISTORY_DEPTH` eras.", + "", + " Eras that haven't finished yet or has been removed doesn't have reward." + ] + }, + { + "name": "ErasRewardPoints", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "EraRewardPoints", + "linked": false + } + }, + "fallback": "0x0000000000", + "documentation": [ + " Rewards for the last `HISTORY_DEPTH` eras.", + " If reward hasn't been set or has been removed then 0 reward is returned." + ] + }, + { + "name": "ErasTotalStake", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "BalanceOf", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The total amount staked for the last `HISTORY_DEPTH` eras.", + " If total hasn't been set or has been removed then 0 stake is returned." + ] + }, + { + "name": "ForceEra", + "modifier": "Default", + "type": { + "Plain": "Forcing" + }, + "fallback": "0x00", + "documentation": [ + " Mode of era forcing." + ] + }, + { + "name": "SlashRewardFraction", + "modifier": "Default", + "type": { + "Plain": "Perbill" + }, + "fallback": "0x00000000", + "documentation": [ + " The percentage of the slash that is distributed to reporters.", + "", + " The rest of the slashed value is handled by the `Slash`." + ] + }, + { + "name": "CanceledSlashPayout", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of currency given to reporters of a slash event which was", + " canceled by extraordinary circumstances (e.g. governance)." + ] + }, + { + "name": "UnappliedSlashes", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " All unapplied slashes that are queued for later." + ] + }, + { + "name": "BondedEras", + "modifier": "Default", + "type": { + "Plain": "Vec<(EraIndex,SessionIndex)>" + }, + "fallback": "0x00", + "documentation": [ + " A mapping from still-bonded eras to the first session index of that era.", + "", + " Must contains information for eras for the range:", + " `[active_era - bounding_duration; active_era]`" + ] + }, + { + "name": "ValidatorSlashInEra", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "(Perbill,BalanceOf)", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on validators, mapped by era to the highest slash proportion", + " and slash value of the era." + ] + }, + { + "name": "NominatorSlashInEra", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "BalanceOf", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on nominators, mapped by era to the highest slash value of the era." + ] + }, + { + "name": "SlashingSpans", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "SlashingSpans", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Slashing spans for stash accounts." + ] + }, + { + "name": "SpanSlash", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "(AccountId,SpanIndex)", + "value": "SpanRecord", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Records information about the maximum slash of a stash within a slashing span,", + " as well as how much reward has been paid out." + ] + }, + { + "name": "EarliestUnappliedSlash", + "modifier": "Optional", + "type": { + "Plain": "EraIndex" + }, + "fallback": "0x00", + "documentation": [ + " The earliest era for which we have a pending, unapplied slash." + ] + }, + { + "name": "SnapshotValidators", + "modifier": "Optional", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Snapshot of validators at the beginning of the current election window. This should only", + " have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`." + ] + }, + { + "name": "SnapshotNominators", + "modifier": "Optional", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Snapshot of nominators at the beginning of the current election window. This should only", + " have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`." + ] + }, + { + "name": "QueuedElected", + "modifier": "Optional", + "type": { + "Plain": "ElectionResult" + }, + "fallback": "0x00", + "documentation": [ + " The next validator set. At the end of an era, if this is available (potentially from the", + " result of an offchain worker), it is immediately used. Otherwise, the on-chain election", + " is executed." + ] + }, + { + "name": "QueuedScore", + "modifier": "Optional", + "type": { + "Plain": "ElectionScore" + }, + "fallback": "0x00", + "documentation": [ + " The score of the current [`QueuedElected`]." + ] + }, + { + "name": "EraElectionStatus", + "modifier": "Default", + "type": { + "Plain": "ElectionStatus" + }, + "fallback": "0x00", + "documentation": [ + " Flag to control the execution of the offchain election. When `Open(_)`, we accept", + " solutions to be submitted." + ] + }, + { + "name": "IsCurrentSessionFinal", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the current **planned** session is final. Note that this does not take era", + " forcing into account." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "Releases" + }, + "fallback": "0x03", + "documentation": [ + " True if network has been upgraded to this version.", + " Storage version of the pallet.", + "", + " This is set to v3.0.0 for new networks." + ] + } + ] + }, + "calls": [ + { + "name": "bond", + "args": [ + { + "name": "controller", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " Take the origin account as a stash and lock up `value` of its balance. `controller` will", + " be the account that controls it.", + "", + " `value` must be more than the `minimum_balance` specified by `T::Currency`.", + "", + " The dispatch origin for this call must be _Signed_ by the stash account.", + "", + " Emits `Bonded`.", + "", + " # ", + " - Independent of the arguments. Moderate complexity.", + " - O(1).", + " - Three extra DB entries.", + "", + " NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned", + " unless the `origin` falls below _existential deposit_ and gets removed as dust.", + " ------------------", + " Weight: O(1)", + " DB Weight:", + " - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks", + " - Write: Bonded, Payee, [Origin Account], Locks, Ledger", + " # " + ] + }, + { + "name": "bond_extra", + "args": [ + { + "name": "max_additional", + "type": "Compact" + } + ], + "documentation": [ + " Add some extra amount that have appeared in the stash `free_balance` into the balance up", + " for staking.", + "", + " Use this if there are additional funds in your stash account that you wish to bond.", + " Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount", + " that can be added.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller and", + " it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " Emits `Bonded`.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - O(1).", + " - One DB entry.", + " ------------", + " DB Weight:", + " - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks", + " - Write: [Origin Account], Locks, Ledger", + " # " + ] + }, + { + "name": "unbond", + "args": [ + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", + " period ends. If this leaves an amount actively bonded less than", + " T::Currency::minimum_balance(), then it is increased to the full amount.", + "", + " Once the unlock period is done, you can call `withdraw_unbonded` to actually move", + " the funds out of management ready for transfer.", + "", + " No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)", + " can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need", + " to be called first to remove some of the chunks (if possible).", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " Emits `Unbonded`.", + "", + " See also [`Call::withdraw_unbonded`].", + "", + " # ", + " - Independent of the arguments. Limited but potentially exploitable complexity.", + " - Contains a limited number of reads.", + " - Each call (requires the remainder of the bonded balance to be above `minimum_balance`)", + " will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage.", + " The only way to clean the aforementioned storage item is also user-controlled via", + " `withdraw_unbonded`.", + " - One DB entry.", + " ----------", + " Weight: O(1)", + " DB Weight:", + " - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash,", + " - Write: Locks, Ledger, BalanceOf Stash,", + " " + ] + }, + { + "name": "withdraw_unbonded", + "args": [ + { + "name": "num_slashing_spans", + "type": "u32" + } + ], + "documentation": [ + " Remove any unlocked chunks from the `unlocking` queue from our management.", + "", + " This essentially frees up that balance to be used by the stash account to do", + " whatever it wants.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " Emits `Withdrawn`.", + "", + " See also [`Call::unbond`].", + "", + " # ", + " - Could be dependent on the `origin` argument and how much `unlocking` chunks exist.", + " It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is", + " indirectly user-controlled. See [`unbond`] for more detail.", + " - Contains a limited number of reads, yet the size of which could be large based on `ledger`.", + " - Writes are limited to the `origin` account key.", + " ---------------", + " Complexity O(S) where S is the number of slashing spans to remove", + " Update:", + " - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account]", + " - Writes: [Origin Account], Locks, Ledger", + " Kill:", + " - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin", + " Account], Locks, BalanceOf stash", + " - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,", + " [Origin Account], Locks, BalanceOf stash.", + " - Writes Each: SpanSlash * S", + " NOTE: Weight annotation is the kill scenario, we refund otherwise.", + " # " + ] + }, + { + "name": "validate", + "args": [ + { + "name": "prefs", + "type": "ValidatorPrefs" + } + ], + "documentation": [ + " Declare the desire to validate for the origin controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " -----------", + " Weight: O(1)", + " DB Weight:", + " - Read: Era Election Status, Ledger", + " - Write: Nominators, Validators", + " # " + ] + }, + { + "name": "nominate", + "args": [ + { + "name": "targets", + "type": "Vec" + } + ], + "documentation": [ + " Declare the desire to nominate `targets` for the origin controller.", + "", + " Effects will be felt at the beginning of the next era. This can only be called when", + " [`EraElectionStatus`] is `Closed`.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - The transaction's complexity is proportional to the size of `targets` (N)", + " which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).", + " - Both the reads and writes follow a similar pattern.", + " ---------", + " Weight: O(N)", + " where N is the number of targets", + " DB Weight:", + " - Reads: Era Election Status, Ledger, Current Era", + " - Writes: Validators, Nominators", + " # " + ] + }, + { + "name": "chill", + "args": [], + "documentation": [ + " Declare no desire to either validate or nominate.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains one read.", + " - Writes are limited to the `origin` account key.", + " --------", + " Weight: O(1)", + " DB Weight:", + " - Read: EraElectionStatus, Ledger", + " - Write: Validators, Nominators", + " # " + ] + }, + { + "name": "set_payee", + "args": [ + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " (Re-)set the payment target for a controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " ---------", + " - Weight: O(1)", + " - DB Weight:", + " - Read: Ledger", + " - Write: Payee", + " # " + ] + }, + { + "name": "set_controller", + "args": [ + { + "name": "controller", + "type": "LookupSource" + } + ], + "documentation": [ + " (Re-)set the controller of a stash.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " ----------", + " Weight: O(1)", + " DB Weight:", + " - Read: Bonded, Ledger New Controller, Ledger Old Controller", + " - Write: Bonded, Ledger New Controller, Ledger Old Controller", + " # " + ] + }, + { + "name": "set_validator_count", + "args": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Sets the ideal number of validators.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " Weight: O(1)", + " Write: Validator Count", + " # " + ] + }, + { + "name": "increase_validator_count", + "args": [ + { + "name": "additional", + "type": "Compact" + } + ], + "documentation": [ + " Increments the ideal number of validators.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " Same as [`set_validator_count`].", + " # " + ] + }, + { + "name": "scale_validator_count", + "args": [ + { + "name": "factor", + "type": "Percent" + } + ], + "documentation": [ + " Scale up the ideal number of validators by a factor.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " Same as [`set_validator_count`].", + " # " + ] + }, + { + "name": "force_no_eras", + "args": [], + "documentation": [ + " Force there to be no new eras indefinitely.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " - No arguments.", + " - Weight: O(1)", + " - Write: ForceEra", + " # " + ] + }, + { + "name": "force_new_era", + "args": [], + "documentation": [ + " Force there to be a new era at the end of the next session. After this, it will be", + " reset to normal (non-forced) behaviour.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " - No arguments.", + " - Weight: O(1)", + " - Write ForceEra", + " # " + ] + }, + { + "name": "set_invulnerables", + "args": [ + { + "name": "invulnerables", + "type": "Vec" + } + ], + "documentation": [ + " Set the validators who cannot be slashed (if any).", + "", + " The dispatch origin must be Root.", + "", + " # ", + " - O(V)", + " - Write: Invulnerables", + " # " + ] + }, + { + "name": "force_unstake", + "args": [ + { + "name": "stash", + "type": "AccountId" + }, + { + "name": "num_slashing_spans", + "type": "u32" + } + ], + "documentation": [ + " Force a current staker to become completely unstaked, immediately.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " O(S) where S is the number of slashing spans to be removed", + " Reads: Bonded, Slashing Spans, Account, Locks", + " Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks", + " Writes Each: SpanSlash * S", + " # " + ] + }, + { + "name": "force_new_era_always", + "args": [], + "documentation": [ + " Force there to be a new era at the end of sessions indefinitely.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " - Weight: O(1)", + " - Write: ForceEra", + " # " + ] + }, + { + "name": "cancel_deferred_slash", + "args": [ + { + "name": "era", + "type": "EraIndex" + }, + { + "name": "slash_indices", + "type": "Vec" + } + ], + "documentation": [ + " Cancel enactment of a deferred slash.", + "", + " Can be called by the `T::SlashCancelOrigin`.", + "", + " Parameters: era and indices of the slashes for that era to kill.", + "", + " # ", + " Complexity: O(U + S)", + " with U unapplied slashes weighted with U=1000", + " and S is the number of slash indices to be canceled.", + " - Read: Unapplied Slashes", + " - Write: Unapplied Slashes", + " # " + ] + }, + { + "name": "payout_stakers", + "args": [ + { + "name": "validator_stash", + "type": "AccountId" + }, + { + "name": "era", + "type": "EraIndex" + } + ], + "documentation": [ + " Pay out all the stakers behind a single validator for a single era.", + "", + " - `validator_stash` is the stash account of the validator. Their nominators, up to", + " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards.", + " - `era` may be any era between `[current_era - history_depth; current_era]`.", + "", + " The origin of this call must be _Signed_. Any account can call this function, even if", + " it is not one of the stakers.", + "", + " This can only be called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Time complexity: at most O(MaxNominatorRewardedPerValidator).", + " - Contains a limited number of reads and writes.", + " -----------", + " N is the Number of payouts for the validator (including the validator)", + " Weight:", + " - Reward Destination Staked: O(N)", + " - Reward Destination Controller (Creating): O(N)", + " DB Weight:", + " - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward,", + " ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items)", + " - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items)", + " - Write Each: System Account, Locks, Ledger (3 items)", + "", + " NOTE: weights are assuming that payouts are made to alive stash account (Staked).", + " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here.", + " # " + ] + }, + { + "name": "rebond", + "args": [ + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Rebond a portion of the stash scheduled to be unlocked.", + "", + " The dispatch origin must be signed by the controller, and it can be only called when", + " [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Time complexity: O(L), where L is unlocking chunks", + " - Bounded by `MAX_UNLOCKING_CHUNKS`.", + " - Storage changes: Can't increase storage, only decrease it.", + " ---------------", + " - DB Weight:", + " - Reads: EraElectionStatus, Ledger, Locks, [Origin Account]", + " - Writes: [Origin Account], Locks, Ledger", + " # " + ] + }, + { + "name": "set_history_depth", + "args": [ + { + "name": "new_history_depth", + "type": "Compact" + }, + { + "name": "_era_items_deleted", + "type": "Compact" + } + ], + "documentation": [ + " Set `HistoryDepth` value. This function will delete any history information", + " when `HistoryDepth` is reduced.", + "", + " Parameters:", + " - `new_history_depth`: The new history depth you would like to set.", + " - `era_items_deleted`: The number of items that will be deleted by this dispatch.", + " This should report all the storage items that will be deleted by clearing old", + " era history. Needed to report an accurate weight for the dispatch. Trusted by", + " `Root` to report an accurate number.", + "", + " Origin must be root.", + "", + " # ", + " - E: Number of history depths removed, i.e. 10 -> 7 = 3", + " - Weight: O(E)", + " - DB Weight:", + " - Reads: Current Era, History Depth", + " - Writes: History Depth", + " - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs", + " - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex", + " # " + ] + }, + { + "name": "reap_stash", + "args": [ + { + "name": "stash", + "type": "AccountId" + }, + { + "name": "num_slashing_spans", + "type": "u32" + } + ], + "documentation": [ + " Remove all data structure concerning a staker/stash once its balance is zero.", + " This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone", + " and the target `stash` must have no funds left.", + "", + " This can be called from any origin.", + "", + " - `stash`: The stash account to reap. Its balance must be zero.", + "", + " # ", + " Complexity: O(S) where S is the number of slashing spans on the account.", + " DB Weight:", + " - Reads: Stash Account, Bonded, Slashing Spans, Locks", + " - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks", + " - Writes Each: SpanSlash * S", + " # " + ] + }, + { + "name": "submit_election_solution", + "args": [ + { + "name": "winners", + "type": "Vec" + }, + { + "name": "compact", + "type": "CompactAssignments" + }, + { + "name": "score", + "type": "ElectionScore" + }, + { + "name": "era", + "type": "EraIndex" + }, + { + "name": "size", + "type": "ElectionSize" + } + ], + "documentation": [ + " Submit an election result to the chain. If the solution:", + "", + " 1. is valid.", + " 2. has a better score than a potentially existing solution on chain.", + "", + " then, it will be _put_ on chain.", + "", + " A solution consists of two pieces of data:", + "", + " 1. `winners`: a flat vector of all the winners of the round.", + " 2. `assignments`: the compact version of an assignment vector that encodes the edge", + " weights.", + "", + " Both of which may be computed using _phragmen_, or any other algorithm.", + "", + " Additionally, the submitter must provide:", + "", + " - The `score` that they claim their solution has.", + "", + " Both validators and nominators will be represented by indices in the solution. The", + " indices should respect the corresponding types ([`ValidatorIndex`] and", + " [`NominatorIndex`]). Moreover, they should be valid when used to index into", + " [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the", + " solution to be rejected. These two storage items are set during the election window and", + " may be used to determine the indices.", + "", + " A solution is valid if:", + "", + " 0. It is submitted when [`EraElectionStatus`] is `Open`.", + " 1. Its claimed score is equal to the score computed on-chain.", + " 2. Presents the correct number of winners.", + " 3. All indexes must be value according to the snapshot vectors. All edge values must", + " also be correct and should not overflow the granularity of the ratio type (i.e. 256", + " or billion).", + " 4. For each edge, all targets are actually nominated by the voter.", + " 5. Has correct self-votes.", + "", + " A solutions score is consisted of 3 parameters:", + "", + " 1. `min { support.total }` for each support of a winner. This value should be maximized.", + " 2. `sum { support.total }` for each support of a winner. This value should be minimized.", + " 3. `sum { support.total^2 }` for each support of a winner. This value should be", + " minimized (to ensure less variance)", + "", + " # ", + " The transaction is assumed to be the longest path, a better solution.", + " - Initial solution is almost the same.", + " - Worse solution is retraced in pre-dispatch-checks which sets its own weight.", + " # " + ] + }, + { + "name": "submit_election_solution_unsigned", + "args": [ + { + "name": "winners", + "type": "Vec" + }, + { + "name": "compact", + "type": "CompactAssignments" + }, + { + "name": "score", + "type": "ElectionScore" + }, + { + "name": "era", + "type": "EraIndex" + }, + { + "name": "size", + "type": "ElectionSize" + } + ], + "documentation": [ + " Unsigned version of `submit_election_solution`.", + "", + " Note that this must pass the [`ValidateUnsigned`] check which only allows transactions", + " from the local node to be included. In other words, only the block author can include a", + " transaction in the block.", + "", + " # ", + " See [`submit_election_solution`].", + " # " + ] + } + ], + "events": [ + { + "name": "EraPayout", + "args": [ + "EraIndex", + "Balance", + "Balance" + ], + "documentation": [ + " The era payout has been set; the first balance is the validator-payout; the second is", + " the remainder from the maximum amount of reward.", + " \\[era_index, validator_payout, remainder\\]" + ] + }, + { + "name": "Reward", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " The staker has been rewarded by this amount. \\[stash, amount\\]" + ] + }, + { + "name": "Slash", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " One validator (and its nominators) has been slashed by the given amount.", + " \\[validator, amount\\]" + ] + }, + { + "name": "OldSlashingReportDiscarded", + "args": [ + "SessionIndex" + ], + "documentation": [ + " An old slashing report from a prior era was discarded because it could", + " not be processed. \\[session_index\\]" + ] + }, + { + "name": "StakingElection", + "args": [ + "ElectionCompute" + ], + "documentation": [ + " A new set of stakers was elected with the given \\[compute\\]." + ] + }, + { + "name": "SolutionStored", + "args": [ + "ElectionCompute" + ], + "documentation": [ + " A new solution for the upcoming election has been stored. \\[compute\\]" + ] + }, + { + "name": "Bonded", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has bonded this amount. \\[stash, amount\\]", + "", + " NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,", + " it will not be emitted for staking rewards when they are added to stake." + ] + }, + { + "name": "Unbonded", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has unbonded this amount. \\[stash, amount\\]" + ] + }, + { + "name": "Withdrawn", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`", + " from the unlocking queue. \\[stash, amount\\]" + ] + } + ], + "constants": [ + { + "name": "SessionsPerEra", + "type": "SessionIndex", + "value": "0x06000000", + "documentation": [ + " Number of sessions per era." + ] + }, + { + "name": "BondingDuration", + "type": "EraIndex", + "value": "0xa0020000", + "documentation": [ + " Number of eras that staked funds must remain bonded for." + ] + }, + { + "name": "SlashDeferDuration", + "type": "EraIndex", + "value": "0xa8000000", + "documentation": [ + " Number of eras that slashes are deferred by, after computation.", + "", + " This should be less than the bonding duration.", + " Set to 0 if slashes should be applied immediately, without opportunity for", + " intervention." + ] + }, + { + "name": "ElectionLookahead", + "type": "BlockNumber", + "value": "0x32000000", + "documentation": [ + " The number of blocks before the end of the era from which election submissions are allowed.", + "", + " Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will", + " be used.", + "", + " This is bounded by being within the last session. Hence, setting it to a value more than the", + " length of a session will be pointless." + ] + }, + { + "name": "MaxIterations", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " Maximum number of balancing iterations to run in the offchain submission.", + "", + " If set to 0, balance_solution will not be executed at all." + ] + }, + { + "name": "MinSolutionScoreBump", + "type": "Perbill", + "value": "0x20a10700", + "documentation": [ + " The threshold of improvement that should be provided for a new solution to be accepted." + ] + }, + { + "name": "MaxNominatorRewardedPerValidator", + "type": "u32", + "value": "0x00010000", + "documentation": [ + " The maximum number of nominators rewarded for each validator.", + "", + " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim", + " their reward. This used to limit the i/o cost for the nominator payout." + ] + } + ], + "errors": [ + { + "name": "NotController", + "documentation": [ + " Not a controller account." + ] + }, + { + "name": "NotStash", + "documentation": [ + " Not a stash account." + ] + }, + { + "name": "AlreadyBonded", + "documentation": [ + " Stash is already bonded." + ] + }, + { + "name": "AlreadyPaired", + "documentation": [ + " Controller is already paired." + ] + }, + { + "name": "EmptyTargets", + "documentation": [ + " Targets cannot be empty." + ] + }, + { + "name": "DuplicateIndex", + "documentation": [ + " Duplicate index." + ] + }, + { + "name": "InvalidSlashIndex", + "documentation": [ + " Slash record index out of bounds." + ] + }, + { + "name": "InsufficientValue", + "documentation": [ + " Can not bond with value less than minimum balance." + ] + }, + { + "name": "NoMoreChunks", + "documentation": [ + " Can not schedule more unlock chunks." + ] + }, + { + "name": "NoUnlockChunk", + "documentation": [ + " Can not rebond without unlocking chunks." + ] + }, + { + "name": "FundedTarget", + "documentation": [ + " Attempting to target a stash that still has funds." + ] + }, + { + "name": "InvalidEraToReward", + "documentation": [ + " Invalid era to reward." + ] + }, + { + "name": "InvalidNumberOfNominations", + "documentation": [ + " Invalid number of nominations." + ] + }, + { + "name": "NotSortedAndUnique", + "documentation": [ + " Items are not sorted and unique." + ] + }, + { + "name": "AlreadyClaimed", + "documentation": [ + " Rewards for this era have already been claimed for this validator." + ] + }, + { + "name": "OffchainElectionEarlySubmission", + "documentation": [ + " The submitted result is received out of the open window." + ] + }, + { + "name": "OffchainElectionWeakSubmission", + "documentation": [ + " The submitted result is not as good as the one stored on chain." + ] + }, + { + "name": "SnapshotUnavailable", + "documentation": [ + " The snapshot data of the current window is missing." + ] + }, + { + "name": "OffchainElectionBogusWinnerCount", + "documentation": [ + " Incorrect number of winners were presented." + ] + }, + { + "name": "OffchainElectionBogusWinner", + "documentation": [ + " One of the submitted winners is not an active candidate on chain (index is out of range", + " in snapshot)." + ] + }, + { + "name": "OffchainElectionBogusCompact", + "documentation": [ + " Error while building the assignment type from the compact. This can happen if an index", + " is invalid, or if the weights _overflow_." + ] + }, + { + "name": "OffchainElectionBogusNominator", + "documentation": [ + " One of the submitted nominators is not an active nominator on chain." + ] + }, + { + "name": "OffchainElectionBogusNomination", + "documentation": [ + " One of the submitted nominators has an edge to which they have not voted on chain." + ] + }, + { + "name": "OffchainElectionSlashedNomination", + "documentation": [ + " One of the submitted nominators has an edge which is submitted before the last non-zero", + " slash of the target." + ] + }, + { + "name": "OffchainElectionBogusSelfVote", + "documentation": [ + " A self vote must only be originated from a validator to ONLY themselves." + ] + }, + { + "name": "OffchainElectionBogusEdge", + "documentation": [ + " The submitted result has unknown edges that are not among the presented winners." + ] + }, + { + "name": "OffchainElectionBogusScore", + "documentation": [ + " The claimed score does not match with the one computed from the data." + ] + }, + { + "name": "OffchainElectionBogusElectionSize", + "documentation": [ + " The election size is invalid." + ] + }, + { + "name": "CallNotAllowed", + "documentation": [ + " The call is not allowed at the given time due to restrictions of election period." + ] + }, + { + "name": "IncorrectHistoryDepth", + "documentation": [ + " Incorrect previous history depth input provided." + ] + }, + { + "name": "IncorrectSlashingSpans", + "documentation": [ + " Incorrect number of slashing spans provided." + ] + } + ], + "index": 8 + }, + { + "name": "Session", + "storage": { + "prefix": "Session", + "items": [ + { + "name": "Validators", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of validators." + ] + }, + { + "name": "CurrentIndex", + "modifier": "Default", + "type": { + "Plain": "SessionIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Current index of the session." + ] + }, + { + "name": "QueuedChanged", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the underlying economic identities or weighting behind the validators", + " has changed in the queued validator set." + ] + }, + { + "name": "QueuedKeys", + "modifier": "Default", + "type": { + "Plain": "Vec<(ValidatorId,Keys)>" + }, + "fallback": "0x00", + "documentation": [ + " The queued keys for the next session. When the next session begins, these keys", + " will be used to determine the validator's session keys." + ] + }, + { + "name": "DisabledValidators", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Indices of disabled validators.", + "", + " The set is cleared when `on_session_ending` returns a new set of identities." + ] + }, + { + "name": "NextKeys", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "ValidatorId", + "value": "Keys", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The next session keys for a validator." + ] + }, + { + "name": "KeyOwner", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "(KeyTypeId,Bytes)", + "value": "ValidatorId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The owner of a key. The key is the `KeyTypeId` + the encoded key." + ] + } + ] + }, + "calls": [ + { + "name": "set_keys", + "args": [ + { + "name": "keys", + "type": "Keys" + }, + { + "name": "proof", + "type": "Bytes" + } + ], + "documentation": [ + " Sets the session key(s) of the function caller to `keys`.", + " Allows an account to set its session key prior to becoming a validator.", + " This doesn't take effect until the next session.", + "", + " The dispatch origin of this function must be signed.", + "", + " # ", + " - Complexity: `O(1)`", + " Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.", + " - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`", + " - DbWrites: `origin account`, `NextKeys`", + " - DbReads per key id: `KeyOwner`", + " - DbWrites per key id: `KeyOwner`", + " # " + ] + }, + { + "name": "purge_keys", + "args": [], + "documentation": [ + " Removes any session key(s) of the function caller.", + " This doesn't take effect until the next session.", + "", + " The dispatch origin of this function must be signed.", + "", + " # ", + " - Complexity: `O(1)` in number of key types.", + " Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.", + " - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`", + " - DbWrites: `NextKeys`, `origin account`", + " - DbWrites per key id: `KeyOwnder`", + " # " + ] + } + ], + "events": [ + { + "name": "NewSession", + "args": [ + "SessionIndex" + ], + "documentation": [ + " New session has happened. Note that the argument is the \\[session_index\\], not the block", + " number as the type might suggest." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "InvalidProof", + "documentation": [ + " Invalid ownership proof." + ] + }, + { + "name": "NoAssociatedValidatorId", + "documentation": [ + " No associated validator ID for account." + ] + }, + { + "name": "DuplicatedKey", + "documentation": [ + " Registered duplicate key." + ] + }, + { + "name": "NoKeys", + "documentation": [ + " No keys are associated with this account." + ] + } + ], + "index": 9 + }, + { + "name": "Democracy", + "storage": { + "prefix": "Democracy", + "items": [ + { + "name": "PublicPropCount", + "modifier": "Default", + "type": { + "Plain": "PropIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of (public) proposals that have been made so far." + ] + }, + { + "name": "PublicProps", + "modifier": "Default", + "type": { + "Plain": "Vec<(PropIndex,Hash,AccountId)>" + }, + "fallback": "0x00", + "documentation": [ + " The public proposals. Unsorted. The second item is the proposal's hash." + ] + }, + { + "name": "DepositOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "PropIndex", + "value": "(Vec,BalanceOf)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Those who have locked a deposit.", + "", + " TWOX-NOTE: Safe, as increasing integer keys are safe." + ] + }, + { + "name": "Preimages", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "PreimageStatus", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map of hashes to the proposal preimage, along with who registered it and their deposit.", + " The block number is the block at which it was deposited." + ] + }, + { + "name": "ReferendumCount", + "modifier": "Default", + "type": { + "Plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The next free referendum index, aka the number of referenda started so far." + ] + }, + { + "name": "LowestUnbaked", + "modifier": "Default", + "type": { + "Plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The lowest referendum index representing an unbaked referendum. Equal to", + " `ReferendumCount` if there isn't a unbaked referendum." + ] + }, + { + "name": "ReferendumInfoOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "ReferendumIndex", + "value": "ReferendumInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information concerning any given referendum.", + "", + " TWOX-NOTE: SAFE as indexes are not under an attacker’s control." + ] + }, + { + "name": "VotingOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Voting", + "linked": false + } + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " All votes for a particular voter. We store the balance for the number of votes that we", + " have recorded. The second item is the total amount of delegations, that will be added.", + "", + " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway." + ] + }, + { + "name": "Locks", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "BlockNumber", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Accounts for which there are locks in action which may be removed at some point in the", + " future. The value is the block number at which the lock expires and may be removed.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "LastTabledWasExternal", + "modifier": "Default", + "type": { + "Plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the last referendum tabled was submitted externally. False if it was a public", + " proposal." + ] + }, + { + "name": "NextExternal", + "modifier": "Optional", + "type": { + "Plain": "(Hash,VoteThreshold)" + }, + "fallback": "0x00", + "documentation": [ + " The referendum to be tabled whenever it would be valid to table an external proposal.", + " This happens when a referendum needs to be tabled and one of two conditions are met:", + " - `LastTabledWasExternal` is `false`; or", + " - `PublicProps` is empty." + ] + }, + { + "name": "Blacklist", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "(BlockNumber,Vec)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A record of who vetoed what. Maps proposal hash to a possible existent block number", + " (until when it may not be resubmitted) and who vetoed it." + ] + }, + { + "name": "Cancellations", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "bool", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Record of all proposals that have been subject to emergency cancellation." + ] + }, + { + "name": "StorageVersion", + "modifier": "Optional", + "type": { + "Plain": "Releases" + }, + "fallback": "0x00", + "documentation": [ + " Storage version of the pallet.", + "", + " New networks start with last version." + ] + } + ] + }, + "calls": [ + { + "name": "propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken.", + "", + " The dispatch origin of this call must be _Signed_ and the sender must", + " have funds to cover the deposit.", + "", + " - `proposal_hash`: The hash of the proposal preimage.", + " - `value`: The amount of deposit (must be at least `MinimumDeposit`).", + "", + " Emits `Proposed`.", + "", + " Weight: `O(p)`" + ] + }, + { + "name": "second", + "args": [ + { + "name": "proposal", + "type": "Compact" + }, + { + "name": "seconds_upper_bound", + "type": "Compact" + } + ], + "documentation": [ + " Signals agreement with a particular proposal.", + "", + " The dispatch origin of this call must be _Signed_ and the sender", + " must have funds to cover the deposit, equal to the original deposit.", + "", + " - `proposal`: The index of the proposal to second.", + " - `seconds_upper_bound`: an upper bound on the current number of seconds on this", + " proposal. Extrinsic is weighted according to this value with no refund.", + "", + " Weight: `O(S)` where S is the number of seconds a proposal already has." + ] + }, + { + "name": "vote", + "args": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "name": "vote", + "type": "AccountVote" + } + ], + "documentation": [ + " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", + " otherwise it is a vote to keep the status quo.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `ref_index`: The index of the referendum to vote for.", + " - `vote`: The vote configuration.", + "", + " Weight: `O(R)` where R is the number of referendums the voter has voted on." + ] + }, + { + "name": "emergency_cancel", + "args": [ + { + "name": "ref_index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", + " referendum.", + "", + " The dispatch origin of this call must be `CancellationOrigin`.", + "", + " -`ref_index`: The index of the referendum to cancel.", + "", + " Weight: `O(1)`." + ] + }, + { + "name": "external_propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a referendum to be tabled once it is legal to schedule an external", + " referendum.", + "", + " The dispatch origin of this call must be `ExternalOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal.", + "", + " Weight: `O(V)` with V number of vetoers in the blacklist of proposal.", + " Decoding vec of length V. Charged as maximum" + ] + }, + { + "name": "external_propose_majority", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", + " an external referendum.", + "", + " The dispatch of this call must be `ExternalMajorityOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "external_propose_default", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", + " schedule an external referendum.", + "", + " The dispatch of this call must be `ExternalDefaultOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "fast_track", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "voting_period", + "type": "BlockNumber" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Schedule the currently externally-proposed majority-carries referendum to be tabled", + " immediately. If there is no externally-proposed referendum currently, or if there is one", + " but it is not a majority-carries referendum then it fails.", + "", + " The dispatch of this call must be `FastTrackOrigin`.", + "", + " - `proposal_hash`: The hash of the current external proposal.", + " - `voting_period`: The period that is allowed for voting on this proposal. Increased to", + " `FastTrackVotingPeriod` if too low.", + " - `delay`: The number of block after voting has ended in approval and this should be", + " enacted. This doesn't have a minimum amount.", + "", + " Emits `Started`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "veto_external", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Veto and blacklist the external proposal hash.", + "", + " The dispatch origin of this call must be `VetoOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal to veto and blacklist.", + "", + " Emits `Vetoed`.", + "", + " Weight: `O(V + log(V))` where V is number of `existing vetoers`" + ] + }, + { + "name": "cancel_referendum", + "args": [ + { + "name": "ref_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a referendum.", + "", + " The dispatch origin of this call must be _Root_.", + "", + " - `ref_index`: The index of the referendum to cancel.", + "", + " # Weight: `O(1)`." + ] + }, + { + "name": "cancel_queued", + "args": [ + { + "name": "which", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Cancel a proposal queued for enactment.", + "", + " The dispatch origin of this call must be _Root_.", + "", + " - `which`: The index of the referendum to cancel.", + "", + " Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`." + ] + }, + { + "name": "delegate", + "args": [ + { + "name": "to", + "type": "AccountId" + }, + { + "name": "conviction", + "type": "Conviction" + }, + { + "name": "balance", + "type": "BalanceOf" + } + ], + "documentation": [ + " Delegate the voting power (with some given conviction) of the sending account.", + "", + " The balance delegated is locked for as long as it's delegated, and thereafter for the", + " time appropriate for the conviction's lock period.", + "", + " The dispatch origin of this call must be _Signed_, and the signing account must either:", + " - be delegating already; or", + " - have no voting activity (if there is, then it will need to be removed/consolidated", + " through `reap_vote` or `unvote`).", + "", + " - `to`: The account whose voting the `target` account's voting power will follow.", + " - `conviction`: The conviction that will be attached to the delegated votes. When the", + " account is undelegated, the funds will be locked for the corresponding period.", + " - `balance`: The amount of the account's balance to be used in delegating. This must", + " not be more than the account's current balance.", + "", + " Emits `Delegated`.", + "", + " Weight: `O(R)` where R is the number of referendums the voter delegating to has", + " voted on. Weight is charged as if maximum votes." + ] + }, + { + "name": "undelegate", + "args": [], + "documentation": [ + " Undelegate the voting power of the sending account.", + "", + " Tokens may be unlocked following once an amount of time consistent with the lock period", + " of the conviction with which the delegation was issued.", + "", + " The dispatch origin of this call must be _Signed_ and the signing account must be", + " currently delegating.", + "", + " Emits `Undelegated`.", + "", + " Weight: `O(R)` where R is the number of referendums the voter delegating to has", + " voted on. Weight is charged as if maximum votes." + ] + }, + { + "name": "clear_public_proposals", + "args": [], + "documentation": [ + " Clears all public proposals.", + "", + " The dispatch origin of this call must be _Root_.", + "", + " Weight: `O(1)`." + ] + }, + { + "name": "note_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", + " in the dispatch queue but does require a deposit, returned once enacted.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `encoded_proposal`: The preimage of a proposal.", + "", + " Emits `PreimageNoted`.", + "", + " Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit)." + ] + }, + { + "name": "note_preimage_operational", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Same as `note_preimage` but origin is `OperationalPreimageOrigin`." + ] + }, + { + "name": "note_imminent_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This requires the proposal to be", + " in the dispatch queue. No deposit is needed. When this call is successful, i.e.", + " the preimage has not been uploaded before and matches some imminent proposal,", + " no fee is paid.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `encoded_proposal`: The preimage of a proposal.", + "", + " Emits `PreimageNoted`.", + "", + " Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit)." + ] + }, + { + "name": "note_imminent_preimage_operational", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`." + ] + }, + { + "name": "reap_preimage", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "proposal_len_upper_bound", + "type": "Compact" + } + ], + "documentation": [ + " Remove an expired proposal preimage and collect the deposit.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `proposal_hash`: The preimage hash of a proposal.", + " - `proposal_length_upper_bound`: an upper bound on length of the proposal.", + " Extrinsic is weighted according to this value with no refund.", + "", + " This will only work after `VotingPeriod` blocks from the time that the preimage was", + " noted, if it's the same account doing it. If it's a different account, then it'll only", + " work an additional `EnactmentPeriod` later.", + "", + " Emits `PreimageReaped`.", + "", + " Weight: `O(D)` where D is length of proposal." + ] + }, + { + "name": "unlock", + "args": [ + { + "name": "target", + "type": "AccountId" + } + ], + "documentation": [ + " Unlock tokens that have an expired lock.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `target`: The account to remove the lock on.", + "", + " Weight: `O(R)` with R number of vote of target." + ] + }, + { + "name": "remove_vote", + "args": [ + { + "name": "index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Remove a vote for a referendum.", + "", + " If:", + " - the referendum was cancelled, or", + " - the referendum is ongoing, or", + " - the referendum has ended such that", + " - the vote of the account was in opposition to the result; or", + " - there was no conviction to the account's vote; or", + " - the account made a split vote", + " ...then the vote is removed cleanly and a following call to `unlock` may result in more", + " funds being available.", + "", + " If, however, the referendum has ended and:", + " - it finished corresponding to the vote of the account, and", + " - the account made a standard vote with conviction, and", + " - the lock period of the conviction is not over", + " ...then the lock will be aggregated into the overall account's lock, which may involve", + " *overlocking* (where the two locks are combined into a single lock that is the maximum", + " of both the amount locked and the time is it locked for).", + "", + " The dispatch origin of this call must be _Signed_, and the signer must have a vote", + " registered for referendum `index`.", + "", + " - `index`: The index of referendum of the vote to be removed.", + "", + " Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.", + " Weight is calculated for the maximum number of vote." + ] + }, + { + "name": "remove_other_vote", + "args": [ + { + "name": "target", + "type": "AccountId" + }, + { + "name": "index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Remove a vote for a referendum.", + "", + " If the `target` is equal to the signer, then this function is exactly equivalent to", + " `remove_vote`. If not equal to the signer, then the vote must have expired,", + " either because the referendum was cancelled, because the voter lost the referendum or", + " because the conviction period is over.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `target`: The account of the vote to be removed; this account must have voted for", + " referendum `index`.", + " - `index`: The index of referendum of the vote to be removed.", + "", + " Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.", + " Weight is calculated for the maximum number of vote." + ] + }, + { + "name": "enact_proposal", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Enact a proposal from a referendum. For now we just make the weight be the maximum." + ] + }, + { + "name": "blacklist", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "maybe_ref_index", + "type": "Option" + } + ], + "documentation": [ + " Permanently place a proposal into the blacklist. This prevents it from ever being", + " proposed again.", + "", + " If called on a queued public or external proposal, then this will result in it being", + " removed. If the `ref_index` supplied is an active referendum with the proposal hash,", + " then it will be cancelled.", + "", + " The dispatch origin of this call must be `BlacklistOrigin`.", + "", + " - `proposal_hash`: The proposal hash to blacklist permanently.", + " - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be", + " cancelled.", + "", + " Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a", + " reasonable value)." + ] + }, + { + "name": "cancel_proposal", + "args": [ + { + "name": "prop_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a proposal.", + "", + " The dispatch origin of this call must be `CancelProposalOrigin`.", + "", + " - `prop_index`: The index of the proposal to cancel.", + "", + " Weight: `O(p)` where `p = PublicProps::::decode_len()`" + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "PropIndex", + "Balance" + ], + "documentation": [ + " A motion has been proposed by a public account. \\[proposal_index, deposit\\]" + ] + }, + { + "name": "Tabled", + "args": [ + "PropIndex", + "Balance", + "Vec" + ], + "documentation": [ + " A public proposal has been tabled for referendum vote. \\[proposal_index, deposit, depositors\\]" + ] + }, + { + "name": "ExternalTabled", + "args": [], + "documentation": [ + " An external proposal has been tabled." + ] + }, + { + "name": "Started", + "args": [ + "ReferendumIndex", + "VoteThreshold" + ], + "documentation": [ + " A referendum has begun. \\[ref_index, threshold\\]" + ] + }, + { + "name": "Passed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been approved by referendum. \\[ref_index\\]" + ] + }, + { + "name": "NotPassed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been rejected by referendum. \\[ref_index\\]" + ] + }, + { + "name": "Cancelled", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A referendum has been cancelled. \\[ref_index\\]" + ] + }, + { + "name": "Executed", + "args": [ + "ReferendumIndex", + "bool" + ], + "documentation": [ + " A proposal has been enacted. \\[ref_index, is_ok\\]" + ] + }, + { + "name": "Delegated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " An account has delegated their vote to another account. \\[who, target\\]" + ] + }, + { + "name": "Undelegated", + "args": [ + "AccountId" + ], + "documentation": [ + " An \\[account\\] has cancelled a previous delegation operation." + ] + }, + { + "name": "Vetoed", + "args": [ + "AccountId", + "Hash", + "BlockNumber" + ], + "documentation": [ + " An external proposal has been vetoed. \\[who, proposal_hash, until\\]" + ] + }, + { + "name": "PreimageNoted", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal's preimage was noted, and the deposit taken. \\[proposal_hash, who, deposit\\]" + ] + }, + { + "name": "PreimageUsed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal preimage was removed and used (the deposit was returned).", + " \\[proposal_hash, provider, deposit\\]" + ] + }, + { + "name": "PreimageInvalid", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was invalid.", + " \\[proposal_hash, ref_index\\]" + ] + }, + { + "name": "PreimageMissing", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was missing.", + " \\[proposal_hash, ref_index\\]" + ] + }, + { + "name": "PreimageReaped", + "args": [ + "Hash", + "AccountId", + "Balance", + "AccountId" + ], + "documentation": [ + " A registered preimage was removed and the deposit collected by the reaper.", + " \\[proposal_hash, provider, deposit, reaper\\]" + ] + }, + { + "name": "Unlocked", + "args": [ + "AccountId" + ], + "documentation": [ + " An \\[account\\] has been unlocked successfully." + ] + }, + { + "name": "Blacklisted", + "args": [ + "Hash" + ], + "documentation": [ + " A proposal \\[hash\\] has been blacklisted permanently." + ] + } + ], + "constants": [ + { + "name": "EnactmentPeriod", + "type": "BlockNumber", + "value": "0x002f0d00", + "documentation": [ + " The minimum period of locking and the period between a proposal being approved and enacted.", + "", + " It should generally be a little more than the unstake period to ensure that", + " voting stakers have an opportunity to remove themselves from the system in the case where", + " they are on the losing side of a vote." + ] + }, + { + "name": "LaunchPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) new public referenda are launched." + ] + }, + { + "name": "VotingPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "MinimumDeposit", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "documentation": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "FastTrackVotingPeriod", + "type": "BlockNumber", + "value": "0x80510100", + "documentation": [ + " Minimum voting period allowed for an emergency referendum." + ] + }, + { + "name": "CooloffPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " Period in blocks where an external proposal may not be re-submitted after being vetoed." + ] + }, + { + "name": "PreimageByteDeposit", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount of balance that must be deposited per byte of preimage stored." + ] + }, + { + "name": "MaxVotes", + "type": "u32", + "value": "0x64000000", + "documentation": [ + " The maximum number of votes for an account." + ] + } + ], + "errors": [ + { + "name": "ValueLow", + "documentation": [ + " Value too low" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal does not exist" + ] + }, + { + "name": "BadIndex", + "documentation": [ + " Unknown index" + ] + }, + { + "name": "AlreadyCanceled", + "documentation": [ + " Cannot cancel the same proposal twice" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Proposal already made" + ] + }, + { + "name": "ProposalBlacklisted", + "documentation": [ + " Proposal still blacklisted" + ] + }, + { + "name": "NotSimpleMajority", + "documentation": [ + " Next external proposal not simple majority" + ] + }, + { + "name": "InvalidHash", + "documentation": [ + " Invalid hash" + ] + }, + { + "name": "NoProposal", + "documentation": [ + " No external proposal" + ] + }, + { + "name": "AlreadyVetoed", + "documentation": [ + " Identity may not veto a proposal twice" + ] + }, + { + "name": "NotDelegated", + "documentation": [ + " Not delegated" + ] + }, + { + "name": "DuplicatePreimage", + "documentation": [ + " Preimage already noted" + ] + }, + { + "name": "NotImminent", + "documentation": [ + " Not imminent" + ] + }, + { + "name": "TooEarly", + "documentation": [ + " Too early" + ] + }, + { + "name": "Imminent", + "documentation": [ + " Imminent" + ] + }, + { + "name": "PreimageMissing", + "documentation": [ + " Preimage not found" + ] + }, + { + "name": "ReferendumInvalid", + "documentation": [ + " Vote given for invalid referendum" + ] + }, + { + "name": "PreimageInvalid", + "documentation": [ + " Invalid preimage" + ] + }, + { + "name": "NoneWaiting", + "documentation": [ + " No proposals waiting" + ] + }, + { + "name": "NotLocked", + "documentation": [ + " The target account does not have a lock." + ] + }, + { + "name": "NotExpired", + "documentation": [ + " The lock on the account to be unlocked has not yet expired." + ] + }, + { + "name": "NotVoter", + "documentation": [ + " The given account did not vote on the referendum." + ] + }, + { + "name": "NoPermission", + "documentation": [ + " The actor has no permission to conduct the action." + ] + }, + { + "name": "AlreadyDelegating", + "documentation": [ + " The account is already delegating." + ] + }, + { + "name": "Overflow", + "documentation": [ + " An unexpected integer overflow occurred." + ] + }, + { + "name": "Underflow", + "documentation": [ + " An unexpected integer underflow occurred." + ] + }, + { + "name": "InsufficientFunds", + "documentation": [ + " Too high a balance was provided that the account cannot afford." + ] + }, + { + "name": "NotDelegating", + "documentation": [ + " The account is not currently delegating." + ] + }, + { + "name": "VotesExist", + "documentation": [ + " The account currently has votes attached to it and the operation cannot succeed until", + " these are removed, either through `unvote` or `reap_vote`." + ] + }, + { + "name": "InstantNotAllowed", + "documentation": [ + " The instant referendum origin is currently disallowed." + ] + }, + { + "name": "Nonsense", + "documentation": [ + " Delegation to oneself makes no sense." + ] + }, + { + "name": "WrongUpperBound", + "documentation": [ + " Invalid upper bound." + ] + }, + { + "name": "MaxVotesReached", + "documentation": [ + " Maximum number of votes reached." + ] + }, + { + "name": "InvalidWitness", + "documentation": [ + " The provided witness data is wrong." + ] + }, + { + "name": "TooManyProposals", + "documentation": [ + " Maximum number of proposals reached." + ] + } + ], + "index": 10 + }, + { + "name": "Council", + "storage": { + "prefix": "Instance1Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The prime member that helps determine the default vote behavior in case of absentations." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + }, + { + "name": "prime", + "type": "Option" + }, + { + "name": "old_count", + "type": "MemberCount" + } + ], + "documentation": [ + " Set the collective's membership.", + "", + " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", + " - `prime`: The prime member whose vote sets the default.", + " - `old_count`: The upper bound for the previous number of members in storage.", + " Used for weight estimation.", + "", + " Requires root origin.", + "", + " NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", + " the weight estimations rely on it to estimate dispatchable weight.", + "", + " # ", + " ## Weight", + " - `O(MP + N)` where:", + " - `M` old-members-count (code- and governance-bounded)", + " - `N` new-members-count (code- and governance-bounded)", + " - `P` proposals-count (code-bounded)", + " - DB:", + " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members", + " - 1 storage read (codec `O(P)`) for reading the proposals", + " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", + " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", + " # " + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective.", + "", + " # ", + " ## Weight", + " - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`", + " - DB: 1 read (codec `O(M)`) + DB access of `proposal`", + " - 1 event", + " # " + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Add a new proposal to either be voted on or executed directly.", + "", + " Requires the sender to be member.", + "", + " `threshold` determines whether `proposal` is executed directly (`threshold < 2`)", + " or put up for voting.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1)` or `O(B + M + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - branching is influenced by `threshold` where:", + " - `P1` is proposal execution complexity (`threshold < 2`)", + " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", + " - DB:", + " - 1 storage read `is_member` (codec `O(M)`)", + " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", + " - DB accesses influenced by `threshold`:", + " - EITHER storage accesses done by `proposal` (`threshold < 2`)", + " - OR proposal insertion (`threshold <= 2`)", + " - 1 storage mutation `Proposals` (codec `O(P2)`)", + " - 1 storage mutation `ProposalCount` (codec `O(1)`)", + " - 1 storage write `ProposalOf` (codec `O(B)`)", + " - 1 storage write `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " Add an aye or nay vote for the sender to the given proposal.", + "", + " Requires the sender to be a member.", + "", + " Transaction fees will be waived if the member is voting on any particular proposal", + " for the first time and the call is successful. Subsequent vote changes will charge a fee.", + " # ", + " ## Weight", + " - `O(M)` where `M` is members-count (code- and governance-bounded)", + " - DB:", + " - 1 storage read `Members` (codec `O(M)`)", + " - 1 storage mutation `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "close", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "proposal_weight_bound", + "type": "Compact" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Close a vote that is either approved, disapproved or whose voting period has ended.", + "", + " May be called by any signed account in order to finish voting and close the proposal.", + "", + " If called before the end of the voting period it will only close the vote if it is", + " has enough votes to be approved or disapproved.", + "", + " If called after the end of the voting period abstentions are counted as rejections", + " unless there is a prime member set and the prime member cast an approval.", + "", + " If the close operation completes successfully with disapproval, the transaction fee will", + " be waived. Otherwise execution of the approved operation will be charged to the caller.", + "", + " + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.", + " + `length_bound`: The upper bound for the length of the proposal in storage. Checked via", + " `storage::read` so it is `size_of::() == 4` larger than the pure length.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1 + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - `P1` is the complexity of `proposal` preimage.", + " - `P2` is proposal-count (code-bounded)", + " - DB:", + " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", + " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)", + " - any mutations done while executing `proposal` (`P1`)", + " - up to 3 events", + " # " + ] + }, + { + "name": "disapprove_proposal", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", + "", + " Must be called by the Root origin.", + "", + " Parameters:", + " * `proposal_hash`: The hash of the proposal that should be disapproved.", + "", + " # ", + " Complexity: O(P) where P is the number of max proposals", + " DB Weight:", + " * Reads: Proposals", + " * Writes: Voting, Proposals, ProposalOf", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`).", + " \\[account, proposal_index, proposal_hash, threshold\\]" + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`).", + " \\[account, proposal_hash, voted, yes, no\\]" + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold.", + " \\[proposal_hash\\]" + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold.", + " \\[proposal_hash\\]" + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A motion was executed; result will be `Ok` if it returned without error.", + " \\[proposal_hash, result\\]" + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A single member did some action; result will be `Ok` if it returned without error.", + " \\[proposal_hash, result\\]" + ] + }, + { + "name": "Closed", + "args": [ + "Hash", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A proposal was closed because its threshold was reached or after its duration was up.", + " \\[proposal_hash, yes, no\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "NotMember", + "documentation": [ + " Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "documentation": [ + " Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "documentation": [ + " Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "documentation": [ + " Members are already initialized!" + ] + }, + { + "name": "TooEarly", + "documentation": [ + " The close call was made too early, before the end of the voting." + ] + }, + { + "name": "TooManyProposals", + "documentation": [ + " There can only be a maximum of `MaxProposals` active proposals." + ] + }, + { + "name": "WrongProposalWeight", + "documentation": [ + " The given weight bound for the proposal was too low." + ] + }, + { + "name": "WrongProposalLength", + "documentation": [ + " The given length bound for the proposal was too low." + ] + } + ], + "index": 11 + }, + { + "name": "TechnicalCommittee", + "storage": { + "prefix": "Instance2Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The prime member that helps determine the default vote behavior in case of absentations." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + }, + { + "name": "prime", + "type": "Option" + }, + { + "name": "old_count", + "type": "MemberCount" + } + ], + "documentation": [ + " Set the collective's membership.", + "", + " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", + " - `prime`: The prime member whose vote sets the default.", + " - `old_count`: The upper bound for the previous number of members in storage.", + " Used for weight estimation.", + "", + " Requires root origin.", + "", + " NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", + " the weight estimations rely on it to estimate dispatchable weight.", + "", + " # ", + " ## Weight", + " - `O(MP + N)` where:", + " - `M` old-members-count (code- and governance-bounded)", + " - `N` new-members-count (code- and governance-bounded)", + " - `P` proposals-count (code-bounded)", + " - DB:", + " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members", + " - 1 storage read (codec `O(P)`) for reading the proposals", + " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", + " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", + " # " + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective.", + "", + " # ", + " ## Weight", + " - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`", + " - DB: 1 read (codec `O(M)`) + DB access of `proposal`", + " - 1 event", + " # " + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Add a new proposal to either be voted on or executed directly.", + "", + " Requires the sender to be member.", + "", + " `threshold` determines whether `proposal` is executed directly (`threshold < 2`)", + " or put up for voting.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1)` or `O(B + M + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - branching is influenced by `threshold` where:", + " - `P1` is proposal execution complexity (`threshold < 2`)", + " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", + " - DB:", + " - 1 storage read `is_member` (codec `O(M)`)", + " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", + " - DB accesses influenced by `threshold`:", + " - EITHER storage accesses done by `proposal` (`threshold < 2`)", + " - OR proposal insertion (`threshold <= 2`)", + " - 1 storage mutation `Proposals` (codec `O(P2)`)", + " - 1 storage mutation `ProposalCount` (codec `O(1)`)", + " - 1 storage write `ProposalOf` (codec `O(B)`)", + " - 1 storage write `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " Add an aye or nay vote for the sender to the given proposal.", + "", + " Requires the sender to be a member.", + "", + " Transaction fees will be waived if the member is voting on any particular proposal", + " for the first time and the call is successful. Subsequent vote changes will charge a fee.", + " # ", + " ## Weight", + " - `O(M)` where `M` is members-count (code- and governance-bounded)", + " - DB:", + " - 1 storage read `Members` (codec `O(M)`)", + " - 1 storage mutation `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "close", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "proposal_weight_bound", + "type": "Compact" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Close a vote that is either approved, disapproved or whose voting period has ended.", + "", + " May be called by any signed account in order to finish voting and close the proposal.", + "", + " If called before the end of the voting period it will only close the vote if it is", + " has enough votes to be approved or disapproved.", + "", + " If called after the end of the voting period abstentions are counted as rejections", + " unless there is a prime member set and the prime member cast an approval.", + "", + " If the close operation completes successfully with disapproval, the transaction fee will", + " be waived. Otherwise execution of the approved operation will be charged to the caller.", + "", + " + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.", + " + `length_bound`: The upper bound for the length of the proposal in storage. Checked via", + " `storage::read` so it is `size_of::() == 4` larger than the pure length.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1 + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - `P1` is the complexity of `proposal` preimage.", + " - `P2` is proposal-count (code-bounded)", + " - DB:", + " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", + " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)", + " - any mutations done while executing `proposal` (`P1`)", + " - up to 3 events", + " # " + ] + }, + { + "name": "disapprove_proposal", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", + "", + " Must be called by the Root origin.", + "", + " Parameters:", + " * `proposal_hash`: The hash of the proposal that should be disapproved.", + "", + " # ", + " Complexity: O(P) where P is the number of max proposals", + " DB Weight:", + " * Reads: Proposals", + " * Writes: Voting, Proposals, ProposalOf", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`).", + " \\[account, proposal_index, proposal_hash, threshold\\]" + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`).", + " \\[account, proposal_hash, voted, yes, no\\]" + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold.", + " \\[proposal_hash\\]" + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold.", + " \\[proposal_hash\\]" + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A motion was executed; result will be `Ok` if it returned without error.", + " \\[proposal_hash, result\\]" + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A single member did some action; result will be `Ok` if it returned without error.", + " \\[proposal_hash, result\\]" + ] + }, + { + "name": "Closed", + "args": [ + "Hash", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A proposal was closed because its threshold was reached or after its duration was up.", + " \\[proposal_hash, yes, no\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "NotMember", + "documentation": [ + " Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "documentation": [ + " Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "documentation": [ + " Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "documentation": [ + " Members are already initialized!" + ] + }, + { + "name": "TooEarly", + "documentation": [ + " The close call was made too early, before the end of the voting." + ] + }, + { + "name": "TooManyProposals", + "documentation": [ + " There can only be a maximum of `MaxProposals` active proposals." + ] + }, + { + "name": "WrongProposalWeight", + "documentation": [ + " The given weight bound for the proposal was too low." + ] + }, + { + "name": "WrongProposalLength", + "documentation": [ + " The given length bound for the proposal was too low." + ] + } + ], + "index": 12 + }, + { + "name": "Elections", + "storage": { + "prefix": "PhragmenElection", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec<(AccountId,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The current elected membership. Sorted based on account id." + ] + }, + { + "name": "RunnersUp", + "modifier": "Default", + "type": { + "Plain": "Vec<(AccountId,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The current runners_up. Sorted based on low to high merit (worse to best)." + ] + }, + { + "name": "ElectionRounds", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The total number of vote rounds that have happened, excluding the upcoming one." + ] + }, + { + "name": "Voting", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(BalanceOf,Vec)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " Votes and locked stake of a particular voter.", + "", + " TWOX-NOTE: SAFE as `AccountId` is a crypto hash" + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The present candidate list. Sorted based on account-id. A current member or runner-up", + " can never enter this vector and is always implicitly assumed to be a candidate." + ] + } + ] + }, + "calls": [ + { + "name": "vote", + "args": [ + { + "name": "votes", + "type": "Vec" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Vote for a set of candidates for the upcoming round of election. This can be called to", + " set the initial votes, or update already existing votes.", + "", + " Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is", + " reserved.", + "", + " The `votes` should:", + " - not be empty.", + " - be less than the number of possible candidates. Note that all current members and", + " runners-up are also automatically candidates for the next round.", + "", + " It is the responsibility of the caller to not place all of their balance into the lock", + " and keep some for further transactions.", + "", + " # ", + " Base weight: 47.93 µs", + " State reads:", + " \t- Candidates.len() + Members.len() + RunnersUp.len()", + " \t- Voting (is_voter)", + " \t- Lock", + " \t- [AccountBalance(who) (unreserve + total_balance)]", + " State writes:", + " \t- Voting", + " \t- Lock", + " \t- [AccountBalance(who) (unreserve -- only when creating a new voter)]", + " # " + ] + }, + { + "name": "remove_voter", + "args": [], + "documentation": [ + " Remove `origin` as a voter. This removes the lock and returns the bond.", + "", + " # ", + " Base weight: 36.8 µs", + " All state access is from do_remove_voter.", + " State reads:", + " \t- Voting", + " \t- [AccountData(who)]", + " State writes:", + " \t- Voting", + " \t- Locks", + " \t- [AccountData(who)]", + " # " + ] + }, + { + "name": "report_defunct_voter", + "args": [ + { + "name": "defunct", + "type": "DefunctVoter" + } + ], + "documentation": [ + " Report `target` for being an defunct voter. In case of a valid report, the reporter is", + " rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and", + " their bond is slashed.", + "", + " A defunct voter is defined to be:", + " - a voter whose current submitted votes are all invalid. i.e. all of them are no", + " longer a candidate nor an active member or a runner-up.", + "", + "", + " The origin must provide the number of current candidates and votes of the reported target", + " for the purpose of accurate weight calculation.", + "", + " # ", + " No Base weight based on min square analysis.", + " Complexity of candidate_count: 1.755 µs", + " Complexity of vote_count: 18.51 µs", + " State reads:", + " \t- Voting(reporter)", + " \t- Candidate.len()", + " \t- Voting(Target)", + " \t- Candidates, Members, RunnersUp (is_defunct_voter)", + " State writes:", + " \t- Lock(reporter || target)", + " \t- [AccountBalance(reporter)] + AccountBalance(target)", + " \t- Voting(reporter || target)", + " Note: the db access is worse with respect to db, which is when the report is correct.", + " # " + ] + }, + { + "name": "submit_candidacy", + "args": [ + { + "name": "candidate_count", + "type": "Compact" + } + ], + "documentation": [ + " Submit oneself for candidacy.", + "", + " A candidate will either:", + " - Lose at the end of the term and forfeit their deposit.", + " - Win and become a member. Members will eventually get their stash back.", + " - Become a runner-up. Runners-ups are reserved members in case one gets forcefully", + " removed.", + "", + " # ", + " Base weight = 33.33 µs", + " Complexity of candidate_count: 0.375 µs", + " State reads:", + " \t- Candidates", + " \t- Members", + " \t- RunnersUp", + " \t- [AccountBalance(who)]", + " State writes:", + " \t- [AccountBalance(who)]", + " \t- Candidates", + " # " + ] + }, + { + "name": "renounce_candidacy", + "args": [ + { + "name": "renouncing", + "type": "Renouncing" + } + ], + "documentation": [ + " Renounce one's intention to be a candidate for the next election round. 3 potential", + " outcomes exist:", + " - `origin` is a candidate and not elected in any set. In this case, the bond is", + " unreserved, returned and origin is removed as a candidate.", + " - `origin` is a current runner-up. In this case, the bond is unreserved, returned and", + " origin is removed as a runner-up.", + " - `origin` is a current member. In this case, the bond is unreserved and origin is", + " removed as a member, consequently not being a candidate for the next round anymore.", + " Similar to [`remove_voter`], if replacement runners exists, they are immediately used.", + " ", + " If a candidate is renouncing:", + " \tBase weight: 17.28 µs", + " \tComplexity of candidate_count: 0.235 µs", + " \tState reads:", + " \t\t- Candidates", + " \t\t- [AccountBalance(who) (unreserve)]", + " \tState writes:", + " \t\t- Candidates", + " \t\t- [AccountBalance(who) (unreserve)]", + " If member is renouncing:", + " \tBase weight: 46.25 µs", + " \tState reads:", + " \t\t- Members, RunnersUp (remove_and_replace_member),", + " \t\t- [AccountData(who) (unreserve)]", + " \tState writes:", + " \t\t- Members, RunnersUp (remove_and_replace_member),", + " \t\t- [AccountData(who) (unreserve)]", + " If runner is renouncing:", + " \tBase weight: 46.25 µs", + " \tState reads:", + " \t\t- RunnersUp (remove_and_replace_member),", + " \t\t- [AccountData(who) (unreserve)]", + " \tState writes:", + " \t\t- RunnersUp (remove_and_replace_member),", + " \t\t- [AccountData(who) (unreserve)]", + " " + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "has_replacement", + "type": "bool" + } + ], + "documentation": [ + " Remove a particular member from the set. This is effective immediately and the bond of", + " the outgoing member is slashed.", + "", + " If a runner-up is available, then the best runner-up will be removed and replaces the", + " outgoing member. Otherwise, a new phragmen election is started.", + "", + " Note that this does not affect the designated block number of the next election.", + "", + " # ", + " If we have a replacement:", + " \t- Base weight: 50.93 µs", + " \t- State reads:", + " \t\t- RunnersUp.len()", + " \t\t- Members, RunnersUp (remove_and_replace_member)", + " \t- State writes:", + " \t\t- Members, RunnersUp (remove_and_replace_member)", + " Else, since this is a root call and will go into phragmen, we assume full block for now.", + " # " + ] + } + ], + "events": [ + { + "name": "NewTerm", + "args": [ + "Vec<(AccountId,Balance)>" + ], + "documentation": [ + " A new term with \\[new_members\\]. This indicates that enough candidates existed to run the", + " election, not that enough have has been elected. The inner value must be examined for", + " this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond slashed and", + " none were elected, whilst `EmptyTerm` means that no candidates existed to begin with." + ] + }, + { + "name": "EmptyTerm", + "args": [], + "documentation": [ + " No (or not enough) candidates existed for this round. This is different from", + " `NewTerm(\\[\\])`. See the description of `NewTerm`." + ] + }, + { + "name": "ElectionError", + "args": [], + "documentation": [ + " Internal error happened while trying to perform election." + ] + }, + { + "name": "MemberKicked", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[member\\] has been removed. This should always be followed by either `NewTerm` or", + " `EmptyTerm`." + ] + }, + { + "name": "CandidateSlashed", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A candidate was slashed due to failing to obtain a seat as member or runner-up" + ] + }, + { + "name": "SeatHolderSlashed", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A seat holder (member or runner-up) was slashed due to failing to retaining their position." + ] + }, + { + "name": "MemberRenounced", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[member\\] has renounced their candidacy." + ] + }, + { + "name": "VoterReported", + "args": [ + "AccountId", + "AccountId", + "bool" + ], + "documentation": [ + " A voter was reported with the the report being successful or not.", + " \\[voter, reporter, success\\]" + ] + } + ], + "constants": [ + { + "name": "CandidacyBond", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [] + }, + { + "name": "VotingBond", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [] + }, + { + "name": "DesiredMembers", + "type": "u32", + "value": "0x0d000000", + "documentation": [] + }, + { + "name": "DesiredRunnersUp", + "type": "u32", + "value": "0x07000000", + "documentation": [] + }, + { + "name": "TermDuration", + "type": "BlockNumber", + "value": "0x80130300", + "documentation": [] + }, + { + "name": "ModuleId", + "type": "LockIdentifier", + "value": "0x706872656c656374", + "documentation": [] + } + ], + "errors": [ + { + "name": "UnableToVote", + "documentation": [ + " Cannot vote when no candidates or members exist." + ] + }, + { + "name": "NoVotes", + "documentation": [ + " Must vote for at least one candidate." + ] + }, + { + "name": "TooManyVotes", + "documentation": [ + " Cannot vote more than candidates." + ] + }, + { + "name": "MaximumVotesExceeded", + "documentation": [ + " Cannot vote more than maximum allowed." + ] + }, + { + "name": "LowBalance", + "documentation": [ + " Cannot vote with stake less than minimum balance." + ] + }, + { + "name": "UnableToPayBond", + "documentation": [ + " Voter can not pay voting bond." + ] + }, + { + "name": "MustBeVoter", + "documentation": [ + " Must be a voter." + ] + }, + { + "name": "ReportSelf", + "documentation": [ + " Cannot report self." + ] + }, + { + "name": "DuplicatedCandidate", + "documentation": [ + " Duplicated candidate submission." + ] + }, + { + "name": "MemberSubmit", + "documentation": [ + " Member cannot re-submit candidacy." + ] + }, + { + "name": "RunnerSubmit", + "documentation": [ + " Runner cannot re-submit candidacy." + ] + }, + { + "name": "InsufficientCandidateFunds", + "documentation": [ + " Candidate does not have enough funds." + ] + }, + { + "name": "NotMember", + "documentation": [ + " Not a member." + ] + }, + { + "name": "InvalidCandidateCount", + "documentation": [ + " The provided count of number of candidates is incorrect." + ] + }, + { + "name": "InvalidVoteCount", + "documentation": [ + " The provided count of number of votes is incorrect." + ] + }, + { + "name": "InvalidRenouncing", + "documentation": [ + " The renouncing origin presented a wrong `Renouncing` parameter." + ] + }, + { + "name": "InvalidReplacement", + "documentation": [ + " Prediction regarding replacement after member removal is wrong." + ] + } + ], + "index": 13 + }, + { + "name": "TechnicalMembership", + "storage": { + "prefix": "Instance1Membership", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current membership, stored as an ordered Vec." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The current prime member, if one exists." + ] + } + ] + }, + "calls": [ + { + "name": "add_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Add a member `who` to the set.", + "", + " May only be called from `T::AddOrigin`." + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Remove a member `who` from the set.", + "", + " May only be called from `T::RemoveOrigin`." + ] + }, + { + "name": "swap_member", + "args": [ + { + "name": "remove", + "type": "AccountId" + }, + { + "name": "add", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out one member `remove` for another `add`.", + "", + " May only be called from `T::SwapOrigin`.", + "", + " Prime membership is *not* passed from `remove` to `add`, if extant." + ] + }, + { + "name": "reset_members", + "args": [ + { + "name": "members", + "type": "Vec" + } + ], + "documentation": [ + " Change the membership to a new set, disregarding the existing membership. Be nice and", + " pass `members` pre-sorted.", + "", + " May only be called from `T::ResetOrigin`." + ] + }, + { + "name": "change_key", + "args": [ + { + "name": "new", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out the sending member for some other key `new`.", + "", + " May only be called from `Signed` origin of a current member.", + "", + " Prime membership is passed from the origin account to `new`, if extant." + ] + }, + { + "name": "set_prime", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Set the prime member. Must be a current member.", + "", + " May only be called from `T::PrimeOrigin`." + ] + }, + { + "name": "clear_prime", + "args": [], + "documentation": [ + " Remove the prime member if it exists.", + "", + " May only be called from `T::PrimeOrigin`." + ] + } + ], + "events": [ + { + "name": "MemberAdded", + "args": [], + "documentation": [ + " The given member was added; see the transaction for who." + ] + }, + { + "name": "MemberRemoved", + "args": [], + "documentation": [ + " The given member was removed; see the transaction for who." + ] + }, + { + "name": "MembersSwapped", + "args": [], + "documentation": [ + " Two members were swapped; see the transaction for who." + ] + }, + { + "name": "MembersReset", + "args": [], + "documentation": [ + " The membership was reset; see the transaction for who the new set is." + ] + }, + { + "name": "KeyChanged", + "args": [], + "documentation": [ + " One of the members' keys changed." + ] + }, + { + "name": "Dummy", + "args": [ + "PhantomData" + ], + "documentation": [ + " Phantom member, never used." + ] + } + ], + "constants": [], + "errors": [], + "index": 14 + }, + { + "name": "Grandpa", + "storage": { + "prefix": "GrandpaFinality", + "items": [ + { + "name": "State", + "modifier": "Default", + "type": { + "Plain": "StoredState" + }, + "fallback": "0x00", + "documentation": [ + " State of the current authority set." + ] + }, + { + "name": "PendingChange", + "modifier": "Optional", + "type": { + "Plain": "StoredPendingChange" + }, + "fallback": "0x00", + "documentation": [ + " Pending change: (signaled at, scheduled change)." + ] + }, + { + "name": "NextForced", + "modifier": "Optional", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00", + "documentation": [ + " next block number where we can force a change." + ] + }, + { + "name": "Stalled", + "modifier": "Optional", + "type": { + "Plain": "(BlockNumber,BlockNumber)" + }, + "fallback": "0x00", + "documentation": [ + " `true` if we are currently stalled." + ] + }, + { + "name": "CurrentSetId", + "modifier": "Default", + "type": { + "Plain": "SetId" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The number of changes (both in terms of keys and underlying economic responsibilities)", + " in the \"set\" of Grandpa validators from genesis." + ] + }, + { + "name": "SetIdSession", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "SetId", + "value": "SessionIndex", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from grandpa set ID to the index of the *most recent* session for which its", + " members were responsible.", + "", + " TWOX-NOTE: `SetId` is not under user control." + ] + } + ] + }, + "calls": [ + { + "name": "report_equivocation", + "args": [ + { + "name": "equivocation_proof", + "type": "GrandpaEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report voter equivocation/misbehavior. This method will verify the", + " equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence", + " will be reported." + ] + }, + { + "name": "report_equivocation_unsigned", + "args": [ + { + "name": "equivocation_proof", + "type": "GrandpaEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report voter equivocation/misbehavior. This method will verify the", + " equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence", + " will be reported.", + "", + " This extrinsic must be called unsigned and it is expected that only", + " block authors will call it (validated in `ValidateUnsigned`), as such", + " if the block author is defined it will be defined as the equivocation", + " reporter." + ] + }, + { + "name": "note_stalled", + "args": [ + { + "name": "delay", + "type": "BlockNumber" + }, + { + "name": "best_finalized_block_number", + "type": "BlockNumber" + } + ], + "documentation": [ + " Note that the current authority set of the GRANDPA finality gadget has", + " stalled. This will trigger a forced authority set change at the beginning", + " of the next session, to be enacted `delay` blocks after that. The delay", + " should be high enough to safely assume that the block signalling the", + " forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters", + " will start the new authority set using the given finalized block as base.", + " Only callable by root." + ] + } + ], + "events": [ + { + "name": "NewAuthorities", + "args": [ + "AuthorityList" + ], + "documentation": [ + " New authority set has been applied. \\[authority_set\\]" + ] + }, + { + "name": "Paused", + "args": [], + "documentation": [ + " Current authority set has been paused." + ] + }, + { + "name": "Resumed", + "args": [], + "documentation": [ + " Current authority set has been resumed." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "PauseFailed", + "documentation": [ + " Attempt to signal GRANDPA pause when the authority set isn't live", + " (either paused or already pending pause)." + ] + }, + { + "name": "ResumeFailed", + "documentation": [ + " Attempt to signal GRANDPA resume when the authority set isn't paused", + " (either live or already pending resume)." + ] + }, + { + "name": "ChangePending", + "documentation": [ + " Attempt to signal GRANDPA change with one already pending." + ] + }, + { + "name": "TooSoon", + "documentation": [ + " Cannot signal forced change so soon after last." + ] + }, + { + "name": "InvalidKeyOwnershipProof", + "documentation": [ + " A key ownership proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "InvalidEquivocationProof", + "documentation": [ + " An equivocation proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "DuplicateOffenceReport", + "documentation": [ + " A given equivocation report is valid but already previously reported." + ] + } + ], + "index": 15 + }, + { + "name": "Treasury", + "storage": { + "prefix": "Treasury", + "items": [ + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "Plain": "ProposalIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Number of proposals that have been made." + ] + }, + { + "name": "Proposals", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "ProposalIndex", + "value": "TreasuryProposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Proposals that have been made." + ] + }, + { + "name": "Approvals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Proposal indices that have been approved but not yet awarded." + ] + } + ] + }, + "calls": [ + { + "name": "propose_spend", + "args": [ + { + "name": "value", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "LookupSource" + } + ], + "documentation": [ + " Put forward a suggestion for spending. A deposit proportional to the value", + " is reserved and slashed if the proposal is rejected. It is returned once the", + " proposal is awarded.", + "", + " # ", + " - Complexity: O(1)", + " - DbReads: `ProposalCount`, `origin account`", + " - DbWrites: `ProposalCount`, `Proposals`, `origin account`", + " # " + ] + }, + { + "name": "reject_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Reject a proposed spend. The original deposit will be slashed.", + "", + " May only be called from `T::RejectOrigin`.", + "", + " # ", + " - Complexity: O(1)", + " - DbReads: `Proposals`, `rejected proposer account`", + " - DbWrites: `Proposals`, `rejected proposer account`", + " # " + ] + }, + { + "name": "approve_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", + " and the original deposit will be returned.", + "", + " May only be called from `T::ApproveOrigin`.", + "", + " # ", + " - Complexity: O(1).", + " - DbReads: `Proposals`, `Approvals`", + " - DbWrite: `Approvals`", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "ProposalIndex" + ], + "documentation": [ + " New proposal. \\[proposal_index\\]" + ] + }, + { + "name": "Spending", + "args": [ + "Balance" + ], + "documentation": [ + " We have ended a spend period and will now allocate funds. \\[budget_remaining\\]" + ] + }, + { + "name": "Awarded", + "args": [ + "ProposalIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " Some funds have been allocated. \\[proposal_index, award, beneficiary\\]" + ] + }, + { + "name": "Rejected", + "args": [ + "ProposalIndex", + "Balance" + ], + "documentation": [ + " A proposal was rejected; funds were slashed. \\[proposal_index, slashed\\]" + ] + }, + { + "name": "Burnt", + "args": [ + "Balance" + ], + "documentation": [ + " Some of our funds have been burnt. \\[burn\\]" + ] + }, + { + "name": "Rollover", + "args": [ + "Balance" + ], + "documentation": [ + " Spending has finished; this is the amount that rolls over until next spend.", + " \\[budget_remaining\\]" + ] + }, + { + "name": "Deposit", + "args": [ + "Balance" + ], + "documentation": [ + " Some funds have been deposited. \\[deposit\\]" + ] + } + ], + "constants": [ + { + "name": "ProposalBond", + "type": "Permill", + "value": "0x50c30000", + "documentation": [ + " Fraction of a proposal's value that should be bonded in order to place the proposal.", + " An accepted proposal gets these back. A rejected proposal does not." + ] + }, + { + "name": "ProposalBondMinimum", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "SpendPeriod", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " Period between successive spends." + ] + }, + { + "name": "Burn", + "type": "Permill", + "value": "0x20a10700", + "documentation": [ + " Percentage of spare funds (if any) that are burnt per spend period." + ] + }, + { + "name": "ModuleId", + "type": "ModuleId", + "value": "0x70792f7472737279", + "documentation": [ + " The treasury's module id, used for deriving its sovereign account ID." + ] + } + ], + "errors": [ + { + "name": "InsufficientProposersBalance", + "documentation": [ + " Proposer's balance is too low." + ] + }, + { + "name": "InvalidIndex", + "documentation": [ + " No proposal or bounty at that index." + ] + } + ], + "index": 16 + }, + { + "name": "Contracts", + "storage": { + "prefix": "Contracts", + "items": [ + { + "name": "CurrentSchedule", + "modifier": "Default", + "type": { + "Plain": "Schedule" + }, + "fallback": "0x00000000000400000000020000000100008000000010000000001000000001000020000000000008002a0600001d620200846b03008b180000671d0000610a00001d180000cc2a00005c000000a17001003e020300f307000046070000e807000001080000f4190000db280000a908000013249208f8080000d0080000060b000007090000ad080000520800009c0800006f0a0000e7090000020a0000f30900002b0a0000f8090000d10900001b0a0000390a0000270a0000560f0000dc070000260a000036200000381c0000ec1f0000d51c0000780a0000bc0a00005f0a0000e40900003e0a0000330a0000470a0000270a00006cf1380000000000a0f938000000000040ff3800000000008ca77b00000000001a6c3800000000008876380000000000b481380000000000d4f981000000000028543800000000008a4c380000000000c87d5f00000000008a9f1c0000000000c8e57400000000000b01000000000000983c530000000000a90200000000000050de382a0000000038476124000000006467b209000000002418910000000000b2dfd100000000001a6fe7070000000039090000000000004e86990000000000dad35a1000000000cd07000000000000eaaf830a00000000a01f2a0200000000ae0500000000000008f7270b000000003675e30700000000f4753c09000000000102000000000000d20200000000000008efb81d000000000802000000000000e602000000000000b90a000000000000c25731000000000026100000000000007a8e330000000000d80c00000000000040c22f0000000000d305000000000000067f2f0000000000d705000000000000", + "documentation": [ + " Current cost schedule for contracts." + ] + }, + { + "name": "PristineCode", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "CodeHash", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from an original code hash to the original code, untouched by instrumentation." + ] + }, + { + "name": "CodeStorage", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "CodeHash", + "value": "PrefabWasmModule", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping between an original code hash and instrumented wasm code, ready for execution." + ] + }, + { + "name": "AccountCounter", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The subtrie counter." + ] + }, + { + "name": "ContractInfoOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "ContractInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The code associated with a given account.", + "", + " TWOX-NOTE: SAFE since `AccountId` is a secure hash." + ] + } + ] + }, + "calls": [ + { + "name": "update_schedule", + "args": [ + { + "name": "schedule", + "type": "Schedule" + } + ], + "documentation": [ + " Updates the schedule for metering contracts.", + "", + " The schedule must have a greater version than the stored schedule." + ] + }, + { + "name": "put_code", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Stores the given binary Wasm code into the chain's storage and returns its `codehash`.", + " You can instantiate contracts only with stored code." + ] + }, + { + "name": "call", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Makes a call to an account, optionally transferring some balance.", + "", + " * If the account is a smart-contract account, the associated code will be", + " executed and any value will be transferred.", + " * If the account is a regular account, any value will be transferred.", + " * If no account exists and the call value is not less than `existential_deposit`,", + " a regular account will be created and any value will be transferred." + ] + }, + { + "name": "instantiate", + "args": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code_hash", + "type": "CodeHash" + }, + { + "name": "data", + "type": "Bytes" + }, + { + "name": "salt", + "type": "Bytes" + } + ], + "documentation": [ + " Instantiates a new contract from the `code_hash` generated by `put_code`,", + " optionally transferring some balance.", + "", + " The supplied `salt` is used for contract address deriviation. See `fn contract_address`.", + "", + " Instantiation is executed as follows:", + "", + " - The destination address is computed based on the sender, code_hash and the salt.", + " - The smart-contract account is created at the computed address.", + " - The `ctor_code` is executed in the context of the newly-created account. Buffer returned", + " after the execution is saved as the `code` of the account. That code will be invoked", + " upon any call received by this account.", + " - The contract is initialized." + ] + }, + { + "name": "claim_surcharge", + "args": [ + { + "name": "dest", + "type": "AccountId" + }, + { + "name": "aux_sender", + "type": "Option" + } + ], + "documentation": [ + " Allows block producers to claim a small reward for evicting a contract. If a block producer", + " fails to do so, a regular users will be allowed to claim the reward.", + "", + " If contract is not evicted as a result of this call, no actions are taken and", + " the sender is not eligible for the reward." + ] + } + ], + "events": [ + { + "name": "Instantiated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Contract deployed by address at the specified address. \\[owner, contract\\]" + ] + }, + { + "name": "Evicted", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " Contract has been evicted and is now in tombstone state.", + " \\[contract, tombstone\\]", + "", + " # Params", + "", + " - `contract`: `AccountId`: The account ID of the evicted contract.", + " - `tombstone`: `bool`: True if the evicted contract left behind a tombstone." + ] + }, + { + "name": "Restored", + "args": [ + "AccountId", + "AccountId", + "Hash", + "Balance" + ], + "documentation": [ + " Restoration for a contract has been successful.", + " \\[donor, dest, code_hash, rent_allowance\\]", + "", + " # Params", + "", + " - `donor`: `AccountId`: Account ID of the restoring contract", + " - `dest`: `AccountId`: Account ID of the restored contract", + " - `code_hash`: `Hash`: Code hash of the restored contract", + " - `rent_allowance: `Balance`: Rent allowance of the restored contract" + ] + }, + { + "name": "CodeStored", + "args": [ + "Hash" + ], + "documentation": [ + " Code with the specified hash has been stored.", + " \\[code_hash\\]" + ] + }, + { + "name": "ScheduleUpdated", + "args": [ + "u32" + ], + "documentation": [ + " Triggered when the current \\[schedule\\] is updated." + ] + }, + { + "name": "ContractExecution", + "args": [ + "AccountId", + "Bytes" + ], + "documentation": [ + " An event deposited upon execution of a contract from the account.", + " \\[account, data\\]" + ] + } + ], + "constants": [ + { + "name": "SignedClaimHandicap", + "type": "BlockNumber", + "value": "0x02000000", + "documentation": [ + " Number of block delay an extrinsic claim surcharge has.", + "", + " When claim surcharge is called by an extrinsic the rent is checked", + " for current_block - delay" + ] + }, + { + "name": "TombstoneDeposit", + "type": "BalanceOf", + "value": "0x00a0acb9030000000000000000000000", + "documentation": [ + " The minimum amount required to generate a tombstone." + ] + }, + { + "name": "StorageSizeOffset", + "type": "u32", + "value": "0x08000000", + "documentation": [ + " A size offset for an contract. A just created account with untouched storage will have that", + " much of storage from the perspective of the state rent.", + "", + " This is a simple way to ensure that contracts with empty storage eventually get deleted", + " by making them pay rent. This creates an incentive to remove them early in order to save", + " rent." + ] + }, + { + "name": "RentByteFee", + "type": "BalanceOf", + "value": "0x00286bee000000000000000000000000", + "documentation": [ + " Price of a byte of storage per one block interval. Should be greater than 0." + ] + }, + { + "name": "RentDepositOffset", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount of funds a contract should deposit in order to offset", + " the cost of one byte.", + "", + " Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,", + " then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent.", + " But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000,", + " then it would pay 500 BU/day." + ] + }, + { + "name": "SurchargeReward", + "type": "BalanceOf", + "value": "0x005cb2ec220000000000000000000000", + "documentation": [ + " Reward that is received by the party whose touch has led", + " to removal of a contract." + ] + }, + { + "name": "MaxDepth", + "type": "u32", + "value": "0x20000000", + "documentation": [ + " The maximum nesting level of a call/instantiate stack. A reasonable default", + " value is 100." + ] + }, + { + "name": "MaxValueSize", + "type": "u32", + "value": "0x00400000", + "documentation": [ + " The maximum size of a storage value in bytes. A reasonable default is 16 KiB." + ] + } + ], + "errors": [ + { + "name": "InvalidScheduleVersion", + "documentation": [ + " A new schedule must have a greater version than the current one." + ] + }, + { + "name": "InvalidSurchargeClaim", + "documentation": [ + " An origin must be signed or inherent and auxiliary sender only provided on inherent." + ] + }, + { + "name": "InvalidSourceContract", + "documentation": [ + " Cannot restore from nonexisting or tombstone contract." + ] + }, + { + "name": "InvalidDestinationContract", + "documentation": [ + " Cannot restore to nonexisting or alive contract." + ] + }, + { + "name": "InvalidTombstone", + "documentation": [ + " Tombstones don't match." + ] + }, + { + "name": "InvalidContractOrigin", + "documentation": [ + " An origin TrieId written in the current block." + ] + }, + { + "name": "OutOfGas", + "documentation": [ + " The executed contract exhausted its gas limit." + ] + }, + { + "name": "OutputBufferTooSmall", + "documentation": [ + " The output buffer supplied to a contract API call was too small." + ] + }, + { + "name": "BelowSubsistenceThreshold", + "documentation": [ + " Performing the requested transfer would have brought the contract below", + " the subsistence threshold. No transfer is allowed to do this in order to allow", + " for a tombstone to be created. Use `seal_terminate` to remove a contract without", + " leaving a tombstone behind." + ] + }, + { + "name": "NewContractNotFunded", + "documentation": [ + " The newly created contract is below the subsistence threshold after executing", + " its contructor. No contracts are allowed to exist below that threshold." + ] + }, + { + "name": "TransferFailed", + "documentation": [ + " Performing the requested transfer failed for a reason originating in the", + " chosen currency implementation of the runtime. Most probably the balance is", + " too low or locks are placed on it." + ] + }, + { + "name": "MaxCallDepthReached", + "documentation": [ + " Performing a call was denied because the calling depth reached the limit", + " of what is specified in the schedule." + ] + }, + { + "name": "NotCallable", + "documentation": [ + " The contract that was called is either no contract at all (a plain account)", + " or is a tombstone." + ] + }, + { + "name": "CodeTooLarge", + "documentation": [ + " The code supplied to `put_code` exceeds the limit specified in the current schedule." + ] + }, + { + "name": "CodeNotFound", + "documentation": [ + " No code could be found at the supplied code hash." + ] + }, + { + "name": "OutOfBounds", + "documentation": [ + " A buffer outside of sandbox memory was passed to a contract API function." + ] + }, + { + "name": "DecodingFailed", + "documentation": [ + " Input passed to a contract API function failed to decode as expected type." + ] + }, + { + "name": "ContractTrapped", + "documentation": [ + " Contract trapped during execution." + ] + }, + { + "name": "ValueTooLarge", + "documentation": [ + " The size defined in `T::MaxValueSize` was exceeded." + ] + }, + { + "name": "ReentranceDenied", + "documentation": [ + " The action performed is not allowed while the contract performing it is already", + " on the call stack. Those actions are contract self destruction and restoration", + " of a tombstone." + ] + } + ], + "index": 17 + }, + { + "name": "Sudo", + "storage": { + "prefix": "Sudo", + "items": [ + { + "name": "Key", + "modifier": "Default", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The `AccountId` of the sudo key." + ] + } + ] + }, + "calls": [ + { + "name": "sudo", + "args": [ + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Root` origin.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Weight of derivative `call` execution + 10,000.", + " # " + ] + }, + { + "name": "sudo_unchecked_weight", + "args": [ + { + "name": "call", + "type": "Call" + }, + { + "name": "_weight", + "type": "Weight" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Root` origin.", + " This function does not check the weight of the call, and instead allows the", + " Sudo user to specify the weight of the call.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - The weight of this call is defined by the caller.", + " # " + ] + }, + { + "name": "set_key", + "args": [ + { + "name": "new", + "type": "LookupSource" + } + ], + "documentation": [ + " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB change.", + " # " + ] + }, + { + "name": "sudo_as", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Signed` origin from", + " a given account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Weight of derivative `call` execution + 10,000.", + " # " + ] + } + ], + "events": [ + { + "name": "Sudid", + "args": [ + "DispatchResult" + ], + "documentation": [ + " A sudo just took place. \\[result\\]" + ] + }, + { + "name": "KeyChanged", + "args": [ + "AccountId" + ], + "documentation": [ + " The \\[sudoer\\] just switched identity; the old key is supplied." + ] + }, + { + "name": "SudoAsDone", + "args": [ + "DispatchResult" + ], + "documentation": [ + " A sudo just took place. \\[result\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "RequireSudo", + "documentation": [ + " Sender must be the Sudo account" + ] + } + ], + "index": 18 + }, + { + "name": "ImOnline", + "storage": { + "prefix": "ImOnline", + "items": [ + { + "name": "HeartbeatAfter", + "modifier": "Default", + "type": { + "Plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The block number after which it's ok to send heartbeats in current session.", + "", + " At the beginning of each session we set this to a value that should", + " fall roughly in the middle of the session duration.", + " The idea is to first wait for the validators to produce a block", + " in the current session, so that the heartbeat later on will not be necessary." + ] + }, + { + "name": "Keys", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of keys that may issue a heartbeat." + ] + }, + { + "name": "ReceivedHeartbeats", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "SessionIndex", + "key2": "AuthIndex", + "value": "Bytes", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " For each session index, we keep a mapping of `AuthIndex` to", + " `offchain::OpaqueNetworkState`." + ] + }, + { + "name": "AuthoredBlocks", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "SessionIndex", + "key2": "ValidatorId", + "value": "u32", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00000000", + "documentation": [ + " For each session index, we keep a mapping of `T::ValidatorId` to the", + " number of blocks authored by the given authority." + ] + } + ] + }, + "calls": [ + { + "name": "heartbeat", + "args": [ + { + "name": "heartbeat", + "type": "Heartbeat" + }, + { + "name": "_signature", + "type": "Signature" + } + ], + "documentation": [ + " # ", + " - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len)", + " and E is length of `heartbeat.network_state.external_address`", + " - `O(K)`: decoding of length `K`", + " - `O(E)`: decoding/encoding of length `E`", + " - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,", + " `ReceivedHeartbeats`", + " - DbWrites: `ReceivedHeartbeats`", + " # " + ] + } + ], + "events": [ + { + "name": "HeartbeatReceived", + "args": [ + "AuthorityId" + ], + "documentation": [ + " A new heartbeat was received from `AuthorityId` \\[authority_id\\]" + ] + }, + { + "name": "AllGood", + "args": [], + "documentation": [ + " At the end of the session, no offence was committed." + ] + }, + { + "name": "SomeOffline", + "args": [ + "Vec" + ], + "documentation": [ + " At the end of the session, at least one validator was found to be \\[offline\\]." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "InvalidKey", + "documentation": [ + " Non existent public key." + ] + }, + { + "name": "DuplicatedHeartbeat", + "documentation": [ + " Duplicated heartbeat." + ] + } + ], + "index": 19 + }, + { + "name": "AuthorityDiscovery", + "storage": null, + "calls": [], + "events": null, + "constants": [], + "errors": [], + "index": 20 + }, + { + "name": "Offences", + "storage": { + "prefix": "Offences", + "items": [ + { + "name": "Reports", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "ReportIdOf", + "value": "OffenceDetails", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The primary structure that holds all offence records keyed by report identifiers." + ] + }, + { + "name": "DeferredOffences", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Deferred reports that have been rejected by the offence handler and need to be submitted", + " at a later time." + ] + }, + { + "name": "ConcurrentReportsIndex", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "Kind", + "key2": "OpaqueTimeSlot", + "value": "Vec", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " A vector of reports of the same kind that happened at the same time slot." + ] + }, + { + "name": "ReportsByKindIndex", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "Kind", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Enumerates all reports of a kind along with the time they happened.", + "", + " All reports are sorted by the time of offence.", + "", + " Note that the actual type of this mapping is `Vec`, this is because values of", + " different types are not supported at the moment so we are doing the manual serialization." + ] + } + ] + }, + "calls": [], + "events": [ + { + "name": "Offence", + "args": [ + "Kind", + "OpaqueTimeSlot", + "bool" + ], + "documentation": [ + " There is an offence reported of the given `kind` happened at the `session_index` and", + " (kind-specific) time slot. This event is not deposited for duplicate slashes. last", + " element indicates of the offence was applied (true) or queued (false)", + " \\[kind, timeslot, applied\\]." + ] + } + ], + "constants": [], + "errors": [], + "index": 21 + }, + { + "name": "Historical", + "storage": null, + "calls": null, + "events": null, + "constants": [], + "errors": [], + "index": 22 + }, + { + "name": "RandomnessCollectiveFlip", + "storage": { + "prefix": "RandomnessCollectiveFlip", + "items": [ + { + "name": "RandomMaterial", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Series of block headers from the last 81 blocks that acts as random seed material. This", + " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", + " the oldest hash." + ] + } + ] + }, + "calls": [], + "events": null, + "constants": [], + "errors": [], + "index": 23 + }, + { + "name": "Identity", + "storage": { + "prefix": "Identity", + "items": [ + { + "name": "IdentityOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Registration", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information that is pertinent to identify the entity behind an account.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "SuperOf", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "(AccountId,Data)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The super-identity of an alternative \"sub\" identity together with its name, within that", + " context. If the account is not some other account's sub-identity, then just `None`." + ] + }, + { + "name": "SubsOf", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(BalanceOf,Vec)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " Alternative \"sub\" identities of this account.", + "", + " The first item is the deposit, the second is a vector of the accounts.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "Registrars", + "modifier": "Default", + "type": { + "Plain": "Vec>" + }, + "fallback": "0x00", + "documentation": [ + " The set of registrars. Not expected to get very big as can only be added through a", + " special origin (likely a council motion).", + "", + " The index into this can be cast to `RegistrarIndex` to get a valid value." + ] + } + ] + }, + "calls": [ + { + "name": "add_registrar", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Add a registrar to the system.", + "", + " The dispatch origin for this call must be `T::RegistrarOrigin`.", + "", + " - `account`: the account of the registrar.", + "", + " Emits `RegistrarAdded` if successful.", + "", + " # ", + " - `O(R)` where `R` registrar-count (governance-bounded and code-bounded).", + " - One storage mutation (codec `O(R)`).", + " - One event.", + " # " + ] + }, + { + "name": "set_identity", + "args": [ + { + "name": "info", + "type": "IdentityInfo" + } + ], + "documentation": [ + " Set an account's identity information and reserve the appropriate deposit.", + "", + " If the account already has identity information, the deposit is taken as part payment", + " for the new deposit.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `info`: The identity information.", + "", + " Emits `IdentitySet` if successful.", + "", + " # ", + " - `O(X + X' + R)`", + " - where `X` additional-field-count (deposit-bounded and code-bounded)", + " - where `R` judgements-count (registrar-count-bounded)", + " - One balance reserve operation.", + " - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`).", + " - One event.", + " # " + ] + }, + { + "name": "set_subs", + "args": [ + { + "name": "subs", + "type": "Vec<(AccountId,Data)>" + } + ], + "documentation": [ + " Set the sub-accounts of the sender.", + "", + " Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", + " and an amount `SubAccountDeposit` will be reserved for each item in `subs`.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " identity.", + "", + " - `subs`: The identity's (new) sub-accounts.", + "", + " # ", + " - `O(P + S)`", + " - where `P` old-subs-count (hard- and deposit-bounded).", + " - where `S` subs-count (hard- and deposit-bounded).", + " - At most one balance operations.", + " - DB:", + " - `P + S` storage mutations (codec complexity `O(1)`)", + " - One storage read (codec complexity `O(P)`).", + " - One storage write (codec complexity `O(S)`).", + " - One storage-exists (`IdentityOf::contains_key`).", + " # " + ] + }, + { + "name": "clear_identity", + "args": [], + "documentation": [ + " Clear an account's identity info and all sub-accounts and return all deposits.", + "", + " Payment: All reserved balances on the account are returned.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " identity.", + "", + " Emits `IdentityCleared` if successful.", + "", + " # ", + " - `O(R + S + X)`", + " - where `R` registrar-count (governance-bounded).", + " - where `S` subs-count (hard- and deposit-bounded).", + " - where `X` additional-field-count (deposit-bounded and code-bounded).", + " - One balance-unreserve operation.", + " - `2` storage reads and `S + 2` storage deletions.", + " - One event.", + " # " + ] + }, + { + "name": "request_judgement", + "args": [ + { + "name": "reg_index", + "type": "Compact" + }, + { + "name": "max_fee", + "type": "Compact" + } + ], + "documentation": [ + " Request a judgement from a registrar.", + "", + " Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", + " given.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a", + " registered identity.", + "", + " - `reg_index`: The index of the registrar whose judgement is requested.", + " - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:", + "", + " ```nocompile", + " Self::registrars().get(reg_index).unwrap().fee", + " ```", + "", + " Emits `JudgementRequested` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-reserve operation.", + " - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`.", + " - One event.", + " # " + ] + }, + { + "name": "cancel_request", + "args": [ + { + "name": "reg_index", + "type": "RegistrarIndex" + } + ], + "documentation": [ + " Cancel a previous request.", + "", + " Payment: A previously reserved deposit is returned on success.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a", + " registered identity.", + "", + " - `reg_index`: The index of the registrar whose judgement is no longer requested.", + "", + " Emits `JudgementUnrequested` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-reserve operation.", + " - One storage mutation `O(R + X)`.", + " - One event", + " # " + ] + }, + { + "name": "set_fee", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "fee", + "type": "Compact" + } + ], + "documentation": [ + " Set the fee required for a judgement to be requested from a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `fee`: the new fee.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " - Benchmark: 7.315 + R * 0.329 µs (min squares analysis)", + " # " + ] + }, + { + "name": "set_account_id", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "new", + "type": "AccountId" + } + ], + "documentation": [ + " Change the account associated with a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `new`: the new account ID.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " - Benchmark: 8.823 + R * 0.32 µs (min squares analysis)", + " # " + ] + }, + { + "name": "set_fields", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "fields", + "type": "IdentityFields" + } + ], + "documentation": [ + " Set the field information for a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `fields`: the fields that the registrar concerns themselves with.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " - Benchmark: 7.464 + R * 0.325 µs (min squares analysis)", + " # " + ] + }, + { + "name": "provide_judgement", + "args": [ + { + "name": "reg_index", + "type": "Compact" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "judgement", + "type": "IdentityJudgement" + } + ], + "documentation": [ + " Provide a judgement for an account's identity.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `reg_index`.", + "", + " - `reg_index`: the index of the registrar whose judgement is being made.", + " - `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + " - `judgement`: the judgement of the registrar of index `reg_index` about `target`.", + "", + " Emits `JudgementGiven` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-transfer operation.", + " - Up to one account-lookup operation.", + " - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`.", + " - One event.", + " # " + ] + }, + { + "name": "kill_identity", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove an account's identity and sub-account information and slash the deposits.", + "", + " Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", + " `Slash`. Verification request deposits are not returned; they should be cancelled", + " manually using `cancel_request`.", + "", + " The dispatch origin for this call must match `T::ForceOrigin`.", + "", + " - `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + "", + " Emits `IdentityKilled` if successful.", + "", + " # ", + " - `O(R + S + X)`.", + " - One balance-reserve operation.", + " - `S + 2` storage mutations.", + " - One event.", + " # " + ] + }, + { + "name": "add_sub", + "args": [ + { + "name": "sub", + "type": "LookupSource" + }, + { + "name": "data", + "type": "Data" + } + ], + "documentation": [ + " Add the given account to the sender's subs.", + "", + " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + " to the sender.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " sub identity of `sub`." + ] + }, + { + "name": "rename_sub", + "args": [ + { + "name": "sub", + "type": "LookupSource" + }, + { + "name": "data", + "type": "Data" + } + ], + "documentation": [ + " Alter the associated name of the given sub-account.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " sub identity of `sub`." + ] + }, + { + "name": "remove_sub", + "args": [ + { + "name": "sub", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove the given account from the sender's subs.", + "", + " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + " to the sender.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " sub identity of `sub`." + ] + }, + { + "name": "quit_sub", + "args": [], + "documentation": [ + " Remove the sender as a sub-account.", + "", + " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + " to the sender (*not* the original depositor).", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " super-identity.", + "", + " NOTE: This should not normally be used, but is provided in the case that the non-", + " controller of an account is maliciously registered as a sub-account." + ] + } + ], + "events": [ + { + "name": "IdentitySet", + "args": [ + "AccountId" + ], + "documentation": [ + " A name was set or reset (which will remove all judgements). \\[who\\]" + ] + }, + { + "name": "IdentityCleared", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was cleared, and the given balance returned. \\[who, deposit\\]" + ] + }, + { + "name": "IdentityKilled", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was removed and the given balance slashed. \\[who, deposit\\]" + ] + }, + { + "name": "JudgementRequested", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement was asked from a registrar. \\[who, registrar_index\\]" + ] + }, + { + "name": "JudgementUnrequested", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement request was retracted. \\[who, registrar_index\\]" + ] + }, + { + "name": "JudgementGiven", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement was given by a registrar. \\[target, registrar_index\\]" + ] + }, + { + "name": "RegistrarAdded", + "args": [ + "RegistrarIndex" + ], + "documentation": [ + " A registrar was added. \\[registrar_index\\]" + ] + }, + { + "name": "SubIdentityAdded", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " A sub-identity was added to an identity and the deposit paid. \\[sub, main, deposit\\]" + ] + }, + { + "name": "SubIdentityRemoved", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " A sub-identity was removed from an identity and the deposit freed.", + " \\[sub, main, deposit\\]" + ] + }, + { + "name": "SubIdentityRevoked", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " A sub-identity was cleared, and the given deposit repatriated from the", + " main identity account to the sub-identity account. \\[sub, main, deposit\\]" + ] + } + ], + "constants": [ + { + "name": "BasicDeposit", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [ + " The amount held on deposit for a registered identity." + ] + }, + { + "name": "FieldDeposit", + "type": "BalanceOf", + "value": "0x00a031a95fe300000000000000000000", + "documentation": [ + " The amount held on deposit per additional field for a registered identity." + ] + }, + { + "name": "SubAccountDeposit", + "type": "BalanceOf", + "value": "0x0080f420e6b500000000000000000000", + "documentation": [ + " The amount held on deposit for a registered subaccount. This should account for the fact", + " that one storage item's value will increase by the size of an account ID, and there will be", + " another trie item whose value is the size of an account ID plus 32 bytes." + ] + }, + { + "name": "MaxSubAccounts", + "type": "u32", + "value": "0x64000000", + "documentation": [ + " The maximum number of sub-accounts allowed per identified account." + ] + }, + { + "name": "MaxAdditionalFields", + "type": "u32", + "value": "0x64000000", + "documentation": [ + " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O", + " required to access an identity, but can be pretty high." + ] + }, + { + "name": "MaxRegistrars", + "type": "u32", + "value": "0x14000000", + "documentation": [ + " Maxmimum number of registrars allowed in the system. Needed to bound the complexity", + " of, e.g., updating judgements." + ] + } + ], + "errors": [ + { + "name": "TooManySubAccounts", + "documentation": [ + " Too many subs-accounts." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Account isn't found." + ] + }, + { + "name": "NotNamed", + "documentation": [ + " Account isn't named." + ] + }, + { + "name": "EmptyIndex", + "documentation": [ + " Empty index." + ] + }, + { + "name": "FeeChanged", + "documentation": [ + " Fee is changed." + ] + }, + { + "name": "NoIdentity", + "documentation": [ + " No identity found." + ] + }, + { + "name": "StickyJudgement", + "documentation": [ + " Sticky judgement." + ] + }, + { + "name": "JudgementGiven", + "documentation": [ + " Judgement given." + ] + }, + { + "name": "InvalidJudgement", + "documentation": [ + " Invalid judgement." + ] + }, + { + "name": "InvalidIndex", + "documentation": [ + " The index is invalid." + ] + }, + { + "name": "InvalidTarget", + "documentation": [ + " The target is invalid." + ] + }, + { + "name": "TooManyFields", + "documentation": [ + " Too many additional fields." + ] + }, + { + "name": "TooManyRegistrars", + "documentation": [ + " Maximum amount of registrars reached. Cannot add any more." + ] + }, + { + "name": "AlreadyClaimed", + "documentation": [ + " Account ID is already named." + ] + }, + { + "name": "NotSub", + "documentation": [ + " Sender is not a sub-account." + ] + }, + { + "name": "NotOwned", + "documentation": [ + " Sub-account isn't owned by sender." + ] + } + ], + "index": 24 + }, + { + "name": "Society", + "storage": { + "prefix": "Society", + "items": [ + { + "name": "Founder", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The first member." + ] + }, + { + "name": "Rules", + "modifier": "Optional", + "type": { + "Plain": "Hash" + }, + "fallback": "0x00", + "documentation": [ + " A hash of the rules of this society concerning membership. Can only be set once and", + " only by the founder." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of candidates; bidders that are attempting to become members." + ] + }, + { + "name": "SuspendedCandidates", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(BalanceOf,BidKind)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of suspended candidates." + ] + }, + { + "name": "Pot", + "modifier": "Default", + "type": { + "Plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " Amount of our account balance that is specifically for the next round's bid(s)." + ] + }, + { + "name": "Head", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The most primary from the most recently approved members." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of members, ordered." + ] + }, + { + "name": "SuspendedMembers", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "bool", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of suspended members." + ] + }, + { + "name": "Bids", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current bids, stored ordered by the value of the bid." + ] + }, + { + "name": "Vouching", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "VouchingStatus", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Members currently vouching or banned from vouching again" + ] + }, + { + "name": "Payouts", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Vec<(BlockNumber,BalanceOf)>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Pending payouts; ordered by block number, with the amount that should be paid out." + ] + }, + { + "name": "Strikes", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "StrikeCount", + "linked": false + } + }, + "fallback": "0x00000000", + "documentation": [ + " The ongoing number of losing votes cast by the member." + ] + }, + { + "name": "Votes", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "AccountId", + "value": "SocietyVote", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Double map from Candidate -> Voter -> (Maybe) Vote." + ] + }, + { + "name": "Defender", + "modifier": "Optional", + "type": { + "Plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The defending member currently being challenged." + ] + }, + { + "name": "DefenderVotes", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "SocietyVote", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes for the defender." + ] + }, + { + "name": "MaxMembers", + "modifier": "Default", + "type": { + "Plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The max number of members for the society at one time." + ] + } + ] + }, + "calls": [ + { + "name": "bid", + "args": [ + { + "name": "value", + "type": "BalanceOf" + } + ], + "documentation": [ + " A user outside of the society can make a bid for entry.", + "", + " Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", + " when the bid becomes a member, or if the bid calls `unbid`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `value`: A one time payment the bid would like to receive when joining the society.", + "", + " # ", + " Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)", + " - Storage Reads:", + " \t- One storage read to check for suspended candidate. O(1)", + " \t- One storage read to check for suspended member. O(1)", + " \t- One storage read to retrieve all current bids. O(B)", + " \t- One storage read to retrieve all current candidates. O(C)", + " \t- One storage read to retrieve all members. O(M)", + " - Storage Writes:", + " \t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)", + " \t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + " - Notable Computation:", + " \t- O(B + C + log M) search to check user is not already a part of society.", + " \t- O(log B) search to insert the new bid sorted.", + " - External Module Operations:", + " \t- One balance reserve operation. O(X)", + " \t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + " - Events:", + " \t- One event for new bid.", + " \t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + " Total Complexity: O(M + B + C + logM + logB + X)", + " # " + ] + }, + { + "name": "unbid", + "args": [ + { + "name": "pos", + "type": "u32" + } + ], + "documentation": [ + " A bidder can remove their bid for entry into society.", + " By doing so, they will have their candidate deposit returned or", + " they will unvouch their voucher.", + "", + " Payment: The bid deposit is unreserved if the user made a bid.", + "", + " The dispatch origin for this call must be _Signed_ and a bidder.", + "", + " Parameters:", + " - `pos`: Position in the `Bids` vector of the bid who wants to unbid.", + "", + " # ", + " Key: B (len of bids), X (balance unreserve)", + " - One storage read and write to retrieve and update the bids. O(B)", + " - Either one unreserve balance action O(X) or one vouching storage removal. O(1)", + " - One event.", + "", + " Total Complexity: O(B + X)", + " # " + ] + }, + { + "name": "vouch", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "value", + "type": "BalanceOf" + }, + { + "name": "tip", + "type": "BalanceOf" + } + ], + "documentation": [ + " As a member, vouch for someone to join society by placing a bid on their behalf.", + "", + " There is no deposit required to vouch for a new bid, but a member can only vouch for", + " one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by", + " the suspension judgement origin, the member will be banned from vouching again.", + "", + " As a vouching member, you can claim a tip if the candidate is accepted. This tip will", + " be paid as a portion of the reward the member will receive for joining the society.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `who`: The user who you would like to vouch for.", + " - `value`: The total reward to be paid between you and the candidate if they become", + " a member in the society.", + " - `tip`: Your cut of the total `value` payout when the candidate is inducted into", + " the society. Tips larger than `value` will be saturated upon payout.", + "", + " # ", + " Key: B (len of bids), C (len of candidates), M (len of members)", + " - Storage Reads:", + " \t- One storage read to retrieve all members. O(M)", + " \t- One storage read to check member is not already vouching. O(1)", + " \t- One storage read to check for suspended candidate. O(1)", + " \t- One storage read to check for suspended member. O(1)", + " \t- One storage read to retrieve all current bids. O(B)", + " \t- One storage read to retrieve all current candidates. O(C)", + " - Storage Writes:", + " \t- One storage write to insert vouching status to the member. O(1)", + " \t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)", + " \t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + " - Notable Computation:", + " \t- O(log M) search to check sender is a member.", + " \t- O(B + C + log M) search to check user is not already a part of society.", + " \t- O(log B) search to insert the new bid sorted.", + " - External Module Operations:", + " \t- One balance reserve operation. O(X)", + " \t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + " - Events:", + " \t- One event for vouch.", + " \t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + " Total Complexity: O(M + B + C + logM + logB + X)", + " # " + ] + }, + { + "name": "unvouch", + "args": [ + { + "name": "pos", + "type": "u32" + } + ], + "documentation": [ + " As a vouching member, unvouch a bid. This only works while vouched user is", + " only a bidder (and not a candidate).", + "", + " The dispatch origin for this call must be _Signed_ and a vouching member.", + "", + " Parameters:", + " - `pos`: Position in the `Bids` vector of the bid who should be unvouched.", + "", + " # ", + " Key: B (len of bids)", + " - One storage read O(1) to check the signer is a vouching member.", + " - One storage mutate to retrieve and update the bids. O(B)", + " - One vouching storage removal. O(1)", + " - One event.", + "", + " Total Complexity: O(B)", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "candidate", + "type": "LookupSource" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " As a member, vote on a candidate.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `candidate`: The candidate that the member would like to bid on.", + " - `approve`: A boolean which says if the candidate should be", + " approved (`true`) or rejected (`false`).", + "", + " # ", + " Key: C (len of candidates), M (len of members)", + " - One storage read O(M) and O(log M) search to check user is a member.", + " - One account lookup.", + " - One storage read O(C) and O(C) search to check that user is a candidate.", + " - One storage write to add vote to votes. O(1)", + " - One event.", + "", + " Total Complexity: O(M + logM + C)", + " # " + ] + }, + { + "name": "defender_vote", + "args": [ + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " As a member, vote on the defender.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `approve`: A boolean which says if the candidate should be", + " approved (`true`) or rejected (`false`).", + "", + " # ", + " - Key: M (len of members)", + " - One storage read O(M) and O(log M) search to check user is a member.", + " - One storage write to add vote to votes. O(1)", + " - One event.", + "", + " Total Complexity: O(M + logM)", + " # " + ] + }, + { + "name": "payout", + "args": [], + "documentation": [ + " Transfer the first matured payout for the sender and remove it from the records.", + "", + " NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts.", + "", + " Payment: The member will receive a payment equal to their first matured", + " payout to their free balance.", + "", + " The dispatch origin for this call must be _Signed_ and a member with", + " payouts remaining.", + "", + " # ", + " Key: M (len of members), P (number of payouts for a particular member)", + " - One storage read O(M) and O(log M) search to check signer is a member.", + " - One storage read O(P) to get all payouts for a member.", + " - One storage read O(1) to get the current block number.", + " - One currency transfer call. O(X)", + " - One storage write or removal to update the member's payouts. O(P)", + "", + " Total Complexity: O(M + logM + P + X)", + " # " + ] + }, + { + "name": "found", + "args": [ + { + "name": "founder", + "type": "AccountId" + }, + { + "name": "max_members", + "type": "u32" + }, + { + "name": "rules", + "type": "Bytes" + } + ], + "documentation": [ + " Found the society.", + "", + " This is done as a discrete action in order to allow for the", + " module to be included into a running chain and can only be done once.", + "", + " The dispatch origin for this call must be from the _FounderSetOrigin_.", + "", + " Parameters:", + " - `founder` - The first member and head of the newly founded society.", + " - `max_members` - The initial max number of members for the society.", + " - `rules` - The rules of this society concerning membership.", + "", + " # ", + " - Two storage mutates to set `Head` and `Founder`. O(1)", + " - One storage write to add the first member to society. O(1)", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + }, + { + "name": "unfound", + "args": [], + "documentation": [ + " Annul the founding of the society.", + "", + " The dispatch origin for this call must be Signed, and the signing account must be both", + " the `Founder` and the `Head`. This implies that it may only be done when there is one", + " member.", + "", + " # ", + " - Two storage reads O(1).", + " - Four storage removals O(1).", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + }, + { + "name": "judge_suspended_member", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "forgive", + "type": "bool" + } + ], + "documentation": [ + " Allow suspension judgement origin to make judgement on a suspended member.", + "", + " If a suspended member is forgiven, we simply add them back as a member, not affecting", + " any of the existing storage items for that member.", + "", + " If a suspended member is rejected, remove all associated storage items, including", + " their payouts, and remove any vouched bids they currently have.", + "", + " The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + " Parameters:", + " - `who` - The suspended member to be judged.", + " - `forgive` - A boolean representing whether the suspension judgement origin", + " forgives (`true`) or rejects (`false`) a suspended member.", + "", + " # ", + " Key: B (len of bids), M (len of members)", + " - One storage read to check `who` is a suspended member. O(1)", + " - Up to one storage write O(M) with O(log M) binary search to add a member back to society.", + " - Up to 3 storage removals O(1) to clean up a removed member.", + " - Up to one storage write O(B) with O(B) search to remove vouched bid from bids.", + " - Up to one additional event if unvouch takes place.", + " - One storage removal. O(1)", + " - One event for the judgement.", + "", + " Total Complexity: O(M + logM + B)", + " # " + ] + }, + { + "name": "judge_suspended_candidate", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "judgement", + "type": "SocietyJudgement" + } + ], + "documentation": [ + " Allow suspended judgement origin to make judgement on a suspended candidate.", + "", + " If the judgement is `Approve`, we add them to society as a member with the appropriate", + " payment for joining society.", + "", + " If the judgement is `Reject`, we either slash the deposit of the bid, giving it back", + " to the society treasury, or we ban the voucher from vouching again.", + "", + " If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go", + " through the induction process again.", + "", + " The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + " Parameters:", + " - `who` - The suspended candidate to be judged.", + " - `judgement` - `Approve`, `Reject`, or `Rebid`.", + "", + " # ", + " Key: B (len of bids), M (len of members), X (balance action)", + " - One storage read to check `who` is a suspended candidate.", + " - One storage removal of the suspended candidate.", + " - Approve Logic", + " \t- One storage read to get the available pot to pay users with. O(1)", + " \t- One storage write to update the available pot. O(1)", + " \t- One storage read to get the current block number. O(1)", + " \t- One storage read to get all members. O(M)", + " \t- Up to one unreserve currency action.", + " \t- Up to two new storage writes to payouts.", + " \t- Up to one storage write with O(log M) binary search to add a member to society.", + " - Reject Logic", + " \t- Up to one repatriate reserved currency action. O(X)", + " \t- Up to one storage write to ban the vouching member from vouching again.", + " - Rebid Logic", + " \t- Storage mutate with O(log B) binary search to place the user back into bids.", + " - Up to one additional event if unvouch takes place.", + " - One storage removal.", + " - One event for the judgement.", + "", + " Total Complexity: O(M + logM + B + X)", + " # " + ] + }, + { + "name": "set_max_members", + "args": [ + { + "name": "max", + "type": "u32" + } + ], + "documentation": [ + " Allows root origin to change the maximum number of members in society.", + " Max membership count must be greater than 1.", + "", + " The dispatch origin for this call must be from _ROOT_.", + "", + " Parameters:", + " - `max` - The maximum number of members for the society.", + "", + " # ", + " - One storage write to update the max. O(1)", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + } + ], + "events": [ + { + "name": "Founded", + "args": [ + "AccountId" + ], + "documentation": [ + " The society is founded by the given identity. \\[founder\\]" + ] + }, + { + "name": "Bid", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A membership bid just happened. The given account is the candidate's ID and their offer", + " is the second. \\[candidate_id, offer\\]" + ] + }, + { + "name": "Vouch", + "args": [ + "AccountId", + "Balance", + "AccountId" + ], + "documentation": [ + " A membership bid just happened by vouching. The given account is the candidate's ID and", + " their offer is the second. The vouching party is the third. \\[candidate_id, offer, vouching\\]" + ] + }, + { + "name": "AutoUnbid", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[candidate\\] was dropped (due to an excess of bids in the system)." + ] + }, + { + "name": "Unbid", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[candidate\\] was dropped (by their request)." + ] + }, + { + "name": "Unvouch", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[candidate\\] was dropped (by request of who vouched for them)." + ] + }, + { + "name": "Inducted", + "args": [ + "AccountId", + "Vec" + ], + "documentation": [ + " A group of candidates have been inducted. The batch's primary is the first value, the", + " batch in full is the second. \\[primary, candidates\\]" + ] + }, + { + "name": "SuspendedMemberJudgement", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A suspended member has been judged. \\[who, judged\\]" + ] + }, + { + "name": "CandidateSuspended", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[candidate\\] has been suspended" + ] + }, + { + "name": "MemberSuspended", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[member\\] has been suspended" + ] + }, + { + "name": "Challenged", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[member\\] has been challenged" + ] + }, + { + "name": "Vote", + "args": [ + "AccountId", + "AccountId", + "bool" + ], + "documentation": [ + " A vote has been placed \\[candidate, voter, vote\\]" + ] + }, + { + "name": "DefenderVote", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A vote has been placed for a defending member \\[voter, vote\\]" + ] + }, + { + "name": "NewMaxMembers", + "args": [ + "u32" + ], + "documentation": [ + " A new \\[max\\] member count has been set" + ] + }, + { + "name": "Unfounded", + "args": [ + "AccountId" + ], + "documentation": [ + " Society is unfounded. \\[founder\\]" + ] + }, + { + "name": "Deposit", + "args": [ + "Balance" + ], + "documentation": [ + " Some funds were deposited into the society account. \\[value\\]" + ] + } + ], + "constants": [ + { + "name": "CandidateDeposit", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [ + " The minimum amount of a deposit required for a bid to be made." + ] + }, + { + "name": "WrongSideDeduction", + "type": "BalanceOf", + "value": "0x0080f420e6b500000000000000000000", + "documentation": [ + " The amount of the unpaid reward that gets deducted in the case that either a skeptic", + " doesn't vote or someone votes in the wrong way." + ] + }, + { + "name": "MaxStrikes", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " The number of times a member may vote the wrong way (or not at all, when they are a skeptic)", + " before they become suspended." + ] + }, + { + "name": "PeriodSpend", + "type": "BalanceOf", + "value": "0x0000c52ebca2b1000000000000000000", + "documentation": [ + " The amount of incentive paid within each period. Doesn't include VoterTip." + ] + }, + { + "name": "RotationPeriod", + "type": "BlockNumber", + "value": "0x00770100", + "documentation": [ + " The number of blocks between candidate/membership rotation periods." + ] + }, + { + "name": "ChallengePeriod", + "type": "BlockNumber", + "value": "0x80130300", + "documentation": [ + " The number of blocks between membership challenges." + ] + }, + { + "name": "ModuleId", + "type": "ModuleId", + "value": "0x70792f736f636965", + "documentation": [ + " The societies's module id" + ] + } + ], + "errors": [ + { + "name": "BadPosition", + "documentation": [ + " An incorrect position was provided." + ] + }, + { + "name": "NotMember", + "documentation": [ + " User is not a member." + ] + }, + { + "name": "AlreadyMember", + "documentation": [ + " User is already a member." + ] + }, + { + "name": "Suspended", + "documentation": [ + " User is suspended." + ] + }, + { + "name": "NotSuspended", + "documentation": [ + " User is not suspended." + ] + }, + { + "name": "NoPayout", + "documentation": [ + " Nothing to payout." + ] + }, + { + "name": "AlreadyFounded", + "documentation": [ + " Society already founded." + ] + }, + { + "name": "InsufficientPot", + "documentation": [ + " Not enough in pot to accept candidate." + ] + }, + { + "name": "AlreadyVouching", + "documentation": [ + " Member is already vouching or banned from vouching again." + ] + }, + { + "name": "NotVouching", + "documentation": [ + " Member is not vouching." + ] + }, + { + "name": "Head", + "documentation": [ + " Cannot remove the head of the chain." + ] + }, + { + "name": "Founder", + "documentation": [ + " Cannot remove the founder." + ] + }, + { + "name": "AlreadyBid", + "documentation": [ + " User has already made a bid." + ] + }, + { + "name": "AlreadyCandidate", + "documentation": [ + " User is already a candidate." + ] + }, + { + "name": "NotCandidate", + "documentation": [ + " User is not a candidate." + ] + }, + { + "name": "MaxMembers", + "documentation": [ + " Too many members in the society." + ] + }, + { + "name": "NotFounder", + "documentation": [ + " The caller is not the founder." + ] + }, + { + "name": "NotHead", + "documentation": [ + " The caller is not the head." + ] + } + ], + "index": 25 + }, + { + "name": "Recovery", + "storage": { + "prefix": "Recovery", + "items": [ + { + "name": "Recoverable", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "RecoveryConfig", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of recoverable accounts and their recovery configuration." + ] + }, + { + "name": "ActiveRecoveries", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "AccountId", + "value": "ActiveRecovery", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Active recovery attempts.", + "", + " First account is the account to be recovered, and the second account", + " is the user trying to recover the account." + ] + }, + { + "name": "Proxy", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The list of allowed proxy accounts.", + "", + " Map from the user who can access it to the recovered account." + ] + } + ] + }, + "calls": [ + { + "name": "as_recovered", + "args": [ + { + "name": "account", + "type": "AccountId" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Send a call through a recovered account.", + "", + " The dispatch origin for this call must be _Signed_ and registered to", + " be able to make calls on behalf of the recovered account.", + "", + " Parameters:", + " - `account`: The recovered account you want to make a call on-behalf-of.", + " - `call`: The call you want to make with the recovered account.", + "", + " # ", + " - The weight of the `call` + 10,000.", + " - One storage lookup to check account is recovered by `who`. O(1)", + " # " + ] + }, + { + "name": "set_recovered", + "args": [ + { + "name": "lost", + "type": "AccountId" + }, + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " Allow ROOT to bypass the recovery process and set an a rescuer account", + " for a lost account directly.", + "", + " The dispatch origin for this call must be _ROOT_.", + "", + " Parameters:", + " - `lost`: The \"lost account\" to be recovered.", + " - `rescuer`: The \"rescuer account\" which can call as the lost account.", + "", + " # ", + " - One storage write O(1)", + " - One event", + " # " + ] + }, + { + "name": "create_recovery", + "args": [ + { + "name": "friends", + "type": "Vec" + }, + { + "name": "threshold", + "type": "u16" + }, + { + "name": "delay_period", + "type": "BlockNumber" + } + ], + "documentation": [ + " Create a recovery configuration for your account. This makes your account recoverable.", + "", + " Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", + " will be reserved for storing the recovery configuration. This deposit is returned", + " in full when the user calls `remove_recovery`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `friends`: A list of friends you trust to vouch for recovery attempts.", + " Should be ordered and contain no duplicate values.", + " - `threshold`: The number of friends that must vouch for a recovery attempt", + " before the account can be recovered. Should be less than or equal to", + " the length of the list of friends.", + " - `delay_period`: The number of blocks after a recovery attempt is initialized", + " that needs to pass before the account can be recovered.", + "", + " # ", + " - Key: F (len of friends)", + " - One storage read to check that account is not already recoverable. O(1).", + " - A check that the friends list is sorted and unique. O(F)", + " - One currency reserve operation. O(X)", + " - One storage write. O(1). Codec O(F).", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "initiate_recovery", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Initiate the process for recovering a recoverable account.", + "", + " Payment: `RecoveryDeposit` balance will be reserved for initiating the", + " recovery process. This deposit will always be repatriated to the account", + " trying to be recovered. See `close_recovery`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `account`: The lost account that you want to recover. This account", + " needs to be recoverable (i.e. have a recovery configuration).", + "", + " # ", + " - One storage read to check that account is recoverable. O(F)", + " - One storage read to check that this recovery process hasn't already started. O(1)", + " - One currency reserve operation. O(X)", + " - One storage read to get the current block number. O(1)", + " - One storage write. O(1).", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "vouch_recovery", + "args": [ + { + "name": "lost", + "type": "AccountId" + }, + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " Allow a \"friend\" of a recoverable account to vouch for an active recovery", + " process for that account.", + "", + " The dispatch origin for this call must be _Signed_ and must be a \"friend\"", + " for the recoverable account.", + "", + " Parameters:", + " - `lost`: The lost account that you want to recover.", + " - `rescuer`: The account trying to rescue the lost account that you", + " want to vouch for.", + "", + " The combination of these two parameters must point to an active recovery", + " process.", + "", + " # ", + " Key: F (len of friends in config), V (len of vouching friends)", + " - One storage read to get the recovery configuration. O(1), Codec O(F)", + " - One storage read to get the active recovery process. O(1), Codec O(V)", + " - One binary search to confirm caller is a friend. O(logF)", + " - One binary search to confirm caller has not already vouched. O(logV)", + " - One storage write. O(1), Codec O(V).", + " - One event.", + "", + " Total Complexity: O(F + logF + V + logV)", + " # " + ] + }, + { + "name": "claim_recovery", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Allow a successful rescuer to claim their recovered account.", + "", + " The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", + " who has successfully completed the account recovery process: collected", + " `threshold` or more vouches, waited `delay_period` blocks since initiation.", + "", + " Parameters:", + " - `account`: The lost account that you want to claim has been successfully", + " recovered by you.", + "", + " # ", + " Key: F (len of friends in config), V (len of vouching friends)", + " - One storage read to get the recovery configuration. O(1), Codec O(F)", + " - One storage read to get the active recovery process. O(1), Codec O(V)", + " - One storage read to get the current block number. O(1)", + " - One storage write. O(1), Codec O(V).", + " - One event.", + "", + " Total Complexity: O(F + V)", + " # " + ] + }, + { + "name": "close_recovery", + "args": [ + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " As the controller of a recoverable account, close an active recovery", + " process for your account.", + "", + " Payment: By calling this function, the recoverable account will receive", + " the recovery deposit `RecoveryDeposit` placed by the rescuer.", + "", + " The dispatch origin for this call must be _Signed_ and must be a", + " recoverable account with an active recovery process for it.", + "", + " Parameters:", + " - `rescuer`: The account trying to rescue this recoverable account.", + "", + " # ", + " Key: V (len of vouching friends)", + " - One storage read/remove to get the active recovery process. O(1), Codec O(V)", + " - One balance call to repatriate reserved. O(X)", + " - One event.", + "", + " Total Complexity: O(V + X)", + " # " + ] + }, + { + "name": "remove_recovery", + "args": [], + "documentation": [ + " Remove the recovery process for your account. Recovered accounts are still accessible.", + "", + " NOTE: The user must make sure to call `close_recovery` on all active", + " recovery attempts before calling this function else it will fail.", + "", + " Payment: By calling this function the recoverable account will unreserve", + " their recovery configuration deposit.", + " (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)", + "", + " The dispatch origin for this call must be _Signed_ and must be a", + " recoverable account (i.e. has a recovery configuration).", + "", + " # ", + " Key: F (len of friends)", + " - One storage read to get the prefix iterator for active recoveries. O(1)", + " - One storage read/remove to get the recovery configuration. O(1), Codec O(F)", + " - One balance call to unreserved. O(X)", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "cancel_recovered", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Cancel the ability to use `as_recovered` for `account`.", + "", + " The dispatch origin for this call must be _Signed_ and registered to", + " be able to make calls on behalf of the recovered account.", + "", + " Parameters:", + " - `account`: The recovered account you are able to call on-behalf-of.", + "", + " # ", + " - One storage mutation to check account is recovered by `who`. O(1)", + " # " + ] + } + ], + "events": [ + { + "name": "RecoveryCreated", + "args": [ + "AccountId" + ], + "documentation": [ + " A recovery process has been set up for an \\[account\\]." + ] + }, + { + "name": "RecoveryInitiated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process has been initiated for lost account by rescuer account.", + " \\[lost, rescuer\\]" + ] + }, + { + "name": "RecoveryVouched", + "args": [ + "AccountId", + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process for lost account by rescuer account has been vouched for by sender.", + " \\[lost, rescuer, sender\\]" + ] + }, + { + "name": "RecoveryClosed", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process for lost account by rescuer account has been closed.", + " \\[lost, rescuer\\]" + ] + }, + { + "name": "AccountRecovered", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Lost account has been successfully recovered by rescuer account.", + " \\[lost, rescuer\\]" + ] + }, + { + "name": "RecoveryRemoved", + "args": [ + "AccountId" + ], + "documentation": [ + " A recovery process has been removed for an \\[account\\]." + ] + } + ], + "constants": [ + { + "name": "ConfigDepositBase", + "type": "BalanceOf", + "value": "0x00406352bfc601000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for creating a recovery configuration." + ] + }, + { + "name": "FriendDepositFactor", + "type": "BalanceOf", + "value": "0x00203d88792d00000000000000000000", + "documentation": [ + " The amount of currency needed per additional user when creating a recovery configuration." + ] + }, + { + "name": "MaxFriends", + "type": "u16", + "value": "0x0900", + "documentation": [ + " The maximum amount of friends allowed in a recovery configuration." + ] + }, + { + "name": "RecoveryDeposit", + "type": "BalanceOf", + "value": "0x00406352bfc601000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for starting a recovery." + ] + } + ], + "errors": [ + { + "name": "NotAllowed", + "documentation": [ + " User is not allowed to make a call on behalf of this account" + ] + }, + { + "name": "ZeroThreshold", + "documentation": [ + " Threshold must be greater than zero" + ] + }, + { + "name": "NotEnoughFriends", + "documentation": [ + " Friends list must be greater than zero and threshold" + ] + }, + { + "name": "MaxFriends", + "documentation": [ + " Friends list must be less than max friends" + ] + }, + { + "name": "NotSorted", + "documentation": [ + " Friends list must be sorted and free of duplicates" + ] + }, + { + "name": "NotRecoverable", + "documentation": [ + " This account is not set up for recovery" + ] + }, + { + "name": "AlreadyRecoverable", + "documentation": [ + " This account is already set up for recovery" + ] + }, + { + "name": "AlreadyStarted", + "documentation": [ + " A recovery process has already started for this account" + ] + }, + { + "name": "NotStarted", + "documentation": [ + " A recovery process has not started for this rescuer" + ] + }, + { + "name": "NotFriend", + "documentation": [ + " This account is not a friend who can vouch" + ] + }, + { + "name": "DelayPeriod", + "documentation": [ + " The friend must wait until the delay period to vouch for this recovery" + ] + }, + { + "name": "AlreadyVouched", + "documentation": [ + " This user has already vouched for this recovery" + ] + }, + { + "name": "Threshold", + "documentation": [ + " The threshold for recovering this account has not been met" + ] + }, + { + "name": "StillActive", + "documentation": [ + " There are still active recovery attempts that need to be closed" + ] + }, + { + "name": "Overflow", + "documentation": [ + " There was an overflow in a calculation" + ] + }, + { + "name": "AlreadyProxy", + "documentation": [ + " This account is already set up for recovery" + ] + } + ], + "index": 26 + }, + { + "name": "Vesting", + "storage": { + "prefix": "Vesting", + "items": [ + { + "name": "Vesting", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "VestingInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information regarding the vesting of a given account." + ] + } + ] + }, + "calls": [ + { + "name": "vest", + "args": [], + "documentation": [ + " Unlock any vested funds of the sender account.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have funds still", + " locked under this module.", + "", + " Emits either `VestingCompleted` or `VestingUpdated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 2 Reads, 2 Writes", + " - Reads: Vesting Storage, Balances Locks, [Sender Account]", + " - Writes: Vesting Storage, Balances Locks, [Sender Account]", + " # " + ] + }, + { + "name": "vest_other", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Unlock any vested funds of a `target` account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `target`: The account whose vested funds should be unlocked. Must have funds still", + " locked under this module.", + "", + " Emits either `VestingCompleted` or `VestingUpdated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 3 Reads, 3 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account", + " - Writes: Vesting Storage, Balances Locks, Target Account", + " # " + ] + }, + { + "name": "vested_transfer", + "args": [ + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "schedule", + "type": "VestingInfo" + } + ], + "documentation": [ + " Create a vested transfer.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `target`: The account that should be transferred the vested funds.", + " - `amount`: The amount of funds to transfer and will be vested.", + " - `schedule`: The vesting schedule attached to the transfer.", + "", + " Emits `VestingCreated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 3 Reads, 3 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]", + " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]", + " # " + ] + }, + { + "name": "force_vested_transfer", + "args": [ + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "schedule", + "type": "VestingInfo" + } + ], + "documentation": [ + " Force a vested transfer.", + "", + " The dispatch origin for this call must be _Root_.", + "", + " - `source`: The account whose funds should be transferred.", + " - `target`: The account that should be transferred the vested funds.", + " - `amount`: The amount of funds to transfer and will be vested.", + " - `schedule`: The vesting schedule attached to the transfer.", + "", + " Emits `VestingCreated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 4 Reads, 4 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account", + " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account", + " # " + ] + } + ], + "events": [ + { + "name": "VestingUpdated", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " The amount vested has been updated. This could indicate more funds are available. The", + " balance given is the amount which is left unvested (and thus locked).", + " \\[account, unvested\\]" + ] + }, + { + "name": "VestingCompleted", + "args": [ + "AccountId" + ], + "documentation": [ + " An \\[account\\] has become fully vested. No further vesting can happen." + ] + } + ], + "constants": [ + { + "name": "MinVestedTransfer", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "documentation": [ + " The minimum amount to be transferred to create a new vesting schedule." + ] + } + ], + "errors": [ + { + "name": "NotVesting", + "documentation": [ + " The account given is not vesting." + ] + }, + { + "name": "ExistingVestingSchedule", + "documentation": [ + " An existing vesting schedule already exists for this account that cannot be clobbered." + ] + }, + { + "name": "AmountLow", + "documentation": [ + " Amount being transferred is too low to create a vesting schedule." + ] + } + ], + "index": 27 + }, + { + "name": "Scheduler", + "storage": { + "prefix": "Scheduler", + "items": [ + { + "name": "Agenda", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "BlockNumber", + "value": "Vec>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Items to be executed, indexed by the block number that they should be executed on." + ] + }, + { + "name": "Lookup", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "Bytes", + "value": "TaskAddress", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Lookup from identity to the block number and index of the task." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "Plain": "Releases" + }, + "fallback": "0x00", + "documentation": [ + " Storage version of the pallet.", + "", + " New networks start with last version." + ] + } + ] + }, + "calls": [ + { + "name": "schedule", + "args": [ + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Anonymously schedule a task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 22.29 + .126 * S µs", + " - DB Weight:", + " - Read: Agenda", + " - Write: Agenda", + " - Will use base weight of 25 which should be good for up to 30 scheduled calls", + " # " + ] + }, + { + "name": "cancel", + "args": [ + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "index", + "type": "u32" + } + ], + "documentation": [ + " Cancel an anonymously scheduled task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 22.15 + 2.869 * S µs", + " - DB Weight:", + " - Read: Agenda", + " - Write: Agenda, Lookup", + " - Will use base weight of 100 which should be good for up to 30 scheduled calls", + " # " + ] + }, + { + "name": "schedule_named", + "args": [ + { + "name": "id", + "type": "Bytes" + }, + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Schedule a named task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 29.6 + .159 * S µs", + " - DB Weight:", + " - Read: Agenda, Lookup", + " - Write: Agenda, Lookup", + " - Will use base weight of 35 which should be good for more than 30 scheduled calls", + " # " + ] + }, + { + "name": "cancel_named", + "args": [ + { + "name": "id", + "type": "Bytes" + } + ], + "documentation": [ + " Cancel a named scheduled task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 24.91 + 2.907 * S µs", + " - DB Weight:", + " - Read: Agenda, Lookup", + " - Write: Agenda, Lookup", + " - Will use base weight of 100 which should be good for up to 30 scheduled calls", + " # " + ] + }, + { + "name": "schedule_after", + "args": [ + { + "name": "after", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Anonymously schedule a task after a delay.", + "", + " # ", + " Same as [`schedule`].", + " # " + ] + }, + { + "name": "schedule_named_after", + "args": [ + { + "name": "id", + "type": "Bytes" + }, + { + "name": "after", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Schedule a named task after a delay.", + "", + " # ", + " Same as [`schedule_named`].", + " # " + ] + } + ], + "events": [ + { + "name": "Scheduled", + "args": [ + "BlockNumber", + "u32" + ], + "documentation": [ + " Scheduled some task. \\[when, index\\]" + ] + }, + { + "name": "Canceled", + "args": [ + "BlockNumber", + "u32" + ], + "documentation": [ + " Canceled some task. \\[when, index\\]" + ] + }, + { + "name": "Dispatched", + "args": [ + "TaskAddress", + "Option", + "DispatchResult" + ], + "documentation": [ + " Dispatched some task. \\[task, id, result\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "FailedToSchedule", + "documentation": [ + " Failed to schedule a call" + ] + }, + { + "name": "NotFound", + "documentation": [ + " Cannot find the scheduled call." + ] + }, + { + "name": "TargetBlockNumberInPast", + "documentation": [ + " Given target block number is in the past." + ] + }, + { + "name": "RescheduleNoChange", + "documentation": [ + " Reschedule failed because it does not change scheduled time." + ] + } + ], + "index": 28 + }, + { + "name": "Proxy", + "storage": { + "prefix": "Proxy", + "items": [ + { + "name": "Proxies", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(Vec,BalanceOf)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " The set of account proxies. Maps the account which has delegated to the accounts", + " which are being delegated to, together with the amount held on deposit." + ] + }, + { + "name": "Announcements", + "modifier": "Default", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(Vec,BalanceOf)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " The announcements made by the proxy (key)." + ] + } + ] + }, + "calls": [ + { + "name": "proxy", + "args": [ + { + "name": "real", + "type": "AccountId" + }, + { + "name": "force_proxy_type", + "type": "Option" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Dispatch the given `call` from an account that the sender is authorised for through", + " `add_proxy`.", + "", + " Removes any corresponding announcement(s).", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", + " - `call`: The call to be made by the `real` account.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "add_proxy", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Register a proxy account for the sender that is able to make calls on its behalf.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `proxy`: The account that the `caller` would like to make a proxy.", + " - `proxy_type`: The permissions allowed for this proxy account.", + " - `delay`: The announcement period required of the initial proxy. Will generally be", + " zero.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "remove_proxy", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Unregister a proxy account for the sender.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `proxy`: The account that the `caller` would like to remove as a proxy.", + " - `proxy_type`: The permissions currently enabled for the removed proxy account.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "remove_proxies", + "args": [], + "documentation": [ + " Unregister all proxy accounts for the sender.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " WARNING: This may be called on accounts created by `anonymous`, however if done, then", + " the unreserved fees will be inaccessible. **All access to this account will be lost.**", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "anonymous", + "args": [ + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "delay", + "type": "BlockNumber" + }, + { + "name": "index", + "type": "u16" + } + ], + "documentation": [ + " Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and", + " initialize it with a proxy of `proxy_type` for `origin` sender.", + "", + " Requires a `Signed` origin.", + "", + " - `proxy_type`: The type of the proxy that the sender will be registered as over the", + " new account. This will almost always be the most permissive `ProxyType` possible to", + " allow for maximum flexibility.", + " - `index`: A disambiguation index, in case this is called multiple times in the same", + " transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just", + " want to use `0`.", + " - `delay`: The announcement period required of the initial proxy. Will generally be", + " zero.", + "", + " Fails with `Duplicate` if this has already been called in this transaction, from the", + " same sender, with the same parameters.", + "", + " Fails if there are insufficient funds to pay for deposit.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # ", + " TODO: Might be over counting 1 read" + ] + }, + { + "name": "kill_anonymous", + "args": [ + { + "name": "spawner", + "type": "AccountId" + }, + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "index", + "type": "u16" + }, + { + "name": "height", + "type": "Compact" + }, + { + "name": "ext_index", + "type": "Compact" + } + ], + "documentation": [ + " Removes a previously spawned anonymous proxy.", + "", + " WARNING: **All access to this account will be lost.** Any funds held in it will be", + " inaccessible.", + "", + " Requires a `Signed` origin, and the sender account must have been created by a call to", + " `anonymous` with corresponding parameters.", + "", + " - `spawner`: The account that originally called `anonymous` to create this account.", + " - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.", + " - `proxy_type`: The proxy type originally passed to `anonymous`.", + " - `height`: The height of the chain when the call to `anonymous` was processed.", + " - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.", + "", + " Fails with `NoPermission` in case the caller is not a previously created anonymous", + " account whose `anonymous` call has corresponding parameters.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "announce", + "args": [ + { + "name": "real", + "type": "AccountId" + }, + { + "name": "call_hash", + "type": "CallHashOf" + } + ], + "documentation": [ + " Publish the hash of a proxy-call that will be made in the future.", + "", + " This must be called some number of blocks before the corresponding `proxy` is attempted", + " if the delay associated with the proxy relationship is greater than zero.", + "", + " No more than `MaxPending` announcements may be made at any one time.", + "", + " This will take a deposit of `AnnouncementDepositFactor` as well as", + " `AnnouncementDepositBase` if there are no other pending announcements.", + "", + " The dispatch origin for this call must be _Signed_ and a proxy of `real`.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `call_hash`: The hash of the call to be made by the `real` account.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + }, + { + "name": "remove_announcement", + "args": [ + { + "name": "real", + "type": "AccountId" + }, + { + "name": "call_hash", + "type": "CallHashOf" + } + ], + "documentation": [ + " Remove a given announcement.", + "", + " May be called by a proxy account to remove a call they previously announced and return", + " the deposit.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `call_hash`: The hash of the call to be made by the `real` account.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + }, + { + "name": "reject_announcement", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "call_hash", + "type": "CallHashOf" + } + ], + "documentation": [ + " Remove the given announcement of a delegate.", + "", + " May be called by a target (proxied) account to remove a call that one of their delegates", + " (`delegate`) has announced they want to execute. The deposit is returned.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `delegate`: The account that previously announced the call.", + " - `call_hash`: The hash of the call to be made.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + }, + { + "name": "proxy_announced", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "real", + "type": "AccountId" + }, + { + "name": "force_proxy_type", + "type": "Option" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Dispatch the given `call` from an account that the sender is authorised for through", + " `add_proxy`.", + "", + " Removes any corresponding announcement(s).", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", + " - `call`: The call to be made by the `real` account.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + } + ], + "events": [ + { + "name": "ProxyExecuted", + "args": [ + "DispatchResult" + ], + "documentation": [ + " A proxy was executed correctly, with the given \\[result\\]." + ] + }, + { + "name": "AnonymousCreated", + "args": [ + "AccountId", + "AccountId", + "ProxyType", + "u16" + ], + "documentation": [ + " Anonymous account has been created by new proxy with given", + " disambiguation index and proxy type. \\[anonymous, who, proxy_type, disambiguation_index\\]" + ] + }, + { + "name": "Announced", + "args": [ + "AccountId", + "AccountId", + "Hash" + ], + "documentation": [ + " An announcement was placed to make a call in the future. \\[real, proxy, call_hash\\]" + ] + } + ], + "constants": [ + { + "name": "ProxyDepositBase", + "type": "BalanceOf", + "value": "0x00f09e544c3900000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for creating a proxy." + ] + }, + { + "name": "ProxyDepositFactor", + "type": "BalanceOf", + "value": "0x0060aa7714b400000000000000000000", + "documentation": [ + " The amount of currency needed per proxy added." + ] + }, + { + "name": "MaxProxies", + "type": "u16", + "value": "0x2000", + "documentation": [ + " The maximum amount of proxies allowed for a single account." + ] + }, + { + "name": "MaxPending", + "type": "u32", + "value": "0x20000000", + "documentation": [ + " `MaxPending` metadata shadow." + ] + }, + { + "name": "AnnouncementDepositBase", + "type": "BalanceOf", + "value": "0x00f09e544c3900000000000000000000", + "documentation": [ + " `AnnouncementDepositBase` metadata shadow." + ] + }, + { + "name": "AnnouncementDepositFactor", + "type": "BalanceOf", + "value": "0x00c054ef286801000000000000000000", + "documentation": [ + " `AnnouncementDepositFactor` metadata shadow." + ] + } + ], + "errors": [ + { + "name": "TooMany", + "documentation": [ + " There are too many proxies registered or too many announcements pending." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Proxy registration not found." + ] + }, + { + "name": "NotProxy", + "documentation": [ + " Sender is not a proxy of the account to be proxied." + ] + }, + { + "name": "Unproxyable", + "documentation": [ + " A call which is incompatible with the proxy type's filter was attempted." + ] + }, + { + "name": "Duplicate", + "documentation": [ + " Account is already a proxy." + ] + }, + { + "name": "NoPermission", + "documentation": [ + " Call may not be made by proxy because it may escalate its privileges." + ] + }, + { + "name": "Unannounced", + "documentation": [ + " Announcement, if made at all, was made too recently." + ] + } + ], + "index": 29 + }, + { + "name": "Multisig", + "storage": { + "prefix": "Multisig", + "items": [ + { + "name": "Multisigs", + "modifier": "Optional", + "type": { + "DoubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "[u8;32]", + "value": "Multisig", + "key2Hasher": "Blake2_128Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " The set of open multisig operations." + ] + }, + { + "name": "Calls", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "[u8;32]", + "value": "(OpaqueCall,AccountId,BalanceOf)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [] + } + ] + }, + "calls": [ + { + "name": "as_multi_threshold_1", + "args": [ + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Immediately dispatch a multi-signature call using a single approval from the caller.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `other_signatories`: The accounts (other than the sender) who are part of the", + " multi-signature, but do not participate in the approval process.", + " - `call`: The call to be executed.", + "", + " Result is equivalent to the dispatched result.", + "", + " # ", + " O(Z + C) where Z is the length of the call and C its execution weight.", + " -------------------------------", + " - DB Weight: None", + " - Plus Call Weight", + " # " + ] + }, + { + "name": "as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "maybe_timepoint", + "type": "Option" + }, + { + "name": "call", + "type": "OpaqueCall" + }, + { + "name": "store_call", + "type": "bool" + }, + { + "name": "max_weight", + "type": "Weight" + } + ], + "documentation": [ + " Register approval for a dispatch to be made from a deterministic composite account if", + " approved by a total of `threshold - 1` of `other_signatories`.", + "", + " If there are enough, then dispatch the call.", + "", + " Payment: `DepositBase` will be reserved if this is the first approval, plus", + " `threshold` times `DepositFactor`. It is returned once this dispatch happens or", + " is cancelled.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + " not the first approval, then it must be `Some`, with the timepoint (block number and", + " transaction index) of the first approval transaction.", + " - `call`: The call to be executed.", + "", + " NOTE: Unless this is the final approval, you will generally want to use", + " `approve_as_multi` instead, since it only requires a hash of the call.", + "", + " Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise", + " on success, result is `Ok` and the result from the interior call, if it was executed,", + " may be found in the deposited `MultisigExecuted` event.", + "", + " # ", + " - `O(S + Z + Call)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.", + " - One encode & hash, both of complexity `O(S)`.", + " - Up to one binary search and insert (`O(logS + S)`).", + " - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + " - One event.", + " - The weight of the `call`.", + " - Storage: inserts one item, value size bounded by `MaxSignatories`, with a", + " deposit taken for its lifetime of", + " `DepositBase + threshold * DepositFactor`.", + " -------------------------------", + " - DB Weight:", + " - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`)", + " - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`)", + " - Plus Call Weight", + " # " + ] + }, + { + "name": "approve_as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "maybe_timepoint", + "type": "Option" + }, + { + "name": "call_hash", + "type": "[u8;32]" + }, + { + "name": "max_weight", + "type": "Weight" + } + ], + "documentation": [ + " Register approval for a dispatch to be made from a deterministic composite account if", + " approved by a total of `threshold - 1` of `other_signatories`.", + "", + " Payment: `DepositBase` will be reserved if this is the first approval, plus", + " `threshold` times `DepositFactor`. It is returned once this dispatch happens or", + " is cancelled.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + " not the first approval, then it must be `Some`, with the timepoint (block number and", + " transaction index) of the first approval transaction.", + " - `call_hash`: The hash of the call to be executed.", + "", + " NOTE: If this is the final approval, you will want to use `as_multi` instead.", + "", + " # ", + " - `O(S)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One encode & hash, both of complexity `O(S)`.", + " - Up to one binary search and insert (`O(logS + S)`).", + " - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + " - One event.", + " - Storage: inserts one item, value size bounded by `MaxSignatories`, with a", + " deposit taken for its lifetime of", + " `DepositBase + threshold * DepositFactor`.", + " ----------------------------------", + " - DB Weight:", + " - Read: Multisig Storage, [Caller Account]", + " - Write: Multisig Storage, [Caller Account]", + " # " + ] + }, + { + "name": "cancel_as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "timepoint", + "type": "Timepoint" + }, + { + "name": "call_hash", + "type": "[u8;32]" + } + ], + "documentation": [ + " Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", + " for this operation will be unreserved on success.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `timepoint`: The timepoint (block number and transaction index) of the first approval", + " transaction for this dispatch.", + " - `call_hash`: The hash of the call to be executed.", + "", + " # ", + " - `O(S)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One encode & hash, both of complexity `O(S)`.", + " - One event.", + " - I/O: 1 read `O(S)`, one remove.", + " - Storage: removes one item.", + " ----------------------------------", + " - DB Weight:", + " - Read: Multisig Storage, [Caller Account], Refund Account, Calls", + " - Write: Multisig Storage, [Caller Account], Refund Account, Calls", + " # " + ] + } + ], + "events": [ + { + "name": "NewMultisig", + "args": [ + "AccountId", + "AccountId", + "CallHash" + ], + "documentation": [ + " A new multisig operation has begun. \\[approving, multisig, call_hash\\]" + ] + }, + { + "name": "MultisigApproval", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "CallHash" + ], + "documentation": [ + " A multisig operation has been approved by someone.", + " \\[approving, timepoint, multisig, call_hash\\]" + ] + }, + { + "name": "MultisigExecuted", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "CallHash", + "DispatchResult" + ], + "documentation": [ + " A multisig operation has been executed. \\[approving, timepoint, multisig, call_hash\\]" + ] + }, + { + "name": "MultisigCancelled", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "CallHash" + ], + "documentation": [ + " A multisig operation has been cancelled. \\[cancelling, timepoint, multisig, call_hash\\]" + ] + } + ], + "constants": [ + { + "name": "DepositBase", + "type": "BalanceOf", + "value": "0x00f01c0adbed01000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for creating a multisig execution or to store", + " a dispatch call for later." + ] + }, + { + "name": "DepositFactor", + "type": "BalanceOf", + "value": "0x0000cc7b9fae00000000000000000000", + "documentation": [ + " The amount of currency needed per unit threshold when creating a multisig execution." + ] + }, + { + "name": "MaxSignatories", + "type": "u16", + "value": "0x6400", + "documentation": [ + " The maximum amount of signatories allowed for a given multisig." + ] + } + ], + "errors": [ + { + "name": "MinimumThreshold", + "documentation": [ + " Threshold must be 2 or greater." + ] + }, + { + "name": "AlreadyApproved", + "documentation": [ + " Call is already approved by this signatory." + ] + }, + { + "name": "NoApprovalsNeeded", + "documentation": [ + " Call doesn't need any (more) approvals." + ] + }, + { + "name": "TooFewSignatories", + "documentation": [ + " There are too few signatories in the list." + ] + }, + { + "name": "TooManySignatories", + "documentation": [ + " There are too many signatories in the list." + ] + }, + { + "name": "SignatoriesOutOfOrder", + "documentation": [ + " The signatories were provided out of order; they should be ordered." + ] + }, + { + "name": "SenderInSignatories", + "documentation": [ + " The sender was contained in the other signatories; it shouldn't be." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Multisig operation not found when attempting to cancel." + ] + }, + { + "name": "NotOwner", + "documentation": [ + " Only the account that originally created the multisig is able to cancel it." + ] + }, + { + "name": "NoTimepoint", + "documentation": [ + " No timepoint was given, yet the multisig operation is already underway." + ] + }, + { + "name": "WrongTimepoint", + "documentation": [ + " A different timepoint was given to the multisig operation that is underway." + ] + }, + { + "name": "UnexpectedTimepoint", + "documentation": [ + " A timepoint was given, yet no multisig operation is underway." + ] + }, + { + "name": "WeightTooLow", + "documentation": [ + " The maximum weight information provided was too low." + ] + }, + { + "name": "AlreadyStored", + "documentation": [ + " The data to be stored is already stored." + ] + } + ], + "index": 30 + }, + { + "name": "Bounties", + "storage": { + "prefix": "Treasury", + "items": [ + { + "name": "BountyCount", + "modifier": "Default", + "type": { + "Plain": "BountyIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Number of bounty proposals that have been made." + ] + }, + { + "name": "Bounties", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "BountyIndex", + "value": "Bounty", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Bounties that have been made." + ] + }, + { + "name": "BountyDescriptions", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "BountyIndex", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The description of each bounty." + ] + }, + { + "name": "BountyApprovals", + "modifier": "Default", + "type": { + "Plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Bounty indices that have been approved but not yet funded." + ] + } + ] + }, + "calls": [ + { + "name": "propose_bounty", + "args": [ + { + "name": "value", + "type": "Compact" + }, + { + "name": "description", + "type": "Bytes" + } + ], + "documentation": [ + " Propose a new bounty.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", + " `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,", + " or slashed when rejected.", + "", + " - `curator`: The curator account whom will manage this bounty.", + " - `fee`: The curator fee.", + " - `value`: The total payment amount of this bounty, curator fee included.", + " - `description`: The description of this bounty." + ] + }, + { + "name": "approve_bounty", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a bounty proposal. At a later time, the bounty will be funded and become active", + " and the original deposit will be returned.", + "", + " May only be called from `T::ApproveOrigin`.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "propose_curator", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + }, + { + "name": "curator", + "type": "LookupSource" + }, + { + "name": "fee", + "type": "Compact" + } + ], + "documentation": [ + " Assign a curator to a funded bounty.", + "", + " May only be called from `T::ApproveOrigin`.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "unassign_curator", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Unassign curator from a bounty.", + "", + " This function can only be called by the `RejectOrigin` a signed origin.", + "", + " If this function is called by the `RejectOrigin`, we assume that the curator is malicious", + " or inactive. As a result, we will slash the curator when possible.", + "", + " If the origin is the curator, we take this as a sign they are unable to do their job and", + " they willingly give up. We could slash them, but for now we allow them to recover their", + " deposit and exit without issue. (We may want to change this if it is abused.)", + "", + " Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows", + " anyone in the community to call out that a curator is not doing their due diligence, and", + " we should pick a new curator. In this case the curator should also be slashed.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "accept_curator", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Accept the curator role for a bounty.", + " A deposit will be reserved from curator and refund upon successful payout.", + "", + " May only be called from the curator.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "award_bounty", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "LookupSource" + } + ], + "documentation": [ + " Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay.", + "", + " The dispatch origin for this call must be the curator of this bounty.", + "", + " - `bounty_id`: Bounty ID to award.", + " - `beneficiary`: The beneficiary account whom will receive the payout.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "claim_bounty", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Claim the payout from an awarded bounty after payout delay.", + "", + " The dispatch origin for this call must be the beneficiary of this bounty.", + "", + " - `bounty_id`: Bounty ID to claim.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "close_bounty", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Cancel a proposed or active bounty. All the funds will be sent to treasury and", + " the curator deposit will be unreserved if possible.", + "", + " Only `T::RejectOrigin` is able to cancel a bounty.", + "", + " - `bounty_id`: Bounty ID to cancel.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "extend_bounty_expiry", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + }, + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Extend the expiry time of an active bounty.", + "", + " The dispatch origin for this call must be the curator of this bounty.", + "", + " - `bounty_id`: Bounty ID to extend.", + " - `remark`: additional information.", + "", + " # ", + " - O(1).", + " # " + ] + } + ], + "events": [ + { + "name": "BountyProposed", + "args": [ + "BountyIndex" + ], + "documentation": [ + " New bounty proposal. \\[index\\]" + ] + }, + { + "name": "BountyRejected", + "args": [ + "BountyIndex", + "Balance" + ], + "documentation": [ + " A bounty proposal was rejected; funds were slashed. \\[index, bond\\]" + ] + }, + { + "name": "BountyBecameActive", + "args": [ + "BountyIndex" + ], + "documentation": [ + " A bounty proposal is funded and became active. \\[index\\]" + ] + }, + { + "name": "BountyAwarded", + "args": [ + "BountyIndex", + "AccountId" + ], + "documentation": [ + " A bounty is awarded to a beneficiary. \\[index, beneficiary\\]" + ] + }, + { + "name": "BountyClaimed", + "args": [ + "BountyIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " A bounty is claimed by beneficiary. \\[index, payout, beneficiary\\]" + ] + }, + { + "name": "BountyCanceled", + "args": [ + "BountyIndex" + ], + "documentation": [ + " A bounty is cancelled. \\[index\\]" + ] + }, + { + "name": "BountyExtended", + "args": [ + "BountyIndex" + ], + "documentation": [ + " A bounty expiry is extended. \\[index\\]" + ] + } + ], + "constants": [ + { + "name": "DataDepositPerByte", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount held on deposit per byte within bounty description." + ] + }, + { + "name": "BountyDepositBase", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The amount held on deposit for placing a bounty proposal." + ] + }, + { + "name": "BountyDepositPayoutDelay", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " The delay period for which a bounty beneficiary need to wait before claim the payout." + ] + }, + { + "name": "BountyCuratorDeposit", + "type": "Permill", + "value": "0x20a10700", + "documentation": [ + " Percentage of the curator fee that will be reserved upfront as deposit for bounty curator." + ] + }, + { + "name": "BountyValueMinimum", + "type": "BalanceOf", + "value": "0x00406352bfc601000000000000000000", + "documentation": [ + " Minimum value for a bounty." + ] + }, + { + "name": "MaximumReasonLength", + "type": "u32", + "value": "0x00400000", + "documentation": [ + " Maximum acceptable reason length." + ] + } + ], + "errors": [ + { + "name": "InsufficientProposersBalance", + "documentation": [ + " Proposer's balance is too low." + ] + }, + { + "name": "InvalidIndex", + "documentation": [ + " No proposal or bounty at that index." + ] + }, + { + "name": "ReasonTooBig", + "documentation": [ + " The reason given is just too big." + ] + }, + { + "name": "UnexpectedStatus", + "documentation": [ + " The bounty status is unexpected." + ] + }, + { + "name": "RequireCurator", + "documentation": [ + " Require bounty curator." + ] + }, + { + "name": "InvalidValue", + "documentation": [ + " Invalid bounty value." + ] + }, + { + "name": "InvalidFee", + "documentation": [ + " Invalid bounty fee." + ] + }, + { + "name": "PendingPayout", + "documentation": [ + " A bounty payout is pending.", + " To cancel the bounty, you must unassign and slash the curator." + ] + }, + { + "name": "Premature", + "documentation": [ + " The bounties cannot be claimed/closed because it's still in the countdown period." + ] + } + ], + "index": 31 + }, + { + "name": "Tips", + "storage": { + "prefix": "Treasury", + "items": [ + { + "name": "Tips", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Twox64Concat", + "key": "Hash", + "value": "OpenTip", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", + " This has the insecure enumerable hash function since the key itself is already", + " guaranteed to be a secure hash." + ] + }, + { + "name": "Reasons", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "Hash", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Simple preimage lookup from the reason's hash to the original data. Again, has an", + " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." + ] + } + ] + }, + "calls": [ + { + "name": "report_awesome", + "args": [ + { + "name": "reason", + "type": "Bytes" + }, + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Report something `reason` that deserves a tip and claim any eventual the finder's fee.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", + " `DataDepositPerByte` for each byte in `reason`.", + "", + " - `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + " - `who`: The account which should be credited for the tip.", + "", + " Emits `NewTip` if successful.", + "", + " # ", + " - Complexity: `O(R)` where `R` length of `reason`.", + " - encoding and hashing of 'reason'", + " - DbReads: `Reasons`, `Tips`", + " - DbWrites: `Reasons`, `Tips`", + " # " + ] + }, + { + "name": "retract_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "documentation": [ + " Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", + "", + " If successful, the original deposit will be unreserved.", + "", + " The dispatch origin for this call must be _Signed_ and the tip identified by `hash`", + " must have been reported by the signing account through `report_awesome` (and not", + " through `tip_new`).", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + " Emits `TipRetracted` if successful.", + "", + " # ", + " - Complexity: `O(1)`", + " - Depends on the length of `T::Hash` which is fixed.", + " - DbReads: `Tips`, `origin account`", + " - DbWrites: `Reasons`, `Tips`, `origin account`", + " # " + ] + }, + { + "name": "tip_new", + "args": [ + { + "name": "reason", + "type": "Bytes" + }, + { + "name": "who", + "type": "AccountId" + }, + { + "name": "tip_value", + "type": "Compact" + } + ], + "documentation": [ + " Give a tip for something new; no finder's fee will be taken.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must be a", + " member of the `Tippers` set.", + "", + " - `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + " - `who`: The account which should be credited for the tip.", + " - `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + " Emits `NewTip` if successful.", + "", + " # ", + " - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers.", + " - `O(T)`: decoding `Tipper` vec of length `T`", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + " - `O(R)`: hashing and encoding of reason of length `R`", + " - DbReads: `Tippers`, `Reasons`", + " - DbWrites: `Reasons`, `Tips`", + " # " + ] + }, + { + "name": "tip", + "args": [ + { + "name": "hash", + "type": "Hash" + }, + { + "name": "tip_value", + "type": "Compact" + } + ], + "documentation": [ + " Declare a tip value for an already-open tip.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must be a", + " member of the `Tippers` set.", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary", + " account ID.", + " - `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + " Emits `TipClosing` if the threshold of tippers has been reached and the countdown period", + " has started.", + "", + " # ", + " - Complexity: `O(T)` where `T` is the number of tippers.", + " decoding `Tipper` vec of length `T`, insert tip and check closing,", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + "", + " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it", + " is weighted as if almost full i.e of length `T-1`.", + " - DbReads: `Tippers`, `Tips`", + " - DbWrites: `Tips`", + " # " + ] + }, + { + "name": "close_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "documentation": [ + " Close and payout a tip.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " The tip identified by `hash` must have finished its countdown period.", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + " # ", + " - Complexity: `O(T)` where `T` is the number of tippers.", + " decoding `Tipper` vec of length `T`.", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + " - DbReads: `Tips`, `Tippers`, `tip finder`", + " - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`", + " # " + ] + } + ], + "events": [ + { + "name": "NewTip", + "args": [ + "Hash" + ], + "documentation": [ + " A new tip suggestion has been opened. \\[tip_hash\\]" + ] + }, + { + "name": "TipClosing", + "args": [ + "Hash" + ], + "documentation": [ + " A tip suggestion has reached threshold and is closing. \\[tip_hash\\]" + ] + }, + { + "name": "TipClosed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A tip suggestion has been closed. \\[tip_hash, who, payout\\]" + ] + }, + { + "name": "TipRetracted", + "args": [ + "Hash" + ], + "documentation": [ + " A tip suggestion has been retracted. \\[tip_hash\\]" + ] + } + ], + "constants": [ + { + "name": "TipCountdown", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " The period for which a tip remains open after is has achieved threshold tippers." + ] + }, + { + "name": "TipFindersFee", + "type": "Percent", + "value": "0x14", + "documentation": [ + " The amount of the final tip which goes to the original reporter of the tip." + ] + }, + { + "name": "TipReportDepositBase", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The amount held on deposit for placing a tip report." + ] + }, + { + "name": "DataDepositPerByte", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount held on deposit per byte within the tip report reason." + ] + }, + { + "name": "MaximumReasonLength", + "type": "u32", + "value": "0x00400000", + "documentation": [ + " Maximum acceptable reason length." + ] + } + ], + "errors": [ + { + "name": "ReasonTooBig", + "documentation": [ + " The reason given is just too big." + ] + }, + { + "name": "AlreadyKnown", + "documentation": [ + " The tip was already found/started." + ] + }, + { + "name": "UnknownTip", + "documentation": [ + " The tip hash is unknown." + ] + }, + { + "name": "NotFinder", + "documentation": [ + " The account attempting to retract the tip is not the finder of the tip." + ] + }, + { + "name": "StillOpen", + "documentation": [ + " The tip cannot be claimed/closed because there are not enough tippers yet." + ] + }, + { + "name": "Premature", + "documentation": [ + " The tip cannot be claimed/closed because it's still in the countdown period." + ] + } + ], + "index": 32 + }, + { + "name": "Assets", + "storage": { + "prefix": "Assets", + "items": [ + { + "name": "Asset", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Blake2_128Concat", + "key": "AssetId", + "value": "AssetDetails", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Details of an asset." + ] + }, + { + "name": "Account", + "modifier": "Default", + "type": { + "DoubleMap": { + "hasher": "Blake2_128Concat", + "key1": "AssetId", + "key2": "AccountId", + "value": "AssetBalance", + "key2Hasher": "Blake2_128Concat" + } + }, + "fallback": "0x00000000000000000000", + "documentation": [ + " The number of units of assets held by any given account." + ] + } + ] + }, + "calls": [ + { + "name": "create", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "admin", + "type": "LookupSource" + }, + { + "name": "max_zombies", + "type": "u32" + }, + { + "name": "min_balance", + "type": "Balance" + } + ], + "documentation": [ + " Issue a new class of fungible assets from a public origin.", + "", + " This new asset class has no assets initially.", + "", + " The origin must be Signed and the sender must have sufficient funds free.", + "", + " Funds of sender are reserved according to the formula:", + " `AssetDepositBase + AssetDepositPerZombie * max_zombies`.", + "", + " Parameters:", + " - `id`: The identifier of the new asset. This must not be currently in use to identify", + " an existing asset.", + " - `owner`: The owner of this class of assets. The owner has full superuser permissions", + " over this asset, but may later change and configure the permissions using `transfer_ownership`", + " and `set_team`.", + " - `max_zombies`: The total number of accounts which may hold assets in this class yet", + " have no existential deposit.", + " - `min_balance`: The minimum balance of this new asset that any single account must", + " have. If an account's balance is reduced below this, then it collapses to zero.", + "", + " Emits `Created` event when successful.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "force_create", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "max_zombies", + "type": "Compact" + }, + { + "name": "min_balance", + "type": "Compact" + } + ], + "documentation": [ + " Issue a new class of fungible assets from a privileged origin.", + "", + " This new asset class has no assets initially.", + "", + " The origin must conform to `ForceOrigin`.", + "", + " Unlike `create`, no funds are reserved.", + "", + " - `id`: The identifier of the new asset. This must not be currently in use to identify", + " an existing asset.", + " - `owner`: The owner of this class of assets. The owner has full superuser permissions", + " over this asset, but may later change and configure the permissions using `transfer_ownership`", + " and `set_team`.", + " - `max_zombies`: The total number of accounts which may hold assets in this class yet", + " have no existential deposit.", + " - `min_balance`: The minimum balance of this new asset that any single account must", + " have. If an account's balance is reduced below this, then it collapses to zero.", + "", + " Emits `ForceCreated` event when successful.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "destroy", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "zombies_witness", + "type": "Compact" + } + ], + "documentation": [ + " Destroy a class of fungible assets owned by the sender.", + "", + " The origin must be Signed and the sender must be the owner of the asset `id`.", + "", + " - `id`: The identifier of the asset to be destroyed. This must identify an existing", + " asset.", + "", + " Emits `Destroyed` event when successful.", + "", + " Weight: `O(z)` where `z` is the number of zombie accounts." + ] + }, + { + "name": "force_destroy", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "zombies_witness", + "type": "Compact" + } + ], + "documentation": [ + " Destroy a class of fungible assets.", + "", + " The origin must conform to `ForceOrigin`.", + "", + " - `id`: The identifier of the asset to be destroyed. This must identify an existing", + " asset.", + "", + " Emits `Destroyed` event when successful.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "mint", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Mint assets of a particular class.", + "", + " The origin must be Signed and the sender must be the Issuer of the asset `id`.", + "", + " - `id`: The identifier of the asset to have some amount minted.", + " - `beneficiary`: The account to be credited with the minted assets.", + " - `amount`: The amount of the asset to be minted.", + "", + " Emits `Destroyed` event when successful.", + "", + " Weight: `O(1)`", + " Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`." + ] + }, + { + "name": "burn", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Reduce the balance of `who` by as much as possible up to `amount` assets of `id`.", + "", + " Origin must be Signed and the sender should be the Manager of the asset `id`.", + "", + " Bails with `BalanceZero` if the `who` is already dead.", + "", + " - `id`: The identifier of the asset to have some amount burned.", + " - `who`: The account to be debited from.", + " - `amount`: The maximum amount by which `who`'s balance should be reduced.", + "", + " Emits `Burned` with the actual amount burned. If this takes the balance to below the", + " minimum for the asset, then the amount burned is increased to take it to zero.", + "", + " Weight: `O(1)`", + " Modes: Post-existence of `who`; Pre & post Zombie-status of `who`." + ] + }, + { + "name": "transfer", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Move some assets from the sender account to another.", + "", + " Origin must be Signed.", + "", + " - `id`: The identifier of the asset to have some amount transferred.", + " - `target`: The account to be credited.", + " - `amount`: The amount by which the sender's balance of assets should be reduced and", + " `target`'s balance increased. The amount actually transferred may be slightly greater in", + " the case that the transfer would otherwise take the sender balance above zero but below", + " the minimum balance. Must be greater than zero.", + "", + " Emits `Transferred` with the actual amount transferred. If this takes the source balance", + " to below the minimum for the asset, then the amount transferred is increased to take it", + " to zero.", + "", + " Weight: `O(1)`", + " Modes: Pre-existence of `target`; Post-existence of sender; Prior & post zombie-status", + " of sender; Account pre-existence of `target`." + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Move some assets from one account to another.", + "", + " Origin must be Signed and the sender should be the Admin of the asset `id`.", + "", + " - `id`: The identifier of the asset to have some amount transferred.", + " - `source`: The account to be debited.", + " - `dest`: The account to be credited.", + " - `amount`: The amount by which the `source`'s balance of assets should be reduced and", + " `dest`'s balance increased. The amount actually transferred may be slightly greater in", + " the case that the transfer would otherwise take the `source` balance above zero but", + " below the minimum balance. Must be greater than zero.", + "", + " Emits `Transferred` with the actual amount transferred. If this takes the source balance", + " to below the minimum for the asset, then the amount transferred is increased to take it", + " to zero.", + "", + " Weight: `O(1)`", + " Modes: Pre-existence of `dest`; Post-existence of `source`; Prior & post zombie-status", + " of `source`; Account pre-existence of `dest`." + ] + }, + { + "name": "freeze", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "who", + "type": "LookupSource" + } + ], + "documentation": [ + " Disallow further unprivileged transfers from an account.", + "", + " Origin must be Signed and the sender should be the Freezer of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + " - `who`: The account to be frozen.", + "", + " Emits `Frozen`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "thaw", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "who", + "type": "LookupSource" + } + ], + "documentation": [ + " Allow unprivileged transfers from an account again.", + "", + " Origin must be Signed and the sender should be the Admin of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + " - `who`: The account to be unfrozen.", + "", + " Emits `Thawed`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "transfer_ownership", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + } + ], + "documentation": [ + " Change the Owner of an asset.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + " - `owner`: The new Owner of this asset.", + "", + " Emits `OwnerChanged`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "set_team", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "issuer", + "type": "LookupSource" + }, + { + "name": "admin", + "type": "LookupSource" + }, + { + "name": "freezer", + "type": "LookupSource" + } + ], + "documentation": [ + " Change the Issuer, Admin and Freezer of an asset.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + " - `issuer`: The new Issuer of this asset.", + " - `admin`: The new Admin of this asset.", + " - `freezer`: The new Freezer of this asset.", + "", + " Emits `TeamChanged`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "set_max_zombies", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "max_zombies", + "type": "Compact" + } + ], + "documentation": [] + } + ], + "events": [ + { + "name": "Created", + "args": [ + "AssetId", + "AccountId", + "AccountId" + ], + "documentation": [ + " Some asset class was created. \\[asset_id, creator, owner\\]" + ] + }, + { + "name": "Issued", + "args": [ + "AssetId", + "AccountId", + "Balance" + ], + "documentation": [ + " Some assets were issued. \\[asset_id, owner, total_supply\\]" + ] + }, + { + "name": "Transferred", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Some assets were transferred. \\[asset_id, from, to, amount\\]" + ] + }, + { + "name": "Burned", + "args": [ + "AssetId", + "AccountId", + "Balance" + ], + "documentation": [ + " Some assets were destroyed. \\[asset_id, owner, balance\\]" + ] + }, + { + "name": "TeamChanged", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "AccountId" + ], + "documentation": [ + " The management team changed \\[asset_id, issuer, admin, freezer\\]" + ] + }, + { + "name": "OwnerChanged", + "args": [ + "AssetId", + "AccountId" + ], + "documentation": [ + " The owner changed \\[asset_id, owner\\]" + ] + }, + { + "name": "ForceTransferred", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Some assets was transferred by an admin. \\[asset_id, from, to, amount\\]" + ] + }, + { + "name": "Frozen", + "args": [ + "AssetId", + "AccountId" + ], + "documentation": [ + " Some account `who` was frozen. \\[asset_id, who\\]" + ] + }, + { + "name": "Thawed", + "args": [ + "AssetId", + "AccountId" + ], + "documentation": [ + " Some account `who` was thawed. \\[asset_id, who\\]" + ] + }, + { + "name": "Destroyed", + "args": [ + "AssetId" + ], + "documentation": [ + " An asset class was destroyed." + ] + }, + { + "name": "ForceCreated", + "args": [ + "AssetId", + "AccountId" + ], + "documentation": [ + " Some asset class was force-created. \\[asset_id, owner\\]" + ] + }, + { + "name": "MaxZombiesChanged", + "args": [ + "AssetId", + "u32" + ], + "documentation": [ + " The maximum amount of zombies allowed has changed. \\[asset_id, max_zombies\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "AmountZero", + "documentation": [ + " Transfer amount should be non-zero." + ] + }, + { + "name": "BalanceLow", + "documentation": [ + " Account balance must be greater than or equal to the transfer amount." + ] + }, + { + "name": "BalanceZero", + "documentation": [ + " Balance should be non-zero." + ] + }, + { + "name": "NoPermission", + "documentation": [ + " The signing account has no permission to do the operation." + ] + }, + { + "name": "Unknown", + "documentation": [ + " The given asset ID is unknown." + ] + }, + { + "name": "Frozen", + "documentation": [ + " The origin account is frozen." + ] + }, + { + "name": "InUse", + "documentation": [ + " The asset ID is already taken." + ] + }, + { + "name": "TooManyZombies", + "documentation": [ + " Too many zombie accounts in use." + ] + }, + { + "name": "RefsLeft", + "documentation": [ + " Attempt to destroy an asset class when non-zombie, reference-bearing accounts exist." + ] + }, + { + "name": "BadWitness", + "documentation": [ + " Invalid witness data given." + ] + }, + { + "name": "MinBalanceZero", + "documentation": [ + " Minimum balance should be non-zero." + ] + }, + { + "name": "Overflow", + "documentation": [ + " A mint operation lead to an overflow." + ] + } + ], + "index": 33 + }, + { + "name": "Mmr", + "storage": { + "prefix": "MerkleMountainRange", + "items": [ + { + "name": "RootHash", + "modifier": "Default", + "type": { + "Plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Latest MMR Root hash." + ] + }, + { + "name": "NumberOfLeaves", + "modifier": "Default", + "type": { + "Plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current size of the MMR (number of leaves)." + ] + }, + { + "name": "Nodes", + "modifier": "Optional", + "type": { + "Map": { + "hasher": "Identity", + "key": "u64", + "value": "Hash", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Hashes of the nodes in the MMR.", + "", + " Note this collection only contains MMR peaks, the inner nodes (and leaves)", + " are pruned and only stored in the Offchain DB." + ] + } + ] + }, + "calls": null, + "events": null, + "constants": [], + "errors": [], + "index": 34 + } + ], + "extrinsic": { + "version": 4, + "signedExtensions": [ + "CheckSpecVersion", + "CheckTxVersion", + "CheckGenesis", + "CheckMortality", + "CheckNonce", + "CheckWeight", + "ChargeTransactionPayment" + ] + } + } + } +} diff --git a/packages/solidity/src/Data/Solidity/Abi/Codec.hs b/packages/solidity/src/Data/Solidity/Abi/Codec.hs index 0fd6d3bf..51e397a8 100644 --- a/packages/solidity/src/Data/Solidity/Abi/Codec.hs +++ b/packages/solidity/src/Data/Solidity/Abi/Codec.hs @@ -21,6 +21,9 @@ module Data.Solidity.Abi.Codec -- * Generic encoding , encode' , decode' + + -- * Generic type re-export + , Generic ) where import Data.ByteArray (ByteArray, ByteArrayAccess, convert) From 591d186441266d5ef11fb1c2c68a56776710a308 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 8 Jan 2021 17:41:42 +0300 Subject: [PATCH 174/237] Added XXHash into web3-crypto --- packages/crypto/package.yaml | 10 +- packages/crypto/src/Data/Digest/XXHash.hsc | 49 + packages/crypto/src/cbits/xxhash.c | 43 + packages/crypto/src/cbits/xxhash.h | 4766 +++++++++++++++++ .../tests/Data/Digest/Test/XXHashSpec.hs | 33 + 5 files changed, 4900 insertions(+), 1 deletion(-) create mode 100644 packages/crypto/src/Data/Digest/XXHash.hsc create mode 100644 packages/crypto/src/cbits/xxhash.c create mode 100644 packages/crypto/src/cbits/xxhash.h create mode 100644 packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index 173cb6aa..471e076f 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -10,6 +10,10 @@ maintainer: mail@akru.me copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network +extra-source-files: +- src/cbits/xxhash.h +- src/cbits/xxhash.c + dependencies: - base >4.11 && <4.14 - text >1.2 && <1.3 @@ -47,7 +51,9 @@ ghc-options: - -Wtabs library: - source-dirs: src + source-dirs: src + include-dirs: src/cbits + c-sources: src/cbits/xxhash.c tests: tests: @@ -55,6 +61,8 @@ tests: source-dirs: - tests - src + include-dirs: src/cbits + c-sources: src/cbits/xxhash.c dependencies: - hspec-expectations >=0.8.2 && <0.9 - hspec-discover >=2.4.4 && <2.8 diff --git a/packages/crypto/src/Data/Digest/XXHash.hsc b/packages/crypto/src/Data/Digest/XXHash.hsc new file mode 100644 index 00000000..f43dcd4f --- /dev/null +++ b/packages/crypto/src/Data/Digest/XXHash.hsc @@ -0,0 +1,49 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE RecordWildCards #-} + +-- | +-- Module : Data.Digest.XXHash +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- xxHash C library bindings. +-- +-- Variable bitLength implementation corresponds to polkadot-util: +-- https://github.com/polkadot-js/common/tree/master/packages/util-crypto/src/xxhash +-- + +module Data.Digest.XXHash (xxhash) where + +import Data.ByteString (ByteString, useAsCStringLen) +import Data.ByteString.Builder (toLazyByteString, word64LE) +import qualified Data.ByteString.Lazy as LBS (ByteString) +import Foreign +import Foreign.C.String +import Foreign.C.Types +import System.IO.Unsafe (unsafePerformIO) + +#include + +foreign import ccall unsafe "xxhash.h XXH64" + c_XXH64 :: CString -> CSize -> CUInt -> IO Word64 + +xxhash_64 :: CUInt -> ByteString -> Word64 +xxhash_64 seed = unsafePerformIO . flip useAsCStringLen + (\(str, len) -> c_XXH64 str (fromIntegral len) seed) + +-- | Create the xxhash64 and return the result with the specified 'bitLength'. +xxhash :: Integral bitLength + => bitLength + -- ^ Bit lenght of output, will be ceiling to 64 bit. + -> ByteString + -- ^ Input data. + -> LBS.ByteString + -- ^ Output hash. +xxhash bitLength input = toLazyByteString $ mconcat + [ word64LE (xxhash_64 seed input) | seed <- [0 .. (iterations - 1)]] + where + iterations = ceiling (fromIntegral bitLength / 64) diff --git a/packages/crypto/src/cbits/xxhash.c b/packages/crypto/src/cbits/xxhash.c new file mode 100644 index 00000000..0fae88c5 --- /dev/null +++ b/packages/crypto/src/cbits/xxhash.c @@ -0,0 +1,43 @@ +/* + * xxHash - Extremely Fast Hash algorithm + * Copyright (C) 2012-2020 Yann Collet + * + * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You can contact the author at: + * - xxHash homepage: https://www.xxhash.com + * - xxHash source repository: https://github.com/Cyan4973/xxHash + */ + + +/* + * xxhash.c instantiates functions defined in xxhash.h + */ + +#define XXH_STATIC_LINKING_ONLY /* access advanced declarations */ +#define XXH_IMPLEMENTATION /* access definitions */ + +#include "xxhash.h" diff --git a/packages/crypto/src/cbits/xxhash.h b/packages/crypto/src/cbits/xxhash.h new file mode 100644 index 00000000..2d56d23c --- /dev/null +++ b/packages/crypto/src/cbits/xxhash.h @@ -0,0 +1,4766 @@ +/* + * xxHash - Extremely Fast Hash algorithm + * Header File + * Copyright (C) 2012-2020 Yann Collet + * + * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You can contact the author at: + * - xxHash homepage: https://www.xxhash.com + * - xxHash source repository: https://github.com/Cyan4973/xxHash + */ + +/* TODO: update */ +/* Notice extracted from xxHash homepage: + +xxHash is an extremely fast hash algorithm, running at RAM speed limits. +It also successfully passes all tests from the SMHasher suite. + +Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 Duo @3GHz) + +Name Speed Q.Score Author +xxHash 5.4 GB/s 10 +CrapWow 3.2 GB/s 2 Andrew +MumurHash 3a 2.7 GB/s 10 Austin Appleby +SpookyHash 2.0 GB/s 10 Bob Jenkins +SBox 1.4 GB/s 9 Bret Mulvey +Lookup3 1.2 GB/s 9 Bob Jenkins +SuperFastHash 1.2 GB/s 1 Paul Hsieh +CityHash64 1.05 GB/s 10 Pike & Alakuijala +FNV 0.55 GB/s 5 Fowler, Noll, Vo +CRC32 0.43 GB/s 9 +MD5-32 0.33 GB/s 10 Ronald L. Rivest +SHA1-32 0.28 GB/s 10 + +Q.Score is a measure of quality of the hash function. +It depends on successfully passing SMHasher test set. +10 is a perfect score. + +Note: SMHasher's CRC32 implementation is not the fastest one. +Other speed-oriented implementations can be faster, +especially in combination with PCLMUL instruction: +https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html?showComment=1552696407071#c3490092340461170735 + +A 64-bit version, named XXH64, is available since r35. +It offers much better speed, but for 64-bit applications only. +Name Speed on 64 bits Speed on 32 bits +XXH64 13.8 GB/s 1.9 GB/s +XXH32 6.8 GB/s 6.0 GB/s +*/ + +#if defined (__cplusplus) +extern "C" { +#endif + +/* **************************** + * INLINE mode + ******************************/ +/*! + * XXH_INLINE_ALL (and XXH_PRIVATE_API) + * Use these build macros to inline xxhash into the target unit. + * Inlining improves performance on small inputs, especially when the length is + * expressed as a compile-time constant: + * + * https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html + * + * It also keeps xxHash symbols private to the unit, so they are not exported. + * + * Usage: + * #define XXH_INLINE_ALL + * #include "xxhash.h" + * + * Do not compile and link xxhash.o as a separate object, as it is not useful. + */ +#if (defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)) \ + && !defined(XXH_INLINE_ALL_31684351384) + /* this section should be traversed only once */ +# define XXH_INLINE_ALL_31684351384 + /* give access to the advanced API, required to compile implementations */ +# undef XXH_STATIC_LINKING_ONLY /* avoid macro redef */ +# define XXH_STATIC_LINKING_ONLY + /* make all functions private */ +# undef XXH_PUBLIC_API +# if defined(__GNUC__) +# define XXH_PUBLIC_API static __inline __attribute__((unused)) +# elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +# define XXH_PUBLIC_API static inline +# elif defined(_MSC_VER) +# define XXH_PUBLIC_API static __inline +# else + /* note: this version may generate warnings for unused static functions */ +# define XXH_PUBLIC_API static +# endif + + /* + * This part deals with the special case where a unit wants to inline xxHash, + * but "xxhash.h" has previously been included without XXH_INLINE_ALL, such + * as part of some previously included *.h header file. + * Without further action, the new include would just be ignored, + * and functions would effectively _not_ be inlined (silent failure). + * The following macros solve this situation by prefixing all inlined names, + * avoiding naming collision with previous inclusions. + */ +# ifdef XXH_NAMESPACE +# error "XXH_INLINE_ALL with XXH_NAMESPACE is not supported" + /* + * Note: Alternative: #undef all symbols (it's a pretty large list). + * Without #error: it compiles, but functions are actually not inlined. + */ +# endif +# define XXH_NAMESPACE XXH_INLINE_ + /* + * Some identifiers (enums, type names) are not symbols, but they must + * still be renamed to avoid redeclaration. + * Alternative solution: do not redeclare them. + * However, this requires some #ifdefs, and is a more dispersed action. + * Meanwhile, renaming can be achieved in a single block + */ +# define XXH_IPREF(Id) XXH_INLINE_ ## Id +# define XXH_OK XXH_IPREF(XXH_OK) +# define XXH_ERROR XXH_IPREF(XXH_ERROR) +# define XXH_errorcode XXH_IPREF(XXH_errorcode) +# define XXH32_canonical_t XXH_IPREF(XXH32_canonical_t) +# define XXH64_canonical_t XXH_IPREF(XXH64_canonical_t) +# define XXH128_canonical_t XXH_IPREF(XXH128_canonical_t) +# define XXH32_state_s XXH_IPREF(XXH32_state_s) +# define XXH32_state_t XXH_IPREF(XXH32_state_t) +# define XXH64_state_s XXH_IPREF(XXH64_state_s) +# define XXH64_state_t XXH_IPREF(XXH64_state_t) +# define XXH3_state_s XXH_IPREF(XXH3_state_s) +# define XXH3_state_t XXH_IPREF(XXH3_state_t) +# define XXH128_hash_t XXH_IPREF(XXH128_hash_t) + /* Ensure the header is parsed again, even if it was previously included */ +# undef XXHASH_H_5627135585666179 +# undef XXHASH_H_STATIC_13879238742 +#endif /* XXH_INLINE_ALL || XXH_PRIVATE_API */ + + + +/* **************************************************************** + * Stable API + *****************************************************************/ +#ifndef XXHASH_H_5627135585666179 +#define XXHASH_H_5627135585666179 1 + +/* specific declaration modes for Windows */ +#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API) +# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT)) +# ifdef XXH_EXPORT +# define XXH_PUBLIC_API __declspec(dllexport) +# elif XXH_IMPORT +# define XXH_PUBLIC_API __declspec(dllimport) +# endif +# else +# define XXH_PUBLIC_API /* do nothing */ +# endif +#endif + +/*! + * XXH_NAMESPACE, aka Namespace Emulation: + * + * If you want to include _and expose_ xxHash functions from within your own + * library, but also want to avoid symbol collisions with other libraries which + * may also include xxHash, you can use XXH_NAMESPACE to automatically prefix + * any public symbol from xxhash library with the value of XXH_NAMESPACE + * (therefore, avoid empty or numeric values). + * + * Note that no change is required within the calling program as long as it + * includes `xxhash.h`: Regular symbol names will be automatically translated + * by this header. + */ +#ifdef XXH_NAMESPACE +# define XXH_CAT(A,B) A##B +# define XXH_NAME2(A,B) XXH_CAT(A,B) +# define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber) +/* XXH32 */ +# define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32) +# define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState) +# define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState) +# define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset) +# define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update) +# define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest) +# define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState) +# define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash) +# define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical) +/* XXH64 */ +# define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64) +# define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState) +# define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState) +# define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset) +# define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update) +# define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest) +# define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState) +# define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash) +# define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical) +/* XXH3_64bits */ +# define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits) +# define XXH3_64bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecret) +# define XXH3_64bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSeed) +# define XXH3_createState XXH_NAME2(XXH_NAMESPACE, XXH3_createState) +# define XXH3_freeState XXH_NAME2(XXH_NAMESPACE, XXH3_freeState) +# define XXH3_copyState XXH_NAME2(XXH_NAMESPACE, XXH3_copyState) +# define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset) +# define XXH3_64bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSeed) +# define XXH3_64bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecret) +# define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update) +# define XXH3_64bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_digest) +# define XXH3_generateSecret XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret) +/* XXH3_128bits */ +# define XXH128 XXH_NAME2(XXH_NAMESPACE, XXH128) +# define XXH3_128bits XXH_NAME2(XXH_NAMESPACE, XXH3_128bits) +# define XXH3_128bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSeed) +# define XXH3_128bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecret) +# define XXH3_128bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset) +# define XXH3_128bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSeed) +# define XXH3_128bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecret) +# define XXH3_128bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_update) +# define XXH3_128bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_digest) +# define XXH128_isEqual XXH_NAME2(XXH_NAMESPACE, XXH128_isEqual) +# define XXH128_cmp XXH_NAME2(XXH_NAMESPACE, XXH128_cmp) +# define XXH128_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH128_canonicalFromHash) +# define XXH128_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH128_hashFromCanonical) +#endif + + +/* ************************************* +* Version +***************************************/ +#define XXH_VERSION_MAJOR 0 +#define XXH_VERSION_MINOR 8 +#define XXH_VERSION_RELEASE 0 +#define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE) +XXH_PUBLIC_API unsigned XXH_versionNumber (void); + + +/* **************************** +* Definitions +******************************/ +#include /* size_t */ +typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode; + + +/*-********************************************************************** +* 32-bit hash +************************************************************************/ +#if !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# include + typedef uint32_t XXH32_hash_t; +#else +# include +# if UINT_MAX == 0xFFFFFFFFUL + typedef unsigned int XXH32_hash_t; +# else +# if ULONG_MAX == 0xFFFFFFFFUL + typedef unsigned long XXH32_hash_t; +# else +# error "unsupported platform: need a 32-bit type" +# endif +# endif +#endif + +/*! + * XXH32(): + * Calculate the 32-bit hash of sequence "length" bytes stored at memory address "input". + * The memory between input & input+length must be valid (allocated and read-accessible). + * "seed" can be used to alter the result predictably. + * Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark): 5.4 GB/s + * + * Note: XXH3 provides competitive speed for both 32-bit and 64-bit systems, + * and offers true 64/128 bit hash results. It provides a superior level of + * dispersion, and greatly reduces the risks of collisions. + */ +XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed); + +/******* Streaming *******/ + +/* + * Streaming functions generate the xxHash value from an incrememtal input. + * This method is slower than single-call functions, due to state management. + * For small inputs, prefer `XXH32()` and `XXH64()`, which are better optimized. + * + * An XXH state must first be allocated using `XXH*_createState()`. + * + * Start a new hash by initializing the state with a seed using `XXH*_reset()`. + * + * Then, feed the hash state by calling `XXH*_update()` as many times as necessary. + * + * The function returns an error code, with 0 meaning OK, and any other value + * meaning there is an error. + * + * Finally, a hash value can be produced anytime, by using `XXH*_digest()`. + * This function returns the nn-bits hash as an int or long long. + * + * It's still possible to continue inserting input into the hash state after a + * digest, and generate new hash values later on by invoking `XXH*_digest()`. + * + * When done, release the state using `XXH*_freeState()`. + */ + +typedef struct XXH32_state_s XXH32_state_t; /* incomplete type */ +XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void); +XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr); +XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dst_state, const XXH32_state_t* src_state); + +XXH_PUBLIC_API XXH_errorcode XXH32_reset (XXH32_state_t* statePtr, XXH32_hash_t seed); +XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length); +XXH_PUBLIC_API XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr); + +/******* Canonical representation *******/ + +/* + * The default return values from XXH functions are unsigned 32 and 64 bit + * integers. + * This the simplest and fastest format for further post-processing. + * + * However, this leaves open the question of what is the order on the byte level, + * since little and big endian conventions will store the same number differently. + * + * The canonical representation settles this issue by mandating big-endian + * convention, the same convention as human-readable numbers (large digits first). + * + * When writing hash values to storage, sending them over a network, or printing + * them, it's highly recommended to use the canonical representation to ensure + * portability across a wider range of systems, present and future. + * + * The following functions allow transformation of hash values to and from + * canonical format. + */ + +typedef struct { unsigned char digest[4]; } XXH32_canonical_t; +XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash); +XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src); + + +#ifndef XXH_NO_LONG_LONG +/*-********************************************************************** +* 64-bit hash +************************************************************************/ +#if !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# include + typedef uint64_t XXH64_hash_t; +#else + /* the following type must have a width of 64-bit */ + typedef unsigned long long XXH64_hash_t; +#endif + +/*! + * XXH64(): + * Returns the 64-bit hash of sequence of length @length stored at memory + * address @input. + * @seed can be used to alter the result predictably. + * + * This function usually runs faster on 64-bit systems, but slower on 32-bit + * systems (see benchmark). + * + * Note: XXH3 provides competitive speed for both 32-bit and 64-bit systems, + * and offers true 64/128 bit hash results. It provides a superior level of + * dispersion, and greatly reduces the risks of collisions. + */ +XXH_PUBLIC_API XXH64_hash_t XXH64 (const void* input, size_t length, XXH64_hash_t seed); + +/******* Streaming *******/ +typedef struct XXH64_state_s XXH64_state_t; /* incomplete type */ +XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void); +XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr); +XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t* dst_state, const XXH64_state_t* src_state); + +XXH_PUBLIC_API XXH_errorcode XXH64_reset (XXH64_state_t* statePtr, XXH64_hash_t seed); +XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* statePtr, const void* input, size_t length); +XXH_PUBLIC_API XXH64_hash_t XXH64_digest (const XXH64_state_t* statePtr); + +/******* Canonical representation *******/ +typedef struct { unsigned char digest[sizeof(XXH64_hash_t)]; } XXH64_canonical_t; +XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash); +XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src); + + +/*-********************************************************************** +* XXH3 64-bit variant +************************************************************************/ + +/* ************************************************************************ + * XXH3 is a new hash algorithm featuring: + * - Improved speed for both small and large inputs + * - True 64-bit and 128-bit outputs + * - SIMD acceleration + * - Improved 32-bit viability + * + * Speed analysis methodology is explained here: + * + * https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html + * + * In general, expect XXH3 to run about ~2x faster on large inputs and >3x + * faster on small ones compared to XXH64, though exact differences depend on + * the platform. + * + * The algorithm is portable: Like XXH32 and XXH64, it generates the same hash + * on all platforms. + * + * It benefits greatly from SIMD and 64-bit arithmetic, but does not require it. + * + * Almost all 32-bit and 64-bit targets that can run XXH32 smoothly can run + * XXH3 at competitive speeds, even if XXH64 runs slowly. Further details are + * explained in the implementation. + * + * Optimized implementations are provided for AVX512, AVX2, SSE2, NEON, POWER8, + * ZVector and scalar targets. This can be controlled with the XXH_VECTOR macro. + * + * XXH3 offers 2 variants, _64bits and _128bits. + * When only 64 bits are needed, prefer calling the _64bits variant, as it + * reduces the amount of mixing, resulting in faster speed on small inputs. + * + * It's also generally simpler to manipulate a scalar return type than a struct. + * + * The 128-bit version adds additional strength, but it is slightly slower. + * + * The XXH3 algorithm is still in development. + * The results it produces may still change in future versions. + * + * Results produced by v0.7.x are not comparable with results from v0.7.y. + * However, the API is completely stable, and it can safely be used for + * ephemeral data (local sessions). + * + * Avoid storing values in long-term storage until the algorithm is finalized. + * XXH3's return values will be officially finalized upon reaching v0.8.0. + * + * After which, return values of XXH3 and XXH128 will no longer change in + * future versions. + * + * The API supports one-shot hashing, streaming mode, and custom secrets. + */ + +/* XXH3_64bits(): + * default 64-bit variant, using default secret and default seed of 0. + * It's the fastest variant. */ +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(const void* data, size_t len); + +/* + * XXH3_64bits_withSeed(): + * This variant generates a custom secret on the fly + * based on default secret altered using the `seed` value. + * While this operation is decently fast, note that it's not completely free. + * Note: seed==0 produces the same results as XXH3_64bits(). + */ +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSeed(const void* data, size_t len, XXH64_hash_t seed); + +/* + * XXH3_64bits_withSecret(): + * It's possible to provide any blob of bytes as a "secret" to generate the hash. + * This makes it more difficult for an external actor to prepare an intentional collision. + * The main condition is that secretSize *must* be large enough (>= XXH3_SECRET_SIZE_MIN). + * However, the quality of produced hash values depends on secret's entropy. + * Technically, the secret must look like a bunch of random bytes. + * Avoid "trivial" or structured data such as repeated sequences or a text document. + * Whenever unsure about the "randomness" of the blob of bytes, + * consider relabelling it as a "custom seed" instead, + * and employ "XXH3_generateSecret()" (see below) + * to generate a high entropy secret derived from the custom seed. + */ +#define XXH3_SECRET_SIZE_MIN 136 +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSecret(const void* data, size_t len, const void* secret, size_t secretSize); + + +/******* Streaming *******/ +/* + * Streaming requires state maintenance. + * This operation costs memory and CPU. + * As a consequence, streaming is slower than one-shot hashing. + * For better performance, prefer one-shot functions whenever applicable. + */ +typedef struct XXH3_state_s XXH3_state_t; +XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void); +XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr); +XXH_PUBLIC_API void XXH3_copyState(XXH3_state_t* dst_state, const XXH3_state_t* src_state); + +/* + * XXH3_64bits_reset(): + * Initialize with default parameters. + * digest will be equivalent to `XXH3_64bits()`. + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset(XXH3_state_t* statePtr); +/* + * XXH3_64bits_reset_withSeed(): + * Generate a custom secret from `seed`, and store it into `statePtr`. + * digest will be equivalent to `XXH3_64bits_withSeed()`. + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed); +/* + * XXH3_64bits_reset_withSecret(): + * `secret` is referenced, it _must outlive_ the hash streaming session. + * Similar to one-shot API, `secretSize` must be >= `XXH3_SECRET_SIZE_MIN`, + * and the quality of produced hash values depends on secret's entropy + * (secret's content should look like a bunch of random bytes). + * When in doubt about the randomness of a candidate `secret`, + * consider employing `XXH3_generateSecret()` instead (see below). + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize); + +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH3_state_t* statePtr, const void* input, size_t length); +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t* statePtr); + +/* note : canonical representation of XXH3 is the same as XXH64 + * since they both produce XXH64_hash_t values */ + + +/*-********************************************************************** +* XXH3 128-bit variant +************************************************************************/ + +typedef struct { + XXH64_hash_t low64; + XXH64_hash_t high64; +} XXH128_hash_t; + +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(const void* data, size_t len); +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSeed(const void* data, size_t len, XXH64_hash_t seed); +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSecret(const void* data, size_t len, const void* secret, size_t secretSize); + +/******* Streaming *******/ +/* + * Streaming requires state maintenance. + * This operation costs memory and CPU. + * As a consequence, streaming is slower than one-shot hashing. + * For better performance, prefer one-shot functions whenever applicable. + * + * XXH3_128bits uses the same XXH3_state_t as XXH3_64bits(). + * Use already declared XXH3_createState() and XXH3_freeState(). + * + * All reset and streaming functions have same meaning as their 64-bit counterpart. + */ + +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset(XXH3_state_t* statePtr); +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed); +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize); + +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update (XXH3_state_t* statePtr, const void* input, size_t length); +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t* statePtr); + +/* Following helper functions make it possible to compare XXH128_hast_t values. + * Since XXH128_hash_t is a structure, this capability is not offered by the language. + * Note: For better performance, these functions can be inlined using XXH_INLINE_ALL */ + +/*! + * XXH128_isEqual(): + * Return: 1 if `h1` and `h2` are equal, 0 if they are not. + */ +XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2); + +/*! + * XXH128_cmp(): + * + * This comparator is compatible with stdlib's `qsort()`/`bsearch()`. + * + * return: >0 if *h128_1 > *h128_2 + * =0 if *h128_1 == *h128_2 + * <0 if *h128_1 < *h128_2 + */ +XXH_PUBLIC_API int XXH128_cmp(const void* h128_1, const void* h128_2); + + +/******* Canonical representation *******/ +typedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_canonical_t; +XXH_PUBLIC_API void XXH128_canonicalFromHash(XXH128_canonical_t* dst, XXH128_hash_t hash); +XXH_PUBLIC_API XXH128_hash_t XXH128_hashFromCanonical(const XXH128_canonical_t* src); + + +#endif /* XXH_NO_LONG_LONG */ + +#endif /* XXHASH_H_5627135585666179 */ + + + +#if defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) +#define XXHASH_H_STATIC_13879238742 +/* **************************************************************************** + * This section contains declarations which are not guaranteed to remain stable. + * They may change in future versions, becoming incompatible with a different + * version of the library. + * These declarations should only be used with static linking. + * Never use them in association with dynamic linking! + ***************************************************************************** */ + +/* + * These definitions are only present to allow static allocation + * of XXH states, on stack or in a struct, for example. + * Never **ever** access their members directly. + */ + +struct XXH32_state_s { + XXH32_hash_t total_len_32; + XXH32_hash_t large_len; + XXH32_hash_t v1; + XXH32_hash_t v2; + XXH32_hash_t v3; + XXH32_hash_t v4; + XXH32_hash_t mem32[4]; + XXH32_hash_t memsize; + XXH32_hash_t reserved; /* never read nor write, might be removed in a future version */ +}; /* typedef'd to XXH32_state_t */ + + +#ifndef XXH_NO_LONG_LONG /* defined when there is no 64-bit support */ + +struct XXH64_state_s { + XXH64_hash_t total_len; + XXH64_hash_t v1; + XXH64_hash_t v2; + XXH64_hash_t v3; + XXH64_hash_t v4; + XXH64_hash_t mem64[4]; + XXH32_hash_t memsize; + XXH32_hash_t reserved32; /* required for padding anyway */ + XXH64_hash_t reserved64; /* never read nor write, might be removed in a future version */ +}; /* typedef'd to XXH64_state_t */ + +#if defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11+ */ +# include +# define XXH_ALIGN(n) alignas(n) +#elif defined(__GNUC__) +# define XXH_ALIGN(n) __attribute__ ((aligned(n))) +#elif defined(_MSC_VER) +# define XXH_ALIGN(n) __declspec(align(n)) +#else +# define XXH_ALIGN(n) /* disabled */ +#endif + +/* Old GCC versions only accept the attribute after the type in structures. */ +#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) /* C11+ */ \ + && defined(__GNUC__) +# define XXH_ALIGN_MEMBER(align, type) type XXH_ALIGN(align) +#else +# define XXH_ALIGN_MEMBER(align, type) XXH_ALIGN(align) type +#endif + +#define XXH3_INTERNALBUFFER_SIZE 256 +#define XXH3_SECRET_DEFAULT_SIZE 192 +struct XXH3_state_s { + XXH_ALIGN_MEMBER(64, XXH64_hash_t acc[8]); + /* used to store a custom secret generated from a seed */ + XXH_ALIGN_MEMBER(64, unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]); + XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]); + XXH32_hash_t bufferedSize; + XXH32_hash_t reserved32; + size_t nbStripesSoFar; + XXH64_hash_t totalLen; + size_t nbStripesPerBlock; + size_t secretLimit; + XXH64_hash_t seed; + XXH64_hash_t reserved64; + const unsigned char* extSecret; /* reference to external secret; + * if == NULL, use .customSecret instead */ + /* note: there may be some padding at the end due to alignment on 64 bytes */ +}; /* typedef'd to XXH3_state_t */ + +#undef XXH_ALIGN_MEMBER + +/* When the XXH3_state_t structure is merely emplaced on stack, + * it should be initialized with XXH3_INITSTATE() or a memset() + * in case its first reset uses XXH3_NNbits_reset_withSeed(). + * This init can be omitted if the first reset uses default or _withSecret mode. + * This operation isn't necessary when the state is created with XXH3_createState(). + * Note that this doesn't prepare the state for a streaming operation, + * it's still necessary to use XXH3_NNbits_reset*() afterwards. + */ +#define XXH3_INITSTATE(XXH3_state_ptr) { (XXH3_state_ptr)->seed = 0; } + + +/* === Experimental API === */ +/* Symbols defined below must be considered tied to a specific library version. */ + +/* + * XXH3_generateSecret(): + * + * Derive a high-entropy secret from any user-defined content, named customSeed. + * The generated secret can be used in combination with `*_withSecret()` functions. + * The `_withSecret()` variants are useful to provide a higher level of protection than 64-bit seed, + * as it becomes much more difficult for an external actor to guess how to impact the calculation logic. + * + * The function accepts as input a custom seed of any length and any content, + * and derives from it a high-entropy secret of length XXH3_SECRET_DEFAULT_SIZE + * into an already allocated buffer secretBuffer. + * The generated secret is _always_ XXH_SECRET_DEFAULT_SIZE bytes long. + * + * The generated secret can then be used with any `*_withSecret()` variant. + * Functions `XXH3_128bits_withSecret()`, `XXH3_64bits_withSecret()`, + * `XXH3_128bits_reset_withSecret()` and `XXH3_64bits_reset_withSecret()` + * are part of this list. They all accept a `secret` parameter + * which must be very long for implementation reasons (>= XXH3_SECRET_SIZE_MIN) + * _and_ feature very high entropy (consist of random-looking bytes). + * These conditions can be a high bar to meet, so + * this function can be used to generate a secret of proper quality. + * + * customSeed can be anything. It can have any size, even small ones, + * and its content can be anything, even stupidly "low entropy" source such as a bunch of zeroes. + * The resulting `secret` will nonetheless provide all expected qualities. + * + * Supplying NULL as the customSeed copies the default secret into `secretBuffer`. + * When customSeedSize > 0, supplying NULL as customSeed is undefined behavior. + */ +XXH_PUBLIC_API void XXH3_generateSecret(void* secretBuffer, const void* customSeed, size_t customSeedSize); + + +/* simple short-cut to pre-selected XXH3_128bits variant */ +XXH_PUBLIC_API XXH128_hash_t XXH128(const void* data, size_t len, XXH64_hash_t seed); + + +#endif /* XXH_NO_LONG_LONG */ + + +#if defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) +# define XXH_IMPLEMENTATION +#endif + +#endif /* defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) */ + + +/* ======================================================================== */ +/* ======================================================================== */ +/* ======================================================================== */ + + +/*-********************************************************************** + * xxHash implementation + *-********************************************************************** + * xxHash's implementation used to be hosted inside xxhash.c. + * + * However, inlining requires implementation to be visible to the compiler, + * hence be included alongside the header. + * Previously, implementation was hosted inside xxhash.c, + * which was then #included when inlining was activated. + * This construction created issues with a few build and install systems, + * as it required xxhash.c to be stored in /include directory. + * + * xxHash implementation is now directly integrated within xxhash.h. + * As a consequence, xxhash.c is no longer needed in /include. + * + * xxhash.c is still available and is still useful. + * In a "normal" setup, when xxhash is not inlined, + * xxhash.h only exposes the prototypes and public symbols, + * while xxhash.c can be built into an object file xxhash.o + * which can then be linked into the final binary. + ************************************************************************/ + +#if ( defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) \ + || defined(XXH_IMPLEMENTATION) ) && !defined(XXH_IMPLEM_13a8737387) +# define XXH_IMPLEM_13a8737387 + +/* ************************************* +* Tuning parameters +***************************************/ +/*! + * XXH_FORCE_MEMORY_ACCESS: + * By default, access to unaligned memory is controlled by `memcpy()`, which is + * safe and portable. + * + * Unfortunately, on some target/compiler combinations, the generated assembly + * is sub-optimal. + * + * The below switch allow selection of a different access method + * in the search for improved performance. + * Method 0 (default): + * Use `memcpy()`. Safe and portable. Default. + * Method 1: + * `__attribute__((packed))` statement. It depends on compiler extensions + * and is therefore not portable. + * This method is safe if your compiler supports it, and *generally* as + * fast or faster than `memcpy`. + * Method 2: + * Direct access via cast. This method doesn't depend on the compiler but + * violates the C standard. + * It can generate buggy code on targets which do not support unaligned + * memory accesses. + * But in some circumstances, it's the only known way to get the most + * performance (example: GCC + ARMv6) + * Method 3: + * Byteshift. This can generate the best code on old compilers which don't + * inline small `memcpy()` calls, and it might also be faster on big-endian + * systems which lack a native byteswap instruction. + * See https://stackoverflow.com/a/32095106/646947 for details. + * Prefer these methods in priority order (0 > 1 > 2 > 3) + */ +#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ +# if !defined(__clang__) && defined(__GNUC__) && defined(__ARM_FEATURE_UNALIGNED) && defined(__ARM_ARCH) && (__ARM_ARCH == 6) +# define XXH_FORCE_MEMORY_ACCESS 2 +# elif !defined(__clang__) && ((defined(__INTEL_COMPILER) && !defined(_WIN32)) || \ + (defined(__GNUC__) && (defined(__ARM_ARCH) && __ARM_ARCH >= 7))) +# define XXH_FORCE_MEMORY_ACCESS 1 +# endif +#endif + +/*! + * XXH_ACCEPT_NULL_INPUT_POINTER: + * If the input pointer is NULL, xxHash's default behavior is to dereference it, + * triggering a segfault. + * When this macro is enabled, xxHash actively checks the input for a null pointer. + * If it is, the result for null input pointers is the same as a zero-length input. + */ +#ifndef XXH_ACCEPT_NULL_INPUT_POINTER /* can be defined externally */ +# define XXH_ACCEPT_NULL_INPUT_POINTER 0 +#endif + +/*! + * XXH_FORCE_ALIGN_CHECK: + * This is an important performance trick + * for architectures without decent unaligned memory access performance. + * It checks for input alignment, and when conditions are met, + * uses a "fast path" employing direct 32-bit/64-bit read, + * resulting in _dramatically faster_ read speed. + * + * The check costs one initial branch per hash, which is generally negligible, but not zero. + * Moreover, it's not useful to generate binary for an additional code path + * if memory access uses same instruction for both aligned and unaligned adresses. + * + * In these cases, the alignment check can be removed by setting this macro to 0. + * Then the code will always use unaligned memory access. + * Align check is automatically disabled on x86, x64 & arm64, + * which are platforms known to offer good unaligned memory accesses performance. + * + * This option does not affect XXH3 (only XXH32 and XXH64). + */ +#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */ +# if defined(__i386) || defined(__x86_64__) || defined(__aarch64__) \ + || defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) /* visual */ +# define XXH_FORCE_ALIGN_CHECK 0 +# else +# define XXH_FORCE_ALIGN_CHECK 1 +# endif +#endif + +/*! + * XXH_NO_INLINE_HINTS: + * + * By default, xxHash tries to force the compiler to inline almost all internal + * functions. + * + * This can usually improve performance due to reduced jumping and improved + * constant folding, but significantly increases the size of the binary which + * might not be favorable. + * + * Additionally, sometimes the forced inlining can be detrimental to performance, + * depending on the architecture. + * + * XXH_NO_INLINE_HINTS marks all internal functions as static, giving the + * compiler full control on whether to inline or not. + * + * When not optimizing (-O0), optimizing for size (-Os, -Oz), or using + * -fno-inline with GCC or Clang, this will automatically be defined. + */ +#ifndef XXH_NO_INLINE_HINTS +# if defined(__OPTIMIZE_SIZE__) /* -Os, -Oz */ \ + || defined(__NO_INLINE__) /* -O0, -fno-inline */ +# define XXH_NO_INLINE_HINTS 1 +# else +# define XXH_NO_INLINE_HINTS 0 +# endif +#endif + +/*! + * XXH_REROLL: + * Whether to reroll XXH32_finalize, and XXH64_finalize, + * instead of using an unrolled jump table/if statement loop. + * + * This is automatically defined on -Os/-Oz on GCC and Clang. + */ +#ifndef XXH_REROLL +# if defined(__OPTIMIZE_SIZE__) +# define XXH_REROLL 1 +# else +# define XXH_REROLL 0 +# endif +#endif + + +/* ************************************* +* Includes & Memory related functions +***************************************/ +/*! + * Modify the local functions below should you wish to use + * different memory routines for malloc() and free() + */ +#include + +static void* XXH_malloc(size_t s) { return malloc(s); } +static void XXH_free(void* p) { free(p); } + +/*! and for memcpy() */ +#include +static void* XXH_memcpy(void* dest, const void* src, size_t size) +{ + return memcpy(dest,src,size); +} + +#include /* ULLONG_MAX */ + + +/* ************************************* +* Compiler Specific Options +***************************************/ +#ifdef _MSC_VER /* Visual Studio warning fix */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +#endif + +#if XXH_NO_INLINE_HINTS /* disable inlining hints */ +# if defined(__GNUC__) +# define XXH_FORCE_INLINE static __attribute__((unused)) +# else +# define XXH_FORCE_INLINE static +# endif +# define XXH_NO_INLINE static +/* enable inlining hints */ +#elif defined(_MSC_VER) /* Visual Studio */ +# define XXH_FORCE_INLINE static __forceinline +# define XXH_NO_INLINE static __declspec(noinline) +#elif defined(__GNUC__) +# define XXH_FORCE_INLINE static __inline__ __attribute__((always_inline, unused)) +# define XXH_NO_INLINE static __attribute__((noinline)) +#elif defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) /* C99 */ +# define XXH_FORCE_INLINE static inline +# define XXH_NO_INLINE static +#else +# define XXH_FORCE_INLINE static +# define XXH_NO_INLINE static +#endif + + + +/* ************************************* +* Debug +***************************************/ +/* + * XXH_DEBUGLEVEL is expected to be defined externally, typically via the + * compiler's command line options. The value must be a number. + */ +#ifndef XXH_DEBUGLEVEL +# ifdef DEBUGLEVEL /* backwards compat */ +# define XXH_DEBUGLEVEL DEBUGLEVEL +# else +# define XXH_DEBUGLEVEL 0 +# endif +#endif + +#if (XXH_DEBUGLEVEL>=1) +# include /* note: can still be disabled with NDEBUG */ +# define XXH_ASSERT(c) assert(c) +#else +# define XXH_ASSERT(c) ((void)0) +#endif + +/* note: use after variable declarations */ +#define XXH_STATIC_ASSERT(c) do { enum { XXH_sa = 1/(int)(!!(c)) }; } while (0) + + +/* ************************************* +* Basic Types +***************************************/ +#if !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# include + typedef uint8_t xxh_u8; +#else + typedef unsigned char xxh_u8; +#endif +typedef XXH32_hash_t xxh_u32; + +#ifdef XXH_OLD_NAMES +# define BYTE xxh_u8 +# define U8 xxh_u8 +# define U32 xxh_u32 +#endif + +/* *** Memory access *** */ + +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) +/* + * Manual byteshift. Best for old compilers which don't inline memcpy. + * We actually directly use XXH_readLE32 and XXH_readBE32. + */ +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) + +/* + * Force direct memory access. Only works on CPU which support unaligned memory + * access in hardware. + */ +static xxh_u32 XXH_read32(const void* memPtr) { return *(const xxh_u32*) memPtr; } + +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) + +/* + * __pack instructions are safer but compiler specific, hence potentially + * problematic for some compilers. + * + * Currently only defined for GCC and ICC. + */ +#ifdef XXH_OLD_NAMES +typedef union { xxh_u32 u32; } __attribute__((packed)) unalign; +#endif +static xxh_u32 XXH_read32(const void* ptr) +{ + typedef union { xxh_u32 u32; } __attribute__((packed)) xxh_unalign; + return ((const xxh_unalign*)ptr)->u32; +} + +#else + +/* + * Portable and safe solution. Generally efficient. + * see: https://stackoverflow.com/a/32095106/646947 + */ +static xxh_u32 XXH_read32(const void* memPtr) +{ + xxh_u32 val; + memcpy(&val, memPtr, sizeof(val)); + return val; +} + +#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ + + +/* *** Endianess *** */ +typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; + +/*! + * XXH_CPU_LITTLE_ENDIAN: + * Defined to 1 if the target is little endian, or 0 if it is big endian. + * It can be defined externally, for example on the compiler command line. + * + * If it is not defined, a runtime check (which is usually constant folded) + * is used instead. + */ +#ifndef XXH_CPU_LITTLE_ENDIAN +/* + * Try to detect endianness automatically, to avoid the nonstandard behavior + * in `XXH_isLittleEndian()` + */ +# if defined(_WIN32) /* Windows is always little endian */ \ + || defined(__LITTLE_ENDIAN__) \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +# define XXH_CPU_LITTLE_ENDIAN 1 +# elif defined(__BIG_ENDIAN__) \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define XXH_CPU_LITTLE_ENDIAN 0 +# else +/* + * runtime test, presumed to simplify to a constant by compiler + */ +static int XXH_isLittleEndian(void) +{ + /* + * Portable and well-defined behavior. + * Don't use static: it is detrimental to performance. + */ + const union { xxh_u32 u; xxh_u8 c[4]; } one = { 1 }; + return one.c[0]; +} +# define XXH_CPU_LITTLE_ENDIAN XXH_isLittleEndian() +# endif +#endif + + + + +/* **************************************** +* Compiler-specific Functions and Macros +******************************************/ +#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#ifdef __has_builtin +# define XXH_HAS_BUILTIN(x) __has_builtin(x) +#else +# define XXH_HAS_BUILTIN(x) 0 +#endif + +#if !defined(NO_CLANG_BUILTIN) && XXH_HAS_BUILTIN(__builtin_rotateleft32) \ + && XXH_HAS_BUILTIN(__builtin_rotateleft64) +# define XXH_rotl32 __builtin_rotateleft32 +# define XXH_rotl64 __builtin_rotateleft64 +/* Note: although _rotl exists for minGW (GCC under windows), performance seems poor */ +#elif defined(_MSC_VER) +# define XXH_rotl32(x,r) _rotl(x,r) +# define XXH_rotl64(x,r) _rotl64(x,r) +#else +# define XXH_rotl32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) +# define XXH_rotl64(x,r) (((x) << (r)) | ((x) >> (64 - (r)))) +#endif + +#if defined(_MSC_VER) /* Visual Studio */ +# define XXH_swap32 _byteswap_ulong +#elif XXH_GCC_VERSION >= 403 +# define XXH_swap32 __builtin_bswap32 +#else +static xxh_u32 XXH_swap32 (xxh_u32 x) +{ + return ((x << 24) & 0xff000000 ) | + ((x << 8) & 0x00ff0000 ) | + ((x >> 8) & 0x0000ff00 ) | + ((x >> 24) & 0x000000ff ); +} +#endif + + +/* *************************** +* Memory reads +*****************************/ +typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment; + +/* + * XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. + * + * This is ideal for older compilers which don't inline memcpy. + */ +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) + +XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[0] + | ((xxh_u32)bytePtr[1] << 8) + | ((xxh_u32)bytePtr[2] << 16) + | ((xxh_u32)bytePtr[3] << 24); +} + +XXH_FORCE_INLINE xxh_u32 XXH_readBE32(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[3] + | ((xxh_u32)bytePtr[2] << 8) + | ((xxh_u32)bytePtr[1] << 16) + | ((xxh_u32)bytePtr[0] << 24); +} + +#else +XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr)); +} + +static xxh_u32 XXH_readBE32(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr); +} +#endif + +XXH_FORCE_INLINE xxh_u32 +XXH_readLE32_align(const void* ptr, XXH_alignment align) +{ + if (align==XXH_unaligned) { + return XXH_readLE32(ptr); + } else { + return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u32*)ptr : XXH_swap32(*(const xxh_u32*)ptr); + } +} + + +/* ************************************* +* Misc +***************************************/ +XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; } + + +/* ******************************************************************* +* 32-bit hash functions +*********************************************************************/ +static const xxh_u32 XXH_PRIME32_1 = 0x9E3779B1U; /* 0b10011110001101110111100110110001 */ +static const xxh_u32 XXH_PRIME32_2 = 0x85EBCA77U; /* 0b10000101111010111100101001110111 */ +static const xxh_u32 XXH_PRIME32_3 = 0xC2B2AE3DU; /* 0b11000010101100101010111000111101 */ +static const xxh_u32 XXH_PRIME32_4 = 0x27D4EB2FU; /* 0b00100111110101001110101100101111 */ +static const xxh_u32 XXH_PRIME32_5 = 0x165667B1U; /* 0b00010110010101100110011110110001 */ + +#ifdef XXH_OLD_NAMES +# define PRIME32_1 XXH_PRIME32_1 +# define PRIME32_2 XXH_PRIME32_2 +# define PRIME32_3 XXH_PRIME32_3 +# define PRIME32_4 XXH_PRIME32_4 +# define PRIME32_5 XXH_PRIME32_5 +#endif + +static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input) +{ + acc += input * XXH_PRIME32_2; + acc = XXH_rotl32(acc, 13); + acc *= XXH_PRIME32_1; +#if defined(__GNUC__) && defined(__SSE4_1__) && !defined(XXH_ENABLE_AUTOVECTORIZE) + /* + * UGLY HACK: + * This inline assembly hack forces acc into a normal register. This is the + * only thing that prevents GCC and Clang from autovectorizing the XXH32 + * loop (pragmas and attributes don't work for some resason) without globally + * disabling SSE4.1. + * + * The reason we want to avoid vectorization is because despite working on + * 4 integers at a time, there are multiple factors slowing XXH32 down on + * SSE4: + * - There's a ridiculous amount of lag from pmulld (10 cycles of latency on + * newer chips!) making it slightly slower to multiply four integers at + * once compared to four integers independently. Even when pmulld was + * fastest, Sandy/Ivy Bridge, it is still not worth it to go into SSE + * just to multiply unless doing a long operation. + * + * - Four instructions are required to rotate, + * movqda tmp, v // not required with VEX encoding + * pslld tmp, 13 // tmp <<= 13 + * psrld v, 19 // x >>= 19 + * por v, tmp // x |= tmp + * compared to one for scalar: + * roll v, 13 // reliably fast across the board + * shldl v, v, 13 // Sandy Bridge and later prefer this for some reason + * + * - Instruction level parallelism is actually more beneficial here because + * the SIMD actually serializes this operation: While v1 is rotating, v2 + * can load data, while v3 can multiply. SSE forces them to operate + * together. + * + * How this hack works: + * __asm__("" // Declare an assembly block but don't declare any instructions + * : // However, as an Input/Output Operand, + * "+r" // constrain a read/write operand (+) as a general purpose register (r). + * (acc) // and set acc as the operand + * ); + * + * Because of the 'r', the compiler has promised that seed will be in a + * general purpose register and the '+' says that it will be 'read/write', + * so it has to assume it has changed. It is like volatile without all the + * loads and stores. + * + * Since the argument has to be in a normal register (not an SSE register), + * each time XXH32_round is called, it is impossible to vectorize. + */ + __asm__("" : "+r" (acc)); +#endif + return acc; +} + +/* mix all bits */ +static xxh_u32 XXH32_avalanche(xxh_u32 h32) +{ + h32 ^= h32 >> 15; + h32 *= XXH_PRIME32_2; + h32 ^= h32 >> 13; + h32 *= XXH_PRIME32_3; + h32 ^= h32 >> 16; + return(h32); +} + +#define XXH_get32bits(p) XXH_readLE32_align(p, align) + +static xxh_u32 +XXH32_finalize(xxh_u32 h32, const xxh_u8* ptr, size_t len, XXH_alignment align) +{ +#define XXH_PROCESS1 do { \ + h32 += (*ptr++) * XXH_PRIME32_5; \ + h32 = XXH_rotl32(h32, 11) * XXH_PRIME32_1; \ +} while (0) + +#define XXH_PROCESS4 do { \ + h32 += XXH_get32bits(ptr) * XXH_PRIME32_3; \ + ptr += 4; \ + h32 = XXH_rotl32(h32, 17) * XXH_PRIME32_4; \ +} while (0) + + /* Compact rerolled version */ + if (XXH_REROLL) { + len &= 15; + while (len >= 4) { + XXH_PROCESS4; + len -= 4; + } + while (len > 0) { + XXH_PROCESS1; + --len; + } + return XXH32_avalanche(h32); + } else { + switch(len&15) /* or switch(bEnd - p) */ { + case 12: XXH_PROCESS4; + /* fallthrough */ + case 8: XXH_PROCESS4; + /* fallthrough */ + case 4: XXH_PROCESS4; + return XXH32_avalanche(h32); + + case 13: XXH_PROCESS4; + /* fallthrough */ + case 9: XXH_PROCESS4; + /* fallthrough */ + case 5: XXH_PROCESS4; + XXH_PROCESS1; + return XXH32_avalanche(h32); + + case 14: XXH_PROCESS4; + /* fallthrough */ + case 10: XXH_PROCESS4; + /* fallthrough */ + case 6: XXH_PROCESS4; + XXH_PROCESS1; + XXH_PROCESS1; + return XXH32_avalanche(h32); + + case 15: XXH_PROCESS4; + /* fallthrough */ + case 11: XXH_PROCESS4; + /* fallthrough */ + case 7: XXH_PROCESS4; + /* fallthrough */ + case 3: XXH_PROCESS1; + /* fallthrough */ + case 2: XXH_PROCESS1; + /* fallthrough */ + case 1: XXH_PROCESS1; + /* fallthrough */ + case 0: return XXH32_avalanche(h32); + } + XXH_ASSERT(0); + return h32; /* reaching this point is deemed impossible */ + } +} + +#ifdef XXH_OLD_NAMES +# define PROCESS1 XXH_PROCESS1 +# define PROCESS4 XXH_PROCESS4 +#else +# undef XXH_PROCESS1 +# undef XXH_PROCESS4 +#endif + +XXH_FORCE_INLINE xxh_u32 +XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align) +{ + const xxh_u8* bEnd = input + len; + xxh_u32 h32; + +#if defined(XXH_ACCEPT_NULL_INPUT_POINTER) && (XXH_ACCEPT_NULL_INPUT_POINTER>=1) + if (input==NULL) { + len=0; + bEnd=input=(const xxh_u8*)(size_t)16; + } +#endif + + if (len>=16) { + const xxh_u8* const limit = bEnd - 15; + xxh_u32 v1 = seed + XXH_PRIME32_1 + XXH_PRIME32_2; + xxh_u32 v2 = seed + XXH_PRIME32_2; + xxh_u32 v3 = seed + 0; + xxh_u32 v4 = seed - XXH_PRIME32_1; + + do { + v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4; + v2 = XXH32_round(v2, XXH_get32bits(input)); input += 4; + v3 = XXH32_round(v3, XXH_get32bits(input)); input += 4; + v4 = XXH32_round(v4, XXH_get32bits(input)); input += 4; + } while (input < limit); + + h32 = XXH_rotl32(v1, 1) + XXH_rotl32(v2, 7) + + XXH_rotl32(v3, 12) + XXH_rotl32(v4, 18); + } else { + h32 = seed + XXH_PRIME32_5; + } + + h32 += (xxh_u32)len; + + return XXH32_finalize(h32, input, len&15, align); +} + + +XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_hash_t seed) +{ +#if 0 + /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ + XXH32_state_t state; + XXH32_reset(&state, seed); + XXH32_update(&state, (const xxh_u8*)input, len); + return XXH32_digest(&state); + +#else + + if (XXH_FORCE_ALIGN_CHECK) { + if ((((size_t)input) & 3) == 0) { /* Input is 4-bytes aligned, leverage the speed benefit */ + return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_aligned); + } } + + return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned); +#endif +} + + + +/******* Hash streaming *******/ + +XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void) +{ + return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t)); +} +XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr) +{ + XXH_free(statePtr); + return XXH_OK; +} + +XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t* srcState) +{ + memcpy(dstState, srcState, sizeof(*dstState)); +} + +XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_hash_t seed) +{ + XXH32_state_t state; /* using a local state to memcpy() in order to avoid strict-aliasing warnings */ + memset(&state, 0, sizeof(state)); + state.v1 = seed + XXH_PRIME32_1 + XXH_PRIME32_2; + state.v2 = seed + XXH_PRIME32_2; + state.v3 = seed + 0; + state.v4 = seed - XXH_PRIME32_1; + /* do not write into reserved, planned to be removed in a future version */ + memcpy(statePtr, &state, sizeof(state) - sizeof(state.reserved)); + return XXH_OK; +} + + +XXH_PUBLIC_API XXH_errorcode +XXH32_update(XXH32_state_t* state, const void* input, size_t len) +{ + if (input==NULL) +#if defined(XXH_ACCEPT_NULL_INPUT_POINTER) && (XXH_ACCEPT_NULL_INPUT_POINTER>=1) + return XXH_OK; +#else + return XXH_ERROR; +#endif + + { const xxh_u8* p = (const xxh_u8*)input; + const xxh_u8* const bEnd = p + len; + + state->total_len_32 += (XXH32_hash_t)len; + state->large_len |= (XXH32_hash_t)((len>=16) | (state->total_len_32>=16)); + + if (state->memsize + len < 16) { /* fill in tmp buffer */ + XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, len); + state->memsize += (XXH32_hash_t)len; + return XXH_OK; + } + + if (state->memsize) { /* some data left from previous update */ + XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, 16-state->memsize); + { const xxh_u32* p32 = state->mem32; + state->v1 = XXH32_round(state->v1, XXH_readLE32(p32)); p32++; + state->v2 = XXH32_round(state->v2, XXH_readLE32(p32)); p32++; + state->v3 = XXH32_round(state->v3, XXH_readLE32(p32)); p32++; + state->v4 = XXH32_round(state->v4, XXH_readLE32(p32)); + } + p += 16-state->memsize; + state->memsize = 0; + } + + if (p <= bEnd-16) { + const xxh_u8* const limit = bEnd - 16; + xxh_u32 v1 = state->v1; + xxh_u32 v2 = state->v2; + xxh_u32 v3 = state->v3; + xxh_u32 v4 = state->v4; + + do { + v1 = XXH32_round(v1, XXH_readLE32(p)); p+=4; + v2 = XXH32_round(v2, XXH_readLE32(p)); p+=4; + v3 = XXH32_round(v3, XXH_readLE32(p)); p+=4; + v4 = XXH32_round(v4, XXH_readLE32(p)); p+=4; + } while (p<=limit); + + state->v1 = v1; + state->v2 = v2; + state->v3 = v3; + state->v4 = v4; + } + + if (p < bEnd) { + XXH_memcpy(state->mem32, p, (size_t)(bEnd-p)); + state->memsize = (unsigned)(bEnd-p); + } + } + + return XXH_OK; +} + + +XXH_PUBLIC_API XXH32_hash_t XXH32_digest (const XXH32_state_t* state) +{ + xxh_u32 h32; + + if (state->large_len) { + h32 = XXH_rotl32(state->v1, 1) + + XXH_rotl32(state->v2, 7) + + XXH_rotl32(state->v3, 12) + + XXH_rotl32(state->v4, 18); + } else { + h32 = state->v3 /* == seed */ + XXH_PRIME32_5; + } + + h32 += state->total_len_32; + + return XXH32_finalize(h32, (const xxh_u8*)state->mem32, state->memsize, XXH_aligned); +} + + +/******* Canonical representation *******/ + +/* + * The default return values from XXH functions are unsigned 32 and 64 bit + * integers. + * + * The canonical representation uses big endian convention, the same convention + * as human-readable numbers (large digits first). + * + * This way, hash values can be written into a file or buffer, remaining + * comparable across different systems. + * + * The following functions allow transformation of hash values to and from their + * canonical format. + */ +XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH32_canonical_t) == sizeof(XXH32_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash); + memcpy(dst, &hash, sizeof(*dst)); +} + +XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src) +{ + return XXH_readBE32(src); +} + + +#ifndef XXH_NO_LONG_LONG + +/* ******************************************************************* +* 64-bit hash functions +*********************************************************************/ + +/******* Memory access *******/ + +typedef XXH64_hash_t xxh_u64; + +#ifdef XXH_OLD_NAMES +# define U64 xxh_u64 +#endif + +/*! + * XXH_REROLL_XXH64: + * Whether to reroll the XXH64_finalize() loop. + * + * Just like XXH32, we can unroll the XXH64_finalize() loop. This can be a + * performance gain on 64-bit hosts, as only one jump is required. + * + * However, on 32-bit hosts, because arithmetic needs to be done with two 32-bit + * registers, and 64-bit arithmetic needs to be simulated, it isn't beneficial + * to unroll. The code becomes ridiculously large (the largest function in the + * binary on i386!), and rerolling it saves anywhere from 3kB to 20kB. It is + * also slightly faster because it fits into cache better and is more likely + * to be inlined by the compiler. + * + * If XXH_REROLL is defined, this is ignored and the loop is always rerolled. + */ +#ifndef XXH_REROLL_XXH64 +# if (defined(__ILP32__) || defined(_ILP32)) /* ILP32 is often defined on 32-bit GCC family */ \ + || !(defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) /* x86-64 */ \ + || defined(_M_ARM64) || defined(__aarch64__) || defined(__arm64__) /* aarch64 */ \ + || defined(__PPC64__) || defined(__PPC64LE__) || defined(__ppc64__) || defined(__powerpc64__) /* ppc64 */ \ + || defined(__mips64__) || defined(__mips64)) /* mips64 */ \ + || (!defined(SIZE_MAX) || SIZE_MAX < ULLONG_MAX) /* check limits */ +# define XXH_REROLL_XXH64 1 +# else +# define XXH_REROLL_XXH64 0 +# endif +#endif /* !defined(XXH_REROLL_XXH64) */ + +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) +/* + * Manual byteshift. Best for old compilers which don't inline memcpy. + * We actually directly use XXH_readLE64 and XXH_readBE64. + */ +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) + +/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ +static xxh_u64 XXH_read64(const void* memPtr) { return *(const xxh_u64*) memPtr; } + +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) + +/* + * __pack instructions are safer, but compiler specific, hence potentially + * problematic for some compilers. + * + * Currently only defined for GCC and ICC. + */ +#ifdef XXH_OLD_NAMES +typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((packed)) unalign64; +#endif +static xxh_u64 XXH_read64(const void* ptr) +{ + typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((packed)) xxh_unalign64; + return ((const xxh_unalign64*)ptr)->u64; +} + +#else + +/* + * Portable and safe solution. Generally efficient. + * see: https://stackoverflow.com/a/32095106/646947 + */ +static xxh_u64 XXH_read64(const void* memPtr) +{ + xxh_u64 val; + memcpy(&val, memPtr, sizeof(val)); + return val; +} + +#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ + +#if defined(_MSC_VER) /* Visual Studio */ +# define XXH_swap64 _byteswap_uint64 +#elif XXH_GCC_VERSION >= 403 +# define XXH_swap64 __builtin_bswap64 +#else +static xxh_u64 XXH_swap64 (xxh_u64 x) +{ + return ((x << 56) & 0xff00000000000000ULL) | + ((x << 40) & 0x00ff000000000000ULL) | + ((x << 24) & 0x0000ff0000000000ULL) | + ((x << 8) & 0x000000ff00000000ULL) | + ((x >> 8) & 0x00000000ff000000ULL) | + ((x >> 24) & 0x0000000000ff0000ULL) | + ((x >> 40) & 0x000000000000ff00ULL) | + ((x >> 56) & 0x00000000000000ffULL); +} +#endif + + +/* XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. */ +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) + +XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[0] + | ((xxh_u64)bytePtr[1] << 8) + | ((xxh_u64)bytePtr[2] << 16) + | ((xxh_u64)bytePtr[3] << 24) + | ((xxh_u64)bytePtr[4] << 32) + | ((xxh_u64)bytePtr[5] << 40) + | ((xxh_u64)bytePtr[6] << 48) + | ((xxh_u64)bytePtr[7] << 56); +} + +XXH_FORCE_INLINE xxh_u64 XXH_readBE64(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[7] + | ((xxh_u64)bytePtr[6] << 8) + | ((xxh_u64)bytePtr[5] << 16) + | ((xxh_u64)bytePtr[4] << 24) + | ((xxh_u64)bytePtr[3] << 32) + | ((xxh_u64)bytePtr[2] << 40) + | ((xxh_u64)bytePtr[1] << 48) + | ((xxh_u64)bytePtr[0] << 56); +} + +#else +XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr)); +} + +static xxh_u64 XXH_readBE64(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_swap64(XXH_read64(ptr)) : XXH_read64(ptr); +} +#endif + +XXH_FORCE_INLINE xxh_u64 +XXH_readLE64_align(const void* ptr, XXH_alignment align) +{ + if (align==XXH_unaligned) + return XXH_readLE64(ptr); + else + return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u64*)ptr : XXH_swap64(*(const xxh_u64*)ptr); +} + + +/******* xxh64 *******/ + +static const xxh_u64 XXH_PRIME64_1 = 0x9E3779B185EBCA87ULL; /* 0b1001111000110111011110011011000110000101111010111100101010000111 */ +static const xxh_u64 XXH_PRIME64_2 = 0xC2B2AE3D27D4EB4FULL; /* 0b1100001010110010101011100011110100100111110101001110101101001111 */ +static const xxh_u64 XXH_PRIME64_3 = 0x165667B19E3779F9ULL; /* 0b0001011001010110011001111011000110011110001101110111100111111001 */ +static const xxh_u64 XXH_PRIME64_4 = 0x85EBCA77C2B2AE63ULL; /* 0b1000010111101011110010100111011111000010101100101010111001100011 */ +static const xxh_u64 XXH_PRIME64_5 = 0x27D4EB2F165667C5ULL; /* 0b0010011111010100111010110010111100010110010101100110011111000101 */ + +#ifdef XXH_OLD_NAMES +# define PRIME64_1 XXH_PRIME64_1 +# define PRIME64_2 XXH_PRIME64_2 +# define PRIME64_3 XXH_PRIME64_3 +# define PRIME64_4 XXH_PRIME64_4 +# define PRIME64_5 XXH_PRIME64_5 +#endif + +static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input) +{ + acc += input * XXH_PRIME64_2; + acc = XXH_rotl64(acc, 31); + acc *= XXH_PRIME64_1; + return acc; +} + +static xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val) +{ + val = XXH64_round(0, val); + acc ^= val; + acc = acc * XXH_PRIME64_1 + XXH_PRIME64_4; + return acc; +} + +static xxh_u64 XXH64_avalanche(xxh_u64 h64) +{ + h64 ^= h64 >> 33; + h64 *= XXH_PRIME64_2; + h64 ^= h64 >> 29; + h64 *= XXH_PRIME64_3; + h64 ^= h64 >> 32; + return h64; +} + + +#define XXH_get64bits(p) XXH_readLE64_align(p, align) + +static xxh_u64 +XXH64_finalize(xxh_u64 h64, const xxh_u8* ptr, size_t len, XXH_alignment align) +{ +#define XXH_PROCESS1_64 do { \ + h64 ^= (*ptr++) * XXH_PRIME64_5; \ + h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1; \ +} while (0) + +#define XXH_PROCESS4_64 do { \ + h64 ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1; \ + ptr += 4; \ + h64 = XXH_rotl64(h64, 23) * XXH_PRIME64_2 + XXH_PRIME64_3; \ +} while (0) + +#define XXH_PROCESS8_64 do { \ + xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \ + ptr += 8; \ + h64 ^= k1; \ + h64 = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4; \ +} while (0) + + /* Rerolled version for 32-bit targets is faster and much smaller. */ + if (XXH_REROLL || XXH_REROLL_XXH64) { + len &= 31; + while (len >= 8) { + XXH_PROCESS8_64; + len -= 8; + } + if (len >= 4) { + XXH_PROCESS4_64; + len -= 4; + } + while (len > 0) { + XXH_PROCESS1_64; + --len; + } + return XXH64_avalanche(h64); + } else { + switch(len & 31) { + case 24: XXH_PROCESS8_64; + /* fallthrough */ + case 16: XXH_PROCESS8_64; + /* fallthrough */ + case 8: XXH_PROCESS8_64; + return XXH64_avalanche(h64); + + case 28: XXH_PROCESS8_64; + /* fallthrough */ + case 20: XXH_PROCESS8_64; + /* fallthrough */ + case 12: XXH_PROCESS8_64; + /* fallthrough */ + case 4: XXH_PROCESS4_64; + return XXH64_avalanche(h64); + + case 25: XXH_PROCESS8_64; + /* fallthrough */ + case 17: XXH_PROCESS8_64; + /* fallthrough */ + case 9: XXH_PROCESS8_64; + XXH_PROCESS1_64; + return XXH64_avalanche(h64); + + case 29: XXH_PROCESS8_64; + /* fallthrough */ + case 21: XXH_PROCESS8_64; + /* fallthrough */ + case 13: XXH_PROCESS8_64; + /* fallthrough */ + case 5: XXH_PROCESS4_64; + XXH_PROCESS1_64; + return XXH64_avalanche(h64); + + case 26: XXH_PROCESS8_64; + /* fallthrough */ + case 18: XXH_PROCESS8_64; + /* fallthrough */ + case 10: XXH_PROCESS8_64; + XXH_PROCESS1_64; + XXH_PROCESS1_64; + return XXH64_avalanche(h64); + + case 30: XXH_PROCESS8_64; + /* fallthrough */ + case 22: XXH_PROCESS8_64; + /* fallthrough */ + case 14: XXH_PROCESS8_64; + /* fallthrough */ + case 6: XXH_PROCESS4_64; + XXH_PROCESS1_64; + XXH_PROCESS1_64; + return XXH64_avalanche(h64); + + case 27: XXH_PROCESS8_64; + /* fallthrough */ + case 19: XXH_PROCESS8_64; + /* fallthrough */ + case 11: XXH_PROCESS8_64; + XXH_PROCESS1_64; + XXH_PROCESS1_64; + XXH_PROCESS1_64; + return XXH64_avalanche(h64); + + case 31: XXH_PROCESS8_64; + /* fallthrough */ + case 23: XXH_PROCESS8_64; + /* fallthrough */ + case 15: XXH_PROCESS8_64; + /* fallthrough */ + case 7: XXH_PROCESS4_64; + /* fallthrough */ + case 3: XXH_PROCESS1_64; + /* fallthrough */ + case 2: XXH_PROCESS1_64; + /* fallthrough */ + case 1: XXH_PROCESS1_64; + /* fallthrough */ + case 0: return XXH64_avalanche(h64); + } + } + /* impossible to reach */ + XXH_ASSERT(0); + return 0; /* unreachable, but some compilers complain without it */ +} + +#ifdef XXH_OLD_NAMES +# define PROCESS1_64 XXH_PROCESS1_64 +# define PROCESS4_64 XXH_PROCESS4_64 +# define PROCESS8_64 XXH_PROCESS8_64 +#else +# undef XXH_PROCESS1_64 +# undef XXH_PROCESS4_64 +# undef XXH_PROCESS8_64 +#endif + +XXH_FORCE_INLINE xxh_u64 +XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align) +{ + const xxh_u8* bEnd = input + len; + xxh_u64 h64; + +#if defined(XXH_ACCEPT_NULL_INPUT_POINTER) && (XXH_ACCEPT_NULL_INPUT_POINTER>=1) + if (input==NULL) { + len=0; + bEnd=input=(const xxh_u8*)(size_t)32; + } +#endif + + if (len>=32) { + const xxh_u8* const limit = bEnd - 32; + xxh_u64 v1 = seed + XXH_PRIME64_1 + XXH_PRIME64_2; + xxh_u64 v2 = seed + XXH_PRIME64_2; + xxh_u64 v3 = seed + 0; + xxh_u64 v4 = seed - XXH_PRIME64_1; + + do { + v1 = XXH64_round(v1, XXH_get64bits(input)); input+=8; + v2 = XXH64_round(v2, XXH_get64bits(input)); input+=8; + v3 = XXH64_round(v3, XXH_get64bits(input)); input+=8; + v4 = XXH64_round(v4, XXH_get64bits(input)); input+=8; + } while (input<=limit); + + h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18); + h64 = XXH64_mergeRound(h64, v1); + h64 = XXH64_mergeRound(h64, v2); + h64 = XXH64_mergeRound(h64, v3); + h64 = XXH64_mergeRound(h64, v4); + + } else { + h64 = seed + XXH_PRIME64_5; + } + + h64 += (xxh_u64) len; + + return XXH64_finalize(h64, input, len, align); +} + + +XXH_PUBLIC_API XXH64_hash_t XXH64 (const void* input, size_t len, XXH64_hash_t seed) +{ +#if 0 + /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ + XXH64_state_t state; + XXH64_reset(&state, seed); + XXH64_update(&state, (const xxh_u8*)input, len); + return XXH64_digest(&state); + +#else + + if (XXH_FORCE_ALIGN_CHECK) { + if ((((size_t)input) & 7)==0) { /* Input is aligned, let's leverage the speed advantage */ + return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_aligned); + } } + + return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned); + +#endif +} + +/******* Hash Streaming *******/ + +XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void) +{ + return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t)); +} +XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr) +{ + XXH_free(statePtr); + return XXH_OK; +} + +XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t* dstState, const XXH64_state_t* srcState) +{ + memcpy(dstState, srcState, sizeof(*dstState)); +} + +XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH64_state_t* statePtr, XXH64_hash_t seed) +{ + XXH64_state_t state; /* use a local state to memcpy() in order to avoid strict-aliasing warnings */ + memset(&state, 0, sizeof(state)); + state.v1 = seed + XXH_PRIME64_1 + XXH_PRIME64_2; + state.v2 = seed + XXH_PRIME64_2; + state.v3 = seed + 0; + state.v4 = seed - XXH_PRIME64_1; + /* do not write into reserved64, might be removed in a future version */ + memcpy(statePtr, &state, sizeof(state) - sizeof(state.reserved64)); + return XXH_OK; +} + +XXH_PUBLIC_API XXH_errorcode +XXH64_update (XXH64_state_t* state, const void* input, size_t len) +{ + if (input==NULL) +#if defined(XXH_ACCEPT_NULL_INPUT_POINTER) && (XXH_ACCEPT_NULL_INPUT_POINTER>=1) + return XXH_OK; +#else + return XXH_ERROR; +#endif + + { const xxh_u8* p = (const xxh_u8*)input; + const xxh_u8* const bEnd = p + len; + + state->total_len += len; + + if (state->memsize + len < 32) { /* fill in tmp buffer */ + XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, len); + state->memsize += (xxh_u32)len; + return XXH_OK; + } + + if (state->memsize) { /* tmp buffer is full */ + XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, 32-state->memsize); + state->v1 = XXH64_round(state->v1, XXH_readLE64(state->mem64+0)); + state->v2 = XXH64_round(state->v2, XXH_readLE64(state->mem64+1)); + state->v3 = XXH64_round(state->v3, XXH_readLE64(state->mem64+2)); + state->v4 = XXH64_round(state->v4, XXH_readLE64(state->mem64+3)); + p += 32-state->memsize; + state->memsize = 0; + } + + if (p+32 <= bEnd) { + const xxh_u8* const limit = bEnd - 32; + xxh_u64 v1 = state->v1; + xxh_u64 v2 = state->v2; + xxh_u64 v3 = state->v3; + xxh_u64 v4 = state->v4; + + do { + v1 = XXH64_round(v1, XXH_readLE64(p)); p+=8; + v2 = XXH64_round(v2, XXH_readLE64(p)); p+=8; + v3 = XXH64_round(v3, XXH_readLE64(p)); p+=8; + v4 = XXH64_round(v4, XXH_readLE64(p)); p+=8; + } while (p<=limit); + + state->v1 = v1; + state->v2 = v2; + state->v3 = v3; + state->v4 = v4; + } + + if (p < bEnd) { + XXH_memcpy(state->mem64, p, (size_t)(bEnd-p)); + state->memsize = (unsigned)(bEnd-p); + } + } + + return XXH_OK; +} + + +XXH_PUBLIC_API XXH64_hash_t XXH64_digest (const XXH64_state_t* state) +{ + xxh_u64 h64; + + if (state->total_len >= 32) { + xxh_u64 const v1 = state->v1; + xxh_u64 const v2 = state->v2; + xxh_u64 const v3 = state->v3; + xxh_u64 const v4 = state->v4; + + h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18); + h64 = XXH64_mergeRound(h64, v1); + h64 = XXH64_mergeRound(h64, v2); + h64 = XXH64_mergeRound(h64, v3); + h64 = XXH64_mergeRound(h64, v4); + } else { + h64 = state->v3 /*seed*/ + XXH_PRIME64_5; + } + + h64 += (xxh_u64) state->total_len; + + return XXH64_finalize(h64, (const xxh_u8*)state->mem64, (size_t)state->total_len, XXH_aligned); +} + + +/******* Canonical representation *******/ + +XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH64_canonical_t) == sizeof(XXH64_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash); + memcpy(dst, &hash, sizeof(*dst)); +} + +XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src) +{ + return XXH_readBE64(src); +} + + + +/* ********************************************************************* +* XXH3 +* New generation hash designed for speed on small keys and vectorization +************************************************************************ */ + +/* === Compiler specifics === */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */ +# define XXH_RESTRICT restrict +#else +/* Note: it might be useful to define __restrict or __restrict__ for some C++ compilers */ +# define XXH_RESTRICT /* disable */ +#endif + +#if (defined(__GNUC__) && (__GNUC__ >= 3)) \ + || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) \ + || defined(__clang__) +# define XXH_likely(x) __builtin_expect(x, 1) +# define XXH_unlikely(x) __builtin_expect(x, 0) +#else +# define XXH_likely(x) (x) +# define XXH_unlikely(x) (x) +#endif + +#if defined(__GNUC__) +# if defined(__AVX2__) +# include +# elif defined(__SSE2__) +# include +# elif defined(__ARM_NEON__) || defined(__ARM_NEON) +# define inline __inline__ /* circumvent a clang bug */ +# include +# undef inline +# endif +#elif defined(_MSC_VER) +# include +#endif + +/* + * One goal of XXH3 is to make it fast on both 32-bit and 64-bit, while + * remaining a true 64-bit/128-bit hash function. + * + * This is done by prioritizing a subset of 64-bit operations that can be + * emulated without too many steps on the average 32-bit machine. + * + * For example, these two lines seem similar, and run equally fast on 64-bit: + * + * xxh_u64 x; + * x ^= (x >> 47); // good + * x ^= (x >> 13); // bad + * + * However, to a 32-bit machine, there is a major difference. + * + * x ^= (x >> 47) looks like this: + * + * x.lo ^= (x.hi >> (47 - 32)); + * + * while x ^= (x >> 13) looks like this: + * + * // note: funnel shifts are not usually cheap. + * x.lo ^= (x.lo >> 13) | (x.hi << (32 - 13)); + * x.hi ^= (x.hi >> 13); + * + * The first one is significantly faster than the second, simply because the + * shift is larger than 32. This means: + * - All the bits we need are in the upper 32 bits, so we can ignore the lower + * 32 bits in the shift. + * - The shift result will always fit in the lower 32 bits, and therefore, + * we can ignore the upper 32 bits in the xor. + * + * Thanks to this optimization, XXH3 only requires these features to be efficient: + * + * - Usable unaligned access + * - A 32-bit or 64-bit ALU + * - If 32-bit, a decent ADC instruction + * - A 32 or 64-bit multiply with a 64-bit result + * - For the 128-bit variant, a decent byteswap helps short inputs. + * + * The first two are already required by XXH32, and almost all 32-bit and 64-bit + * platforms which can run XXH32 can run XXH3 efficiently. + * + * Thumb-1, the classic 16-bit only subset of ARM's instruction set, is one + * notable exception. + * + * First of all, Thumb-1 lacks support for the UMULL instruction which + * performs the important long multiply. This means numerous __aeabi_lmul + * calls. + * + * Second of all, the 8 functional registers are just not enough. + * Setup for __aeabi_lmul, byteshift loads, pointers, and all arithmetic need + * Lo registers, and this shuffling results in thousands more MOVs than A32. + * + * A32 and T32 don't have this limitation. They can access all 14 registers, + * do a 32->64 multiply with UMULL, and the flexible operand allowing free + * shifts is helpful, too. + * + * Therefore, we do a quick sanity check. + * + * If compiling Thumb-1 for a target which supports ARM instructions, we will + * emit a warning, as it is not a "sane" platform to compile for. + * + * Usually, if this happens, it is because of an accident and you probably need + * to specify -march, as you likely meant to compile for a newer architecture. + * + * Credit: large sections of the vectorial and asm source code paths + * have been contributed by @easyaspi314 + */ +#if defined(__thumb__) && !defined(__thumb2__) && defined(__ARM_ARCH_ISA_ARM) +# warning "XXH3 is highly inefficient without ARM or Thumb-2." +#endif + +/* ========================================== + * Vectorization detection + * ========================================== */ +#define XXH_SCALAR 0 /* Portable scalar version */ +#define XXH_SSE2 1 /* SSE2 for Pentium 4 and all x86_64 */ +#define XXH_AVX2 2 /* AVX2 for Haswell and Bulldozer */ +#define XXH_AVX512 3 /* AVX512 for Skylake and Icelake */ +#define XXH_NEON 4 /* NEON for most ARMv7-A and all AArch64 */ +#define XXH_VSX 5 /* VSX and ZVector for POWER8/z13 */ + +#ifndef XXH_VECTOR /* can be defined on command line */ +# if defined(__AVX512F__) +# define XXH_VECTOR XXH_AVX512 +# elif defined(__AVX2__) +# define XXH_VECTOR XXH_AVX2 +# elif defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2)) +# define XXH_VECTOR XXH_SSE2 +# elif defined(__GNUC__) /* msvc support maybe later */ \ + && (defined(__ARM_NEON__) || defined(__ARM_NEON)) \ + && (defined(__LITTLE_ENDIAN__) /* We only support little endian NEON */ \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) +# define XXH_VECTOR XXH_NEON +# elif (defined(__PPC64__) && defined(__POWER8_VECTOR__)) \ + || (defined(__s390x__) && defined(__VEC__)) \ + && defined(__GNUC__) /* TODO: IBM XL */ +# define XXH_VECTOR XXH_VSX +# else +# define XXH_VECTOR XXH_SCALAR +# endif +#endif + +/* + * Controls the alignment of the accumulator, + * for compatibility with aligned vector loads, which are usually faster. + */ +#ifndef XXH_ACC_ALIGN +# if defined(XXH_X86DISPATCH) +# define XXH_ACC_ALIGN 64 /* for compatibility with avx512 */ +# elif XXH_VECTOR == XXH_SCALAR /* scalar */ +# define XXH_ACC_ALIGN 8 +# elif XXH_VECTOR == XXH_SSE2 /* sse2 */ +# define XXH_ACC_ALIGN 16 +# elif XXH_VECTOR == XXH_AVX2 /* avx2 */ +# define XXH_ACC_ALIGN 32 +# elif XXH_VECTOR == XXH_NEON /* neon */ +# define XXH_ACC_ALIGN 16 +# elif XXH_VECTOR == XXH_VSX /* vsx */ +# define XXH_ACC_ALIGN 16 +# elif XXH_VECTOR == XXH_AVX512 /* avx512 */ +# define XXH_ACC_ALIGN 64 +# endif +#endif + +#if defined(XXH_X86DISPATCH) || XXH_VECTOR == XXH_SSE2 \ + || XXH_VECTOR == XXH_AVX2 || XXH_VECTOR == XXH_AVX512 +# define XXH_SEC_ALIGN XXH_ACC_ALIGN +#else +# define XXH_SEC_ALIGN 8 +#endif + +/* + * UGLY HACK: + * GCC usually generates the best code with -O3 for xxHash. + * + * However, when targeting AVX2, it is overzealous in its unrolling resulting + * in code roughly 3/4 the speed of Clang. + * + * There are other issues, such as GCC splitting _mm256_loadu_si256 into + * _mm_loadu_si128 + _mm256_inserti128_si256. This is an optimization which + * only applies to Sandy and Ivy Bridge... which don't even support AVX2. + * + * That is why when compiling the AVX2 version, it is recommended to use either + * -O2 -mavx2 -march=haswell + * or + * -O2 -mavx2 -mno-avx256-split-unaligned-load + * for decent performance, or to use Clang instead. + * + * Fortunately, we can control the first one with a pragma that forces GCC into + * -O2, but the other one we can't control without "failed to inline always + * inline function due to target mismatch" warnings. + */ +#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \ + && defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \ + && defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__) /* respect -O0 and -Os */ +# pragma GCC push_options +# pragma GCC optimize("-O2") +#endif + + +#if XXH_VECTOR == XXH_NEON +/* + * NEON's setup for vmlal_u32 is a little more complicated than it is on + * SSE2, AVX2, and VSX. + * + * While PMULUDQ and VMULEUW both perform a mask, VMLAL.U32 performs an upcast. + * + * To do the same operation, the 128-bit 'Q' register needs to be split into + * two 64-bit 'D' registers, performing this operation:: + * + * [ a | b ] + * | '---------. .--------' | + * | x | + * | .---------' '--------. | + * [ a & 0xFFFFFFFF | b & 0xFFFFFFFF ],[ a >> 32 | b >> 32 ] + * + * Due to significant changes in aarch64, the fastest method for aarch64 is + * completely different than the fastest method for ARMv7-A. + * + * ARMv7-A treats D registers as unions overlaying Q registers, so modifying + * D11 will modify the high half of Q5. This is similar to how modifying AH + * will only affect bits 8-15 of AX on x86. + * + * VZIP takes two registers, and puts even lanes in one register and odd lanes + * in the other. + * + * On ARMv7-A, this strangely modifies both parameters in place instead of + * taking the usual 3-operand form. + * + * Therefore, if we want to do this, we can simply use a D-form VZIP.32 on the + * lower and upper halves of the Q register to end up with the high and low + * halves where we want - all in one instruction. + * + * vzip.32 d10, d11 @ d10 = { d10[0], d11[0] }; d11 = { d10[1], d11[1] } + * + * Unfortunately we need inline assembly for this: Instructions modifying two + * registers at once is not possible in GCC or Clang's IR, and they have to + * create a copy. + * + * aarch64 requires a different approach. + * + * In order to make it easier to write a decent compiler for aarch64, many + * quirks were removed, such as conditional execution. + * + * NEON was also affected by this. + * + * aarch64 cannot access the high bits of a Q-form register, and writes to a + * D-form register zero the high bits, similar to how writes to W-form scalar + * registers (or DWORD registers on x86_64) work. + * + * The formerly free vget_high intrinsics now require a vext (with a few + * exceptions) + * + * Additionally, VZIP was replaced by ZIP1 and ZIP2, which are the equivalent + * of PUNPCKL* and PUNPCKH* in SSE, respectively, in order to only modify one + * operand. + * + * The equivalent of the VZIP.32 on the lower and upper halves would be this + * mess: + * + * ext v2.4s, v0.4s, v0.4s, #2 // v2 = { v0[2], v0[3], v0[0], v0[1] } + * zip1 v1.2s, v0.2s, v2.2s // v1 = { v0[0], v2[0] } + * zip2 v0.2s, v0.2s, v1.2s // v0 = { v0[1], v2[1] } + * + * Instead, we use a literal downcast, vmovn_u64 (XTN), and vshrn_n_u64 (SHRN): + * + * shrn v1.2s, v0.2d, #32 // v1 = (uint32x2_t)(v0 >> 32); + * xtn v0.2s, v0.2d // v0 = (uint32x2_t)(v0 & 0xFFFFFFFF); + * + * This is available on ARMv7-A, but is less efficient than a single VZIP.32. + */ + +/* + * Function-like macro: + * void XXH_SPLIT_IN_PLACE(uint64x2_t &in, uint32x2_t &outLo, uint32x2_t &outHi) + * { + * outLo = (uint32x2_t)(in & 0xFFFFFFFF); + * outHi = (uint32x2_t)(in >> 32); + * in = UNDEFINED; + * } + */ +# if !defined(XXH_NO_VZIP_HACK) /* define to disable */ \ + && defined(__GNUC__) \ + && !defined(__aarch64__) && !defined(__arm64__) +# define XXH_SPLIT_IN_PLACE(in, outLo, outHi) \ + do { \ + /* Undocumented GCC/Clang operand modifier: %e0 = lower D half, %f0 = upper D half */ \ + /* https://github.com/gcc-mirror/gcc/blob/38cf91e5/gcc/config/arm/arm.c#L22486 */ \ + /* https://github.com/llvm-mirror/llvm/blob/2c4ca683/lib/Target/ARM/ARMAsmPrinter.cpp#L399 */ \ + __asm__("vzip.32 %e0, %f0" : "+w" (in)); \ + (outLo) = vget_low_u32 (vreinterpretq_u32_u64(in)); \ + (outHi) = vget_high_u32(vreinterpretq_u32_u64(in)); \ + } while (0) +# else +# define XXH_SPLIT_IN_PLACE(in, outLo, outHi) \ + do { \ + (outLo) = vmovn_u64 (in); \ + (outHi) = vshrn_n_u64 ((in), 32); \ + } while (0) +# endif +#endif /* XXH_VECTOR == XXH_NEON */ + +/* + * VSX and Z Vector helpers. + * + * This is very messy, and any pull requests to clean this up are welcome. + * + * There are a lot of problems with supporting VSX and s390x, due to + * inconsistent intrinsics, spotty coverage, and multiple endiannesses. + */ +#if XXH_VECTOR == XXH_VSX +# if defined(__s390x__) +# include +# else +/* gcc's altivec.h can have the unwanted consequence to unconditionally + * #define bool, vector, and pixel keywords, + * with bad consequences for programs already using these keywords for other purposes. + * The paragraph defining these macros is skipped when __APPLE_ALTIVEC__ is defined. + * __APPLE_ALTIVEC__ is _generally_ defined automatically by the compiler, + * but it seems that, in some cases, it isn't. + * Force the build macro to be defined, so that keywords are not altered. + */ +# if defined(__GNUC__) && !defined(__APPLE_ALTIVEC__) +# define __APPLE_ALTIVEC__ +# endif +# include +# endif + +typedef __vector unsigned long long xxh_u64x2; +typedef __vector unsigned char xxh_u8x16; +typedef __vector unsigned xxh_u32x4; + +# ifndef XXH_VSX_BE +# if defined(__BIG_ENDIAN__) \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define XXH_VSX_BE 1 +# elif defined(__VEC_ELEMENT_REG_ORDER__) && __VEC_ELEMENT_REG_ORDER__ == __ORDER_BIG_ENDIAN__ +# warning "-maltivec=be is not recommended. Please use native endianness." +# define XXH_VSX_BE 1 +# else +# define XXH_VSX_BE 0 +# endif +# endif /* !defined(XXH_VSX_BE) */ + +# if XXH_VSX_BE +/* A wrapper for POWER9's vec_revb. */ +# if defined(__POWER9_VECTOR__) || (defined(__clang__) && defined(__s390x__)) +# define XXH_vec_revb vec_revb +# else +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_revb(xxh_u64x2 val) +{ + xxh_u8x16 const vByteSwap = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, + 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08 }; + return vec_perm(val, val, vByteSwap); +} +# endif +# endif /* XXH_VSX_BE */ + +/* + * Performs an unaligned load and byte swaps it on big endian. + */ +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr) +{ + xxh_u64x2 ret; + memcpy(&ret, ptr, sizeof(xxh_u64x2)); +# if XXH_VSX_BE + ret = XXH_vec_revb(ret); +# endif + return ret; +} + +/* + * vec_mulo and vec_mule are very problematic intrinsics on PowerPC + * + * These intrinsics weren't added until GCC 8, despite existing for a while, + * and they are endian dependent. Also, their meaning swap depending on version. + * */ +# if defined(__s390x__) + /* s390x is always big endian, no issue on this platform */ +# define XXH_vec_mulo vec_mulo +# define XXH_vec_mule vec_mule +# elif defined(__clang__) && XXH_HAS_BUILTIN(__builtin_altivec_vmuleuw) +/* Clang has a better way to control this, we can just use the builtin which doesn't swap. */ +# define XXH_vec_mulo __builtin_altivec_vmulouw +# define XXH_vec_mule __builtin_altivec_vmuleuw +# else +/* gcc needs inline assembly */ +/* Adapted from https://github.com/google/highwayhash/blob/master/highwayhash/hh_vsx.h. */ +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mulo(xxh_u32x4 a, xxh_u32x4 b) +{ + xxh_u64x2 result; + __asm__("vmulouw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b)); + return result; +} +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mule(xxh_u32x4 a, xxh_u32x4 b) +{ + xxh_u64x2 result; + __asm__("vmuleuw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b)); + return result; +} +# endif /* XXH_vec_mulo, XXH_vec_mule */ +#endif /* XXH_VECTOR == XXH_VSX */ + + +/* prefetch + * can be disabled, by declaring XXH_NO_PREFETCH build macro */ +#if defined(XXH_NO_PREFETCH) +# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */ +#else +# if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_I86)) /* _mm_prefetch() is not defined outside of x86/x64 */ +# include /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */ +# define XXH_PREFETCH(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0) +# elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) ) +# define XXH_PREFETCH(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */) +# else +# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */ +# endif +#endif /* XXH_NO_PREFETCH */ + + +/* ========================================== + * XXH3 default settings + * ========================================== */ + +#define XXH_SECRET_DEFAULT_SIZE 192 /* minimum XXH3_SECRET_SIZE_MIN */ + +#if (XXH_SECRET_DEFAULT_SIZE < XXH3_SECRET_SIZE_MIN) +# error "default keyset is not large enough" +#endif + +/* Pseudorandom secret taken directly from FARSH */ +XXH_ALIGN(64) static const xxh_u8 XXH3_kSecret[XXH_SECRET_DEFAULT_SIZE] = { + 0xb8, 0xfe, 0x6c, 0x39, 0x23, 0xa4, 0x4b, 0xbe, 0x7c, 0x01, 0x81, 0x2c, 0xf7, 0x21, 0xad, 0x1c, + 0xde, 0xd4, 0x6d, 0xe9, 0x83, 0x90, 0x97, 0xdb, 0x72, 0x40, 0xa4, 0xa4, 0xb7, 0xb3, 0x67, 0x1f, + 0xcb, 0x79, 0xe6, 0x4e, 0xcc, 0xc0, 0xe5, 0x78, 0x82, 0x5a, 0xd0, 0x7d, 0xcc, 0xff, 0x72, 0x21, + 0xb8, 0x08, 0x46, 0x74, 0xf7, 0x43, 0x24, 0x8e, 0xe0, 0x35, 0x90, 0xe6, 0x81, 0x3a, 0x26, 0x4c, + 0x3c, 0x28, 0x52, 0xbb, 0x91, 0xc3, 0x00, 0xcb, 0x88, 0xd0, 0x65, 0x8b, 0x1b, 0x53, 0x2e, 0xa3, + 0x71, 0x64, 0x48, 0x97, 0xa2, 0x0d, 0xf9, 0x4e, 0x38, 0x19, 0xef, 0x46, 0xa9, 0xde, 0xac, 0xd8, + 0xa8, 0xfa, 0x76, 0x3f, 0xe3, 0x9c, 0x34, 0x3f, 0xf9, 0xdc, 0xbb, 0xc7, 0xc7, 0x0b, 0x4f, 0x1d, + 0x8a, 0x51, 0xe0, 0x4b, 0xcd, 0xb4, 0x59, 0x31, 0xc8, 0x9f, 0x7e, 0xc9, 0xd9, 0x78, 0x73, 0x64, + 0xea, 0xc5, 0xac, 0x83, 0x34, 0xd3, 0xeb, 0xc3, 0xc5, 0x81, 0xa0, 0xff, 0xfa, 0x13, 0x63, 0xeb, + 0x17, 0x0d, 0xdd, 0x51, 0xb7, 0xf0, 0xda, 0x49, 0xd3, 0x16, 0x55, 0x26, 0x29, 0xd4, 0x68, 0x9e, + 0x2b, 0x16, 0xbe, 0x58, 0x7d, 0x47, 0xa1, 0xfc, 0x8f, 0xf8, 0xb8, 0xd1, 0x7a, 0xd0, 0x31, 0xce, + 0x45, 0xcb, 0x3a, 0x8f, 0x95, 0x16, 0x04, 0x28, 0xaf, 0xd7, 0xfb, 0xca, 0xbb, 0x4b, 0x40, 0x7e, +}; + + +#ifdef XXH_OLD_NAMES +# define kSecret XXH3_kSecret +#endif + +/* + * Calculates a 32-bit to 64-bit long multiply. + * + * Wraps __emulu on MSVC x86 because it tends to call __allmul when it doesn't + * need to (but it shouldn't need to anyways, it is about 7 instructions to do + * a 64x64 multiply...). Since we know that this will _always_ emit MULL, we + * use that instead of the normal method. + * + * If you are compiling for platforms like Thumb-1 and don't have a better option, + * you may also want to write your own long multiply routine here. + * + * XXH_FORCE_INLINE xxh_u64 XXH_mult32to64(xxh_u64 x, xxh_u64 y) + * { + * return (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF); + * } + */ +#if defined(_MSC_VER) && defined(_M_IX86) +# include +# define XXH_mult32to64(x, y) __emulu((unsigned)(x), (unsigned)(y)) +#else +/* + * Downcast + upcast is usually better than masking on older compilers like + * GCC 4.2 (especially 32-bit ones), all without affecting newer compilers. + * + * The other method, (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF), will AND both operands + * and perform a full 64x64 multiply -- entirely redundant on 32-bit. + */ +# define XXH_mult32to64(x, y) ((xxh_u64)(xxh_u32)(x) * (xxh_u64)(xxh_u32)(y)) +#endif + +/* + * Calculates a 64->128-bit long multiply. + * + * Uses __uint128_t and _umul128 if available, otherwise uses a scalar version. + */ +static XXH128_hash_t +XXH_mult64to128(xxh_u64 lhs, xxh_u64 rhs) +{ + /* + * GCC/Clang __uint128_t method. + * + * On most 64-bit targets, GCC and Clang define a __uint128_t type. + * This is usually the best way as it usually uses a native long 64-bit + * multiply, such as MULQ on x86_64 or MUL + UMULH on aarch64. + * + * Usually. + * + * Despite being a 32-bit platform, Clang (and emscripten) define this type + * despite not having the arithmetic for it. This results in a laggy + * compiler builtin call which calculates a full 128-bit multiply. + * In that case it is best to use the portable one. + * https://github.com/Cyan4973/xxHash/issues/211#issuecomment-515575677 + */ +#if defined(__GNUC__) && !defined(__wasm__) \ + && defined(__SIZEOF_INT128__) \ + || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 128) + + __uint128_t const product = (__uint128_t)lhs * (__uint128_t)rhs; + XXH128_hash_t r128; + r128.low64 = (xxh_u64)(product); + r128.high64 = (xxh_u64)(product >> 64); + return r128; + + /* + * MSVC for x64's _umul128 method. + * + * xxh_u64 _umul128(xxh_u64 Multiplier, xxh_u64 Multiplicand, xxh_u64 *HighProduct); + * + * This compiles to single operand MUL on x64. + */ +#elif defined(_M_X64) || defined(_M_IA64) + +#ifndef _MSC_VER +# pragma intrinsic(_umul128) +#endif + xxh_u64 product_high; + xxh_u64 const product_low = _umul128(lhs, rhs, &product_high); + XXH128_hash_t r128; + r128.low64 = product_low; + r128.high64 = product_high; + return r128; + +#else + /* + * Portable scalar method. Optimized for 32-bit and 64-bit ALUs. + * + * This is a fast and simple grade school multiply, which is shown below + * with base 10 arithmetic instead of base 0x100000000. + * + * 9 3 // D2 lhs = 93 + * x 7 5 // D2 rhs = 75 + * ---------- + * 1 5 // D2 lo_lo = (93 % 10) * (75 % 10) = 15 + * 4 5 | // D2 hi_lo = (93 / 10) * (75 % 10) = 45 + * 2 1 | // D2 lo_hi = (93 % 10) * (75 / 10) = 21 + * + 6 3 | | // D2 hi_hi = (93 / 10) * (75 / 10) = 63 + * --------- + * 2 7 | // D2 cross = (15 / 10) + (45 % 10) + 21 = 27 + * + 6 7 | | // D2 upper = (27 / 10) + (45 / 10) + 63 = 67 + * --------- + * 6 9 7 5 // D4 res = (27 * 10) + (15 % 10) + (67 * 100) = 6975 + * + * The reasons for adding the products like this are: + * 1. It avoids manual carry tracking. Just like how + * (9 * 9) + 9 + 9 = 99, the same applies with this for UINT64_MAX. + * This avoids a lot of complexity. + * + * 2. It hints for, and on Clang, compiles to, the powerful UMAAL + * instruction available in ARM's Digital Signal Processing extension + * in 32-bit ARMv6 and later, which is shown below: + * + * void UMAAL(xxh_u32 *RdLo, xxh_u32 *RdHi, xxh_u32 Rn, xxh_u32 Rm) + * { + * xxh_u64 product = (xxh_u64)*RdLo * (xxh_u64)*RdHi + Rn + Rm; + * *RdLo = (xxh_u32)(product & 0xFFFFFFFF); + * *RdHi = (xxh_u32)(product >> 32); + * } + * + * This instruction was designed for efficient long multiplication, and + * allows this to be calculated in only 4 instructions at speeds + * comparable to some 64-bit ALUs. + * + * 3. It isn't terrible on other platforms. Usually this will be a couple + * of 32-bit ADD/ADCs. + */ + + /* First calculate all of the cross products. */ + xxh_u64 const lo_lo = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs & 0xFFFFFFFF); + xxh_u64 const hi_lo = XXH_mult32to64(lhs >> 32, rhs & 0xFFFFFFFF); + xxh_u64 const lo_hi = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs >> 32); + xxh_u64 const hi_hi = XXH_mult32to64(lhs >> 32, rhs >> 32); + + /* Now add the products together. These will never overflow. */ + xxh_u64 const cross = (lo_lo >> 32) + (hi_lo & 0xFFFFFFFF) + lo_hi; + xxh_u64 const upper = (hi_lo >> 32) + (cross >> 32) + hi_hi; + xxh_u64 const lower = (cross << 32) | (lo_lo & 0xFFFFFFFF); + + XXH128_hash_t r128; + r128.low64 = lower; + r128.high64 = upper; + return r128; +#endif +} + +/* + * Does a 64-bit to 128-bit multiply, then XOR folds it. + * + * The reason for the separate function is to prevent passing too many structs + * around by value. This will hopefully inline the multiply, but we don't force it. + */ +static xxh_u64 +XXH3_mul128_fold64(xxh_u64 lhs, xxh_u64 rhs) +{ + XXH128_hash_t product = XXH_mult64to128(lhs, rhs); + return product.low64 ^ product.high64; +} + +/* Seems to produce slightly better code on GCC for some reason. */ +XXH_FORCE_INLINE xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift) +{ + XXH_ASSERT(0 <= shift && shift < 64); + return v64 ^ (v64 >> shift); +} + +/* + * This is a fast avalanche stage, + * suitable when input bits are already partially mixed + */ +static XXH64_hash_t XXH3_avalanche(xxh_u64 h64) +{ + h64 = XXH_xorshift64(h64, 37); + h64 *= 0x165667919E3779F9ULL; + h64 = XXH_xorshift64(h64, 32); + return h64; +} + +/* + * This is a stronger avalanche, + * inspired by Pelle Evensen's rrmxmx + * preferable when input has not been previously mixed + */ +static XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len) +{ + /* this mix is inspired by Pelle Evensen's rrmxmx */ + h64 ^= XXH_rotl64(h64, 49) ^ XXH_rotl64(h64, 24); + h64 *= 0x9FB21C651E98DF25ULL; + h64 ^= (h64 >> 35) + len ; + h64 *= 0x9FB21C651E98DF25ULL; + return XXH_xorshift64(h64, 28); +} + + +/* ========================================== + * Short keys + * ========================================== + * One of the shortcomings of XXH32 and XXH64 was that their performance was + * sub-optimal on short lengths. It used an iterative algorithm which strongly + * favored lengths that were a multiple of 4 or 8. + * + * Instead of iterating over individual inputs, we use a set of single shot + * functions which piece together a range of lengths and operate in constant time. + * + * Additionally, the number of multiplies has been significantly reduced. This + * reduces latency, especially when emulating 64-bit multiplies on 32-bit. + * + * Depending on the platform, this may or may not be faster than XXH32, but it + * is almost guaranteed to be faster than XXH64. + */ + +/* + * At very short lengths, there isn't enough input to fully hide secrets, or use + * the entire secret. + * + * There is also only a limited amount of mixing we can do before significantly + * impacting performance. + * + * Therefore, we use different sections of the secret and always mix two secret + * samples with an XOR. This should have no effect on performance on the + * seedless or withSeed variants because everything _should_ be constant folded + * by modern compilers. + * + * The XOR mixing hides individual parts of the secret and increases entropy. + * + * This adds an extra layer of strength for custom secrets. + */ +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(1 <= len && len <= 3); + XXH_ASSERT(secret != NULL); + /* + * len = 1: combined = { input[0], 0x01, input[0], input[0] } + * len = 2: combined = { input[1], 0x02, input[0], input[1] } + * len = 3: combined = { input[2], 0x03, input[0], input[1] } + */ + { xxh_u8 const c1 = input[0]; + xxh_u8 const c2 = input[len >> 1]; + xxh_u8 const c3 = input[len - 1]; + xxh_u32 const combined = ((xxh_u32)c1 << 16) | ((xxh_u32)c2 << 24) + | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8); + xxh_u64 const bitflip = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed; + xxh_u64 const keyed = (xxh_u64)combined ^ bitflip; + return XXH64_avalanche(keyed); + } +} + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(4 <= len && len < 8); + seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; + { xxh_u32 const input1 = XXH_readLE32(input); + xxh_u32 const input2 = XXH_readLE32(input + len - 4); + xxh_u64 const bitflip = (XXH_readLE64(secret+8) ^ XXH_readLE64(secret+16)) - seed; + xxh_u64 const input64 = input2 + (((xxh_u64)input1) << 32); + xxh_u64 const keyed = input64 ^ bitflip; + return XXH3_rrmxmx(keyed, len); + } +} + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_9to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(8 <= len && len <= 16); + { xxh_u64 const bitflip1 = (XXH_readLE64(secret+24) ^ XXH_readLE64(secret+32)) + seed; + xxh_u64 const bitflip2 = (XXH_readLE64(secret+40) ^ XXH_readLE64(secret+48)) - seed; + xxh_u64 const input_lo = XXH_readLE64(input) ^ bitflip1; + xxh_u64 const input_hi = XXH_readLE64(input + len - 8) ^ bitflip2; + xxh_u64 const acc = len + + XXH_swap64(input_lo) + input_hi + + XXH3_mul128_fold64(input_lo, input_hi); + return XXH3_avalanche(acc); + } +} + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_0to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(len <= 16); + { if (XXH_likely(len > 8)) return XXH3_len_9to16_64b(input, len, secret, seed); + if (XXH_likely(len >= 4)) return XXH3_len_4to8_64b(input, len, secret, seed); + if (len) return XXH3_len_1to3_64b(input, len, secret, seed); + return XXH64_avalanche(seed ^ (XXH_readLE64(secret+56) ^ XXH_readLE64(secret+64))); + } +} + +/* + * DISCLAIMER: There are known *seed-dependent* multicollisions here due to + * multiplication by zero, affecting hashes of lengths 17 to 240. + * + * However, they are very unlikely. + * + * Keep this in mind when using the unseeded XXH3_64bits() variant: As with all + * unseeded non-cryptographic hashes, it does not attempt to defend itself + * against specially crafted inputs, only random inputs. + * + * Compared to classic UMAC where a 1 in 2^31 chance of 4 consecutive bytes + * cancelling out the secret is taken an arbitrary number of times (addressed + * in XXH3_accumulate_512), this collision is very unlikely with random inputs + * and/or proper seeding: + * + * This only has a 1 in 2^63 chance of 8 consecutive bytes cancelling out, in a + * function that is only called up to 16 times per hash with up to 240 bytes of + * input. + * + * This is not too bad for a non-cryptographic hash function, especially with + * only 64 bit outputs. + * + * The 128-bit variant (which trades some speed for strength) is NOT affected + * by this, although it is always a good idea to use a proper seed if you care + * about strength. + */ +XXH_FORCE_INLINE xxh_u64 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input, + const xxh_u8* XXH_RESTRICT secret, xxh_u64 seed64) +{ +#if defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \ + && defined(__i386__) && defined(__SSE2__) /* x86 + SSE2 */ \ + && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable like XXH32 hack */ + /* + * UGLY HACK: + * GCC for x86 tends to autovectorize the 128-bit multiply, resulting in + * slower code. + * + * By forcing seed64 into a register, we disrupt the cost model and + * cause it to scalarize. See `XXH32_round()` + * + * FIXME: Clang's output is still _much_ faster -- On an AMD Ryzen 3600, + * XXH3_64bits @ len=240 runs at 4.6 GB/s with Clang 9, but 3.3 GB/s on + * GCC 9.2, despite both emitting scalar code. + * + * GCC generates much better scalar code than Clang for the rest of XXH3, + * which is why finding a more optimal codepath is an interest. + */ + __asm__ ("" : "+r" (seed64)); +#endif + { xxh_u64 const input_lo = XXH_readLE64(input); + xxh_u64 const input_hi = XXH_readLE64(input+8); + return XXH3_mul128_fold64( + input_lo ^ (XXH_readLE64(secret) + seed64), + input_hi ^ (XXH_readLE64(secret+8) - seed64) + ); + } +} + +/* For mid range keys, XXH3 uses a Mum-hash variant. */ +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(16 < len && len <= 128); + + { xxh_u64 acc = len * XXH_PRIME64_1; + if (len > 32) { + if (len > 64) { + if (len > 96) { + acc += XXH3_mix16B(input+48, secret+96, seed); + acc += XXH3_mix16B(input+len-64, secret+112, seed); + } + acc += XXH3_mix16B(input+32, secret+64, seed); + acc += XXH3_mix16B(input+len-48, secret+80, seed); + } + acc += XXH3_mix16B(input+16, secret+32, seed); + acc += XXH3_mix16B(input+len-32, secret+48, seed); + } + acc += XXH3_mix16B(input+0, secret+0, seed); + acc += XXH3_mix16B(input+len-16, secret+16, seed); + + return XXH3_avalanche(acc); + } +} + +#define XXH3_MIDSIZE_MAX 240 + +XXH_NO_INLINE XXH64_hash_t +XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); + + #define XXH3_MIDSIZE_STARTOFFSET 3 + #define XXH3_MIDSIZE_LASTOFFSET 17 + + { xxh_u64 acc = len * XXH_PRIME64_1; + int const nbRounds = (int)len / 16; + int i; + for (i=0; i<8; i++) { + acc += XXH3_mix16B(input+(16*i), secret+(16*i), seed); + } + acc = XXH3_avalanche(acc); + XXH_ASSERT(nbRounds >= 8); +#if defined(__clang__) /* Clang */ \ + && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \ + && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */ + /* + * UGLY HACK: + * Clang for ARMv7-A tries to vectorize this loop, similar to GCC x86. + * In everywhere else, it uses scalar code. + * + * For 64->128-bit multiplies, even if the NEON was 100% optimal, it + * would still be slower than UMAAL (see XXH_mult64to128). + * + * Unfortunately, Clang doesn't handle the long multiplies properly and + * converts them to the nonexistent "vmulq_u64" intrinsic, which is then + * scalarized into an ugly mess of VMOV.32 instructions. + * + * This mess is difficult to avoid without turning autovectorization + * off completely, but they are usually relatively minor and/or not + * worth it to fix. + * + * This loop is the easiest to fix, as unlike XXH32, this pragma + * _actually works_ because it is a loop vectorization instead of an + * SLP vectorization. + */ + #pragma clang loop vectorize(disable) +#endif + for (i=8 ; i < nbRounds; i++) { + acc += XXH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3_MIDSIZE_STARTOFFSET, seed); + } + /* last bytes */ + acc += XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed); + return XXH3_avalanche(acc); + } +} + + +/* ======= Long Keys ======= */ + +#define XXH_STRIPE_LEN 64 +#define XXH_SECRET_CONSUME_RATE 8 /* nb of secret bytes consumed at each accumulation */ +#define XXH_ACC_NB (XXH_STRIPE_LEN / sizeof(xxh_u64)) + +#ifdef XXH_OLD_NAMES +# define STRIPE_LEN XXH_STRIPE_LEN +# define ACC_NB XXH_ACC_NB +#endif + +XXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64) +{ + if (!XXH_CPU_LITTLE_ENDIAN) v64 = XXH_swap64(v64); + memcpy(dst, &v64, sizeof(v64)); +} + +/* Several intrinsic functions below are supposed to accept __int64 as argument, + * as documented in https://software.intel.com/sites/landingpage/IntrinsicsGuide/ . + * However, several environments do not define __int64 type, + * requiring a workaround. + */ +#if !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) + typedef int64_t xxh_i64; +#else + /* the following type must have a width of 64-bit */ + typedef long long xxh_i64; +#endif + +/* + * XXH3_accumulate_512 is the tightest loop for long inputs, and it is the most optimized. + * + * It is a hardened version of UMAC, based off of FARSH's implementation. + * + * This was chosen because it adapts quite well to 32-bit, 64-bit, and SIMD + * implementations, and it is ridiculously fast. + * + * We harden it by mixing the original input to the accumulators as well as the product. + * + * This means that in the (relatively likely) case of a multiply by zero, the + * original input is preserved. + * + * On 128-bit inputs, we swap 64-bit pairs when we add the input to improve + * cross-pollination, as otherwise the upper and lower halves would be + * essentially independent. + * + * This doesn't matter on 64-bit hashes since they all get merged together in + * the end, so we skip the extra step. + * + * Both XXH3_64bits and XXH3_128bits use this subroutine. + */ + +#if (XXH_VECTOR == XXH_AVX512) || defined(XXH_X86DISPATCH) + +#ifndef XXH_TARGET_AVX512 +# define XXH_TARGET_AVX512 /* disable attribute target */ +#endif + +XXH_FORCE_INLINE XXH_TARGET_AVX512 void +XXH3_accumulate_512_avx512(void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + XXH_ALIGN(64) __m512i* const xacc = (__m512i *) acc; + XXH_ASSERT((((size_t)acc) & 63) == 0); + XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i)); + + { + /* data_vec = input[0]; */ + __m512i const data_vec = _mm512_loadu_si512 (input); + /* key_vec = secret[0]; */ + __m512i const key_vec = _mm512_loadu_si512 (secret); + /* data_key = data_vec ^ key_vec; */ + __m512i const data_key = _mm512_xor_si512 (data_vec, key_vec); + /* data_key_lo = data_key >> 32; */ + __m512i const data_key_lo = _mm512_shuffle_epi32 (data_key, (_MM_PERM_ENUM)_MM_SHUFFLE(0, 3, 0, 1)); + /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ + __m512i const product = _mm512_mul_epu32 (data_key, data_key_lo); + /* xacc[0] += swap(data_vec); */ + __m512i const data_swap = _mm512_shuffle_epi32(data_vec, (_MM_PERM_ENUM)_MM_SHUFFLE(1, 0, 3, 2)); + __m512i const sum = _mm512_add_epi64(*xacc, data_swap); + /* xacc[0] += product; */ + *xacc = _mm512_add_epi64(product, sum); + } +} + +/* + * XXH3_scrambleAcc: Scrambles the accumulators to improve mixing. + * + * Multiplication isn't perfect, as explained by Google in HighwayHash: + * + * // Multiplication mixes/scrambles bytes 0-7 of the 64-bit result to + * // varying degrees. In descending order of goodness, bytes + * // 3 4 2 5 1 6 0 7 have quality 228 224 164 160 100 96 36 32. + * // As expected, the upper and lower bytes are much worse. + * + * Source: https://github.com/google/highwayhash/blob/0aaf66b/highwayhash/hh_avx2.h#L291 + * + * Since our algorithm uses a pseudorandom secret to add some variance into the + * mix, we don't need to (or want to) mix as often or as much as HighwayHash does. + * + * This isn't as tight as XXH3_accumulate, but still written in SIMD to avoid + * extraction. + * + * Both XXH3_64bits and XXH3_128bits use this subroutine. + */ + +XXH_FORCE_INLINE XXH_TARGET_AVX512 void +XXH3_scrambleAcc_avx512(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 63) == 0); + XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i)); + { XXH_ALIGN(64) __m512i* const xacc = (__m512i*) acc; + const __m512i prime32 = _mm512_set1_epi32((int)XXH_PRIME32_1); + + /* xacc[0] ^= (xacc[0] >> 47) */ + __m512i const acc_vec = *xacc; + __m512i const shifted = _mm512_srli_epi64 (acc_vec, 47); + __m512i const data_vec = _mm512_xor_si512 (acc_vec, shifted); + /* xacc[0] ^= secret; */ + __m512i const key_vec = _mm512_loadu_si512 (secret); + __m512i const data_key = _mm512_xor_si512 (data_vec, key_vec); + + /* xacc[0] *= XXH_PRIME32_1; */ + __m512i const data_key_hi = _mm512_shuffle_epi32 (data_key, (_MM_PERM_ENUM)_MM_SHUFFLE(0, 3, 0, 1)); + __m512i const prod_lo = _mm512_mul_epu32 (data_key, prime32); + __m512i const prod_hi = _mm512_mul_epu32 (data_key_hi, prime32); + *xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32)); + } +} + +XXH_FORCE_INLINE XXH_TARGET_AVX512 void +XXH3_initCustomSecret_avx512(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 63) == 0); + XXH_STATIC_ASSERT(XXH_SEC_ALIGN == 64); + XXH_ASSERT(((size_t)customSecret & 63) == 0); + (void)(&XXH_writeLE64); + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m512i); + __m512i const seed = _mm512_mask_set1_epi64(_mm512_set1_epi64((xxh_i64)seed64), 0xAA, -(xxh_i64)seed64); + + XXH_ALIGN(64) const __m512i* const src = (const __m512i*) XXH3_kSecret; + XXH_ALIGN(64) __m512i* const dest = ( __m512i*) customSecret; + int i; + for (i=0; i < nbRounds; ++i) { + /* GCC has a bug, _mm512_stream_load_si512 accepts 'void*', not 'void const*', + * this will warn "discards ‘const’ qualifier". */ + union { + XXH_ALIGN(64) const __m512i* cp; + XXH_ALIGN(64) void* p; + } remote_const_void; + remote_const_void.cp = src + i; + dest[i] = _mm512_add_epi64(_mm512_stream_load_si512(remote_const_void.p), seed); + } } +} + +#endif + +#if (XXH_VECTOR == XXH_AVX2) || defined(XXH_X86DISPATCH) + +#ifndef XXH_TARGET_AVX2 +# define XXH_TARGET_AVX2 /* disable attribute target */ +#endif + +XXH_FORCE_INLINE XXH_TARGET_AVX2 void +XXH3_accumulate_512_avx2( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 31) == 0); + { XXH_ALIGN(32) __m256i* const xacc = (__m256i *) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ + const __m256i* const xinput = (const __m256i *) input; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ + const __m256i* const xsecret = (const __m256i *) secret; + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) { + /* data_vec = xinput[i]; */ + __m256i const data_vec = _mm256_loadu_si256 (xinput+i); + /* key_vec = xsecret[i]; */ + __m256i const key_vec = _mm256_loadu_si256 (xsecret+i); + /* data_key = data_vec ^ key_vec; */ + __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec); + /* data_key_lo = data_key >> 32; */ + __m256i const data_key_lo = _mm256_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ + __m256i const product = _mm256_mul_epu32 (data_key, data_key_lo); + /* xacc[i] += swap(data_vec); */ + __m256i const data_swap = _mm256_shuffle_epi32(data_vec, _MM_SHUFFLE(1, 0, 3, 2)); + __m256i const sum = _mm256_add_epi64(xacc[i], data_swap); + /* xacc[i] += product; */ + xacc[i] = _mm256_add_epi64(product, sum); + } } +} + +XXH_FORCE_INLINE XXH_TARGET_AVX2 void +XXH3_scrambleAcc_avx2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 31) == 0); + { XXH_ALIGN(32) __m256i* const xacc = (__m256i*) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ + const __m256i* const xsecret = (const __m256i *) secret; + const __m256i prime32 = _mm256_set1_epi32((int)XXH_PRIME32_1); + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) { + /* xacc[i] ^= (xacc[i] >> 47) */ + __m256i const acc_vec = xacc[i]; + __m256i const shifted = _mm256_srli_epi64 (acc_vec, 47); + __m256i const data_vec = _mm256_xor_si256 (acc_vec, shifted); + /* xacc[i] ^= xsecret; */ + __m256i const key_vec = _mm256_loadu_si256 (xsecret+i); + __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec); + + /* xacc[i] *= XXH_PRIME32_1; */ + __m256i const data_key_hi = _mm256_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + __m256i const prod_lo = _mm256_mul_epu32 (data_key, prime32); + __m256i const prod_hi = _mm256_mul_epu32 (data_key_hi, prime32); + xacc[i] = _mm256_add_epi64(prod_lo, _mm256_slli_epi64(prod_hi, 32)); + } + } +} + +XXH_FORCE_INLINE XXH_TARGET_AVX2 void XXH3_initCustomSecret_avx2(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 31) == 0); + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE / sizeof(__m256i)) == 6); + XXH_STATIC_ASSERT(XXH_SEC_ALIGN <= 64); + (void)(&XXH_writeLE64); + XXH_PREFETCH(customSecret); + { __m256i const seed = _mm256_set_epi64x(-(xxh_i64)seed64, (xxh_i64)seed64, -(xxh_i64)seed64, (xxh_i64)seed64); + + XXH_ALIGN(64) const __m256i* const src = (const __m256i*) XXH3_kSecret; + XXH_ALIGN(64) __m256i* dest = ( __m256i*) customSecret; + +# if defined(__GNUC__) || defined(__clang__) + /* + * On GCC & Clang, marking 'dest' as modified will cause the compiler: + * - do not extract the secret from sse registers in the internal loop + * - use less common registers, and avoid pushing these reg into stack + * The asm hack causes Clang to assume that XXH3_kSecretPtr aliases with + * customSecret, and on aarch64, this prevented LDP from merging two + * loads together for free. Putting the loads together before the stores + * properly generates LDP. + */ + __asm__("" : "+r" (dest)); +# endif + + /* GCC -O2 need unroll loop manually */ + dest[0] = _mm256_add_epi64(_mm256_stream_load_si256(src+0), seed); + dest[1] = _mm256_add_epi64(_mm256_stream_load_si256(src+1), seed); + dest[2] = _mm256_add_epi64(_mm256_stream_load_si256(src+2), seed); + dest[3] = _mm256_add_epi64(_mm256_stream_load_si256(src+3), seed); + dest[4] = _mm256_add_epi64(_mm256_stream_load_si256(src+4), seed); + dest[5] = _mm256_add_epi64(_mm256_stream_load_si256(src+5), seed); + } +} + +#endif + +#if (XXH_VECTOR == XXH_SSE2) || defined(XXH_X86DISPATCH) + +#ifndef XXH_TARGET_SSE2 +# define XXH_TARGET_SSE2 /* disable attribute target */ +#endif + +XXH_FORCE_INLINE XXH_TARGET_SSE2 void +XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + /* SSE2 is just a half-scale version of the AVX2 version. */ + XXH_ASSERT((((size_t)acc) & 15) == 0); + { XXH_ALIGN(16) __m128i* const xacc = (__m128i *) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ + const __m128i* const xinput = (const __m128i *) input; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ + const __m128i* const xsecret = (const __m128i *) secret; + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) { + /* data_vec = xinput[i]; */ + __m128i const data_vec = _mm_loadu_si128 (xinput+i); + /* key_vec = xsecret[i]; */ + __m128i const key_vec = _mm_loadu_si128 (xsecret+i); + /* data_key = data_vec ^ key_vec; */ + __m128i const data_key = _mm_xor_si128 (data_vec, key_vec); + /* data_key_lo = data_key >> 32; */ + __m128i const data_key_lo = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ + __m128i const product = _mm_mul_epu32 (data_key, data_key_lo); + /* xacc[i] += swap(data_vec); */ + __m128i const data_swap = _mm_shuffle_epi32(data_vec, _MM_SHUFFLE(1,0,3,2)); + __m128i const sum = _mm_add_epi64(xacc[i], data_swap); + /* xacc[i] += product; */ + xacc[i] = _mm_add_epi64(product, sum); + } } +} + +XXH_FORCE_INLINE XXH_TARGET_SSE2 void +XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + { XXH_ALIGN(16) __m128i* const xacc = (__m128i*) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ + const __m128i* const xsecret = (const __m128i *) secret; + const __m128i prime32 = _mm_set1_epi32((int)XXH_PRIME32_1); + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) { + /* xacc[i] ^= (xacc[i] >> 47) */ + __m128i const acc_vec = xacc[i]; + __m128i const shifted = _mm_srli_epi64 (acc_vec, 47); + __m128i const data_vec = _mm_xor_si128 (acc_vec, shifted); + /* xacc[i] ^= xsecret[i]; */ + __m128i const key_vec = _mm_loadu_si128 (xsecret+i); + __m128i const data_key = _mm_xor_si128 (data_vec, key_vec); + + /* xacc[i] *= XXH_PRIME32_1; */ + __m128i const data_key_hi = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + __m128i const prod_lo = _mm_mul_epu32 (data_key, prime32); + __m128i const prod_hi = _mm_mul_epu32 (data_key_hi, prime32); + xacc[i] = _mm_add_epi64(prod_lo, _mm_slli_epi64(prod_hi, 32)); + } + } +} + +XXH_FORCE_INLINE XXH_TARGET_SSE2 void XXH3_initCustomSecret_sse2(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0); + (void)(&XXH_writeLE64); + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m128i); + +# if defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER < 1900 + // MSVC 32bit mode does not support _mm_set_epi64x before 2015 + XXH_ALIGN(16) const xxh_i64 seed64x2[2] = { (xxh_i64)seed64, -(xxh_i64)seed64 }; + __m128i const seed = _mm_load_si128((__m128i const*)seed64x2); +# else + __m128i const seed = _mm_set_epi64x(-(xxh_i64)seed64, (xxh_i64)seed64); +# endif + int i; + + XXH_ALIGN(64) const float* const src = (float const*) XXH3_kSecret; + XXH_ALIGN(XXH_SEC_ALIGN) __m128i* dest = (__m128i*) customSecret; +# if defined(__GNUC__) || defined(__clang__) + /* + * On GCC & Clang, marking 'dest' as modified will cause the compiler: + * - do not extract the secret from sse registers in the internal loop + * - use less common registers, and avoid pushing these reg into stack + */ + __asm__("" : "+r" (dest)); +# endif + + for (i=0; i < nbRounds; ++i) { + dest[i] = _mm_add_epi64(_mm_castps_si128(_mm_load_ps(src+i*4)), seed); + } } +} + +#endif + +#if (XXH_VECTOR == XXH_NEON) + +XXH_FORCE_INLINE void +XXH3_accumulate_512_neon( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + { + XXH_ALIGN(16) uint64x2_t* const xacc = (uint64x2_t *) acc; + /* We don't use a uint32x4_t pointer because it causes bus errors on ARMv7. */ + uint8_t const* const xinput = (const uint8_t *) input; + uint8_t const* const xsecret = (const uint8_t *) secret; + + size_t i; + for (i=0; i < XXH_STRIPE_LEN / sizeof(uint64x2_t); i++) { + /* data_vec = xinput[i]; */ + uint8x16_t data_vec = vld1q_u8(xinput + (i * 16)); + /* key_vec = xsecret[i]; */ + uint8x16_t key_vec = vld1q_u8(xsecret + (i * 16)); + uint64x2_t data_key; + uint32x2_t data_key_lo, data_key_hi; + /* xacc[i] += swap(data_vec); */ + uint64x2_t const data64 = vreinterpretq_u64_u8(data_vec); + uint64x2_t const swapped = vextq_u64(data64, data64, 1); + xacc[i] = vaddq_u64 (xacc[i], swapped); + /* data_key = data_vec ^ key_vec; */ + data_key = vreinterpretq_u64_u8(veorq_u8(data_vec, key_vec)); + /* data_key_lo = (uint32x2_t) (data_key & 0xFFFFFFFF); + * data_key_hi = (uint32x2_t) (data_key >> 32); + * data_key = UNDEFINED; */ + XXH_SPLIT_IN_PLACE(data_key, data_key_lo, data_key_hi); + /* xacc[i] += (uint64x2_t) data_key_lo * (uint64x2_t) data_key_hi; */ + xacc[i] = vmlal_u32 (xacc[i], data_key_lo, data_key_hi); + + } + } +} + +XXH_FORCE_INLINE void +XXH3_scrambleAcc_neon(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + + { uint64x2_t* xacc = (uint64x2_t*) acc; + uint8_t const* xsecret = (uint8_t const*) secret; + uint32x2_t prime = vdup_n_u32 (XXH_PRIME32_1); + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(uint64x2_t); i++) { + /* xacc[i] ^= (xacc[i] >> 47); */ + uint64x2_t acc_vec = xacc[i]; + uint64x2_t shifted = vshrq_n_u64 (acc_vec, 47); + uint64x2_t data_vec = veorq_u64 (acc_vec, shifted); + + /* xacc[i] ^= xsecret[i]; */ + uint8x16_t key_vec = vld1q_u8(xsecret + (i * 16)); + uint64x2_t data_key = veorq_u64(data_vec, vreinterpretq_u64_u8(key_vec)); + + /* xacc[i] *= XXH_PRIME32_1 */ + uint32x2_t data_key_lo, data_key_hi; + /* data_key_lo = (uint32x2_t) (xacc[i] & 0xFFFFFFFF); + * data_key_hi = (uint32x2_t) (xacc[i] >> 32); + * xacc[i] = UNDEFINED; */ + XXH_SPLIT_IN_PLACE(data_key, data_key_lo, data_key_hi); + { /* + * prod_hi = (data_key >> 32) * XXH_PRIME32_1; + * + * Avoid vmul_u32 + vshll_n_u32 since Clang 6 and 7 will + * incorrectly "optimize" this: + * tmp = vmul_u32(vmovn_u64(a), vmovn_u64(b)); + * shifted = vshll_n_u32(tmp, 32); + * to this: + * tmp = "vmulq_u64"(a, b); // no such thing! + * shifted = vshlq_n_u64(tmp, 32); + * + * However, unlike SSE, Clang lacks a 64-bit multiply routine + * for NEON, and it scalarizes two 64-bit multiplies instead. + * + * vmull_u32 has the same timing as vmul_u32, and it avoids + * this bug completely. + * See https://bugs.llvm.org/show_bug.cgi?id=39967 + */ + uint64x2_t prod_hi = vmull_u32 (data_key_hi, prime); + /* xacc[i] = prod_hi << 32; */ + xacc[i] = vshlq_n_u64(prod_hi, 32); + /* xacc[i] += (prod_hi & 0xFFFFFFFF) * XXH_PRIME32_1; */ + xacc[i] = vmlal_u32(xacc[i], data_key_lo, prime); + } + } } +} + +#endif + +#if (XXH_VECTOR == XXH_VSX) + +XXH_FORCE_INLINE void +XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + xxh_u64x2* const xacc = (xxh_u64x2*) acc; /* presumed aligned */ + xxh_u64x2 const* const xinput = (xxh_u64x2 const*) input; /* no alignment restriction */ + xxh_u64x2 const* const xsecret = (xxh_u64x2 const*) secret; /* no alignment restriction */ + xxh_u64x2 const v32 = { 32, 32 }; + size_t i; + for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) { + /* data_vec = xinput[i]; */ + xxh_u64x2 const data_vec = XXH_vec_loadu(xinput + i); + /* key_vec = xsecret[i]; */ + xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + i); + xxh_u64x2 const data_key = data_vec ^ key_vec; + /* shuffled = (data_key << 32) | (data_key >> 32); */ + xxh_u32x4 const shuffled = (xxh_u32x4)vec_rl(data_key, v32); + /* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */ + xxh_u64x2 const product = XXH_vec_mulo((xxh_u32x4)data_key, shuffled); + xacc[i] += product; + + /* swap high and low halves */ +#ifdef __s390x__ + xacc[i] += vec_permi(data_vec, data_vec, 2); +#else + xacc[i] += vec_xxpermdi(data_vec, data_vec, 2); +#endif + } +} + +XXH_FORCE_INLINE void +XXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + + { xxh_u64x2* const xacc = (xxh_u64x2*) acc; + const xxh_u64x2* const xsecret = (const xxh_u64x2*) secret; + /* constants */ + xxh_u64x2 const v32 = { 32, 32 }; + xxh_u64x2 const v47 = { 47, 47 }; + xxh_u32x4 const prime = { XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1 }; + size_t i; + for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) { + /* xacc[i] ^= (xacc[i] >> 47); */ + xxh_u64x2 const acc_vec = xacc[i]; + xxh_u64x2 const data_vec = acc_vec ^ (acc_vec >> v47); + + /* xacc[i] ^= xsecret[i]; */ + xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + i); + xxh_u64x2 const data_key = data_vec ^ key_vec; + + /* xacc[i] *= XXH_PRIME32_1 */ + /* prod_lo = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)prime & 0xFFFFFFFF); */ + xxh_u64x2 const prod_even = XXH_vec_mule((xxh_u32x4)data_key, prime); + /* prod_hi = ((xxh_u64x2)data_key >> 32) * ((xxh_u64x2)prime >> 32); */ + xxh_u64x2 const prod_odd = XXH_vec_mulo((xxh_u32x4)data_key, prime); + xacc[i] = prod_odd + (prod_even << v32); + } } +} + +#endif + +/* scalar variants - universal */ + +XXH_FORCE_INLINE void +XXH3_accumulate_512_scalar(void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64* const xacc = (xxh_u64*) acc; /* presumed aligned */ + const xxh_u8* const xinput = (const xxh_u8*) input; /* no alignment restriction */ + const xxh_u8* const xsecret = (const xxh_u8*) secret; /* no alignment restriction */ + size_t i; + XXH_ASSERT(((size_t)acc & (XXH_ACC_ALIGN-1)) == 0); + for (i=0; i < XXH_ACC_NB; i++) { + xxh_u64 const data_val = XXH_readLE64(xinput + 8*i); + xxh_u64 const data_key = data_val ^ XXH_readLE64(xsecret + i*8); + xacc[i ^ 1] += data_val; /* swap adjacent lanes */ + xacc[i] += XXH_mult32to64(data_key & 0xFFFFFFFF, data_key >> 32); + } +} + +XXH_FORCE_INLINE void +XXH3_scrambleAcc_scalar(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64* const xacc = (xxh_u64*) acc; /* presumed aligned */ + const xxh_u8* const xsecret = (const xxh_u8*) secret; /* no alignment restriction */ + size_t i; + XXH_ASSERT((((size_t)acc) & (XXH_ACC_ALIGN-1)) == 0); + for (i=0; i < XXH_ACC_NB; i++) { + xxh_u64 const key64 = XXH_readLE64(xsecret + 8*i); + xxh_u64 acc64 = xacc[i]; + acc64 = XXH_xorshift64(acc64, 47); + acc64 ^= key64; + acc64 *= XXH_PRIME32_1; + xacc[i] = acc64; + } +} + +XXH_FORCE_INLINE void +XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + /* + * We need a separate pointer for the hack below, + * which requires a non-const pointer. + * Any decent compiler will optimize this out otherwise. + */ + const xxh_u8* kSecretPtr = XXH3_kSecret; + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0); + +#if defined(__clang__) && defined(__aarch64__) + /* + * UGLY HACK: + * Clang generates a bunch of MOV/MOVK pairs for aarch64, and they are + * placed sequentially, in order, at the top of the unrolled loop. + * + * While MOVK is great for generating constants (2 cycles for a 64-bit + * constant compared to 4 cycles for LDR), long MOVK chains stall the + * integer pipelines: + * I L S + * MOVK + * MOVK + * MOVK + * MOVK + * ADD + * SUB STR + * STR + * By forcing loads from memory (as the asm line causes Clang to assume + * that XXH3_kSecretPtr has been changed), the pipelines are used more + * efficiently: + * I L S + * LDR + * ADD LDR + * SUB STR + * STR + * XXH3_64bits_withSeed, len == 256, Snapdragon 835 + * without hack: 2654.4 MB/s + * with hack: 3202.9 MB/s + */ + __asm__("" : "+r" (kSecretPtr)); +#endif + /* + * Note: in debug mode, this overrides the asm optimization + * and Clang will emit MOVK chains again. + */ + XXH_ASSERT(kSecretPtr == XXH3_kSecret); + + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / 16; + int i; + for (i=0; i < nbRounds; i++) { + /* + * The asm hack causes Clang to assume that kSecretPtr aliases with + * customSecret, and on aarch64, this prevented LDP from merging two + * loads together for free. Putting the loads together before the stores + * properly generates LDP. + */ + xxh_u64 lo = XXH_readLE64(kSecretPtr + 16*i) + seed64; + xxh_u64 hi = XXH_readLE64(kSecretPtr + 16*i + 8) - seed64; + XXH_writeLE64((xxh_u8*)customSecret + 16*i, lo); + XXH_writeLE64((xxh_u8*)customSecret + 16*i + 8, hi); + } } +} + + +typedef void (*XXH3_f_accumulate_512)(void* XXH_RESTRICT, const void*, const void*); +typedef void (*XXH3_f_scrambleAcc)(void* XXH_RESTRICT, const void*); +typedef void (*XXH3_f_initCustomSecret)(void* XXH_RESTRICT, xxh_u64); + + +#if (XXH_VECTOR == XXH_AVX512) + +#define XXH3_accumulate_512 XXH3_accumulate_512_avx512 +#define XXH3_scrambleAcc XXH3_scrambleAcc_avx512 +#define XXH3_initCustomSecret XXH3_initCustomSecret_avx512 + +#elif (XXH_VECTOR == XXH_AVX2) + +#define XXH3_accumulate_512 XXH3_accumulate_512_avx2 +#define XXH3_scrambleAcc XXH3_scrambleAcc_avx2 +#define XXH3_initCustomSecret XXH3_initCustomSecret_avx2 + +#elif (XXH_VECTOR == XXH_SSE2) + +#define XXH3_accumulate_512 XXH3_accumulate_512_sse2 +#define XXH3_scrambleAcc XXH3_scrambleAcc_sse2 +#define XXH3_initCustomSecret XXH3_initCustomSecret_sse2 + +#elif (XXH_VECTOR == XXH_NEON) + +#define XXH3_accumulate_512 XXH3_accumulate_512_neon +#define XXH3_scrambleAcc XXH3_scrambleAcc_neon +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#elif (XXH_VECTOR == XXH_VSX) + +#define XXH3_accumulate_512 XXH3_accumulate_512_vsx +#define XXH3_scrambleAcc XXH3_scrambleAcc_vsx +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#else /* scalar */ + +#define XXH3_accumulate_512 XXH3_accumulate_512_scalar +#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#endif + + + +#ifndef XXH_PREFETCH_DIST +# ifdef __clang__ +# define XXH_PREFETCH_DIST 320 +# else +# if (XXH_VECTOR == XXH_AVX512) +# define XXH_PREFETCH_DIST 512 +# else +# define XXH_PREFETCH_DIST 384 +# endif +# endif /* __clang__ */ +#endif /* XXH_PREFETCH_DIST */ + +/* + * XXH3_accumulate() + * Loops over XXH3_accumulate_512(). + * Assumption: nbStripes will not overflow the secret size + */ +XXH_FORCE_INLINE void +XXH3_accumulate( xxh_u64* XXH_RESTRICT acc, + const xxh_u8* XXH_RESTRICT input, + const xxh_u8* XXH_RESTRICT secret, + size_t nbStripes, + XXH3_f_accumulate_512 f_acc512) +{ + size_t n; + for (n = 0; n < nbStripes; n++ ) { + const xxh_u8* const in = input + n*XXH_STRIPE_LEN; + XXH_PREFETCH(in + XXH_PREFETCH_DIST); + f_acc512(acc, + in, + secret + n*XXH_SECRET_CONSUME_RATE); + } +} + +XXH_FORCE_INLINE void +XXH3_hashLong_internal_loop(xxh_u64* XXH_RESTRICT acc, + const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + size_t const nbStripesPerBlock = (secretSize - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE; + size_t const block_len = XXH_STRIPE_LEN * nbStripesPerBlock; + size_t const nb_blocks = (len - 1) / block_len; + + size_t n; + + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); + + for (n = 0; n < nb_blocks; n++) { + XXH3_accumulate(acc, input + n*block_len, secret, nbStripesPerBlock, f_acc512); + f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); + } + + /* last partial block */ + XXH_ASSERT(len > XXH_STRIPE_LEN); + { size_t const nbStripes = ((len - 1) - (block_len * nb_blocks)) / XXH_STRIPE_LEN; + XXH_ASSERT(nbStripes <= (secretSize / XXH_SECRET_CONSUME_RATE)); + XXH3_accumulate(acc, input + nb_blocks*block_len, secret, nbStripes, f_acc512); + + /* last stripe */ + { const xxh_u8* const p = input + len - XXH_STRIPE_LEN; +#define XXH_SECRET_LASTACC_START 7 /* not aligned on 8, last secret is different from acc & scrambler */ + f_acc512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START); + } } +} + +XXH_FORCE_INLINE xxh_u64 +XXH3_mix2Accs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret) +{ + return XXH3_mul128_fold64( + acc[0] ^ XXH_readLE64(secret), + acc[1] ^ XXH_readLE64(secret+8) ); +} + +static XXH64_hash_t +XXH3_mergeAccs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, xxh_u64 start) +{ + xxh_u64 result64 = start; + size_t i = 0; + + for (i = 0; i < 4; i++) { + result64 += XXH3_mix2Accs(acc+2*i, secret + 16*i); +#if defined(__clang__) /* Clang */ \ + && (defined(__arm__) || defined(__thumb__)) /* ARMv7 */ \ + && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \ + && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */ + /* + * UGLY HACK: + * Prevent autovectorization on Clang ARMv7-a. Exact same problem as + * the one in XXH3_len_129to240_64b. Speeds up shorter keys > 240b. + * XXH3_64bits, len == 256, Snapdragon 835: + * without hack: 2063.7 MB/s + * with hack: 2560.7 MB/s + */ + __asm__("" : "+r" (result64)); +#endif + } + + return XXH3_avalanche(result64); +} + +#define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \ + XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 } + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len, + const void* XXH_RESTRICT secret, size_t secretSize, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC; + + XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, (const xxh_u8*)secret, secretSize, f_acc512, f_scramble); + + /* converge into final hash */ + XXH_STATIC_ASSERT(sizeof(acc) == 64); + /* do not align on 8, so that the secret is different from the accumulator */ +#define XXH_SECRET_MERGEACCS_START 11 + XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); + return XXH3_mergeAccs(acc, (const xxh_u8*)secret + XXH_SECRET_MERGEACCS_START, (xxh_u64)len * XXH_PRIME64_1); +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH64_hash_t +XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; + return XXH3_hashLong_64b_internal(input, len, secret, secretLen, XXH3_accumulate_512, XXH3_scrambleAcc); +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + * Since the function is not inlined, the compiler may not be able to understand that, + * in some scenarios, its `secret` argument is actually a compile time constant. + * This variant enforces that the compiler can detect that, + * and uses this opportunity to streamline the generated code for better performance. + */ +XXH_NO_INLINE XXH64_hash_t +XXH3_hashLong_64b_default(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; (void)secret; (void)secretLen; + return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate_512, XXH3_scrambleAcc); +} + +/* + * XXH3_hashLong_64b_withSeed(): + * Generate a custom key based on alteration of default XXH3_kSecret with the seed, + * and then use this key for long mode hashing. + * + * This operation is decently fast but nonetheless costs a little bit of time. + * Try to avoid it whenever possible (typically when seed==0). + * + * It's important for performance that XXH3_hashLong is not inlined. Not sure + * why (uop cache maybe?), but the difference is large and easily measurable. + */ +XXH_FORCE_INLINE XXH64_hash_t +XXH3_hashLong_64b_withSeed_internal(const void* input, size_t len, + XXH64_hash_t seed, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble, + XXH3_f_initCustomSecret f_initSec) +{ + if (seed == 0) + return XXH3_hashLong_64b_internal(input, len, + XXH3_kSecret, sizeof(XXH3_kSecret), + f_acc512, f_scramble); + { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE]; + f_initSec(secret, seed); + return XXH3_hashLong_64b_internal(input, len, secret, sizeof(secret), + f_acc512, f_scramble); + } +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH64_hash_t +XXH3_hashLong_64b_withSeed(const void* input, size_t len, + XXH64_hash_t seed, const xxh_u8* secret, size_t secretLen) +{ + (void)secret; (void)secretLen; + return XXH3_hashLong_64b_withSeed_internal(input, len, seed, + XXH3_accumulate_512, XXH3_scrambleAcc, XXH3_initCustomSecret); +} + + +typedef XXH64_hash_t (*XXH3_hashLong64_f)(const void* XXH_RESTRICT, size_t, + XXH64_hash_t, const xxh_u8* XXH_RESTRICT, size_t); + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_64bits_internal(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen, + XXH3_hashLong64_f f_hashLong) +{ + XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN); + /* + * If an action is to be taken if `secretLen` condition is not respected, + * it should be done here. + * For now, it's a contract pre-condition. + * Adding a check and a branch here would cost performance at every hash. + * Also, note that function signature doesn't offer room to return an error. + */ + if (len <= 16) + return XXH3_len_0to16_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64); + if (len <= 128) + return XXH3_len_17to128_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + if (len <= XXH3_MIDSIZE_MAX) + return XXH3_len_129to240_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + return f_hashLong(input, len, seed64, (const xxh_u8*)secret, secretLen); +} + + +/* === Public entry point === */ + +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(const void* input, size_t len) +{ + return XXH3_64bits_internal(input, len, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_default); +} + +XXH_PUBLIC_API XXH64_hash_t +XXH3_64bits_withSecret(const void* input, size_t len, const void* secret, size_t secretSize) +{ + return XXH3_64bits_internal(input, len, 0, secret, secretSize, XXH3_hashLong_64b_withSecret); +} + +XXH_PUBLIC_API XXH64_hash_t +XXH3_64bits_withSeed(const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_64bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed); +} + + +/* === XXH3 streaming === */ + +/* + * Malloc's a pointer that is always aligned to align. + * + * This must be freed with `XXH_alignedFree()`. + * + * malloc typically guarantees 16 byte alignment on 64-bit systems and 8 byte + * alignment on 32-bit. This isn't enough for the 32 byte aligned loads in AVX2 + * or on 32-bit, the 16 byte aligned loads in SSE2 and NEON. + * + * This underalignment previously caused a rather obvious crash which went + * completely unnoticed due to XXH3_createState() not actually being tested. + * Credit to RedSpah for noticing this bug. + * + * The alignment is done manually: Functions like posix_memalign or _mm_malloc + * are avoided: To maintain portability, we would have to write a fallback + * like this anyways, and besides, testing for the existence of library + * functions without relying on external build tools is impossible. + * + * The method is simple: Overallocate, manually align, and store the offset + * to the original behind the returned pointer. + * + * Align must be a power of 2 and 8 <= align <= 128. + */ +static void* XXH_alignedMalloc(size_t s, size_t align) +{ + XXH_ASSERT(align <= 128 && align >= 8); /* range check */ + XXH_ASSERT((align & (align-1)) == 0); /* power of 2 */ + XXH_ASSERT(s != 0 && s < (s + align)); /* empty/overflow */ + { /* Overallocate to make room for manual realignment and an offset byte */ + xxh_u8* base = (xxh_u8*)XXH_malloc(s + align); + if (base != NULL) { + /* + * Get the offset needed to align this pointer. + * + * Even if the returned pointer is aligned, there will always be + * at least one byte to store the offset to the original pointer. + */ + size_t offset = align - ((size_t)base & (align - 1)); /* base % align */ + /* Add the offset for the now-aligned pointer */ + xxh_u8* ptr = base + offset; + + XXH_ASSERT((size_t)ptr % align == 0); + + /* Store the offset immediately before the returned pointer. */ + ptr[-1] = (xxh_u8)offset; + return ptr; + } + return NULL; + } +} +/* + * Frees an aligned pointer allocated by XXH_alignedMalloc(). Don't pass + * normal malloc'd pointers, XXH_alignedMalloc has a specific data layout. + */ +static void XXH_alignedFree(void* p) +{ + if (p != NULL) { + xxh_u8* ptr = (xxh_u8*)p; + /* Get the offset byte we added in XXH_malloc. */ + xxh_u8 offset = ptr[-1]; + /* Free the original malloc'd pointer */ + xxh_u8* base = ptr - offset; + XXH_free(base); + } +} +XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void) +{ + XXH3_state_t* const state = (XXH3_state_t*)XXH_alignedMalloc(sizeof(XXH3_state_t), 64); + if (state==NULL) return NULL; + XXH3_INITSTATE(state); + return state; +} + +XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr) +{ + XXH_alignedFree(statePtr); + return XXH_OK; +} + +XXH_PUBLIC_API void +XXH3_copyState(XXH3_state_t* dst_state, const XXH3_state_t* src_state) +{ + memcpy(dst_state, src_state, sizeof(*dst_state)); +} + +static void +XXH3_64bits_reset_internal(XXH3_state_t* statePtr, + XXH64_hash_t seed, + const void* secret, size_t secretSize) +{ + size_t const initStart = offsetof(XXH3_state_t, bufferedSize); + size_t const initLength = offsetof(XXH3_state_t, nbStripesPerBlock) - initStart; + XXH_ASSERT(offsetof(XXH3_state_t, nbStripesPerBlock) > initStart); + XXH_ASSERT(statePtr != NULL); + /* set members from bufferedSize to nbStripesPerBlock (excluded) to 0 */ + memset((char*)statePtr + initStart, 0, initLength); + statePtr->acc[0] = XXH_PRIME32_3; + statePtr->acc[1] = XXH_PRIME64_1; + statePtr->acc[2] = XXH_PRIME64_2; + statePtr->acc[3] = XXH_PRIME64_3; + statePtr->acc[4] = XXH_PRIME64_4; + statePtr->acc[5] = XXH_PRIME32_2; + statePtr->acc[6] = XXH_PRIME64_5; + statePtr->acc[7] = XXH_PRIME32_1; + statePtr->seed = seed; + statePtr->extSecret = (const unsigned char*)secret; + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); + statePtr->secretLimit = secretSize - XXH_STRIPE_LEN; + statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE; +} + +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset(XXH3_state_t* statePtr) +{ + if (statePtr == NULL) return XXH_ERROR; + XXH3_64bits_reset_internal(statePtr, 0, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE); + return XXH_OK; +} + +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize) +{ + if (statePtr == NULL) return XXH_ERROR; + XXH3_64bits_reset_internal(statePtr, 0, secret, secretSize); + if (secret == NULL) return XXH_ERROR; + if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; + return XXH_OK; +} + +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed) +{ + if (statePtr == NULL) return XXH_ERROR; + if (seed==0) return XXH3_64bits_reset(statePtr); + if (seed != statePtr->seed) XXH3_initCustomSecret(statePtr->customSecret, seed); + XXH3_64bits_reset_internal(statePtr, seed, NULL, XXH_SECRET_DEFAULT_SIZE); + return XXH_OK; +} + +/* Note : when XXH3_consumeStripes() is invoked, + * there must be a guarantee that at least one more byte must be consumed from input + * so that the function can blindly consume all stripes using the "normal" secret segment */ +XXH_FORCE_INLINE void +XXH3_consumeStripes(xxh_u64* XXH_RESTRICT acc, + size_t* XXH_RESTRICT nbStripesSoFarPtr, size_t nbStripesPerBlock, + const xxh_u8* XXH_RESTRICT input, size_t nbStripes, + const xxh_u8* XXH_RESTRICT secret, size_t secretLimit, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + XXH_ASSERT(nbStripes <= nbStripesPerBlock); /* can handle max 1 scramble per invocation */ + XXH_ASSERT(*nbStripesSoFarPtr < nbStripesPerBlock); + if (nbStripesPerBlock - *nbStripesSoFarPtr <= nbStripes) { + /* need a scrambling operation */ + size_t const nbStripesToEndofBlock = nbStripesPerBlock - *nbStripesSoFarPtr; + size_t const nbStripesAfterBlock = nbStripes - nbStripesToEndofBlock; + XXH3_accumulate(acc, input, secret + nbStripesSoFarPtr[0] * XXH_SECRET_CONSUME_RATE, nbStripesToEndofBlock, f_acc512); + f_scramble(acc, secret + secretLimit); + XXH3_accumulate(acc, input + nbStripesToEndofBlock * XXH_STRIPE_LEN, secret, nbStripesAfterBlock, f_acc512); + *nbStripesSoFarPtr = nbStripesAfterBlock; + } else { + XXH3_accumulate(acc, input, secret + nbStripesSoFarPtr[0] * XXH_SECRET_CONSUME_RATE, nbStripes, f_acc512); + *nbStripesSoFarPtr += nbStripes; + } +} + +/* + * Both XXH3_64bits_update and XXH3_128bits_update use this routine. + */ +XXH_FORCE_INLINE XXH_errorcode +XXH3_update(XXH3_state_t* state, + const xxh_u8* input, size_t len, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + if (input==NULL) +#if defined(XXH_ACCEPT_NULL_INPUT_POINTER) && (XXH_ACCEPT_NULL_INPUT_POINTER>=1) + return XXH_OK; +#else + return XXH_ERROR; +#endif + + { const xxh_u8* const bEnd = input + len; + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; + + state->totalLen += len; + + if (state->bufferedSize + len <= XXH3_INTERNALBUFFER_SIZE) { /* fill in tmp buffer */ + XXH_memcpy(state->buffer + state->bufferedSize, input, len); + state->bufferedSize += (XXH32_hash_t)len; + return XXH_OK; + } + /* total input is now > XXH3_INTERNALBUFFER_SIZE */ + + #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN) + XXH_STATIC_ASSERT(XXH3_INTERNALBUFFER_SIZE % XXH_STRIPE_LEN == 0); /* clean multiple */ + + /* + * Internal buffer is partially filled (always, except at beginning) + * Complete it, then consume it. + */ + if (state->bufferedSize) { + size_t const loadSize = XXH3_INTERNALBUFFER_SIZE - state->bufferedSize; + XXH_memcpy(state->buffer + state->bufferedSize, input, loadSize); + input += loadSize; + XXH3_consumeStripes(state->acc, + &state->nbStripesSoFar, state->nbStripesPerBlock, + state->buffer, XXH3_INTERNALBUFFER_STRIPES, + secret, state->secretLimit, + f_acc512, f_scramble); + state->bufferedSize = 0; + } + XXH_ASSERT(input < bEnd); + + /* Consume input by a multiple of internal buffer size */ + if (input+XXH3_INTERNALBUFFER_SIZE < bEnd) { + const xxh_u8* const limit = bEnd - XXH3_INTERNALBUFFER_SIZE; + do { + XXH3_consumeStripes(state->acc, + &state->nbStripesSoFar, state->nbStripesPerBlock, + input, XXH3_INTERNALBUFFER_STRIPES, + secret, state->secretLimit, + f_acc512, f_scramble); + input += XXH3_INTERNALBUFFER_SIZE; + } while (inputbuffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN); + } + XXH_ASSERT(input < bEnd); + + /* Some remaining input (always) : buffer it */ + XXH_memcpy(state->buffer, input, (size_t)(bEnd-input)); + state->bufferedSize = (XXH32_hash_t)(bEnd-input); + } + + return XXH_OK; +} + +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_update(XXH3_state_t* state, const void* input, size_t len) +{ + return XXH3_update(state, (const xxh_u8*)input, len, + XXH3_accumulate_512, XXH3_scrambleAcc); +} + + +XXH_FORCE_INLINE void +XXH3_digest_long (XXH64_hash_t* acc, + const XXH3_state_t* state, + const unsigned char* secret) +{ + /* + * Digest on a local copy. This way, the state remains unaltered, and it can + * continue ingesting more input afterwards. + */ + memcpy(acc, state->acc, sizeof(state->acc)); + if (state->bufferedSize >= XXH_STRIPE_LEN) { + size_t const nbStripes = (state->bufferedSize - 1) / XXH_STRIPE_LEN; + size_t nbStripesSoFar = state->nbStripesSoFar; + XXH3_consumeStripes(acc, + &nbStripesSoFar, state->nbStripesPerBlock, + state->buffer, nbStripes, + secret, state->secretLimit, + XXH3_accumulate_512, XXH3_scrambleAcc); + /* last stripe */ + XXH3_accumulate_512(acc, + state->buffer + state->bufferedSize - XXH_STRIPE_LEN, + secret + state->secretLimit - XXH_SECRET_LASTACC_START); + } else { /* bufferedSize < XXH_STRIPE_LEN */ + xxh_u8 lastStripe[XXH_STRIPE_LEN]; + size_t const catchupSize = XXH_STRIPE_LEN - state->bufferedSize; + XXH_ASSERT(state->bufferedSize > 0); /* there is always some input buffered */ + memcpy(lastStripe, state->buffer + sizeof(state->buffer) - catchupSize, catchupSize); + memcpy(lastStripe + catchupSize, state->buffer, state->bufferedSize); + XXH3_accumulate_512(acc, + lastStripe, + secret + state->secretLimit - XXH_SECRET_LASTACC_START); + } +} + +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t* state) +{ + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; + if (state->totalLen > XXH3_MIDSIZE_MAX) { + XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB]; + XXH3_digest_long(acc, state, secret); + return XXH3_mergeAccs(acc, + secret + XXH_SECRET_MERGEACCS_START, + (xxh_u64)state->totalLen * XXH_PRIME64_1); + } + /* totalLen <= XXH3_MIDSIZE_MAX: digesting a short input */ + if (state->seed) + return XXH3_64bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed); + return XXH3_64bits_withSecret(state->buffer, (size_t)(state->totalLen), + secret, state->secretLimit + XXH_STRIPE_LEN); +} + + +#define XXH_MIN(x, y) (((x) > (y)) ? (y) : (x)) + +XXH_PUBLIC_API void +XXH3_generateSecret(void* secretBuffer, const void* customSeed, size_t customSeedSize) +{ + XXH_ASSERT(secretBuffer != NULL); + if (customSeedSize == 0) { + memcpy(secretBuffer, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE); + return; + } + XXH_ASSERT(customSeed != NULL); + + { size_t const segmentSize = sizeof(XXH128_hash_t); + size_t const nbSegments = XXH_SECRET_DEFAULT_SIZE / segmentSize; + XXH128_canonical_t scrambler; + XXH64_hash_t seeds[12]; + size_t segnb; + XXH_ASSERT(nbSegments == 12); + XXH_ASSERT(segmentSize * nbSegments == XXH_SECRET_DEFAULT_SIZE); /* exact multiple */ + XXH128_canonicalFromHash(&scrambler, XXH128(customSeed, customSeedSize, 0)); + + /* + * Copy customSeed to seeds[], truncating or repeating as necessary. + */ + { size_t toFill = XXH_MIN(customSeedSize, sizeof(seeds)); + size_t filled = toFill; + memcpy(seeds, customSeed, toFill); + while (filled < sizeof(seeds)) { + toFill = XXH_MIN(filled, sizeof(seeds) - filled); + memcpy((char*)seeds + filled, seeds, toFill); + filled += toFill; + } } + + /* generate secret */ + memcpy(secretBuffer, &scrambler, sizeof(scrambler)); + for (segnb=1; segnb < nbSegments; segnb++) { + size_t const segmentStart = segnb * segmentSize; + XXH128_canonical_t segment; + XXH128_canonicalFromHash(&segment, + XXH128(&scrambler, sizeof(scrambler), XXH_readLE64(seeds + segnb) + segnb) ); + memcpy((char*)secretBuffer + segmentStart, &segment, sizeof(segment)); + } } +} + + +/* ========================================== + * XXH3 128 bits (a.k.a XXH128) + * ========================================== + * XXH3's 128-bit variant has better mixing and strength than the 64-bit variant, + * even without counting the significantly larger output size. + * + * For example, extra steps are taken to avoid the seed-dependent collisions + * in 17-240 byte inputs (See XXH3_mix16B and XXH128_mix32B). + * + * This strength naturally comes at the cost of some speed, especially on short + * lengths. Note that longer hashes are about as fast as the 64-bit version + * due to it using only a slight modification of the 64-bit loop. + * + * XXH128 is also more oriented towards 64-bit machines. It is still extremely + * fast for a _128-bit_ hash on 32-bit (it usually clears XXH64). + */ + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_1to3_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + /* A doubled version of 1to3_64b with different constants. */ + XXH_ASSERT(input != NULL); + XXH_ASSERT(1 <= len && len <= 3); + XXH_ASSERT(secret != NULL); + /* + * len = 1: combinedl = { input[0], 0x01, input[0], input[0] } + * len = 2: combinedl = { input[1], 0x02, input[0], input[1] } + * len = 3: combinedl = { input[2], 0x03, input[0], input[1] } + */ + { xxh_u8 const c1 = input[0]; + xxh_u8 const c2 = input[len >> 1]; + xxh_u8 const c3 = input[len - 1]; + xxh_u32 const combinedl = ((xxh_u32)c1 <<16) | ((xxh_u32)c2 << 24) + | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8); + xxh_u32 const combinedh = XXH_rotl32(XXH_swap32(combinedl), 13); + xxh_u64 const bitflipl = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed; + xxh_u64 const bitfliph = (XXH_readLE32(secret+8) ^ XXH_readLE32(secret+12)) - seed; + xxh_u64 const keyed_lo = (xxh_u64)combinedl ^ bitflipl; + xxh_u64 const keyed_hi = (xxh_u64)combinedh ^ bitfliph; + XXH128_hash_t h128; + h128.low64 = XXH64_avalanche(keyed_lo); + h128.high64 = XXH64_avalanche(keyed_hi); + return h128; + } +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_4to8_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(4 <= len && len <= 8); + seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; + { xxh_u32 const input_lo = XXH_readLE32(input); + xxh_u32 const input_hi = XXH_readLE32(input + len - 4); + xxh_u64 const input_64 = input_lo + ((xxh_u64)input_hi << 32); + xxh_u64 const bitflip = (XXH_readLE64(secret+16) ^ XXH_readLE64(secret+24)) + seed; + xxh_u64 const keyed = input_64 ^ bitflip; + + /* Shift len to the left to ensure it is even, this avoids even multiplies. */ + XXH128_hash_t m128 = XXH_mult64to128(keyed, XXH_PRIME64_1 + (len << 2)); + + m128.high64 += (m128.low64 << 1); + m128.low64 ^= (m128.high64 >> 3); + + m128.low64 = XXH_xorshift64(m128.low64, 35); + m128.low64 *= 0x9FB21C651E98DF25ULL; + m128.low64 = XXH_xorshift64(m128.low64, 28); + m128.high64 = XXH3_avalanche(m128.high64); + return m128; + } +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_9to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(9 <= len && len <= 16); + { xxh_u64 const bitflipl = (XXH_readLE64(secret+32) ^ XXH_readLE64(secret+40)) - seed; + xxh_u64 const bitfliph = (XXH_readLE64(secret+48) ^ XXH_readLE64(secret+56)) + seed; + xxh_u64 const input_lo = XXH_readLE64(input); + xxh_u64 input_hi = XXH_readLE64(input + len - 8); + XXH128_hash_t m128 = XXH_mult64to128(input_lo ^ input_hi ^ bitflipl, XXH_PRIME64_1); + /* + * Put len in the middle of m128 to ensure that the length gets mixed to + * both the low and high bits in the 128x64 multiply below. + */ + m128.low64 += (xxh_u64)(len - 1) << 54; + input_hi ^= bitfliph; + /* + * Add the high 32 bits of input_hi to the high 32 bits of m128, then + * add the long product of the low 32 bits of input_hi and XXH_PRIME32_2 to + * the high 64 bits of m128. + * + * The best approach to this operation is different on 32-bit and 64-bit. + */ + if (sizeof(void *) < sizeof(xxh_u64)) { /* 32-bit */ + /* + * 32-bit optimized version, which is more readable. + * + * On 32-bit, it removes an ADC and delays a dependency between the two + * halves of m128.high64, but it generates an extra mask on 64-bit. + */ + m128.high64 += (input_hi & 0xFFFFFFFF00000000ULL) + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2); + } else { + /* + * 64-bit optimized (albeit more confusing) version. + * + * Uses some properties of addition and multiplication to remove the mask: + * + * Let: + * a = input_hi.lo = (input_hi & 0x00000000FFFFFFFF) + * b = input_hi.hi = (input_hi & 0xFFFFFFFF00000000) + * c = XXH_PRIME32_2 + * + * a + (b * c) + * Inverse Property: x + y - x == y + * a + (b * (1 + c - 1)) + * Distributive Property: x * (y + z) == (x * y) + (x * z) + * a + (b * 1) + (b * (c - 1)) + * Identity Property: x * 1 == x + * a + b + (b * (c - 1)) + * + * Substitute a, b, and c: + * input_hi.hi + input_hi.lo + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1)) + * + * Since input_hi.hi + input_hi.lo == input_hi, we get this: + * input_hi + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1)) + */ + m128.high64 += input_hi + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2 - 1); + } + /* m128 ^= XXH_swap64(m128 >> 64); */ + m128.low64 ^= XXH_swap64(m128.high64); + + { /* 128x64 multiply: h128 = m128 * XXH_PRIME64_2; */ + XXH128_hash_t h128 = XXH_mult64to128(m128.low64, XXH_PRIME64_2); + h128.high64 += m128.high64 * XXH_PRIME64_2; + + h128.low64 = XXH3_avalanche(h128.low64); + h128.high64 = XXH3_avalanche(h128.high64); + return h128; + } } +} + +/* + * Assumption: `secret` size is >= XXH3_SECRET_SIZE_MIN + */ +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_0to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(len <= 16); + { if (len > 8) return XXH3_len_9to16_128b(input, len, secret, seed); + if (len >= 4) return XXH3_len_4to8_128b(input, len, secret, seed); + if (len) return XXH3_len_1to3_128b(input, len, secret, seed); + { XXH128_hash_t h128; + xxh_u64 const bitflipl = XXH_readLE64(secret+64) ^ XXH_readLE64(secret+72); + xxh_u64 const bitfliph = XXH_readLE64(secret+80) ^ XXH_readLE64(secret+88); + h128.low64 = XXH64_avalanche(seed ^ bitflipl); + h128.high64 = XXH64_avalanche( seed ^ bitfliph); + return h128; + } } +} + +/* + * A bit slower than XXH3_mix16B, but handles multiply by zero better. + */ +XXH_FORCE_INLINE XXH128_hash_t +XXH128_mix32B(XXH128_hash_t acc, const xxh_u8* input_1, const xxh_u8* input_2, + const xxh_u8* secret, XXH64_hash_t seed) +{ + acc.low64 += XXH3_mix16B (input_1, secret+0, seed); + acc.low64 ^= XXH_readLE64(input_2) + XXH_readLE64(input_2 + 8); + acc.high64 += XXH3_mix16B (input_2, secret+16, seed); + acc.high64 ^= XXH_readLE64(input_1) + XXH_readLE64(input_1 + 8); + return acc; +} + + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(16 < len && len <= 128); + + { XXH128_hash_t acc; + acc.low64 = len * XXH_PRIME64_1; + acc.high64 = 0; + if (len > 32) { + if (len > 64) { + if (len > 96) { + acc = XXH128_mix32B(acc, input+48, input+len-64, secret+96, seed); + } + acc = XXH128_mix32B(acc, input+32, input+len-48, secret+64, seed); + } + acc = XXH128_mix32B(acc, input+16, input+len-32, secret+32, seed); + } + acc = XXH128_mix32B(acc, input, input+len-16, secret, seed); + { XXH128_hash_t h128; + h128.low64 = acc.low64 + acc.high64; + h128.high64 = (acc.low64 * XXH_PRIME64_1) + + (acc.high64 * XXH_PRIME64_4) + + ((len - seed) * XXH_PRIME64_2); + h128.low64 = XXH3_avalanche(h128.low64); + h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64); + return h128; + } + } +} + +XXH_NO_INLINE XXH128_hash_t +XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); + + { XXH128_hash_t acc; + int const nbRounds = (int)len / 32; + int i; + acc.low64 = len * XXH_PRIME64_1; + acc.high64 = 0; + for (i=0; i<4; i++) { + acc = XXH128_mix32B(acc, + input + (32 * i), + input + (32 * i) + 16, + secret + (32 * i), + seed); + } + acc.low64 = XXH3_avalanche(acc.low64); + acc.high64 = XXH3_avalanche(acc.high64); + XXH_ASSERT(nbRounds >= 4); + for (i=4 ; i < nbRounds; i++) { + acc = XXH128_mix32B(acc, + input + (32 * i), + input + (32 * i) + 16, + secret + XXH3_MIDSIZE_STARTOFFSET + (32 * (i - 4)), + seed); + } + /* last bytes */ + acc = XXH128_mix32B(acc, + input + len - 16, + input + len - 32, + secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16, + 0ULL - seed); + + { XXH128_hash_t h128; + h128.low64 = acc.low64 + acc.high64; + h128.high64 = (acc.low64 * XXH_PRIME64_1) + + (acc.high64 * XXH_PRIME64_4) + + ((len - seed) * XXH_PRIME64_2); + h128.low64 = XXH3_avalanche(h128.low64); + h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64); + return h128; + } + } +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_hashLong_128b_internal(const void* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC; + + XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, secret, secretSize, f_acc512, f_scramble); + + /* converge into final hash */ + XXH_STATIC_ASSERT(sizeof(acc) == 64); + XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); + { XXH128_hash_t h128; + h128.low64 = XXH3_mergeAccs(acc, + secret + XXH_SECRET_MERGEACCS_START, + (xxh_u64)len * XXH_PRIME64_1); + h128.high64 = XXH3_mergeAccs(acc, + secret + secretSize + - sizeof(acc) - XXH_SECRET_MERGEACCS_START, + ~((xxh_u64)len * XXH_PRIME64_2)); + return h128; + } +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH128_hash_t +XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + const void* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; (void)secret; (void)secretLen; + return XXH3_hashLong_128b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), + XXH3_accumulate_512, XXH3_scrambleAcc); +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH128_hash_t +XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + const void* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; + return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, secretLen, + XXH3_accumulate_512, XXH3_scrambleAcc); +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_hashLong_128b_withSeed_internal(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble, + XXH3_f_initCustomSecret f_initSec) +{ + if (seed64 == 0) + return XXH3_hashLong_128b_internal(input, len, + XXH3_kSecret, sizeof(XXH3_kSecret), + f_acc512, f_scramble); + { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE]; + f_initSec(secret, seed64); + return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, sizeof(secret), + f_acc512, f_scramble); + } +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH128_hash_t +XXH3_hashLong_128b_withSeed(const void* input, size_t len, + XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen) +{ + (void)secret; (void)secretLen; + return XXH3_hashLong_128b_withSeed_internal(input, len, seed64, + XXH3_accumulate_512, XXH3_scrambleAcc, XXH3_initCustomSecret); +} + +typedef XXH128_hash_t (*XXH3_hashLong128_f)(const void* XXH_RESTRICT, size_t, + XXH64_hash_t, const void* XXH_RESTRICT, size_t); + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_128bits_internal(const void* input, size_t len, + XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen, + XXH3_hashLong128_f f_hl128) +{ + XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN); + /* + * If an action is to be taken if `secret` conditions are not respected, + * it should be done here. + * For now, it's a contract pre-condition. + * Adding a check and a branch here would cost performance at every hash. + */ + if (len <= 16) + return XXH3_len_0to16_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64); + if (len <= 128) + return XXH3_len_17to128_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + if (len <= XXH3_MIDSIZE_MAX) + return XXH3_len_129to240_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + return f_hl128(input, len, seed64, secret, secretLen); +} + + +/* === Public XXH128 API === */ + +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(const void* input, size_t len) +{ + return XXH3_128bits_internal(input, len, 0, + XXH3_kSecret, sizeof(XXH3_kSecret), + XXH3_hashLong_128b_default); +} + +XXH_PUBLIC_API XXH128_hash_t +XXH3_128bits_withSecret(const void* input, size_t len, const void* secret, size_t secretSize) +{ + return XXH3_128bits_internal(input, len, 0, + (const xxh_u8*)secret, secretSize, + XXH3_hashLong_128b_withSecret); +} + +XXH_PUBLIC_API XXH128_hash_t +XXH3_128bits_withSeed(const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_128bits_internal(input, len, seed, + XXH3_kSecret, sizeof(XXH3_kSecret), + XXH3_hashLong_128b_withSeed); +} + +XXH_PUBLIC_API XXH128_hash_t +XXH128(const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_128bits_withSeed(input, len, seed); +} + + +/* === XXH3 128-bit streaming === */ + +/* + * All the functions are actually the same as for 64-bit streaming variant. + * The only difference is the finalizatiom routine. + */ + +static void +XXH3_128bits_reset_internal(XXH3_state_t* statePtr, + XXH64_hash_t seed, + const void* secret, size_t secretSize) +{ + XXH3_64bits_reset_internal(statePtr, seed, secret, secretSize); +} + +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset(XXH3_state_t* statePtr) +{ + if (statePtr == NULL) return XXH_ERROR; + XXH3_128bits_reset_internal(statePtr, 0, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE); + return XXH_OK; +} + +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize) +{ + if (statePtr == NULL) return XXH_ERROR; + XXH3_128bits_reset_internal(statePtr, 0, secret, secretSize); + if (secret == NULL) return XXH_ERROR; + if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; + return XXH_OK; +} + +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed) +{ + if (statePtr == NULL) return XXH_ERROR; + if (seed==0) return XXH3_128bits_reset(statePtr); + if (seed != statePtr->seed) XXH3_initCustomSecret(statePtr->customSecret, seed); + XXH3_128bits_reset_internal(statePtr, seed, NULL, XXH_SECRET_DEFAULT_SIZE); + return XXH_OK; +} + +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_update(XXH3_state_t* state, const void* input, size_t len) +{ + return XXH3_update(state, (const xxh_u8*)input, len, + XXH3_accumulate_512, XXH3_scrambleAcc); +} + +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t* state) +{ + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; + if (state->totalLen > XXH3_MIDSIZE_MAX) { + XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB]; + XXH3_digest_long(acc, state, secret); + XXH_ASSERT(state->secretLimit + XXH_STRIPE_LEN >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); + { XXH128_hash_t h128; + h128.low64 = XXH3_mergeAccs(acc, + secret + XXH_SECRET_MERGEACCS_START, + (xxh_u64)state->totalLen * XXH_PRIME64_1); + h128.high64 = XXH3_mergeAccs(acc, + secret + state->secretLimit + XXH_STRIPE_LEN + - sizeof(acc) - XXH_SECRET_MERGEACCS_START, + ~((xxh_u64)state->totalLen * XXH_PRIME64_2)); + return h128; + } + } + /* len <= XXH3_MIDSIZE_MAX : short code */ + if (state->seed) + return XXH3_128bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed); + return XXH3_128bits_withSecret(state->buffer, (size_t)(state->totalLen), + secret, state->secretLimit + XXH_STRIPE_LEN); +} + +/* 128-bit utility functions */ + +#include /* memcmp, memcpy */ + +/* return : 1 is equal, 0 if different */ +XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2) +{ + /* note : XXH128_hash_t is compact, it has no padding byte */ + return !(memcmp(&h1, &h2, sizeof(h1))); +} + +/* This prototype is compatible with stdlib's qsort(). + * return : >0 if *h128_1 > *h128_2 + * <0 if *h128_1 < *h128_2 + * =0 if *h128_1 == *h128_2 */ +XXH_PUBLIC_API int XXH128_cmp(const void* h128_1, const void* h128_2) +{ + XXH128_hash_t const h1 = *(const XXH128_hash_t*)h128_1; + XXH128_hash_t const h2 = *(const XXH128_hash_t*)h128_2; + int const hcmp = (h1.high64 > h2.high64) - (h2.high64 > h1.high64); + /* note : bets that, in most cases, hash values are different */ + if (hcmp) return hcmp; + return (h1.low64 > h2.low64) - (h2.low64 > h1.low64); +} + + +/*====== Canonical representation ======*/ +XXH_PUBLIC_API void +XXH128_canonicalFromHash(XXH128_canonical_t* dst, XXH128_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH128_canonical_t) == sizeof(XXH128_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) { + hash.high64 = XXH_swap64(hash.high64); + hash.low64 = XXH_swap64(hash.low64); + } + memcpy(dst, &hash.high64, sizeof(hash.high64)); + memcpy((char*)dst + sizeof(hash.high64), &hash.low64, sizeof(hash.low64)); +} + +XXH_PUBLIC_API XXH128_hash_t +XXH128_hashFromCanonical(const XXH128_canonical_t* src) +{ + XXH128_hash_t h; + h.high64 = XXH_readBE64(src); + h.low64 = XXH_readBE64(src->digest + 8); + return h; +} + +/* Pop our optimization override from above */ +#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \ + && defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \ + && defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__) /* respect -O0 and -Os */ +# pragma GCC pop_options +#endif + +#endif /* XXH_NO_LONG_LONG */ + + +#endif /* XXH_IMPLEMENTATION */ + + +#if defined (__cplusplus) +} +#endif diff --git a/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs b/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs new file mode 100644 index 00000000..3c99f584 --- /dev/null +++ b/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs @@ -0,0 +1,33 @@ +{-# LANGUAGE OverloadedStrings #-} +module Data.Digest.Test.XXHashSpec where + +import Data.ByteArray (convert) +import Data.ByteString.Lazy (toStrict) +import Test.Hspec + +import Data.ByteArray.HexString (HexString) +import Data.Digest.XXHash (xxhash) + +spec :: Spec +spec = parallel $ do + describe "Variable lenght Twox" $ do + it "64-bit output (Twox64)" $ do + let hash = convert (toStrict $ xxhash 32 "abc") :: HexString + hash `shouldBe` "0x990977adf52cbc44" + + let hash' = convert (toStrict $ xxhash 64 "abc") :: HexString + hash' `shouldBe` "0x990977adf52cbc44" + + it "128-bit output (Twox128)" $ do + let hash = convert (toStrict $ xxhash 65 "abc") :: HexString + hash `shouldBe` "0x990977adf52cbc440889329981caa9be" + + let hash' = convert (toStrict $ xxhash 128 "abc") :: HexString + hash' `shouldBe` "0x990977adf52cbc440889329981caa9be" + + it "256-bit output (Twox256)" $ do + let hash = convert (toStrict $ xxhash 255 "abc") :: HexString + hash `shouldBe` "0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b" + + let hash' = convert (toStrict $ xxhash 256 "abc") :: HexString + hash' `shouldBe` "0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b" From 810dcaaf45babfedabb595dd24b133a534d4ae6c Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 14 Jan 2021 03:31:43 +0300 Subject: [PATCH 175/237] Added Blake2 wrappers --- packages/crypto/src/Data/Digest/Blake2.hs | 41 +++++++++++++++++++ .../tests/Data/Digest/Test/Blake2Spec.hs | 28 +++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 packages/crypto/src/Data/Digest/Blake2.hs create mode 100644 packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs diff --git a/packages/crypto/src/Data/Digest/Blake2.hs b/packages/crypto/src/Data/Digest/Blake2.hs new file mode 100644 index 00000000..7c2de77f --- /dev/null +++ b/packages/crypto/src/Data/Digest/Blake2.hs @@ -0,0 +1,41 @@ +{-# LANGUAGE DataKinds #-} + +-- | +-- Module : Data.Digest.Blake2 +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Cryptonite Blake2b wrappers. +-- + +module Data.Digest.Blake2 where + +import Crypto.Hash (Blake2b, Digest, hash) +import Data.ByteArray (convert) +import Data.ByteString (ByteString) +import Data.ByteString.Lazy (fromStrict) +import qualified Data.ByteString.Lazy as LBS (ByteString) + +-- | Blake2b with 64 bit output. +blake2_64 :: ByteString -> LBS.ByteString +{-# INLINE blake2_64 #-} +blake2_64 = fromStrict . convert . (hash :: ByteString -> Digest (Blake2b 64)) + +-- | Blake2b with 128 bit output. +blake2_128 :: ByteString -> LBS.ByteString +{-# INLINE blake2_128 #-} +blake2_128 = fromStrict . convert . (hash :: ByteString -> Digest (Blake2b 128)) + +-- | Blake2b with 256 bit output. +blake2_256 :: ByteString -> LBS.ByteString +{-# INLINE blake2_256 #-} +blake2_256 = fromStrict . convert . (hash :: ByteString -> Digest (Blake2b 256)) + +-- | Blake2b with 512 bit output. +blake2_512 :: ByteString -> LBS.ByteString +{-# INLINE blake2_512 #-} +blake2_512 = fromStrict . convert . (hash :: ByteString -> Digest (Blake2b 512)) diff --git a/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs b/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs new file mode 100644 index 00000000..e508c3cf --- /dev/null +++ b/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE OverloadedStrings #-} +module Data.Digest.Test.Blake2Spec where + +import Data.ByteArray (convert) +import Data.ByteArray.HexString (HexString) +import Data.ByteString.Lazy (toStrict) +import Test.Hspec + +import Data.Digest.Blake2 + +spec :: Spec +spec = parallel $ do + describe "Variable lenght Blake2" $ do + it "64-bit output (Blake2b 64)" $ + let hash = convert (toStrict $ blake2_64 "abc") :: HexString + in hash `shouldBe` "0xd8bb14d833d59559" + + it "128-bit output (Blake2b 128)" $ + let hash = convert (toStrict $ blake2_128 "abc") :: HexString + in hash `shouldBe` "0xcf4ab791c62b8d2b2109c90275287816" + + it "256-bit output (Blake2b 256)" $ + let hash = convert (toStrict $ blake2_256 "abc") :: HexString + in hash `shouldBe` "0xbddd813c634239723171ef3fee98579b94964e3bb1cb3e427262c8c068d52319" + + it "512-bit output (Blake2b 512)" $ + let hash = convert (toStrict $ blake2_512 "abc") :: HexString + in hash `shouldBe` "0xba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d17d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923" From ca1fd16d2db65e162d7d6e8c3632aca7be3f7516 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 14 Jan 2021 04:30:09 +0300 Subject: [PATCH 176/237] Drop overhead laziness --- packages/crypto/src/Data/Digest/Blake2.hs | 24 +++++++++---------- packages/crypto/src/Data/Digest/XXHash.hsc | 6 ++--- .../tests/Data/Digest/Test/Blake2Spec.hs | 9 ++++--- .../tests/Data/Digest/Test/XXHashSpec.hs | 13 +++++----- 4 files changed, 24 insertions(+), 28 deletions(-) diff --git a/packages/crypto/src/Data/Digest/Blake2.hs b/packages/crypto/src/Data/Digest/Blake2.hs index 7c2de77f..89701670 100644 --- a/packages/crypto/src/Data/Digest/Blake2.hs +++ b/packages/crypto/src/Data/Digest/Blake2.hs @@ -14,28 +14,26 @@ module Data.Digest.Blake2 where -import Crypto.Hash (Blake2b, Digest, hash) -import Data.ByteArray (convert) -import Data.ByteString (ByteString) -import Data.ByteString.Lazy (fromStrict) -import qualified Data.ByteString.Lazy as LBS (ByteString) +import Crypto.Hash (Blake2b, Digest, hash) +import Data.ByteArray (convert) +import Data.ByteString (ByteString) -- | Blake2b with 64 bit output. -blake2_64 :: ByteString -> LBS.ByteString +blake2_64 :: ByteString -> ByteString {-# INLINE blake2_64 #-} -blake2_64 = fromStrict . convert . (hash :: ByteString -> Digest (Blake2b 64)) +blake2_64 = convert . (hash :: ByteString -> Digest (Blake2b 64)) -- | Blake2b with 128 bit output. -blake2_128 :: ByteString -> LBS.ByteString +blake2_128 :: ByteString -> ByteString {-# INLINE blake2_128 #-} -blake2_128 = fromStrict . convert . (hash :: ByteString -> Digest (Blake2b 128)) +blake2_128 = convert . (hash :: ByteString -> Digest (Blake2b 128)) -- | Blake2b with 256 bit output. -blake2_256 :: ByteString -> LBS.ByteString +blake2_256 :: ByteString -> ByteString {-# INLINE blake2_256 #-} -blake2_256 = fromStrict . convert . (hash :: ByteString -> Digest (Blake2b 256)) +blake2_256 = convert . (hash :: ByteString -> Digest (Blake2b 256)) -- | Blake2b with 512 bit output. -blake2_512 :: ByteString -> LBS.ByteString +blake2_512 :: ByteString -> ByteString {-# INLINE blake2_512 #-} -blake2_512 = fromStrict . convert . (hash :: ByteString -> Digest (Blake2b 512)) +blake2_512 = convert . (hash :: ByteString -> Digest (Blake2b 512)) diff --git a/packages/crypto/src/Data/Digest/XXHash.hsc b/packages/crypto/src/Data/Digest/XXHash.hsc index f43dcd4f..68d3bd1c 100644 --- a/packages/crypto/src/Data/Digest/XXHash.hsc +++ b/packages/crypto/src/Data/Digest/XXHash.hsc @@ -20,7 +20,7 @@ module Data.Digest.XXHash (xxhash) where import Data.ByteString (ByteString, useAsCStringLen) import Data.ByteString.Builder (toLazyByteString, word64LE) -import qualified Data.ByteString.Lazy as LBS (ByteString) +import Data.ByteString.Lazy (toStrict) import Foreign import Foreign.C.String import Foreign.C.Types @@ -41,9 +41,9 @@ xxhash :: Integral bitLength -- ^ Bit lenght of output, will be ceiling to 64 bit. -> ByteString -- ^ Input data. - -> LBS.ByteString + -> ByteString -- ^ Output hash. -xxhash bitLength input = toLazyByteString $ mconcat +xxhash bitLength input = toStrict . toLazyByteString $ mconcat [ word64LE (xxhash_64 seed input) | seed <- [0 .. (iterations - 1)]] where iterations = ceiling (fromIntegral bitLength / 64) diff --git a/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs b/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs index e508c3cf..d9aff599 100644 --- a/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs +++ b/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs @@ -3,7 +3,6 @@ module Data.Digest.Test.Blake2Spec where import Data.ByteArray (convert) import Data.ByteArray.HexString (HexString) -import Data.ByteString.Lazy (toStrict) import Test.Hspec import Data.Digest.Blake2 @@ -12,17 +11,17 @@ spec :: Spec spec = parallel $ do describe "Variable lenght Blake2" $ do it "64-bit output (Blake2b 64)" $ - let hash = convert (toStrict $ blake2_64 "abc") :: HexString + let hash = convert (blake2_64 "abc") :: HexString in hash `shouldBe` "0xd8bb14d833d59559" it "128-bit output (Blake2b 128)" $ - let hash = convert (toStrict $ blake2_128 "abc") :: HexString + let hash = convert (blake2_128 "abc") :: HexString in hash `shouldBe` "0xcf4ab791c62b8d2b2109c90275287816" it "256-bit output (Blake2b 256)" $ - let hash = convert (toStrict $ blake2_256 "abc") :: HexString + let hash = convert (blake2_256 "abc") :: HexString in hash `shouldBe` "0xbddd813c634239723171ef3fee98579b94964e3bb1cb3e427262c8c068d52319" it "512-bit output (Blake2b 512)" $ - let hash = convert (toStrict $ blake2_512 "abc") :: HexString + let hash = convert (blake2_512 "abc") :: HexString in hash `shouldBe` "0xba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d17d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923" diff --git a/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs b/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs index 3c99f584..121425ce 100644 --- a/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs +++ b/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs @@ -2,7 +2,6 @@ module Data.Digest.Test.XXHashSpec where import Data.ByteArray (convert) -import Data.ByteString.Lazy (toStrict) import Test.Hspec import Data.ByteArray.HexString (HexString) @@ -12,22 +11,22 @@ spec :: Spec spec = parallel $ do describe "Variable lenght Twox" $ do it "64-bit output (Twox64)" $ do - let hash = convert (toStrict $ xxhash 32 "abc") :: HexString + let hash = convert (xxhash 32 "abc") :: HexString hash `shouldBe` "0x990977adf52cbc44" - let hash' = convert (toStrict $ xxhash 64 "abc") :: HexString + let hash' = convert (xxhash 64 "abc") :: HexString hash' `shouldBe` "0x990977adf52cbc44" it "128-bit output (Twox128)" $ do - let hash = convert (toStrict $ xxhash 65 "abc") :: HexString + let hash = convert (xxhash 65 "abc") :: HexString hash `shouldBe` "0x990977adf52cbc440889329981caa9be" - let hash' = convert (toStrict $ xxhash 128 "abc") :: HexString + let hash' = convert (xxhash 128 "abc") :: HexString hash' `shouldBe` "0x990977adf52cbc440889329981caa9be" it "256-bit output (Twox256)" $ do - let hash = convert (toStrict $ xxhash 255 "abc") :: HexString + let hash = convert (xxhash 255 "abc") :: HexString hash `shouldBe` "0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b" - let hash' = convert (toStrict $ xxhash 256 "abc") :: HexString + let hash' = convert (xxhash 256 "abc") :: HexString hash' `shouldBe` "0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b" From 1c3f22ab1ae01d8582d9847491d1ef00f3556076 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 14 Jan 2021 06:08:28 +0300 Subject: [PATCH 177/237] Added polkadot storage query --- packages/polkadot/package.yaml | 3 + packages/polkadot/src/Network/Polkadot.hs | 11 ++- .../src/Network/Polkadot/Metadata/Type.hs | 2 - .../polkadot/src/Network/Polkadot/Query.hs | 38 +++++++++ .../polkadot/src/Network/Polkadot/Storage.hs | 60 +++++++++++++++ .../src/Network/Polkadot/Storage/Key.hs | 77 +++++++++++++++++++ 6 files changed, 187 insertions(+), 4 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Query.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Storage.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Storage/Key.hs diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 897c4702..7b0ffdb3 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -16,13 +16,16 @@ dependencies: - text >1.2 && <1.3 - aeson >1.2 && <1.5 - parsec >3.0 && <3.2 +- memory >0.14 && <0.16 - microlens >0.4 && <0.5 - containers >0.6 && <0.7 - bytestring >0.10 && <0.11 +- animalcase >0.1 && <0.2 - generics-sop >0.3 && <0.6 - microlens-th >0.4 && <0.5 - microlens-mtl >0.2 && <0.3 - web3-scale >=1.0 && <1.1 +- web3-crypto >=1.0 && <1.1 - web3-jsonrpc >=1.0 && <1.1 - web3-hexstring >=1.0 && <1.1 diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs index b2b18e48..a88c7585 100644 --- a/packages/polkadot/src/Network/Polkadot.hs +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -11,5 +11,12 @@ -- module Network.Polkadot - ( - ) where + ( + query + , Argument(..) + , module Codec.Scale + ) where + +import Codec.Scale +import Network.Polkadot.Query (query) +import Network.Polkadot.Storage.Key (Argument (..)) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs index d83f1b9c..e28c249f 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE TemplateHaskell #-} - -- | -- Module : Network.Polkadot.Metadata.Type -- Copyright : Aleksandr Krupenkin 2016-2020 diff --git a/packages/polkadot/src/Network/Polkadot/Query.hs b/packages/polkadot/src/Network/Polkadot/Query.hs new file mode 100644 index 00000000..0821fd27 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Query.hs @@ -0,0 +1,38 @@ +-- | +-- Module : Network.Polkadot.Query +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Query storage for internal data. +-- + +module Network.Polkadot.Query where + +import Codec.Scale (Decode, decode) +import Data.Text (Text) +import Network.JsonRpc.TinyClient (JsonRpc) + +import Network.Polkadot.Metadata (Metadata (Metadata), + MetadataVersioned (V12), + metadataTypes) +import Network.Polkadot.Rpc.State (getMetadata, getStorage) +import Network.Polkadot.Storage (Storage, fromMetadata, getPrefix) +import Network.Polkadot.Storage.Key (Argument) + +storage :: JsonRpc m => m (Either String Storage) +storage = (fmap go . decode) <$> getMetadata + where + go raw = let (Metadata _ (V12 meta), _) = metadataTypes raw in fromMetadata meta + +query :: (JsonRpc m, Decode a) => Text -> Text -> [Argument] -> m (Either String a) +query section method args = do + mbstore <- storage + case mbstore of + Right store -> case getPrefix store section method args of + Nothing -> return (Left "Unable to find given section/method or wrong argument count") + Just prefix -> decode <$> getStorage prefix Nothing + Left err -> return (Left err) diff --git a/packages/polkadot/src/Network/Polkadot/Storage.hs b/packages/polkadot/src/Network/Polkadot/Storage.hs new file mode 100644 index 00000000..229f2528 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Storage.hs @@ -0,0 +1,60 @@ +{-# LANGUAGE RecordWildCards #-} + +-- | +-- Module : Network.Polkadot.Storage +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- . +-- + +module Network.Polkadot.Storage where + +import Control.Arrow ((&&&)) +import Data.ByteArray (convert) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) +import Data.Map.Strict (Map) +import qualified Data.Map.Strict as Map (fromList, lookup) +import Data.Maybe (mapMaybe) +import Data.Text (Text) +import qualified Data.Text as T (cons, head, tail) +import Text.AnimalCase (toCamelCase) + +import Network.Polkadot.Metadata.V11 (StorageEntryMetadata (..), + StorageMetadata (..)) +import Network.Polkadot.Metadata.V12 (Metadata (modules), + ModuleMetadata (..)) +import Network.Polkadot.Storage.Key (Argument, StorageEntry (..), + newEntry) + +type Storage = Map Text ModuleStorage +type ModuleStorage = Map Text StorageEntry + +fromMetadata :: Metadata -> Storage +fromMetadata = Map.fromList . mapMaybe go . modules + where + toLowerFirst = uncurry T.cons . (toLower . T.head &&& T.tail) + go ModuleMetadata{..} = do + StorageMetadata prefix items <- moduleStorage + let section = toCamelCase moduleName + toEntry meta@StorageEntryMetadata{..} = + (toLowerFirst entryName, newEntry prefix meta entryName) + return (toLowerFirst section, Map.fromList $ fmap toEntry items) + +getPrefix :: Storage -> Text -> Text -> [Argument] -> Maybe HexString +getPrefix store section method args = convert <$> do + entries <- Map.lookup section store + entry <- Map.lookup method entries + case entry of + PlainEntry x -> Just x + MapEntry f -> case args of + [a] -> Just (f a) + _ -> Nothing + DoubleMapEntry f -> case args of + [a, b] -> Just (f a b) + _ -> Nothing diff --git a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs new file mode 100644 index 00000000..6b0070ee --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs @@ -0,0 +1,77 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE RecordWildCards #-} + +-- | +-- Module : Network.Polkadot.Storage.Key +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- A representation of a storage key (typically hashed) in the system. It can be +-- constructed by passing in a raw key or a StorageEntry with (optional) arguments. +-- + +module Network.Polkadot.Storage.Key where + +import Codec.Scale (encode) +import Codec.Scale.Class (Encode (..)) +import Control.Arrow ((&&&)) +import Data.ByteString (ByteString) +import Data.Digest.Blake2 (blake2_128, blake2_256) +import Data.Digest.XXHash (xxhash) +import Data.Text (Text) +import Data.Text.Encoding (encodeUtf8) + +import Network.Polkadot.Metadata.V11 (DoubleMapType (..), + MapType (..), + StorageEntryMetadata (..), + StorageEntryType (..), + StorageHasher (..)) + +-- | Hasher is a function that hash given argument. +type Hasher a = a -> ByteString + +-- | General type wrapper for SCALE encodable data type. +data Argument where + Argument :: Encode a => a -> Argument + -- ^ Wrapped type should be encodable. + +instance Encode Argument where + put arg = case arg of Argument a -> put a + +-- | Entry type describe storage prefix for different storage entity types. +data StorageEntry where + PlainEntry :: ByteString -> StorageEntry + -- ^ Simple storage type without arguments. + MapEntry :: (Argument -> ByteString) -> StorageEntry + -- ^ Mapping with hashing for arguments. + DoubleMapEntry :: (Argument -> Argument -> ByteString) -> StorageEntry + -- ^ Double map with two different hashers. + +instance Show StorageEntry where + show (PlainEntry _) = "PlainEntry" + show (MapEntry _) = "MapEntry" + show (DoubleMapEntry _) = "DoubleMapEntry" + +newEntry :: Text -> StorageEntryMetadata -> Text -> StorageEntry +newEntry prefix meta method = case entryType meta of + Plain _ -> PlainEntry plainKey + Map MapType{..} -> MapEntry $ mapCodec (getHasher mapHasher) + DoubleMap DoubleMapType{..} -> + DoubleMapEntry $ dMapCodec (getHasher doubleMapHasher) (getHasher doubleMapKey2Hasher) + where + plainKey = xxhash 128 (encodeUtf8 prefix) <> xxhash 128 (encodeUtf8 method) + mapCodec hasher arg = plainKey <> hasher arg + dMapCodec hasher1 hasher2 arg1 arg2 = plainKey <> hasher1 arg1 <> hasher2 arg2 + +getHasher :: Encode a => StorageHasher -> Hasher a +getHasher Blake2_128 = blake2_128 . encode +getHasher Blake2_256 = blake2_256 . encode +getHasher Blake2_128Concat = uncurry (<>) . (blake2_128 &&& id) . encode +getHasher Twox128 = xxhash 128 . encode +getHasher Twox256 = xxhash 256 . encode +getHasher Twox64Concat = uncurry (<>) . (xxhash 64 &&& id) . encode +getHasher Identity = encode From 0bc0510938d919278dc728ae4da4a22936a4c1c9 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 14 Jan 2021 06:32:56 +0300 Subject: [PATCH 178/237] Added polkadot storage unit test --- .../polkadot/src/Network/Polkadot/Metadata.hs | 4 +++ .../src/Network/Polkadot/Metadata/Type.hs | 2 +- .../polkadot/src/Network/Polkadot/Query.hs | 17 +++++------ .../Network/Polkadot/Test/StorageSpec.hs | 30 +++++++++++++++++++ 4 files changed, 43 insertions(+), 10 deletions(-) create mode 100644 packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs diff --git a/packages/polkadot/src/Network/Polkadot/Metadata.hs b/packages/polkadot/src/Network/Polkadot/Metadata.hs index 4c810886..07b538b5 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata.hs @@ -78,6 +78,10 @@ isV12 _ = False isLatest :: Metadata -> Bool isLatest = isV12 +toLatest :: Metadata -> V12.Metadata +toLatest (Metadata _ (V12 m)) = m +toLatest _ = undefined + metadataTypes :: Metadata -> (Metadata, Set Type) metadataTypes (Metadata _ (V9 (V9.Metadata modules))) = let (modules', types) = runDiscovery V9.moduleName modules diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs index e28c249f..eb2f75c6 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs @@ -22,7 +22,7 @@ import Data.Text (Text) import Network.Polkadot.Metadata.Type.Parser (sanitizeM) --- | Contains information about type structure and it's representation. +-- | Sanitized name for metadata type. newtype Type = Type { unType :: Text } deriving (Eq, Ord, Show) diff --git a/packages/polkadot/src/Network/Polkadot/Query.hs b/packages/polkadot/src/Network/Polkadot/Query.hs index 0821fd27..ea8acb80 100644 --- a/packages/polkadot/src/Network/Polkadot/Query.hs +++ b/packages/polkadot/src/Network/Polkadot/Query.hs @@ -18,7 +18,7 @@ import Network.JsonRpc.TinyClient (JsonRpc) import Network.Polkadot.Metadata (Metadata (Metadata), MetadataVersioned (V12), - metadataTypes) + metadataTypes, toLatest) import Network.Polkadot.Rpc.State (getMetadata, getStorage) import Network.Polkadot.Storage (Storage, fromMetadata, getPrefix) import Network.Polkadot.Storage.Key (Argument) @@ -26,13 +26,12 @@ import Network.Polkadot.Storage.Key (Argument) storage :: JsonRpc m => m (Either String Storage) storage = (fmap go . decode) <$> getMetadata where - go raw = let (Metadata _ (V12 meta), _) = metadataTypes raw in fromMetadata meta + go raw = let (meta, _) = metadataTypes raw in fromMetadata (toLatest meta) query :: (JsonRpc m, Decode a) => Text -> Text -> [Argument] -> m (Either String a) -query section method args = do - mbstore <- storage - case mbstore of - Right store -> case getPrefix store section method args of - Nothing -> return (Left "Unable to find given section/method or wrong argument count") - Just prefix -> decode <$> getStorage prefix Nothing - Left err -> return (Left err) +query section method args = go =<< storage + where + go (Right store) = case getPrefix store section method args of + Nothing -> return (Left "Unable to find given section/method or wrong argument count") + Just prefix -> decode <$> getStorage prefix Nothing + go (Left err) = return (Left err) diff --git a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs new file mode 100644 index 00000000..8d5d65d7 --- /dev/null +++ b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs @@ -0,0 +1,30 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} + +-- | +-- Module : Codec.Scale.Test.StorageSpec +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- + +module Network.Polkadot.Test.StorageSpec where + +import Codec.Scale (decode) +import Data.ByteArray.HexString (hexFrom) +import Test.Hspec + +import Network.Polkadot.Metadata (Metadata, metadataTypes, toLatest) +import Network.Polkadot.Storage (fromMetadata) + +spec :: Spec +spec = parallel $ do + describe "Metadata Storage" $ do + it "succeeds decode from hex and parse storage entries" $ do + let (Right hex) = decode [hexFrom|tests/meta/v12.hex|] :: Either String Metadata + (meta, _) = metadataTypes hex + show (fromMetadata (toLatest meta)) `shouldBe` "fromList [(\"assets\",fromList [(\"account\",DoubleMapEntry),(\"asset\",MapEntry)]),(\"authorship\",fromList [(\"author\",PlainEntry),(\"didSetUncles\",PlainEntry),(\"uncles\",PlainEntry)]),(\"babe\",fromList [(\"authorVrfRandomness\",PlainEntry),(\"authorities\",PlainEntry),(\"currentSlot\",PlainEntry),(\"epochIndex\",PlainEntry),(\"genesisSlot\",PlainEntry),(\"initialized\",PlainEntry),(\"lateness\",PlainEntry),(\"nextEpochConfig\",PlainEntry),(\"nextRandomness\",PlainEntry),(\"randomness\",PlainEntry),(\"segmentIndex\",PlainEntry),(\"underConstruction\",MapEntry)]),(\"balances\",fromList [(\"account\",MapEntry),(\"locks\",MapEntry),(\"storageVersion\",PlainEntry),(\"totalIssuance\",PlainEntry)]),(\"bounties\",fromList [(\"bounties\",MapEntry),(\"bountyApprovals\",PlainEntry),(\"bountyCount\",PlainEntry),(\"bountyDescriptions\",MapEntry)]),(\"contracts\",fromList [(\"accountCounter\",PlainEntry),(\"codeStorage\",MapEntry),(\"contractInfoOf\",MapEntry),(\"currentSchedule\",PlainEntry),(\"pristineCode\",MapEntry)]),(\"council\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposalOf\",MapEntry),(\"proposals\",PlainEntry),(\"voting\",MapEntry)]),(\"democracy\",fromList [(\"blacklist\",MapEntry),(\"cancellations\",MapEntry),(\"depositOf\",MapEntry),(\"lastTabledWasExternal\",PlainEntry),(\"locks\",MapEntry),(\"lowestUnbaked\",PlainEntry),(\"nextExternal\",PlainEntry),(\"preimages\",MapEntry),(\"publicPropCount\",PlainEntry),(\"publicProps\",PlainEntry),(\"referendumCount\",PlainEntry),(\"referendumInfoOf\",MapEntry),(\"storageVersion\",PlainEntry),(\"votingOf\",MapEntry)]),(\"elections\",fromList [(\"candidates\",PlainEntry),(\"electionRounds\",PlainEntry),(\"members\",PlainEntry),(\"runnersUp\",PlainEntry),(\"voting\",MapEntry)]),(\"grandpa\",fromList [(\"currentSetId\",PlainEntry),(\"nextForced\",PlainEntry),(\"pendingChange\",PlainEntry),(\"setIdSession\",MapEntry),(\"stalled\",PlainEntry),(\"state\",PlainEntry)]),(\"identity\",fromList [(\"identityOf\",MapEntry),(\"registrars\",PlainEntry),(\"subsOf\",MapEntry),(\"superOf\",MapEntry)]),(\"imOnline\",fromList [(\"authoredBlocks\",DoubleMapEntry),(\"heartbeatAfter\",PlainEntry),(\"keys\",PlainEntry),(\"receivedHeartbeats\",DoubleMapEntry)]),(\"indices\",fromList [(\"accounts\",MapEntry)]),(\"mmr\",fromList [(\"nodes\",MapEntry),(\"numberOfLeaves\",PlainEntry),(\"rootHash\",PlainEntry)]),(\"multisig\",fromList [(\"calls\",MapEntry),(\"multisigs\",DoubleMapEntry)]),(\"offences\",fromList [(\"concurrentReportsIndex\",DoubleMapEntry),(\"deferredOffences\",PlainEntry),(\"reports\",MapEntry),(\"reportsByKindIndex\",MapEntry)]),(\"proxy\",fromList [(\"announcements\",MapEntry),(\"proxies\",MapEntry)]),(\"randomnessCollectiveFlip\",fromList [(\"randomMaterial\",PlainEntry)]),(\"recovery\",fromList [(\"activeRecoveries\",DoubleMapEntry),(\"proxy\",MapEntry),(\"recoverable\",MapEntry)]),(\"scheduler\",fromList [(\"agenda\",MapEntry),(\"lookup\",MapEntry),(\"storageVersion\",PlainEntry)]),(\"session\",fromList [(\"currentIndex\",PlainEntry),(\"disabledValidators\",PlainEntry),(\"keyOwner\",MapEntry),(\"nextKeys\",MapEntry),(\"queuedChanged\",PlainEntry),(\"queuedKeys\",PlainEntry),(\"validators\",PlainEntry)]),(\"society\",fromList [(\"bids\",PlainEntry),(\"candidates\",PlainEntry),(\"defender\",PlainEntry),(\"defenderVotes\",MapEntry),(\"founder\",PlainEntry),(\"head\",PlainEntry),(\"maxMembers\",PlainEntry),(\"members\",PlainEntry),(\"payouts\",MapEntry),(\"pot\",PlainEntry),(\"rules\",PlainEntry),(\"strikes\",MapEntry),(\"suspendedCandidates\",MapEntry),(\"suspendedMembers\",MapEntry),(\"votes\",DoubleMapEntry),(\"vouching\",MapEntry)]),(\"staking\",fromList [(\"activeEra\",PlainEntry),(\"bonded\",MapEntry),(\"bondedEras\",PlainEntry),(\"canceledSlashPayout\",PlainEntry),(\"currentEra\",PlainEntry),(\"earliestUnappliedSlash\",PlainEntry),(\"eraElectionStatus\",PlainEntry),(\"erasRewardPoints\",MapEntry),(\"erasStakers\",DoubleMapEntry),(\"erasStakersClipped\",DoubleMapEntry),(\"erasStartSessionIndex\",MapEntry),(\"erasTotalStake\",MapEntry),(\"erasValidatorPrefs\",DoubleMapEntry),(\"erasValidatorReward\",MapEntry),(\"forceEra\",PlainEntry),(\"historyDepth\",PlainEntry),(\"invulnerables\",PlainEntry),(\"isCurrentSessionFinal\",PlainEntry),(\"ledger\",MapEntry),(\"minimumValidatorCount\",PlainEntry),(\"nominatorSlashInEra\",DoubleMapEntry),(\"nominators\",MapEntry),(\"payee\",MapEntry),(\"queuedElected\",PlainEntry),(\"queuedScore\",PlainEntry),(\"slashRewardFraction\",PlainEntry),(\"slashingSpans\",MapEntry),(\"snapshotNominators\",PlainEntry),(\"snapshotValidators\",PlainEntry),(\"spanSlash\",MapEntry),(\"storageVersion\",PlainEntry),(\"unappliedSlashes\",MapEntry),(\"validatorCount\",PlainEntry),(\"validatorSlashInEra\",DoubleMapEntry),(\"validators\",MapEntry)]),(\"sudo\",fromList [(\"key\",PlainEntry)]),(\"system\",fromList [(\"account\",MapEntry),(\"allExtrinsicsLen\",PlainEntry),(\"blockHash\",MapEntry),(\"blockWeight\",PlainEntry),(\"digest\",PlainEntry),(\"eventCount\",PlainEntry),(\"eventTopics\",MapEntry),(\"events\",PlainEntry),(\"executionPhase\",PlainEntry),(\"extrinsicCount\",PlainEntry),(\"extrinsicData\",MapEntry),(\"extrinsicsRoot\",PlainEntry),(\"lastRuntimeUpgrade\",PlainEntry),(\"number\",PlainEntry),(\"parentHash\",PlainEntry),(\"upgradedToU32RefCount\",PlainEntry)]),(\"technicalCommittee\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposalOf\",MapEntry),(\"proposals\",PlainEntry),(\"voting\",MapEntry)]),(\"technicalMembership\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry)]),(\"timestamp\",fromList [(\"didUpdate\",PlainEntry),(\"now\",PlainEntry)]),(\"tips\",fromList [(\"reasons\",MapEntry),(\"tips\",MapEntry)]),(\"transactionPayment\",fromList [(\"nextFeeMultiplier\",PlainEntry),(\"storageVersion\",PlainEntry)]),(\"treasury\",fromList [(\"approvals\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposals\",MapEntry)]),(\"vesting\",fromList [(\"vesting\",MapEntry)])]" From d21adac4f91e2caf6fd7cb044a431310e92e5223 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 15 Jan 2021 05:24:46 +0300 Subject: [PATCH 179/237] Added web3-bignum package --- packages/bignum/LICENSE | 211 ++++++++++++++++++ packages/bignum/Setup.hs | 2 + packages/bignum/package.yaml | 65 ++++++ packages/bignum/src/Data/BigNum.hs | 86 +++++++ .../tests/Data/BigNum/Test/BigNumSpec.hs | 127 +++++++++++ packages/bignum/tests/Spec.hs | 1 + .../hexstring/src/Data/ByteArray/HexString.hs | 11 +- .../scale/tests/Codec/Scale/Test/CoreSpec.hs | 2 +- stack.yaml | 9 +- 9 files changed, 501 insertions(+), 13 deletions(-) create mode 100644 packages/bignum/LICENSE create mode 100644 packages/bignum/Setup.hs create mode 100644 packages/bignum/package.yaml create mode 100644 packages/bignum/src/Data/BigNum.hs create mode 100644 packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs create mode 100644 packages/bignum/tests/Spec.hs diff --git a/packages/bignum/LICENSE b/packages/bignum/LICENSE new file mode 100644 index 00000000..ef9ef7ee --- /dev/null +++ b/packages/bignum/LICENSE @@ -0,0 +1,211 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2016-2020 Aleksandr Krupenkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + NOTE + +Individual files contain the following tag instead of the full license +text. + + SPDX-License-Identifier: Apache-2.0 + +This enables machine processing of license information based on the SPDX +License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/bignum/Setup.hs b/packages/bignum/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/packages/bignum/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml new file mode 100644 index 00000000..262f90d1 --- /dev/null +++ b/packages/bignum/package.yaml @@ -0,0 +1,65 @@ +name: web3-bignum +version: 1.0.0.0 +synopsis: Fixed size big integers for Haskell Web3 library. +description: Client library for Third Generation of Web. +github: "airalab/hs-web3" +license: Apache-2.0 +license-file: LICENSE +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: "(c) Aleksandr Krupenkin 2016-2020" +category: Network + +dependencies: +- base >4.11 && <4.14 +- memory >0.14 && <0.16 +- cereal >0.5 && <0.6 +- basement >0.0 && <0.1 +- bytestring >0.10 && <0.11 +- web3-scale >=1.0 && <1.1 + +ghc-options: +- -funbox-strict-fields +- -Wduplicate-exports +- -Whi-shadowing +- -Widentities +- -Woverlapping-patterns +- -Wpartial-type-signatures +- -Wunrecognised-pragmas +- -Wtyped-holes +- -Wincomplete-patterns +- -Wincomplete-uni-patterns +- -Wmissing-fields +- -Wmissing-methods +- -Wmissing-exported-signatures +- -Wmissing-monadfail-instances +- -Wmissing-signatures +- -Wname-shadowing +- -Wunused-binds +- -Wunused-top-binds +- -Wunused-local-binds +- -Wunused-pattern-binds +- -Wunused-imports +- -Wunused-matches +- -Wunused-foralls +- -Wtabs + +library: + source-dirs: src + +tests: + tests: + main: Spec.hs + source-dirs: + - tests + - src + dependencies: + - web3-hexstring >=1.0 && <1.1 + - hspec-expectations >=0.8.2 && <0.9 + - hspec-discover >=2.4.4 && <2.8 + - hspec-contrib >=0.4.0 && <0.6 + - hspec >=2.4.4 && <2.8 + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N diff --git a/packages/bignum/src/Data/BigNum.hs b/packages/bignum/src/Data/BigNum.hs new file mode 100644 index 00000000..ee8655c4 --- /dev/null +++ b/packages/bignum/src/Data/BigNum.hs @@ -0,0 +1,86 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Data.BigNum +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Big numbers and codecs for Haskell Web3 library. +-- + +module Data.BigNum (Word256, Word128, H256, h256) where + +import Basement.Block (Block) +import Basement.Types.Word128 (Word128 (..)) +import Basement.Types.Word256 (Word256 (..)) +import Codec.Scale () +import Codec.Scale.Class (Decode (..), Encode (..)) +import Data.ByteArray (ByteArrayAccess, convert) +import qualified Data.ByteArray as A (drop, length, take) +import Data.ByteArray.Encoding (Base (Base16), convertFromBase, + convertToBase) +import Data.ByteString (ByteString) +import Data.Maybe (fromJust) +import Data.Serialize.Get (getByteString) +import Data.Serialize.Put (putByteString) +import Data.String (IsString (..)) +import Data.Word (Word8) + +instance Encode Word128 where + put (Word128 l h)= put h >> put l + +instance Decode Word128 where + get = flip Word128 <$> get <*> get + +instance Encode Word256 where + put (Word256 lx hx l h) = do + put h + put l + put hx + put lx + +instance Decode Word256 where + get = do + h <- get + l <- get + hx <- get + lx <- get + return (Word256 lx hx l h) + +-- | 32 byte of data. +newtype H256 = H256 { unH256 :: Block Word8 } + deriving (Eq, Ord, ByteArrayAccess) + +-- | Convert any 32 byte array into H256 type, otherwise returns Nothing. +h256 :: ByteArrayAccess a => a -> Maybe H256 +h256 ba + | A.length ba == 32 = Just $ H256 (convert ba) + | otherwise = Nothing + +fromHex :: ByteString -> Either String H256 +fromHex bs | A.length bs' == 64 = H256 <$> convertFromBase Base16 bs' + | otherwise = Left "wrong length" + where + hexStart = convert ("0x" :: ByteString) + bs' | A.take 2 bs == hexStart = A.drop 2 bs + | otherwise = bs + +toHex :: Block Word8 -> ByteString +toHex = ("0x" <>) . convertToBase Base16 + +instance Show H256 where + show = show . toHex . unH256 + +instance IsString H256 where + fromString = either error id . fromHex . fromString + +instance Encode H256 where + put = putByteString . convert + +instance Decode H256 where + get = (fromJust . h256) <$> getByteString 32 diff --git a/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs new file mode 100644 index 00000000..9ef0a0dc --- /dev/null +++ b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs @@ -0,0 +1,127 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Data.BigNum.Test.BigNumSpec +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + +module Data.BigNum.Test.BigNumSpec where + +import Basement.Types.Word128 (Word128) +import Basement.Types.Word256 (Word256) +import Codec.Scale (decode, encode) +import Control.Monad (forM_) +import Data.ByteArray.HexString (HexString) +import Test.Hspec + +import Data.BigNum (H256) + +u128_TEST_VECTORS :: [(Word128, HexString)] +u128_TEST_VECTORS = + [ (112009765980327865299926170522124675408, "0x50e91990a464634b4fe24828d64b4454") + , (284084896039402088792232799153441440599, "0x5783434bc168dc9331cef7fcc3c2b8d5") + , (259870372860522542774055759705813848487, "0xa791e84af817d01353bcae32993681c3") + , (12195993515186872808127827346567397926, "0x26025bf77f3914a9da0759c0e7dc2c09") + , (120025979845686107711254958532305515398, "0x867322183592cf181bfd17c7b1294c5a") + , (219406308864564522421661310403439556264, "0xa8f6fcd0af3848558244edc0361e10a5") + , (257335103778365857895651839673319875231, "0x9fe2f88b84b84d90e69d81962ef098c1") + , (68063227844806979300641114110617889264, "0xf0a9ee1480f359800fba8b7a38803433") + , (216514484839331230802109899459159104812, "0x2c9d37bee2fc84f8353ba10f482ce3a2") + , (178182877230765595416853642944570021919, "0x1f587d791c7dacaddc9cfd3b1dc60c86") + , (290335692238486144820126784978954757396, "0x1425c4fd2f1831eac24a9ef4cf9e6cda") + , (165504207802320373299850049582381567447, "0xd78d3e18fb99c252d9f20af572f3827c") + , (47856636672191714454008687982296341606, "0x669c2e67a9bea69ff13aef9d5bda0024") + , (19215563179501177476867447612060366546, "0xd276ae113fdcf62025309b0669c8740e") + , (246485718903164524585854064597022275963, "0x7bf9c3072aaa0ad131067568356c6fb9") + , (197733884573414826455307878816376246254, "0xee4ff5745a481cb00cf2d6d63229c294") + , (149607475627327219754848974470897887087, "0x6f67a69790aa6b881db0546b0a5a8d70") + , (174701307382434508318829001328589289972, "0xf4399c820a79a567d4f390c2773f6e83") + , (72595801292461450864588564249737801167, "0xcfaddd2c4b20d8921f24745d58719d36") + , (68514076502642919617157448984759680837, "0x45bf3cc99096452a982b6990c6548b33") + , (216419667485302883317463919550598457261, "0xada77bf03e963b0fd16727cd6ce9d0a2") + , (116229821064613393178522103562599386123, "0x0bccdb74c7f7a3c2afb443bd9d0c7157") + , (135932484144247690375718666021027537778, "0x72633955ae336d73c58605dbe7a44366") + , (30075132366243141139951812090788233488, "0x10c1c6c0cf467e0fe1630a4a8242a016") + , (110760648836374947274219482463927908576, "0xe0b8c1e1f3221e3cbc6b4b439bb95353") + , (6493109780355214426871710723177871150, "0x2e7712cb1d7b9819004830580787e204") + , (155255127434882774479428817682909336706, "0x8294132da02c8966a7b450e5c50ccd74") + , (249558934561135206340751629864009659619, "0xe3f46e4bfe10c0cbcac4d861704dbfbb") + , (221130490312110890453383188394454522854, "0xe69bb71f38105bc2ff3c3b27ec2e5ca6") + , (330501820625969513409631107753191338114, "0x82f05ac2614f264cae56d056d655a4f8") + , (223256840663930369967277834345880002356, "0x349ff07d428288010a9f53c416b4f5a7") + , (117046551608311569426455411751697532077, "0xad4480fbf4dceacc06bbc6798a580e58") + ] + +u256_TEST_VECTORS :: [(Word256, HexString)] +u256_TEST_VECTORS = + [ (115246322816974817869522522728228591410688, "0x009e4a73c70170d062c7cfaacc68b2ad52010000000000000000000000000000") + , (135938608309138943912299509830613133361152, "0x00003bcac38e0e88ff4be1b553a2d77c8f010000000000000000000000000000") + , (162382544235100656091613459421755842104320, "0x000c62040d9eb5402b77a94756700c33dd010000000000000000000000000000") + , (87401399458010888206718906820085474987520, "0x000e25d50cdf0ebc4288bb79603d81d900010000000000000000000000000000") + , (138984606683918062873256075229427703132672, "0x00b2865449543d0bc4aee7630795657098010000000000000000000000000000") + , (80840810280826333065693090387807395201024, "0x00402505c662fed033657fec8eb9dd91ed000000000000000000000000000000") + , (111243980175912604792124852175079091625472, "0x005e221ba2a0291b64cadf565f41abea46010000000000000000000000000000") + , (68346726659358296375267195304703356056576, "0x00342cd4bdd4aae9d473a64f56bf5cdac8000000000000000000000000000000") + , (106449215354720188380210893871836123739136, "0x00b469f4f9e50e3c9692eca70c247dd338010000000000000000000000000000") + , (78137755955119804750893895610892995805184, "0x0040900a46fc58e6681fea1beb6550a0e5000000000000000000000000000000") + , (37198705638330423439614376452234760232960, "0x002001f5e1b489daa201e473ae1b32516d000000000000000000000000000000") + , (44433624903109480313359576650777141679616, "0x0096d7f1e43651f716e5dc15b5df249482000000000000000000000000000000") + , (148514051583354372738620167945095771152896, "0x0062a572ce8903fc0bb00b5c21e98d71b4010000000000000000000000000000") + , (60014954218248357909848828065675948796928, "0x002cff0f0bf45b444adacc7a76be3b5eb0000000000000000000000000000000") + , (115991051230925873672644713804764031319040, "0x007ca1f34f6509f519e1fe0979e2f7dd54010000000000000000000000000000") + , (128993277087652314984111615353153713316352, "0x00a2db3ff8e4ce7452a7afa42c7fc1137b010000000000000000000000000000") + , (79341042577632633961867710129661883276800, "0x005e51f8c00556a267f89b85cff89029e9000000000000000000000000000000") + , (107155234040248837193602796138479639672832, "0x0038b9433d32cd48b3b6ab8fc264a3e63a010000000000000000000000000000") + , (9692096688234458500324617381072327939072, "0x0014383881662b212547f6856fec857b1c000000000000000000000000000000") + , (153508611663790194252674464693195110905856, "0x0078e84497d0ae7ee3b3c51745310b1fc3010000000000000000000000000000") + , (82797952396630935803342482248562500762624, "0x00fcc41b53fdb9f05f5023d7e0954152f3000000000000000000000000000000") + , (42485067285891128074395084374077297656832, "0x00042093afeaf2b88943f460d85336da7c000000000000000000000000000000") + , (86450357619452627268531966540825354464768, "0x006e167391f2a026579817c9853e050efe000000000000000000000000000000") + , (66917117614349947545091673512474456381440, "0x0058f0bdece2a5fa4d8e9b97800fd8a6c4000000000000000000000000000000") + , (41855199301039963483087569366097332165632, "0x005c7e1023c40c3df8c71c308d2a5a007b000000000000000000000000000000") + , (79447692753915387681092309048730281646080, "0x00184905865a4f806b933431790ccd79e9000000000000000000000000000000") + , (64972869997286725725114985545674517793792, "0x004c362af3a5b3855e591bde0d9727f0be000000000000000000000000000000") + , (142291599105260490990206148836714458533888, "0x00500eb253aef52349907156b8274d28a2010000000000000000000000000000") + , (131059754944904136287166865738657526588416, "0x00246ac6cc16ea922048cd18bea7662681010000000000000000000000000000") + , (86851548177794395407641645798830201528832, "0x00624a9b253533261c8d6a1936bcd73bff000000000000000000000000000000") + , (119121986710264787758595765725140587452416, "0x00187946fbafb3f21928d1c1bf1f6c115e010000000000000000000000000000") + , (75287059147291008379624862024819049134592, "0x007a9e91c390ec87c0b8e9c1e529b03fdd000000000000000000000000000000") + ] + +h256_TEST_VECTORS :: [(H256, HexString)] +h256_TEST_VECTORS = + [ ("0xfe700a084ea8882a6661724f3f3277ef5ea9df17cd5291f80c492e537b868518", "0xfe700a084ea8882a6661724f3f3277ef5ea9df17cd5291f80c492e537b868518") + , ("0xabeedc76bd314edcca6c7fedc0414d05a4979bbd8e17fd4f5d300a9afd953b24", "0xabeedc76bd314edcca6c7fedc0414d05a4979bbd8e17fd4f5d300a9afd953b24") + , ("0xf1555b382428aeadafa3b9cf4bbd4811d1dac92941c1d741078923844e867c33", "0xf1555b382428aeadafa3b9cf4bbd4811d1dac92941c1d741078923844e867c33") + , ("0xd959976b19068248aa287290ae7f1c363fcab571c1775dfa16291ecf97d38e11", "0xd959976b19068248aa287290ae7f1c363fcab571c1775dfa16291ecf97d38e11") + , ("0x2fd7571b66c46c901984e148071b8fe30a5a65cc4a08c3f98b4a753abce3e40b", "0x2fd7571b66c46c901984e148071b8fe30a5a65cc4a08c3f98b4a753abce3e40b") + , ("0xb09d4a38b291296c08a1b369ca898bfe594fa64bcc942ee5ce18511edb9bbd42", "0xb09d4a38b291296c08a1b369ca898bfe594fa64bcc942ee5ce18511edb9bbd42") + , ("0x9afd0350d2b7c8d3972478bf76c9c782d587ff3918524ed5de7753cf75386253", "0x9afd0350d2b7c8d3972478bf76c9c782d587ff3918524ed5de7753cf75386253") + , ("0xebaf4fcbaa6375fa7b6e5fc96166c34ee774221f2f641fdc1b13300306a54b66", "0xebaf4fcbaa6375fa7b6e5fc96166c34ee774221f2f641fdc1b13300306a54b66") + , ("0x49f7d9bda63d100a60e72b3b5df09f7b19bbe4bf7bb8fd6009ab3bf74c38b4f5", "0x49f7d9bda63d100a60e72b3b5df09f7b19bbe4bf7bb8fd6009ab3bf74c38b4f5") + , ("0x71b4b1615d1c35332d222abd08008c881aa28975e0f4088ba412fcd6b506eb30", "0x71b4b1615d1c35332d222abd08008c881aa28975e0f4088ba412fcd6b506eb30") + , ("0xc850252c4c0a14ca0a55bc04077b998139d741ac3ed88db628e02468f3fcc3e6", "0xc850252c4c0a14ca0a55bc04077b998139d741ac3ed88db628e02468f3fcc3e6") + , ("0x0ae755268da527700201a1b042655f3fde1d9f4bfe990be1998b683d3d5c6597", "0x0ae755268da527700201a1b042655f3fde1d9f4bfe990be1998b683d3d5c6597") + , ("0xf8caf1ee78b44e90d5dfd99cdcbe0f3b0d45b7d964ce93f60ecfa9af0dc4d1ee", "0xf8caf1ee78b44e90d5dfd99cdcbe0f3b0d45b7d964ce93f60ecfa9af0dc4d1ee") + , ("0xb9ccbe3823df8602145555f2c6e2e33cfc1cad5c6e053f929c68324a3627d59a", "0xb9ccbe3823df8602145555f2c6e2e33cfc1cad5c6e053f929c68324a3627d59a") + ] + +spec :: Spec +spec = parallel $ do + describe "SCALE tests" $ do + it "u128 test vectors" $ forM_ u128_TEST_VECTORS $ \(x, l) -> do + encode x `shouldBe` l + decode l `shouldBe` Right x + + it "u256 test vectors" $ forM_ u256_TEST_VECTORS $ \(x, l) -> do + encode x `shouldBe` l + decode l `shouldBe` Right x + + it "H256 test vectors" $ forM_ h256_TEST_VECTORS $ \(x, l) -> do + encode x `shouldBe` l + decode l `shouldBe` Right x diff --git a/packages/bignum/tests/Spec.hs b/packages/bignum/tests/Spec.hs new file mode 100644 index 00000000..a824f8c3 --- /dev/null +++ b/packages/bignum/tests/Spec.hs @@ -0,0 +1 @@ +{-# OPTIONS_GHC -F -pgmF hspec-discover #-} diff --git a/packages/hexstring/src/Data/ByteArray/HexString.hs b/packages/hexstring/src/Data/ByteArray/HexString.hs index 894ece3f..b0ce1187 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString.hs @@ -17,8 +17,7 @@ module Data.ByteArray.HexString where -import Codec.Scale.Class (Decode (..), Encode (..)) -import Codec.Scale.Core () +import Codec.Scale (Decode, Encode) import Data.Aeson (FromJSON (..), ToJSON (..), Value (String), withText) import Data.ByteArray (ByteArray, ByteArrayAccess, convert) @@ -34,7 +33,7 @@ import Language.Haskell.TH.Quote (QuasiQuoter (..), quoteFile) -- | Represents a Hex string. Guarantees that all characters it contains -- are valid hex characters. newtype HexString = HexString { unHexString :: ByteString } - deriving (Eq, Ord, Semigroup, Monoid, ByteArrayAccess, ByteArray) + deriving (Eq, Ord, Semigroup, Monoid, ByteArrayAccess, ByteArray, Encode, Decode) instance Show HexString where show = ("HexString " ++) . show . toText @@ -51,12 +50,6 @@ instance FromJSON HexString where instance ToJSON HexString where toJSON = String . toText -instance Decode HexString where - get = HexString <$> get - -instance Encode HexString where - put = put . unHexString - -- | Smart constructor which trims '0x' and validates length is even. hexString :: ByteArray ba => ba -> Either String HexString hexString bs = HexString <$> convertFromBase Base16 bs' diff --git a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs index ac3d30dc..2f51b180 100644 --- a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs @@ -24,7 +24,7 @@ import Data.Bits (bit) import Data.ByteString (ByteString) import qualified Data.ByteString as BS (length, pack, unpack) import Data.Int (Int16, Int32, Int64, Int8) -import qualified Data.Text as T (pack, unpack) +import qualified Data.Text as T (pack) import Data.Vector.Unboxed (Vector) import qualified Data.Vector.Unboxed as V (fromList) import Data.Word (Word16, Word32, Word64, Word8) diff --git a/stack.yaml b/stack.yaml index c4c36f0e..33786ce0 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-16.18 +resolver: lts-16.23 # User packages to be built. packages: @@ -7,6 +7,7 @@ packages: - 'packages/ipfs' - 'packages/scale' - 'packages/crypto' +- 'packages/bignum' - 'packages/jsonrpc' - 'packages/provider' - 'packages/solidity' @@ -19,6 +20,8 @@ packages: # Extra package dependencies extra-deps: +- hspec-expectations-json-1.0.0.2@sha256:a8c771b7a5449ef600c984d596304ebace8e109f5830f5351566a4d13c0072d4 +- animalcase-0.1.0.2@sha256:d7b80c3130c68d7ce8ddd9782588b2c4dd7da86461f302c54cc4acddf0902b51 - relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c - vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c @@ -28,6 +31,6 @@ pvp-bounds: both # Nix integration nix: packages: - - zlib - - haskellPackages.hlint - haskellPackages.stylish-haskell + - haskellPackages.hlint + - zlib From dfc5d3c959ab6ff8e1100b6315467f6f9f4bb526 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 15 Jan 2021 05:27:16 +0300 Subject: [PATCH 180/237] Added polkadot primitive types --- packages/polkadot/package.yaml | 1 + packages/polkadot/src/Network/Polkadot.hs | 8 +++- .../src/Network/Polkadot/Primitives.hs | 41 ++++++++++++++++ .../polkadot/src/Network/Polkadot/Query.hs | 37 ++++++++++++-- .../polkadot/src/Network/Polkadot/Storage.hs | 35 +++++++++++--- .../src/Network/Polkadot/Storage/Key.hs | 48 ++++++++++++------- 6 files changed, 138 insertions(+), 32 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Primitives.hs diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 7b0ffdb3..150f33c6 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -26,6 +26,7 @@ dependencies: - microlens-mtl >0.2 && <0.3 - web3-scale >=1.0 && <1.1 - web3-crypto >=1.0 && <1.1 +- web3-bignum >=1.0 && <1.1 - web3-jsonrpc >=1.0 && <1.1 - web3-hexstring >=1.0 && <1.1 diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs index a88c7585..ea93aa64 100644 --- a/packages/polkadot/src/Network/Polkadot.hs +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -12,11 +12,15 @@ module Network.Polkadot ( + -- * Query blockchain storage. query , Argument(..) - , module Codec.Scale + -- * Base types and codecs. + , module Scale + , module Primitives ) where -import Codec.Scale +import Codec.Scale as Scale +import Network.Polkadot.Primitives as Primitives import Network.Polkadot.Query (query) import Network.Polkadot.Storage.Key (Argument (..)) diff --git a/packages/polkadot/src/Network/Polkadot/Primitives.hs b/packages/polkadot/src/Network/Polkadot/Primitives.hs new file mode 100644 index 00000000..0f999f4d --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Primitives.hs @@ -0,0 +1,41 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} + +-- | +-- Module : Network.Polkadot.Primitives +-- Copyright : Aleksandr Krupenkin 2016-2020 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Polkadot primitive data types. +-- + +module Network.Polkadot.Primitives + ( Balance + , BlockNumber + , Moment + , AccountIndex + , AccountId + , H256 + , Word128 + ) where + +import Data.BigNum (H256, Word128) +import Data.Word (Word32, Word64) + +-- | The user account balance, 'u128' type. +type Balance = Word128 + +-- | Block numbers is up to 2^32. +type BlockNumber = Word32 + +-- | Time moment is 64bit. +type Moment = Word64 + +-- | Accounts in system is up to 2^32. +type AccountIndex = Word32 + +-- | The user account identifier type for the runtime. +type AccountId = H256 diff --git a/packages/polkadot/src/Network/Polkadot/Query.hs b/packages/polkadot/src/Network/Polkadot/Query.hs index ea8acb80..08d527a1 100644 --- a/packages/polkadot/src/Network/Polkadot/Query.hs +++ b/packages/polkadot/src/Network/Polkadot/Query.hs @@ -13,6 +13,7 @@ module Network.Polkadot.Query where import Codec.Scale (Decode, decode) +import Data.ByteArray.HexString (HexString) import Data.Text (Text) import Network.JsonRpc.TinyClient (JsonRpc) @@ -20,18 +21,44 @@ import Network.Polkadot.Metadata (Metadata (Metadata), MetadataVersioned (V12), metadataTypes, toLatest) import Network.Polkadot.Rpc.State (getMetadata, getStorage) -import Network.Polkadot.Storage (Storage, fromMetadata, getPrefix) +import Network.Polkadot.Storage (Storage, fromMetadata, + storageKey) import Network.Polkadot.Storage.Key (Argument) +-- | Loads metadata from runtime and create storage type. storage :: JsonRpc m => m (Either String Storage) storage = (fmap go . decode) <$> getMetadata where go raw = let (meta, _) = metadataTypes raw in fromMetadata (toLatest meta) -query :: (JsonRpc m, Decode a) => Text -> Text -> [Argument] -> m (Either String a) -query section method args = go =<< storage +-- | Query data from blockchain via 'getStorage' RPC call. +query :: (JsonRpc m, Decode a) + => Text + -- ^ Module name. + -> Text + -- ^ Storage method name. + -> [Argument] + -- ^ Arguments (for mappings). + -> m (Either String a) + -- ^ Decoded storage item. +{-# INLINE query #-} +query = query' Nothing + +-- | Similar to 'query' but get block hash for query as an argument. +query' :: (JsonRpc m, Decode a) + => Maybe HexString + -- ^ Block hash for query ('Nothing' for best block). + -> Text + -- ^ Module name. + -> Text + -- ^ Storage method name. + -> [Argument] + -- ^ Arguments (for mappings). + -> m (Either String a) + -- ^ Decoded storage item. +query' blockHash section method args = go =<< storage where - go (Right store) = case getPrefix store section method args of + go (Right store) = case storageKey store section method args of + Just key -> decode <$> getStorage key blockHash Nothing -> return (Left "Unable to find given section/method or wrong argument count") - Just prefix -> decode <$> getStorage prefix Nothing go (Left err) = return (Left err) diff --git a/packages/polkadot/src/Network/Polkadot/Storage.hs b/packages/polkadot/src/Network/Polkadot/Storage.hs index 229f2528..0e019fa4 100644 --- a/packages/polkadot/src/Network/Polkadot/Storage.hs +++ b/packages/polkadot/src/Network/Polkadot/Storage.hs @@ -9,7 +9,11 @@ -- Stability : experimental -- Portability : portable -- --- . +-- Substrate uses a simple key-value data store implemented as a database-backed, +-- modified Merkle tree. +-- +-- Blockchains that are built with Substrate expose a remote procedure call (RPC) +-- server that can be used to query runtime storage. -- module Network.Polkadot.Storage where @@ -32,10 +36,17 @@ import Network.Polkadot.Metadata.V12 (Metadata (modules), import Network.Polkadot.Storage.Key (Argument, StorageEntry (..), newEntry) +-- | Runtime storage is a set of named modules. type Storage = Map Text ModuleStorage + +-- | Each module store data in a set of named entries. type ModuleStorage = Map Text StorageEntry -fromMetadata :: Metadata -> Storage +-- | Create 'Storage' abstraction from runtime metadata. +fromMetadata :: Metadata + -- ^ Runtime metadata (latest version). + -> Storage + -- ^ Storage entities. fromMetadata = Map.fromList . mapMaybe go . modules where toLowerFirst = uncurry T.cons . (toLower . T.head &&& T.tail) @@ -43,13 +54,23 @@ fromMetadata = Map.fromList . mapMaybe go . modules StorageMetadata prefix items <- moduleStorage let section = toCamelCase moduleName toEntry meta@StorageEntryMetadata{..} = - (toLowerFirst entryName, newEntry prefix meta entryName) + (toLowerFirst entryName, newEntry prefix meta) return (toLowerFirst section, Map.fromList $ fmap toEntry items) -getPrefix :: Storage -> Text -> Text -> [Argument] -> Maybe HexString -getPrefix store section method args = convert <$> do - entries <- Map.lookup section store - entry <- Map.lookup method entries +-- | Create storage key for given parameters. +storageKey :: Storage + -- ^ Storage entities. + -> Text + -- ^ Module name. + -> Text + -- ^ Storage method name. + -> [Argument] + -- ^ Arguments (for mappings). + -> Maybe HexString + -- ^ Raw storage key. If module or method was not found + -- or wrong number of arguments - returns 'Nothing'. +storageKey store section method args = convert <$> do + entry <- Map.lookup method =<< Map.lookup section store case entry of PlainEntry x -> Just x MapEntry f -> case args of diff --git a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs index 6b0070ee..2446186f 100644 --- a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs +++ b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs @@ -10,8 +10,8 @@ -- Stability : experimental -- Portability : portable -- --- A representation of a storage key (typically hashed) in the system. It can be --- constructed by passing in a raw key or a StorageEntry with (optional) arguments. +-- When you use the Substrate RPC to access a storage item, +-- you only need to provide the key associated with that item. -- module Network.Polkadot.Storage.Key where @@ -31,10 +31,7 @@ import Network.Polkadot.Metadata.V11 (DoubleMapType (..), StorageEntryType (..), StorageHasher (..)) --- | Hasher is a function that hash given argument. -type Hasher a = a -> ByteString - --- | General type wrapper for SCALE encodable data type. +-- | General type wrapper for SCALE encodable storage index argument. data Argument where Argument :: Encode a => a -> Argument -- ^ Wrapped type should be encodable. @@ -42,13 +39,16 @@ data Argument where instance Encode Argument where put arg = case arg of Argument a -> put a +-- | Hasher is a function that hash given argument. +type Hasher = Argument -> ByteString + -- | Entry type describe storage prefix for different storage entity types. -data StorageEntry where - PlainEntry :: ByteString -> StorageEntry +data StorageEntry + = PlainEntry ByteString -- ^ Simple storage type without arguments. - MapEntry :: (Argument -> ByteString) -> StorageEntry + | MapEntry (Argument -> ByteString) -- ^ Mapping with hashing for arguments. - DoubleMapEntry :: (Argument -> Argument -> ByteString) -> StorageEntry + | DoubleMapEntry (Argument -> Argument -> ByteString) -- ^ Double map with two different hashers. instance Show StorageEntry where @@ -56,18 +56,30 @@ instance Show StorageEntry where show (MapEntry _) = "MapEntry" show (DoubleMapEntry _) = "DoubleMapEntry" -newEntry :: Text -> StorageEntryMetadata -> Text -> StorageEntry -newEntry prefix meta method = case entryType meta of +-- | Create storage key generator from metadata description. +newEntry :: Text + -- ^ Storage prefix (module name). + -> StorageEntryMetadata + -- ^ Storage key metadata, includes entry type, name, etc. + -> StorageEntry + -- ^ Storage key generator. +newEntry prefix meta = case entryType meta of Plain _ -> PlainEntry plainKey - Map MapType{..} -> MapEntry $ mapCodec (getHasher mapHasher) - DoubleMap DoubleMapType{..} -> - DoubleMapEntry $ dMapCodec (getHasher doubleMapHasher) (getHasher doubleMapKey2Hasher) + Map MapType{..} -> MapEntry (mapCodec mapHasher) + DoubleMap DoubleMapType{..} -> DoubleMapEntry (dMapCodec doubleMapHasher doubleMapKey2Hasher) where + method = entryName meta + -- To calculate the key for a simple Storage Value, + -- take the TwoX 128 hash of the name of the module that contains the Storage Value + -- and append to it the TwoX 128 hash of the name of the Storage Value itself. plainKey = xxhash 128 (encodeUtf8 prefix) <> xxhash 128 (encodeUtf8 method) - mapCodec hasher arg = plainKey <> hasher arg - dMapCodec hasher1 hasher2 arg1 arg2 = plainKey <> hasher1 arg1 <> hasher2 arg2 + -- Like Storage Values, the keys for Storage Maps are equal to the TwoX 128 hash + -- of the name of the module that contains the map prepended to the TwoX 128 hash + -- of the name of the Storage Map itself. + mapCodec h1 arg1 = plainKey <> getHasher h1 arg1 + dMapCodec h1 h2 arg1 arg2 = mapCodec h1 arg1 <> getHasher h2 arg2 -getHasher :: Encode a => StorageHasher -> Hasher a +getHasher :: StorageHasher -> Hasher getHasher Blake2_128 = blake2_128 . encode getHasher Blake2_256 = blake2_256 . encode getHasher Blake2_128Concat = uncurry (<>) . (blake2_128 &&& id) . encode From 02e6067c66c4f0e6691fc984e42e523ef6e01642 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 15 Jan 2021 05:31:18 +0300 Subject: [PATCH 181/237] Added MonadFail instance for Web3 monad --- packages/provider/src/Network/Web3/Provider.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/provider/src/Network/Web3/Provider.hs b/packages/provider/src/Network/Web3/Provider.hs index bd73de0a..a41551fc 100644 --- a/packages/provider/src/Network/Web3/Provider.hs +++ b/packages/provider/src/Network/Web3/Provider.hs @@ -40,7 +40,7 @@ import qualified Network.WebSockets.Stream as Stream -- | Any communication with node wrapped with 'Web3' monad newtype Web3 a = Web3 { unWeb3 :: StateT JsonRpcClient IO a } - deriving (Functor, Applicative, Monad, MonadIO, MonadThrow, MonadState JsonRpcClient) + deriving (Functor, Applicative, Monad, MonadIO, MonadThrow, MonadFail, MonadState JsonRpcClient) instance JsonRpc Web3 From 6d7ac3547abc345a6c870d6ca7fb79d1418863d2 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 15 Jan 2021 08:41:00 +0300 Subject: [PATCH 182/237] Improved polkadot example --- examples/polkadot/Main.hs | 13 +++++++++- .../src/Network/Polkadot/Primitives.hs | 26 +++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/examples/polkadot/Main.hs b/examples/polkadot/Main.hs index 5e8a25a0..f9c0579d 100644 --- a/examples/polkadot/Main.hs +++ b/examples/polkadot/Main.hs @@ -3,6 +3,7 @@ module Main where import Control.Monad.IO.Class (liftIO) +import Network.Polkadot import qualified Network.Polkadot.Rpc.Chain as Chain import qualified Network.Polkadot.Rpc.State as State import qualified Network.Polkadot.Rpc.System as System @@ -10,13 +11,23 @@ import Network.Web3.Provider (Provider (..), runWeb3') main :: IO () main = do - result <- runWeb3' (WsProvider "127.0.0.1" 9944) $ do + result <- runWeb3' (HttpProvider "http://127.0.0.1:9933") $ do name <- System.name liftIO . putStrLn $ "System name: " ++ show name best <- Chain.getBlockHash Nothing liftIO . putStrLn $ "Best hash: " ++ show best + Right now <- query "timestamp" "now" [] + liftIO . putStrLn $ "Timestamp: " ++ show (now :: Moment) + + Right total <- query "balances" "totalIssuance" [] + liftIO . putStrLn $ "Total amount: " ++ show (total :: Balance) + + let alice = "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d" :: AccountId + Right account <- query "system" "account" [Argument alice] + liftIO . putStrLn $ "Alice account: " ++ show (account :: AccountInfo) + State.getRuntimeVersion best case result of diff --git a/packages/polkadot/src/Network/Polkadot/Primitives.hs b/packages/polkadot/src/Network/Polkadot/Primitives.hs index 0f999f4d..2702cfcb 100644 --- a/packages/polkadot/src/Network/Polkadot/Primitives.hs +++ b/packages/polkadot/src/Network/Polkadot/Primitives.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | @@ -18,12 +20,17 @@ module Network.Polkadot.Primitives , Moment , AccountIndex , AccountId + , AccountData(..) + , AccountInfo(..) , H256 , Word128 ) where -import Data.BigNum (H256, Word128) -import Data.Word (Word32, Word64) +import Codec.Scale (Decode, Encode) +import Data.BigNum (H256, Word128) +import Data.Word (Word32, Word64) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) -- | The user account balance, 'u128' type. type Balance = Word128 @@ -39,3 +46,18 @@ type AccountIndex = Word32 -- | The user account identifier type for the runtime. type AccountId = H256 + +-- | Account balances. +data AccountData = AccountData + { balanceFree :: Balance + , balanceReserved :: Balance + , miscFrozen :: Balance + , feeFrozen :: Balance + } deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) + +-- | General account information. +data AccountInfo = AccountInfo + { accountNonce :: AccountIndex + , accountRefcount :: Word32 + , accountData :: AccountData + } deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) From af105e02d4cfddf17bd07ecef7dd1ae83b87dbc1 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 15 Jan 2021 08:49:15 +0300 Subject: [PATCH 183/237] Added polkadot storage page into docs --- docs/index.rst | 1 + docs/polkadot_storage.rst | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 docs/polkadot_storage.rst diff --git a/docs/index.rst b/docs/index.rst index 1824da06..e5b48993 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,6 +9,7 @@ Haskell Web3 Documentation getting_started ethereum_node_api polkadot_node_api + polkadot_storage ethereum_accounts smart_contracts ipfs_client_api diff --git a/docs/polkadot_storage.rst b/docs/polkadot_storage.rst new file mode 100644 index 00000000..cad7df17 --- /dev/null +++ b/docs/polkadot_storage.rst @@ -0,0 +1,26 @@ +Polkadot Storage +================ + +Blockchains that are built with Substrate expose a remote procedure call (RPC) server +that can be used to query runtime storage. In Haskell Web3 the standard Web3 provider could be used. + +Lets try to query Polkadot storage with ``runWeb3'`` function using ``ghci``. + +.. code-block:: haskell + + > import Network.Web3.Provider + > import Network.Polkadot + > runWeb3' (WsProvider "127.0.0.1" 9944) (query "timestamp" "now" [] :: Web3 (Either String Moment)) + Right (Right 1610689972001) + +The ``query`` function arguments is **section** (or module), **method** and list of arguments (for maps and double maps). + +.. code-block:: haskell + + query :: (JsonRpc m, Decode a) => Text -> Text -> [Argument] -> m a + +Where ``a`` type should be SCALE decodable. + +.. note:: + + More usage details available in `Polkadot example `_ app. From b79413281f09d01c49ca81c893b94f93277d3e9e Mon Sep 17 00:00:00 2001 From: Alexandre Esteves <2335822+alexfmpe@users.noreply.github.com> Date: Mon, 25 Jan 2021 02:28:35 +0000 Subject: [PATCH 184/237] Fix bindings for single field structs (#106) * Prevent SolidityTuple from representing invalid states * Fix bindings for single-field structs --- packages/ethereum/src/Network/Ethereum/Contract/TH.hs | 5 +++-- packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs | 9 ++++++++- packages/solidity/src/Language/Solidity/Abi.hs | 6 ++---- .../solidity/tests/Language/Solidity/Test/AbiSpec.hs | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs index 71a4a078..a81df80a 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs @@ -56,7 +56,7 @@ import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Lazy as LT import qualified Data.Text.Lazy.Encoding as LT -import Data.Tuple.OneTuple (only) +import Data.Tuple.OneTuple (OneTuple, only) import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) import Language.Haskell.TH @@ -120,7 +120,8 @@ toHSType s = case s of SolidityString -> conT ''Text SolidityBytesN n -> appT (conT ''BytesN) (numLit n) SolidityBytes -> conT ''Bytes - SolidityTuple n as -> foldl ( \b a -> appT b $ toHSType a ) ( tupleT n ) as + SolidityTuple [a] -> appT (conT ''OneTuple) (toHSType a) + SolidityTuple as -> foldl ( \b a -> appT b $ toHSType a ) ( tupleT (length as) ) as SolidityVector ns a -> expandVector ns a SolidityArray a -> appT listT $ toHSType a where diff --git a/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs index 3ef4ca7a..f1d4f72f 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs @@ -6,6 +6,7 @@ {-# LANGUAGE QuasiQuotes #-} module Network.Ethereum.Test.THSpec where +import Data.Tuple.OneTuple (OneTuple(..)) import Network.Ethereum.Contract.TH import Test.Hspec @@ -13,8 +14,14 @@ import Test.Hspec -- https://raw.githubusercontent.com/0xProject/0x-monorepo/%400x/website%400.0.89/packages/contract-artifacts/artifacts/Exchange.json [abiFrom|tests/contracts/Exchange.json|] +[abiFrom|tests/contracts/SingleField.json|] + spec :: Spec spec = parallel $ - describe "quasi-quoter" $ + describe "quasi-quoter" $ do it "can compile contract with tuples" $ True `shouldBe` True + + it "can compile single field structs" $ do + let _ = SingleFieldFunctionData (OneTuple 123) + True `shouldBe` True diff --git a/packages/solidity/src/Language/Solidity/Abi.hs b/packages/solidity/src/Language/Solidity/Abi.hs index 771a00e8..e1f80b03 100644 --- a/packages/solidity/src/Language/Solidity/Abi.hs +++ b/packages/solidity/src/Language/Solidity/Abi.hs @@ -252,7 +252,7 @@ data SolidityType = SolidityBool | SolidityString | SolidityBytesN Int | SolidityBytes - | SolidityTuple Int [SolidityType] + | SolidityTuple [SolidityType] | SolidityVector [Int] SolidityType | SolidityArray SolidityType deriving (Eq, Show) @@ -329,9 +329,7 @@ solidityTypeParser = parseSolidityFunctionArgType :: FunctionArg -> Either ParseError SolidityType parseSolidityFunctionArgType (FunctionArg _ typ mcmps) = case mcmps of Nothing -> parse solidityTypeParser "Solidity" typ - Just cmps -> - SolidityTuple (length cmps) - <$> mapM parseSolidityFunctionArgType cmps + Just cmps -> SolidityTuple <$> mapM parseSolidityFunctionArgType cmps parseSolidityEventArgType :: EventArg -> Either ParseError SolidityType diff --git a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs index 129058f7..92210c8e 100644 --- a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs +++ b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs @@ -16,7 +16,7 @@ spec = parallel $ do ma = FunctionArg "makeAddress" "address" Nothing tupleFA = FunctionArg "order" "tuple" (Just [maa, ma]) eRes = parseSolidityFunctionArgType tupleFA - eRes `shouldBe` Right (SolidityTuple 2 [SolidityUint 256, SolidityAddress]) + eRes `shouldBe` Right (SolidityTuple [SolidityUint 256, SolidityAddress]) it "fails to parse a FunctionArg with invalid tuple" $ do let tupleFA = FunctionArg "order" "tuple" Nothing eRes = parseSolidityFunctionArgType tupleFA From a5d60e05d600067cd04e639d51254337ea4225b6 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves <2335822+alexfmpe@users.noreply.github.com> Date: Mon, 25 Jan 2021 08:04:01 +0000 Subject: [PATCH 185/237] Add missing ABI file (#107) --- .../ethereum/tests/contracts/SingleField.json | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 packages/ethereum/tests/contracts/SingleField.json diff --git a/packages/ethereum/tests/contracts/SingleField.json b/packages/ethereum/tests/contracts/SingleField.json new file mode 100644 index 00000000..5f218f41 --- /dev/null +++ b/packages/ethereum/tests/contracts/SingleField.json @@ -0,0 +1,25 @@ +{ + "schemaVersion": "2.0.0", + "contractName": "SingleField", + "compilerOutput": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "components": [ + { "name": "singleField", "type": "uint256" } + ], + "name": "SingleFieldStruct", + "type": "tuple" + } + ], + "name": "SingleFieldFunction", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ] + } +} From 992298ef06b01abcccab0abe961c67765ede29b3 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sat, 13 Feb 2021 04:21:49 +0300 Subject: [PATCH 186/237] Bump license to 2021 --- LICENSE | 2 +- examples/erc20/package.yaml | 2 +- examples/polkadot/package.yaml | 2 +- examples/scale/package.yaml | 2 +- packages/bignum/LICENSE | 2 +- packages/bignum/package.yaml | 2 +- packages/bignum/src/Data/BigNum.hs | 2 +- .../bignum/tests/Data/BigNum/Test/BigNumSpec.hs | 2 +- packages/crypto/LICENSE | 2 +- packages/crypto/package.yaml | 2 +- packages/crypto/src/Crypto/Ecdsa/Signature.hs | 2 +- packages/crypto/src/Crypto/Ecdsa/Utils.hs | 2 +- packages/crypto/src/Crypto/Ethereum.hs | 2 +- packages/crypto/src/Crypto/Ethereum/Keyfile.hs | 2 +- packages/crypto/src/Crypto/Ethereum/Signature.hs | 2 +- packages/crypto/src/Crypto/Ethereum/Utils.hs | 2 +- packages/crypto/src/Crypto/Random/HmacDrbg.hs | 2 +- packages/crypto/src/Data/Digest/Blake2.hs | 2 +- packages/crypto/src/Data/Digest/XXHash.hsc | 2 +- packages/crypto/src/cbits/xxhash.c | 2 +- packages/crypto/src/cbits/xxhash.h | 2 +- packages/ethereum/LICENSE | 2 +- packages/ethereum/package.yaml | 2 +- packages/ethereum/src/Network/Ethereum.hs | 2 +- packages/ethereum/src/Network/Ethereum/Account.hs | 2 +- .../ethereum/src/Network/Ethereum/Account/Class.hs | 2 +- .../src/Network/Ethereum/Account/Default.hs | 2 +- .../src/Network/Ethereum/Account/Internal.hs | 2 +- .../src/Network/Ethereum/Account/LocalKey.hs | 2 +- .../src/Network/Ethereum/Account/Personal.hs | 2 +- .../ethereum/src/Network/Ethereum/Account/Safe.hs | 2 +- packages/ethereum/src/Network/Ethereum/Api/Eth.hs | 2 +- packages/ethereum/src/Network/Ethereum/Api/Net.hs | 2 +- .../ethereum/src/Network/Ethereum/Api/Types.hs | 2 +- packages/ethereum/src/Network/Ethereum/Api/Web3.hs | 2 +- packages/ethereum/src/Network/Ethereum/Chain.hs | 2 +- packages/ethereum/src/Network/Ethereum/Contract.hs | 2 +- .../src/Network/Ethereum/Contract/Event.hs | 2 +- .../src/Network/Ethereum/Contract/Method.hs | 2 +- .../ethereum/src/Network/Ethereum/Contract/TH.hs | 2 +- packages/ethereum/src/Network/Ethereum/Ens.hs | 2 +- .../src/Network/Ethereum/Ens/PublicResolver.hs | 2 +- .../ethereum/src/Network/Ethereum/Ens/Registry.hs | 2 +- .../ethereum/src/Network/Ethereum/Transaction.hs | 2 +- packages/ethereum/src/Network/Ethereum/Unit.hs | 2 +- packages/hexstring/LICENSE | 2 +- packages/hexstring/package.yaml | 2 +- packages/hexstring/src/Data/ByteArray/HexString.hs | 2 +- packages/ipfs/LICENSE | 2 +- packages/ipfs/package.yaml | 2 +- packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Block.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Cid.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Config.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Core.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Dag.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Dht.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Files.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Internal.hs | 2 +- .../ipfs/src/Network/Ipfs/Api/Internal/Call.hs | 2 +- .../ipfs/src/Network/Ipfs/Api/Internal/Stream.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Key.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Log.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Object.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Pin.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Repo.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Stats.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Swarm.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Types.hs | 2 +- packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs | 2 +- packages/ipfs/src/Network/Ipfs/Client.hs | 2 +- packages/jsonrpc/LICENSE | 2 +- packages/jsonrpc/package.yaml | 2 +- packages/polkadot/LICENSE | 2 +- packages/polkadot/package.yaml | 2 +- packages/polkadot/src/Network/Polkadot.hs | 2 +- .../src/Network/Polkadot/Extrinsic/Signature.hs | 14 ++++++++++++++ packages/polkadot/src/Network/Polkadot/Metadata.hs | 2 +- .../src/Network/Polkadot/Metadata/MagicNumber.hs | 2 +- .../polkadot/src/Network/Polkadot/Metadata/Type.hs | 2 +- .../src/Network/Polkadot/Metadata/Type/Ast.hs | 2 +- .../Network/Polkadot/Metadata/Type/Discovery.hs | 2 +- .../src/Network/Polkadot/Metadata/Type/Parser.hs | 2 +- .../Polkadot/Metadata/Type/ParserCombinators.hs | 2 +- .../polkadot/src/Network/Polkadot/Metadata/V10.hs | 2 +- .../polkadot/src/Network/Polkadot/Metadata/V11.hs | 2 +- .../polkadot/src/Network/Polkadot/Metadata/V12.hs | 2 +- .../polkadot/src/Network/Polkadot/Metadata/V9.hs | 2 +- .../polkadot/src/Network/Polkadot/Primitives.hs | 2 +- packages/polkadot/src/Network/Polkadot/Query.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Account.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Author.hs | 2 +- packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Chain.hs | 2 +- .../src/Network/Polkadot/Rpc/Childstate.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Contracts.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Engine.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Grandpa.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Offchain.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Payment.hs | 2 +- packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/State.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/System.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Types.hs | 2 +- packages/polkadot/src/Network/Polkadot/Storage.hs | 2 +- .../polkadot/src/Network/Polkadot/Storage/Key.hs | 2 +- .../tests/Network/Polkadot/Test/MetadataSpec.hs | 2 +- .../tests/Network/Polkadot/Test/StorageSpec.hs | 2 +- packages/provider/LICENSE | 2 +- packages/provider/package.yaml | 2 +- packages/provider/src/Network/Web3/Provider.hs | 2 +- packages/scale/LICENSE | 2 +- packages/scale/package.yaml | 2 +- packages/scale/src/Codec/Scale.hs | 2 +- packages/scale/src/Codec/Scale/Class.hs | 2 +- packages/scale/src/Codec/Scale/Compact.hs | 2 +- packages/scale/src/Codec/Scale/Core.hs | 2 +- packages/scale/src/Codec/Scale/Generic.hs | 2 +- packages/scale/src/Codec/Scale/SingletonEnum.hs | 2 +- packages/scale/src/Codec/Scale/Skip.hs | 2 +- packages/scale/src/Codec/Scale/TH.hs | 2 +- packages/scale/tests/Codec/Scale/Test/CoreSpec.hs | 2 +- .../Codec/Scale/Test/SingleFieldStructSpec.hs | 2 +- packages/scale/tests/Codec/Scale/Test/SkipSpec.hs | 2 +- packages/solidity/LICENSE | 2 +- packages/solidity/package.yaml | 2 +- packages/solidity/src/Data/Solidity/Abi.hs | 2 +- packages/solidity/src/Data/Solidity/Abi/Codec.hs | 2 +- packages/solidity/src/Data/Solidity/Abi/Generic.hs | 2 +- packages/solidity/src/Data/Solidity/Event.hs | 2 +- .../solidity/src/Data/Solidity/Event/Internal.hs | 2 +- packages/solidity/src/Data/Solidity/Prim.hs | 2 +- .../solidity/src/Data/Solidity/Prim/Address.hs | 2 +- packages/solidity/src/Data/Solidity/Prim/Bool.hs | 2 +- packages/solidity/src/Data/Solidity/Prim/Bytes.hs | 2 +- packages/solidity/src/Data/Solidity/Prim/Int.hs | 2 +- packages/solidity/src/Data/Solidity/Prim/List.hs | 2 +- packages/solidity/src/Data/Solidity/Prim/String.hs | 2 +- packages/solidity/src/Data/Solidity/Prim/Tagged.hs | 2 +- packages/solidity/src/Data/Solidity/Prim/Tuple.hs | 2 +- .../solidity/src/Data/Solidity/Prim/Tuple/TH.hs | 2 +- packages/solidity/src/Language/Solidity/Abi.hs | 2 +- packages/web3/LICENSE | 2 +- packages/web3/package.yaml | 2 +- packages/web3/src/Network/Web3.hs | 2 +- 147 files changed, 160 insertions(+), 146 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs diff --git a/LICENSE b/LICENSE index ef9ef7ee..95f71d48 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/erc20/package.yaml b/examples/erc20/package.yaml index 3950c296..bf5889cc 100644 --- a/examples/erc20/package.yaml +++ b/examples/erc20/package.yaml @@ -5,7 +5,7 @@ github: "airalab/hs-web3" license: Apache-2.0 author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/examples/polkadot/package.yaml b/examples/polkadot/package.yaml index 539642c0..d7bf097a 100644 --- a/examples/polkadot/package.yaml +++ b/examples/polkadot/package.yaml @@ -5,7 +5,7 @@ github: "airalab/hs-web3" license: Apache-2.0 author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/examples/scale/package.yaml b/examples/scale/package.yaml index 035f8da5..98689a1e 100644 --- a/examples/scale/package.yaml +++ b/examples/scale/package.yaml @@ -5,7 +5,7 @@ github: "airalab/hs-web3" license: Apache-2.0 author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/bignum/LICENSE b/packages/bignum/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/bignum/LICENSE +++ b/packages/bignum/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index 262f90d1..7f5051bc 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/bignum/src/Data/BigNum.hs b/packages/bignum/src/Data/BigNum.hs index ee8655c4..f4e20b6a 100644 --- a/packages/bignum/src/Data/BigNum.hs +++ b/packages/bignum/src/Data/BigNum.hs @@ -3,7 +3,7 @@ -- | -- Module : Data.BigNum --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs index 9ef0a0dc..53e5456d 100644 --- a/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs +++ b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs @@ -2,7 +2,7 @@ -- | -- Module : Data.BigNum.Test.BigNumSpec --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/LICENSE b/packages/crypto/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/crypto/LICENSE +++ b/packages/crypto/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index 471e076f..dd6cf017 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network extra-source-files: diff --git a/packages/crypto/src/Crypto/Ecdsa/Signature.hs b/packages/crypto/src/Crypto/Ecdsa/Signature.hs index 22edba71..b753e644 100644 --- a/packages/crypto/src/Crypto/Ecdsa/Signature.hs +++ b/packages/crypto/src/Crypto/Ecdsa/Signature.hs @@ -2,7 +2,7 @@ -- | -- Module : Crypto.Ecdsa.Signature --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ecdsa/Utils.hs b/packages/crypto/src/Crypto/Ecdsa/Utils.hs index f762f764..224ae4cf 100644 --- a/packages/crypto/src/Crypto/Ecdsa/Utils.hs +++ b/packages/crypto/src/Crypto/Ecdsa/Utils.hs @@ -1,6 +1,6 @@ -- | -- Module : Crypto.Ecdsa.Utils --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ethereum.hs b/packages/crypto/src/Crypto/Ethereum.hs index a4fb95f4..10c8d7d1 100644 --- a/packages/crypto/src/Crypto/Ethereum.hs +++ b/packages/crypto/src/Crypto/Ethereum.hs @@ -1,6 +1,6 @@ -- | -- Module : Crypto.Ethereum --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ethereum/Keyfile.hs b/packages/crypto/src/Crypto/Ethereum/Keyfile.hs index a94eda48..1b2fbda4 100644 --- a/packages/crypto/src/Crypto/Ethereum/Keyfile.hs +++ b/packages/crypto/src/Crypto/Ethereum/Keyfile.hs @@ -4,7 +4,7 @@ -- | -- Module : Crypto.Ethereum.Keyfile --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ethereum/Signature.hs b/packages/crypto/src/Crypto/Ethereum/Signature.hs index 039472a6..0883ea8b 100644 --- a/packages/crypto/src/Crypto/Ethereum/Signature.hs +++ b/packages/crypto/src/Crypto/Ethereum/Signature.hs @@ -2,7 +2,7 @@ -- | -- Module : Crypto.Ecdsa.Signature --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ethereum/Utils.hs b/packages/crypto/src/Crypto/Ethereum/Utils.hs index c4bf330b..928e3fd4 100644 --- a/packages/crypto/src/Crypto/Ethereum/Utils.hs +++ b/packages/crypto/src/Crypto/Ethereum/Utils.hs @@ -1,6 +1,6 @@ -- | -- Module : Crypto.Ethereum.Utils --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Random/HmacDrbg.hs b/packages/crypto/src/Crypto/Random/HmacDrbg.hs index 48b6d4b7..8b48cf02 100644 --- a/packages/crypto/src/Crypto/Random/HmacDrbg.hs +++ b/packages/crypto/src/Crypto/Random/HmacDrbg.hs @@ -1,6 +1,6 @@ -- | -- Module : Crypto.Random.HmacDrbg --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Data/Digest/Blake2.hs b/packages/crypto/src/Data/Digest/Blake2.hs index 89701670..68c587d8 100644 --- a/packages/crypto/src/Data/Digest/Blake2.hs +++ b/packages/crypto/src/Data/Digest/Blake2.hs @@ -2,7 +2,7 @@ -- | -- Module : Data.Digest.Blake2 --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Data/Digest/XXHash.hsc b/packages/crypto/src/Data/Digest/XXHash.hsc index 68d3bd1c..a87e2f7e 100644 --- a/packages/crypto/src/Data/Digest/XXHash.hsc +++ b/packages/crypto/src/Data/Digest/XXHash.hsc @@ -3,7 +3,7 @@ -- | -- Module : Data.Digest.XXHash --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/cbits/xxhash.c b/packages/crypto/src/cbits/xxhash.c index 0fae88c5..083b039d 100644 --- a/packages/crypto/src/cbits/xxhash.c +++ b/packages/crypto/src/cbits/xxhash.c @@ -1,6 +1,6 @@ /* * xxHash - Extremely Fast Hash algorithm - * Copyright (C) 2012-2020 Yann Collet + * Copyright (C) 2012-2021 Yann Collet * * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) * diff --git a/packages/crypto/src/cbits/xxhash.h b/packages/crypto/src/cbits/xxhash.h index 2d56d23c..1b25f35a 100644 --- a/packages/crypto/src/cbits/xxhash.h +++ b/packages/crypto/src/cbits/xxhash.h @@ -1,7 +1,7 @@ /* * xxHash - Extremely Fast Hash algorithm * Header File - * Copyright (C) 2012-2020 Yann Collet + * Copyright (C) 2012-2021 Yann Collet * * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) * diff --git a/packages/ethereum/LICENSE b/packages/ethereum/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/ethereum/LICENSE +++ b/packages/ethereum/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index 74fe34f4..a08fa7c7 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/ethereum/src/Network/Ethereum.hs b/packages/ethereum/src/Network/Ethereum.hs index 0b2386b5..a2539c85 100644 --- a/packages/ethereum/src/Network/Ethereum.hs +++ b/packages/ethereum/src/Network/Ethereum.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account.hs b/packages/ethereum/src/Network/Ethereum/Account.hs index 9f7a7877..b1916188 100644 --- a/packages/ethereum/src/Network/Ethereum/Account.hs +++ b/packages/ethereum/src/Network/Ethereum/Account.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum.Account --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account/Class.hs b/packages/ethereum/src/Network/Ethereum/Account/Class.hs index bc27dbc8..c4736be1 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Class.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Class.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Account.Class --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account/Default.hs b/packages/ethereum/src/Network/Ethereum/Account/Default.hs index f1f59922..198c4c75 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Default.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Default.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Account.Default --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account/Internal.hs b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs index 57dd7016..6597dc2a 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Internal.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Account.Internal --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs b/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs index 248d5783..647fcd5c 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Account.LocalKey --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- Roy Blankman 2018 -- License : Apache-2.0 -- diff --git a/packages/ethereum/src/Network/Ethereum/Account/Personal.hs b/packages/ethereum/src/Network/Ethereum/Account/Personal.hs index 87b618dd..e5ea588b 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Personal.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Personal.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Ethereum.Account.Personal --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account/Safe.hs b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs index 064a81a4..56e67621 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Safe.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Ethereum.Account.Safe --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs index 3b4ff368..a1a2994d 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Web3.Eth --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Api/Net.hs b/packages/ethereum/src/Network/Ethereum/Api/Net.hs index 42f745d2..6f9fa760 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Net.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Net.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Api.Net --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Api/Types.hs b/packages/ethereum/src/Network/Ethereum/Api/Types.hs index 501086c3..800e06be 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Types.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Types.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Ethereum.Api.Types --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Api/Web3.hs b/packages/ethereum/src/Network/Ethereum/Api/Web3.hs index a1a531d9..5df6eff3 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Web3.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Web3.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Api.Web3 --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Chain.hs b/packages/ethereum/src/Network/Ethereum/Chain.hs index b91fbb4b..a3a87d41 100644 --- a/packages/ethereum/src/Network/Ethereum/Chain.hs +++ b/packages/ethereum/src/Network/Ethereum/Chain.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum.Chain --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Contract.hs b/packages/ethereum/src/Network/Ethereum/Contract.hs index e40e31be..449eae31 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Contract --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Contract/Event.hs b/packages/ethereum/src/Network/Ethereum/Contract/Event.hs index dc727be7..736e866d 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/Event.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/Event.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum.Contract.Event --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Contract/Method.hs b/packages/ethereum/src/Network/Ethereum/Contract/Method.hs index e2864bb2..8cb56c4b 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/Method.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/Method.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum.Contract.Method --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs index a81df80a..46683a30 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Ethereum.Contract.TH --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Ens.hs b/packages/ethereum/src/Network/Ethereum/Ens.hs index 8721eab3..f507e1a6 100644 --- a/packages/ethereum/src/Network/Ethereum/Ens.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Ethereum.Ens --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs b/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs index 9b090283..d704c4b5 100644 --- a/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs @@ -8,7 +8,7 @@ -- | -- Module : Network.Ethereum.Ens.PublicResolver --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs b/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs index 30e9ddec..2d31ee39 100644 --- a/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs @@ -8,7 +8,7 @@ -- | -- Module : Network.Ethereum.Ens.Registry --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Transaction.hs b/packages/ethereum/src/Network/Ethereum/Transaction.hs index 813533b8..7a5538bc 100644 --- a/packages/ethereum/src/Network/Ethereum/Transaction.hs +++ b/packages/ethereum/src/Network/Ethereum/Transaction.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Transaction --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- Roy Blankman 2018 -- License : Apache-2.0 -- diff --git a/packages/ethereum/src/Network/Ethereum/Unit.hs b/packages/ethereum/src/Network/Ethereum/Unit.hs index b10fe178..53fe8a7c 100644 --- a/packages/ethereum/src/Network/Ethereum/Unit.hs +++ b/packages/ethereum/src/Network/Ethereum/Unit.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Unit --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/hexstring/LICENSE b/packages/hexstring/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/hexstring/LICENSE +++ b/packages/hexstring/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index b4388f50..b2f8e7f8 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/hexstring/src/Data/ByteArray/HexString.hs b/packages/hexstring/src/Data/ByteArray/HexString.hs index b0ce1187..1e7df3ab 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString.hs @@ -5,7 +5,7 @@ -- | -- Module : Data.ByteArray.HexString --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/LICENSE b/packages/ipfs/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/ipfs/LICENSE +++ b/packages/ipfs/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/ipfs/package.yaml b/packages/ipfs/package.yaml index 1280de20..866da7a1 100644 --- a/packages/ipfs/package.yaml +++ b/packages/ipfs/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs b/packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs index 33e00628..f63114fe 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Bitswap --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Block.hs b/packages/ipfs/src/Network/Ipfs/Api/Block.hs index d5cdc660..26162638 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Block.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Block.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Ipfs.Api.Block --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs b/packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs index 97d8e9fe..e0a117e7 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Bootstrap --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Cid.hs b/packages/ipfs/src/Network/Ipfs/Api/Cid.hs index d17a43bb..253ba841 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Cid.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Cid.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Cid --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Config.hs b/packages/ipfs/src/Network/Ipfs/Api/Config.hs index 72057268..24405c73 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Config.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Config.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Ipfs.Api.Config --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Core.hs b/packages/ipfs/src/Network/Ipfs/Api/Core.hs index a435a409..05a984a6 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Core.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Core.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Ipfs.Api.Core --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Dag.hs b/packages/ipfs/src/Network/Ipfs/Api/Dag.hs index 59179056..e5f39eb2 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Dag.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Dag.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Ipfs.Api.Dag --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Dht.hs b/packages/ipfs/src/Network/Ipfs/Api/Dht.hs index 177c00f8..7a1650d2 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Dht.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Dht.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Dht --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Files.hs b/packages/ipfs/src/Network/Ipfs/Api/Files.hs index fc0bb0e2..15b050c6 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Files.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Files.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Ipfs.Api.Files --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Internal.hs b/packages/ipfs/src/Network/Ipfs/Api/Internal.hs index 90d005e1..c1ac1eb2 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Internal.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Internal.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Internal --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs b/packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs index 3b28f1f7..f3748734 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs @@ -7,7 +7,7 @@ -- | -- Module : Network.Ipfs.Api.Internal.Call --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs b/packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs index 3f015730..265964e9 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Internal.Stream --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Key.hs b/packages/ipfs/src/Network/Ipfs/Api/Key.hs index 4098c3ac..3692b67b 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Key.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Key.hs @@ -7,7 +7,7 @@ -- | -- Module : Network.Ipfs.Api.Key --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Log.hs b/packages/ipfs/src/Network/Ipfs/Api/Log.hs index fa893f11..25ac2742 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Log.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Log.hs @@ -7,7 +7,7 @@ -- | -- Module : Network.Ipfs.Api.Log --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Object.hs b/packages/ipfs/src/Network/Ipfs/Api/Object.hs index 062cff40..d2b8c30b 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Object.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Object.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Ipfs.Api.Object --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Pin.hs b/packages/ipfs/src/Network/Ipfs/Api/Pin.hs index 13827c18..2baa548d 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Pin.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Pin.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Pin --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs b/packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs index 89d9d7dd..1b4363c1 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Pubsub --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Repo.hs b/packages/ipfs/src/Network/Ipfs/Api/Repo.hs index f748bc33..31d831bb 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Repo.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Repo.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Repo --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Stats.hs b/packages/ipfs/src/Network/Ipfs/Api/Stats.hs index 64764b4f..67dfac85 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Stats.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Stats.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Stats --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Swarm.hs b/packages/ipfs/src/Network/Ipfs/Api/Swarm.hs index b998161b..809e0dd7 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Swarm.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Swarm.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ipfs.Api.Swarm --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Types.hs b/packages/ipfs/src/Network/Ipfs/Api/Types.hs index 4f9e4433..0219034d 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Types.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Types.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Ipfs.Api.Types --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs b/packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs index d2913950..670ebad6 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Ipfs.Api.Types.Stream --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ipfs/src/Network/Ipfs/Client.hs b/packages/ipfs/src/Network/Ipfs/Client.hs index eab18014..0bcc5e94 100644 --- a/packages/ipfs/src/Network/Ipfs/Client.hs +++ b/packages/ipfs/src/Network/Ipfs/Client.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Ipfs.Client --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/jsonrpc/LICENSE b/packages/jsonrpc/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/jsonrpc/LICENSE +++ b/packages/jsonrpc/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index 5bcd2d9f..9ec89d17 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/polkadot/LICENSE b/packages/polkadot/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/polkadot/LICENSE +++ b/packages/polkadot/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 150f33c6..83833d9f 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs index ea93aa64..4fb9fa69 100644 --- a/packages/polkadot/src/Network/Polkadot.hs +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs new file mode 100644 index 00000000..d8d0e515 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs @@ -0,0 +1,14 @@ +-- | +-- Module : Network.Polkadot.Signature +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- +-- + +module Network.Polkadot.Extrinsic.Signature where + diff --git a/packages/polkadot/src/Network/Polkadot/Metadata.hs b/packages/polkadot/src/Network/Polkadot/Metadata.hs index 07b538b5..4c39b570 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Metadata --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs index ca803f0b..7d32c08d 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Metadata.MagicNumber --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs index eb2f75c6..e39877ca 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot.Metadata.Type --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs index a9733435..17a2b3c1 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot.Metadata.Type.Ast --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs index 07c06df9..34848350 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs @@ -9,7 +9,7 @@ -- | -- Module : Network.Polkadot.Metadata.Type.Discovery --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs index 89f33493..84d1a249 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Polkadot.Metadata.Type.Parser --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs index 677fea14..a99c67c0 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Metadata.Type.ParserCombinators --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs index 1bfb0df2..0a1c2e7e 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Metadata.V10 --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs index 95708f2c..27974dca 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Metadata.V11 --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs index 166cd01c..075da540 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Metadata.V12 --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs index 0e38684d..accaf47b 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Polkadot.Metadata.V9 --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Primitives.hs b/packages/polkadot/src/Network/Polkadot/Primitives.hs index 2702cfcb..a979e0d4 100644 --- a/packages/polkadot/src/Network/Polkadot/Primitives.hs +++ b/packages/polkadot/src/Network/Polkadot/Primitives.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Primitives --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Query.hs b/packages/polkadot/src/Network/Polkadot/Query.hs index 08d527a1..d6bffb0d 100644 --- a/packages/polkadot/src/Network/Polkadot/Query.hs +++ b/packages/polkadot/src/Network/Polkadot/Query.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot.Query --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs index 17ead1a7..90955333 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Account --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs index 27e0a9f3..e4b6f53d 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Author --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs index 91749473..5312a26a 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Babe --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs index cdd331be..ffcbfafc 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Chain --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs index 42c1d561..c4e2bdaf 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Childstate --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs index 2fea5fde..a35cc614 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Contracts --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs index e031e93b..86483a71 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Engine --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs index 35e4b53c..299104e7 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Grandpa --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs index 9acfba3f..3206a5af 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Offchain --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs index 00d0188a..b50bd7ec 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Payment --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs index 88681461..bcf50c53 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Rpc --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/State.hs b/packages/polkadot/src/Network/Polkadot/Rpc/State.hs index 4465f2bc..9f45f951 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/State.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/State.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.State --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/System.hs b/packages/polkadot/src/Network/Polkadot/Rpc/System.hs index 40b73afc..49edaee5 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/System.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/System.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.System --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs index 9ef194ed..c1709d28 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Polkadot.Rpc.Types --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Storage.hs b/packages/polkadot/src/Network/Polkadot/Storage.hs index 0e019fa4..e4744228 100644 --- a/packages/polkadot/src/Network/Polkadot/Storage.hs +++ b/packages/polkadot/src/Network/Polkadot/Storage.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Polkadot.Storage --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs index 2446186f..7d06527b 100644 --- a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs +++ b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Storage.Key --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs index d96634f6..d1529522 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs @@ -3,7 +3,7 @@ -- | -- Module : Codec.Scale.Test.MetadataSpec --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs index 8d5d65d7..ab15b64e 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs @@ -3,7 +3,7 @@ -- | -- Module : Codec.Scale.Test.StorageSpec --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/provider/LICENSE b/packages/provider/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/provider/LICENSE +++ b/packages/provider/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml index 9c7404cf..3577062e 100644 --- a/packages/provider/package.yaml +++ b/packages/provider/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/provider/src/Network/Web3/Provider.hs b/packages/provider/src/Network/Web3/Provider.hs index a41551fc..e812b81e 100644 --- a/packages/provider/src/Network/Web3/Provider.hs +++ b/packages/provider/src/Network/Web3/Provider.hs @@ -7,7 +7,7 @@ -- | -- Module : Network.Web3.Provider --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/LICENSE b/packages/scale/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/scale/LICENSE +++ b/packages/scale/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index 01f8b74b..1d4eb5da 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/scale/src/Codec/Scale.hs b/packages/scale/src/Codec/Scale.hs index 01776c92..e4423495 100644 --- a/packages/scale/src/Codec/Scale.hs +++ b/packages/scale/src/Codec/Scale.hs @@ -2,7 +2,7 @@ -- | -- Module : Codec.Scale.Class --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Class.hs b/packages/scale/src/Codec/Scale/Class.hs index 71e270f3..6cd43217 100644 --- a/packages/scale/src/Codec/Scale/Class.hs +++ b/packages/scale/src/Codec/Scale/Class.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Class --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Compact.hs b/packages/scale/src/Codec/Scale/Compact.hs index 9afd7661..5d97ce1a 100644 --- a/packages/scale/src/Codec/Scale/Compact.hs +++ b/packages/scale/src/Codec/Scale/Compact.hs @@ -1,6 +1,6 @@ -- | -- Module : Codec.Scale.Compact --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Core.hs b/packages/scale/src/Codec/Scale/Core.hs index 09e93821..0e2ed63f 100644 --- a/packages/scale/src/Codec/Scale/Core.hs +++ b/packages/scale/src/Codec/Scale/Core.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Core --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Generic.hs b/packages/scale/src/Codec/Scale/Generic.hs index a50b084d..61c3706c 100644 --- a/packages/scale/src/Codec/Scale/Generic.hs +++ b/packages/scale/src/Codec/Scale/Generic.hs @@ -8,7 +8,7 @@ -- | -- Module : Codec.Scale.Generic --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/SingletonEnum.hs b/packages/scale/src/Codec/Scale/SingletonEnum.hs index df1601d8..dbc13672 100644 --- a/packages/scale/src/Codec/Scale/SingletonEnum.hs +++ b/packages/scale/src/Codec/Scale/SingletonEnum.hs @@ -1,6 +1,6 @@ -- | -- Module : Codec.Scale.SingletonEnum --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Skip.hs b/packages/scale/src/Codec/Scale/Skip.hs index ebda53e7..8411b9f1 100644 --- a/packages/scale/src/Codec/Scale/Skip.hs +++ b/packages/scale/src/Codec/Scale/Skip.hs @@ -1,6 +1,6 @@ -- | -- Module : Codec.Scale.Skip --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/TH.hs b/packages/scale/src/Codec/Scale/TH.hs index 84d5f6c6..5c0a0c1e 100644 --- a/packages/scale/src/Codec/Scale/TH.hs +++ b/packages/scale/src/Codec/Scale/TH.hs @@ -2,7 +2,7 @@ -- | -- Module : Codec.Scale.TH --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs index 2f51b180..736d9efb 100644 --- a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs @@ -5,7 +5,7 @@ -- | -- Module : Codec.Scale.Test.CoreSpec --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs b/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs index 0fc011dd..c0fbfc70 100644 --- a/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Test.SingleFieldStructSpec --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs index 66cf5d22..5fe7c4a4 100644 --- a/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Test.SkipSpec --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : BSD3 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/LICENSE b/packages/solidity/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/solidity/LICENSE +++ b/packages/solidity/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml index 6f581220..f0fd1d0f 100644 --- a/packages/solidity/package.yaml +++ b/packages/solidity/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/solidity/src/Data/Solidity/Abi.hs b/packages/solidity/src/Data/Solidity/Abi.hs index 6865e864..1cd97598 100644 --- a/packages/solidity/src/Data/Solidity/Abi.hs +++ b/packages/solidity/src/Data/Solidity/Abi.hs @@ -4,7 +4,7 @@ -- | -- Module : Data.Solidity.Abi --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Abi/Codec.hs b/packages/solidity/src/Data/Solidity/Abi/Codec.hs index 51e397a8..82fe0a7e 100644 --- a/packages/solidity/src/Data/Solidity/Abi/Codec.hs +++ b/packages/solidity/src/Data/Solidity/Abi/Codec.hs @@ -2,7 +2,7 @@ -- | -- Module : Data.Solidity.Abi.Codec --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Abi/Generic.hs b/packages/solidity/src/Data/Solidity/Abi/Generic.hs index 27c2fbc7..8f2f9a5f 100644 --- a/packages/solidity/src/Data/Solidity/Abi/Generic.hs +++ b/packages/solidity/src/Data/Solidity/Abi/Generic.hs @@ -9,7 +9,7 @@ -- | -- Module : Data.Solidity.Abi.Generic --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Event.hs b/packages/solidity/src/Data/Solidity/Event.hs index 09f5e249..6542eb6f 100644 --- a/packages/solidity/src/Data/Solidity/Event.hs +++ b/packages/solidity/src/Data/Solidity/Event.hs @@ -10,7 +10,7 @@ -- | -- Module : Data.Solidity.Event --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Event/Internal.hs b/packages/solidity/src/Data/Solidity/Event/Internal.hs index 7267036f..9c25c174 100644 --- a/packages/solidity/src/Data/Solidity/Event/Internal.hs +++ b/packages/solidity/src/Data/Solidity/Event/Internal.hs @@ -12,7 +12,7 @@ -- | -- Module : Data.Solidity.Event.Internal --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim.hs b/packages/solidity/src/Data/Solidity/Prim.hs index 0be0fba6..622839c0 100644 --- a/packages/solidity/src/Data/Solidity/Prim.hs +++ b/packages/solidity/src/Data/Solidity/Prim.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.Solidity.Prim --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Address.hs b/packages/solidity/src/Data/Solidity/Prim/Address.hs index eb4ed288..cb2385ee 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Address.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Address.hs @@ -4,7 +4,7 @@ -- | -- Module : Data.Solidity.Prim.Address --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Bool.hs b/packages/solidity/src/Data/Solidity/Prim/Bool.hs index f5f576af..3f0e174a 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Bool.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Bool.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.Solidity.Prim.Bool --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Bytes.hs b/packages/solidity/src/Data/Solidity/Prim/Bytes.hs index c7e99a9f..0781d0e3 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Bytes.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Bytes.hs @@ -8,7 +8,7 @@ -- | -- Module : Data.Solidity.Prim.Bytes --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Int.hs b/packages/solidity/src/Data/Solidity/Prim/Int.hs index 26956fb1..25106115 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Int.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Int.hs @@ -8,7 +8,7 @@ -- | -- Module : Data.Solidity.Prim.Int --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/List.hs b/packages/solidity/src/Data/Solidity/Prim/List.hs index 1712595b..1b3f9f21 100644 --- a/packages/solidity/src/Data/Solidity/Prim/List.hs +++ b/packages/solidity/src/Data/Solidity/Prim/List.hs @@ -4,7 +4,7 @@ -- | -- Module : Data.Solidity.Prim.List --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/String.hs b/packages/solidity/src/Data/Solidity/Prim/String.hs index f641684d..0bccf5f7 100644 --- a/packages/solidity/src/Data/Solidity/Prim/String.hs +++ b/packages/solidity/src/Data/Solidity/Prim/String.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.Solidity.Prim.String --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Tagged.hs b/packages/solidity/src/Data/Solidity/Prim/Tagged.hs index 2a1659dc..d6a10fe7 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Tagged.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tagged.hs @@ -3,7 +3,7 @@ -- | -- Module : Data.Solidity.Prim.Tagged --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Tuple.hs b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs index 5ecc0986..5ac5798b 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Tuple.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs @@ -5,7 +5,7 @@ -- | -- Module : Data.Solidity.Prim.Tuple --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs b/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs index 5a51a026..c9e83bf1 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs @@ -2,7 +2,7 @@ -- | -- Module : Data.Solidity.Prim.Tuple.TH --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Language/Solidity/Abi.hs b/packages/solidity/src/Language/Solidity/Abi.hs index e1f80b03..607d361f 100644 --- a/packages/solidity/src/Language/Solidity/Abi.hs +++ b/packages/solidity/src/Language/Solidity/Abi.hs @@ -5,7 +5,7 @@ -- | -- Module : Data.Solidity.Abi.Json --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/web3/LICENSE b/packages/web3/LICENSE index ef9ef7ee..0d8d1a8b 100644 --- a/packages/web3/LICENSE +++ b/packages/web3/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2020 Aleksandr Krupenkin +Copyright 2016-2021 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/web3/package.yaml b/packages/web3/package.yaml index bb465ad8..ec011d4b 100644 --- a/packages/web3/package.yaml +++ b/packages/web3/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2020" +copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: diff --git a/packages/web3/src/Network/Web3.hs b/packages/web3/src/Network/Web3.hs index 1953b998..1c378579 100644 --- a/packages/web3/src/Network/Web3.hs +++ b/packages/web3/src/Network/Web3.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Web3 --- Copyright : Aleksandr Krupenkin 2016-2020 +-- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me From ac45bcadf12e06ee4073728a0c0f4c89b79fa6b4 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 21 Mar 2021 07:10:31 +0300 Subject: [PATCH 187/237] Restructured hexstring package * Added H512 type into bignum package --- packages/bignum/package.yaml | 2 +- packages/bignum/src/Data/BigNum.hs | 82 ++++++++++++------- .../hexstring/src/Data/ByteArray/HexString.hs | 77 ++--------------- .../src/Data/ByteArray/HexString/Convert.hs | 52 ++++++++++++ .../src/Data/ByteArray/HexString/Internal.hs | 50 +++++++++++ .../src/Data/ByteArray/HexString/TH.hs | 30 +++++++ 6 files changed, 194 insertions(+), 99 deletions(-) create mode 100644 packages/hexstring/src/Data/ByteArray/HexString/Convert.hs create mode 100644 packages/hexstring/src/Data/ByteArray/HexString/Internal.hs create mode 100644 packages/hexstring/src/Data/ByteArray/HexString/TH.hs diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index 7f5051bc..15490a0f 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -15,8 +15,8 @@ dependencies: - memory >0.14 && <0.16 - cereal >0.5 && <0.6 - basement >0.0 && <0.1 -- bytestring >0.10 && <0.11 - web3-scale >=1.0 && <1.1 +- web3-hexstring >=1.0 && <1.1 ghc-options: - -funbox-strict-fields diff --git a/packages/bignum/src/Data/BigNum.hs b/packages/bignum/src/Data/BigNum.hs index f4e20b6a..74be2357 100644 --- a/packages/bignum/src/Data/BigNum.hs +++ b/packages/bignum/src/Data/BigNum.hs @@ -13,23 +13,22 @@ -- Big numbers and codecs for Haskell Web3 library. -- -module Data.BigNum (Word256, Word128, H256, h256) where - -import Basement.Block (Block) -import Basement.Types.Word128 (Word128 (..)) -import Basement.Types.Word256 (Word256 (..)) -import Codec.Scale () -import Codec.Scale.Class (Decode (..), Encode (..)) -import Data.ByteArray (ByteArrayAccess, convert) -import qualified Data.ByteArray as A (drop, length, take) -import Data.ByteArray.Encoding (Base (Base16), convertFromBase, - convertToBase) -import Data.ByteString (ByteString) -import Data.Maybe (fromJust) -import Data.Serialize.Get (getByteString) -import Data.Serialize.Put (putByteString) -import Data.String (IsString (..)) -import Data.Word (Word8) +module Data.BigNum (Word256, Word128, H256, h256, H512, h512) where + +import Basement.Block (Block) +import Basement.Types.Word128 (Word128 (..)) +import Basement.Types.Word256 (Word256 (..)) +import Codec.Scale () +import Codec.Scale.Class (Decode (..), Encode (..)) +import Data.ByteArray (ByteArrayAccess, convert) +import qualified Data.ByteArray as A (length) +import Data.ByteArray.HexString.Convert (FromHex (..), ToHex (..), + fromBytes) +import Data.Maybe (fromJust) +import Data.Serialize.Get (getByteString) +import Data.Serialize.Put (putByteString) +import Data.String (IsString (..)) +import Data.Word (Word8) instance Encode Word128 where put (Word128 l h)= put h >> put l @@ -53,7 +52,7 @@ instance Decode Word256 where return (Word256 lx hx l h) -- | 32 byte of data. -newtype H256 = H256 { unH256 :: Block Word8 } +newtype H256 = H256 (Block Word8) deriving (Eq, Ord, ByteArrayAccess) -- | Convert any 32 byte array into H256 type, otherwise returns Nothing. @@ -62,19 +61,16 @@ h256 ba | A.length ba == 32 = Just $ H256 (convert ba) | otherwise = Nothing -fromHex :: ByteString -> Either String H256 -fromHex bs | A.length bs' == 64 = H256 <$> convertFromBase Base16 bs' - | otherwise = Left "wrong length" - where - hexStart = convert ("0x" :: ByteString) - bs' | A.take 2 bs == hexStart = A.drop 2 bs - | otherwise = bs +instance FromHex H256 where + fromHex bs + | A.length bs == 32 = Right $ H256 (convert bs) + | otherwise = Left ("wrong length: " ++ show (A.length bs)) -toHex :: Block Word8 -> ByteString -toHex = ("0x" <>) . convertToBase Base16 +instance ToHex H256 where + toHex = fromBytes instance Show H256 where - show = show . toHex . unH256 + show = show . toHex instance IsString H256 where fromString = either error id . fromHex . fromString @@ -84,3 +80,33 @@ instance Encode H256 where instance Decode H256 where get = (fromJust . h256) <$> getByteString 32 + +-- | 64 byte of data. +newtype H512 = H512 (Block Word8) + deriving (Eq, Ord, ByteArrayAccess) + +-- | Convert any 64 byte array into H512 type, otherwise returns Nothing. +h512 :: ByteArrayAccess a => a -> Maybe H512 +h512 ba + | A.length ba == 64 = Just $ H512 (convert ba) + | otherwise = Nothing + +instance FromHex H512 where + fromHex bs + | A.length bs == 64 = Right $ H512 (convert bs) + | otherwise = Left ("wrong length: " ++ show (A.length bs)) + +instance ToHex H512 where + toHex = fromBytes + +instance Show H512 where + show = show . toHex + +instance IsString H512 where + fromString = either error id . fromHex . fromString + +instance Encode H512 where + put = putByteString . convert + +instance Decode H512 where + get = (fromJust . h512) <$> getByteString 64 diff --git a/packages/hexstring/src/Data/ByteArray/HexString.hs b/packages/hexstring/src/Data/ByteArray/HexString.hs index 1e7df3ab..26af1785 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString.hs @@ -1,8 +1,3 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE TemplateHaskell #-} - -- | -- Module : Data.ByteArray.HexString -- Copyright : Aleksandr Krupenkin 2016-2021 @@ -12,71 +7,13 @@ -- Stability : experimental -- Portability : unportable -- --- Hex string data type and useful functions. +-- Hex string data type top level module. -- -module Data.ByteArray.HexString where - -import Codec.Scale (Decode, Encode) -import Data.Aeson (FromJSON (..), ToJSON (..), - Value (String), withText) -import Data.ByteArray (ByteArray, ByteArrayAccess, convert) -import qualified Data.ByteArray as BA (drop, take) -import Data.ByteArray.Encoding (Base (Base16), convertFromBase, - convertToBase) -import Data.ByteString (ByteString) -import Data.String (IsString (..)) -import Data.Text (Text) -import Data.Text.Encoding (decodeUtf8, encodeUtf8) -import Language.Haskell.TH.Quote (QuasiQuoter (..), quoteFile) - --- | Represents a Hex string. Guarantees that all characters it contains --- are valid hex characters. -newtype HexString = HexString { unHexString :: ByteString } - deriving (Eq, Ord, Semigroup, Monoid, ByteArrayAccess, ByteArray, Encode, Decode) - -instance Show HexString where - show = ("HexString " ++) . show . toText - -instance IsString HexString where - fromString = hexString' . fromString - where - hexString' :: ByteString -> HexString - hexString' = either error id . hexString - -instance FromJSON HexString where - parseJSON = withText "HexString" $ either fail pure . hexString . encodeUtf8 - -instance ToJSON HexString where - toJSON = String . toText - --- | Smart constructor which trims '0x' and validates length is even. -hexString :: ByteArray ba => ba -> Either String HexString -hexString bs = HexString <$> convertFromBase Base16 bs' - where - hexStart = convert ("0x" :: ByteString) - bs' | BA.take 2 bs == hexStart = BA.drop 2 bs - | otherwise = bs - --- | Reads a raw bytes and converts to hex representation. -fromBytes :: ByteArrayAccess ba => ba -> HexString -fromBytes = HexString . convert - --- | Access to the raw bytes of 'HexString'. -toBytes :: ByteArray ba => HexString -> ba -toBytes = convert . unHexString - --- | Access to a 'Text' representation of the 'HexString' -toText :: HexString -> Text -toText = ("0x" <>) . decodeUtf8 . convertToBase Base16 . unHexString - -hexFrom :: QuasiQuoter -hexFrom = quoteFile hex +module Data.ByteArray.HexString + ( module Internal + , module Convert + ) where -hex :: QuasiQuoter -hex = QuasiQuoter - { quoteExp = \s -> [|fromString s :: HexString|] - , quotePat = undefined - , quoteType = undefined - , quoteDec = undefined - } +import Data.ByteArray.HexString.Convert as Convert +import Data.ByteArray.HexString.Internal as Internal diff --git a/packages/hexstring/src/Data/ByteArray/HexString/Convert.hs b/packages/hexstring/src/Data/ByteArray/HexString/Convert.hs new file mode 100644 index 00000000..825f3fac --- /dev/null +++ b/packages/hexstring/src/Data/ByteArray/HexString/Convert.hs @@ -0,0 +1,52 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Data.ByteArray.HexString.Convert +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- From/to hex conversion functions. +-- + +module Data.ByteArray.HexString.Convert where + +import Data.Aeson (FromJSON (..), ToJSON (..), + Value (String), withText) +import Data.ByteArray (ByteArray, ByteArrayAccess, + convert) +import Data.ByteArray.Encoding (Base (Base16), + convertToBase) +import Data.Text (Text) +import Data.Text.Encoding (decodeUtf8, encodeUtf8) + +import Data.ByteArray.HexString.Internal (HexString (..), hexString) + +-- | Convert type into it's hex representation. +class ToHex a where + toHex :: a -> HexString + +-- | Convert hex string into a type or return an error. +class FromHex a where + fromHex :: HexString -> Either String a + +-- | Reads a raw bytes and converts to hex representation. +fromBytes :: ByteArrayAccess ba => ba -> HexString +fromBytes = HexString . convert + +-- | Access to the raw bytes of 'HexString'. +toBytes :: ByteArray ba => HexString -> ba +toBytes = convert . unHexString + +-- | Access to a 'Text' representation of the 'HexString' +toText :: HexString -> Text +toText = ("0x" <>) . decodeUtf8 . convertToBase Base16 . unHexString + +instance FromJSON HexString where + parseJSON = withText "HexString" $ either fail pure . hexString . encodeUtf8 + +instance ToJSON HexString where + toJSON = String . toText diff --git a/packages/hexstring/src/Data/ByteArray/HexString/Internal.hs b/packages/hexstring/src/Data/ByteArray/HexString/Internal.hs new file mode 100644 index 00000000..e4204cc7 --- /dev/null +++ b/packages/hexstring/src/Data/ByteArray/HexString/Internal.hs @@ -0,0 +1,50 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Data.ByteArray.HexString.Internal +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Hex string data type. +-- + +module Data.ByteArray.HexString.Internal where + +import Codec.Scale (Decode, Encode) +import Data.ByteArray (ByteArray, ByteArrayAccess, convert) +import qualified Data.ByteArray as BA (drop, take) +import Data.ByteArray.Encoding (Base (Base16), convertFromBase, + convertToBase) +import Data.ByteString (ByteString) +import qualified Data.ByteString.Char8 as C8 (unpack) +import Data.String (IsString (..)) + +-- | Represents a Hex string. Guarantees that all characters it contains +-- are valid hex characters. +newtype HexString = HexString { unHexString :: ByteString } + deriving (Eq, Ord, Semigroup, Monoid, ByteArrayAccess, ByteArray, Encode, Decode) + +instance Show HexString where + show = ("0x" ++) . C8.unpack . unHexString' + where + unHexString' :: HexString -> ByteString + unHexString' = convertToBase Base16 . unHexString + +instance IsString HexString where + fromString = hexString' . fromString + where + hexString' :: ByteString -> HexString + hexString' = either error id . hexString + +-- | Smart constructor which trims '0x' and validates length is even. +hexString :: ByteArray ba => ba -> Either String HexString +hexString bs = HexString <$> convertFromBase Base16 bs' + where + hexStart = convert ("0x" :: ByteString) + bs' | BA.take 2 bs == hexStart = BA.drop 2 bs + | otherwise = bs diff --git a/packages/hexstring/src/Data/ByteArray/HexString/TH.hs b/packages/hexstring/src/Data/ByteArray/HexString/TH.hs new file mode 100644 index 00000000..fbcafe7a --- /dev/null +++ b/packages/hexstring/src/Data/ByteArray/HexString/TH.hs @@ -0,0 +1,30 @@ +{-# LANGUAGE QuasiQuotes #-} +{-# LANGUAGE TemplateHaskell #-} + +-- | +-- Module : Data.ByteArray.HexString.TH +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Hex string template haskell helpers. +-- + +module Data.ByteArray.HexString.TH where + +import Data.ByteArray.HexString.Internal (HexString) +import Language.Haskell.TH.Quote (QuasiQuoter (..), quoteFile) + +hexFrom :: QuasiQuoter +hexFrom = quoteFile hex + +hex :: QuasiQuoter +hex = QuasiQuoter + { quoteExp = \s -> [|fromString s :: HexString|] + , quotePat = undefined + , quoteType = undefined + , quoteDec = undefined + } From e6719ae384d2371a342f03afa3634921f4a8cd37 Mon Sep 17 00:00:00 2001 From: Echo Nolan Date: Fri, 2 Apr 2021 19:49:18 -0700 Subject: [PATCH 188/237] Widen dependency version bounds (#108) --- packages/bignum/package.yaml | 2 +- packages/crypto/package.yaml | 4 ++-- packages/ethereum/package.yaml | 6 +++--- packages/hexstring/package.yaml | 6 +++--- packages/ipfs/package.yaml | 8 ++++---- packages/jsonrpc/package.yaml | 4 ++-- packages/polkadot/package.yaml | 4 ++-- packages/provider/package.yaml | 2 +- packages/scale/package.yaml | 4 ++-- packages/solidity/package.yaml | 6 +++--- packages/web3/package.yaml | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index 262f90d1..347caec3 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - memory >0.14 && <0.16 - cereal >0.5 && <0.6 - basement >0.0 && <0.1 diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index 471e076f..ea7953e1 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -15,9 +15,9 @@ extra-source-files: - src/cbits/xxhash.c dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - text >1.2 && <1.3 -- aeson >1.2 && <1.5 +- aeson >1.2 && <1.6 - memory >0.14 && <0.16 - uuid-types >1.0 && <1.1 - cryptonite >0.22 && <0.28 diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index 74fe34f4..e8dc7fb0 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -11,10 +11,10 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - text >1.2 && <1.3 - vinyl >0.5 && <0.14 -- aeson >1.2 && <1.5 +- aeson >1.2 && <1.6 - tagged >0.8 && <0.9 - memory >0.14 && <0.16 - relapse >=1.0 && <2.0 @@ -27,7 +27,7 @@ dependencies: - data-default >0.7 && <0.8 - transformers >0.5 && <0.6 - microlens-aeson >2.2 && <2.4 -- template-haskell >2.11 && <2.16 +- template-haskell >2.11 && <2.17 - mtl >2.2 && <2.3 - web3-crypto >=1.0 && <1.1 - web3-jsonrpc >=1.0 && <1.1 diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index b4388f50..10b6e4b8 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -11,12 +11,12 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - text >1.2 && <1.3 -- aeson >1.2 && <1.5 +- aeson >1.2 && <1.6 - memory >0.14 && <0.16 - bytestring >0.10 && <0.11 -- template-haskell >2.11 && <2.16 +- template-haskell >2.11 && <2.17 - web3-scale >=1.0 && <1.1 ghc-options: diff --git a/packages/ipfs/package.yaml b/packages/ipfs/package.yaml index 1280de20..3c75f901 100644 --- a/packages/ipfs/package.yaml +++ b/packages/ipfs/package.yaml @@ -11,17 +11,17 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - mtl >2.2 && <2.3 - tar >0.4 && <0.6 - text >1.2 && <1.3 -- aeson >1.2 && <1.5 -- servant >0.12 && <0.17 +- aeson >1.2 && <1.6 +- servant >0.12 && <0.19 - http-media >0.6 && <0.8.1 - bytestring >0.10 && <0.11 - http-types >0.11 && <0.14 - http-client >0.5 && <0.7 -- servant-client >0.12 && <0.17 +- servant-client >0.12 && <0.19 - unordered-containers >0.1 && <0.3 ghc-options: diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index 5bcd2d9f..21868e8f 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -11,9 +11,9 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - text >1.2 && <1.3 -- aeson >1.2 && <1.5 +- aeson >1.2 && <1.6 - random >1.0 && <1.2 - bytestring >0.10 && <0.11 - exceptions >0.8 && <0.11 diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 150f33c6..a69e1fb9 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -12,9 +12,9 @@ category: Network dependencies: - mtl >2.2 && <2.3 -- base >4.11 && <4.14 +- base >4.11 && <4.15 - text >1.2 && <1.3 -- aeson >1.2 && <1.5 +- aeson >1.2 && <1.6 - parsec >3.0 && <3.2 - memory >0.14 && <0.16 - microlens >0.4 && <0.5 diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml index 9c7404cf..769f4370 100644 --- a/packages/provider/package.yaml +++ b/packages/provider/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - mtl >2.2 && <2.3 - text >1.2 && <1.3 - async >2.1 && <2.3 diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index 01f8b74b..a8f30f20 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - text >1.2 && <1.3 - cereal >0.5 && <0.6 - bitvec >1.0 && <2.0 @@ -20,7 +20,7 @@ dependencies: - bytestring >0.10 && <0.11 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.16 +- template-haskell >2.11 && <2.17 ghc-options: - -funbox-strict-fields diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml index 6f581220..d4ae11fe 100644 --- a/packages/solidity/package.yaml +++ b/packages/solidity/package.yaml @@ -11,9 +11,9 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - text >1.2 && <1.3 -- aeson >1.2 && <1.5 +- aeson >1.2 && <1.6 - cereal >0.5 && <0.6 - memory >0.14 && <0.16 - tagged >0.8 && <0.9 @@ -24,7 +24,7 @@ dependencies: - bytestring >0.10 && <0.11 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.16 +- template-haskell >2.11 && <2.17 - web3-crypto >=1.0 && <1.1 - web3-hexstring >=1.0 && <1.1 diff --git a/packages/web3/package.yaml b/packages/web3/package.yaml index bb465ad8..251ca1f9 100644 --- a/packages/web3/package.yaml +++ b/packages/web3/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2020" category: Network dependencies: -- base >4.11 && <4.14 +- base >4.11 && <4.15 - web3-provider >=1.0 && <1.1 - web3-ethereum >=1.0 && <1.1 - web3-polkadot >=1.0 && <1.1 From dab74bfb538cd2712df4c9d98bacfd586cdca5c7 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 16 Jul 2021 09:02:12 +0300 Subject: [PATCH 189/237] bignum: added H160 type and tests --- packages/bignum/src/Data/BigNum.hs | 32 ++++++++++++++- .../tests/Data/BigNum/Test/BigNumSpec.hs | 40 ++++++++++++++++++- 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/packages/bignum/src/Data/BigNum.hs b/packages/bignum/src/Data/BigNum.hs index 74be2357..b2013aa5 100644 --- a/packages/bignum/src/Data/BigNum.hs +++ b/packages/bignum/src/Data/BigNum.hs @@ -13,7 +13,7 @@ -- Big numbers and codecs for Haskell Web3 library. -- -module Data.BigNum (Word256, Word128, H256, h256, H512, h512) where +module Data.BigNum (Word256, Word128, H160, h160, H256, h256, H512, h512) where import Basement.Block (Block) import Basement.Types.Word128 (Word128 (..)) @@ -51,6 +51,36 @@ instance Decode Word256 where lx <- get return (Word256 lx hx l h) +-- | 20 byte of data. +newtype H160 = H160 (Block Word8) + deriving (Eq, Ord, ByteArrayAccess) + +-- | Convert any 20 byte array into H160 type, otherwise returns Nothing. +h160 :: ByteArrayAccess a => a -> Maybe H160 +h160 ba + | A.length ba == 20 = Just $ H160 (convert ba) + | otherwise = Nothing + +instance FromHex H160 where + fromHex bs + | A.length bs == 20 = Right $ H160 (convert bs) + | otherwise = Left ("wrong length: " ++ show (A.length bs)) + +instance ToHex H160 where + toHex = fromBytes + +instance Show H160 where + show = show . toHex + +instance IsString H160 where + fromString = either error id . fromHex . fromString + +instance Encode H160 where + put = putByteString . convert + +instance Decode H160 where + get = (fromJust . h160) <$> getByteString 20 + -- | 32 byte of data. newtype H256 = H256 (Block Word8) deriving (Eq, Ord, ByteArrayAccess) diff --git a/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs index 53e5456d..1582cda8 100644 --- a/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs +++ b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs @@ -19,7 +19,7 @@ import Control.Monad (forM_) import Data.ByteArray.HexString (HexString) import Test.Hspec -import Data.BigNum (H256) +import Data.BigNum (H160, H256, H512) u128_TEST_VECTORS :: [(Word128, HexString)] u128_TEST_VECTORS = @@ -93,6 +93,18 @@ u256_TEST_VECTORS = , (75287059147291008379624862024819049134592, "0x007a9e91c390ec87c0b8e9c1e529b03fdd000000000000000000000000000000") ] +h160_TEST_VECTORS :: [(H160, HexString)] +h160_TEST_VECTORS = + [ ("0x52908400098527886E0F7030069857D2E4169EE7", "0x52908400098527886E0F7030069857D2E4169EE7") + , ("0x8617E340B3D01FA5F11F306F4090FD50E238070D", "0x8617E340B3D01FA5F11F306F4090FD50E238070D") + , ("0xde709f2102306220921060314715629080e2fb77", "0xde709f2102306220921060314715629080e2fb77") + , ("0x27b1fdb04752bbc536007a920d24acb045561c26", "0x27b1fdb04752bbc536007a920d24acb045561c26") + , ("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed") + , ("0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359", "0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359") + , ("0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB", "0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB") + , ("0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb", "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb") + ] + h256_TEST_VECTORS :: [(H256, HexString)] h256_TEST_VECTORS = [ ("0xfe700a084ea8882a6661724f3f3277ef5ea9df17cd5291f80c492e537b868518", "0xfe700a084ea8882a6661724f3f3277ef5ea9df17cd5291f80c492e537b868518") @@ -111,6 +123,24 @@ h256_TEST_VECTORS = , ("0xb9ccbe3823df8602145555f2c6e2e33cfc1cad5c6e053f929c68324a3627d59a", "0xb9ccbe3823df8602145555f2c6e2e33cfc1cad5c6e053f929c68324a3627d59a") ] +h512_TEST_VECTORS :: [(H512, HexString)] +h512_TEST_VECTORS = + [ ("0xfe700a084ea8882a6661724f3f3277ef5ea9df17cd5291f80c492e537b868518fe700a084ea8882a6661724f3f3277ef5ea9df17cd5291f80c492e537b868518", "0xfe700a084ea8882a6661724f3f3277ef5ea9df17cd5291f80c492e537b868518fe700a084ea8882a6661724f3f3277ef5ea9df17cd5291f80c492e537b868518") + , ("0xabeedc76bd314edcca6c7fedc0414d05a4979bbd8e17fd4f5d300a9afd953b24abeedc76bd314edcca6c7fedc0414d05a4979bbd8e17fd4f5d300a9afd953b24", "0xabeedc76bd314edcca6c7fedc0414d05a4979bbd8e17fd4f5d300a9afd953b24abeedc76bd314edcca6c7fedc0414d05a4979bbd8e17fd4f5d300a9afd953b24") + , ("0xf1555b382428aeadafa3b9cf4bbd4811d1dac92941c1d741078923844e867c33f1555b382428aeadafa3b9cf4bbd4811d1dac92941c1d741078923844e867c33", "0xf1555b382428aeadafa3b9cf4bbd4811d1dac92941c1d741078923844e867c33f1555b382428aeadafa3b9cf4bbd4811d1dac92941c1d741078923844e867c33") + , ("0xd959976b19068248aa287290ae7f1c363fcab571c1775dfa16291ecf97d38e11d959976b19068248aa287290ae7f1c363fcab571c1775dfa16291ecf97d38e11", "0xd959976b19068248aa287290ae7f1c363fcab571c1775dfa16291ecf97d38e11d959976b19068248aa287290ae7f1c363fcab571c1775dfa16291ecf97d38e11") + , ("0x2fd7571b66c46c901984e148071b8fe30a5a65cc4a08c3f98b4a753abce3e40b2fd7571b66c46c901984e148071b8fe30a5a65cc4a08c3f98b4a753abce3e40b", "0x2fd7571b66c46c901984e148071b8fe30a5a65cc4a08c3f98b4a753abce3e40b2fd7571b66c46c901984e148071b8fe30a5a65cc4a08c3f98b4a753abce3e40b") + , ("0xb09d4a38b291296c08a1b369ca898bfe594fa64bcc942ee5ce18511edb9bbd42b09d4a38b291296c08a1b369ca898bfe594fa64bcc942ee5ce18511edb9bbd42", "0xb09d4a38b291296c08a1b369ca898bfe594fa64bcc942ee5ce18511edb9bbd42b09d4a38b291296c08a1b369ca898bfe594fa64bcc942ee5ce18511edb9bbd42") + , ("0x9afd0350d2b7c8d3972478bf76c9c782d587ff3918524ed5de7753cf753862539afd0350d2b7c8d3972478bf76c9c782d587ff3918524ed5de7753cf75386253", "0x9afd0350d2b7c8d3972478bf76c9c782d587ff3918524ed5de7753cf753862539afd0350d2b7c8d3972478bf76c9c782d587ff3918524ed5de7753cf75386253") + , ("0xebaf4fcbaa6375fa7b6e5fc96166c34ee774221f2f641fdc1b13300306a54b66ebaf4fcbaa6375fa7b6e5fc96166c34ee774221f2f641fdc1b13300306a54b66", "0xebaf4fcbaa6375fa7b6e5fc96166c34ee774221f2f641fdc1b13300306a54b66ebaf4fcbaa6375fa7b6e5fc96166c34ee774221f2f641fdc1b13300306a54b66") + , ("0x49f7d9bda63d100a60e72b3b5df09f7b19bbe4bf7bb8fd6009ab3bf74c38b4f549f7d9bda63d100a60e72b3b5df09f7b19bbe4bf7bb8fd6009ab3bf74c38b4f5", "0x49f7d9bda63d100a60e72b3b5df09f7b19bbe4bf7bb8fd6009ab3bf74c38b4f549f7d9bda63d100a60e72b3b5df09f7b19bbe4bf7bb8fd6009ab3bf74c38b4f5") + , ("0x71b4b1615d1c35332d222abd08008c881aa28975e0f4088ba412fcd6b506eb3071b4b1615d1c35332d222abd08008c881aa28975e0f4088ba412fcd6b506eb30", "0x71b4b1615d1c35332d222abd08008c881aa28975e0f4088ba412fcd6b506eb3071b4b1615d1c35332d222abd08008c881aa28975e0f4088ba412fcd6b506eb30") + , ("0xc850252c4c0a14ca0a55bc04077b998139d741ac3ed88db628e02468f3fcc3e6c850252c4c0a14ca0a55bc04077b998139d741ac3ed88db628e02468f3fcc3e6", "0xc850252c4c0a14ca0a55bc04077b998139d741ac3ed88db628e02468f3fcc3e6c850252c4c0a14ca0a55bc04077b998139d741ac3ed88db628e02468f3fcc3e6") + , ("0x0ae755268da527700201a1b042655f3fde1d9f4bfe990be1998b683d3d5c65970ae755268da527700201a1b042655f3fde1d9f4bfe990be1998b683d3d5c6597", "0x0ae755268da527700201a1b042655f3fde1d9f4bfe990be1998b683d3d5c65970ae755268da527700201a1b042655f3fde1d9f4bfe990be1998b683d3d5c6597") + , ("0xf8caf1ee78b44e90d5dfd99cdcbe0f3b0d45b7d964ce93f60ecfa9af0dc4d1eef8caf1ee78b44e90d5dfd99cdcbe0f3b0d45b7d964ce93f60ecfa9af0dc4d1ee", "0xf8caf1ee78b44e90d5dfd99cdcbe0f3b0d45b7d964ce93f60ecfa9af0dc4d1eef8caf1ee78b44e90d5dfd99cdcbe0f3b0d45b7d964ce93f60ecfa9af0dc4d1ee") + , ("0xb9ccbe3823df8602145555f2c6e2e33cfc1cad5c6e053f929c68324a3627d59ab9ccbe3823df8602145555f2c6e2e33cfc1cad5c6e053f929c68324a3627d59a", "0xb9ccbe3823df8602145555f2c6e2e33cfc1cad5c6e053f929c68324a3627d59ab9ccbe3823df8602145555f2c6e2e33cfc1cad5c6e053f929c68324a3627d59a") + ] + spec :: Spec spec = parallel $ do describe "SCALE tests" $ do @@ -122,6 +152,14 @@ spec = parallel $ do encode x `shouldBe` l decode l `shouldBe` Right x + it "H160 test vectors" $ forM_ h160_TEST_VECTORS $ \(x, l) -> do + encode x `shouldBe` l + decode l `shouldBe` Right x + it "H256 test vectors" $ forM_ h256_TEST_VECTORS $ \(x, l) -> do encode x `shouldBe` l decode l `shouldBe` Right x + + it "H512 test vectors" $ forM_ h512_TEST_VECTORS $ \(x, l) -> do + encode x `shouldBe` l + decode l `shouldBe` Right x From 7f9d498dc6cced91fbb2680636f3d443c45d3d50 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 16 Jul 2021 09:02:34 +0300 Subject: [PATCH 190/237] scale: a bit more descriptive errors --- packages/scale/src/Codec/Scale/Generic.hs | 2 +- packages/scale/tests/Codec/Scale/Test/CoreSpec.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/scale/src/Codec/Scale/Generic.hs b/packages/scale/src/Codec/Scale/Generic.hs index 61c3706c..165a7667 100644 --- a/packages/scale/src/Codec/Scale/Generic.hs +++ b/packages/scale/src/Codec/Scale/Generic.hs @@ -66,7 +66,7 @@ instance EnumParser as => EnumParser (a ': as) where -- When index out of type scope raise the error. instance EnumParser '[] where - enumParser _ = fail "wrong prefix during enum decoding" + enumParser i = fail ("index out of enum constructors count: " ++ show i) -- Decode enum when multiple sum types. instance ( GDecode (NP f xs) diff --git a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs index 736d9efb..9ee54155 100644 --- a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs @@ -177,7 +177,7 @@ spec = parallel $ do decode encoded_b `shouldBe` Right sb decode encoded_c `shouldBe` Right sc - decode ("\x0a" :: ByteString) `shouldBe` (Left "Failed reading: wrong prefix during enum decoding\nEmpty call stack\n" :: Either String EnumType) + decode ("\x0a" :: ByteString) `shouldBe` (Left "Failed reading: index out of enum constructors count: 7\nEmpty call stack\n" :: Either String EnumType) it "should_derive_encode" $ do let v :: TestType From 3d0989fcc628402ec0038d1b8b708efe1e1100a7 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 16 Jul 2021 09:04:19 +0300 Subject: [PATCH 191/237] crypto: added BIP39 support --- packages/crypto/package.yaml | 2 + packages/crypto/src/Crypto/Bip39.hs | 550 ++++++++++++++++++ .../src/Data/ByteArray/HexString/TH.hs | 1 + 3 files changed, 553 insertions(+) create mode 100644 packages/crypto/src/Crypto/Bip39.hs diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index dd6cf017..b1a3737c 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -19,6 +19,8 @@ dependencies: - text >1.2 && <1.3 - aeson >1.2 && <1.5 - memory >0.14 && <0.16 +- vector >0.12 && <0.13 +- containers >0.6 && <0.7 - uuid-types >1.0 && <1.1 - cryptonite >0.22 && <0.28 - bytestring >0.10 && <0.11 diff --git a/packages/crypto/src/Crypto/Bip39.hs b/packages/crypto/src/Crypto/Bip39.hs new file mode 100644 index 00000000..f58d26d6 --- /dev/null +++ b/packages/crypto/src/Crypto/Bip39.hs @@ -0,0 +1,550 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Crypto.Bip39 +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Mnemonic keys (BIP-39). Only English dictionary. +-- Thanks to Haskoin project . +-- + +module Crypto.Bip39 + ( -- * Mnemonic Sentences + Entropy + , Mnemonic + , Passphrase + , Seed + , toMnemonic + , fromMnemonic + , mnemonicToSeed + ) where + +import Control.Monad (when) +import Crypto.Hash (SHA256 (..), hashWith) +import Crypto.KDF.PBKDF2 (Parameters (..), fastPBKDF2_SHA512) +import Data.Bits (shiftL, shiftR, (.&.), (.|.)) +import qualified Data.ByteArray as BA +import Data.ByteString (ByteString) +import qualified Data.ByteString as BS +import Data.List +import qualified Data.Map.Strict as M +import Data.Maybe +import Data.Text (Text) +import qualified Data.Text as T +import qualified Data.Text.Encoding as E +import Data.Vector (Vector, (!)) +import qualified Data.Vector as V +import Data.Word (Word8) + +-- | Random data used to create a mnemonic sentence. Use a good entropy source. +-- You will get your coins stolen if you don't. You have been warned. +type Entropy = ByteString + +-- | Human-readable mnemonic sentence. +type Mnemonic = Text + +-- | Optional passphrase for mnemnoic sentence. +type Passphrase = Text + +-- | Seed for a private key from a mnemonic sentence. +type Seed = ByteString + +-- | Mnemonic key checksum. +type Checksum = ByteString + +-- | Paremeters for PBKDF2 function. +pbkdfParams :: Parameters +pbkdfParams = Parameters {iterCounts = 2048, outputLength = 64} + +-- | Provide intial 'Entropy' as a 'ByteString' of length multiple of 4 bytes. +-- Output a 'Mnemonic' sentence. +toMnemonic :: Entropy -> Either String Mnemonic +toMnemonic ent = do + when (BS.null ent) $ + Left "toMnemonic: entropy can not be empty" + when (remainder /= 0) $ + Left "toMnemonic: entropy must be multiples of 4 bytes" + when (cs_len > 16) $ + Left "toMnemonic: maximum entropy is 64 bytes (512 bits)" + return ms + where + (cs_len, remainder) = BS.length ent `quotRem` 4 + c = calcCS cs_len ent + indices = bsToIndices $ ent `BS.append` c + ms = T.unwords $ map (wl!) indices + +-- | Revert 'toMnemonic'. Do not use this to generate a 'Seed'. Instead use +-- 'mnemonicToSeed'. This outputs the original 'Entropy' used to generate a +-- 'Mnemonic' sentence. +fromMnemonic :: Mnemonic -> Either String Entropy +fromMnemonic ms = do + when (T.null ms) $ + Left "fromMnemonic: empty mnemonic" + when (word_count > 48) $ + Left $ "fromMnemonic: too many words: " ++ show word_count + when (word_count `mod` 3 /= 0) $ + Left $ "fromMnemonic: wrong number of words:" ++ show word_count + ms_bs <- indicesToBS =<< getIndices ms_words + let (ms_ent, ms_cs) = BS.splitAt (ent_len * 4) ms_bs + ms_cs_num = numCS cs_len ms_cs + ent_cs_num = numCS cs_len $ calcCS cs_len ms_ent + when (ent_cs_num /= ms_cs_num) $ + Left $ "fromMnemonic: checksum failed: " ++ sh ent_cs_num ms_cs_num + return ms_ent + where + ms_words = T.words ms + word_count = length ms_words + (ent_len, cs_len) = (word_count * 11) `quotRem` 32 + sh cs_a cs_b = show cs_a ++ " /= " ++ show cs_b + +-- | Compute 'Checksum'. +calcCS :: Int -> Entropy -> Checksum +calcCS len = getBits len . BA.convert . hashWith SHA256 + +numCS :: Int -> Entropy -> Integer +numCS len = + shiftCS . bsToInteger + where + shiftCS = case 8 - len `mod` 8 of + 8 -> id + x -> flip shiftR x + +-- | Turn an arbitrary sequence of characters into a 512-bit 'Seed'. Use +-- 'mnemonicToSeed' to get a seed from a 'Mnemonic' sentence. Warning: Does not +-- perform NFKD normalization. +anyToSeed :: Passphrase -> Mnemonic -> Seed +anyToSeed pf ms = + fastPBKDF2_SHA512 + pbkdfParams + (E.encodeUtf8 ms) + ("mnemonic" `mappend` E.encodeUtf8 pf) + +-- | Get a 512-bit 'Seed' from a 'Mnemonic' sentence. Will validate checksum. +-- 'Passphrase' can be used to protect the 'Mnemonic'. Use an empty string as +-- 'Passphrase' if none is required. +mnemonicToSeed :: Passphrase -> Mnemonic -> Either String Seed +mnemonicToSeed pf ms = do + ent <- fromMnemonic ms + mnm <- toMnemonic ent + return $ anyToSeed pf mnm + +-- | Get indices of words in word list. +getIndices :: [Text] -> Either String [Int] +getIndices ws + | null n = return $ catMaybes i + | otherwise = Left $ "getIndices: words not found: " ++ show w + where + i = map (`M.lookup` wl') ws + n = elemIndices Nothing i + w = T.unwords $ map (ws !!) n + +-- | Turn a list of 11-bit numbers into a 'ByteString' +indicesToBS :: [Int] -> Either String ByteString +indicesToBS is = do + when lrg $ Left "indicesToBS: index larger or equal than 2048" + return . pad . integerToBS $ foldl' f 0 is `shiftL` shift_width + where + lrg = isJust $ find (>= 2048) is + (q, r) = (length is * 11) `quotRem` 8 + shift_width = + if r == 0 + then 0 + else 8 - r + bl = + if r == 0 + then q + else q + 1 -- length of resulting ByteString + pad bs = BS.append (BS.replicate (bl - BS.length bs) 0x00) bs + f acc x = (acc `shiftL` 11) + fromIntegral x + +-- | Turn a 'ByteString' into a list of 11-bit numbers. +bsToIndices :: ByteString -> [Int] +bsToIndices bs = + reverse . go q $ bsToInteger bs `shiftR` r + where + (q, r) = (BS.length bs * 8) `quotRem` 11 + go 0 _ = [] + go n i = fromIntegral (i `mod` 2048) : go (n - 1) (i `shiftR` 11) + +wl' :: M.Map Text Int +wl' = V.ifoldr' (\i w m -> M.insert w i m) M.empty wl + +-- | Standard English dictionary from BIP-39 specification. +wl :: Vector Text +wl = V.fromListN 2048 + [ "abandon", "ability", "able", "about", "above", "absent" + , "absorb", "abstract", "absurd", "abuse", "access", "accident" + , "account", "accuse", "achieve", "acid", "acoustic", "acquire" + , "across", "act", "action", "actor", "actress", "actual" + , "adapt", "add", "addict", "address", "adjust", "admit" + , "adult", "advance", "advice", "aerobic", "affair", "afford" + , "afraid", "again", "age", "agent", "agree", "ahead" + , "aim", "air", "airport", "aisle", "alarm", "album" + , "alcohol", "alert", "alien", "all", "alley", "allow" + , "almost", "alone", "alpha", "already", "also", "alter" + , "always", "amateur", "amazing", "among", "amount", "amused" + , "analyst", "anchor", "ancient", "anger", "angle", "angry" + , "animal", "ankle", "announce", "annual", "another", "answer" + , "antenna", "antique", "anxiety", "any", "apart", "apology" + , "appear", "apple", "approve", "april", "arch", "arctic" + , "area", "arena", "argue", "arm", "armed", "armor" + , "army", "around", "arrange", "arrest", "arrive", "arrow" + , "art", "artefact", "artist", "artwork", "ask", "aspect" + , "assault", "asset", "assist", "assume", "asthma", "athlete" + , "atom", "attack", "attend", "attitude", "attract", "auction" + , "audit", "august", "aunt", "author", "auto", "autumn" + , "average", "avocado", "avoid", "awake", "aware", "away" + , "awesome", "awful", "awkward", "axis", "baby", "bachelor" + , "bacon", "badge", "bag", "balance", "balcony", "ball" + , "bamboo", "banana", "banner", "bar", "barely", "bargain" + , "barrel", "base", "basic", "basket", "battle", "beach" + , "bean", "beauty", "because", "become", "beef", "before" + , "begin", "behave", "behind", "believe", "below", "belt" + , "bench", "benefit", "best", "betray", "better", "between" + , "beyond", "bicycle", "bid", "bike", "bind", "biology" + , "bird", "birth", "bitter", "black", "blade", "blame" + , "blanket", "blast", "bleak", "bless", "blind", "blood" + , "blossom", "blouse", "blue", "blur", "blush", "board" + , "boat", "body", "boil", "bomb", "bone", "bonus" + , "book", "boost", "border", "boring", "borrow", "boss" + , "bottom", "bounce", "box", "boy", "bracket", "brain" + , "brand", "brass", "brave", "bread", "breeze", "brick" + , "bridge", "brief", "bright", "bring", "brisk", "broccoli" + , "broken", "bronze", "broom", "brother", "brown", "brush" + , "bubble", "buddy", "budget", "buffalo", "build", "bulb" + , "bulk", "bullet", "bundle", "bunker", "burden", "burger" + , "burst", "bus", "business", "busy", "butter", "buyer" + , "buzz", "cabbage", "cabin", "cable", "cactus", "cage" + , "cake", "call", "calm", "camera", "camp", "can" + , "canal", "cancel", "candy", "cannon", "canoe", "canvas" + , "canyon", "capable", "capital", "captain", "car", "carbon" + , "card", "cargo", "carpet", "carry", "cart", "case" + , "cash", "casino", "castle", "casual", "cat", "catalog" + , "catch", "category", "cattle", "caught", "cause", "caution" + , "cave", "ceiling", "celery", "cement", "census", "century" + , "cereal", "certain", "chair", "chalk", "champion", "change" + , "chaos", "chapter", "charge", "chase", "chat", "cheap" + , "check", "cheese", "chef", "cherry", "chest", "chicken" + , "chief", "child", "chimney", "choice", "choose", "chronic" + , "chuckle", "chunk", "churn", "cigar", "cinnamon", "circle" + , "citizen", "city", "civil", "claim", "clap", "clarify" + , "claw", "clay", "clean", "clerk", "clever", "click" + , "client", "cliff", "climb", "clinic", "clip", "clock" + , "clog", "close", "cloth", "cloud", "clown", "club" + , "clump", "cluster", "clutch", "coach", "coast", "coconut" + , "code", "coffee", "coil", "coin", "collect", "color" + , "column", "combine", "come", "comfort", "comic", "common" + , "company", "concert", "conduct", "confirm", "congress", "connect" + , "consider", "control", "convince", "cook", "cool", "copper" + , "copy", "coral", "core", "corn", "correct", "cost" + , "cotton", "couch", "country", "couple", "course", "cousin" + , "cover", "coyote", "crack", "cradle", "craft", "cram" + , "crane", "crash", "crater", "crawl", "crazy", "cream" + , "credit", "creek", "crew", "cricket", "crime", "crisp" + , "critic", "crop", "cross", "crouch", "crowd", "crucial" + , "cruel", "cruise", "crumble", "crunch", "crush", "cry" + , "crystal", "cube", "culture", "cup", "cupboard", "curious" + , "current", "curtain", "curve", "cushion", "custom", "cute" + , "cycle", "dad", "damage", "damp", "dance", "danger" + , "daring", "dash", "daughter", "dawn", "day", "deal" + , "debate", "debris", "decade", "december", "decide", "decline" + , "decorate", "decrease", "deer", "defense", "define", "defy" + , "degree", "delay", "deliver", "demand", "demise", "denial" + , "dentist", "deny", "depart", "depend", "deposit", "depth" + , "deputy", "derive", "describe", "desert", "design", "desk" + , "despair", "destroy", "detail", "detect", "develop", "device" + , "devote", "diagram", "dial", "diamond", "diary", "dice" + , "diesel", "diet", "differ", "digital", "dignity", "dilemma" + , "dinner", "dinosaur", "direct", "dirt", "disagree", "discover" + , "disease", "dish", "dismiss", "disorder", "display", "distance" + , "divert", "divide", "divorce", "dizzy", "doctor", "document" + , "dog", "doll", "dolphin", "domain", "donate", "donkey" + , "donor", "door", "dose", "double", "dove", "draft" + , "dragon", "drama", "drastic", "draw", "dream", "dress" + , "drift", "drill", "drink", "drip", "drive", "drop" + , "drum", "dry", "duck", "dumb", "dune", "during" + , "dust", "dutch", "duty", "dwarf", "dynamic", "eager" + , "eagle", "early", "earn", "earth", "easily", "east" + , "easy", "echo", "ecology", "economy", "edge", "edit" + , "educate", "effort", "egg", "eight", "either", "elbow" + , "elder", "electric", "elegant", "element", "elephant", "elevator" + , "elite", "else", "embark", "embody", "embrace", "emerge" + , "emotion", "employ", "empower", "empty", "enable", "enact" + , "end", "endless", "endorse", "enemy", "energy", "enforce" + , "engage", "engine", "enhance", "enjoy", "enlist", "enough" + , "enrich", "enroll", "ensure", "enter", "entire", "entry" + , "envelope", "episode", "equal", "equip", "era", "erase" + , "erode", "erosion", "error", "erupt", "escape", "essay" + , "essence", "estate", "eternal", "ethics", "evidence", "evil" + , "evoke", "evolve", "exact", "example", "excess", "exchange" + , "excite", "exclude", "excuse", "execute", "exercise", "exhaust" + , "exhibit", "exile", "exist", "exit", "exotic", "expand" + , "expect", "expire", "explain", "expose", "express", "extend" + , "extra", "eye", "eyebrow", "fabric", "face", "faculty" + , "fade", "faint", "faith", "fall", "false", "fame" + , "family", "famous", "fan", "fancy", "fantasy", "farm" + , "fashion", "fat", "fatal", "father", "fatigue", "fault" + , "favorite", "feature", "february", "federal", "fee", "feed" + , "feel", "female", "fence", "festival", "fetch", "fever" + , "few", "fiber", "fiction", "field", "figure", "file" + , "film", "filter", "final", "find", "fine", "finger" + , "finish", "fire", "firm", "first", "fiscal", "fish" + , "fit", "fitness", "fix", "flag", "flame", "flash" + , "flat", "flavor", "flee", "flight", "flip", "float" + , "flock", "floor", "flower", "fluid", "flush", "fly" + , "foam", "focus", "fog", "foil", "fold", "follow" + , "food", "foot", "force", "forest", "forget", "fork" + , "fortune", "forum", "forward", "fossil", "foster", "found" + , "fox", "fragile", "frame", "frequent", "fresh", "friend" + , "fringe", "frog", "front", "frost", "frown", "frozen" + , "fruit", "fuel", "fun", "funny", "furnace", "fury" + , "future", "gadget", "gain", "galaxy", "gallery", "game" + , "gap", "garage", "garbage", "garden", "garlic", "garment" + , "gas", "gasp", "gate", "gather", "gauge", "gaze" + , "general", "genius", "genre", "gentle", "genuine", "gesture" + , "ghost", "giant", "gift", "giggle", "ginger", "giraffe" + , "girl", "give", "glad", "glance", "glare", "glass" + , "glide", "glimpse", "globe", "gloom", "glory", "glove" + , "glow", "glue", "goat", "goddess", "gold", "good" + , "goose", "gorilla", "gospel", "gossip", "govern", "gown" + , "grab", "grace", "grain", "grant", "grape", "grass" + , "gravity", "great", "green", "grid", "grief", "grit" + , "grocery", "group", "grow", "grunt", "guard", "guess" + , "guide", "guilt", "guitar", "gun", "gym", "habit" + , "hair", "half", "hammer", "hamster", "hand", "happy" + , "harbor", "hard", "harsh", "harvest", "hat", "have" + , "hawk", "hazard", "head", "health", "heart", "heavy" + , "hedgehog", "height", "hello", "helmet", "help", "hen" + , "hero", "hidden", "high", "hill", "hint", "hip" + , "hire", "history", "hobby", "hockey", "hold", "hole" + , "holiday", "hollow", "home", "honey", "hood", "hope" + , "horn", "horror", "horse", "hospital", "host", "hotel" + , "hour", "hover", "hub", "huge", "human", "humble" + , "humor", "hundred", "hungry", "hunt", "hurdle", "hurry" + , "hurt", "husband", "hybrid", "ice", "icon", "idea" + , "identify", "idle", "ignore", "ill", "illegal", "illness" + , "image", "imitate", "immense", "immune", "impact", "impose" + , "improve", "impulse", "inch", "include", "income", "increase" + , "index", "indicate", "indoor", "industry", "infant", "inflict" + , "inform", "inhale", "inherit", "initial", "inject", "injury" + , "inmate", "inner", "innocent", "input", "inquiry", "insane" + , "insect", "inside", "inspire", "install", "intact", "interest" + , "into", "invest", "invite", "involve", "iron", "island" + , "isolate", "issue", "item", "ivory", "jacket", "jaguar" + , "jar", "jazz", "jealous", "jeans", "jelly", "jewel" + , "job", "join", "joke", "journey", "joy", "judge" + , "juice", "jump", "jungle", "junior", "junk", "just" + , "kangaroo", "keen", "keep", "ketchup", "key", "kick" + , "kid", "kidney", "kind", "kingdom", "kiss", "kit" + , "kitchen", "kite", "kitten", "kiwi", "knee", "knife" + , "knock", "know", "lab", "label", "labor", "ladder" + , "lady", "lake", "lamp", "language", "laptop", "large" + , "later", "latin", "laugh", "laundry", "lava", "law" + , "lawn", "lawsuit", "layer", "lazy", "leader", "leaf" + , "learn", "leave", "lecture", "left", "leg", "legal" + , "legend", "leisure", "lemon", "lend", "length", "lens" + , "leopard", "lesson", "letter", "level", "liar", "liberty" + , "library", "license", "life", "lift", "light", "like" + , "limb", "limit", "link", "lion", "liquid", "list" + , "little", "live", "lizard", "load", "loan", "lobster" + , "local", "lock", "logic", "lonely", "long", "loop" + , "lottery", "loud", "lounge", "love", "loyal", "lucky" + , "luggage", "lumber", "lunar", "lunch", "luxury", "lyrics" + , "machine", "mad", "magic", "magnet", "maid", "mail" + , "main", "major", "make", "mammal", "man", "manage" + , "mandate", "mango", "mansion", "manual", "maple", "marble" + , "march", "margin", "marine", "market", "marriage", "mask" + , "mass", "master", "match", "material", "math", "matrix" + , "matter", "maximum", "maze", "meadow", "mean", "measure" + , "meat", "mechanic", "medal", "media", "melody", "melt" + , "member", "memory", "mention", "menu", "mercy", "merge" + , "merit", "merry", "mesh", "message", "metal", "method" + , "middle", "midnight", "milk", "million", "mimic", "mind" + , "minimum", "minor", "minute", "miracle", "mirror", "misery" + , "miss", "mistake", "mix", "mixed", "mixture", "mobile" + , "model", "modify", "mom", "moment", "monitor", "monkey" + , "monster", "month", "moon", "moral", "more", "morning" + , "mosquito", "mother", "motion", "motor", "mountain", "mouse" + , "move", "movie", "much", "muffin", "mule", "multiply" + , "muscle", "museum", "mushroom", "music", "must", "mutual" + , "myself", "mystery", "myth", "naive", "name", "napkin" + , "narrow", "nasty", "nation", "nature", "near", "neck" + , "need", "negative", "neglect", "neither", "nephew", "nerve" + , "nest", "net", "network", "neutral", "never", "news" + , "next", "nice", "night", "noble", "noise", "nominee" + , "noodle", "normal", "north", "nose", "notable", "note" + , "nothing", "notice", "novel", "now", "nuclear", "number" + , "nurse", "nut", "oak", "obey", "object", "oblige" + , "obscure", "observe", "obtain", "obvious", "occur", "ocean" + , "october", "odor", "off", "offer", "office", "often" + , "oil", "okay", "old", "olive", "olympic", "omit" + , "once", "one", "onion", "online", "only", "open" + , "opera", "opinion", "oppose", "option", "orange", "orbit" + , "orchard", "order", "ordinary", "organ", "orient", "original" + , "orphan", "ostrich", "other", "outdoor", "outer", "output" + , "outside", "oval", "oven", "over", "own", "owner" + , "oxygen", "oyster", "ozone", "pact", "paddle", "page" + , "pair", "palace", "palm", "panda", "panel", "panic" + , "panther", "paper", "parade", "parent", "park", "parrot" + , "party", "pass", "patch", "path", "patient", "patrol" + , "pattern", "pause", "pave", "payment", "peace", "peanut" + , "pear", "peasant", "pelican", "pen", "penalty", "pencil" + , "people", "pepper", "perfect", "permit", "person", "pet" + , "phone", "photo", "phrase", "physical", "piano", "picnic" + , "picture", "piece", "pig", "pigeon", "pill", "pilot" + , "pink", "pioneer", "pipe", "pistol", "pitch", "pizza" + , "place", "planet", "plastic", "plate", "play", "please" + , "pledge", "pluck", "plug", "plunge", "poem", "poet" + , "point", "polar", "pole", "police", "pond", "pony" + , "pool", "popular", "portion", "position", "possible", "post" + , "potato", "pottery", "poverty", "powder", "power", "practice" + , "praise", "predict", "prefer", "prepare", "present", "pretty" + , "prevent", "price", "pride", "primary", "print", "priority" + , "prison", "private", "prize", "problem", "process", "produce" + , "profit", "program", "project", "promote", "proof", "property" + , "prosper", "protect", "proud", "provide", "public", "pudding" + , "pull", "pulp", "pulse", "pumpkin", "punch", "pupil" + , "puppy", "purchase", "purity", "purpose", "purse", "push" + , "put", "puzzle", "pyramid", "quality", "quantum", "quarter" + , "question", "quick", "quit", "quiz", "quote", "rabbit" + , "raccoon", "race", "rack", "radar", "radio", "rail" + , "rain", "raise", "rally", "ramp", "ranch", "random" + , "range", "rapid", "rare", "rate", "rather", "raven" + , "raw", "razor", "ready", "real", "reason", "rebel" + , "rebuild", "recall", "receive", "recipe", "record", "recycle" + , "reduce", "reflect", "reform", "refuse", "region", "regret" + , "regular", "reject", "relax", "release", "relief", "rely" + , "remain", "remember", "remind", "remove", "render", "renew" + , "rent", "reopen", "repair", "repeat", "replace", "report" + , "require", "rescue", "resemble", "resist", "resource", "response" + , "result", "retire", "retreat", "return", "reunion", "reveal" + , "review", "reward", "rhythm", "rib", "ribbon", "rice" + , "rich", "ride", "ridge", "rifle", "right", "rigid" + , "ring", "riot", "ripple", "risk", "ritual", "rival" + , "river", "road", "roast", "robot", "robust", "rocket" + , "romance", "roof", "rookie", "room", "rose", "rotate" + , "rough", "round", "route", "royal", "rubber", "rude" + , "rug", "rule", "run", "runway", "rural", "sad" + , "saddle", "sadness", "safe", "sail", "salad", "salmon" + , "salon", "salt", "salute", "same", "sample", "sand" + , "satisfy", "satoshi", "sauce", "sausage", "save", "say" + , "scale", "scan", "scare", "scatter", "scene", "scheme" + , "school", "science", "scissors", "scorpion", "scout", "scrap" + , "screen", "script", "scrub", "sea", "search", "season" + , "seat", "second", "secret", "section", "security", "seed" + , "seek", "segment", "select", "sell", "seminar", "senior" + , "sense", "sentence", "series", "service", "session", "settle" + , "setup", "seven", "shadow", "shaft", "shallow", "share" + , "shed", "shell", "sheriff", "shield", "shift", "shine" + , "ship", "shiver", "shock", "shoe", "shoot", "shop" + , "short", "shoulder", "shove", "shrimp", "shrug", "shuffle" + , "shy", "sibling", "sick", "side", "siege", "sight" + , "sign", "silent", "silk", "silly", "silver", "similar" + , "simple", "since", "sing", "siren", "sister", "situate" + , "six", "size", "skate", "sketch", "ski", "skill" + , "skin", "skirt", "skull", "slab", "slam", "sleep" + , "slender", "slice", "slide", "slight", "slim", "slogan" + , "slot", "slow", "slush", "small", "smart", "smile" + , "smoke", "smooth", "snack", "snake", "snap", "sniff" + , "snow", "soap", "soccer", "social", "sock", "soda" + , "soft", "solar", "soldier", "solid", "solution", "solve" + , "someone", "song", "soon", "sorry", "sort", "soul" + , "sound", "soup", "source", "south", "space", "spare" + , "spatial", "spawn", "speak", "special", "speed", "spell" + , "spend", "sphere", "spice", "spider", "spike", "spin" + , "spirit", "split", "spoil", "sponsor", "spoon", "sport" + , "spot", "spray", "spread", "spring", "spy", "square" + , "squeeze", "squirrel", "stable", "stadium", "staff", "stage" + , "stairs", "stamp", "stand", "start", "state", "stay" + , "steak", "steel", "stem", "step", "stereo", "stick" + , "still", "sting", "stock", "stomach", "stone", "stool" + , "story", "stove", "strategy", "street", "strike", "strong" + , "struggle", "student", "stuff", "stumble", "style", "subject" + , "submit", "subway", "success", "such", "sudden", "suffer" + , "sugar", "suggest", "suit", "summer", "sun", "sunny" + , "sunset", "super", "supply", "supreme", "sure", "surface" + , "surge", "surprise", "surround", "survey", "suspect", "sustain" + , "swallow", "swamp", "swap", "swarm", "swear", "sweet" + , "swift", "swim", "swing", "switch", "sword", "symbol" + , "symptom", "syrup", "system", "table", "tackle", "tag" + , "tail", "talent", "talk", "tank", "tape", "target" + , "task", "taste", "tattoo", "taxi", "teach", "team" + , "tell", "ten", "tenant", "tennis", "tent", "term" + , "test", "text", "thank", "that", "theme", "then" + , "theory", "there", "they", "thing", "this", "thought" + , "three", "thrive", "throw", "thumb", "thunder", "ticket" + , "tide", "tiger", "tilt", "timber", "time", "tiny" + , "tip", "tired", "tissue", "title", "toast", "tobacco" + , "today", "toddler", "toe", "together", "toilet", "token" + , "tomato", "tomorrow", "tone", "tongue", "tonight", "tool" + , "tooth", "top", "topic", "topple", "torch", "tornado" + , "tortoise", "toss", "total", "tourist", "toward", "tower" + , "town", "toy", "track", "trade", "traffic", "tragic" + , "train", "transfer", "trap", "trash", "travel", "tray" + , "treat", "tree", "trend", "trial", "tribe", "trick" + , "trigger", "trim", "trip", "trophy", "trouble", "truck" + , "true", "truly", "trumpet", "trust", "truth", "try" + , "tube", "tuition", "tumble", "tuna", "tunnel", "turkey" + , "turn", "turtle", "twelve", "twenty", "twice", "twin" + , "twist", "two", "type", "typical", "ugly", "umbrella" + , "unable", "unaware", "uncle", "uncover", "under", "undo" + , "unfair", "unfold", "unhappy", "uniform", "unique", "unit" + , "universe", "unknown", "unlock", "until", "unusual", "unveil" + , "update", "upgrade", "uphold", "upon", "upper", "upset" + , "urban", "urge", "usage", "use", "used", "useful" + , "useless", "usual", "utility", "vacant", "vacuum", "vague" + , "valid", "valley", "valve", "van", "vanish", "vapor" + , "various", "vast", "vault", "vehicle", "velvet", "vendor" + , "venture", "venue", "verb", "verify", "version", "very" + , "vessel", "veteran", "viable", "vibrant", "vicious", "victory" + , "video", "view", "village", "vintage", "violin", "virtual" + , "virus", "visa", "visit", "visual", "vital", "vivid" + , "vocal", "voice", "void", "volcano", "volume", "vote" + , "voyage", "wage", "wagon", "wait", "walk", "wall" + , "walnut", "want", "warfare", "warm", "warrior", "wash" + , "wasp", "waste", "water", "wave", "way", "wealth" + , "weapon", "wear", "weasel", "weather", "web", "wedding" + , "weekend", "weird", "welcome", "west", "wet", "whale" + , "what", "wheat", "wheel", "when", "where", "whip" + , "whisper", "wide", "width", "wife", "wild", "will" + , "win", "window", "wine", "wing", "wink", "winner" + , "winter", "wire", "wisdom", "wise", "wish", "witness" + , "wolf", "woman", "wonder", "wood", "wool", "word" + , "work", "world", "worry", "worth", "wrap", "wreck" + , "wrestle", "wrist", "write", "wrong", "yard", "year" + , "yellow", "you", "young", "youth", "zebra", "zero" + , "zone", "zoo" + ] + +-- | Decode a big endian 'Integer' from a 'ByteString'. +bsToInteger :: ByteString -> Integer +bsToInteger = BS.foldr f 0 . BS.reverse + where + f w n = toInteger w .|. shiftL n 8 + +-- | Encode an 'Integer' to a 'ByteString' as big endian. +integerToBS :: Integer -> ByteString +integerToBS 0 = BS.pack [0] +integerToBS i + | i > 0 = BS.reverse $ BS.unfoldr f i + | otherwise = error "integerToBS not defined for negative values" + where + f 0 = Nothing + f x = Just (fromInteger x :: Word8, x `shiftR` 8) +-- | Obtain 'Int' bits from beginning of 'ByteString'. Resulting 'ByteString' +-- will be smallest required to hold that many bits, padded with zeroes to the +-- right. +getBits :: Int -> ByteString -> ByteString +getBits b bs + | r == 0 = BS.take q bs + | otherwise = i `BS.snoc` l + where + (q, r) = b `quotRem` 8 + s = BS.take (q + 1) bs + i = BS.init s + l = BS.last s .&. (0xff `shiftL` (8 - r)) -- zero unneeded bits diff --git a/packages/hexstring/src/Data/ByteArray/HexString/TH.hs b/packages/hexstring/src/Data/ByteArray/HexString/TH.hs index fbcafe7a..d7f08219 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString/TH.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString/TH.hs @@ -16,6 +16,7 @@ module Data.ByteArray.HexString.TH where import Data.ByteArray.HexString.Internal (HexString) +import Data.String (fromString) import Language.Haskell.TH.Quote (QuasiQuoter (..), quoteFile) hexFrom :: QuasiQuoter From 08a491fc955ebbf94b3af67a574b710d4e1b79b7 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 16 Jul 2021 09:05:12 +0300 Subject: [PATCH 192/237] polkadot: start support MetaV13, added crypto & account abstractions --- packages/polkadot/package.yaml | 1 + packages/polkadot/src/Network/Polkadot.hs | 2 + .../polkadot/src/Network/Polkadot/Account.hs | 54 + .../polkadot/src/Network/Polkadot/Crypto.hs | 135 + .../src/Network/Polkadot/Extrinsic.hs | 36 + .../src/Network/Polkadot/Extrinsic/Era.hs | 66 + .../Network/Polkadot/Extrinsic/Signature.hs | 52 +- .../polkadot/src/Network/Polkadot/Metadata.hs | 18 +- .../Network/Polkadot/Metadata/Type/Parser.hs | 6 +- .../src/Network/Polkadot/Metadata/V12.hs | 4 + .../src/Network/Polkadot/Metadata/V13.hs | 99 + .../src/Network/Polkadot/Primitives.hs | 79 +- .../polkadot/src/Network/Polkadot/Query.hs | 1 - .../polkadot/src/Network/Polkadot/Storage.hs | 6 +- .../src/Network/Polkadot/Storage/Key.hs | 9 +- .../Network/Polkadot/Test/MetadataSpec.hs | 18 +- .../Network/Polkadot/Test/StorageSpec.hs | 10 +- packages/polkadot/tests/meta/v13.hex | 1 + packages/polkadot/tests/meta/v13.json | 16294 ++++++++++++++++ 19 files changed, 16845 insertions(+), 46 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Account.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Crypto.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Extrinsic.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Metadata/V13.hs create mode 100644 packages/polkadot/tests/meta/v13.hex create mode 100644 packages/polkadot/tests/meta/v13.json diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 83833d9f..1025bdd7 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -19,6 +19,7 @@ dependencies: - memory >0.14 && <0.16 - microlens >0.4 && <0.5 - containers >0.6 && <0.7 +- cryptonite >0.22 && <0.28 - bytestring >0.10 && <0.11 - animalcase >0.1 && <0.2 - generics-sop >0.3 && <0.6 diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs index 4fb9fa69..881dac9a 100644 --- a/packages/polkadot/src/Network/Polkadot.hs +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -18,9 +18,11 @@ module Network.Polkadot -- * Base types and codecs. , module Scale , module Primitives + , module Crypto ) where import Codec.Scale as Scale +import Network.Polkadot.Crypto as Crypto import Network.Polkadot.Primitives as Primitives import Network.Polkadot.Query (query) import Network.Polkadot.Storage.Key (Argument (..)) diff --git a/packages/polkadot/src/Network/Polkadot/Account.hs b/packages/polkadot/src/Network/Polkadot/Account.hs new file mode 100644 index 00000000..a8256749 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Account.hs @@ -0,0 +1,54 @@ +{-# LANGUAGE TypeFamilies #-} + +-- | +-- Module : Network.Polkadot.Account +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot account types. +-- + +module Network.Polkadot.Account where + +import Data.BigNum (h256) +import Data.ByteArray (convert) +import Data.Digest.Blake2 (blake2_256) +import Data.Maybe (fromJust) +import Data.Text (Text) + +import Network.Polkadot.Primitives (MultiSigner (..)) +import qualified Network.Polkadot.Primitives as P (AccountId) + +-- | Some type that is able to be collapsed into an account ID. +-- +-- It is not possible to recreate the original value from the account ID. +class IdentifyAccount a where + -- | The account ID that this can be transformed into. + type AccountId a + + -- | Transform into an account. + into_account :: a -> AccountId a + +instance IdentifyAccount MultiSigner where + type AccountId MultiSigner = P.AccountId + into_account (Ed25519Signer pub) = fromJust (h256 pub) + into_account (EcdsaSigner pub) = fromJust (h256 $ blake2_256 $ convert pub) + into_account Sr25519Signer = error "Sr25519 has no support yet" + +instance Show MultiSigner where + show = show . into_account + +-- | Key that can be encoded to/from SS58. +-- +-- See +-- for information on the codec. +class Ss58Codec a where + -- | Some if the string is a properly encoded SS58Check address. + from_ss58check :: Text -> Either String a + + -- | Return the ss58-check string for this key. + to_ss58check :: a -> Text diff --git a/packages/polkadot/src/Network/Polkadot/Crypto.hs b/packages/polkadot/src/Network/Polkadot/Crypto.hs new file mode 100644 index 00000000..e65bf7fd --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Crypto.hs @@ -0,0 +1,135 @@ +{-# LANGUAGE TypeFamilies #-} + +-- | +-- Module : Network.Polkadot.Crypto +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Polkadot signing types and methods. +-- + +module Network.Polkadot.Crypto + ( Pair(..) + , MultiPair(multi_address, multi_signer, multi_signature) + , Ed25519 + , Ecdsa + ) where + +import qualified Crypto.Ecdsa.Signature as Ecdsa (pack, sign) +import Crypto.Ecdsa.Utils (exportPubKey) +import qualified Crypto.PubKey.ECC.ECDSA as Ecdsa (PrivateKey (..), + PublicKey (..)) +import qualified Crypto.PubKey.ECC.Generate as Ecdsa (generate) +import Crypto.PubKey.ECC.Types (CurveName (SEC_p256k1), + getCurveByName) +import qualified Crypto.PubKey.Ed25519 as Ed25519 (PublicKey, SecretKey, + generateSecretKey, + sign, toPublic) +import Data.BigNum (H256, H512, h256, h512) +import Data.ByteArray (ByteArrayAccess) +import Data.ByteString (ByteString) +import qualified Data.ByteString as BS (last, take) +import Data.Maybe (fromJust) +import Data.Proxy (Proxy (..)) +import Data.Text (Text) +import Data.Word (Word8) + +import Network.Polkadot.Account (into_account) +import qualified Network.Polkadot.Primitives as P (MultiAddress (..), + MultiSignature (..), + MultiSigner (..)) + +-- | Class suitable for typical cryptographic PKI key pair type. +class Pair a where + -- | The type which is used to encode a public key. + type PublicKey a + -- | The type used to represent a signature. Can be created from a key pair and a message + -- and verified with the message and a public key. + type Signature a + -- | Generate new secure (random) key pair. + generate :: IO a + -- | Generate new key pair from the provided `seed`. + from_seed :: ByteArrayAccess ba => ba -> a + -- | Generate key pair from given recovery phrase and password. + from_phrase :: Text -> Maybe Text -> Either String a + -- | Get a public key. + public :: a -> PublicKey a + -- | Sign a message. + sign :: ByteArrayAccess ba => a -> ba -> Signature a + +-- | Multiple cryptographic type support. +class Pair a => MultiPair a where + -- | Universal short representation of signer account. + type MultiAddress a + -- | Universal signer account identifier. + type MultiSigner a + -- | Universal signature representation. + type MultiSignature a + -- | Derive universal account address. + multi_address :: Proxy a -> PublicKey a -> MultiAddress a + -- | Derive universal signer account identifier. + multi_signer :: Proxy a -> PublicKey a -> MultiSigner a + -- | Derive universal signature. + multi_signature :: Proxy a -> Signature a -> MultiSignature a + +-- | Ed25519 cryptographic pair. +data Ed25519 = Ed25519 !Ed25519.PublicKey !Ed25519.SecretKey + deriving Eq + +instance Show Ed25519 where + show = ("Ed25519 " ++) . show . public + +instance Pair Ed25519 where + type PublicKey Ed25519 = H256 + type Signature Ed25519 = H512 + generate = do + sec <- Ed25519.generateSecretKey + return $ Ed25519 (Ed25519.toPublic sec) sec + from_seed = undefined + from_phrase = undefined + public (Ed25519 pub _) = fromJust $ h256 pub + sign (Ed25519 pub sec) input = ed25519_sign sec pub input + +-- | ECDSA cryptographic pair. +data Ecdsa = Ecdsa !Ecdsa.PublicKey !Ecdsa.PrivateKey + deriving Eq + +instance Show Ecdsa where + show = ("Ecdsa " ++) . show . public + +instance Pair Ecdsa where + type PublicKey Ecdsa = H512 + type Signature Ecdsa = (H512, Word8) + generate = uncurry Ecdsa <$> Ecdsa.generate (getCurveByName SEC_p256k1) + from_seed = undefined + from_phrase = undefined + public (Ecdsa pub _) = fromJust $ h512 (exportPubKey pub :: ByteString) + sign (Ecdsa _ sec) input = ecdsa_sign sec input + +ed25519_sign :: ByteArrayAccess a => Ed25519.SecretKey -> Ed25519.PublicKey -> a -> H512 +ed25519_sign sec pub = fromJust . h512 . Ed25519.sign sec pub + +ecdsa_sign :: ByteArrayAccess a => Ecdsa.PrivateKey -> a -> (H512, Word8) +ecdsa_sign sec input = (fromJust $ h512 $ BS.take 64 rsv, BS.last rsv) + where + rsv = Ecdsa.pack (Ecdsa.sign sec input) + +instance MultiPair Ed25519 where + type MultiSigner Ed25519 = P.MultiSigner + type MultiAddress Ed25519 = P.MultiAddress + type MultiSignature Ed25519 = P.MultiSignature + multi_signer _ = P.Ed25519Signer + multi_address _ = P.MaId . into_account . multi_signer (Proxy :: Proxy Ed25519) + multi_signature _ = P.Ed25519Signature + +instance MultiPair Ecdsa where + type MultiSigner Ecdsa = P.MultiSigner + type MultiAddress Ecdsa = P.MultiAddress + type MultiSignature Ecdsa = P.MultiSignature + multi_signer _ = P.EcdsaSigner + multi_address _ = P.MaId . into_account . multi_signer (Proxy :: Proxy Ecdsa) + multi_signature _ = uncurry P.EcdsaSignature diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs new file mode 100644 index 00000000..6deb823b --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs @@ -0,0 +1,36 @@ +{-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Polkadot.Extrinsic +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Extrinsic is a piece of data from external world. +-- + +module Network.Polkadot.Extrinsic where + +import Codec.Scale (encode) +import Codec.Scale.Class (Decode (..), Encode (..)) +import Data.ByteString (ByteString) +import Network.Polkadot.Primitives (MultiSignature) +--import Network.Polkadot.Extrinsic.Signature (Signature) + +-- | The third generation of compact extrinsics. +data Extrinsic = Extrinsic !ByteString !(Maybe MultiSignature) + +instance Encode Extrinsic where + put xt = put encoded -- put lenght-prefixed extrinsic + where + encoded :: ByteString + encoded = case xt of + Extrinsic call Nothing -> + let version = "\x04" -- V4, signed bit unset + in version <> encode call + Extrinsic call (Just sig) -> + let version = "\x84" -- V4, signed bit set + in version <> encode sig <> encode call diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs new file mode 100644 index 00000000..80541875 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs @@ -0,0 +1,66 @@ +{-# LANGUAGE RecordWildCards #-} + +-- | +-- Module : Network.Polkadot.Extrinsic.Era +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- +-- + +module Network.Polkadot.Extrinsic.Era + ( Era(..) + ) where + +import Codec.Scale.Class (Decode (..), Encode (..)) +import Codec.Scale.Core () +import Data.Bits (shiftL, shiftR) +import Data.Word (Word16, Word8) + +-- | The era for an extrinsic, indicating either a mortal or immortal extrinsic. +data Era + = ImmortalEra + -- ^ The ImmortalEra for an extrinsic. + | MortalEra + -- ^ The MortalEra for an extrinsic, indicating period and phase. + { mortalEraPeriod :: Int + , mortalEraPhase :: Int + } + deriving (Eq, Ord, Show) + +instance Decode Era where + get = do + ix <- get + case ix :: Word8 of + 0 -> return ImmortalEra + 1 -> getMortal <$> get + _ -> fail "wrong extrinsic era enum" + where + getMortal :: Word16 -> Era + getMortal encoded = MortalEra period phase + where + era = fromIntegral (encoded :: Word16) + period = 2 `shiftL` (era `rem` 16) + quantizeFactor = max (period `shiftR` 12) 1 + phase = (era `shiftR` 4) * quantizeFactor + +instance Encode Era where + put ImmortalEra = put (0 :: Word8) + put MortalEra{..} = put (1 :: Word8) >> put encoded + where + encoded :: Word16 + encoded = min 15 (max 1 (getTrailingZeros period - 1)) + ((phase `div` quantizeFactor) `shiftL` 4) + quantizeFactor = max (period `shiftR` 12) 1 + period = fromIntegral mortalEraPeriod + phase = fromIntegral mortalEraPhase + +getTrailingZeros :: Integral a => a -> a +getTrailingZeros = foldl zero 0 . takeWhile (> 0) . iterate (`div` 2) + where + zero a x + | x `mod` 2 == 0 = a + 1 + | otherwise = a diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs index d8d0e515..c6bf2a5c 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs @@ -1,5 +1,10 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE TypeFamilies #-} + -- | --- Module : Network.Polkadot.Signature +-- Module : Network.Polkadot.Extrinsic.Signature -- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- @@ -7,8 +12,51 @@ -- Stability : experimental -- Portability : portable -- --- +-- Extrinsic payload signing and signature types. -- module Network.Polkadot.Extrinsic.Signature where +import Codec.Scale (encode) +import Codec.Scale.Class (Decode (..), Encode (..)) +import Data.Word (Word32) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) +import Network.Polkadot.Extrinsic.Era (Era) +import Network.Polkadot.Primitives (Balance, Hash, Index, + MultiSignature) + +-- A container for the Signature associated with a specific Extrinsic. +{- +data Signature where + Sign :: (Signer a, Encode b) => a -> Payload b -> Signature + Raw :: (Decode s, Decode a) => s -> Payload a -> Signature + +instance Encode Signature where + put s = case s of + Sign s p -> put (sign s $ encode p) >> put p + Raw s p -> put s >> put p + +instance Decode Signature where + get = Raw <$> get <*> get +-} + +-- | Extrinsic payload data. +data Payload a = Payload + { blockHash :: Hash + -- ^ The block 'Hash' the signature applies to (mortal/immortal). + , era :: Era + -- ^ The 'Era' of extrinsic. + , genesisHash :: Hash + -- ^ The genesis 'Hash' the signature applies to (mortal/immortal). + , method :: a + -- ^ The encoded method contained in the payload. + , nonce :: Index + -- ^ Transaction number that can only be used once. + , specVersion :: Word32 + -- ^ The specVersion for this signature. + , tip :: Balance + -- ^ Additional incentive for validator to include this trasaction into block. + , transactionVersion :: Word32 + -- ^ The transactionVersion for this signature. + } deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata.hs b/packages/polkadot/src/Network/Polkadot/Metadata.hs index 4c39b570..2226d9b5 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata.hs @@ -34,6 +34,8 @@ import qualified Network.Polkadot.Metadata.V11 as V11 (Metadata (Meta moduleName) import qualified Network.Polkadot.Metadata.V12 as V12 (Metadata (Metadata), moduleName) +import qualified Network.Polkadot.Metadata.V13 as V13 (Metadata (Metadata), + moduleName) import qualified Network.Polkadot.Metadata.V9 as V9 (Metadata (Metadata), moduleName) @@ -47,6 +49,7 @@ data MetadataVersioned | V10 V10.Metadata | V11 V11.Metadata | V12 V12.Metadata + | V13 V13.Metadata deriving (Eq, Show, Generic, GHC.Generic, Decode, Encode) $(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''MetadataVersioned) @@ -75,11 +78,16 @@ isV12 :: Metadata -> Bool isV12 (Metadata _ (V12 _)) = True isV12 _ = False +isV13 :: Metadata -> Bool +isV13 (Metadata _ (V13 _)) = True +isV13 _ = False + isLatest :: Metadata -> Bool -isLatest = isV12 +{-# INLINE isLatest #-} +isLatest = isV13 -toLatest :: Metadata -> V12.Metadata -toLatest (Metadata _ (V12 m)) = m +toLatest :: Metadata -> V13.Metadata +toLatest (Metadata _ (V13 m)) = m toLatest _ = undefined metadataTypes :: Metadata -> (Metadata, Set Type) @@ -101,4 +109,8 @@ metadataTypes (Metadata _ (V12 (V12.Metadata modules extrinsics))) = let (modules', types) = runDiscovery V12.moduleName modules in (Metadata MagicNumber (V12 (V12.Metadata modules' extrinsics)), types) +metadataTypes (Metadata _ (V13 (V13.Metadata modules extrinsics))) = + let (modules', types) = runDiscovery V13.moduleName modules + in (Metadata MagicNumber (V13 (V13.Metadata modules' extrinsics)), types) + metadataTypes m = (m, mempty) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs index 84d1a249..461f10c7 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs @@ -56,6 +56,7 @@ render_box name (Just args) aliases :: Maybe QSelf -> PathSegment -> Text -> Text aliases _ _ "Vec" = "Bytes" +aliases _ _ "BoundedVec" = "Vec" aliases _ _ "Announcement" = "ProxyAnnouncement" aliases _ _ "Status" = "BalanceStatus" aliases (Just (q, _)) _ "Source" = toText q <> "Source" @@ -79,7 +80,10 @@ toText (Path q xs) = aliases q (last xs) $ render_box name args -- | Parse metadata type (general Rust type) from text. fromText :: Text -> Either ParseError TypeAst -fromText = parse type' "Metadata Type" . strip . replace "\n" "" +fromText = parse type' "Metadata Type" + . strip + . replace "\n" "" + . replace "\n " "" -- | This variant of `fromText` fails when error happens. fromTextM :: MonadFail m => Text -> m TypeAst diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs index 075da540..f89fd83d 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs @@ -34,6 +34,10 @@ type FunctionMetadata = V11.FunctionMetadata type EventMetadata = V11.EventMetadata type ModuleConstantMetadata = V11.ModuleConstantMetadata type ErrorMetadata = V11.ErrorMetadata +type MapType = V11.MapType +type DoubleMapType = V11.DoubleMapType +type StorageHasher = V11.StorageHasher +type StorageEntryModifier = V11.StorageEntryModifier data ModuleMetadata = ModuleMetadata { moduleName :: !Text diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs new file mode 100644 index 00000000..f4b7468b --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs @@ -0,0 +1,99 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TemplateHaskell #-} + +-- | +-- Module : Network.Polkadot.Metadata.V13 +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Metadata version 13 definitions. +-- + +module Network.Polkadot.Metadata.V13 where + +import Codec.Scale (Decode, Encode, Generic) +import Data.Aeson (Options (fieldLabelModifier, sumEncoding), + SumEncoding (ObjectWithSingleField), + defaultOptions) +import Data.Aeson.TH (deriveJSON) +import Data.ByteArray.HexString (HexString) +import Data.Char (toLower) +import Data.Text (Text) +import Data.Word (Word8) +import qualified GHC.Generics as GHC (Generic) +import Lens.Micro (over, _head) + +import Network.Polkadot.Metadata.Type (Type) +import qualified Network.Polkadot.Metadata.V12 as V12 + +type ExtrinsicMetadata = V12.ExtrinsicMetadata +type FunctionMetadata = V12.FunctionMetadata +type EventMetadata = V12.EventMetadata +type ModuleConstantMetadata = V12.ModuleConstantMetadata +type ErrorMetadata = V12.ErrorMetadata +type StorageHasher = V12.StorageHasher +type MapType = V12.MapType +type DoubleMapType = V12.DoubleMapType + +data NMapType = NMapType + { nmapHashers :: ![StorageHasher] + , nmapKeyVec :: ![Type] + , nmapValue :: !Type + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 4 }) ''NMapType) + +data StorageEntryType + = Plain !Type + | Map !MapType + | DoubleMap !DoubleMapType + | NMap !NMapType + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower, sumEncoding = ObjectWithSingleField }) ''StorageEntryType) + +data StorageEntryMetadata = StorageEntryMetadata + { entryName :: !Text + , entryModifier :: !V12.StorageEntryModifier + , entryType :: !StorageEntryType + , entryFallback :: !HexString + , entryDocumentation :: ![Text] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 5 }) ''StorageEntryMetadata) + +data StorageMetadata = StorageMetadata + { storagePrefix :: !Text + , storageItems :: ![StorageEntryMetadata] + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 7 }) ''StorageMetadata) + +data ModuleMetadata = ModuleMetadata + { moduleName :: !Text + , moduleStorage :: !(Maybe StorageMetadata) + , moduleCalls :: !(Maybe [FunctionMetadata]) + , moduleEvents :: !(Maybe [EventMetadata]) + , moduleConstants :: ![ModuleConstantMetadata] + , moduleErrors :: ![ErrorMetadata] + , moduleIndex :: !Word8 + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 6 }) ''ModuleMetadata) + +data Metadata = Metadata + { modules :: ![ModuleMetadata] + , extrinsic :: !ExtrinsicMetadata + } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +$(deriveJSON defaultOptions ''Metadata) diff --git a/packages/polkadot/src/Network/Polkadot/Primitives.hs b/packages/polkadot/src/Network/Polkadot/Primitives.hs index a979e0d4..cc8ad1e9 100644 --- a/packages/polkadot/src/Network/Polkadot/Primitives.hs +++ b/packages/polkadot/src/Network/Polkadot/Primitives.hs @@ -14,23 +14,15 @@ -- Polkadot primitive data types. -- -module Network.Polkadot.Primitives - ( Balance - , BlockNumber - , Moment - , AccountIndex - , AccountId - , AccountData(..) - , AccountInfo(..) - , H256 - , Word128 - ) where - -import Codec.Scale (Decode, Encode) -import Data.BigNum (H256, Word128) -import Data.Word (Word32, Word64) -import Generics.SOP (Generic) -import qualified GHC.Generics as GHC (Generic) +module Network.Polkadot.Primitives where + +import Codec.Scale (Decode, Encode) +import Codec.Scale.Compact (Compact) +import Data.BigNum (H160, H256, H512, Word128) +import Data.ByteArray.HexString (HexString) +import Data.Word (Word32, Word64, Word8) +import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) -- | The user account balance, 'u128' type. type Balance = Word128 @@ -41,23 +33,60 @@ type BlockNumber = Word32 -- | Time moment is 64bit. type Moment = Word64 --- | Accounts in system is up to 2^32. +-- | Transaction nonce value. +type Index = Word32 + +-- | The type for looking up accounts. We don't expect more than 4 billion of them. type AccountIndex = Word32 -- | The user account identifier type for the runtime. type AccountId = H256 +-- | The type for runtime hashes. +type Hash = H256 + -- | Account balances. data AccountData = AccountData - { balanceFree :: Balance - , balanceReserved :: Balance - , miscFrozen :: Balance - , feeFrozen :: Balance + { balanceFree :: !Balance + , balanceReserved :: !Balance + , miscFrozen :: !Balance + , feeFrozen :: !Balance } deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) -- | General account information. data AccountInfo = AccountInfo - { accountNonce :: AccountIndex - , accountRefcount :: Word32 - , accountData :: AccountData + { accountNonce :: !Index + , accountRefcount :: !Word32 + , accountData :: !AccountData } deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) + +-- | Multiple signatures support type. +data MultiSignature + = Ed25519Signature !H512 + | Sr25519Signature !H512 + | EcdsaSignature !H512 !Word8 + deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) + +-- | Cryptographic key for any known crypto algorithm. +data MultiSigner + = Sr25519Signer + -- ^ sr25519 crypto has no support yet + | Ed25519Signer !H256 + -- ^ Ed25519 public key. + | EcdsaSigner !H512 + -- ^ ECDSA public key. + deriving (Eq, Ord, GHC.Generic, Generic, Encode, Decode) + +-- | A multi-format address wrapper for on-chain accounts. +data MultiAddress + = MaId !AccountId + -- ^ It's an account ID (pubkey). + | MaIndex !(Compact AccountIndex) + -- ^ It's an account index. + | MaRaw !HexString + -- ^ It's some arbitrary raw bytes. + | MaAddress32 !H256 + -- ^ It's a 32 byte representation. + | MaAddress20 !H160 + -- ^ Its a 20 byte representation. + deriving (Eq, Ord, GHC.Generic, Generic, Encode, Decode) diff --git a/packages/polkadot/src/Network/Polkadot/Query.hs b/packages/polkadot/src/Network/Polkadot/Query.hs index d6bffb0d..bb5f1572 100644 --- a/packages/polkadot/src/Network/Polkadot/Query.hs +++ b/packages/polkadot/src/Network/Polkadot/Query.hs @@ -18,7 +18,6 @@ import Data.Text (Text) import Network.JsonRpc.TinyClient (JsonRpc) import Network.Polkadot.Metadata (Metadata (Metadata), - MetadataVersioned (V12), metadataTypes, toLatest) import Network.Polkadot.Rpc.State (getMetadata, getStorage) import Network.Polkadot.Storage (Storage, fromMetadata, diff --git a/packages/polkadot/src/Network/Polkadot/Storage.hs b/packages/polkadot/src/Network/Polkadot/Storage.hs index e4744228..30d5252e 100644 --- a/packages/polkadot/src/Network/Polkadot/Storage.hs +++ b/packages/polkadot/src/Network/Polkadot/Storage.hs @@ -29,10 +29,10 @@ import Data.Text (Text) import qualified Data.Text as T (cons, head, tail) import Text.AnimalCase (toCamelCase) -import Network.Polkadot.Metadata.V11 (StorageEntryMetadata (..), +import Network.Polkadot.Metadata.V13 (Metadata (modules), + ModuleMetadata (..), + StorageEntryMetadata (..), StorageMetadata (..)) -import Network.Polkadot.Metadata.V12 (Metadata (modules), - ModuleMetadata (..)) import Network.Polkadot.Storage.Key (Argument, StorageEntry (..), newEntry) diff --git a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs index 7d06527b..980abc99 100644 --- a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs +++ b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs @@ -27,9 +27,10 @@ import Data.Text.Encoding (encodeUtf8) import Network.Polkadot.Metadata.V11 (DoubleMapType (..), MapType (..), - StorageEntryMetadata (..), - StorageEntryType (..), StorageHasher (..)) +import Network.Polkadot.Metadata.V13 (NMapType (..), + StorageEntryMetadata (..), + StorageEntryType (..)) -- | General type wrapper for SCALE encodable storage index argument. data Argument where @@ -50,11 +51,14 @@ data StorageEntry -- ^ Mapping with hashing for arguments. | DoubleMapEntry (Argument -> Argument -> ByteString) -- ^ Double map with two different hashers. + | NMapEntry ([Argument] -> ByteString) + -- ^ Map with array of hashers. instance Show StorageEntry where show (PlainEntry _) = "PlainEntry" show (MapEntry _) = "MapEntry" show (DoubleMapEntry _) = "DoubleMapEntry" + show (NMapEntry _) = "NMapEntry" -- | Create storage key generator from metadata description. newEntry :: Text @@ -67,6 +71,7 @@ newEntry prefix meta = case entryType meta of Plain _ -> PlainEntry plainKey Map MapType{..} -> MapEntry (mapCodec mapHasher) DoubleMap DoubleMapType{..} -> DoubleMapEntry (dMapCodec doubleMapHasher doubleMapKey2Hasher) + NMap NMapType{..} -> NMapEntry undefined -- TODO where method = entryName meta -- To calculate the key for a simple Storage Value, diff --git a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs index d1529522..ad268c19 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs @@ -16,10 +16,11 @@ module Network.Polkadot.Test.MetadataSpec where -import Codec.Scale (decode) +import Codec.Scale (decode, encode) import Data.Aeson (eitherDecodeFileStrict, - toJSON) -import Data.ByteArray.HexString (HexString, hexFrom) + parseJSON, toJSON) +import Data.ByteArray.HexString (HexString) +import Data.ByteArray.HexString.TH (hexFrom) import Test.Hspec import Test.Hspec.Expectations.Json (shouldBeJson) @@ -43,7 +44,7 @@ spec = parallel $ do it "fails when version out of scope" $ let error_str = decode wrong_version :: Either String Metadata - in error_str `shouldBe` Left "Failed reading: wrong prefix during enum decoding\nEmpty call stack\n" + in error_str `shouldBe` Left "Failed reading: index out of enum constructors count: 241\nEmpty call stack\n" describe "Metadata V9" $ do it "succeeds decode from hex and json" $ do @@ -65,3 +66,12 @@ spec = parallel $ do (meta, _) = metadataTypes hex Right json <- eitherDecodeFileStrict "tests/meta/v12.json" toJSON meta `shouldBeJson` json + + describe "Metadata V13" $ do + it "succeeds decode from hex and json" $ do + let Left e = decode [hexFrom|tests/meta/v13.hex|] :: Either String Metadata + putStrLn e + let (Right hex) = decode [hexFrom|tests/meta/v13.hex|] :: Either String Metadata + (meta, _) = metadataTypes hex + Right json <- eitherDecodeFileStrict "tests/meta/v13.json" + toJSON meta `shouldBeJson` json diff --git a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs index ab15b64e..0a939caa 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs @@ -14,17 +14,17 @@ module Network.Polkadot.Test.StorageSpec where -import Codec.Scale (decode) -import Data.ByteArray.HexString (hexFrom) +import Codec.Scale (decode) +import Data.ByteArray.HexString.TH (hexFrom) import Test.Hspec -import Network.Polkadot.Metadata (Metadata, metadataTypes, toLatest) -import Network.Polkadot.Storage (fromMetadata) +import Network.Polkadot.Metadata (Metadata, metadataTypes, toLatest) +import Network.Polkadot.Storage (fromMetadata) spec :: Spec spec = parallel $ do describe "Metadata Storage" $ do it "succeeds decode from hex and parse storage entries" $ do - let (Right hex) = decode [hexFrom|tests/meta/v12.hex|] :: Either String Metadata + let (Right hex) = decode [hexFrom|tests/meta/v13.hex|] :: Either String Metadata (meta, _) = metadataTypes hex show (fromMetadata (toLatest meta)) `shouldBe` "fromList [(\"assets\",fromList [(\"account\",DoubleMapEntry),(\"asset\",MapEntry)]),(\"authorship\",fromList [(\"author\",PlainEntry),(\"didSetUncles\",PlainEntry),(\"uncles\",PlainEntry)]),(\"babe\",fromList [(\"authorVrfRandomness\",PlainEntry),(\"authorities\",PlainEntry),(\"currentSlot\",PlainEntry),(\"epochIndex\",PlainEntry),(\"genesisSlot\",PlainEntry),(\"initialized\",PlainEntry),(\"lateness\",PlainEntry),(\"nextEpochConfig\",PlainEntry),(\"nextRandomness\",PlainEntry),(\"randomness\",PlainEntry),(\"segmentIndex\",PlainEntry),(\"underConstruction\",MapEntry)]),(\"balances\",fromList [(\"account\",MapEntry),(\"locks\",MapEntry),(\"storageVersion\",PlainEntry),(\"totalIssuance\",PlainEntry)]),(\"bounties\",fromList [(\"bounties\",MapEntry),(\"bountyApprovals\",PlainEntry),(\"bountyCount\",PlainEntry),(\"bountyDescriptions\",MapEntry)]),(\"contracts\",fromList [(\"accountCounter\",PlainEntry),(\"codeStorage\",MapEntry),(\"contractInfoOf\",MapEntry),(\"currentSchedule\",PlainEntry),(\"pristineCode\",MapEntry)]),(\"council\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposalOf\",MapEntry),(\"proposals\",PlainEntry),(\"voting\",MapEntry)]),(\"democracy\",fromList [(\"blacklist\",MapEntry),(\"cancellations\",MapEntry),(\"depositOf\",MapEntry),(\"lastTabledWasExternal\",PlainEntry),(\"locks\",MapEntry),(\"lowestUnbaked\",PlainEntry),(\"nextExternal\",PlainEntry),(\"preimages\",MapEntry),(\"publicPropCount\",PlainEntry),(\"publicProps\",PlainEntry),(\"referendumCount\",PlainEntry),(\"referendumInfoOf\",MapEntry),(\"storageVersion\",PlainEntry),(\"votingOf\",MapEntry)]),(\"elections\",fromList [(\"candidates\",PlainEntry),(\"electionRounds\",PlainEntry),(\"members\",PlainEntry),(\"runnersUp\",PlainEntry),(\"voting\",MapEntry)]),(\"grandpa\",fromList [(\"currentSetId\",PlainEntry),(\"nextForced\",PlainEntry),(\"pendingChange\",PlainEntry),(\"setIdSession\",MapEntry),(\"stalled\",PlainEntry),(\"state\",PlainEntry)]),(\"identity\",fromList [(\"identityOf\",MapEntry),(\"registrars\",PlainEntry),(\"subsOf\",MapEntry),(\"superOf\",MapEntry)]),(\"imOnline\",fromList [(\"authoredBlocks\",DoubleMapEntry),(\"heartbeatAfter\",PlainEntry),(\"keys\",PlainEntry),(\"receivedHeartbeats\",DoubleMapEntry)]),(\"indices\",fromList [(\"accounts\",MapEntry)]),(\"mmr\",fromList [(\"nodes\",MapEntry),(\"numberOfLeaves\",PlainEntry),(\"rootHash\",PlainEntry)]),(\"multisig\",fromList [(\"calls\",MapEntry),(\"multisigs\",DoubleMapEntry)]),(\"offences\",fromList [(\"concurrentReportsIndex\",DoubleMapEntry),(\"deferredOffences\",PlainEntry),(\"reports\",MapEntry),(\"reportsByKindIndex\",MapEntry)]),(\"proxy\",fromList [(\"announcements\",MapEntry),(\"proxies\",MapEntry)]),(\"randomnessCollectiveFlip\",fromList [(\"randomMaterial\",PlainEntry)]),(\"recovery\",fromList [(\"activeRecoveries\",DoubleMapEntry),(\"proxy\",MapEntry),(\"recoverable\",MapEntry)]),(\"scheduler\",fromList [(\"agenda\",MapEntry),(\"lookup\",MapEntry),(\"storageVersion\",PlainEntry)]),(\"session\",fromList [(\"currentIndex\",PlainEntry),(\"disabledValidators\",PlainEntry),(\"keyOwner\",MapEntry),(\"nextKeys\",MapEntry),(\"queuedChanged\",PlainEntry),(\"queuedKeys\",PlainEntry),(\"validators\",PlainEntry)]),(\"society\",fromList [(\"bids\",PlainEntry),(\"candidates\",PlainEntry),(\"defender\",PlainEntry),(\"defenderVotes\",MapEntry),(\"founder\",PlainEntry),(\"head\",PlainEntry),(\"maxMembers\",PlainEntry),(\"members\",PlainEntry),(\"payouts\",MapEntry),(\"pot\",PlainEntry),(\"rules\",PlainEntry),(\"strikes\",MapEntry),(\"suspendedCandidates\",MapEntry),(\"suspendedMembers\",MapEntry),(\"votes\",DoubleMapEntry),(\"vouching\",MapEntry)]),(\"staking\",fromList [(\"activeEra\",PlainEntry),(\"bonded\",MapEntry),(\"bondedEras\",PlainEntry),(\"canceledSlashPayout\",PlainEntry),(\"currentEra\",PlainEntry),(\"earliestUnappliedSlash\",PlainEntry),(\"eraElectionStatus\",PlainEntry),(\"erasRewardPoints\",MapEntry),(\"erasStakers\",DoubleMapEntry),(\"erasStakersClipped\",DoubleMapEntry),(\"erasStartSessionIndex\",MapEntry),(\"erasTotalStake\",MapEntry),(\"erasValidatorPrefs\",DoubleMapEntry),(\"erasValidatorReward\",MapEntry),(\"forceEra\",PlainEntry),(\"historyDepth\",PlainEntry),(\"invulnerables\",PlainEntry),(\"isCurrentSessionFinal\",PlainEntry),(\"ledger\",MapEntry),(\"minimumValidatorCount\",PlainEntry),(\"nominatorSlashInEra\",DoubleMapEntry),(\"nominators\",MapEntry),(\"payee\",MapEntry),(\"queuedElected\",PlainEntry),(\"queuedScore\",PlainEntry),(\"slashRewardFraction\",PlainEntry),(\"slashingSpans\",MapEntry),(\"snapshotNominators\",PlainEntry),(\"snapshotValidators\",PlainEntry),(\"spanSlash\",MapEntry),(\"storageVersion\",PlainEntry),(\"unappliedSlashes\",MapEntry),(\"validatorCount\",PlainEntry),(\"validatorSlashInEra\",DoubleMapEntry),(\"validators\",MapEntry)]),(\"sudo\",fromList [(\"key\",PlainEntry)]),(\"system\",fromList [(\"account\",MapEntry),(\"allExtrinsicsLen\",PlainEntry),(\"blockHash\",MapEntry),(\"blockWeight\",PlainEntry),(\"digest\",PlainEntry),(\"eventCount\",PlainEntry),(\"eventTopics\",MapEntry),(\"events\",PlainEntry),(\"executionPhase\",PlainEntry),(\"extrinsicCount\",PlainEntry),(\"extrinsicData\",MapEntry),(\"extrinsicsRoot\",PlainEntry),(\"lastRuntimeUpgrade\",PlainEntry),(\"number\",PlainEntry),(\"parentHash\",PlainEntry),(\"upgradedToU32RefCount\",PlainEntry)]),(\"technicalCommittee\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposalOf\",MapEntry),(\"proposals\",PlainEntry),(\"voting\",MapEntry)]),(\"technicalMembership\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry)]),(\"timestamp\",fromList [(\"didUpdate\",PlainEntry),(\"now\",PlainEntry)]),(\"tips\",fromList [(\"reasons\",MapEntry),(\"tips\",MapEntry)]),(\"transactionPayment\",fromList [(\"nextFeeMultiplier\",PlainEntry),(\"storageVersion\",PlainEntry)]),(\"treasury\",fromList [(\"approvals\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposals\",MapEntry)]),(\"vesting\",fromList [(\"vesting\",MapEntry)])]" diff --git a/packages/polkadot/tests/meta/v13.hex b/packages/polkadot/tests/meta/v13.hex new file mode 100644 index 00000000..6f640dee --- /dev/null +++ b/packages/polkadot/tests/meta/v13.hex @@ -0,0 +1 @@ +0x6d6574610da01853797374656d011853797374656d401c4163636f756e7401010230543a3a4163636f756e744964944163636f756e74496e666f3c543a3a496e6465782c20543a3a4163636f756e74446174613e004101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004e8205468652066756c6c206163636f756e7420696e666f726d6174696f6e20666f72206120706172746963756c6172206163636f756e742049442e3845787472696e736963436f756e7400000c753332040004b820546f74616c2065787472696e7369637320636f756e7420666f72207468652063757272656e7420626c6f636b2e2c426c6f636b576569676874010038436f6e73756d6564576569676874600000000000000000000000000000000000000000000000000488205468652063757272656e742077656967687420666f722074686520626c6f636b2e40416c6c45787472696e736963734c656e00000c753332040004410120546f74616c206c656e6774682028696e2062797465732920666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e24426c6f636b4861736801010538543a3a426c6f636b4e756d6265721c543a3a48617368008000000000000000000000000000000000000000000000000000000000000000000498204d6170206f6620626c6f636b206e756d6265727320746f20626c6f636b206861736865732e3445787472696e736963446174610101050c7533321c5665633c75383e000400043d012045787472696e73696373206461746120666f72207468652063757272656e7420626c6f636b20286d61707320616e2065787472696e736963277320696e64657820746f206974732064617461292e184e756d626572010038543a3a426c6f636b4e756d6265721000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000004702048617368206f66207468652070726576696f757320626c6f636b2e1844696765737401002c4469676573744f663c543e040004f020446967657374206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e184576656e747301008c5665633c4576656e745265636f72643c543a3a4576656e742c20543a3a486173683e3e040004a0204576656e7473206465706f736974656420666f72207468652063757272656e7420626c6f636b2e284576656e74436f756e740100284576656e74496e646578100000000004b820546865206e756d626572206f66206576656e747320696e2074686520604576656e74733c543e60206c6973742e2c4576656e74546f706963730101021c543a3a48617368845665633c28543a3a426c6f636b4e756d6265722c204576656e74496e646578293e000400282501204d617070696e67206265747765656e206120746f7069632028726570726573656e74656420627920543a3a486173682920616e64206120766563746f72206f6620696e646578657394206f66206576656e747320696e2074686520603c4576656e74733c543e3e60206c6973742e00510120416c6c20746f70696320766563746f727320686176652064657465726d696e69737469632073746f72616765206c6f636174696f6e7320646570656e64696e67206f6e2074686520746f7069632e2054686973450120616c6c6f7773206c696768742d636c69656e747320746f206c6576657261676520746865206368616e67657320747269652073746f7261676520747261636b696e67206d656368616e69736d20616e64e420696e2063617365206f66206368616e67657320666574636820746865206c697374206f66206576656e7473206f6620696e7465726573742e004d01205468652076616c756520686173207468652074797065206028543a3a426c6f636b4e756d6265722c204576656e74496e646578296020626563617573652069662077652075736564206f6e6c79206a7573744d012074686520604576656e74496e64657860207468656e20696e20636173652069662074686520746f70696320686173207468652073616d6520636f6e74656e7473206f6e20746865206e65787420626c6f636b0101206e6f206e6f74696669636174696f6e2077696c6c20626520747269676765726564207468757320746865206576656e74206d69676874206265206c6f73742e484c61737452756e74696d65557067726164650000584c61737452756e74696d6555706772616465496e666f04000455012053746f726573207468652060737065635f76657273696f6e6020616e642060737065635f6e616d6560206f66207768656e20746865206c6173742072756e74696d6520757067726164652068617070656e65642e545570677261646564546f553332526566436f756e74010010626f6f6c0400044d012054727565206966207765206861766520757067726164656420736f207468617420607479706520526566436f756e74602069732060753332602e2046616c7365202864656661756c7429206966206e6f742e605570677261646564546f547269706c65526566436f756e74010010626f6f6c0400085d012054727565206966207765206861766520757067726164656420736f2074686174204163636f756e74496e666f20636f6e7461696e73207468726565207479706573206f662060526566436f756e74602e2046616c736548202864656661756c7429206966206e6f742e38457865637574696f6e50686173650000145068617365040004882054686520657865637574696f6e207068617365206f662074686520626c6f636b2e01282866696c6c5f626c6f636b04185f726174696f1c50657262696c6c040901204120646973706174636820746861742077696c6c2066696c6c2074686520626c6f636b2077656967687420757020746f2074686520676976656e20726174696f2e1872656d61726b041c5f72656d61726b1c5665633c75383e146c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e002c2023203c7765696768743e24202d20604f28312960302023203c2f7765696768743e387365745f686561705f7061676573041470616765730c75363420fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e002c2023203c7765696768743e24202d20604f283129604c202d20312073746f726167652077726974652e64202d2042617365205765696768743a20312e34303520c2b57360202d203120777269746520746f20484541505f5041474553302023203c2f7765696768743e207365745f636f64650410636f64651c5665633c75383e28682053657420746865206e65772072756e74696d6520636f64652e002c2023203c7765696768743e3501202d20604f2843202b2053296020776865726520604360206c656e677468206f662060636f64656020616e642060536020636f6d706c6578697479206f66206063616e5f7365745f636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e7901202d20312063616c6c20746f206063616e5f7365745f636f6465603a20604f28532960202863616c6c73206073705f696f3a3a6d6973633a3a72756e74696d655f76657273696f6e6020776869636820697320657870656e73697665292e2c202d2031206576656e742e7d012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652c206275742067656e6572616c6c792074686973206973207665727920657870656e736976652e902057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f636f64655f776974686f75745f636865636b730410636f64651c5665633c75383e201d012053657420746865206e65772072756e74696d6520636f646520776974686f757420646f696e6720616e7920636865636b73206f662074686520676976656e2060636f6465602e002c2023203c7765696768743e90202d20604f2843296020776865726520604360206c656e677468206f662060636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e2c202d2031206576656e742e75012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652e2057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f6368616e6765735f747269655f636f6e666967044c6368616e6765735f747269655f636f6e666967804f7074696f6e3c4368616e67657354726965436f6e66696775726174696f6e3e28a02053657420746865206e6577206368616e676573207472696520636f6e66696775726174696f6e2e002c2023203c7765696768743e24202d20604f28312960b0202d20312073746f72616765207772697465206f722064656c6574652028636f64656320604f28312960292ed8202d20312063616c6c20746f20606465706f7369745f6c6f67603a20557365732060617070656e6460204150492c20736f204f28312964202d2042617365205765696768743a20372e32313820c2b57334202d204442205765696768743aa820202020202d205772697465733a204368616e67657320547269652c2053797374656d20446967657374302023203c2f7765696768743e2c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e206c2053657420736f6d65206974656d73206f662073746f726167652e002c2023203c7765696768743e94202d20604f2849296020776865726520604960206c656e677468206f6620606974656d73607c202d206049602073746f72616765207772697465732028604f28312960292e74202d2042617365205765696768743a20302e353638202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e306b696c6c5f73746f7261676504106b657973205665633c4b65793e2078204b696c6c20736f6d65206974656d732066726f6d2073746f726167652e002c2023203c7765696768743efc202d20604f28494b296020776865726520604960206c656e677468206f6620606b6579736020616e6420604b60206c656e677468206f66206f6e65206b657964202d206049602073746f726167652064656c6574696f6e732e70202d2042617365205765696768743a202e333738202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e2c6b696c6c5f70726566697808187072656669780c4b6579205f7375626b6579730c7533322c1501204b696c6c20616c6c2073746f72616765206974656d7320776974682061206b657920746861742073746172747320776974682074686520676976656e207072656669782e003d01202a2a4e4f54453a2a2a2057652072656c79206f6e2074686520526f6f74206f726967696e20746f2070726f7669646520757320746865206e756d626572206f66207375626b65797320756e64657241012074686520707265666978207765206172652072656d6f76696e6720746f2061636375726174656c792063616c63756c6174652074686520776569676874206f6620746869732066756e6374696f6e2e002c2023203c7765696768743edc202d20604f285029602077686572652060506020616d6f756e74206f66206b65797320776974682070726566697820607072656669786064202d206050602073746f726167652064656c6574696f6e732e74202d2042617365205765696768743a20302e383334202a205020c2b57380202d205772697465733a204e756d626572206f66207375626b657973202b2031302023203c2f7765696768743e4472656d61726b5f776974685f6576656e74041872656d61726b1c5665633c75383e18a8204d616b6520736f6d65206f6e2d636861696e2072656d61726b20616e6420656d6974206576656e742e002c2023203c7765696768743eb8202d20604f28622960207768657265206220697320746865206c656e677468206f66207468652072656d61726b2e2c202d2031206576656e742e302023203c2f7765696768743e01184045787472696e7369635375636365737304304469737061746368496e666f04b820416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e205c5b696e666f5c5d3c45787472696e7369634661696c6564083444697370617463684572726f72304469737061746368496e666f049420416e2065787472696e736963206661696c65642e205c5b6572726f722c20696e666f5c5d2c436f64655570646174656400045420603a636f6465602077617320757064617465642e284e65774163636f756e7404244163636f756e744964047c2041206e6577205c5b6163636f756e745c5d2077617320637265617465642e344b696c6c65644163636f756e7404244163636f756e744964046c20416e205c5b6163636f756e745c5d20776173207265617065642e2052656d61726b656408244163636f756e744964104861736804d4204f6e206f6e2d636861696e2072656d61726b2068617070656e65642e205c5b6f726967696e2c2072656d61726b5f686173685c5d1830426c6f636b57656967687473506c696d6974733a3a426c6f636b57656967687473850100f2052a0100000000204aa9d1010000405973070000000001c06e96a62e010000010098f73e5d010000010000000000000000405973070000000001c0f6e810a30100000100204aa9d1010000010088526a74000000405973070000000000000004d020426c6f636b20262065787472696e7369637320776569676874733a20626173652076616c75657320616e64206c696d6974732e2c426c6f636b4c656e6774684c6c696d6974733a3a426c6f636b4c656e6774683000003c00000050000000500004a820546865206d6178696d756d206c656e677468206f66206120626c6f636b2028696e206279746573292e38426c6f636b48617368436f756e7438543a3a426c6f636b4e756d6265721060090000045501204d6178696d756d206e756d626572206f6620626c6f636b206e756d62657220746f20626c6f636b2068617368206d617070696e677320746f206b65657020286f6c64657374207072756e6564206669727374292e2044625765696768743c52756e74696d6544625765696768744040787d010000000000e1f505000000000409012054686520776569676874206f662072756e74696d65206461746162617365206f7065726174696f6e73207468652072756e74696d652063616e20696e766f6b652e1c56657273696f6e3852756e74696d6556657273696f6e0503106e6f6465387375627374726174652d6e6f64650a0000000b0100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b01000000020000000484204765742074686520636861696e27732063757272656e742076657273696f6e2e28535335385072656669780c753136082a0014a8205468652064657369676e61746564205353383520707265666978206f66207468697320636861696e2e0039012054686973207265706c6163657320746865202273733538466f726d6174222070726f7065727479206465636c6172656420696e2074686520636861696e20737065632e20526561736f6e20697331012074686174207468652072756e74696d652073686f756c64206b6e6f772061626f7574207468652070726566697820696e206f7264657220746f206d616b6520757365206f662069742061737020616e206964656e746966696572206f662074686520636861696e2e143c496e76616c6964537065634e616d6508150120546865206e616d65206f662073706563696669636174696f6e20646f6573206e6f74206d61746368206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e685370656356657273696f6e4e65656473546f496e637265617365084501205468652073706563696669636174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e744661696c6564546f4578747261637452756e74696d6556657273696f6e0cf0204661696c656420746f2065787472616374207468652072756e74696d652076657273696f6e2066726f6d20746865206e65772072756e74696d652e000d01204569746865722063616c6c696e672060436f72655f76657273696f6e60206f72206465636f64696e67206052756e74696d6556657273696f6e60206661696c65642e4c4e6f6e44656661756c74436f6d706f7369746504010120537569636964652063616c6c6564207768656e20746865206163636f756e7420686173206e6f6e2d64656661756c7420636f6d706f7369746520646174612e3c4e6f6e5a65726f526566436f756e740439012054686572652069732061206e6f6e2d7a65726f207265666572656e636520636f756e742070726576656e74696e6720746865206163636f756e742066726f6d206265696e67207075726765642e001c5574696c69747900010c146261746368041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e48802053656e642061206261746368206f662064697370617463682063616c6c732e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e006101204966206f726967696e20697320726f6f74207468656e2063616c6c2061726520646973706174636820776974686f757420636865636b696e67206f726967696e2066696c7465722e20285468697320696e636c75646573cc20627970617373696e6720606672616d655f73797374656d3a3a436f6e6669673a3a4261736543616c6c46696c74657260292e002c2023203c7765696768743e0501202d20436f6d706c65786974793a204f284329207768657265204320697320746865206e756d626572206f662063616c6c7320746f20626520626174636865642e302023203c2f7765696768743e00590120546869732077696c6c2072657475726e20604f6b6020696e20616c6c2063697263756d7374616e6365732e20546f2064657465726d696e65207468652073756363657373206f66207468652062617463682c20616e3501206576656e74206973206465706f73697465642e20496620612063616c6c206661696c656420616e64207468652062617463682077617320696e7465727275707465642c207468656e20746865590120604261746368496e74657272757074656460206576656e74206973206465706f73697465642c20616c6f6e67207769746820746865206e756d626572206f66207375636365737366756c2063616c6c73206d616465510120616e6420746865206572726f72206f6620746865206661696c65642063616c6c2e20496620616c6c2077657265207375636365737366756c2c207468656e2074686520604261746368436f6d706c657465646050206576656e74206973206465706f73697465642e3461735f646572697661746976650814696e6465780c7531361063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e34e02053656e6420612063616c6c207468726f75676820616e20696e64657865642070736575646f6e796d206f66207468652073656e6465722e0059012046696c7465722066726f6d206f726967696e206172652070617373656420616c6f6e672e205468652063616c6c2077696c6c2062652064697370617463686564207769746820616e206f726967696e207768696368c020757365207468652073616d652066696c74657220617320746865206f726967696e206f6620746869732063616c6c2e004901204e4f54453a20496620796f75206e65656420746f20656e73757265207468617420616e79206163636f756e742d62617365642066696c746572696e67206973206e6f7420686f6e6f7265642028692e652e6501206265636175736520796f7520657870656374206070726f78796020746f2068617665206265656e2075736564207072696f7220696e207468652063616c6c20737461636b20616e6420796f7520646f206e6f742077616e745501207468652063616c6c207265737472696374696f6e7320746f206170706c7920746f20616e79207375622d6163636f756e7473292c207468656e20757365206061735f6d756c74695f7468726573686f6c645f31608020696e20746865204d756c74697369672070616c6c657420696e73746561642e00f8204e4f54453a205072696f7220746f2076657273696f6e202a31322c2074686973207761732063616c6c6564206061735f6c696d697465645f737562602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e2462617463685f616c6c041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e34f02053656e642061206261746368206f662064697370617463682063616c6c7320616e642061746f6d6963616c6c792065786563757465207468656d2e2501205468652077686f6c65207472616e73616374696f6e2077696c6c20726f6c6c6261636b20616e64206661696c20696620616e79206f66207468652063616c6c73206661696c65642e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e006101204966206f726967696e20697320726f6f74207468656e2063616c6c2061726520646973706174636820776974686f757420636865636b696e67206f726967696e2066696c7465722e20285468697320696e636c75646573cc20627970617373696e6720606672616d655f73797374656d3a3a436f6e6669673a3a4261736543616c6c46696c74657260292e002c2023203c7765696768743e0501202d20436f6d706c65786974793a204f284329207768657265204320697320746865206e756d626572206f662063616c6c7320746f20626520626174636865642e302023203c2f7765696768743e0108404261746368496e746572727570746564080c7533323444697370617463684572726f72085901204261746368206f66206469737061746368657320646964206e6f7420636f6d706c6574652066756c6c792e20496e646578206f66206669727374206661696c696e6720646973706174636820676976656e2c206173902077656c6c20617320746865206572726f722e205c5b696e6465782c206572726f725c5d384261746368436f6d706c657465640004cc204261746368206f66206469737061746368657320636f6d706c657465642066756c6c792077697468206e6f206572726f722e0000011042616265011042616265402845706f6368496e64657801000c75363420000000000000000004542043757272656e742065706f636820696e6465782e2c417574686f72697469657301009c5665633c28417574686f7269747949642c2042616265417574686f72697479576569676874293e0400046c2043757272656e742065706f636820617574686f7269746965732e2c47656e65736973536c6f74010010536c6f7420000000000000000008f82054686520736c6f74206174207768696368207468652066697273742065706f63682061637475616c6c7920737461727465642e205468697320697320309020756e74696c2074686520666972737420626c6f636b206f662074686520636861696e2e2c43757272656e74536c6f74010010536c6f7420000000000000000004542043757272656e7420736c6f74206e756d6265722e2852616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e65737380000000000000000000000000000000000000000000000000000000000000000028b8205468652065706f63682072616e646f6d6e65737320666f7220746865202a63757272656e742a2065706f63682e002c20232053656375726974790005012054686973204d555354204e4f54206265207573656420666f722067616d626c696e672c2061732069742063616e20626520696e666c75656e6365642062792061f8206d616c6963696f75732076616c696461746f7220696e207468652073686f7274207465726d2e204974204d4159206265207573656420696e206d616e7915012063727970746f677261706869632070726f746f636f6c732c20686f77657665722c20736f206c6f6e67206173206f6e652072656d656d6265727320746861742074686973150120286c696b652065766572797468696e6720656c7365206f6e2d636861696e29206974206973207075626c69632e20466f72206578616d706c652c2069742063616e206265050120757365642077686572652061206e756d626572206973206e656564656420746861742063616e6e6f742068617665206265656e2063686f73656e20627920616e0d01206164766572736172792c20666f7220707572706f7365732073756368206173207075626c69632d636f696e207a65726f2d6b6e6f776c656467652070726f6f66732e6050656e64696e6745706f6368436f6e6669674368616e67650000504e657874436f6e66696744657363726970746f7204000461012050656e64696e672065706f636820636f6e66696775726174696f6e206368616e676520746861742077696c6c206265206170706c696564207768656e20746865206e6578742065706f636820697320656e61637465642e384e65787452616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e657373800000000000000000000000000000000000000000000000000000000000000000045c204e6578742065706f63682072616e646f6d6e6573732e3c4e657874417574686f72697469657301009c5665633c28417574686f7269747949642c2042616265417574686f72697479576569676874293e04000460204e6578742065706f636820617574686f7269746965732e305365676d656e74496e64657801000c7533321000000000247c2052616e646f6d6e65737320756e64657220636f6e737472756374696f6e2e00f4205765206d616b6520612074726164656f6666206265747765656e2073746f7261676520616363657373657320616e64206c697374206c656e6774682e01012057652073746f72652074686520756e6465722d636f6e737472756374696f6e2072616e646f6d6e65737320696e207365676d656e7473206f6620757020746f942060554e4445525f434f4e535452554354494f4e5f5345474d454e545f4c454e475448602e00ec204f6e63652061207365676d656e7420726561636865732074686973206c656e6774682c20776520626567696e20746865206e657874206f6e652e090120576520726573657420616c6c207365676d656e747320616e642072657475726e20746f206030602061742074686520626567696e6e696e67206f662065766572791c2065706f63682e44556e646572436f6e737472756374696f6e0101050c7533326c5665633c7363686e6f72726b656c3a3a52616e646f6d6e6573733e0004000415012054574f582d4e4f54453a20605365676d656e74496e6465786020697320616e20696e6372656173696e6720696e74656765722c20736f2074686973206973206f6b61792e2c496e697469616c697a656400003c4d6179626552616e646f6d6e65737304000801012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e292077686963682069732060536f6d65601d01206966207065722d626c6f636b20696e697469616c697a6174696f6e2068617320616c7265616479206265656e2063616c6c656420666f722063757272656e7420626c6f636b2e4c417574686f7256726652616e646f6d6e65737301003c4d6179626552616e646f6d6e65737304000c5d012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e29207468617420696e636c756465732074686520565246206f75747075742067656e6572617465645101206174207468697320626c6f636b2e2054686973206669656c642073686f756c6420616c7761797320626520706f70756c6174656420647572696e6720626c6f636b2070726f63657373696e6720756e6c6573731901207365636f6e6461727920706c61696e20736c6f74732061726520656e61626c65642028776869636820646f6e277420636f6e7461696e206120565246206f7574707574292e2845706f6368537461727401008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d62657229200000000000000000145d012054686520626c6f636b206e756d62657273207768656e20746865206c61737420616e642063757272656e742065706f6368206861766520737461727465642c20726573706563746976656c7920604e2d316020616e641420604e602e4901204e4f54453a20576520747261636b207468697320697320696e206f7264657220746f20616e6e6f746174652074686520626c6f636b206e756d626572207768656e206120676976656e20706f6f6c206f66590120656e74726f7079207761732066697865642028692e652e20697420776173206b6e6f776e20746f20636861696e206f6273657276657273292e2053696e63652065706f6368732061726520646566696e656420696e590120736c6f74732c207768696368206d617920626520736b69707065642c2074686520626c6f636b206e756d62657273206d6179206e6f74206c696e6520757020776974682074686520736c6f74206e756d626572732e204c6174656e657373010038543a3a426c6f636b4e756d626572100000000014d820486f77206c617465207468652063757272656e7420626c6f636b20697320636f6d706172656420746f2069747320706172656e742e001501205468697320656e74727920697320706f70756c617465642061732070617274206f6620626c6f636b20657865637574696f6e20616e6420697320636c65616e65642075701101206f6e20626c6f636b2066696e616c697a6174696f6e2e205175657279696e6720746869732073746f7261676520656e747279206f757473696465206f6620626c6f636bb020657865637574696f6e20636f6e746578742073686f756c6420616c77617973207969656c64207a65726f2e2c45706f6368436f6e6669670000584261626545706f6368436f6e66696775726174696f6e04000485012054686520636f6e66696775726174696f6e20666f72207468652063757272656e742065706f63682e2053686f756c64206e6576657220626520604e6f6e656020617320697420697320696e697469616c697a656420696e2067656e657369732e3c4e65787445706f6368436f6e6669670000584261626545706f6368436f6e66696775726174696f6e0400082d012054686520636f6e66696775726174696f6e20666f7220746865206e6578742065706f63682c20604e6f6e65602069662074686520636f6e6669672077696c6c206e6f74206368616e6765e82028796f752063616e2066616c6c6261636b20746f206045706f6368436f6e6669676020696e737465616420696e20746861742063617365292e010c4c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66200d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e48706c616e5f636f6e6669675f6368616e67650418636f6e666967504e657874436f6e66696744657363726970746f7210610120506c616e20616e2065706f636820636f6e666967206368616e67652e205468652065706f636820636f6e666967206368616e6765206973207265636f7264656420616e642077696c6c20626520656e6163746564206f6e550120746865206e6578742063616c6c20746f2060656e6163745f65706f63685f6368616e6765602e2054686520636f6e6669672077696c6c20626520616374697661746564206f6e652065706f63682061667465722e5d01204d756c7469706c652063616c6c7320746f2074686973206d6574686f642077696c6c207265706c61636520616e79206578697374696e6720706c616e6e656420636f6e666967206368616e676520746861742068616458206e6f74206265656e20656e6163746564207965742e00083445706f63684475726174696f6e0c75363420c8000000000000000cec2054686520616d6f756e74206f662074696d652c20696e20736c6f74732c207468617420656163682065706f63682073686f756c64206c6173742e1901204e4f54453a2043757272656e746c79206974206973206e6f7420706f737369626c6520746f206368616e6765207468652065706f6368206475726174696f6e20616674657221012074686520636861696e2068617320737461727465642e20417474656d7074696e6720746f20646f20736f2077696c6c20627269636b20626c6f636b2070726f64756374696f6e2e444578706563746564426c6f636b54696d6524543a3a4d6f6d656e7420b80b00000000000014050120546865206578706563746564206176657261676520626c6f636b2074696d6520617420776869636820424142452073686f756c64206265206372656174696e67110120626c6f636b732e2053696e636520424142452069732070726f626162696c6973746963206974206973206e6f74207472697669616c20746f20666967757265206f75740501207768617420746865206578706563746564206176657261676520626c6f636b2074696d652073686f756c64206265206261736564206f6e2074686520736c6f740901206475726174696f6e20616e642074686520736563757269747920706172616d657465722060636020287768657265206031202d20636020726570726573656e7473a0207468652070726f626162696c697479206f66206120736c6f74206265696e6720656d707479292e0c60496e76616c696445717569766f636174696f6e50726f6f6604350120416e2065717569766f636174696f6e2070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e60496e76616c69644b65794f776e65727368697050726f6f660435012041206b6579206f776e6572736869702070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e584475706c69636174654f6666656e63655265706f7274041901204120676976656e2065717569766f636174696f6e207265706f72742069732076616c69642062757420616c72656164792070726576696f75736c79207265706f727465642e022454696d657374616d70012454696d657374616d70080c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f01040c736574040c6e6f7748436f6d706163743c543a3a4d6f6d656e743e3c5820536574207468652063757272656e742074696d652e00590120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6ed82070686173652c20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e004501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062794420604d696e696d756d506572696f64602e00d820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060496e686572656e74602e002c2023203c7765696768743e3501202d20604f2831296020284e6f7465207468617420696d706c656d656e746174696f6e73206f6620604f6e54696d657374616d7053657460206d75737420616c736f20626520604f2831296029a101202d20312073746f72616765207265616420616e6420312073746f72616765206d75746174696f6e2028636f64656320604f28312960292e202862656361757365206f6620604469645570646174653a3a74616b656020696e20606f6e5f66696e616c697a656029d8202d2031206576656e742068616e646c657220606f6e5f74696d657374616d705f736574602e204d75737420626520604f283129602e302023203c2f7765696768743e0004344d696e696d756d506572696f6424543a3a4d6f6d656e7420dc0500000000000010690120546865206d696e696d756d20706572696f64206265747765656e20626c6f636b732e204265776172652074686174207468697320697320646966666572656e7420746f20746865202a65787065637465642a20706572696f64690120746861742074686520626c6f636b2070726f64756374696f6e206170706172617475732070726f76696465732e20596f75722063686f73656e20636f6e73656e7375732073797374656d2077696c6c2067656e6572616c6c79650120776f726b2077697468207468697320746f2064657465726d696e6520612073656e7369626c6520626c6f636b2074696d652e20652e672e20466f7220417572612c2069742077696c6c20626520646f75626c6520746869737020706572696f64206f6e2064656661756c742073657474696e67732e000328417574686f72736869700128417574686f72736869700c18556e636c65730100e85665633c556e636c65456e7472794974656d3c543a3a426c6f636b4e756d6265722c20543a3a486173682c20543a3a4163636f756e7449643e3e0400041c20556e636c657318417574686f72000030543a3a4163636f756e7449640400046420417574686f72206f662063757272656e7420626c6f636b2e30446964536574556e636c6573010010626f6f6c040004bc205768657468657220756e636c6573207765726520616c72656164792073657420696e207468697320626c6f636b2e0104287365745f756e636c657304286e65775f756e636c6573385665633c543a3a4865616465723e04642050726f76696465206120736574206f6620756e636c65732e00001c48496e76616c6964556e636c65506172656e74048c2054686520756e636c6520706172656e74206e6f7420696e2074686520636861696e2e40556e636c6573416c7265616479536574048420556e636c657320616c72656164792073657420696e2074686520626c6f636b2e34546f6f4d616e79556e636c6573044420546f6f206d616e7920756e636c65732e3047656e65736973556e636c6504582054686520756e636c652069732067656e657369732e30546f6f48696768556e636c6504802054686520756e636c6520697320746f6f206869676820696e20636861696e2e50556e636c65416c7265616479496e636c75646564047c2054686520756e636c6520697320616c726561647920696e636c756465642e204f6c64556e636c6504b82054686520756e636c652069736e277420726563656e7420656e6f75676820746f20626520696e636c756465642e041c496e6469636573011c496e646963657304204163636f756e74730001023c543a3a4163636f756e74496e6465788828543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20626f6f6c29000400048820546865206c6f6f6b75702066726f6d20696e64657820746f206163636f756e742e011414636c61696d0414696e6465783c543a3a4163636f756e74496e646578489c2041737369676e20616e2070726576696f75736c7920756e61737369676e656420696e6465782e00e0205061796d656e743a20604465706f736974602069732072657365727665642066726f6d207468652073656e646572206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e00f4202d2060696e646578603a2074686520696e64657820746f20626520636c61696d65642e2054686973206d757374206e6f7420626520696e207573652e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e207472616e73666572080c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e6465785061012041737369676e20616e20696e64657820616c7265616479206f776e6564206279207468652073656e64657220746f20616e6f74686572206163636f756e742e205468652062616c616e6365207265736572766174696f6ebc206973206566666563746976656c79207472616e7366657272656420746f20746865206e6577206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002901202d2060696e646578603a2074686520696e64657820746f2062652072652d61737369676e65642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e68202d204f6e65207472616e73666572206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743ae4202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429e8202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429302023203c2f7765696768743e10667265650414696e6465783c543a3a4163636f756e74496e6465784898204672656520757020616e20696e646578206f776e6564206279207468652073656e6465722e006101205061796d656e743a20416e792070726576696f7573206465706f73697420706c6163656420666f722074686520696e64657820697320756e726573657276656420696e207468652073656e646572206163636f756e742e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206f776e2074686520696e6465782e001101202d2060696e646578603a2074686520696e64657820746f2062652066726565642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e008820456d6974732060496e646578467265656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e38666f7263655f7472616e736665720c0c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e64657818667265657a6510626f6f6c54590120466f72636520616e20696e64657820746f20616e206163636f756e742e205468697320646f65736e277420726571756972652061206465706f7369742e2049662074686520696e64657820697320616c7265616479ec2068656c642c207468656e20616e79206465706f736974206973207265696d62757273656420746f206974732063757272656e74206f776e65722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00a8202d2060696e646578603a2074686520696e64657820746f206265202872652d2961737369676e65642e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e4501202d2060667265657a65603a2069662073657420746f206074727565602c2077696c6c20667265657a652074686520696e64657820736f2069742063616e6e6f74206265207472616e736665727265642e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e7c202d20557020746f206f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743af8202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229fc202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229302023203c2f7765696768743e18667265657a650414696e6465783c543a3a4163636f756e74496e64657844690120467265657a6520616e20696e64657820736f2069742077696c6c20616c7761797320706f696e7420746f207468652073656e646572206163636f756e742e205468697320636f6e73756d657320746865206465706f7369742e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d7573742068617665206170206e6f6e2d66726f7a656e206163636f756e742060696e646578602e00b0202d2060696e646578603a2074686520696e64657820746f2062652066726f7a656e20696e20706c6163652e008c20456d6974732060496e64657846726f7a656e60206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e74202d20557020746f206f6e6520736c617368206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e010c34496e64657841737369676e656408244163636f756e744964304163636f756e74496e64657804b42041206163636f756e7420696e646578207761732061737369676e65642e205c5b696e6465782c2077686f5c5d28496e646578467265656404304163636f756e74496e64657804e82041206163636f756e7420696e64657820686173206265656e2066726565642075702028756e61737369676e6564292e205c5b696e6465785c5d2c496e64657846726f7a656e08304163636f756e74496e646578244163636f756e7449640429012041206163636f756e7420696e64657820686173206265656e2066726f7a656e20746f206974732063757272656e74206163636f756e742049442e205c5b696e6465782c2077686f5c5d041c4465706f7369743042616c616e63654f663c543e4000407a10f35a0000000000000000000004ac20546865206465706f736974206e656564656420666f7220726573657276696e6720616e20696e6465782e142c4e6f7441737369676e656404902054686520696e64657820776173206e6f7420616c72656164792061737369676e65642e204e6f744f776e657204a82054686520696e6465782069732061737369676e656420746f20616e6f74686572206163636f756e742e14496e55736504742054686520696e64657820776173206e6f7420617661696c61626c652e2c4e6f745472616e7366657204cc2054686520736f7572636520616e642064657374696e6174696f6e206163636f756e747320617265206964656e746963616c2e245065726d616e656e7404d42054686520696e646578206973207065726d616e656e7420616e64206d6179206e6f742062652066726565642f6368616e6765642e052042616c616e636573012042616c616e6365731434546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004982054686520746f74616c20756e6974732069737375656420696e207468652073797374656d2e1c4163636f756e7401010230543a3a4163636f756e7449645c4163636f756e74446174613c543a3a42616c616e63653e000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c6c205468652062616c616e6365206f6620616e206163636f756e742e004101204e4f54453a2054686973206973206f6e6c79207573656420696e207468652063617365207468617420746869732070616c6c6574206973207573656420746f2073746f72652062616c616e6365732e144c6f636b7301010230543a3a4163636f756e744964d05765616b426f756e6465645665633c42616c616e63654c6f636b3c543a3a42616c616e63653e2c20543a3a4d61784c6f636b733e00040008b820416e79206c6971756964697479206c6f636b73206f6e20736f6d65206163636f756e742062616c616e6365732e2501204e4f54453a2053686f756c64206f6e6c79206265206163636573736564207768656e2073657474696e672c206368616e67696e6720616e642066726565696e672061206c6f636b2e20526573657276657301010230543a3a4163636f756e7449642901426f756e6465645665633c52657365727665446174613c543a3a526573657276654964656e7469666965722c20543a3a42616c616e63653e2c20543a3a0a4d617852657365727665733e00040004a4204e616d6564207265736572766573206f6e20736f6d65206163636f756e742062616c616e6365732e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076322e302e3020666f72206e6577206e6574776f726b732e0114207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e6cd8205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572206163636f756e742e00090120607472616e73666572602077696c6c207365742074686520604672656542616c616e636560206f66207468652073656e64657220616e642072656365697665722e21012049742077696c6c2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d2062792074686520605472616e73666572466565602e1501204966207468652073656e6465722773206163636f756e742069732062656c6f7720746865206578697374656e7469616c206465706f736974206173206120726573756c74b4206f6620746865207472616e736665722c20746865206163636f756e742077696c6c206265207265617065642e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605369676e65646020627920746865207472616e736163746f722e002c2023203c7765696768743e3101202d20446570656e64656e74206f6e20617267756d656e747320627574206e6f7420637269746963616c2c20676976656e2070726f70657220696d706c656d656e746174696f6e7320666f72cc202020696e70757420636f6e6669672074797065732e205365652072656c617465642066756e6374696f6e732062656c6f772e6901202d20497420636f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e642077726974657320696e7465726e616c6c7920616e64206e6f20636f6d706c657820636f6d7075746174696f6e2e004c2052656c617465642066756e6374696f6e733a0051012020202d2060656e737572655f63616e5f77697468647261776020697320616c776179732063616c6c656420696e7465726e616c6c792062757420686173206120626f756e64656420636f6d706c65786974792e2d012020202d205472616e7366657272696e672062616c616e63657320746f206163636f756e7473207468617420646964206e6f74206578697374206265666f72652077696c6c206361757365d420202020202060543a3a4f6e4e65774163636f756e743a3a6f6e5f6e65775f6163636f756e746020746f2062652063616c6c65642e61012020202d2052656d6f76696e6720656e6f7567682066756e64732066726f6d20616e206163636f756e742077696c6c20747269676765722060543a3a4475737452656d6f76616c3a3a6f6e5f756e62616c616e636564602e49012020202d20607472616e736665725f6b6565705f616c6976656020776f726b73207468652073616d652077617920617320607472616e73666572602c206275742068617320616e206164646974696f6e616cf82020202020636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c20746865206f726967696e206163636f756e742e88202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d4501202d2042617365205765696768743a2037332e363420c2b5732c20776f7273742063617365207363656e6172696f20286163636f756e7420637265617465642c206163636f756e742072656d6f76656429dc202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374696e6174696f6e206163636f756e741501202d204f726967696e206163636f756e7420697320616c726561647920696e206d656d6f72792c20736f206e6f204442206f7065726174696f6e7320666f72207468656d2e302023203c2f7765696768743e2c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365206e65775f667265654c436f6d706163743c543a3a42616c616e63653e306e65775f72657365727665644c436f6d706163743c543a3a42616c616e63653e489420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e00210120546869732077696c6c20616c74657220604672656542616c616e63656020616e642060526573657276656442616c616e63656020696e2073746f726167652e2069742077696c6c090120616c736f2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d202860546f74616c49737375616e636560292e190120496620746865206e65772066726565206f722072657365727665642062616c616e63652069732062656c6f7720746865206578697374656e7469616c206465706f7369742c01012069742077696c6c20726573657420746865206163636f756e74206e6f6e63652028606672616d655f73797374656d3a3a4163636f756e744e6f6e636560292e00b420546865206469737061746368206f726967696e20666f7220746869732063616c6c2069732060726f6f74602e002c2023203c7765696768743e80202d20496e646570656e64656e74206f662074686520617267756d656e74732ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e58202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c202d2042617365205765696768743a6820202020202d204372656174696e673a2032372e353620c2b5736420202020202d204b696c6c696e673a2033352e313120c2b57398202d204442205765696768743a203120526561642c203120577269746520746f206077686f60302023203c2f7765696768743e38666f7263655f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e1851012045786163746c7920617320607472616e73666572602c2065786365707420746865206f726967696e206d75737420626520726f6f7420616e642074686520736f75726365206163636f756e74206d61792062652c207370656369666965642e2c2023203c7765696768743e4101202d2053616d65206173207472616e736665722c20627574206164646974696f6e616c207265616420616e6420777269746520626563617573652074686520736f75726365206163636f756e74206973902020206e6f7420617373756d656420746f20626520696e20746865206f7665726c61792e302023203c2f7765696768743e4c7472616e736665725f6b6565705f616c6976650810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e2c51012053616d6520617320746865205b607472616e73666572605d2063616c6c2c206275742077697468206120636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c2074686540206f726967696e206163636f756e742e00bc20393925206f66207468652074696d6520796f752077616e74205b607472616e73666572605d20696e73746561642e00c4205b607472616e73666572605d3a207374727563742e50616c6c65742e68746d6c236d6574686f642e7472616e736665722c2023203c7765696768743ee8202d2043686561706572207468616e207472616e736665722062656361757365206163636f756e742063616e6e6f74206265206b696c6c65642e60202d2042617365205765696768743a2035312e3420c2b5731d01202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374202873656e64657220697320696e206f7665726c617920616c7265616479292c20233c2f7765696768743e307472616e736665725f616c6c0810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365286b6565705f616c69766510626f6f6c480901205472616e736665722074686520656e74697265207472616e7366657261626c652062616c616e63652066726f6d207468652063616c6c6572206163636f756e742e005d01204e4f54453a20546869732066756e6374696f6e206f6e6c7920617474656d70747320746f207472616e73666572205f7472616e7366657261626c655f2062616c616e6365732e2054686973206d65616e732074686174650120616e79206c6f636b65642c2072657365727665642c206f72206578697374656e7469616c206465706f7369747320287768656e20606b6565705f616c6976656020697320607472756560292c2077696c6c206e6f742062656101207472616e7366657272656420627920746869732066756e6374696f6e2e20546f20656e73757265207468617420746869732066756e6374696f6e20726573756c747320696e2061206b696c6c6564206163636f756e742c490120796f75206d69676874206e65656420746f207072657061726520746865206163636f756e742062792072656d6f76696e6720616e79207265666572656e636520636f756e746572732c2073746f7261676544206465706f736974732c206574632e2e2e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205369676e65642e00a4202d206064657374603a2054686520726563697069656e74206f6620746865207472616e736665722e5d01202d20606b6565705f616c697665603a204120626f6f6c65616e20746f2064657465726d696e652069662074686520607472616e736665725f616c6c60206f7065726174696f6e2073686f756c642073656e6420616c6c51012020206f66207468652066756e647320746865206163636f756e74206861732c2063617573696e67207468652073656e646572206163636f756e7420746f206265206b696c6c6564202866616c7365292c206f725d012020207472616e736665722065766572797468696e6720657863657074206174206c6561737420746865206578697374656e7469616c206465706f7369742c2077686963682077696c6c2067756172616e74656520746fa02020206b656570207468652073656e646572206163636f756e7420616c697665202874727565292e3420202023203c7765696768743e3d01202d204f2831292e204a757374206c696b65207472616e736665722c206275742072656164696e672074686520757365722773207472616e7366657261626c652062616c616e63652066697273742e34202020233c2f7765696768743e01201c456e646f77656408244163636f756e7449641c42616c616e636504250120416e206163636f756e74207761732063726561746564207769746820736f6d6520667265652062616c616e63652e205c5b6163636f756e742c20667265655f62616c616e63655c5d20447573744c6f737408244163636f756e7449641c42616c616e636508410120416e206163636f756e74207761732072656d6f7665642077686f73652062616c616e636520776173206e6f6e2d7a65726f206275742062656c6f77204578697374656e7469616c4465706f7369742cd020726573756c74696e6720696e20616e206f75747269676874206c6f73732e205c5b6163636f756e742c2062616c616e63655c5d205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e636504a0205472616e73666572207375636365656465642e205c5b66726f6d2c20746f2c2076616c75655c5d2842616c616e63655365740c244163636f756e7449641c42616c616e63651c42616c616e636504cc20412062616c616e6365207761732073657420627920726f6f742e205c5b77686f2c20667265652c2072657365727665645c5d1c4465706f73697408244163636f756e7449641c42616c616e636504210120536f6d6520616d6f756e7420776173206465706f73697465642028652e672e20666f72207472616e73616374696f6e2066656573292e205c5b77686f2c206465706f7369745c5d20526573657276656408244163636f756e7449641c42616c616e636504210120536f6d652062616c616e63652077617320726573657276656420286d6f7665642066726f6d206672656520746f207265736572766564292e205c5b77686f2c2076616c75655c5d28556e726573657276656408244163636f756e7449641c42616c616e636504290120536f6d652062616c616e63652077617320756e726573657276656420286d6f7665642066726f6d20726573657276656420746f2066726565292e205c5b77686f2c2076616c75655c5d4852657365727665526570617472696174656410244163636f756e744964244163636f756e7449641c42616c616e6365185374617475730c510120536f6d652062616c616e636520776173206d6f7665642066726f6d207468652072657365727665206f6620746865206669727374206163636f756e7420746f20746865207365636f6e64206163636f756e742edc2046696e616c20617267756d656e7420696e64696361746573207468652064657374696e6174696f6e2062616c616e636520747970652ea8205c5b66726f6d2c20746f2c2062616c616e63652c2064657374696e6174696f6e5f7374617475735c5d04484578697374656e7469616c4465706f73697428543a3a42616c616e63654000407a10f35a0000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f206b65657020616e206163636f756e74206f70656e2e203856657374696e6742616c616e6365049c2056657374696e672062616c616e636520746f6f206869676820746f2073656e642076616c7565544c69717569646974795265737472696374696f6e7304c8204163636f756e74206c6971756964697479207265737472696374696f6e732070726576656e74207769746864726177616c4c496e73756666696369656e7442616c616e636504782042616c616e636520746f6f206c6f7720746f2073656e642076616c7565484578697374656e7469616c4465706f73697404ec2056616c756520746f6f206c6f7720746f20637265617465206163636f756e742064756520746f206578697374656e7469616c206465706f736974244b656570416c6976650490205472616e736665722f7061796d656e7420776f756c64206b696c6c206163636f756e745c4578697374696e6756657374696e675363686564756c6504cc20412076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e742c446561644163636f756e74048c2042656e6566696369617279206163636f756e74206d757374207072652d65786973743c546f6f4d616e79526573657276657304b0204e756d626572206f66206e616d656420726573657276657320657863656564204d6178526573657276657306485472616e73616374696f6e5061796d656e7401485472616e73616374696f6e5061796d656e7408444e6578744665654d756c7469706c6965720100284d756c7469706c69657240000064a7b3b6e00d0000000000000000003853746f7261676556657273696f6e01002052656c6561736573040000000008485472616e73616374696f6e427974654665653042616c616e63654f663c543e4000e40b54020000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e2c576569676874546f466565a45665633c576569676874546f466565436f656666696369656e743c42616c616e63654f663c543e3e3e5c0401000000000000000000000000000000000000000001040d012054686520706f6c796e6f6d69616c2074686174206973206170706c69656420696e206f7264657220746f20646572697665206665652066726f6d207765696768742e000768456c656374696f6e50726f76696465724d756c746950686173650168456c656374696f6e50726f76696465724d756c746950686173652814526f756e6401000c753332100100000018ac20496e7465726e616c20636f756e74657220666f7220746865206e756d626572206f6620726f756e64732e00550120546869732069732075736566756c20666f722064652d6475706c69636174696f6e206f66207472616e73616374696f6e73207375626d697474656420746f2074686520706f6f6c2c20616e642067656e6572616c6c20646961676e6f7374696373206f66207468652070616c6c65742e004d012054686973206973206d6572656c7920696e6372656d656e746564206f6e6365207065722065766572792074696d65207468617420616e20757073747265616d2060656c656374602069732063616c6c65642e3043757272656e74506861736501005450686173653c543a3a426c6f636b4e756d6265723e0400043c2043757272656e742070686173652e38517565756564536f6c7574696f6e00006c5265616479536f6c7574696f6e3c543a3a4163636f756e7449643e0400043d012043757272656e74206265737420736f6c7574696f6e2c207369676e6564206f7220756e7369676e65642c2071756575656420746f2062652072657475726e65642075706f6e2060656c656374602e20536e617073686f7400006c526f756e64536e617073686f743c543a3a4163636f756e7449643e04000c7020536e617073686f742064617461206f662074686520726f756e642e005d01205468697320697320637265617465642061742074686520626567696e6e696e67206f6620746865207369676e656420706861736520616e6420636c65617265642075706f6e2063616c6c696e672060656c656374602e38446573697265645461726765747300000c75333204000ccc2044657369726564206e756d626572206f66207461726765747320746f20656c65637420666f72207468697320726f756e642e00a8204f6e6c7920657869737473207768656e205b60536e617073686f74605d2069732070726573656e742e40536e617073686f744d65746164617461000058536f6c7574696f6e4f72536e617073686f7453697a6504000c9820546865206d65746164617461206f6620746865205b60526f756e64536e617073686f74605d00a8204f6e6c7920657869737473207768656e205b60536e617073686f74605d2069732070726573656e742e645369676e65645375626d697373696f6e4e657874496e64657801000c753332100000000024010120546865206e65787420696e64657820746f2062652061737369676e656420746f20616e20696e636f6d696e67207369676e6564207375626d697373696f6e2e007501204576657279206163636570746564207375626d697373696f6e2069732061737369676e6564206120756e6971756520696e6465783b207468617420696e64657820697320626f756e6420746f207468617420706172746963756c61726501207375626d697373696f6e20666f7220746865206475726174696f6e206f662074686520656c656374696f6e2e204f6e20656c656374696f6e2066696e616c697a6174696f6e2c20746865206e65787420696e6465782069733020726573657420746f20302e0069012057652063616e2774206a7573742075736520605369676e65645375626d697373696f6e496e64696365732e6c656e2829602c206265636175736520746861742773206120626f756e646564207365743b20706173742069747359012063617061636974792c2069742077696c6c2073696d706c792073617475726174652e2057652063616e2774206a7573742069746572617465206f76657220605369676e65645375626d697373696f6e734d6170602cf4206265636175736520697465726174696f6e20697320736c6f772e20496e73746561642c2077652073746f7265207468652076616c756520686572652e5c5369676e65645375626d697373696f6e496e64696365730100585375626d697373696f6e496e64696365734f663c543e0400184d01204120736f727465642c20626f756e64656420736574206f6620602873636f72652c20696e64657829602c20776865726520656163682060696e6465786020706f696e747320746f20612076616c756520696e5420605369676e65645375626d697373696f6e73602e007101205765206e65766572206e65656420746f2070726f63657373206d6f7265207468616e20612073696e676c65207369676e6564207375626d697373696f6e20617420612074696d652e205369676e6564207375626d697373696f6e7375012063616e206265207175697465206c617267652c20736f2077652772652077696c6c696e6720746f207061792074686520636f7374206f66206d756c7469706c6520646174616261736520616363657373657320746f206163636573732101207468656d206f6e6520617420612074696d6520696e7374656164206f662072656164696e6720616e64206465636f64696e6720616c6c206f66207468656d206174206f6e63652e505369676e65645375626d697373696f6e734d61700101050c753332545369676e65645375626d697373696f6e4f663c543e00d10100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000001c7420556e636865636b65642c207369676e656420736f6c7574696f6e732e00690120546f676574686572207769746820605375626d697373696f6e496e6469636573602c20746869732073746f726573206120626f756e64656420736574206f6620605369676e65645375626d697373696f6e7360207768696c65ec20616c6c6f77696e6720757320746f206b656570206f6e6c7920612073696e676c65206f6e6520696e206d656d6f727920617420612074696d652e0069012054776f78206e6f74653a20746865206b6579206f6620746865206d617020697320616e206175746f2d696e6372656d656e74696e6720696e6465782077686963682075736572732063616e6e6f7420696e7370656374206f72f4206166666563743b2077652073686f756c646e2774206e65656420612063727970746f67726170686963616c6c7920736563757265206861736865722e544d696e696d756d556e7472757374656453636f7265000034456c656374696f6e53636f72650400105d0120546865206d696e696d756d2073636f7265207468617420656163682027756e747275737465642720736f6c7574696f6e206d7573742061747461696e20696e206f7264657220746f20626520636f6e7369646572656428206665617369626c652e00b82043616e206265207365742076696120607365745f6d696e696d756d5f756e747275737465645f73636f7265602e01103c7375626d69745f756e7369676e65640820736f6c7574696f6e64526177536f6c7574696f6e3c436f6d706163744f663c543e3e1c7769746e65737358536f6c7574696f6e4f72536e617073686f7453697a6538a8205375626d6974206120736f6c7574696f6e20666f722074686520756e7369676e65642070686173652e00cc20546865206469737061746368206f726967696e20666f20746869732063616c6c206d757374206265205f5f6e6f6e655f5f2e0041012054686973207375626d697373696f6e20697320636865636b6564206f6e2074686520666c792e204d6f72656f7665722c207468697320756e7369676e656420736f6c7574696f6e206973206f6e6c7959012076616c696461746564207768656e207375626d697474656420746f2074686520706f6f6c2066726f6d20746865202a2a6c6f63616c2a2a206e6f64652e204566666563746976656c792c2074686973206d65616e7361012074686174206f6e6c79206163746976652076616c696461746f72732063616e207375626d69742074686973207472616e73616374696f6e207768656e20617574686f72696e67206120626c6f636b202873696d696c61724420746f20616e20696e686572656e74292e005d0120546f2070726576656e7420616e7920696e636f727265637420736f6c7574696f6e2028616e642074687573207761737465642074696d652f776569676874292c2074686973207472616e73616374696f6e2077696c6c51012070616e69632069662074686520736f6c7574696f6e207375626d6974746564206279207468652076616c696461746f7220697320696e76616c696420696e20616e79207761792c206566666563746976656c79a02070757474696e6720746865697220617574686f72696e6720726577617264206174207269736b2e00e4204e6f206465706f736974206f7220726577617264206973206173736f63696174656420776974682074686973207375626d697373696f6e2e6c7365745f6d696e696d756d5f756e747275737465645f73636f726504406d617962655f6e6578745f73636f7265544f7074696f6e3c456c656374696f6e53636f72653e14b4205365742061206e65772076616c756520666f7220604d696e696d756d556e7472757374656453636f7265602e00dc204469737061746368206f726967696e206d75737420626520616c69676e656420776974682060543a3a466f7263654f726967696e602e00f4205468697320636865636b2063616e206265207475726e6564206f66662062792073657474696e67207468652076616c756520746f20604e6f6e65602e747365745f656d657267656e63795f656c656374696f6e5f726573756c740420736f6c7574696f6e6c5265616479536f6c7574696f6e3c543a3a4163636f756e7449643e205d0120536574206120736f6c7574696f6e20696e207468652071756575652c20746f2062652068616e646564206f757420746f2074686520636c69656e74206f6620746869732070616c6c657420696e20746865206e6578748c2063616c6c20746f2060456c656374696f6e50726f76696465723a3a656c656374602e00490120546869732063616e206f6e6c79206265207365742062792060543a3a466f7263654f726967696e602c20616e64206f6e6c79207768656e207468652070686173652069732060456d657267656e6379602e0065012054686520736f6c7574696f6e206973206e6f7420636865636b656420666f7220616e7920666561736962696c69747920616e6420697320617373756d656420746f206265207472757374776f727468792c20617320616e79550120666561736962696c69747920636865636b20697473656c662063616e20696e207072696e6369706c652063617573652074686520656c656374696f6e2070726f6365737320746f206661696c202864756520746f6c206d656d6f72792f77656967687420636f6e73747261696e73292e187375626d69740820736f6c7574696f6e64526177536f6c7574696f6e3c436f6d706163744f663c543e3e586e756d5f7369676e65645f7375626d697373696f6e730c75333234a0205375626d6974206120736f6c7574696f6e20666f7220746865207369676e65642070686173652e00d420546865206469737061746368206f726967696e20666f20746869732063616c6c206d757374206265205f5f7369676e65645f5f2e0061012054686520736f6c7574696f6e20697320706f74656e7469616c6c79207175657565642c206261736564206f6e2074686520636c61696d65642073636f726520616e642070726f6365737365642061742074686520656e6454206f6620746865207369676e65642070686173652e0061012041206465706f73697420697320726573657276656420616e64207265636f7264656420666f722074686520736f6c7574696f6e2e204261736564206f6e20746865206f7574636f6d652c2074686520736f6c7574696f6e1901206d696768742062652072657761726465642c20736c61736865642c206f722067657420616c6c206f7220612070617274206f6620746865206465706f736974206261636b2e002c2023203c7765696768743eb42051756575652073697a65206d7573742062652070726f7669646564206173207769746e65737320646174612e302023203c2f7765696768743e011838536f6c7574696f6e53746f726564083c456c656374696f6e436f6d7075746510626f6f6c18b8204120736f6c7574696f6e207761732073746f72656420776974682074686520676976656e20636f6d707574652e0041012049662074686520736f6c7574696f6e206973207369676e65642c2074686973206d65616e732074686174206974206861736e277420796574206265656e2070726f6365737365642e20496620746865090120736f6c7574696f6e20697320756e7369676e65642c2074686973206d65616e7320746861742069742068617320616c736f206265656e2070726f6365737365642e005501205468652060626f6f6c6020697320607472756560207768656e20612070726576696f757320736f6c7574696f6e2077617320656a656374656420746f206d616b6520726f6f6d20666f722074686973206f6e652e44456c656374696f6e46696e616c697a6564045c4f7074696f6e3c456c656374696f6e436f6d707574653e0859012054686520656c656374696f6e20686173206265656e2066696e616c697a65642c20776974682060536f6d6560206f662074686520676976656e20636f6d7075746174696f6e2c206f7220656c7365206966207468656420656c656374696f6e206661696c65642c20604e6f6e65602e20526577617264656408244163636f756e7449641c42616c616e636504290120416e206163636f756e7420686173206265656e20726577617264656420666f72207468656972207369676e6564207375626d697373696f6e206265696e672066696e616c697a65642e1c536c617368656408244163636f756e7449641c42616c616e636504250120416e206163636f756e7420686173206265656e20736c617368656420666f72207375626d697474696e6720616e20696e76616c6964207369676e6564207375626d697373696f6e2e485369676e6564506861736553746172746564040c75333204c420546865207369676e6564207068617365206f662074686520676976656e20726f756e642068617320737461727465642e50556e7369676e6564506861736553746172746564040c75333204cc2054686520756e7369676e6564207068617365206f662074686520676976656e20726f756e642068617320737461727465642e2834556e7369676e6564506861736538543a3a426c6f636b4e756d62657210320000000480204475726174696f6e206f662074686520756e7369676e65642070686173652e2c5369676e6564506861736538543a3a426c6f636b4e756d62657210320000000478204475726174696f6e206f6620746865207369676e65642070686173652e70536f6c7574696f6e496d70726f76656d656e745468726573686f6c641c50657262696c6c10a0860100084d0120546865206d696e696d756d20616d6f756e74206f6620696d70726f76656d656e7420746f2074686520736f6c7574696f6e2073636f7265207468617420646566696e6573206120736f6c7574696f6e206173642022626574746572222028696e20616e79207068617365292e384f6666636861696e52657065617438543a3a426c6f636b4e756d626572100500000010b42054686520726570656174207468726573686f6c64206f6620746865206f6666636861696e20776f726b65722e00610120466f72206578616d706c652c20696620697420697320352c2074686174206d65616e732074686174206174206c65617374203520626c6f636b732077696c6c20656c61707365206265747765656e20617474656d7074738420746f207375626d69742074686520776f726b6572277320736f6c7574696f6e2e505369676e65644d61785375626d697373696f6e730c753332100a0000001ce4204d6178696d756d206e756d626572206f66207369676e6564207375626d697373696f6e7320746861742063616e206265207175657565642e005501204974206973206265737420746f2061766f69642061646a757374696e67207468697320647572696e6720616e20656c656374696f6e2c20617320697420696d706163747320646f776e73747265616d2064617461650120737472756374757265732e20496e20706172746963756c61722c20605369676e65645375626d697373696f6e496e64696365733c543e6020697320626f756e646564206f6e20746869732076616c75652e20496620796f75f42075706461746520746869732076616c756520647572696e6720616e20656c656374696f6e2c20796f75205f6d7573745f20656e7375726520746861744d0120605369676e65645375626d697373696f6e496e64696365732e6c656e282960206973206c657373207468616e206f7220657175616c20746f20746865206e65772076616c75652e204f74686572776973652cf020617474656d70747320746f207375626d6974206e657720736f6c7574696f6e73206d617920636175736520612072756e74696d652070616e69632e3c5369676e65644d61785765696768741857656967687420c07c907c2d0100000c94204d6178696d756d20776569676874206f662061207369676e656420736f6c7574696f6e2e00fc20546869732073686f756c642070726f6261626c792062652073696d696c617220746f205b60436f6e6669673a3a4d696e65724d6178576569676874605d2e405369676e6564526577617264426173653042616c616e63654f663c543e4000407a10f35a00000000000000000000048820426173652072657761726420666f722061207369676e656420736f6c7574696f6e445369676e65644465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004902042617365206465706f73697420666f722061207369676e656420736f6c7574696f6e2e445369676e65644465706f736974427974653042616c616e63654f663c543e400010a5d4e8000000000000000000000004a0205065722d62797465206465706f73697420666f722061207369676e656420736f6c7574696f6e2e4c5369676e65644465706f7369745765696768743042616c616e63654f663c543e400000000000000000000000000000000004a8205065722d776569676874206465706f73697420666f722061207369676e656420736f6c7574696f6e2e2c6850726544697370617463684561726c795375626d697373696f6e0468205375626d697373696f6e2077617320746f6f206561726c792e6c507265446973706174636857726f6e6757696e6e6572436f756e74048c2057726f6e67206e756d626572206f662077696e6e6572732070726573656e7465642e6450726544697370617463685765616b5375626d697373696f6e0494205375626d697373696f6e2077617320746f6f207765616b2c2073636f72652d776973652e3c5369676e6564517565756546756c6c044d0120546865207175657565207761732066756c6c2c20616e642074686520736f6c7574696f6e20776173206e6f7420626574746572207468616e20616e79206f6620746865206578697374696e67206f6e65732e585369676e656443616e6e6f745061794465706f736974049820546865206f726967696e206661696c656420746f2070617920746865206465706f7369742e505369676e6564496e76616c69645769746e65737304a4205769746e657373206461746120746f20646973706174636861626c6520697320696e76616c69642e4c5369676e6564546f6f4d75636857656967687404bc20546865207369676e6564207375626d697373696f6e20636f6e73756d657320746f6f206d756368207765696768743c4f637743616c6c57726f6e67457261049c204f4357207375626d697474656420736f6c7574696f6e20666f722077726f6e6720726f756e645c4d697373696e67536e617073686f744d6574616461746104ac20536e617073686f74206d657461646174612073686f756c6420657869737420627574206469646e27742e58496e76616c69645375626d697373696f6e496e64657804d4206053656c663a3a696e736572745f7375626d697373696f6e602072657475726e656420616e20696e76616c696420696e6465782e3843616c6c4e6f74416c6c6f776564049c205468652063616c6c206973206e6f7420616c6c6f776564206174207468697320706f696e742e081c5374616b696e67011c5374616b696e679430486973746f7279446570746801000c75333210540000001c8c204e756d626572206f66206572617320746f206b65657020696e20686973746f72792e00390120496e666f726d6174696f6e206973206b65707420666f72206572617320696e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e006101204d757374206265206d6f7265207468616e20746865206e756d626572206f6620657261732064656c617965642062792073657373696f6e206f74686572776973652e20492e652e2061637469766520657261206d757374390120616c7761797320626520696e20686973746f72792e20492e652e20606163746976655f657261203e2063757272656e745f657261202d20686973746f72795f646570746860206d757374206265302067756172616e746565642e3856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321000000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e34496e76756c6e657261626c65730100445665633c543a3a4163636f756e7449643e04000c590120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c79206b69636b65642e20497427732061205665632073696e636520746865792772654d01206561737920746f20696e697469616c697a6520616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f7572ac20696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e18426f6e64656400010530543a3a4163636f756e74496430543a3a4163636f756e744964000400040101204d61702066726f6d20616c6c206c6f636b65642022737461736822206163636f756e747320746f2074686520636f6e74726f6c6c6572206163636f756e742e404d696e4e6f6d696e61746f72426f6e6401003042616c616e63654f663c543e400000000000000000000000000000000004210120546865206d696e696d756d2061637469766520626f6e6420746f206265636f6d6520616e64206d61696e7461696e2074686520726f6c65206f662061206e6f6d696e61746f722e404d696e56616c696461746f72426f6e6401003042616c616e63654f663c543e400000000000000000000000000000000004210120546865206d696e696d756d2061637469766520626f6e6420746f206265636f6d6520616e64206d61696e7461696e2074686520726f6c65206f6620612076616c696461746f722e184c656467657200010230543a3a4163636f756e744964a45374616b696e674c65646765723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400044501204d61702066726f6d20616c6c2028756e6c6f636b6564292022636f6e74726f6c6c657222206163636f756e747320746f2074686520696e666f20726567617264696e6720746865207374616b696e672e14506179656501010530543a3a4163636f756e7449647c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e00040004e42057686572652074686520726577617264207061796d656e742073686f756c64206265206d6164652e204b657965642062792073746173682e2856616c696461746f727301010530543a3a4163636f756e7449643856616c696461746f725072656673000800000c450120546865206d61702066726f6d202877616e6e616265292076616c696461746f72207374617368206b657920746f2074686520707265666572656e636573206f6620746861742076616c696461746f722e004901205768656e207570646174696e6720746869732073746f72616765206974656d2c20796f75206d75737420616c736f20757064617465207468652060436f756e746572466f7256616c696461746f7273602e50436f756e746572466f7256616c696461746f727301000c7533321000000000042101204120747261636b657220746f206b65657020636f756e74206f6620746865206e756d626572206f66206974656d7320696e20746865206056616c696461746f727360206d61702e484d617856616c696461746f7273436f756e7400000c75333204000c310120546865206d6178696d756d2076616c696461746f7220636f756e74206265666f72652077652073746f7020616c6c6f77696e67206e65772076616c696461746f727320746f206a6f696e2e00d0205768656e20746869732076616c7565206973206e6f74207365742c206e6f206c696d6974732061726520656e666f726365642e284e6f6d696e61746f727300010530543a3a4163636f756e744964644e6f6d696e6174696f6e733c543a3a4163636f756e7449643e0004000c650120546865206d61702066726f6d206e6f6d696e61746f72207374617368206b657920746f2074686520736574206f66207374617368206b657973206f6620616c6c2076616c696461746f727320746f206e6f6d696e6174652e004901205768656e207570646174696e6720746869732073746f72616765206974656d2c20796f75206d75737420616c736f20757064617465207468652060436f756e746572466f724e6f6d696e61746f7273602e50436f756e746572466f724e6f6d696e61746f727301000c7533321000000000042101204120747261636b657220746f206b65657020636f756e74206f6620746865206e756d626572206f66206974656d7320696e2074686520604e6f6d696e61746f727360206d61702e484d61784e6f6d696e61746f7273436f756e7400000c75333204000c310120546865206d6178696d756d206e6f6d696e61746f7220636f756e74206265666f72652077652073746f7020616c6c6f77696e67206e65772076616c696461746f727320746f206a6f696e2e00d0205768656e20746869732076616c7565206973206e6f74207365742c206e6f206c696d6974732061726520656e666f726365642e2843757272656e74457261000020457261496e6465780400105c205468652063757272656e742065726120696e6465782e006501205468697320697320746865206c617465737420706c616e6e6564206572612c20646570656e64696e67206f6e20686f77207468652053657373696f6e2070616c6c657420717565756573207468652076616c696461746f7280207365742c206974206d6967687420626520616374697665206f72206e6f742e24416374697665457261000034416374697665457261496e666f040010d820546865206163746976652065726120696e666f726d6174696f6e2c20697420686f6c647320696e64657820616e642073746172742e0059012054686520616374697665206572612069732074686520657261206265696e672063757272656e746c792072657761726465642e2056616c696461746f7220736574206f66207468697320657261206d757374206265ac20657175616c20746f205b6053657373696f6e496e746572666163653a3a76616c696461746f7273605d2e5445726173537461727453657373696f6e496e64657800010520457261496e6465783053657373696f6e496e646578000400103101205468652073657373696f6e20696e646578206174207768696368207468652065726120737461727420666f7220746865206c6173742060484953544f52595f44455054486020657261732e006101204e6f74653a205468697320747261636b7320746865207374617274696e672073657373696f6e2028692e652e2073657373696f6e20696e646578207768656e20657261207374617274206265696e672061637469766529f020666f7220746865206572617320696e20605b43757272656e74457261202d20484953544f52595f44455054482c2043757272656e744572615d602e2c457261735374616b65727301020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000001878204578706f73757265206f662076616c696461746f72206174206572612e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e48457261735374616b657273436c697070656401020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000002c9820436c6970706564204578706f73757265206f662076616c696461746f72206174206572612e00590120546869732069732073696d696c617220746f205b60457261735374616b657273605d20627574206e756d626572206f66206e6f6d696e61746f7273206578706f736564206973207265647563656420746f20746865dc2060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732e1d0120284e6f74653a20746865206669656c642060746f74616c6020616e6420606f776e60206f6620746865206578706f737572652072656d61696e7320756e6368616e676564292ef42054686973206973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e005d012054686973206973206b657965642066697374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e484572617356616c696461746f72507265667301020520457261496e64657830543a3a4163636f756e7449643856616c696461746f725072656673050800001411012053696d696c617220746f2060457261735374616b657273602c207468697320686f6c64732074686520707265666572656e636573206f662076616c696461746f72732e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4c4572617356616c696461746f7252657761726400010520457261496e6465783042616c616e63654f663c543e0004000c09012054686520746f74616c2076616c696461746f7220657261207061796f757420666f7220746865206c6173742060484953544f52595f44455054486020657261732e0021012045726173207468617420686176656e27742066696e697368656420796574206f7220686173206265656e2072656d6f76656420646f65736e27742068617665207265776172642e4045726173526577617264506f696e747301010520457261496e64657874457261526577617264506f696e74733c543a3a4163636f756e7449643e0014000000000008ac205265776172647320666f7220746865206c6173742060484953544f52595f44455054486020657261732e250120496620726577617264206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207265776172642069732072657475726e65642e3845726173546f74616c5374616b6501010520457261496e6465783042616c616e63654f663c543e00400000000000000000000000000000000008ec2054686520746f74616c20616d6f756e74207374616b656420666f7220746865206c6173742060484953544f52595f44455054486020657261732e1d0120496620746f74616c206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207374616b652069732072657475726e65642e20466f72636545726101001c466f7263696e6704000454204d6f6465206f662065726120666f7263696e672e4c536c6173685265776172644672616374696f6e01001c50657262696c6c10000000000cf8205468652070657263656e74616765206f662074686520736c617368207468617420697320646973747269627574656420746f207265706f72746572732e00e4205468652072657374206f662074686520736c61736865642076616c75652069732068616e646c6564206279207468652060536c617368602e4c43616e63656c6564536c6173685061796f757401003042616c616e63654f663c543e40000000000000000000000000000000000815012054686520616d6f756e74206f662063757272656e637920676976656e20746f207265706f7274657273206f66206120736c617368206576656e7420776869636820776173ec2063616e63656c65642062792065787472616f7264696e6172792063697263756d7374616e6365732028652e672e20676f7665726e616e6365292e40556e6170706c696564536c617368657301010520457261496e646578bc5665633c556e6170706c696564536c6173683c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e00040004c420416c6c20756e6170706c69656420736c61736865732074686174206172652071756575656420666f72206c617465722e28426f6e646564457261730100745665633c28457261496e6465782c2053657373696f6e496e646578293e04001025012041206d617070696e672066726f6d207374696c6c2d626f6e646564206572617320746f207468652066697273742073657373696f6e20696e646578206f662074686174206572612e00c8204d75737420636f6e7461696e7320696e666f726d6174696f6e20666f72206572617320666f72207468652072616e67653abc20605b6163746976655f657261202d20626f756e64696e675f6475726174696f6e3b206163746976655f6572615d604c56616c696461746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449645c2850657262696c6c2c2042616c616e63654f663c543e2905040008450120416c6c20736c617368696e67206576656e7473206f6e2076616c696461746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682070726f706f7274696f6e7020616e6420736c6173682076616c7565206f6620746865206572612e4c4e6f6d696e61746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449643042616c616e63654f663c543e05040004610120416c6c20736c617368696e67206576656e7473206f6e206e6f6d696e61746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682076616c7565206f6620746865206572612e34536c617368696e675370616e7300010530543a3a4163636f756e7449645c736c617368696e673a3a536c617368696e675370616e73000400048c20536c617368696e67207370616e7320666f72207374617368206163636f756e74732e245370616e536c6173680101058c28543a3a4163636f756e7449642c20736c617368696e673a3a5370616e496e6465782988736c617368696e673a3a5370616e5265636f72643c42616c616e63654f663c543e3e00800000000000000000000000000000000000000000000000000000000000000000083d01205265636f72647320696e666f726d6174696f6e2061626f757420746865206d6178696d756d20736c617368206f6620612073746173682077697468696e206120736c617368696e67207370616e2cb82061732077656c6c20617320686f77206d7563682072657761726420686173206265656e2070616964206f75742e584561726c69657374556e6170706c696564536c617368000020457261496e646578040004fc20546865206561726c696573742065726120666f72207768696368207765206861766520612070656e64696e672c20756e6170706c69656420736c6173682e5443757272656e74506c616e6e656453657373696f6e01003053657373696f6e496e64657810000000000ce820546865206c61737420706c616e6e65642073657373696f6e207363686564756c6564206279207468652073657373696f6e2070616c6c65742e0031012054686973206973206261736963616c6c7920696e2073796e632077697468207468652063616c6c20746f205b6053657373696f6e4d616e616765723a3a6e65775f73657373696f6e605d2e3853746f7261676556657273696f6e01002052656c6561736573040610cc2054727565206966206e6574776f726b20686173206265656e20757067726164656420746f20746869732076657273696f6e2e7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076362e302e3020666f72206e6577206e6574776f726b732e384368696c6c5468726573686f6c6400001c50657263656e7404000c810120546865207468726573686f6c6420666f72207768656e2075736572732063616e2073746172742063616c6c696e6720606368696c6c5f6f746865726020666f72206f746865722076616c696461746f7273202f206e6f6d696e61746f72732e6d0120546865207468726573686f6c6420697320636f6d706172656420746f207468652061637475616c206e756d626572206f662076616c696461746f7273202f206e6f6d696e61746f7273202860436f756e74466f722a602920696ee4207468652073797374656d20636f6d706172656420746f2074686520636f6e66696775726564206d61782028604d61782a436f756e7460292e016410626f6e640c28636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e1470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e5865012054616b6520746865206f726967696e206163636f756e74206173206120737461736820616e64206c6f636b207570206076616c756560206f66206974732062616c616e63652e2060636f6e74726f6c6c6572602077696c6c8420626520746865206163636f756e74207468617420636f6e74726f6c732069742e003101206076616c756560206d757374206265206d6f7265207468616e2074686520606d696e696d756d5f62616c616e636560207370656369666965642062792060543a3a43757272656e6379602e00250120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20627920746865207374617368206163636f756e742e004020456d6974732060426f6e646564602e002c2023203c7765696768743ed4202d20496e646570656e64656e74206f662074686520617267756d656e74732e204d6f64657261746520636f6d706c65786974792e20202d204f2831292e68202d20546872656520657874726120444220656e74726965732e005101204e4f54453a2054776f206f66207468652073746f726167652077726974657320286053656c663a3a626f6e646564602c206053656c663a3a7061796565602920617265205f6e657665725f20636c65616e6564410120756e6c6573732074686520606f726967696e602066616c6c732062656c6f77205f6578697374656e7469616c206465706f7369745f20616e6420676574732072656d6f76656420617320647573742e4c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a3101202d20526561643a20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c2043757272656e74204572612c20486973746f72792044657074682c204c6f636b73e0202d2057726974653a20426f6e6465642c2050617965652c205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e28626f6e645f657874726104386d61785f6164646974696f6e616c54436f6d706163743c42616c616e63654f663c543e3e5465012041646420736f6d6520657874726120616d6f756e742074686174206861766520617070656172656420696e207468652073746173682060667265655f62616c616e63656020696e746f207468652062616c616e63652075703420666f72207374616b696e672e00510120557365207468697320696620746865726520617265206164646974696f6e616c2066756e647320696e20796f7572207374617368206163636f756e74207468617420796f75207769736820746f20626f6e642e650120556e6c696b65205b60626f6e64605d206f72205b60756e626f6e64605d20746869732066756e6374696f6e20646f6573206e6f7420696d706f736520616e79206c696d69746174696f6e206f6e2074686520616d6f756e744c20746861742063616e2062652061646465642e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c657220616e64f82069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004020456d6974732060426f6e646564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e20202d204f2831292e40202d204f6e6520444220656e7472792e34202d2d2d2d2d2d2d2d2d2d2d2d2c204442205765696768743a1501202d20526561643a2045726120456c656374696f6e205374617475732c20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c204c6f636b73a4202d2057726974653a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e18756e626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e8c5501205363686564756c65206120706f7274696f6e206f662074686520737461736820746f20626520756e6c6f636b656420726561647920666f72207472616e73666572206f75742061667465722074686520626f6e64010120706572696f6420656e64732e2049662074686973206c656176657320616e20616d6f756e74206163746976656c7920626f6e646564206c657373207468616e250120543a3a43757272656e63793a3a6d696e696d756d5f62616c616e636528292c207468656e20697420697320696e6372656173656420746f207468652066756c6c20616d6f756e742e004901204f6e63652074686520756e6c6f636b20706572696f6420697320646f6e652c20796f752063616e2063616c6c206077697468647261775f756e626f6e6465646020746f2061637475616c6c79206d6f7665c0207468652066756e6473206f7574206f66206d616e6167656d656e7420726561647920666f72207472616e736665722e003d01204e6f206d6f7265207468616e2061206c696d69746564206e756d626572206f6620756e6c6f636b696e67206368756e6b73202873656520604d41585f554e4c4f434b494e475f4348554e4b5360293d012063616e20636f2d657869737473206174207468652073616d652074696d652e20496e207468617420636173652c205b6043616c6c3a3a77697468647261775f756e626f6e646564605d206e656564fc20746f2062652063616c6c656420666972737420746f2072656d6f766520736f6d65206f6620746865206368756e6b732028696620706f737369626c65292e003d012049662061207573657220656e636f756e74657273207468652060496e73756666696369656e74426f6e6460206572726f72207768656e2063616c6c696e6720746869732065787472696e7369632c1d0120746865792073686f756c642063616c6c20606368696c6c6020666972737420696e206f7264657220746f206672656520757020746865697220626f6e6465642066756e64732e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004820456d6974732060556e626f6e646564602e00982053656520616c736f205b6043616c6c3a3a77697468647261775f756e626f6e646564605d2e002c2023203c7765696768743e4101202d20496e646570656e64656e74206f662074686520617267756d656e74732e204c696d697465642062757420706f74656e7469616c6c79206578706c6f697461626c6520636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732e6501202d20456163682063616c6c20287265717569726573207468652072656d61696e646572206f662074686520626f6e6465642062616c616e636520746f2062652061626f766520606d696e696d756d5f62616c616e63656029710120202077696c6c2063617573652061206e657720656e74727920746f20626520696e73657274656420696e746f206120766563746f722028604c65646765722e756e6c6f636b696e676029206b65707420696e2073746f726167652e5101202020546865206f6e6c792077617920746f20636c65616e207468652061666f72656d656e74696f6e65642073746f72616765206974656d20697320616c736f20757365722d636f6e74726f6c6c6564207669615c2020206077697468647261775f756e626f6e646564602e40202d204f6e6520444220656e7472792e2c202d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a1d01202d20526561643a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e744572612c204c6f636b732c2042616c616e63654f662053746173682ca4202d2057726974653a204c6f636b732c204c65646765722c2042616c616e63654f662053746173682c28203c2f7765696768743e4477697468647261775f756e626f6e64656404486e756d5f736c617368696e675f7370616e730c7533327c2d012052656d6f766520616e7920756e6c6f636b6564206368756e6b732066726f6d207468652060756e6c6f636b696e67602071756575652066726f6d206f7572206d616e6167656d656e742e003501205468697320657373656e7469616c6c7920667265657320757020746861742062616c616e636520746f206265207573656420627920746865207374617368206163636f756e7420746f20646f4c2077686174657665722069742077616e74732e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004c20456d697473206057697468647261776e602e006c2053656520616c736f205b6043616c6c3a3a756e626f6e64605d2e002c2023203c7765696768743e5501202d20436f756c6420626520646570656e64656e74206f6e2074686520606f726967696e6020617267756d656e7420616e6420686f77206d7563682060756e6c6f636b696e6760206368756e6b732065786973742e45012020497420696d706c6965732060636f6e736f6c69646174655f756e6c6f636b656460207768696368206c6f6f7073206f76657220604c65646765722e756e6c6f636b696e67602c207768696368206973f42020696e6469726563746c7920757365722d636f6e74726f6c6c65642e20536565205b60756e626f6e64605d20666f72206d6f72652064657461696c2e7901202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732c20796574207468652073697a65206f6620776869636820636f756c64206265206c61726765206261736564206f6e20606c6564676572602ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d090120436f6d706c6578697479204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2072656d6f766520205570646174653a2501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c204c6f636b732c205b4f726967696e204163636f756e745da8202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c656467657218204b696c6c3a4501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c20426f6e6465642c20536c617368696e67205370616e732c205b4f726967696e8c2020204163636f756e745d2c204c6f636b732c2042616c616e63654f662073746173685101202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732cb02020205b4f726967696e204163636f756e745d2c204c6f636b732c2042616c616e63654f662073746173682e74202d2057726974657320456163683a205370616e536c617368202a20530d01204e4f54453a2057656967687420616e6e6f746174696f6e20697320746865206b696c6c207363656e6172696f2c20776520726566756e64206f74686572776973652e302023203c2f7765696768743e2076616c6964617465041470726566733856616c696461746f72507265667344e8204465636c617265207468652064657369726520746f2076616c696461746520666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e30202d2d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a90202d20526561643a2045726120456c656374696f6e205374617475732c204c656467657280202d2057726974653a204e6f6d696e61746f72732c2056616c696461746f7273302023203c2f7765696768743e206e6f6d696e617465041c74617267657473a05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e4c1101204465636c617265207468652064657369726520746f206e6f6d696e6174652060746172676574736020666f7220746865206f726967696e20636f6e74726f6c6c65722e00510120456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e20546869732063616e206f6e6c792062652063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e3101202d20546865207472616e73616374696f6e277320636f6d706c65786974792069732070726f706f7274696f6e616c20746f207468652073697a65206f662060746172676574736020284e2901012077686963682069732063617070656420617420436f6d7061637441737369676e6d656e74733a3a4c494d495420284d41585f4e4f4d494e4154494f4e53292ed8202d20426f74682074686520726561647320616e642077726974657320666f6c6c6f7720612073696d696c6172207061747465726e2e28202d2d2d2d2d2d2d2d2d34205765696768743a204f284e2984207768657265204e20697320746865206e756d626572206f6620746172676574732c204442205765696768743ac8202d2052656164733a2045726120456c656374696f6e205374617475732c204c65646765722c2043757272656e742045726184202d205772697465733a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e146368696c6c0044c8204465636c617265206e6f2064657369726520746f206569746865722076616c6964617465206f72206e6f6d696e6174652e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e54202d20436f6e7461696e73206f6e6520726561642ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e24202d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a88202d20526561643a20457261456c656374696f6e5374617475732c204c656467657280202d2057726974653a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e247365745f7061796565041470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e40b8202852652d2973657420746865207061796d656e742074617267657420666f72206120636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e28202d2d2d2d2d2d2d2d2d3c202d205765696768743a204f28312934202d204442205765696768743a4c20202020202d20526561643a204c65646765724c20202020202d2057726974653a205061796565302023203c2f7765696768743e387365745f636f6e74726f6c6c65720428636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654090202852652d297365742074686520636f6e74726f6c6c6572206f6620612073746173682e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e2c202d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743af4202d20526561643a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572f8202d2057726974653a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572302023203c2f7765696768743e4c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e209420536574732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e34205765696768743a204f2831295c2057726974653a2056616c696461746f7220436f756e74302023203c2f7765696768743e60696e6372656173655f76616c696461746f725f636f756e7404286164646974696f6e616c30436f6d706163743c7533323e1cac20496e6372656d656e74732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e842053616d65206173205b607365745f76616c696461746f725f636f756e74605d2e302023203c2f7765696768743e547363616c655f76616c696461746f725f636f756e740418666163746f721c50657263656e741cd4205363616c652075702074686520696465616c206e756d626572206f662076616c696461746f7273206279206120666163746f722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e842053616d65206173205b607365745f76616c696461746f725f636f756e74605d2e302023203c2f7765696768743e34666f7263655f6e6f5f65726173003cb020466f72636520746865726520746f206265206e6f206e6577206572617320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e00282023205761726e696e67001d012054686520656c656374696f6e2070726f6365737320737461727473206d756c7469706c6520626c6f636b73206265666f72652074686520656e64206f6620746865206572612e3d0120546875732074686520656c656374696f6e2070726f63657373206d6179206265206f6e676f696e67207768656e20746869732069732063616c6c65642e20496e2074686973206361736520746865e020656c656374696f6e2077696c6c20636f6e74696e756520756e74696c20746865206e65787420657261206973207472696767657265642e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e3c202d205765696768743a204f28312948202d2057726974653a20466f726365457261302023203c2f7765696768743e34666f7263655f6e65775f65726100404d0120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f6620746865206e6578742073657373696f6e2e20416674657220746869732c2069742077696c6c206265a020726573657420746f206e6f726d616c20286e6f6e2d666f7263656429206265686176696f75722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e00282023205761726e696e67001d012054686520656c656374696f6e2070726f6365737320737461727473206d756c7469706c6520626c6f636b73206265666f72652074686520656e64206f6620746865206572612e4d0120496620746869732069732063616c6c6564206a757374206265666f72652061206e657720657261206973207472696767657265642c2074686520656c656374696f6e2070726f63657373206d6179206e6f7490206861766520656e6f75676820626c6f636b7320746f20676574206120726573756c742e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e3c202d205765696768743a204f28312944202d20577269746520466f726365457261302023203c2f7765696768743e447365745f696e76756c6e657261626c65730434696e76756c6e657261626c6573445665633c543a3a4163636f756e7449643e20cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e1c202d204f2856295c202d2057726974653a20496e76756c6e657261626c6573302023203c2f7765696768743e34666f7263655f756e7374616b650814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c753332280d0120466f72636520612063757272656e74207374616b657220746f206265636f6d6520636f6d706c6574656c7920756e7374616b65642c20696d6d6564696174656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743eec204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2062652072656d6f766564b82052656164733a20426f6e6465642c20536c617368696e67205370616e732c204163636f756e742c204c6f636b738501205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c204163636f756e742c204c6f636b736c2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e50666f7263655f6e65775f6572615f616c776179730038050120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f662073657373696f6e7320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e00282023205761726e696e67001d012054686520656c656374696f6e2070726f6365737320737461727473206d756c7469706c6520626c6f636b73206265666f72652074686520656e64206f6620746865206572612e4d0120496620746869732069732063616c6c6564206a757374206265666f72652061206e657720657261206973207472696767657265642c2074686520656c656374696f6e2070726f63657373206d6179206e6f7490206861766520656e6f75676820626c6f636b7320746f20676574206120726573756c742e002c2023203c7765696768743e3c202d205765696768743a204f28312948202d2057726974653a20466f726365457261302023203c2f7765696768743e5463616e63656c5f64656665727265645f736c617368080c65726120457261496e64657834736c6173685f696e6469636573205665633c7533323e34982043616e63656c20656e6163746d656e74206f66206120646566657272656420736c6173682e00b42043616e2062652063616c6c6564206279207468652060543a3a536c61736843616e63656c4f726967696e602e00050120506172616d65746572733a2065726120616e6420696e6469636573206f662074686520736c617368657320666f7220746861742065726120746f206b696c6c2e002c2023203c7765696768743e5420436f6d706c65786974793a204f2855202b205329b82077697468205520756e6170706c69656420736c6173686573207765696768746564207769746820553d31303030d420616e64205320697320746865206e756d626572206f6620736c61736820696e646963657320746f2062652063616e63656c65642e68202d20526561643a20556e6170706c69656420536c61736865736c202d2057726974653a20556e6170706c69656420536c6173686573302023203c2f7765696768743e387061796f75745f7374616b657273083c76616c696461746f725f737461736830543a3a4163636f756e7449640c65726120457261496e64657870110120506179206f757420616c6c20746865207374616b65727320626568696e6420612073696e676c652076616c696461746f7220666f7220612073696e676c65206572612e004d01202d206076616c696461746f725f73746173686020697320746865207374617368206163636f756e74206f66207468652076616c696461746f722e205468656972206e6f6d696e61746f72732c20757020746f290120202060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602c2077696c6c20616c736f207265636569766520746865697220726577617264732e3501202d206065726160206d617920626520616e7920657261206265747765656e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e00590120546865206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e20416e79206163636f756e742063616e2063616c6c20746869732066756e6374696f6e2c206576656e20696678206974206973206e6f74206f6e65206f6620746865207374616b6572732e00010120546869732063616e206f6e6c792062652063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e0101202d2054696d6520636f6d706c65786974793a206174206d6f7374204f284d61784e6f6d696e61746f72526577617264656450657256616c696461746f72292ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e30202d2d2d2d2d2d2d2d2d2d2d1d01204e20697320746865204e756d626572206f66207061796f75747320666f72207468652076616c696461746f722028696e636c7564696e67207468652076616c696461746f722920205765696768743a88202d205265776172642044657374696e6174696f6e205374616b65643a204f284e29c4202d205265776172642044657374696e6174696f6e20436f6e74726f6c6c657220284372656174696e67293a204f284e292c204442205765696768743a2901202d20526561643a20457261456c656374696f6e5374617475732c2043757272656e744572612c20486973746f727944657074682c204572617356616c696461746f725265776172642c2d01202020202020202020457261735374616b657273436c69707065642c2045726173526577617264506f696e74732c204572617356616c696461746f725072656673202838206974656d73291101202d205265616420456163683a20426f6e6465642c204c65646765722c2050617965652c204c6f636b732c2053797374656d204163636f756e74202835206974656d7329d8202d20577269746520456163683a2053797374656d204163636f756e742c204c6f636b732c204c6564676572202833206974656d73290051012020204e4f54453a20776569676874732061726520617373756d696e672074686174207061796f75747320617265206d61646520746f20616c697665207374617368206163636f756e7420285374616b6564292e5901202020506179696e67206576656e2061206465616420636f6e74726f6c6c65722069732063686561706572207765696768742d776973652e20576520646f6e277420646f20616e7920726566756e647320686572652e302023203c2f7765696768743e187265626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e38e0205265626f6e64206120706f7274696f6e206f6620746865207374617368207363686564756c656420746f20626520756e6c6f636b65642e00550120546865206469737061746368206f726967696e206d757374206265207369676e65642062792074686520636f6e74726f6c6c65722c20616e642069742063616e206265206f6e6c792063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ed4202d2054696d6520636f6d706c65786974793a204f284c292c207768657265204c20697320756e6c6f636b696e67206368756e6b7394202d20426f756e64656420627920604d41585f554e4c4f434b494e475f4348554e4b53602ef4202d2053746f72616765206368616e6765733a2043616e277420696e6372656173652073746f726167652c206f6e6c792064656372656173652069742e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a010120202020202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c204c6f636b732c205b4f726967696e204163636f756e745db820202020202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e447365745f686973746f72795f646570746808446e65775f686973746f72795f646570746844436f6d706163743c457261496e6465783e485f6572615f6974656d735f64656c6574656430436f6d706163743c7533323e543101205365742060486973746f72794465707468602076616c75652e20546869732066756e6374696f6e2077696c6c2064656c65746520616e7920686973746f727920696e666f726d6174696f6e80207768656e2060486973746f727944657074686020697320726564756365642e003020506172616d65746572733a1101202d20606e65775f686973746f72795f6465707468603a20546865206e657720686973746f727920646570746820796f7520776f756c64206c696b6520746f207365742e4901202d20606572615f6974656d735f64656c65746564603a20546865206e756d626572206f66206974656d7320746861742077696c6c2062652064656c6574656420627920746869732064697370617463682e450120202020546869732073686f756c64207265706f727420616c6c207468652073746f72616765206974656d7320746861742077696c6c2062652064656c6574656420627920636c656172696e67206f6c6445012020202065726120686973746f72792e204e656564656420746f207265706f727420616e2061636375726174652077656967687420666f72207468652064697370617463682e2054727573746564206279a02020202060526f6f746020746f207265706f727420616e206163637572617465206e756d6265722e0054204f726967696e206d75737420626520726f6f742e002c2023203c7765696768743ee0202d20453a204e756d626572206f6620686973746f7279206465707468732072656d6f7665642c20692e652e203130202d3e2037203d20333c202d205765696768743a204f28452934202d204442205765696768743aa020202020202d2052656164733a2043757272656e74204572612c20486973746f72792044657074687020202020202d205772697465733a20486973746f7279204465707468310120202020202d20436c6561722050726566697820456163683a20457261205374616b6572732c204572615374616b657273436c69707065642c204572617356616c696461746f725072656673810120202020202d2057726974657320456163683a204572617356616c696461746f725265776172642c2045726173526577617264506f696e74732c2045726173546f74616c5374616b652c2045726173537461727453657373696f6e496e646578302023203c2f7765696768743e28726561705f73746173680814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c7533323c61012052656d6f766520616c6c20646174612073747275637475726520636f6e6365726e696e672061207374616b65722f7374617368206f6e6365206974732062616c616e636520697320617420746865206d696e696d756d2e6101205468697320697320657373656e7469616c6c79206571756976616c656e7420746f206077697468647261775f756e626f6e64656460206578636570742069742063616e2062652063616c6c656420627920616e796f6e65f820616e6420746865207461726765742060737461736860206d7573742068617665206e6f2066756e6473206c656674206265796f6e64207468652045442e009020546869732063616e2062652063616c6c65642066726f6d20616e79206f726967696e2e000101202d20607374617368603a20546865207374617368206163636f756e7420746f20726561702e204974732062616c616e6365206d757374206265207a65726f2e002c2023203c7765696768743e250120436f6d706c65786974793a204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e73206f6e20746865206163636f756e742e2c204442205765696768743ad8202d2052656164733a205374617368204163636f756e742c20426f6e6465642c20536c617368696e67205370616e732c204c6f636b73a501202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c205374617368204163636f756e742c204c6f636b7374202d2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e106b69636b040c77686fa05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e34e42052656d6f76652074686520676976656e206e6f6d696e6174696f6e732066726f6d207468652063616c6c696e672076616c696461746f722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e490120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e2054686520636f6e74726f6c6c657298206163636f756e742073686f756c6420726570726573656e7420612076616c696461746f722e005101202d206077686f603a2041206c697374206f66206e6f6d696e61746f72207374617368206163636f756e74732077686f20617265206e6f6d696e6174696e6720746869732076616c696461746f72207768696368c420202073686f756c64206e6f206c6f6e676572206265206e6f6d696e6174696e6720746869732076616c696461746f722e005901204e6f74653a204d616b696e6720746869732063616c6c206f6e6c79206d616b65732073656e736520696620796f7520666972737420736574207468652076616c696461746f7220707265666572656e63657320746f7c20626c6f636b20616e792066757274686572206e6f6d696e6174696f6e732e487365745f7374616b696e675f6c696d69747314486d696e5f6e6f6d696e61746f725f626f6e643042616c616e63654f663c543e486d696e5f76616c696461746f725f626f6e643042616c616e63654f663c543e4c6d61785f6e6f6d696e61746f725f636f756e742c4f7074696f6e3c7533323e4c6d61785f76616c696461746f725f636f756e742c4f7074696f6e3c7533323e247468726573686f6c643c4f7074696f6e3c50657263656e743e34bc205570646174652074686520766172696f7573207374616b696e67206c696d69747320746869732070616c6c65742e002901202a20606d696e5f6e6f6d696e61746f725f626f6e64603a20546865206d696e696d756d2061637469766520626f6e64206e656564656420746f2062652061206e6f6d696e61746f722e2901202a20606d696e5f76616c696461746f725f626f6e64603a20546865206d696e696d756d2061637469766520626f6e64206e656564656420746f20626520612076616c696461746f722e4501202a20606d61785f6e6f6d696e61746f725f636f756e74603a20546865206d6178206e756d626572206f662075736572732077686f2063616e2062652061206e6f6d696e61746f72206174206f6e63652eb02020205768656e2073657420746f20604e6f6e65602c206e6f206c696d697420697320656e666f726365642e4501202a20606d61785f76616c696461746f725f636f756e74603a20546865206d6178206e756d626572206f662075736572732077686f2063616e20626520612076616c696461746f72206174206f6e63652eb02020205768656e2073657420746f20604e6f6e65602c206e6f206c696d697420697320656e666f726365642e00ac204f726967696e206d75737420626520526f6f7420746f2063616c6c20746869732066756e6374696f6e2e003901204e4f54453a204578697374696e67206e6f6d696e61746f727320616e642076616c696461746f72732077696c6c206e6f742062652061666665637465642062792074686973207570646174652e150120746f206b69636b2070656f706c6520756e64657220746865206e6577206c696d6974732c20606368696c6c5f6f74686572602073686f756c642062652063616c6c65642e2c6368696c6c5f6f746865720428636f6e74726f6c6c657230543a3a4163636f756e744964584501204465636c61726520612060636f6e74726f6c6c65726020746f2073746f702070617274696369706174696e672061732065697468657220612076616c696461746f72206f72206e6f6d696e61746f722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00450120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2c206275742063616e2062652063616c6c656420627920616e796f6e652e005d01204966207468652063616c6c6572206973207468652073616d652061732074686520636f6e74726f6c6c6572206265696e672074617267657465642c207468656e206e6f206675727468657220636865636b7320617265dc20656e666f726365642c20616e6420746869732066756e6374696f6e2062656861766573206a757374206c696b6520606368696c6c602e006101204966207468652063616c6c657220697320646966666572656e74207468616e2074686520636f6e74726f6c6c6572206265696e672074617267657465642c2074686520666f6c6c6f77696e6720636f6e646974696f6e7334206d757374206265206d65743a4101202a204120604368696c6c5468726573686f6c6460206d7573742062652073657420616e6420636865636b656420776869636820646566696e657320686f7720636c6f736520746f20746865206d617859012020206e6f6d696e61746f7273206f722076616c696461746f7273207765206d757374207265616368206265666f72652075736572732063616e207374617274206368696c6c696e67206f6e652d616e6f746865722e5d01202a204120604d61784e6f6d696e61746f72436f756e746020616e6420604d617856616c696461746f72436f756e7460206d75737420626520736574207768696368206973207573656420746f2064657465726d696e6594202020686f7720636c6f73652077652061726520746f20746865207468726573686f6c642e6101202a204120604d696e4e6f6d696e61746f72426f6e646020616e6420604d696e56616c696461746f72426f6e6460206d7573742062652073657420616e6420636865636b65642c2077686963682064657465726d696e6573550120202069662074686973206973206120706572736f6e20746861742073686f756c64206265206368696c6c6564206265636175736520746865792068617665206e6f74206d657420746865207468726573686f6c6444202020626f6e642072657175697265642e00590120546869732063616e2062652068656c7066756c20696620626f6e6420726571756972656d656e74732061726520757064617465642c20616e64207765206e65656420746f2072656d6f7665206f6c642075736572739c2077686f20646f206e6f74207361746973667920746865736520726571756972656d656e74732e000128244572615061796f75740c20457261496e6465781c42616c616e63651c42616c616e63650c59012054686520657261207061796f757420686173206265656e207365743b207468652066697273742062616c616e6365206973207468652076616c696461746f722d7061796f75743b20746865207365636f6e64206973c4207468652072656d61696e6465722066726f6d20746865206d6178696d756d20616d6f756e74206f66207265776172642eac205c5b6572615f696e6465782c2076616c696461746f725f7061796f75742c2072656d61696e6465725c5d1852657761726408244163636f756e7449641c42616c616e636504fc20546865207374616b657220686173206265656e207265776172646564206279207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d14536c61736808244163636f756e7449641c42616c616e6365082501204f6e652076616c696461746f722028616e6420697473206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e58205c5b76616c696461746f722c20616d6f756e745c5d684f6c64536c617368696e675265706f7274446973636172646564043053657373696f6e496e646578081d0120416e206f6c6420736c617368696e67207265706f72742066726f6d2061207072696f72206572612077617320646973636172646564206265636175736520697420636f756c6490206e6f742062652070726f6365737365642e205c5b73657373696f6e5f696e6465785c5d3c5374616b696e67456c656374696f6e0004882041206e657720736574206f66207374616b6572732077617320656c65637465642e18426f6e64656408244163636f756e7449641c42616c616e636510d420416e206163636f756e742068617320626f6e646564207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d005101204e4f54453a2054686973206576656e74206973206f6e6c7920656d6974746564207768656e2066756e64732061726520626f6e64656420766961206120646973706174636861626c652e204e6f7461626c792c25012069742077696c6c206e6f7420626520656d697474656420666f72207374616b696e672072657761726473207768656e20746865792061726520616464656420746f207374616b652e20556e626f6e64656408244163636f756e7449641c42616c616e636504dc20416e206163636f756e742068617320756e626f6e646564207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d2457697468647261776e08244163636f756e7449641c42616c616e6365085d0120416e206163636f756e74206861732063616c6c6564206077697468647261775f756e626f6e6465646020616e642072656d6f76656420756e626f6e64696e67206368756e6b7320776f727468206042616c616e636560b02066726f6d2074686520756e6c6f636b696e672071756575652e205c5b73746173682c20616d6f756e745c5d184b69636b656408244163636f756e744964244163636f756e744964040d012041206e6f6d696e61746f7220686173206265656e206b69636b65642066726f6d20612076616c696461746f722e205c5b6e6f6d696e61746f722c2073746173685c5d545374616b696e67456c656374696f6e4661696c65640004b02054686520656c656374696f6e206661696c65642e204e6f206e65772065726120697320706c616e6e65642e143853657373696f6e735065724572613053657373696f6e496e64657810060000000470204e756d626572206f662073657373696f6e7320706572206572612e3c426f6e64696e674475726174696f6e20457261496e64657810a002000004e4204e756d626572206f6620657261732074686174207374616b65642066756e6473206d7573742072656d61696e20626f6e64656420666f722e48536c61736844656665724475726174696f6e20457261496e64657810a8000000100101204e756d626572206f662065726173207468617420736c6173686573206172652064656665727265642062792c20616674657220636f6d7075746174696f6e2e000d0120546869732073686f756c64206265206c657373207468616e2074686520626f6e64696e67206475726174696f6e2e2053657420746f203020696620736c617368657315012073686f756c64206265206170706c69656420696d6d6564696174656c792c20776974686f7574206f70706f7274756e69747920666f7220696e74657276656e74696f6e2e804d61784e6f6d696e61746f72526577617264656450657256616c696461746f720c753332100001000010f820546865206d6178696d756d206e756d626572206f66206e6f6d696e61746f727320726577617264656420666f7220656163682076616c696461746f722e00690120466f7220656163682076616c696461746f72206f6e6c79207468652060244d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732063616e20636c61696d2101207468656972207265776172642e2054686973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e384d61784e6f6d696e6174696f6e730c7533321010000000005c344e6f74436f6e74726f6c6c65720468204e6f74206120636f6e74726f6c6c6572206163636f756e742e204e6f7453746173680454204e6f742061207374617368206163636f756e742e34416c7265616479426f6e646564046420537461736820697320616c726561647920626f6e6465642e34416c7265616479506169726564047820436f6e74726f6c6c657220697320616c7265616479207061697265642e30456d70747954617267657473046420546172676574732063616e6e6f7420626520656d7074792e384475706c6963617465496e6465780444204475706c696361746520696e6465782e44496e76616c6964536c617368496e646578048820536c617368207265636f726420696e646578206f7574206f6620626f756e64732e40496e73756666696369656e74426f6e6404d02043616e206e6f7420626f6e6420776974682076616c7565206c657373207468616e206d696e696d756d2072657175697265642e304e6f4d6f72654368756e6b7304942043616e206e6f74207363686564756c65206d6f726520756e6c6f636b206368756e6b732e344e6f556e6c6f636b4368756e6b04a42043616e206e6f74207265626f6e6420776974686f757420756e6c6f636b696e67206368756e6b732e3046756e64656454617267657404cc20417474656d7074696e6720746f2074617267657420612073746173682074686174207374696c6c206861732066756e64732e48496e76616c6964457261546f526577617264045c20496e76616c69642065726120746f207265776172642e68496e76616c69644e756d6265724f664e6f6d696e6174696f6e73047c20496e76616c6964206e756d626572206f66206e6f6d696e6174696f6e732e484e6f74536f72746564416e64556e697175650484204974656d7320617265206e6f7420736f7274656420616e6420756e697175652e38416c7265616479436c61696d6564040d01205265776172647320666f72207468697320657261206861766520616c7265616479206265656e20636c61696d656420666f7220746869732076616c696461746f722e54496e636f7272656374486973746f7279446570746804c420496e636f72726563742070726576696f757320686973746f727920646570746820696e7075742070726f76696465642e58496e636f7272656374536c617368696e675370616e7304b420496e636f7272656374206e756d626572206f6620736c617368696e67207370616e732070726f76696465642e204261645374617465043d0120496e7465726e616c20737461746520686173206265636f6d6520736f6d65686f7720636f7272757074656420616e6420746865206f7065726174696f6e2063616e6e6f7420636f6e74696e75652e38546f6f4d616e7954617267657473049820546f6f206d616e79206e6f6d696e6174696f6e207461726765747320737570706c6965642e244261645461726765740441012041206e6f6d696e6174696f6e207461726765742077617320737570706c69656420746861742077617320626c6f636b6564206f72206f7468657277697365206e6f7420612076616c696461746f722e4043616e6e6f744368696c6c4f746865720459012054686520757365722068617320656e6f75676820626f6e6420616e6420746875732063616e6e6f74206265206368696c6c656420666f72636566756c6c7920627920616e2065787465726e616c20706572736f6e2e44546f6f4d616e794e6f6d696e61746f72730875012054686572652061726520746f6f206d616e79206e6f6d696e61746f727320696e207468652073797374656d2e20476f7665726e616e6365206e6565647320746f2061646a75737420746865207374616b696e672073657474696e67739420746f206b656570207468696e6773207361666520666f72207468652072756e74696d652e44546f6f4d616e7956616c696461746f72730875012054686572652061726520746f6f206d616e792076616c696461746f727320696e207468652073797374656d2e20476f7665726e616e6365206e6565647320746f2061646a75737420746865207374616b696e672073657474696e67739420746f206b656570207468696e6773207361666520666f72207468652072756e74696d652e091c53657373696f6e011c53657373696f6e1c2856616c696461746f727301004c5665633c543a3a56616c696461746f7249643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3043757272656e74496e64657801003053657373696f6e496e646578100000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e345175657565644368616e676564010010626f6f6c040008390120547275652069662074686520756e6465726c79696e672065636f6e6f6d6963206964656e746974696573206f7220776569676874696e6720626568696e64207468652076616c696461746f7273a420686173206368616e67656420696e20746865207175657565642076616c696461746f72207365742e285175657565644b6579730100785665633c28543a3a56616c696461746f7249642c20543a3a4b657973293e0400083d012054686520717565756564206b65797320666f7220746865206e6578742073657373696f6e2e205768656e20746865206e6578742073657373696f6e20626567696e732c207468657365206b657973e02077696c6c206265207573656420746f2064657465726d696e65207468652076616c696461746f7227732073657373696f6e206b6579732e4844697361626c656456616c696461746f72730100205665633c7533323e04000c8020496e6469636573206f662064697361626c65642076616c696461746f72732e003501205468652073657420697320636c6561726564207768656e20606f6e5f73657373696f6e5f656e64696e67602072657475726e732061206e657720736574206f66206964656e7469746965732e204e6578744b65797300010538543a3a56616c696461746f7249641c543a3a4b657973000400049c20546865206e6578742073657373696f6e206b65797320666f7220612076616c696461746f722e204b65794f776e657200010550284b65795479706549642c205665633c75383e2938543a3a56616c696461746f72496400040004090120546865206f776e6572206f662061206b65792e20546865206b65792069732074686520604b657954797065496460202b2074686520656e636f646564206b65792e0108207365745f6b65797308106b6579731c543a3a4b6579731470726f6f661c5665633c75383e38e82053657473207468652073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c657220746f20606b657973602e210120416c6c6f777320616e206163636f756e7420746f20736574206974732073657373696f6e206b6579207072696f7220746f206265636f6d696e6720612076616c696461746f722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a20606f726967696e206163636f756e74602c2060543a3a56616c696461746f7249644f66602c20604e6578744b65797360a4202d2044625772697465733a20606f726967696e206163636f756e74602c20604e6578744b6579736084202d204462526561647320706572206b65792069643a20604b65794f776e65726088202d20446257726974657320706572206b65792069643a20604b65794f776e657260302023203c2f7765696768743e2870757267655f6b6579730030cc2052656d6f76657320616e792073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c65722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743eb4202d20436f6d706c65786974793a20604f2831296020696e206e756d626572206f66206b65792074797065732e590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a2060543a3a56616c696461746f7249644f66602c20604e6578744b657973602c20606f726967696e206163636f756e7460a4202d2044625772697465733a20604e6578744b657973602c20606f726967696e206163636f756e746088202d20446257726974657320706572206b65792069643a20604b65794f776e657260302023203c2f7765696768743e0104284e657753657373696f6e043053657373696f6e496e646578086501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e7420697320746865205c5b73657373696f6e5f696e6465785c5d2c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e001430496e76616c696450726f6f66046420496e76616c6964206f776e6572736869702070726f6f662e5c4e6f4173736f63696174656456616c696461746f72496404a0204e6f206173736f6369617465642076616c696461746f7220494420666f72206163636f756e742e344475706c6963617465644b657904682052656769737465726564206475706c6963617465206b65792e184e6f4b65797304a8204e6f206b65797320617265206173736f63696174656420776974682074686973206163636f756e742e244e6f4163636f756e74041d01204b65792073657474696e67206163636f756e74206973206e6f74206c6976652c20736f206974277320696d706f737369626c6520746f206173736f6369617465206b6579732e0a2444656d6f6372616379012444656d6f6372616379383c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f707301009c5665633c2850726f70496e6465782c20543a3a486173682c20543a3a4163636f756e744964293e040004210120546865207075626c69632070726f706f73616c732e20556e736f727465642e20546865207365636f6e64206974656d206973207468652070726f706f73616c277320686173682e244465706f7369744f660001052450726f70496e64657884285665633c543a3a4163636f756e7449643e2c2042616c616e63654f663c543e290004000c842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e00d82054574f582d4e4f54453a20536166652c20617320696e6372656173696e6720696e7465676572206b6579732061726520736166652e24507265696d616765730001061c543a3a48617368e8507265696d6167655374617475733c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e000400086101204d6170206f662068617368657320746f207468652070726f706f73616c20707265696d6167652c20616c6f6e6720776974682077686f207265676973746572656420697420616e64207468656972206465706f7369742ee42054686520626c6f636b206e756d6265722069732074686520626c6f636b20617420776869636820697420776173206465706f73697465642e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e344c6f77657374556e62616b656401003c5265666572656e64756d496e646578100000000008250120546865206c6f77657374207265666572656e64756d20696e64657820726570726573656e74696e6720616e20756e62616b6564207265666572656e64756d2e20457175616c20746fdc20605265666572656e64756d436f756e74602069662074686572652069736e2774206120756e62616b6564207265666572656e64756d2e405265666572656e64756d496e666f4f660001053c5265666572656e64756d496e646578d45265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a486173682c2042616c616e63654f663c543e3e0004000cb420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e0009012054574f582d4e4f54453a205341464520617320696e646578657320617265206e6f7420756e64657220616e2061747461636b6572e280997320636f6e74726f6c2e20566f74696e674f6601010530543a3a4163636f756e744964c8566f74696e673c42616c616e63654f663c543e2c20543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00d8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105d0120416c6c20766f74657320666f72206120706172746963756c617220766f7465722e2057652073746f7265207468652062616c616e636520666f7220746865206e756d626572206f6620766f74657320746861742077655d012068617665207265636f726465642e20546865207365636f6e64206974656d2069732074686520746f74616c20616d6f756e74206f662064656c65676174696f6e732c20746861742077696c6c2062652061646465642e00e82054574f582d4e4f54453a205341464520617320604163636f756e7449646073206172652063727970746f2068617368657320616e797761792e144c6f636b7300010530543a3a4163636f756e74496438543a3a426c6f636b4e756d626572000400105d01204163636f756e747320666f7220776869636820746865726520617265206c6f636b7320696e20616374696f6e207768696368206d61792062652072656d6f76656420617420736f6d6520706f696e7420696e207468655101206675747572652e205468652076616c75652069732074686520626c6f636b206e756d62657220617420776869636820746865206c6f636b206578706972657320616e64206d61792062652072656d6f7665642e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e544c6173745461626c656457617345787465726e616c010010626f6f6c0400085901205472756520696620746865206c617374207265666572656e64756d207461626c656420776173207375626d69747465642065787465726e616c6c792e2046616c7365206966206974207761732061207075626c6963282070726f706f73616c2e304e65787445787465726e616c00006028543a3a486173682c20566f74655468726573686f6c6429040010590120546865207265666572656e64756d20746f206265207461626c6564207768656e6576657220697420776f756c642062652076616c696420746f207461626c6520616e2065787465726e616c2070726f706f73616c2e550120546869732068617070656e73207768656e2061207265666572656e64756d206e6565647320746f206265207461626c656420616e64206f6e65206f662074776f20636f6e646974696f6e7320617265206d65743aa4202d20604c6173745461626c656457617345787465726e616c60206973206066616c7365603b206f7268202d20605075626c696350726f70736020697320656d7074792e24426c61636b6c6973740001061c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290004000851012041207265636f7264206f662077686f207665746f656420776861742e204d6170732070726f706f73616c206861736820746f206120706f737369626c65206578697374656e7420626c6f636b206e756d626572e82028756e74696c207768656e206974206d6179206e6f742062652072657375626d69747465642920616e642077686f207665746f65642069742e3443616e63656c6c6174696f6e730101061c543a3a4861736810626f6f6c000400042901205265636f7264206f6620616c6c2070726f706f73616c7320746861742068617665206265656e207375626a65637420746f20656d657267656e63792063616e63656c6c6174696f6e2e3853746f7261676556657273696f6e00002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e01641c70726f706f7365083470726f706f73616c5f686173681c543a3a486173681476616c756554436f6d706163743c42616c616e63654f663c543e3e2ca02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e00190120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573748420686176652066756e647320746f20636f76657220746865206465706f7369742e00d8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20707265696d6167652e1901202d206076616c7565603a2054686520616d6f756e74206f66206465706f73697420286d757374206265206174206c6561737420604d696e696d756d4465706f73697460292e004820456d697473206050726f706f736564602e003c205765696768743a20604f28702960187365636f6e64082070726f706f73616c48436f6d706163743c50726f70496e6465783e4c7365636f6e64735f75707065725f626f756e6430436f6d706163743c7533323e28b8205369676e616c732061677265656d656e742077697468206120706172746963756c61722070726f706f73616c2e00050120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e6465721501206d75737420686176652066756e647320746f20636f76657220746865206465706f7369742c20657175616c20746f20746865206f726967696e616c206465706f7369742e00cc202d206070726f706f73616c603a2054686520696e646578206f66207468652070726f706f73616c20746f207365636f6e642e4501202d20607365636f6e64735f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e207468652063757272656e74206e756d626572206f66207365636f6e6473206f6e2074686973290120202070726f706f73616c2e2045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e002101205765696768743a20604f28532960207768657265205320697320746865206e756d626572206f66207365636f6e647320612070726f706f73616c20616c7265616479206861732e10766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f7465644163636f756e74566f74653c42616c616e63654f663c543e3e24350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00e0202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f20766f746520666f722e88202d2060766f7465603a2054686520766f746520636f6e66696775726174696f6e2e003101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722068617320766f746564206f6e2e40656d657267656e63795f63616e63656c04247265665f696e6465783c5265666572656e64756d496e646578205101205363686564756c6520616e20656d657267656e63792063616e63656c6c6174696f6e206f662061207265666572656e64756d2e2043616e6e6f742068617070656e20747769636520746f207468652073616d6530207265666572656e64756d2e00fc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206043616e63656c6c6174696f6e4f726967696e602e00d4202d607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e0040205765696768743a20604f283129602e4065787465726e616c5f70726f706f7365043470726f706f73616c5f686173681c543a3a48617368243101205363686564756c652061207265666572656e64756d20746f206265207461626c6564206f6e6365206974206973206c6567616c20746f207363686564756c6520616e2065787465726e616c30207265666572656e64756d2e00ec20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206045787465726e616c4f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e001901205765696768743a20604f2856296020776974682056206e756d626572206f66207665746f65727320696e2074686520626c61636b6c697374206f662070726f706f73616c2ebc2020204465636f64696e6720766563206f66206c656e67746820562e2043686172676564206173206d6178696d756d6465787465726e616c5f70726f706f73655f6d616a6f72697479043470726f706f73616c5f686173681c543a3a486173682c5901205363686564756c652061206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f207363686564756c656020616e2065787465726e616c207265666572656e64756d2e00f020546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c4d616a6f726974794f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e003c205765696768743a20604f283129606065787465726e616c5f70726f706f73655f64656661756c74043470726f706f73616c5f686173681c543a3a486173682c4901205363686564756c652061206e656761746976652d7475726e6f75742d62696173207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f84207363686564756c6520616e2065787465726e616c207265666572656e64756d2e00ec20546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c44656661756c744f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e003c205765696768743a20604f2831296028666173745f747261636b0c3470726f706f73616c5f686173681c543a3a4861736834766f74696e675f706572696f6438543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d6265723c5101205363686564756c65207468652063757272656e746c792065787465726e616c6c792d70726f706f736564206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564650120696d6d6564696174656c792e204966207468657265206973206e6f2065787465726e616c6c792d70726f706f736564207265666572656e64756d2063757272656e746c792c206f72206966207468657265206973206f6e65ec20627574206974206973206e6f742061206d616a6f726974792d63617272696573207265666572656e64756d207468656e206974206661696c732e00d420546865206469737061746368206f6620746869732063616c6c206d757374206265206046617374547261636b4f726967696e602e00f8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652063757272656e742065787465726e616c2070726f706f73616c2e6101202d2060766f74696e675f706572696f64603a2054686520706572696f64207468617420697320616c6c6f77656420666f7220766f74696e67206f6e20746869732070726f706f73616c2e20496e6372656173656420746f982020206046617374547261636b566f74696e67506572696f646020696620746f6f206c6f772e5501202d206064656c6179603a20546865206e756d626572206f6620626c6f636b20616674657220766f74696e672068617320656e64656420696e20617070726f76616c20616e6420746869732073686f756c64206265bc202020656e61637465642e205468697320646f65736e277420686176652061206d696e696d756d20616d6f756e742e004420456d697473206053746172746564602e003c205765696768743a20604f28312960347665746f5f65787465726e616c043470726f706f73616c5f686173681c543a3a4861736824bc205665746f20616e6420626c61636b6c697374207468652065787465726e616c2070726f706f73616c20686173682e00dc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d75737420626520605665746f4f726967696e602e003101202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c20746f207665746f20616e6420626c61636b6c6973742e004020456d69747320605665746f6564602e000101205765696768743a20604f2856202b206c6f6728562929602077686572652056206973206e756d626572206f6620606578697374696e67207665746f657273604463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e1c542052656d6f76652061207265666572656e64756d2e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00d8202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e00482023205765696768743a20604f283129602e3463616e63656c5f717565756564041477686963683c5265666572656e64756d496e6465781ca02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00c8202d20607768696368603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e004d01205765696768743a20604f284429602077686572652060446020697320746865206974656d7320696e207468652064697370617463682071756575652e205765696768746564206173206044203d203130602e2064656c65676174650c08746f30543a3a4163636f756e74496428636f6e76696374696f6e28436f6e76696374696f6e1c62616c616e63653042616c616e63654f663c543e503d012044656c65676174652074686520766f74696e6720706f77657220287769746820736f6d6520676976656e20636f6e76696374696f6e29206f66207468652073656e64696e67206163636f756e742e005901205468652062616c616e63652064656c656761746564206973206c6f636b656420666f72206173206c6f6e6720617320697427732064656c6567617465642c20616e64207468657265616674657220666f7220746865cc2074696d6520617070726f70726961746520666f722074686520636f6e76696374696f6e2773206c6f636b20706572696f642e00610120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e696e67206163636f756e74206d757374206569746865723a782020202d2062652064656c65676174696e6720616c72656164793b206f725d012020202d2068617665206e6f20766f74696e67206163746976697479202869662074686572652069732c207468656e2069742077696c6c206e65656420746f2062652072656d6f7665642f636f6e736f6c6964617465649820202020207468726f7567682060726561705f766f746560206f722060756e766f746560292e004901202d2060746f603a20546865206163636f756e742077686f736520766f74696e6720746865206074617267657460206163636f756e74277320766f74696e6720706f7765722077696c6c20666f6c6c6f772e5901202d2060636f6e76696374696f6e603a2054686520636f6e76696374696f6e20746861742077696c6c20626520617474616368656420746f207468652064656c65676174656420766f7465732e205768656e2074686545012020206163636f756e7420697320756e64656c6567617465642c207468652066756e64732077696c6c206265206c6f636b656420666f722074686520636f72726573706f6e64696e6720706572696f642e5501202d206062616c616e6365603a2054686520616d6f756e74206f6620746865206163636f756e7427732062616c616e636520746f206265207573656420696e2064656c65676174696e672e2054686973206d757374c82020206e6f74206265206d6f7265207468616e20746865206163636f756e7427732063757272656e742062616c616e63652e004c20456d697473206044656c656761746564602e004101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732e28756e64656c65676174650030d020556e64656c65676174652074686520766f74696e6720706f776572206f66207468652073656e64696e67206163636f756e742e00610120546f6b656e73206d617920626520756e6c6f636b656420666f6c6c6f77696e67206f6e636520616e20616d6f756e74206f662074696d6520636f6e73697374656e74207769746820746865206c6f636b20706572696f64e0206f662074686520636f6e76696374696f6e2077697468207768696368207468652064656c65676174696f6e20776173206973737565642e00490120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265582063757272656e746c792064656c65676174696e672e005420456d6974732060556e64656c656761746564602e004101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732e58636c6561725f7075626c69635f70726f706f73616c7300147420436c6561727320616c6c207075626c69632070726f706f73616c732e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e0040205765696768743a20604f283129602e346e6f74655f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e2861012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e205468697320646f65736e27742072657175697265207468652070726f706f73616c20746f206265250120696e207468652064697370617463682071756575652062757420646f657320726571756972652061206465706f7369742c2072657475726e6564206f6e636520656e61637465642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e005101205765696768743a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e646e6f74655f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e040d012053616d6520617320606e6f74655f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e586e6f74655f696d6d696e656e745f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e3045012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e2054686973207265717569726573207468652070726f706f73616c20746f206265410120696e207468652064697370617463682071756575652e204e6f206465706f736974206973206e65656465642e205768656e20746869732063616c6c206973207375636365737366756c2c20692e652e39012074686520707265696d61676520686173206e6f74206265656e2075706c6f61646564206265666f726520616e64206d61746368657320736f6d6520696d6d696e656e742070726f706f73616c2c40206e6f2066656520697320706169642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e005101205765696768743a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e886e6f74655f696d6d696e656e745f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e0431012053616d6520617320606e6f74655f696d6d696e656e745f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e34726561705f707265696d616765083470726f706f73616c5f686173681c543a3a486173686070726f706f73616c5f6c656e5f75707065725f626f756e6430436f6d706163743c7533323e3cf42052656d6f766520616e20657870697265642070726f706f73616c20707265696d61676520616e6420636f6c6c65637420746865206465706f7369742e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00d0202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f6620612070726f706f73616c2e2d01202d206070726f706f73616c5f6c656e6774685f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e206c656e677468206f66207468652070726f706f73616c2e010120202045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e00510120546869732077696c6c206f6e6c7920776f726b2061667465722060566f74696e67506572696f646020626c6f636b732066726f6d207468652074696d6520746861742074686520707265696d616765207761735d01206e6f7465642c2069662069742773207468652073616d65206163636f756e7420646f696e672069742e2049662069742773206120646966666572656e74206163636f756e742c207468656e206974276c6c206f6e6c79b020776f726b20616e206164646974696f6e616c2060456e6163746d656e74506572696f6460206c617465722e006020456d6974732060507265696d616765526561706564602e00b8205765696768743a20604f284429602077686572652044206973206c656e677468206f662070726f706f73616c2e18756e6c6f636b041874617267657430543a3a4163636f756e7449641ca420556e6c6f636b20746f6b656e732074686174206861766520616e2065787069726564206c6f636b2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00bc202d2060746172676574603a20546865206163636f756e7420746f2072656d6f766520746865206c6f636b206f6e2e00c0205765696768743a20604f2852296020776974682052206e756d626572206f6620766f7465206f66207461726765742e2c72656d6f76655f766f74650414696e6465783c5265666572656e64756d496e6465786c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e00102049663a8c202d20746865207265666572656e64756d207761732063616e63656c6c65642c206f7280202d20746865207265666572656e64756d206973206f6e676f696e672c206f7294202d20746865207265666572656e64756d2068617320656e6465642073756368207468617401012020202d2074686520766f7465206f6620746865206163636f756e742077617320696e206f70706f736974696f6e20746f2074686520726573756c743b206f72d82020202d20746865726520776173206e6f20636f6e76696374696f6e20746f20746865206163636f756e74277320766f74653b206f72882020202d20746865206163636f756e74206d61646520612073706c697420766f74656101202e2e2e7468656e2074686520766f74652069732072656d6f76656420636c65616e6c7920616e64206120666f6c6c6f77696e672063616c6c20746f2060756e6c6f636b60206d617920726573756c7420696e206d6f72655c2066756e6473206265696e6720617661696c61626c652e00ac2049662c20686f77657665722c20746865207265666572656e64756d2068617320656e64656420616e643af0202d2069742066696e697368656420636f72726573706f6e64696e6720746f2074686520766f7465206f6620746865206163636f756e742c20616e64e0202d20746865206163636f756e74206d6164652061207374616e6461726420766f7465207769746820636f6e76696374696f6e2c20616e64c0202d20746865206c6f636b20706572696f64206f662074686520636f6e76696374696f6e206973206e6f74206f7665725d01202e2e2e7468656e20746865206c6f636b2077696c6c206265206167677265676174656420696e746f20746865206f766572616c6c206163636f756e742773206c6f636b2c207768696368206d617920696e766f6c76655d01202a6f7665726c6f636b696e672a20287768657265207468652074776f206c6f636b732061726520636f6d62696e656420696e746f20612073696e676c65206c6f636b207468617420697320746865206d6178696d756de8206f6620626f74682074686520616d6f756e74206c6f636b656420616e64207468652074696d65206973206974206c6f636b656420666f72292e004d0120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e6572206d7573742068617665206120766f74658c207265676973746572656420666f72207265666572656e64756d2060696e646578602e00f8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e005901205765696768743a20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652e4472656d6f76655f6f746865725f766f7465081874617267657430543a3a4163636f756e74496414696e6465783c5265666572656e64756d496e6465783c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e0051012049662074686520607461726765746020697320657175616c20746f20746865207369676e65722c207468656e20746869732066756e6374696f6e2069732065786163746c79206571756976616c656e7420746f3101206072656d6f76655f766f7465602e204966206e6f7420657175616c20746f20746865207369676e65722c207468656e2074686520766f7465206d757374206861766520657870697265642c590120656974686572206265636175736520746865207265666572656e64756d207761732063616e63656c6c65642c20626563617573652074686520766f746572206c6f737420746865207265666572656e64756d206f729c20626563617573652074686520636f6e76696374696f6e20706572696f64206973206f7665722e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e005101202d2060746172676574603a20546865206163636f756e74206f662074686520766f746520746f2062652072656d6f7665643b2074686973206163636f756e74206d757374206861766520766f74656420666f72582020207265666572656e64756d2060696e646578602ef8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e005901205765696768743a20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652e38656e6163745f70726f706f73616c083470726f706f73616c5f686173681c543a3a4861736814696e6465783c5265666572656e64756d496e64657804510120456e61637420612070726f706f73616c2066726f6d2061207265666572656e64756d2e20466f72206e6f77207765206a757374206d616b65207468652077656967687420626520746865206d6178696d756d2e24626c61636b6c697374083470726f706f73616c5f686173681c543a3a486173683c6d617962655f7265665f696e6465785c4f7074696f6e3c5265666572656e64756d496e6465783e3c4901205065726d616e656e746c7920706c61636520612070726f706f73616c20696e746f2074686520626c61636b6c6973742e20546869732070726576656e74732069742066726f6d2065766572206265696e67402070726f706f73656420616761696e2e0055012049662063616c6c6564206f6e206120717565756564207075626c6963206f722065787465726e616c2070726f706f73616c2c207468656e20746869732077696c6c20726573756c7420696e206974206265696e6755012072656d6f7665642e2049662074686520607265665f696e6465786020737570706c69656420697320616e20616374697665207265666572656e64756d2077697468207468652070726f706f73616c20686173682c6c207468656e2069742077696c6c2062652063616e63656c6c65642e00f020546865206469737061746368206f726967696e206f6620746869732063616c6c206d7573742062652060426c61636b6c6973744f726967696e602e00fc202d206070726f706f73616c5f68617368603a205468652070726f706f73616c206861736820746f20626c61636b6c697374207065726d616e656e746c792e4901202d20607265665f696e646578603a20416e206f6e676f696e67207265666572656e64756d2077686f73652068617368206973206070726f706f73616c5f68617368602c2077686963682077696c6c2062652c2063616e63656c6c65642e004501205765696768743a20604f28702960202874686f756768206173207468697320697320616e20686967682d70726976696c6567652064697370617463682c20776520617373756d6520697420686173206154202020726561736f6e61626c652076616c7565292e3c63616e63656c5f70726f706f73616c042870726f705f696e64657848436f6d706163743c50726f70496e6465783e1c4c2052656d6f766520612070726f706f73616c2e00050120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206043616e63656c50726f706f73616c4f726967696e602e00d4202d206070726f705f696e646578603a2054686520696e646578206f66207468652070726f706f73616c20746f2063616e63656c2e00e8205765696768743a20604f28702960207768657265206070203d205075626c696350726f70733a3a3c543e3a3a6465636f64655f6c656e28296001482050726f706f736564082450726f70496e6465781c42616c616e63650431012041206d6f74696f6e20686173206265656e2070726f706f7365642062792061207075626c6963206163636f756e742e205c5b70726f706f73616c5f696e6465782c206465706f7369745c5d185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e047d012041207075626c69632070726f706f73616c20686173206265656e207461626c656420666f72207265666572656e64756d20766f74652e205c5b70726f706f73616c5f696e6465782c206465706f7369742c206465706f7369746f72735c5d3845787465726e616c5461626c656400049820416e2065787465726e616c2070726f706f73616c20686173206265656e207461626c65642e1c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c6404c42041207265666572656e64756d2068617320626567756e2e205c5b7265665f696e6465782c207468726573686f6c645c5d18506173736564043c5265666572656e64756d496e64657804e820412070726f706f73616c20686173206265656e20617070726f766564206279207265666572656e64756d2e205c5b7265665f696e6465785c5d244e6f74506173736564043c5265666572656e64756d496e64657804e820412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e205c5b7265665f696e6465785c5d2443616e63656c6c6564043c5265666572656e64756d496e64657804bc2041207265666572656e64756d20686173206265656e2063616e63656c6c65642e205c5b7265665f696e6465785c5d204578656375746564083c5265666572656e64756d496e64657810626f6f6c04c820412070726f706f73616c20686173206265656e20656e61637465642e205c5b7265665f696e6465782c2069735f6f6b5c5d2444656c65676174656408244163636f756e744964244163636f756e74496404210120416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e205c5b77686f2c207461726765745c5d2c556e64656c65676174656404244163636f756e74496404f820416e205c5b6163636f756e745c5d206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e185665746f65640c244163636f756e74496410486173682c426c6f636b4e756d62657204110120416e2065787465726e616c2070726f706f73616c20686173206265656e207665746f65642e205c5b77686f2c2070726f706f73616c5f686173682c20756e74696c5c5d34507265696d6167654e6f7465640c1048617368244163636f756e7449641c42616c616e636504610120412070726f706f73616c277320707265696d61676520776173206e6f7465642c20616e6420746865206465706f7369742074616b656e2e205c5b70726f706f73616c5f686173682c2077686f2c206465706f7369745c5d30507265696d616765557365640c1048617368244163636f756e7449641c42616c616e636508150120412070726f706f73616c20707265696d616765207761732072656d6f76656420616e6420757365642028746865206465706f736974207761732072657475726e6564292e94205c5b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369745c5d3c507265696d616765496e76616c69640810486173683c5265666572656e64756d496e646578080d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d6167652077617320696e76616c69642e74205c5b70726f706f73616c5f686173682c207265665f696e6465785c5d3c507265696d6167654d697373696e670810486173683c5265666572656e64756d496e646578080d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d61676520776173206d697373696e672e74205c5b70726f706f73616c5f686173682c207265665f696e6465785c5d38507265696d616765526561706564101048617368244163636f756e7449641c42616c616e6365244163636f756e744964082d012041207265676973746572656420707265696d616765207761732072656d6f76656420616e6420746865206465706f73697420636f6c6c656374656420627920746865207265617065722eb4205c5b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369742c207265617065725c5d20556e6c6f636b656404244163636f756e74496404bc20416e205c5b6163636f756e745c5d20686173206265656e20756e6c6f636b6564207375636365737366756c6c792e2c426c61636b6c697374656404104861736804d820412070726f706f73616c205c5b686173685c5d20686173206265656e20626c61636b6c6973746564207065726d616e656e746c792e203c456e6163746d656e74506572696f6438543a3a426c6f636b4e756d62657210002f0d0014710120546865206d696e696d756d20706572696f64206f66206c6f636b696e6720616e642074686520706572696f64206265747765656e20612070726f706f73616c206265696e6720617070726f76656420616e6420656e61637465642e0031012049742073686f756c642067656e6572616c6c792062652061206c6974746c65206d6f7265207468616e2074686520756e7374616b6520706572696f6420746f20656e737572652074686174690120766f74696e67207374616b657273206861766520616e206f70706f7274756e69747920746f2072656d6f7665207468656d73656c7665732066726f6d207468652073797374656d20696e2074686520636173652077686572659c207468657920617265206f6e20746865206c6f73696e672073696465206f66206120766f74652e304c61756e6368506572696f6438543a3a426c6f636b4e756d62657210004e0c0004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e30566f74696e67506572696f6438543a3a426c6f636b4e756d62657210004e0c0004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e384d696e696d756d4465706f7369743042616c616e63654f663c543e400000c16ff2862300000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e5446617374547261636b566f74696e67506572696f6438543a3a426c6f636b4e756d626572108051010004ec204d696e696d756d20766f74696e6720706572696f6420616c6c6f77656420666f72206120666173742d747261636b207265666572656e64756d2e34436f6f6c6f6666506572696f6438543a3a426c6f636b4e756d62657210004e0c0004610120506572696f6420696e20626c6f636b7320776865726520616e2065787465726e616c2070726f706f73616c206d6179206e6f742062652072652d7375626d6974746564206166746572206265696e67207665746f65642e4c507265696d616765427974654465706f7369743042616c616e63654f663c543e400010a5d4e800000000000000000000000429012054686520616d6f756e74206f662062616c616e63652074686174206d757374206265206465706f7369746564207065722062797465206f6620707265696d6167652073746f7265642e204d6178566f7465730c753332106400000010b020546865206d6178696d756d206e756d626572206f6620766f74657320666f7220616e206163636f756e742e00d420416c736f207573656420746f20636f6d70757465207765696768742c20616e206f7665726c79206269672076616c75652063616e1501206c65616420746f2065787472696e7369632077697468207665727920626967207765696768743a20736565206064656c65676174656020666f7220696e7374616e63652e842056616c75654c6f7704382056616c756520746f6f206c6f773c50726f706f73616c4d697373696e6704602050726f706f73616c20646f6573206e6f7420657869737420426164496e646578043820556e6b6e6f776e20696e6465783c416c726561647943616e63656c656404982043616e6e6f742063616e63656c207468652073616d652070726f706f73616c207477696365444475706c696361746550726f706f73616c04582050726f706f73616c20616c7265616479206d6164654c50726f706f73616c426c61636b6c6973746564046c2050726f706f73616c207374696c6c20626c61636b6c6973746564444e6f7453696d706c654d616a6f7269747904ac204e6578742065787465726e616c2070726f706f73616c206e6f742073696d706c65206d616a6f726974792c496e76616c696448617368043420496e76616c69642068617368284e6f50726f706f73616c0454204e6f2065787465726e616c2070726f706f73616c34416c72656164795665746f6564049c204964656e74697479206d6179206e6f74207665746f20612070726f706f73616c207477696365304e6f7444656c6567617465640438204e6f742064656c656761746564444475706c6963617465507265696d616765045c20507265696d61676520616c7265616479206e6f7465642c4e6f74496d6d696e656e740434204e6f7420696d6d696e656e7420546f6f4561726c79042820546f6f206561726c7920496d6d696e656e74042420496d6d696e656e743c507265696d6167654d697373696e67044c20507265696d616765206e6f7420666f756e64445265666572656e64756d496e76616c6964048820566f746520676976656e20666f7220696e76616c6964207265666572656e64756d3c507265696d616765496e76616c6964044420496e76616c696420707265696d6167652c4e6f6e6557616974696e670454204e6f2070726f706f73616c732077616974696e67244e6f744c6f636b656404a42054686520746172676574206163636f756e7420646f6573206e6f7420686176652061206c6f636b2e284e6f744578706972656404f020546865206c6f636b206f6e20746865206163636f756e7420746f20626520756e6c6f636b656420686173206e6f742079657420657870697265642e204e6f74566f74657204c82054686520676976656e206163636f756e7420646964206e6f7420766f7465206f6e20746865207265666572656e64756d2e304e6f5065726d697373696f6e04cc20546865206163746f7220686173206e6f207065726d697373696f6e20746f20636f6e647563742074686520616374696f6e2e44416c726561647944656c65676174696e67048c20546865206163636f756e7420697320616c72656164792064656c65676174696e672e44496e73756666696369656e7446756e647304010120546f6f206869676820612062616c616e6365207761732070726f7669646564207468617420746865206163636f756e742063616e6e6f74206166666f72642e344e6f7444656c65676174696e6704a420546865206163636f756e74206973206e6f742063757272656e746c792064656c65676174696e672e28566f746573457869737408590120546865206163636f756e742063757272656e746c792068617320766f74657320617474616368656420746f20697420616e6420746865206f7065726174696f6e2063616e6e6f74207375636365656420756e74696cec207468657365206172652072656d6f7665642c20656974686572207468726f7567682060756e766f746560206f722060726561705f766f7465602e44496e7374616e744e6f74416c6c6f77656404dc2054686520696e7374616e74207265666572656e64756d206f726967696e2069732063757272656e746c7920646973616c6c6f7765642e204e6f6e73656e736504982044656c65676174696f6e20746f206f6e6573656c66206d616b6573206e6f2073656e73652e3c57726f6e675570706572426f756e64045420496e76616c696420757070657220626f756e642e3c4d6178566f746573526561636865640484204d6178696d756d206e756d626572206f6620766f74657320726561636865642e38496e76616c69645769746e6573730490205468652070726f7669646564207769746e65737320646174612069732077726f6e672e40546f6f4d616e7950726f706f73616c730494204d6178696d756d206e756d626572206f662070726f706f73616c7320726561636865642e0b1c436f756e63696c014c496e7374616e636531436f6c6c656374697665182450726f706f73616c73010090426f756e6465645665633c543a3a486173682c20543a3a4d617850726f706f73616c733e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368683c5420617320436f6e6669673c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e744964040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c38f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e004d01205472616e73616374696f6e20666565732077696c6c2062652077616976656420696620746865206d656d62657220697320766f74696e67206f6e20616e7920706172746963756c61722070726f706f73616c690120666f72207468652066697273742074696d6520616e64207468652063616c6c206973207375636365737366756c2e2053756273657175656e7420766f7465206368616e6765732077696c6c206368617267652061206665652e2c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e78510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e0065012049662074686520636c6f7365206f7065726174696f6e20636f6d706c65746573207375636365737366756c6c79207769746820646973617070726f76616c2c20746865207472616e73616374696f6e206665652077696c6c6101206265207761697665642e204f746865727769736520657865637574696f6e206f662074686520617070726f766564206f7065726174696f6e2077696c6c206265206368617267656420746f207468652063616c6c65722e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed8205c5b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645c5d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292eac205c5b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5c5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e6c205c5b70726f706f73616c5f686173682c207965732c206e6f5c5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e0c48546563686e6963616c436f6d6d6974746565014c496e7374616e636532436f6c6c656374697665182450726f706f73616c73010090426f756e6465645665633c543a3a486173682c20543a3a4d617850726f706f73616c733e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368683c5420617320436f6e6669673c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e744964040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c38f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e004d01205472616e73616374696f6e20666565732077696c6c2062652077616976656420696620746865206d656d62657220697320766f74696e67206f6e20616e7920706172746963756c61722070726f706f73616c690120666f72207468652066697273742074696d6520616e64207468652063616c6c206973207375636365737366756c2e2053756273657175656e7420766f7465206368616e6765732077696c6c206368617267652061206665652e2c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e78510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e0065012049662074686520636c6f7365206f7065726174696f6e20636f6d706c65746573207375636365737366756c6c79207769746820646973617070726f76616c2c20746865207472616e73616374696f6e206665652077696c6c6101206265207761697665642e204f746865727769736520657865637574696f6e206f662074686520617070726f766564206f7065726174696f6e2077696c6c206265206368617267656420746f207468652063616c6c65722e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed8205c5b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645c5d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292eac205c5b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5c5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e6c205c5b70726f706f73616c5f686173682c207965732c206e6f5c5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e0d24456c656374696f6e730124456c656374696f6e73141c4d656d626572730100ac5665633c53656174486f6c6465723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e04000c74205468652063757272656e7420656c6563746564206d656d626572732e00b820496e76617269616e743a20416c7761797320736f72746564206261736564206f6e206163636f756e742069642e2452756e6e65727355700100ac5665633c53656174486f6c6465723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e04001084205468652063757272656e742072657365727665642072756e6e6572732d75702e00590120496e76617269616e743a20416c7761797320736f72746564206261736564206f6e2072616e6b2028776f72736520746f2062657374292e2055706f6e2072656d6f76616c206f662061206d656d6265722c20746865bc206c6173742028692e652e205f626573745f292072756e6e65722d75702077696c6c206265207265706c616365642e2843616e646964617465730100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e0400185901205468652070726573656e742063616e646964617465206c6973742e20412063757272656e74206d656d626572206f722072756e6e65722d75702063616e206e6576657220656e746572207468697320766563746f72d020616e6420697320616c7761797320696d706c696369746c7920617373756d656420746f20626520612063616e6469646174652e007c205365636f6e6420656c656d656e7420697320746865206465706f7369742e00b820496e76617269616e743a20416c7761797320736f72746564206261736564206f6e206163636f756e742069642e38456c656374696f6e526f756e647301000c75333210000000000441012054686520746f74616c206e756d626572206f6620766f746520726f756e6473207468617420686176652068617070656e65642c206578636c7564696e6720746865207570636f6d696e67206f6e652e18566f74696e6701010530543a3a4163636f756e74496484566f7465723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e00840000000000000000000000000000000000000000000000000000000000000000000cb820566f74657320616e64206c6f636b6564207374616b65206f66206120706172746963756c617220766f7465722e00c42054574f582d4e4f54453a205341464520617320604163636f756e7449646020697320612063727970746f20686173682e011810766f74650814766f746573445665633c543a3a4163636f756e7449643e1476616c756554436f6d706163743c42616c616e63654f663c543e3e5c5d0120566f746520666f72206120736574206f662063616e6469646174657320666f7220746865207570636f6d696e6720726f756e64206f6620656c656374696f6e2e20546869732063616e2062652063616c6c656420746fe4207365742074686520696e697469616c20766f7465732c206f722075706461746520616c7265616479206578697374696e6720766f7465732e0061012055706f6e20696e697469616c20766f74696e672c206076616c75656020756e697473206f66206077686f6027732062616c616e6365206973206c6f636b656420616e642061206465706f73697420616d6f756e7420697351012072657365727665642e20546865206465706f736974206973206261736564206f6e20746865206e756d626572206f6620766f74657320616e642063616e2062652075706461746564206f7665722074696d652e0050205468652060766f746573602073686f756c643a482020202d206e6f7420626520656d7074792e59012020202d206265206c657373207468616e20746865206e756d626572206f6620706f737369626c652063616e646964617465732e204e6f7465207468617420616c6c2063757272656e74206d656d6265727320616e641501202020202072756e6e6572732d75702061726520616c736f206175746f6d61746963616c6c792063616e6469646174657320666f7220746865206e65787420726f756e642e005101204966206076616c756560206973206d6f7265207468616e206077686f60277320746f74616c2062616c616e63652c207468656e20746865206d6178696d756d206f66207468652074776f20697320757365642e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265207369676e65642e003020232323205761726e696e670059012049742069732074686520726573706f6e736962696c697479206f66207468652063616c6c657220746f202a2a4e4f542a2a20706c61636520616c6c206f662074686569722062616c616e636520696e746f20746865ac206c6f636b20616e64206b65657020736f6d6520666f722066757274686572206f7065726174696f6e732e002c2023203c7765696768743e550120576520617373756d6520746865206d6178696d756d2077656967687420616d6f6e6720616c6c20332063617365733a20766f74655f657175616c2c20766f74655f6d6f726520616e6420766f74655f6c6573732e302023203c2f7765696768743e3072656d6f76655f766f7465720014702052656d6f766520606f726967696e60206173206120766f7465722e00bc20546869732072656d6f76657320746865206c6f636b20616e642072657475726e7320746865206465706f7369742e00010120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265207369676e656420616e64206265206120766f7465722e407375626d69745f63616e646964616379043c63616e6469646174655f636f756e7430436f6d706163743c7533323e3c1501205375626d6974206f6e6573656c6620666f722063616e6469646163792e204120666978656420616d6f756e74206f66206465706f736974206973207265636f726465642e00610120416c6c2063616e64696461746573206172652077697065642061742074686520656e64206f6620746865207465726d2e205468657920656974686572206265636f6d652061206d656d6265722f72756e6e65722d75702cd0206f72206c65617665207468652073797374656d207768696c65207468656972206465706f73697420697320736c61736865642e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265207369676e65642e003020232323205761726e696e67006101204576656e20696620612063616e64696461746520656e6473207570206265696e672061206d656d6265722c2074686579206d7573742063616c6c205b6043616c6c3a3a72656e6f756e63655f63616e646964616379605d5d0120746f20676574207468656972206465706f736974206261636b2e204c6f73696e67207468652073706f7420696e20616e20656c656374696f6e2077696c6c20616c77617973206c65616420746f206120736c6173682e002c2023203c7765696768743e0d0120546865206e756d626572206f662063757272656e742063616e64696461746573206d7573742062652070726f7669646564206173207769746e65737320646174612e302023203c2f7765696768743e4872656e6f756e63655f63616e646964616379042872656e6f756e63696e672852656e6f756e63696e674451012052656e6f756e6365206f6e65277320696e74656e74696f6e20746f20626520612063616e64696461746520666f7220746865206e65787420656c656374696f6e20726f756e642e203320706f74656e7469616c40206f7574636f6d65732065786973743a004d01202d20606f726967696e6020697320612063616e64696461746520616e64206e6f7420656c656374656420696e20616e79207365742e20496e207468697320636173652c20746865206465706f736974206973f4202020756e72657365727665642c2072657475726e656420616e64206f726967696e2069732072656d6f76656420617320612063616e6469646174652e6501202d20606f726967696e6020697320612063757272656e742072756e6e65722d75702e20496e207468697320636173652c20746865206465706f73697420697320756e72657365727665642c2072657475726e656420616e64902020206f726967696e2069732072656d6f76656420617320612072756e6e65722d75702e5901202d20606f726967696e6020697320612063757272656e74206d656d6265722e20496e207468697320636173652c20746865206465706f73697420697320756e726573657276656420616e64206f726967696e206973590120202072656d6f7665642061732061206d656d6265722c20636f6e73657175656e746c79206e6f74206265696e6720612063616e64696461746520666f7220746865206e65787420726f756e6420616e796d6f72652e550120202053696d696c617220746f205b6072656d6f76655f6d656d62657273605d2c206966207265706c6163656d656e742072756e6e657273206578697374732c20746865792061726520696d6d6564696174656c794d01202020757365642e20496620746865207072696d652069732072656e6f756e63696e672c207468656e206e6f207072696d652077696c6c20657869737420756e74696c20746865206e65787420726f756e642e00490120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265207369676e65642c20616e642068617665206f6e65206f66207468652061626f766520726f6c65732e002c2023203c7765696768743ee4205468652074797065206f662072656e6f756e63696e67206d7573742062652070726f7669646564206173207769746e65737320646174612e302023203c2f7765696768743e3472656d6f76655f6d656d626572080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653c6861735f7265706c6163656d656e7410626f6f6c385d012052656d6f7665206120706172746963756c6172206d656d6265722066726f6d20746865207365742e20546869732069732065666665637469766520696d6d6564696174656c7920616e642074686520626f6e64206f668020746865206f7574676f696e67206d656d62657220697320736c61736865642e00590120496620612072756e6e65722d757020697320617661696c61626c652c207468656e2074686520626573742072756e6e65722d75702077696c6c2062652072656d6f76656420616e64207265706c61636573207468650101206f7574676f696e67206d656d6265722e204f74686572776973652c2061206e65772070687261676d656e20656c656374696f6e20697320737461727465642e00bc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d75737420626520726f6f742e004501204e6f74652074686174207468697320646f6573206e6f7420616666656374207468652064657369676e6174656420626c6f636b206e756d626572206f6620746865206e65787420656c656374696f6e2e002c2023203c7765696768743e550120496620776520686176652061207265706c6163656d656e742c20776520757365206120736d616c6c207765696768742e20456c73652c2073696e63652074686973206973206120726f6f742063616c6c20616e64d42077696c6c20676f20696e746f2070687261676d656e2c20776520617373756d652066756c6c20626c6f636b20666f72206e6f772e302023203c2f7765696768743e50636c65616e5f646566756e63745f766f74657273082c5f6e756d5f766f746572730c753332305f6e756d5f646566756e63740c75333228490120436c65616e20616c6c20766f746572732077686f2061726520646566756e63742028692e652e207468657920646f206e6f7420736572766520616e7920707572706f736520617420616c6c292e20546865b0206465706f736974206f66207468652072656d6f76656420766f74657273206172652072657475726e65642e000501205468697320697320616e20726f6f742066756e6374696f6e20746f2062652075736564206f6e6c7920666f7220636c65616e696e67207468652073746174652e00bc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d75737420626520726f6f742e002c2023203c7765696768743e61012054686520746f74616c206e756d626572206f6620766f7465727320616e642074686f736520746861742061726520646566756e6374206d7573742062652070726f7669646564206173207769746e65737320646174612e302023203c2f7765696768743e011c1c4e65775465726d04645665633c284163636f756e7449642c2042616c616e6365293e1459012041206e6577207465726d2077697468205c5b6e65775f6d656d626572735c5d2e205468697320696e64696361746573207468617420656e6f7567682063616e64696461746573206578697374656420746f2072756e59012074686520656c656374696f6e2c206e6f74207468617420656e6f756768206861766520686173206265656e20656c65637465642e2054686520696e6e65722076616c7565206d757374206265206578616d696e6564490120666f72207468697320707572706f73652e204120604e65775465726d285c5b5c5d296020696e64696361746573207468617420736f6d652063616e6469646174657320676f7420746865697220626f6e64590120736c617368656420616e64206e6f6e65207765726520656c65637465642c207768696c73742060456d7074795465726d60206d65616e732074686174206e6f2063616e64696461746573206578697374656420746f3020626567696e20776974682e24456d7074795465726d00083501204e6f20286f72206e6f7420656e6f756768292063616e64696461746573206578697374656420666f72207468697320726f756e642e205468697320697320646966666572656e742066726f6dcc20604e65775465726d285c5b5c5d29602e2053656520746865206465736372697074696f6e206f6620604e65775465726d602e34456c656374696f6e4572726f720004e820496e7465726e616c206572726f722068617070656e6564207768696c6520747279696e6720746f20706572666f726d20656c656374696f6e2e304d656d6265724b69636b656404244163636f756e7449640855012041205c5b6d656d6265725c5d20686173206265656e2072656d6f7665642e20546869732073686f756c6420616c7761797320626520666f6c6c6f7765642062792065697468657220604e65775465726d60206f72342060456d7074795465726d602e2452656e6f756e63656404244163636f756e744964049c20536f6d656f6e65206861732072656e6f756e6365642074686569722063616e6469646163792e4043616e646964617465536c617368656408244163636f756e7449641c42616c616e6365105d012041205c5b63616e6469646174655c5d2077617320736c6173686564206279205c5b616d6f756e745c5d2064756520746f206661696c696e6720746f206f627461696e20612073656174206173206d656d626572206f722c2072756e6e65722d75702e00e8204e6f74652074686174206f6c64206d656d6265727320616e642072756e6e6572732d75702061726520616c736f2063616e646964617465732e4453656174486f6c646572536c617368656408244163636f756e7449641c42616c616e63650459012041205c5b7365617420686f6c6465725c5d2077617320736c6173686564206279205c5b616d6f756e745c5d206279206265696e6720666f72636566756c6c792072656d6f7665642066726f6d20746865207365742e1c2050616c6c65744964384c6f636b4964656e74696669657220706872656c65637404d0204964656e74696669657220666f722074686520656c656374696f6e732d70687261676d656e2070616c6c65742773206c6f636b3443616e646964616379426f6e643042616c616e63654f663c543e400080c6a47e8d0300000000000000000004050120486f77206d7563682073686f756c64206265206c6f636b656420757020696e206f7264657220746f207375626d6974206f6e6527732063616e6469646163792e38566f74696e67426f6e64426173653042616c616e63654f663c543e4000f0436de36a0100000000000000000010942042617365206465706f736974206173736f636961746564207769746820766f74696e672e00550120546869732073686f756c642062652073656e7369626c79206869676820746f2065636f6e6f6d6963616c6c7920656e73757265207468652070616c6c65742063616e6e6f742062652061747461636b656420627994206372656174696e67206120676967616e746963206e756d626572206f6620766f7465732e40566f74696e67426f6e64466163746f723042616c616e63654f663c543e400000cc7b9fae000000000000000000000411012054686520616d6f756e74206f6620626f6e642074686174206e65656420746f206265206c6f636b656420666f72206561636820766f746520283332206279746573292e38446573697265644d656d626572730c753332100d0000000470204e756d626572206f66206d656d6265727320746f20656c6563742e404465736972656452756e6e65727355700c75333210070000000478204e756d626572206f662072756e6e6572735f757020746f206b6565702e305465726d4475726174696f6e38543a3a426c6f636b4e756d62657210801303000c510120486f77206c6f6e6720656163682073656174206973206b6570742e205468697320646566696e657320746865206e65787420626c6f636b206e756d62657220617420776869636820616e20656c656374696f6e5d0120726f756e642077696c6c2068617070656e2e2049662073657420746f207a65726f2c206e6f20656c656374696f6e732061726520657665722074726967676572656420616e6420746865206d6f64756c652077696c6c5020626520696e2070617373697665206d6f64652e4430556e61626c65546f566f746504c42043616e6e6f7420766f7465207768656e206e6f2063616e64696461746573206f72206d656d626572732065786973742e1c4e6f566f7465730498204d75737420766f746520666f72206174206c65617374206f6e652063616e6469646174652e30546f6f4d616e79566f74657304882043616e6e6f7420766f7465206d6f7265207468616e2063616e646964617465732e504d6178696d756d566f7465734578636565646564049c2043616e6e6f7420766f7465206d6f7265207468616e206d6178696d756d20616c6c6f7765642e284c6f7742616c616e636504c82043616e6e6f7420766f74652077697468207374616b65206c657373207468616e206d696e696d756d2062616c616e63652e3c556e61626c65546f506179426f6e64047c20566f7465722063616e206e6f742070617920766f74696e6720626f6e642e2c4d7573744265566f7465720444204d757374206265206120766f7465722e285265706f727453656c6604502043616e6e6f74207265706f72742073656c662e4c4475706c69636174656443616e6469646174650484204475706c6963617465642063616e646964617465207375626d697373696f6e2e304d656d6265725375626d6974048c204d656d6265722063616e6e6f742072652d7375626d69742063616e6469646163792e3852756e6e657255705375626d6974048c2052756e6e65722063616e6e6f742072652d7375626d69742063616e6469646163792e68496e73756666696369656e7443616e64696461746546756e647304982043616e64696461746520646f6573206e6f74206861766520656e6f7567682066756e64732e244e6f744d656d6265720438204e6f742061206d656d6265722e48496e76616c69645769746e6573734461746104e4205468652070726f766964656420636f756e74206f66206e756d626572206f662063616e6469646174657320697320696e636f72726563742e40496e76616c6964566f7465436f756e7404d0205468652070726f766964656420636f756e74206f66206e756d626572206f6620766f74657320697320696e636f72726563742e44496e76616c696452656e6f756e63696e67040101205468652072656e6f756e63696e67206f726967696e2070726573656e74656420612077726f6e67206052656e6f756e63696e676020706172616d657465722e48496e76616c69645265706c6163656d656e740401012050726564696374696f6e20726567617264696e67207265706c6163656d656e74206166746572206d656d6265722072656d6f76616c2069732077726f6e672e0e4c546563686e6963616c4d656d62657273686970014c496e7374616e6365314d656d62657273686970081c4d656d626572730100445665633c543a3a4163636f756e7449643e040004c8205468652063757272656e74206d656d626572736869702c2073746f72656420617320616e206f726465726564205665632e145072696d65000030543a3a4163636f756e744964040004a4205468652063757272656e74207072696d65206d656d6265722c206966206f6e65206578697374732e011c286164645f6d656d626572040c77686f30543a3a4163636f756e7449640c7c204164642061206d656d626572206077686f6020746f20746865207365742e00a0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a4164644f726967696e602e3472656d6f76655f6d656d626572040c77686f30543a3a4163636f756e7449640c902052656d6f76652061206d656d626572206077686f602066726f6d20746865207365742e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656d6f76654f726967696e602e2c737761705f6d656d626572081872656d6f766530543a3a4163636f756e7449640c61646430543a3a4163636f756e74496414c02053776170206f7574206f6e65206d656d626572206072656d6f76656020666f7220616e6f746865722060616464602e00a4204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a537761704f726967696e602e001101205072696d65206d656d62657273686970206973202a6e6f742a207061737365642066726f6d206072656d6f76656020746f2060616464602c20696620657874616e742e3472657365745f6d656d62657273041c6d656d62657273445665633c543a3a4163636f756e7449643e105901204368616e676520746865206d656d6265727368697020746f2061206e6577207365742c20646973726567617264696e6720746865206578697374696e67206d656d626572736869702e204265206e69636520616e646c207061737320606d656d6265727360207072652d736f727465642e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52657365744f726967696e602e286368616e67655f6b6579040c6e657730543a3a4163636f756e74496414d82053776170206f7574207468652073656e64696e67206d656d62657220666f7220736f6d65206f74686572206b657920606e6577602e00f4204d6179206f6e6c792062652063616c6c65642066726f6d20605369676e656460206f726967696e206f6620612063757272656e74206d656d6265722e002101205072696d65206d656d62657273686970206973207061737365642066726f6d20746865206f726967696e206163636f756e7420746f20606e6577602c20696620657874616e742e247365745f7072696d65040c77686f30543a3a4163636f756e7449640cc02053657420746865207072696d65206d656d6265722e204d75737420626520612063757272656e74206d656d6265722e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e2c636c6561725f7072696d65000c982052656d6f766520746865207072696d65206d656d626572206966206974206578697374732e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e01182c4d656d62657241646465640004e42054686520676976656e206d656d626572207761732061646465643b2073656520746865207472616e73616374696f6e20666f722077686f2e344d656d62657252656d6f7665640004ec2054686520676976656e206d656d626572207761732072656d6f7665643b2073656520746865207472616e73616374696f6e20666f722077686f2e384d656d62657273537761707065640004dc2054776f206d656d62657273207765726520737761707065643b2073656520746865207472616e73616374696f6e20666f722077686f2e304d656d6265727352657365740004190120546865206d656d62657273686970207761732072657365743b2073656520746865207472616e73616374696f6e20666f722077686f20746865206e6577207365742069732e284b65794368616e676564000488204f6e65206f6620746865206d656d6265727327206b657973206368616e6765642e1444756d6d7904bc73705f7374643a3a6d61726b65723a3a5068616e746f6d446174613c284163636f756e7449642c204576656e74293e0470205068616e746f6d206d656d6265722c206e6576657220757365642e000834416c72656164794d656d626572044820416c72656164792061206d656d6265722e244e6f744d656d6265720438204e6f742061206d656d6265722e0f1c4772616e647061011c4772616e6470611814537461746501006c53746f72656453746174653c543a3a426c6f636b4e756d6265723e04000490205374617465206f66207468652063757272656e7420617574686f72697479207365742e3450656e64696e674368616e676500008c53746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265723e040004c42050656e64696e67206368616e67653a20287369676e616c65642061742c207363686564756c6564206368616e6765292e284e657874466f72636564000038543a3a426c6f636b4e756d626572040004bc206e65787420626c6f636b206e756d6265722077686572652077652063616e20666f7263652061206368616e67652e1c5374616c6c656400008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d626572290400049020607472756560206966207765206172652063757272656e746c79207374616c6c65642e3043757272656e7453657449640100145365744964200000000000000000085d0120546865206e756d626572206f66206368616e6765732028626f746820696e207465726d73206f66206b65797320616e6420756e6465726c79696e672065636f6e6f6d696320726573706f6e736962696c697469657329c420696e20746865202273657422206f66204772616e6470612076616c696461746f72732066726f6d2067656e657369732e30536574496453657373696f6e0001051453657449643053657373696f6e496e6465780004001059012041206d617070696e672066726f6d206772616e6470612073657420494420746f2074686520696e646578206f6620746865202a6d6f737420726563656e742a2073657373696f6e20666f722077686963682069747368206d656d62657273207765726520726573706f6e7369626c652e00b82054574f582d4e4f54453a2060536574496460206973206e6f7420756e646572207573657220636f6e74726f6c2e010c4c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66240d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e00110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e306e6f74655f7374616c6c6564081464656c617938543a3a426c6f636b4e756d6265726c626573745f66696e616c697a65645f626c6f636b5f6e756d62657238543a3a426c6f636b4e756d6265721c1d01204e6f74652074686174207468652063757272656e7420617574686f7269747920736574206f6620746865204752414e4450412066696e616c69747920676164676574206861732901207374616c6c65642e20546869732077696c6c2074726967676572206120666f7263656420617574686f7269747920736574206368616e67652061742074686520626567696e6e696e672101206f6620746865206e6578742073657373696f6e2c20746f20626520656e6163746564206064656c61796020626c6f636b7320616674657220746861742e205468652064656c617915012073686f756c64206265206869676820656e6f75676820746f20736166656c7920617373756d6520746861742074686520626c6f636b207369676e616c6c696e6720746865290120666f72636564206368616e67652077696c6c206e6f742062652072652d6f726765642028652e672e203130303020626c6f636b73292e20546865204752414e44504120766f7465727329012077696c6c20737461727420746865206e657720617574686f7269747920736574207573696e672074686520676976656e2066696e616c697a656420626c6f636b20617320626173652e5c204f6e6c792063616c6c61626c6520627920726f6f742e010c384e6577417574686f7269746965730434417574686f726974794c69737404d8204e657720617574686f726974792073657420686173206265656e206170706c6965642e205c5b617574686f726974795f7365745c5d1850617573656400049c2043757272656e7420617574686f726974792073657420686173206265656e207061757365642e1c526573756d65640004a02043757272656e7420617574686f726974792073657420686173206265656e20726573756d65642e001c2c50617573654661696c656408090120417474656d707420746f207369676e616c204752414e445041207061757365207768656e2074686520617574686f72697479207365742069736e2774206c697665a8202865697468657220706175736564206f7220616c72656164792070656e64696e67207061757365292e30526573756d654661696c656408150120417474656d707420746f207369676e616c204752414e44504120726573756d65207768656e2074686520617574686f72697479207365742069736e277420706175736564a42028656974686572206c697665206f7220616c72656164792070656e64696e6720726573756d65292e344368616e676550656e64696e6704ec20417474656d707420746f207369676e616c204752414e445041206368616e67652077697468206f6e6520616c72656164792070656e64696e672e1c546f6f536f6f6e04c02043616e6e6f74207369676e616c20666f72636564206368616e676520736f20736f6f6e206166746572206c6173742e60496e76616c69644b65794f776e65727368697050726f6f660435012041206b6579206f776e6572736869702070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e60496e76616c696445717569766f636174696f6e50726f6f6604350120416e2065717569766f636174696f6e2070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e584475706c69636174654f6666656e63655265706f7274041901204120676976656e2065717569766f636174696f6e207265706f72742069732076616c69642062757420616c72656164792070726576696f75736c79207265706f727465642e10205472656173757279012054726561737572790c3450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c730001053450726f706f73616c496e6465789c50726f706f73616c3c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e000400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100a8426f756e6465645665633c50726f706f73616c496e6465782c20543a3a4d6178417070726f76616c733e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e010c3470726f706f73655f7370656e64081476616c756560436f6d706163743c42616c616e63654f663c542c20493e3e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365242d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129b4202d20446252656164733a206050726f706f73616c436f756e74602c20606f726967696e206163636f756e7460ec202d2044625772697465733a206050726f706f73616c436f756e74602c206050726f706f73616c73602c20606f726967696e206163636f756e7460302023203c2f7765696768743e3c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e24fc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656a6563744f726967696e602e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129d0202d20446252656164733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460d4202d2044625772697465733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460302023203c2f7765696768743e40617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e285d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e50202d20436f6d706c65786974793a204f2831292e90202d20446252656164733a206050726f706f73616c73602c2060417070726f76616c73605c202d20446257726974653a2060417070726f76616c7360302023203c2f7765696768743e011c2050726f706f736564043450726f706f73616c496e6465780484204e65772070726f706f73616c2e205c5b70726f706f73616c5f696e6465785c5d205370656e64696e67041c42616c616e6365043d01205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e205c5b6275646765745f72656d61696e696e675c5d1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964041d0120536f6d652066756e64732068617665206265656e20616c6c6f63617465642e205c5b70726f706f73616c5f696e6465782c2061776172642c2062656e65666963696172795c5d2052656a6563746564083450726f706f73616c496e6465781c42616c616e636504250120412070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e205c5b70726f706f73616c5f696e6465782c20736c61736865645c5d144275726e74041c42616c616e636504b020536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e205c5b6275726e5c5d20526f6c6c6f766572041c42616c616e6365083101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e54205c5b6275646765745f72656d61696e696e675c5d1c4465706f736974041c42616c616e636504b020536f6d652066756e64732068617665206265656e206465706f73697465642e205c5b6465706f7369745c5d143050726f706f73616c426f6e641c5065726d696c6c1050c30000085501204672616374696f6e206f6620612070726f706f73616c27732076616c756520746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c616365207468652070726f706f73616c2e110120416e2061636365707465642070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f6573206e6f742e4c50726f706f73616c426f6e644d696e696d756d3c42616c616e63654f663c542c20493e4000407a10f35a00000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f6438543a3a426c6f636b4e756d6265721080700000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e1c5065726d696c6c1020a107000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e2050616c6c657449642050616c6c657449642070792f7472737279041901205468652074726561737572792773206d6f64756c652069642c207573656420666f72206465726976696e672069747320736f7665726569676e206163636f756e742049442e0c70496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e30496e76616c6964496e6465780494204e6f2070726f706f73616c206f7220626f756e7479206174207468617420696e6465782e40546f6f4d616e79417070726f76616c73048420546f6f206d616e7920617070726f76616c7320696e207468652071756575652e1124436f6e7472616374730124436f6e74726163747314305072697374696e65436f64650001062c436f6465486173683c543e1c5665633c75383e0004000465012041206d617070696e672066726f6d20616e206f726967696e616c20636f6465206861736820746f20746865206f726967696e616c20636f64652c20756e746f756368656420627920696e737472756d656e746174696f6e2e2c436f646553746f726167650001062c436f6465486173683c543e4c5072656661625761736d4d6f64756c653c543e0004000465012041206d617070696e67206265747765656e20616e206f726967696e616c20636f6465206861736820616e6420696e737472756d656e746564207761736d20636f64652c20726561647920666f7220657865637574696f6e2e384163636f756e74436f756e74657201000c753634200000000000000000045420546865207375627472696520636f756e7465722e38436f6e7472616374496e666f4f6600010530543a3a4163636f756e7449643c436f6e7472616374496e666f3c543e0004000ca82054686520636f6465206173736f6369617465642077697468206120676976656e206163636f756e742e00d02054574f582d4e4f54453a20534146452073696e636520604163636f756e7449646020697320612073656375726520686173682e3444656c6574696f6e51756575650100505665633c44656c65746564436f6e74726163743e040010c8204576696374656420636f6e7472616374732074686174206177616974206368696c6420747269652064656c6574696f6e2e004901204368696c6420747269652064656c6574696f6e2069732061206865617679206f7065726174696f6e20646570656e64696e67206f6e2074686520616d6f756e74206f662073746f72616765206974656d7359012073746f72656420696e207361696420747269652e205468657265666f72652074686973206f7065726174696f6e20697320706572666f726d6564206c617a696c7920696e20606f6e5f696e697469616c697a65602e01101063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d69743c436f6d706163743c5765696768743e10646174611c5665633c75383e1c0901204d616b657320612063616c6c20746f20616e206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e002901202a20496620746865206163636f756e74206973206120736d6172742d636f6e7472616374206163636f756e742c20746865206173736f63696174656420636f64652077696c6c206265b020657865637574656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e1901202a20496620746865206163636f756e74206973206120726567756c6172206163636f756e742c20616e792076616c75652077696c6c206265207472616e736665727265642e4901202a204966206e6f206163636f756e742065786973747320616e64207468652063616c6c2076616c7565206973206e6f74206c657373207468616e20606578697374656e7469616c5f6465706f736974602c1501206120726567756c6172206163636f756e742077696c6c206265206372656174656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e54696e7374616e74696174655f776974685f636f64651424656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d69743c436f6d706163743c5765696768743e10636f64651c5665633c75383e10646174611c5665633c75383e1073616c741c5665633c75383e54350120496e7374616e7469617465732061206e657720636f6e74726163742066726f6d2074686520737570706c6965642060636f646560206f7074696f6e616c6c79207472616e7366657272696e673820736f6d652062616c616e63652e000501205468697320697320746865206f6e6c792066756e6374696f6e20746861742063616e206465706c6f79206e657720636f646520746f2074686520636861696e2e0034202320506172616d6574657273006101202a2060656e646f776d656e74603a205468652062616c616e636520746f207472616e736665722066726f6d2074686520606f726967696e6020746f20746865206e65776c79206372656174656420636f6e74726163742e1901202a20606761735f6c696d6974603a2054686520676173206c696d697420656e666f72636564207768656e20657865637574696e672074686520636f6e7374727563746f722ed0202a2060636f6465603a2054686520636f6e747261637420636f646520746f206465706c6f7920696e207261772062797465732ef8202a206064617461603a2054686520696e707574206461746120746f207061737320746f2074686520636f6e747261637420636f6e7374727563746f722e3501202a206073616c74603a205573656420666f722074686520616464726573732064657269766174696f6e2e20536565205b6050616c6c65743a3a636f6e74726163745f61646472657373605d2e009820496e7374616e74696174696f6e20697320657865637574656420617320666f6c6c6f77733a007501202d2054686520737570706c6965642060636f64656020697320696e737472756d656e7465642c206465706c6f7965642c20616e6420612060636f64655f6861736860206973206372656174656420666f72207468617420636f64652e5d01202d204966207468652060636f64655f686173686020616c726561647920657869737473206f6e2074686520636861696e2074686520756e6465726c79696e672060636f6465602077696c6c206265207368617265642e4d01202d205468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e6465722c20636f64655f6861736820616e64207468652073616c742e0501202d2054686520736d6172742d636f6e7472616374206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732ed4202d205468652060656e646f776d656e7460206973207472616e7366657272656420746f20746865206e6577206163636f756e742e4501202d2054686520606465706c6f79602066756e6374696f6e20697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792d63726561746564206163636f756e742e2c696e7374616e74696174651424656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d69743c436f6d706163743c5765696768743e24636f64655f686173682c436f6465486173683c543e10646174611c5665633c75383e1073616c741c5665633c75383e14010120496e7374616e746961746573206120636f6e74726163742066726f6d20612070726576696f75736c79206465706c6f796564207761736d2062696e6172792e00390120546869732066756e6374696f6e206973206964656e746963616c20746f205b6053656c663a3a696e7374616e74696174655f776974685f636f6465605d2062757420776974686f7574207468654d0120636f6465206465706c6f796d656e7420737465702e20496e73746561642c207468652060636f64655f6861736860206f6620616e206f6e2d636861696e206465706c6f796564207761736d2062696e61727948206d75737420626520737570706c6965642e3c636c61696d5f73757263686172676508106465737430543a3a4163636f756e744964286175785f73656e646572504f7074696f6e3c543a3a4163636f756e7449643e244d0120416c6c6f777320626c6f636b2070726f64756365727320746f20636c61696d206120736d616c6c2072657761726420666f72206576696374696e67206120636f6e74726163742e204966206120626c6f636b39012070726f6475636572206661696c7320746f20646f20736f2c206120726567756c61722075736572732077696c6c20626520616c6c6f77656420746f20636c61696d20746865207265776172642e004d0120496e2063617365206f662061207375636365737366756c206576696374696f6e206e6f20666565732061726520636861726765642066726f6d207468652073656e6465722e20486f77657665722c20746865450120726577617264206973206361707065642062792074686520746f74616c20616d6f756e74206f662072656e7420746861742077617320706169642062792074686520636f6e7472616374207768696c65382069742077617320616c6976652e00550120496620636f6e7472616374206973206e6f742065766963746564206173206120726573756c74206f6620746869732063616c6c2c205b604572726f723a3a436f6e74726163744e6f74457669637461626c65605dec2069732072657475726e656420616e64207468652073656e646572206973206e6f7420656c696769626c6520666f7220746865207265776172642e012030496e7374616e74696174656408244163636f756e744964244163636f756e74496404390120436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e205c5b6465706c6f7965722c20636f6e74726163745c5d1c4576696374656404244163636f756e74496404190120436f6e747261637420686173206265656e206576696374656420616e64206973206e6f7720696e20746f6d6273746f6e652073746174652e205c5b636f6e74726163745c5d285465726d696e6174656408244163636f756e744964244163636f756e74496430e820436f6e747261637420686173206265656e207465726d696e6174656420776974686f7574206c656176696e67206120746f6d6273746f6e652e68205c5b636f6e74726163742c2062656e65666963696172795c5d0024202320506172616d7300c0202d2060636f6e7472616374603a2054686520636f6e7472616374207468617420776173207465726d696e617465642e3101202d206062656e6566696369617279603a20546865206163636f756e7420746861742072656365697665642074686520636f6e7472616374732072656d61696e696e672062616c616e63652e001c2023204e6f7465002d0120546865206f6e6c792077617920666f72206120636f6e747261637420746f2062652072656d6f76656420776974686f7574206120746f6d6273746f6e6520616e6420656d697474696e67ac2074686973206576656e742069732062792063616c6c696e6720607365616c5f7465726d696e617465602e20526573746f72656410244163636f756e744964244163636f756e74496410486173681c42616c616e636524bc20526573746f726174696f6e206f66206120636f6e747261637420686173206265656e207375636365737366756c2eb8205c5b726573746f7265722c20646573742c20636f64655f686173682c2072656e745f616c6c6f77616e63655c5d0024202320506172616d7300d0202d2060726573746f726572603a204163636f756e74204944206f662074686520726573746f72696e6720636f6e74726163742ebc202d206064657374603a204163636f756e74204944206f662074686520726573746f72656420636f6e74726163742ecc202d2060636f64655f68617368603a20436f64652068617368206f662074686520726573746f72656420636f6e74726163742ef4202d206072656e745f616c6c6f77616e6365603a2052656e7420616c6c6f77616e6365206f662074686520726573746f72656420636f6e74726163742e28436f646553746f72656404104861736804f020436f646520776974682074686520737065636966696564206861736820686173206265656e2073746f7265642e205c5b636f64655f686173685c5d3c5363686564756c6555706461746564040c75333218c020547269676765726564207768656e207468652063757272656e74207363686564756c6520697320757064617465642e30205c5b76657273696f6e5c5d0024202320506172616d7300d0202d206076657273696f6e603a205468652076657273696f6e206f6620746865206e65776c7920736574207363686564756c652e3c436f6e7472616374456d697474656408244163636f756e7449641c5665633c75383e20a0204120637573746f6d206576656e7420656d69747465642062792074686520636f6e74726163742e4c205c5b636f6e74726163742c20646174615c5d0024202320506172616d7300cc202d2060636f6e7472616374603a2054686520636f6e7472616374207468617420656d697474656420746865206576656e742e3101202d206064617461603a204461746120737570706c6965642062792074686520636f6e74726163742e204d657461646174612067656e65726174656420647572696e6720636f6e7472616374b82020202020202020202020636f6d70696c6174696f6e206973206e656564656420746f206465636f64652069742e2c436f646552656d6f76656404104861736810b0204120636f6465207769746820746865207370656369666965642068617368207761732072656d6f7665642e38205c5b636f64655f686173685c5d00550120546869732068617070656e73207768656e20746865206c61737420636f6e747261637420746861742075736573207468697320636f64652068617368207761732072656d6f766564206f7220657669637465642e28205363686564756c652c5363686564756c653c543ed1090400000000020000000100008000000010000000001000000001000020000000200000000040000000000200020000008e0f0000b04602009a8c0300a9720000767600005e380000ea5e00000753000097000000579e030088130500b60000007a170000c11100005721000099370000483a0000d0110000d8d12c08bc4300005c430000bb2e0000a942000000260000b72300009c370000ad540000de540000ca5400000354000018550000e553000011550000c053000007540000da540000a0530000e85300008d5400004a690000bd680000a56a000096670000b053000013540000055400006a5500009255000060550000f455000033550000cae32900000000007a332a00000000004041290000000000a6fb5d000000000060c02a0000000000e6d6290000000000065329000000000062002a0000000000d425290000000000b0522a00000000005cb3540000000000b41c1600000000008057640000000000000100000000000008f6380000000000710200000000000078d68a210000000098d6de2a000000007c75640900000000466d6f000000000070baac0000000000ec73de07000000007406000000000000922c190000000000fc9f1d00000000008618ee0900000000450200000000000082dc6108000000003e573102000000002704000000000000cc94430b000000009406e1100000000096fa930800000000dc010000000000009c020000000000001843c12400000000f001000000000000b80200000000000094070000000000008a9b2a0000000000561200000000000046432b0000000000ab0c000000000000c08c260000000000b005000000000000acd2260000000000b005000000000000046820436f7374207363686564756c6520616e64206c696d6974732e4c5369676e6564436c61696d48616e646963617038543a3a426c6f636b4e756d626572100200000010e0204e756d626572206f6620626c6f636b2064656c617920616e2065787472696e73696320636c61696d20737572636861726765206861732e000d01205768656e20636c61696d207375726368617267652069732063616c6c656420627920616e2065787472696e736963207468652072656e7420697320636865636b65646820666f722063757272656e745f626c6f636b202d2064656c617940546f6d6273746f6e654465706f7369743042616c616e63654f663c543e4000f0e8857a9c0200000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f2067656e6572617465206120746f6d6273746f6e652e484465706f736974506572436f6e74726163743042616c616e63654f663c543e4000f0e8857a9c02000000000000000000202101205468652062616c616e636520657665727920636f6e7472616374206e6565647320746f206465706f73697420746f207374617920616c69766520696e646566696e6974656c792e005101205468697320697320646966666572656e742066726f6d20746865205b6053656c663a3a546f6d6273746f6e654465706f736974605d20626563617573652074686973206f6e6c79206e6565647320746f2062654501206465706f7369746564207768696c652074686520636f6e747261637420697320616c6976652e20436f73747320666f72206164646974696f6e616c2073746f726167652061726520616464656420746f402074686973206261736520636f73742e006d01205468697320697320612073696d706c652077617920746f20656e73757265207468617420636f6e747261637473207769746820656d7074792073746f72616765206576656e7475616c6c79206765742064656c657465642062797101206d616b696e67207468656d207061792072656e742e2054686973206372656174657320616e20696e63656e7469766520746f2072656d6f7665207468656d206561726c7920696e206f7264657220746f20736176652072656e742e544465706f73697450657253746f72616765427974653042616c616e63654f663c543e400060defb740500000000000000000000185501205468652062616c616e6365206120636f6e7472616374206e6565647320746f206465706f736974207065722073746f72616765206279746520746f207374617920616c69766520696e646566696e6974656c792e006901204c6574277320737570706f736520746865206465706f73697420697320312c303030204255202862616c616e636520756e697473292f6279746520616e64207468652072656e7420697320312042552f627974652f6461792c5901207468656e206120636f6e7472616374207769746820312c3030302c3030302042552074686174207573657320312c303030206279746573206f662073746f7261676520776f756c6420706179206e6f2072656e742e4d0120427574206966207468652062616c616e6365207265647563656420746f203530302c30303020425520616e64207468652073746f7261676520737461796564207468652073616d6520617420312c3030302c78207468656e20697420776f756c6420706179203530302042552f6461792e544465706f73697450657253746f726167654974656d3042616c616e63654f663c543e4000f0ab75a40d000000000000000000000c5501205468652062616c616e6365206120636f6e7472616374206e6565647320746f206465706f736974207065722073746f72616765206974656d20746f207374617920616c69766520696e646566696e6974656c792e00310120497420776f726b73207468652073616d65206173205b6053656c663a3a4465706f73697450657253746f7261676542797465605d2062757420666f722073746f72616765206974656d732e3052656e744672616374696f6e1c50657262696c6c1085040000140d0120546865206672616374696f6e206f6620746865206465706f73697420746861742073686f756c6420626520757365642061732072656e742070657220626c6f636b2e005101205768656e206120636f6e7472616374206861736e277420656e6f7567682062616c616e6365206465706f736974656420746f207374617920616c69766520696e646566696e6974656c79206974206e65656473450120746f207061792070657220626c6f636b20666f72207468652073746f7261676520697420636f6e73756d65732074686174206973206e6f7420636f766572656420627920746865206465706f7369742e590120546869732064657465726d696e657320686f77206869676820746869732072656e74207061796d656e742069732070657220626c6f636b2061732061206672616374696f6e206f6620746865206465706f7369742e3c5375726368617267655265776172643042616c616e63654f663c543e40005cb2ec22000000000000000000000008e4205265776172642074686174206973207265636569766564206279207468652070617274792077686f736520746f75636820686173206c65646820746f2072656d6f76616c206f66206120636f6e74726163742e4844656c6574696f6e517565756544657074680c753332101a04000004f420546865206d6178696d756d206e756d626572206f6620747269657320746861742063616e2062652071756575656420666f722064656c6574696f6e2e4c44656c6574696f6e5765696768744c696d6974185765696768742000d0ed902e000000044d0120546865206d6178696d756d20616d6f756e74206f662077656967687420746861742063616e20626520636f6e73756d65642070657220626c6f636b20666f72206c617a7920747269652072656d6f76616c2e8858496e76616c69645363686564756c6556657273696f6e0405012041206e6577207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652063757272656e74206f6e652e54496e76616c6964537572636861726765436c61696d04550120416e206f726967696e206d757374206265207369676e6564206f7220696e686572656e7420616e6420617578696c696172792073656e646572206f6e6c792070726f7669646564206f6e20696e686572656e742e54496e76616c6964536f75726365436f6e747261637404dc2043616e6e6f7420726573746f72652066726f6d206e6f6e6578697374696e67206f7220746f6d6273746f6e6520636f6e74726163742e68496e76616c696444657374696e6174696f6e436f6e747261637404c42043616e6e6f7420726573746f726520746f206e6f6e6578697374696e67206f7220616c69766520636f6e74726163742e40496e76616c6964546f6d6273746f6e65046020546f6d6273746f6e657320646f6e2774206d617463682e54496e76616c6964436f6e74726163744f726967696e04bc20416e206f726967696e20547269654964207772697474656e20696e207468652063757272656e7420626c6f636b2e204f75744f6647617304bc2054686520657865637574656420636f6e7472616374206578686175737465642069747320676173206c696d69742e504f7574707574427566666572546f6f536d616c6c04050120546865206f75747075742062756666657220737570706c69656420746f206120636f6e7472616374204150492063616c6c2077617320746f6f20736d616c6c2e6442656c6f7753756273697374656e63655468726573686f6c6410210120506572666f726d696e672074686520726571756573746564207472616e7366657220776f756c6420686176652062726f756768742074686520636f6e74726163742062656c6f773d01207468652073756273697374656e6365207468726573686f6c642e204e6f207472616e7366657220697320616c6c6f77656420746f20646f207468697320696e206f7264657220746f20616c6c6f77450120666f72206120746f6d6273746f6e6520746f20626520637265617465642e2055736520607365616c5f7465726d696e6174656020746f2072656d6f7665206120636f6e747261637420776974686f757470206c656176696e67206120746f6d6273746f6e6520626568696e642e504e6577436f6e74726163744e6f7446756e64656408390120546865206e65776c79206372656174656420636f6e74726163742069732062656c6f77207468652073756273697374656e6365207468726573686f6c6420616674657220657865637574696e6721012069747320636f6e74727563746f722e204e6f20636f6e7472616374732061726520616c6c6f77656420746f2065786973742062656c6f772074686174207468726573686f6c642e385472616e736665724661696c65640c250120506572666f726d696e672074686520726571756573746564207472616e73666572206661696c656420666f72206120726561736f6e206f726967696e6174696e6720696e2074686531012063686f73656e2063757272656e637920696d706c656d656e746174696f6e206f66207468652072756e74696d652e204d6f73742070726f6261626c79207468652062616c616e63652069738c20746f6f206c6f77206f72206c6f636b732061726520706c61636564206f6e2069742e4c4d617843616c6c44657074685265616368656408250120506572666f726d696e6720612063616c6c207761732064656e6965642062656361757365207468652063616c6c696e67206465707468207265616368656420746865206c696d697498206f6620776861742069732073706563696669656420696e20746865207363686564756c652e40436f6e74726163744e6f74466f756e6404c0204e6f20636f6e74726163742077617320666f756e64206174207468652073706563696669656420616464726573732e4c436f6e74726163744973546f6d6273746f6e6510b0204120746f6d6273746f6e65206578697374206174207468652073706563696669656420616464726573732e00410120546f6d6273746f6e652063616e6e6f742062652063616c6c65642e20416e796f6e652063616e2075736520607365616c5f726573746f72655f746f6020696e206f7264657220746f20726576697665582074686520636f6e74726163742c2074686f7567682e2c52656e744e6f7450616964182501205468652063616c6c656420636f6e747261637420646f6573206e6f74206861766520656e6f7567682062616c616e636520746f2070617920666f72206974732073746f726167652e0039012054686520636f6e74726163742072616e206f7574206f662062616c616e636520616e64206973207468657265666f726520656c696769626c6520666f72206576696374696f6e20696e746f20612d0120746f6d6273746f6e652e20416e796f6e652063616e2065766963742074686520636f6e7472616374206279207375626d697474696e6720612060636c61696d5f737572636861726765602d012065787472696e7369632e20416c7465726e61746976656c792c206120706c61696e2062616c616e6365207472616e736665722063616e206265207573656420696e206f7264657220746ff420696e6372656173652074686520636f6e7472616374732066756e647320736f20746861742069742063616e2062652063616c6c656420616761696e2e30436f6465546f6f4c617267650841012054686520636f646520737570706c69656420746f2060696e7374616e74696174655f776974685f636f646560206578636565647320746865206c696d69742073706563696669656420696e20746865482063757272656e74207363686564756c652e30436f64654e6f74466f756e6404c8204e6f20636f646520636f756c6420626520666f756e642061742074686520737570706c69656420636f646520686173682e2c4f75744f66426f756e6473042901204120627566666572206f757473696465206f662073616e64626f78206d656d6f7279207761732070617373656420746f206120636f6e7472616374204150492066756e6374696f6e2e384465636f64696e674661696c6564042d0120496e7075742070617373656420746f206120636f6e7472616374204150492066756e6374696f6e206661696c656420746f206465636f646520617320657870656374656420747970652e3c436f6e747261637454726170706564048c20436f6e7472616374207472617070656420647572696e6720657865637574696f6e2e3456616c7565546f6f4c6172676504d0205468652073697a6520646566696e656420696e2060543a3a4d617856616c756553697a6560207761732065786365656465642e605465726d696e617465645768696c655265656e7472616e74081d01205465726d696e6174696f6e206f66206120636f6e7472616374206973206e6f7420616c6c6f776564207768696c652074686520636f6e747261637420697320616c72656164793501206f6e207468652063616c6c20737461636b2e2043616e2062652074726967676572656420627920607365616c5f7465726d696e61746560206f7220607365616c5f726573746f72655f746f2e38496e707574466f7277617264656404450120607365616c5f63616c6c6020666f72776172646564207468697320636f6e74726163747320696e7075742e204974207468657265666f7265206973206e6f206c6f6e67657220617661696c61626c652e5052616e646f6d5375626a656374546f6f4c6f6e6704dc20546865207375626a6563742070617373656420746f20607365616c5f72616e646f6d60206578636565647320746865206c696d69742e34546f6f4d616e79546f706963730421012054686520616d6f756e74206f6620746f706963732070617373656420746f20607365616c5f6465706f7369745f6576656e747360206578636565647320746865206c696d69742e3c4475706c6963617465546f706963730431012054686520746f706963732070617373656420746f20607365616c5f6465706f7369745f6576656e74736020636f6e7461696e73206174206c65617374206f6e65206475706c69636174652e404e6f436861696e457874656e73696f6e0c49012054686520636861696e20646f6573206e6f742070726f76696465206120636861696e20657874656e73696f6e2e2043616c6c696e672074686520636861696e20657874656e73696f6e20726573756c7473510120696e2074686973206572726f722e204e6f74652074686174207468697320757375616c6c79202073686f756c646e27742068617070656e206173206465706c6f79696e67207375636820636f6e747261637473342069732072656a65637465642e4444656c6574696f6e517565756546756c6c1405012052656d6f76616c206f66206120636f6e7472616374206661696c65642062656361757365207468652064656c6574696f6e2071756575652069732066756c6c2e00550120546869732063616e2068617070656e207768656e206569746865722063616c6c696e67205b6050616c6c65743a3a636c61696d5f737572636861726765605d206f7220607365616c5f7465726d696e617465602e5101205468652071756575652069732066696c6c65642062792064656c6574696e6720636f6e74726163747320616e6420656d7074696564206279206120666978656420616d6f756e74206561636820626c6f636b2e250120547279696e6720616761696e20647572696e6720616e6f7468657220626c6f636b20697320746865206f6e6c792077617920746f207265736f6c766520746869732069737375652e50436f6e74726163744e6f74457669637461626c65102d01204120636f6e747261637420636f756c64206e6f74206265206576696374656420626563617573652069742068617320656e6f7567682062616c616e636520746f207061792072656e742e00250120546869732063616e2062652072657475726e65642066726f6d205b6050616c6c65743a3a636c61696d5f737572636861726765605d20626563617573652074686520746172676574c420636f6e74726163742068617320656e6f7567682062616c616e636520746f2070617920666f72206974732072656e742e4053746f7261676545786861757374656410350120412073746f72616765206d6f64696669636174696f6e20657868617573746564207468652033326269742074797065207468617420686f6c6473207468652073746f726167652073697a652e00350120546869732063616e206569746865722068617070656e207768656e2074686520616363756d756c617465642073746f7261676520696e20627974657320697320746f6f206c61726765206f72ac207768656e206e756d626572206f662073746f72616765206974656d7320697320746f6f206c617267652e444475706c6963617465436f6e747261637404cc204120636f6e74726163742077697468207468652073616d65204163636f756e74496420616c7265616479206578697374732e5c5465726d696e61746564496e436f6e7374727563746f720cbc204120636f6e74726163742073656c66206465737472756374656420696e2069747320636f6e7374727563746f722e00290120546869732063616e2062652074726967676572656420627920612063616c6c20746f20607365616c5f7465726d696e61746560206f7220607365616c5f726573746f72655f746f602e5c44656275674d657373616765496e76616c69645554463804410120546865206465627567206d6573736167652073706563696669656420746f20607365616c5f64656275675f6d6573736167656020646f657320636f6e7461696e20696e76616c6964205554462d382e405265656e7472616e636544656e69656404110120412063616c6c20747269656420746f20696e766f6b65206120636f6e7472616374207468617420697320666c6167676564206173206e6f6e2d7265656e7472616e742e12105375646f01105375646f040c4b6579010030543a3a4163636f756e74496480000000000000000000000000000000000000000000000000000000000000000004842054686520604163636f756e74496460206f6620746865207375646f206b65792e0110107375646f041063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e547375646f5f756e636865636b65645f776569676874081063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e1c5f776569676874185765696768742839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e310120546869732066756e6374696f6e20646f6573206e6f7420636865636b2074686520776569676874206f66207468652063616c6c2c20616e6420696e737465616420616c6c6f777320746865b4205375646f207573657220746f20737065636966792074686520776569676874206f66207468652063616c6c2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292ed0202d2054686520776569676874206f6620746869732063616c6c20697320646566696e6564206279207468652063616c6c65722e302023203c2f7765696768743e1c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652475012041757468656e74696361746573207468652063757272656e74207375646f206b657920616e6420736574732074686520676976656e204163636f756e7449642028606e6577602920617320746865206e6577207375646f206b65792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e1c7375646f5f6173080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2c51012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c207769746820605369676e656460206f726967696e2066726f6d44206120676976656e206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e010c14537564696404384469737061746368526573756c74048c2041207375646f206a75737420746f6f6b20706c6163652e205c5b726573756c745c5d284b65794368616e67656404244163636f756e74496404010120546865205c5b7375646f65725c5d206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e285375646f4173446f6e6504384469737061746368526573756c74048c2041207375646f206a75737420746f6f6b20706c6163652e205c5b726573756c745c5d00042c526571756972655375646f04802053656e646572206d75737420626520746865205375646f206163636f756e741320496d4f6e6c696e650120496d4f6e6c696e6510384865617274626561744166746572010038543a3a426c6f636b4e756d62657210000000002c1d012054686520626c6f636b206e756d6265722061667465722077686963682069742773206f6b20746f2073656e64206865617274626561747320696e207468652063757272656e74242073657373696f6e2e0025012041742074686520626567696e6e696e67206f6620656163682073657373696f6e20776520736574207468697320746f20612076616c756520746861742073686f756c642066616c6c350120726f7567686c7920696e20746865206d6964646c65206f66207468652073657373696f6e206475726174696f6e2e20546865206964656120697320746f206669727374207761697420666f721901207468652076616c696461746f727320746f2070726f64756365206120626c6f636b20696e207468652063757272656e742073657373696f6e2c20736f207468617420746865a820686561727462656174206c61746572206f6e2077696c6c206e6f74206265206e65636573736172792e00390120546869732076616c75652077696c6c206f6e6c79206265207573656420617320612066616c6c6261636b206966207765206661696c20746f2067657420612070726f7065722073657373696f6e2d012070726f677265737320657374696d6174652066726f6d20604e65787453657373696f6e526f746174696f6e602c2061732074686f736520657374696d617465732073686f756c642062650101206d6f7265206163637572617465207468656e207468652076616c75652077652063616c63756c61746520666f7220604865617274626561744166746572602e104b65797301004c5665633c543a3a417574686f7269747949643e040004d0205468652063757272656e7420736574206f66206b6579732074686174206d61792069737375652061206865617274626561742e485265636569766564486561727462656174730002053053657373696f6e496e6465782441757468496e6465781c5665633c75383e05040008f020466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206041757468496e6465786020746f8020606f6666636861696e3a3a4f70617175654e6574776f726b5374617465602e38417574686f726564426c6f636b730102053053657373696f6e496e6465783856616c696461746f7249643c543e0c75333205100000000008150120466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206056616c696461746f7249643c543e6020746f20746865c8206e756d626572206f6620626c6f636b7320617574686f7265642062792074686520676976656e20617574686f726974792e0104246865617274626561740824686561727462656174644865617274626561743c543a3a426c6f636b4e756d6265723e285f7369676e6174757265bc3c543a3a417574686f7269747949642061732052756e74696d654170705075626c69633e3a3a5369676e6174757265242c2023203c7765696768743e4101202d20436f6d706c65786974793a20604f284b202b20452960207768657265204b206973206c656e677468206f6620604b6579736020286865617274626561742e76616c696461746f72735f6c656e290101202020616e642045206973206c656e677468206f6620606865617274626561742e6e6574776f726b5f73746174652e65787465726e616c5f61646472657373608c2020202d20604f284b29603a206465636f64696e67206f66206c656e67746820604b60b02020202d20604f284529603a206465636f64696e672f656e636f64696e67206f66206c656e677468206045603d01202d20446252656164733a2070616c6c65745f73657373696f6e206056616c696461746f7273602c2070616c6c65745f73657373696f6e206043757272656e74496e646578602c20604b657973602c5c202020605265636569766564486561727462656174736084202d2044625772697465733a206052656365697665644865617274626561747360302023203c2f7765696768743e010c444865617274626561745265636569766564042c417574686f7269747949640405012041206e657720686561727462656174207761732072656365697665642066726f6d2060417574686f72697479496460205c5b617574686f726974795f69645c5d1c416c6c476f6f640004d42041742074686520656e64206f66207468652073657373696f6e2c206e6f206f6666656e63652077617320636f6d6d69747465642e2c536f6d654f66666c696e6504605665633c4964656e74696669636174696f6e5475706c653e043d012041742074686520656e64206f66207468652073657373696f6e2c206174206c65617374206f6e652076616c696461746f722077617320666f756e6420746f206265205c5b6f66666c696e655c5d2e000828496e76616c69644b65790464204e6f6e206578697374656e74207075626c6963206b65792e4c4475706c6963617465644865617274626561740458204475706c696361746564206865617274626561742e1448417574686f72697479446973636f76657279000000000015204f6666656e63657301204f6666656e6365730c1c5265706f727473000105345265706f727449644f663c543ed04f6666656e636544657461696c733c543a3a4163636f756e7449642c20543a3a4964656e74696669636174696f6e5475706c653e00040004490120546865207072696d61727920737472756374757265207468617420686f6c647320616c6c206f6666656e6365207265636f726473206b65796564206279207265706f7274206964656e746966696572732e58436f6e63757272656e745265706f727473496e646578010205104b696e64384f706171756554696d65536c6f74485665633c5265706f727449644f663c543e3e050400042901204120766563746f72206f66207265706f727473206f66207468652073616d65206b696e6420746861742068617070656e6564206174207468652073616d652074696d6520736c6f742e485265706f72747342794b696e64496e646578010105104b696e641c5665633c75383e00040018110120456e756d65726174657320616c6c207265706f727473206f662061206b696e6420616c6f6e672077697468207468652074696d6520746865792068617070656e65642e00bc20416c6c207265706f7274732061726520736f72746564206279207468652074696d65206f66206f6666656e63652e004901204e6f74652074686174207468652061637475616c2074797065206f662074686973206d617070696e6720697320605665633c75383e602c207468697320697320626563617573652076616c756573206f66690120646966666572656e7420747970657320617265206e6f7420737570706f7274656420617420746865206d6f6d656e7420736f2077652061726520646f696e6720746865206d616e75616c2073657269616c697a6174696f6e2e0001041c4f6666656e636508104b696e64384f706171756554696d65536c6f740c550120546865726520697320616e206f6666656e6365207265706f72746564206f662074686520676976656e20606b696e64602068617070656e656420617420746865206073657373696f6e5f696e6465786020616e64390120286b696e642d7370656369666963292074696d6520736c6f742e2054686973206576656e74206973206e6f74206465706f736974656420666f72206475706c696361746520736c61736865732e50205c5b6b696e642c2074696d65736c6f745c5d2e00001628486973746f726963616c0000000000176052616e646f6d6e657373436f6c6c656374697665466c6970016052616e646f6d6e657373436f6c6c656374697665466c6970043852616e646f6d4d6174657269616c0100305665633c543a3a486173683e04000c610120536572696573206f6620626c6f636b20686561646572732066726f6d20746865206c61737420383120626c6f636b73207468617420616374732061732072616e646f6d2073656564206d6174657269616c2e2054686973610120697320617272616e67656420617320612072696e672062756666657220776974682060626c6f636b5f6e756d626572202520383160206265696e672074686520696e64657820696e746f20746865206056656360206f664420746865206f6c6465737420686173682e0000000018204964656e7469747901204964656e7469747910284964656e746974794f6600010530543a3a4163636f756e74496468526567697374726174696f6e3c42616c616e63654f663c543e3e0004000c210120496e666f726d6174696f6e20746861742069732070657274696e656e7420746f206964656e746966792074686520656e7469747920626568696e6420616e206163636f756e742e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e1c53757065724f6600010230543a3a4163636f756e7449645028543a3a4163636f756e7449642c204461746129000400086101205468652073757065722d6964656e74697479206f6620616e20616c7465726e6174697665202273756222206964656e7469747920746f676574686572207769746820697473206e616d652c2077697468696e2074686174510120636f6e746578742e20496620746865206163636f756e74206973206e6f7420736f6d65206f74686572206163636f756e742773207375622d6964656e746974792c207468656e206a75737420604e6f6e65602e18537562734f6601010530543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e290044000000000000000000000000000000000014b820416c7465726e6174697665202273756222206964656e746974696573206f662074686973206163636f756e742e001d0120546865206669727374206974656d20697320746865206465706f7369742c20746865207365636f6e64206973206120766563746f72206f6620746865206163636f756e74732e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e28526567697374726172730100d85665633c4f7074696f6e3c526567697374726172496e666f3c42616c616e63654f663c543e2c20543a3a4163636f756e7449643e3e3e0400104d012054686520736574206f6620726567697374726172732e204e6f7420657870656374656420746f206765742076657279206269672061732063616e206f6e6c79206265206164646564207468726f7567682061a8207370656369616c206f726967696e20286c696b656c79206120636f756e63696c206d6f74696f6e292e0029012054686520696e64657820696e746f20746869732063616e206265206361737420746f2060526567697374726172496e6465786020746f2067657420612076616c69642076616c75652e013c346164645f726567697374726172041c6163636f756e7430543a3a4163636f756e744964347c2041646420612072656769737472617220746f207468652073797374656d2e00010120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060543a3a5265676973747261724f726967696e602e00ac202d20606163636f756e74603a20746865206163636f756e74206f6620746865207265676973747261722e009820456d6974732060526567697374726172416464656460206966207375636365737366756c2e002c2023203c7765696768743e2901202d20604f2852296020776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e64656420616e6420636f64652d626f756e646564292e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e307365745f6964656e746974790410696e666f304964656e74697479496e666f4c2d012053657420616e206163636f756e742773206964656e7469747920696e666f726d6174696f6e20616e6420726573657276652074686520617070726f707269617465206465706f7369742e00590120496620746865206163636f756e7420616c726561647920686173206964656e7469747920696e666f726d6174696f6e2c20746865206465706f7369742069732074616b656e2061732070617274207061796d656e745420666f7220746865206e6577206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0090202d2060696e666f603a20546865206964656e7469747920696e666f726d6174696f6e2e008c20456d69747320604964656e7469747953657460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2858202b205827202b2052296021012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e64656429e42020202d20776865726520605260206a756467656d656e74732d636f756e7420287265676973747261722d636f756e742d626f756e6465642984202d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e2501202d204f6e652073746f72616765206d75746174696f6e2028636f6465632d7265616420604f285827202b205229602c20636f6465632d777269746520604f2858202b20522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e207365745f73756273041073756273645665633c28543a3a4163636f756e7449642c2044617461293e54902053657420746865207375622d6163636f756e7473206f66207468652073656e6465722e005901205061796d656e743a20416e79206167677265676174652062616c616e63652072657365727665642062792070726576696f757320607365745f73756273602063616c6c732077696c6c2062652072657475726e6564310120616e6420616e20616d6f756e7420605375624163636f756e744465706f736974602077696c6c20626520726573657276656420666f722065616368206974656d20696e206073756273602e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e00b4202d206073756273603a20546865206964656e74697479277320286e657729207375622d6163636f756e74732e002c2023203c7765696768743e34202d20604f2850202b20532960e82020202d20776865726520605060206f6c642d737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e88202d204174206d6f7374206f6e652062616c616e6365206f7065726174696f6e732e18202d2044423ae02020202d206050202b2053602073746f72616765206d75746174696f6e732028636f64656320636f6d706c657869747920604f2831296029c02020202d204f6e652073746f7261676520726561642028636f64656320636f6d706c657869747920604f28502960292ec42020202d204f6e652073746f726167652077726974652028636f64656320636f6d706c657869747920604f28532960292ed42020202d204f6e652073746f726167652d6578697374732028604964656e746974794f663a3a636f6e7461696e735f6b657960292e302023203c2f7765696768743e38636c6561725f6964656e7469747900483d0120436c65617220616e206163636f756e742773206964656e7469747920696e666f20616e6420616c6c207375622d6163636f756e747320616e642072657475726e20616c6c206465706f736974732e00f0205061796d656e743a20416c6c2072657365727665642062616c616e636573206f6e20746865206163636f756e74206172652072657475726e65642e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e009c20456d69747320604964656e74697479436c656172656460206966207375636365737366756c2e002c2023203c7765696768743e44202d20604f2852202b2053202b20582960d02020202d20776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e25012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e646564292e8c202d204f6e652062616c616e63652d756e72657365727665206f7065726174696f6e2ecc202d206032602073746f7261676520726561647320616e64206053202b2032602073746f726167652064656c6574696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e44726571756573745f6a756467656d656e7408247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e1c6d61785f66656554436f6d706163743c42616c616e63654f663c543e3e5c9820526571756573742061206a756467656d656e742066726f6d2061207265676973747261722e005901205061796d656e743a204174206d6f737420606d61785f666565602077696c6c20626520726573657276656420666f72207061796d656e7420746f2074686520726567697374726172206966206a756467656d656e741c20676976656e2e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e002101202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973207265717565737465642e5901202d20606d61785f666565603a20546865206d6178696d756d206665652074686174206d617920626520706169642e20546869732073686f756c64206a757374206265206175746f2d706f70756c617465642061733a0034206060606e6f636f6d70696c65bc2053656c663a3a7265676973747261727328292e676574287265675f696e646578292e756e7772617028292e666565102060606000a820456d69747320604a756467656d656e7452657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2858202b205229602e34202d204f6e65206576656e742e302023203c2f7765696768743e3863616e63656c5f7265717565737404247265675f696e64657838526567697374726172496e646578446c2043616e63656c20612070726576696f757320726571756573742e00fc205061796d656e743a20412070726576696f75736c79207265736572766564206465706f7369742069732072657475726e6564206f6e20737563636573732e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e004901202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206e6f206c6f6e676572207265717565737465642e00b020456d69747320604a756467656d656e74556e72657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e8c202d204f6e652073746f72616765206d75746174696f6e20604f2852202b205829602e30202d204f6e65206576656e74302023203c2f7765696768743e1c7365745f6665650814696e6465785c436f6d706163743c526567697374726172496e6465783e0c66656554436f6d706163743c42616c616e63654f663c543e3e341d0120536574207468652066656520726571756972656420666f722061206a756467656d656e7420746f206265207265717565737465642066726f6d2061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e58202d2060666565603a20746865206e6577206665652e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e333135202b2052202a20302e33323920c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e387365745f6163636f756e745f69640814696e6465785c436f6d706163743c526567697374726172496e6465783e0c6e657730543a3a4163636f756e74496434c0204368616e676520746865206163636f756e74206173736f63696174656420776974682061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e74202d20606e6577603a20746865206e6577206163636f756e742049442e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee4202d2042656e63686d61726b3a20382e383233202b2052202a20302e333220c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e287365745f6669656c64730814696e6465785c436f6d706163743c526567697374726172496e6465783e186669656c6473384964656e746974794669656c647334ac2053657420746865206669656c6420696e666f726d6174696f6e20666f722061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e1101202d20606669656c6473603a20746865206669656c64732074686174207468652072656769737472617220636f6e6365726e73207468656d73656c76657320776974682e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e343634202b2052202a20302e33323520c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e4470726f766964655f6a756467656d656e740c247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365246a756467656d656e745c4a756467656d656e743c42616c616e63654f663c543e3e4cbc2050726f766964652061206a756467656d656e7420666f7220616e206163636f756e742773206964656e746974792e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74b4206f6620746865207265676973747261722077686f736520696e64657820697320607265675f696e646578602e002501202d20607265675f696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206265696e67206d6164652e5901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e4d01202d20606a756467656d656e74603a20746865206a756467656d656e74206f662074686520726567697374726172206f6620696e64657820607265675f696e646578602061626f75742060746172676574602e009820456d69747320604a756467656d656e74476976656e60206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e88202d204f6e652062616c616e63652d7472616e73666572206f7065726174696f6e2e98202d20557020746f206f6e65206163636f756e742d6c6f6f6b7570206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2852202b205829602e34202d204f6e65206576656e742e302023203c2f7765696768743e346b696c6c5f6964656e7469747904187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654c45012052656d6f766520616e206163636f756e742773206964656e7469747920616e64207375622d6163636f756e7420696e666f726d6174696f6e20616e6420736c61736820746865206465706f736974732e006501205061796d656e743a2052657365727665642062616c616e6365732066726f6d20607365745f737562736020616e6420607365745f6964656e74697479602061726520736c617368656420616e642068616e646c656420627949012060536c617368602e20566572696669636174696f6e2072657175657374206465706f7369747320617265206e6f742072657475726e65643b20746865792073686f756c642062652063616e63656c6c656484206d616e75616c6c79207573696e67206063616e63656c5f72657175657374602e00fc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206d617463682060543a3a466f7263654f726967696e602e005901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e009820456d69747320604964656e746974794b696c6c656460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2852202b2053202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e74202d206053202b2032602073746f72616765206d75746174696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e1c6164645f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365106461746110446174611cb0204164642074686520676976656e206163636f756e7420746f207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656e616d655f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651064617461104461746110d020416c74657220746865206173736f636961746564206e616d65206f662074686520676976656e207375622d6163636f756e742e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656d6f76655f737562040c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651cc42052656d6f76652074686520676976656e206163636f756e742066726f6d207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e20717569745f7375620028902052656d6f7665207468652073656e6465722061732061207375622d6163636f756e742e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c206265207265706174726961746564b820746f207468652073656e64657220282a6e6f742a20746865206f726967696e616c206465706f7369746f72292e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206861766520612072656769737465726564402073757065722d6964656e746974792e004901204e4f54453a20546869732073686f756c64206e6f74206e6f726d616c6c7920626520757365642c206275742069732070726f766964656420696e207468652063617365207468617420746865206e6f6e2d150120636f6e74726f6c6c6572206f6620616e206163636f756e74206973206d616c6963696f75736c7920726567697374657265642061732061207375622d6163636f756e742e01282c4964656e7469747953657404244163636f756e7449640411012041206e616d652077617320736574206f72207265736574202877686963682077696c6c2072656d6f766520616c6c206a756467656d656e7473292e205c5b77686f5c5d3c4964656e74697479436c656172656408244163636f756e7449641c42616c616e63650415012041206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e205c5b77686f2c206465706f7369745c5d384964656e746974794b696c6c656408244163636f756e7449641c42616c616e6365040d012041206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e205c5b77686f2c206465706f7369745c5d484a756467656d656e7452657175657374656408244163636f756e74496438526567697374726172496e6465780405012041206a756467656d656e74207761732061736b65642066726f6d2061207265676973747261722e205c5b77686f2c207265676973747261725f696e6465785c5d504a756467656d656e74556e72657175657374656408244163636f756e74496438526567697374726172496e64657804f02041206a756467656d656e74207265717565737420776173207265747261637465642e205c5b77686f2c207265676973747261725f696e6465785c5d384a756467656d656e74476976656e08244163636f756e74496438526567697374726172496e6465780409012041206a756467656d656e742077617320676976656e2062792061207265676973747261722e205c5b7461726765742c207265676973747261725f696e6465785c5d3852656769737472617241646465640438526567697374726172496e64657804ac204120726567697374726172207761732061646465642e205c5b7265676973747261725f696e6465785c5d405375624964656e7469747941646465640c244163636f756e744964244163636f756e7449641c42616c616e63650455012041207375622d6964656e746974792077617320616464656420746f20616e206964656e7469747920616e6420746865206465706f73697420706169642e205c5b7375622c206d61696e2c206465706f7369745c5d485375624964656e7469747952656d6f7665640c244163636f756e744964244163636f756e7449641c42616c616e6365080d012041207375622d6964656e74697479207761732072656d6f7665642066726f6d20616e206964656e7469747920616e6420746865206465706f7369742066726565642e5c205c5b7375622c206d61696e2c206465706f7369745c5d485375624964656e746974795265766f6b65640c244163636f756e744964244163636f756e7449641c42616c616e6365081d012041207375622d6964656e746974792077617320636c65617265642c20616e642074686520676976656e206465706f7369742072657061747269617465642066726f6d207468652901206d61696e206964656e74697479206163636f756e7420746f20746865207375622d6964656e74697479206163636f756e742e205c5b7375622c206d61696e2c206465706f7369745c5d183042617369634465706f7369743042616c616e63654f663c543e400080c6a47e8d0300000000000000000004d42054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564206964656e74697479304669656c644465706f7369743042616c616e63654f663c543e4000a031a95fe300000000000000000000042d012054686520616d6f756e742068656c64206f6e206465706f73697420706572206164646974696f6e616c206669656c6420666f7220612072656769737465726564206964656e746974792e445375624163636f756e744465706f7369743042616c616e63654f663c543e400080f420e6b5000000000000000000000c65012054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564207375626163636f756e742e20546869732073686f756c64206163636f756e7420666f7220746865206661637471012074686174206f6e652073746f72616765206974656d27732076616c75652077696c6c20696e637265617365206279207468652073697a65206f6620616e206163636f756e742049442c20616e642074686572652077696c6c206265290120616e6f746865722074726965206974656d2077686f73652076616c7565206973207468652073697a65206f6620616e206163636f756e7420494420706c75732033322062797465732e384d61785375624163636f756e74730c7533321064000000040d0120546865206d6178696d756d206e756d626572206f66207375622d6163636f756e747320616c6c6f77656420706572206964656e746966696564206163636f756e742e4c4d61784164646974696f6e616c4669656c64730c7533321064000000086501204d6178696d756d206e756d626572206f66206164646974696f6e616c206669656c64732074686174206d61792062652073746f72656420696e20616e2049442e204e656564656420746f20626f756e642074686520492f4fe020726571756972656420746f2061636365737320616e206964656e746974792c206275742063616e2062652070726574747920686967682e344d6178526567697374726172730c7533321014000000085101204d61786d696d756d206e756d626572206f66207265676973747261727320616c6c6f77656420696e207468652073797374656d2e204e656564656420746f20626f756e642074686520636f6d706c65786974797c206f662c20652e672e2c207570646174696e67206a756467656d656e74732e4048546f6f4d616e795375624163636f756e7473046020546f6f206d616e7920737562732d6163636f756e74732e204e6f74466f756e640454204163636f756e742069736e277420666f756e642e204e6f744e616d65640454204163636f756e742069736e2774206e616d65642e28456d707479496e646578043420456d70747920696e6465782e284665654368616e676564044020466565206973206368616e6765642e284e6f4964656e74697479044c204e6f206964656e7469747920666f756e642e3c537469636b794a756467656d656e74044820537469636b79206a756467656d656e742e384a756467656d656e74476976656e0444204a756467656d656e7420676976656e2e40496e76616c69644a756467656d656e74044c20496e76616c6964206a756467656d656e742e30496e76616c6964496e64657804582054686520696e64657820697320696e76616c69642e34496e76616c6964546172676574045c205468652074617267657420697320696e76616c69642e34546f6f4d616e794669656c6473047020546f6f206d616e79206164646974696f6e616c206669656c64732e44546f6f4d616e795265676973747261727304ec204d6178696d756d20616d6f756e74206f66207265676973747261727320726561636865642e2043616e6e6f742061646420616e79206d6f72652e38416c7265616479436c61696d65640474204163636f756e7420494420697320616c7265616479206e616d65642e184e6f7453756204742053656e646572206973206e6f742061207375622d6163636f756e742e204e6f744f776e6564048c205375622d6163636f756e742069736e2774206f776e65642062792073656e6465722e191c536f6369657479011c536f6369657479401c466f756e646572000030543a3a4163636f756e7449640400044820546865206669727374206d656d6265722e1452756c657300001c543a3a48617368040008510120412068617368206f66207468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e2043616e206f6e6c7920626520736574206f6e636520616e6454206f6e6c792062792074686520666f756e6465722e2843616e6469646174657301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e0400043901205468652063757272656e7420736574206f662063616e646964617465733b206269646465727320746861742061726520617474656d7074696e6720746f206265636f6d65206d656d626572732e4c53757370656e64656443616e6469646174657300010530543a3a4163636f756e744964e42842616c616e63654f663c542c20493e2c204269644b696e643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e2900040004842054686520736574206f662073757370656e6465642063616e646964617465732e0c506f7401003c42616c616e63654f663c542c20493e400000000000000000000000000000000004410120416d6f756e74206f66206f7572206163636f756e742062616c616e63652074686174206973207370656369666963616c6c7920666f7220746865206e65787420726f756e642773206269642873292e1048656164000030543a3a4163636f756e744964040004e820546865206d6f7374207072696d6172792066726f6d20746865206d6f737420726563656e746c7920617070726f766564206d656d626572732e1c4d656d626572730100445665633c543a3a4163636f756e7449643e04000494205468652063757272656e7420736574206f66206d656d626572732c206f7264657265642e4053757370656e6465644d656d6265727301010530543a3a4163636f756e74496410626f6f6c00040004782054686520736574206f662073757370656e646564206d656d626572732e104269647301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e040004e8205468652063757272656e7420626964732c2073746f726564206f726465726564206279207468652076616c7565206f6620746865206269642e20566f756368696e6700010530543a3a4163636f756e74496438566f756368696e6753746174757300040004e4204d656d626572732063757272656e746c7920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e1c5061796f75747301010530543a3a4163636f756e744964985665633c28543a3a426c6f636b4e756d6265722c2042616c616e63654f663c542c20493e293e000400044d012050656e64696e67207061796f7574733b206f72646572656420627920626c6f636b206e756d6265722c20776974682074686520616d6f756e7420746861742073686f756c642062652070616964206f75742e1c537472696b657301010530543a3a4163636f756e7449642c537472696b65436f756e7400100000000004dc20546865206f6e676f696e67206e756d626572206f66206c6f73696e6720766f746573206361737420627920746865206d656d6265722e14566f74657300020530543a3a4163636f756e74496430543a3a4163636f756e74496410566f746505040004d020446f75626c65206d61702066726f6d2043616e646964617465202d3e20566f746572202d3e20284d617962652920566f74652e20446566656e646572000030543a3a4163636f756e744964040004c42054686520646566656e64696e67206d656d6265722063757272656e746c79206265696e67206368616c6c656e6765642e34446566656e646572566f74657300010530543a3a4163636f756e74496410566f7465000400046020566f74657320666f722074686520646566656e6465722e284d61784d656d6265727301000c753332100000000004dc20546865206d6178206e756d626572206f66206d656d6265727320666f722074686520736f6369657479206174206f6e652074696d652e01300c626964041476616c75653c42616c616e63654f663c542c20493e84e020412075736572206f757473696465206f662074686520736f63696574792063616e206d616b6520612062696420666f7220656e7472792e003901205061796d656e743a206043616e6469646174654465706f736974602077696c6c20626520726573657276656420666f72206d616b696e672061206269642e2049742069732072657475726e6564f0207768656e2074686520626964206265636f6d65732061206d656d6265722c206f7220696620746865206269642063616c6c732060756e626964602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a5901202d206076616c7565603a2041206f6e652074696d65207061796d656e74207468652062696420776f756c64206c696b6520746f2072656365697665207768656e206a6f696e696e672074686520736f63696574792e002c2023203c7765696768743e5501204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520726573657276652944202d2053746f726167652052656164733aec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f284329c820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d2948202d2053746f72616765205772697465733a810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3a2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6820092d204f6e65206576656e7420666f72206e6577206269642efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e14756e626964040c706f730c7533324cd82041206269646465722063616e2072656d6f76652074686569722062696420666f7220656e74727920696e746f20736f63696574792e010120427920646f696e6720736f2c20746865792077696c6c20686176652074686569722063616e646964617465206465706f7369742072657475726e6564206f728420746865792077696c6c20756e766f75636820746865697220766f75636865722e00fc205061796d656e743a2054686520626964206465706f73697420697320756e7265736572766564206966207468652075736572206d6164652061206269642e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206269646465722e003020506172616d65746572733a1901202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2077616e747320746f20756e6269642e002c2023203c7765696768743eb0204b65793a204220286c656e206f662062696473292c2058202862616c616e636520756e72657365727665290d01202d204f6e652073746f72616765207265616420616e6420777269746520746f20726574726965766520616e64207570646174652074686520626964732e204f2842294501202d20456974686572206f6e6520756e726573657276652062616c616e636520616374696f6e204f285829206f72206f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2842202b205829302023203c2f7765696768743e14766f7563680c0c77686f30543a3a4163636f756e7449641476616c75653c42616c616e63654f663c542c20493e0c7469703c42616c616e63654f663c542c20493eb045012041732061206d656d6265722c20766f75636820666f7220736f6d656f6e6520746f206a6f696e20736f636965747920627920706c6163696e67206120626964206f6e20746865697220626568616c662e005501205468657265206973206e6f206465706f73697420726571756972656420746f20766f75636820666f722061206e6577206269642c206275742061206d656d6265722063616e206f6e6c7920766f75636820666f725d01206f6e652062696420617420612074696d652e2049662074686520626964206265636f6d657320612073757370656e6465642063616e64696461746520616e6420756c74696d6174656c792072656a65637465642062794101207468652073757370656e73696f6e206a756467656d656e74206f726967696e2c20746865206d656d6265722077696c6c2062652062616e6e65642066726f6d20766f756368696e6720616761696e2e005901204173206120766f756368696e67206d656d6265722c20796f752063616e20636c61696d206120746970206966207468652063616e6469646174652069732061636365707465642e2054686973207469702077696c6c51012062652070616964206173206120706f7274696f6e206f66207468652072657761726420746865206d656d6265722077696c6c207265636569766520666f72206a6f696e696e672074686520736f63696574792e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733acc202d206077686f603a2054686520757365722077686f20796f7520776f756c64206c696b6520746f20766f75636820666f722e5101202d206076616c7565603a2054686520746f74616c2072657761726420746f2062652070616964206265747765656e20796f7520616e64207468652063616e6469646174652069662074686579206265636f6d65642061206d656d62657220696e2074686520736f63696574792e4901202d2060746970603a20596f757220637574206f662074686520746f74616c206076616c756560207061796f7574207768656e207468652063616e64696461746520697320696e64756374656420696e746f15012074686520736f63696574792e2054697073206c6172676572207468616e206076616c7565602077696c6c206265207361747572617465642075706f6e207061796f75742e002c2023203c7765696768743e0101204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d626572732944202d2053746f726167652052656164733ac820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d29090120092d204f6e652073746f72616765207265616420746f20636865636b206d656d626572206973206e6f7420616c726561647920766f756368696e672e204f283129ec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f28432948202d2053746f72616765205772697465733a0d0120092d204f6e652073746f7261676520777269746520746f20696e7365727420766f756368696e672073746174757320746f20746865206d656d6265722e204f283129810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3ac020092d204f286c6f67204d292073656172636820746f20636865636b2073656e6465722069732061206d656d6265722e2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6020092d204f6e65206576656e7420666f7220766f7563682efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e1c756e766f756368040c706f730c753332442d01204173206120766f756368696e67206d656d6265722c20756e766f7563682061206269642e2054686973206f6e6c7920776f726b73207768696c6520766f7563686564207573657220697394206f6e6c792061206269646465722028616e64206e6f7420612063616e646964617465292e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206120766f756368696e67206d656d6265722e003020506172616d65746572733a2d01202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2073686f756c6420626520756e766f75636865642e002c2023203c7765696768743e54204b65793a204220286c656e206f662062696473290901202d204f6e652073746f726167652072656164204f28312920746f20636865636b20746865207369676e6572206973206120766f756368696e67206d656d6265722eec202d204f6e652073746f72616765206d757461746520746f20726574726965766520616e64207570646174652074686520626964732e204f28422994202d204f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f284229302023203c2f7765696768743e10766f7465082463616e6469646174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c617070726f766510626f6f6c4c882041732061206d656d6265722c20766f7465206f6e20612063616e6469646174652e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733a0d01202d206063616e646964617465603a205468652063616e646964617465207468617420746865206d656d62657220776f756c64206c696b6520746f20626964206f6e2ef4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265d82020202020202020202020202020617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743ebc204b65793a204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722e58202d204f6e65206163636f756e74206c6f6f6b75702e2d01202d204f6e652073746f726167652072656164204f28432920616e64204f2843292073656172636820746f20636865636b2074686174207573657220697320612063616e6469646174652ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204329302023203c2f7765696768743e34646566656e6465725f766f7465041c617070726f766510626f6f6c408c2041732061206d656d6265722c20766f7465206f6e2074686520646566656e6465722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733af4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265a420617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743e68202d204b65793a204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e007820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d29302023203c2f7765696768743e187061796f757400504501205472616e7366657220746865206669727374206d617475726564207061796f757420666f72207468652073656e64657220616e642072656d6f76652069742066726f6d20746865207265636f7264732e006901204e4f54453a20546869732065787472696e736963206e6565647320746f2062652063616c6c6564206d756c7469706c652074696d657320746f20636c61696d206d756c7469706c65206d617475726564207061796f7574732e002101205061796d656e743a20546865206d656d6265722077696c6c20726563656976652061207061796d656e7420657175616c20746f207468656972206669727374206d61747572656478207061796f757420746f20746865697220667265652062616c616e63652e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d62657220776974684c207061796f7574732072656d61696e696e672e002c2023203c7765696768743e1d01204b65793a204d20286c656e206f66206d656d62657273292c205020286e756d626572206f66207061796f75747320666f72206120706172746963756c6172206d656d626572292501202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b207369676e65722069732061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28502920746f2067657420616c6c207061796f75747320666f722061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28312920746f20676574207468652063757272656e7420626c6f636b206e756d6265722e8c202d204f6e652063757272656e6379207472616e736665722063616c6c2e204f2858291101202d204f6e652073746f72616765207772697465206f722072656d6f76616c20746f2075706461746520746865206d656d6265722773207061796f7574732e204f285029009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2050202b205829302023203c2f7765696768743e14666f756e640c1c666f756e64657230543a3a4163636f756e7449642c6d61785f6d656d626572730c7533321472756c65731c5665633c75383e4c4c20466f756e642074686520736f63696574792e00f0205468697320697320646f6e65206173206120646973637265746520616374696f6e20696e206f7264657220746f20616c6c6f7720666f72207468651901206d6f64756c6520746f20626520696e636c7564656420696e746f20612072756e6e696e6720636861696e20616e642063616e206f6e6c7920626520646f6e65206f6e63652e001d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f466f756e6465725365744f726967696e5f2e003020506172616d65746572733a1901202d2060666f756e64657260202d20546865206669727374206d656d62657220616e642068656164206f6620746865206e65776c7920666f756e64656420736f63696574792e1501202d20606d61785f6d656d6265727360202d2054686520696e697469616c206d6178206e756d626572206f66206d656d6265727320666f722074686520736f63696574792ef4202d206072756c657360202d205468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e002c2023203c7765696768743ee0202d2054776f2073746f72616765206d75746174657320746f207365742060486561646020616e642060466f756e646572602e204f283129f4202d204f6e652073746f7261676520777269746520746f2061646420746865206669727374206d656d62657220746f20736f63696574792e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e1c756e666f756e6400348c20416e6e756c2074686520666f756e64696e67206f662074686520736f63696574792e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205369676e65642c20616e6420746865207369676e696e67206163636f756e74206d75737420626520626f74685901207468652060466f756e6465726020616e6420746865206048656164602e205468697320696d706c6965732074686174206974206d6179206f6e6c7920626520646f6e65207768656e207468657265206973206f6e6520206d656d6265722e002c2023203c7765696768743e68202d2054776f2073746f72616765207265616473204f2831292e78202d20466f75722073746f726167652072656d6f76616c73204f2831292e34202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e586a756467655f73757370656e6465645f6d656d626572080c77686f30543a3a4163636f756e7449641c666f726769766510626f6f6c6c2d0120416c6c6f772073757370656e73696f6e206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e646564206d656d6265722e00590120496620612073757370656e646564206d656d62657220697320666f72676976656e2c2077652073696d706c7920616464207468656d206261636b2061732061206d656d6265722c206e6f7420616666656374696e67cc20616e79206f6620746865206578697374696e672073746f72616765206974656d7320666f722074686174206d656d6265722e00490120496620612073757370656e646564206d656d6265722069732072656a65637465642c2072656d6f766520616c6c206173736f6369617465642073746f72616765206974656d732c20696e636c7564696e670101207468656972207061796f7574732c20616e642072656d6f766520616e7920766f7563686564206269647320746865792063757272656e746c7920686176652e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ab4202d206077686f60202d205468652073757370656e646564206d656d62657220746f206265206a75646765642e3501202d2060666f726769766560202d204120626f6f6c65616e20726570726573656e74696e672077686574686572207468652073757370656e73696f6e206a756467656d656e74206f726967696e2501202020202020202020202020202020666f726769766573202860747275656029206f722072656a6563747320286066616c7365602920612073757370656e646564206d656d6265722e002c2023203c7765696768743ea4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d6265727329f8202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e646564206d656d6265722e204f2831297101202d20557020746f206f6e652073746f72616765207772697465204f284d292077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d626572206261636b20746f20736f63696574792ef8202d20557020746f20332073746f726167652072656d6f76616c73204f28312920746f20636c65616e20757020612072656d6f766564206d656d6265722e4501202d20557020746f206f6e652073746f72616765207772697465204f2842292077697468204f2842292073656172636820746f2072656d6f766520766f7563686564206269642066726f6d20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e70202d204f6e652073746f726167652072656d6f76616c2e204f2831297c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204229302023203c2f7765696768743e646a756467655f73757370656e6465645f63616e646964617465080c77686f30543a3a4163636f756e744964246a756467656d656e74244a756467656d656e74a0350120416c6c6f772073757370656e646564206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e6465642063616e6469646174652e005d0120496620746865206a756467656d656e742069732060417070726f7665602c20776520616464207468656d20746f20736f63696574792061732061206d656d62657220776974682074686520617070726f70726961746574207061796d656e7420666f72206a6f696e696e6720736f63696574792e00550120496620746865206a756467656d656e74206973206052656a656374602c2077652065697468657220736c61736820746865206465706f736974206f6620746865206269642c20676976696e67206974206261636b110120746f2074686520736f63696574792074726561737572792c206f722077652062616e2074686520766f75636865722066726f6d20766f756368696e6720616761696e2e005d0120496620746865206a756467656d656e7420697320605265626964602c20776520707574207468652063616e646964617465206261636b20696e207468652062696420706f6f6c20616e64206c6574207468656d20676f94207468726f7567682074686520696e64756374696f6e2070726f6365737320616761696e2e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ac0202d206077686f60202d205468652073757370656e6465642063616e64696461746520746f206265206a75646765642ec4202d20606a756467656d656e7460202d2060417070726f7665602c206052656a656374602c206f7220605265626964602e002c2023203c7765696768743ef4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520616374696f6e29f0202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e6465642063616e6469646174652ec8202d204f6e652073746f726167652072656d6f76616c206f66207468652073757370656e6465642063616e6469646174652e40202d20417070726f7665204c6f676963150120092d204f6e652073746f72616765207265616420746f206765742074686520617661696c61626c6520706f7420746f2070617920757365727320776974682e204f283129dc20092d204f6e652073746f7261676520777269746520746f207570646174652074686520617661696c61626c6520706f742e204f283129e820092d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f283129b420092d204f6e652073746f72616765207265616420746f2067657420616c6c206d656d626572732e204f284d29a020092d20557020746f206f6e6520756e726573657276652063757272656e637920616374696f6e2eb020092d20557020746f2074776f206e65772073746f726167652077726974657320746f207061796f7574732e4d0120092d20557020746f206f6e652073746f726167652077726974652077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d62657220746f20736f63696574792e3c202d2052656a656374204c6f676963dc20092d20557020746f206f6e6520726570617472696174652072657365727665642063757272656e637920616374696f6e2e204f2858292d0120092d20557020746f206f6e652073746f7261676520777269746520746f2062616e2074686520766f756368696e67206d656d6265722066726f6d20766f756368696e6720616761696e2e38202d205265626964204c6f676963410120092d2053746f72616765206d75746174652077697468204f286c6f672042292062696e6172792073656172636820746f20706c616365207468652075736572206261636b20696e746f20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e5c202d204f6e652073746f726167652072656d6f76616c2e7c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2042202b205829302023203c2f7765696768743e3c7365745f6d61785f6d656d62657273040c6d61780c753332381d0120416c6c6f777320726f6f74206f726967696e20746f206368616e676520746865206d6178696d756d206e756d626572206f66206d656d6265727320696e20736f63696574792eb4204d6178206d656d6265727368697020636f756e74206d7573742062652067726561746572207468616e20312e00dc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d205f524f4f545f2e003020506172616d65746572733ae4202d20606d617860202d20546865206d6178696d756d206e756d626572206f66206d656d6265727320666f722074686520736f63696574792e002c2023203c7765696768743eb0202d204f6e652073746f7261676520777269746520746f2075706461746520746865206d61782e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e01401c466f756e64656404244163636f756e74496404e82054686520736f636965747920697320666f756e6465642062792074686520676976656e206964656e746974792e205c5b666f756e6465725c5d0c42696408244163636f756e7449641c42616c616e63650861012041206d656d6265727368697020626964206a7573742068617070656e65642e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e64207468656972206f666665729c20697320746865207365636f6e642e205c5b63616e6469646174655f69642c206f666665725c5d14566f7563680c244163636f756e7449641c42616c616e6365244163636f756e7449640861012041206d656d6265727368697020626964206a7573742068617070656e656420627920766f756368696e672e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e647901207468656972206f6666657220697320746865207365636f6e642e2054686520766f756368696e67207061727479206973207468652074686972642e205c5b63616e6469646174655f69642c206f666665722c20766f756368696e675c5d244175746f556e62696404244163636f756e7449640419012041205c5b63616e6469646174655c5d207761732064726f70706564202864756520746f20616e20657863657373206f66206269647320696e207468652073797374656d292e14556e62696404244163636f756e74496404c02041205c5b63616e6469646174655c5d207761732064726f70706564202862792074686569722072657175657374292e1c556e766f75636804244163636f756e7449640409012041205c5b63616e6469646174655c5d207761732064726f70706564202862792072657175657374206f662077686f20766f756368656420666f72207468656d292e20496e64756374656408244163636f756e744964385665633c4163636f756e7449643e08590120412067726f7570206f662063616e646964617465732068617665206265656e20696e6475637465642e205468652062617463682773207072696d617279206973207468652066697273742076616c75652c20746865d420626174636820696e2066756c6c20697320746865207365636f6e642e205c5b7072696d6172792c2063616e646964617465735c5d6053757370656e6465644d656d6265724a756467656d656e7408244163636f756e74496410626f6f6c04d020412073757370656e646564206d656d62657220686173206265656e206a75646765642e205c5b77686f2c206a75646765645c5d4843616e64696461746553757370656e64656404244163636f756e744964048c2041205c5b63616e6469646174655c5d20686173206265656e2073757370656e6465643c4d656d62657253757370656e64656404244163636f756e74496404802041205c5b6d656d6265725c5d20686173206265656e2073757370656e646564284368616c6c656e67656404244163636f756e74496404842041205c5b6d656d6265725c5d20686173206265656e206368616c6c656e67656410566f74650c244163636f756e744964244163636f756e74496410626f6f6c04c8204120766f746520686173206265656e20706c61636564205c5b63616e6469646174652c20766f7465722c20766f74655c5d30446566656e646572566f746508244163636f756e74496410626f6f6c04f8204120766f746520686173206265656e20706c6163656420666f72206120646566656e64696e67206d656d626572205c5b766f7465722c20766f74655c5d344e65774d61784d656d62657273040c75333204a02041206e6577205c5b6d61785c5d206d656d62657220636f756e7420686173206265656e2073657424556e666f756e64656404244163636f756e744964048820536f636965747920697320756e666f756e6465642e205c5b666f756e6465725c5d1c4465706f736974041c42616c616e636504f820536f6d652066756e64732077657265206465706f736974656420696e746f2074686520736f6369657479206163636f756e742e205c5b76616c75655c5d204043616e6469646174654465706f7369743c42616c616e63654f663c542c20493e400080c6a47e8d0300000000000000000004fc20546865206d696e696d756d20616d6f756e74206f662061206465706f73697420726571756972656420666f7220612062696420746f206265206d6164652e4857726f6e6753696465446564756374696f6e3c42616c616e63654f663c542c20493e400080f420e6b5000000000000000000000855012054686520616d6f756e74206f662074686520756e70616964207265776172642074686174206765747320646564756374656420696e207468652063617365207468617420656974686572206120736b6570746963c020646f65736e277420766f7465206f7220736f6d656f6e6520766f74657320696e207468652077726f6e67207761792e284d6178537472696b65730c753332100a00000008750120546865206e756d626572206f662074696d65732061206d656d626572206d617920766f7465207468652077726f6e672077617920286f72206e6f7420617420616c6c2c207768656e207468657920617265206120736b65707469632978206265666f72652074686579206265636f6d652073757370656e6465642e2c506572696f645370656e643c42616c616e63654f663c542c20493e400000c52ebca2b1000000000000000000042d012054686520616d6f756e74206f6620696e63656e7469766520706169642077697468696e206561636820706572696f642e20446f65736e277420696e636c75646520566f7465725469702e38526f746174696f6e506572696f6438543a3a426c6f636b4e756d626572100077010004110120546865206e756d626572206f6620626c6f636b73206265747765656e2063616e6469646174652f6d656d6265727368697020726f746174696f6e20706572696f64732e3c4368616c6c656e6765506572696f6438543a3a426c6f636b4e756d626572108013030004d020546865206e756d626572206f6620626c6f636b73206265747765656e206d656d62657273686970206368616c6c656e6765732e2050616c6c657449642050616c6c657449642070792f736f63696504682054686520736f636965746965732773206d6f64756c65206964484d617843616e646964617465496e74616b650c753332100a0000000490204d6178696d756d2063616e64696461746520696e74616b652070657220726f756e642e482c426164506f736974696f6e049020416e20696e636f727265637420706f736974696f6e207761732070726f76696465642e244e6f744d656d62657204582055736572206973206e6f742061206d656d6265722e34416c72656164794d656d6265720468205573657220697320616c72656164792061206d656d6265722e2453757370656e646564044c20557365722069732073757370656e6465642e304e6f7453757370656e646564045c2055736572206973206e6f742073757370656e6465642e204e6f5061796f7574044c204e6f7468696e6720746f207061796f75742e38416c7265616479466f756e646564046420536f636965747920616c726561647920666f756e6465642e3c496e73756666696369656e74506f74049c204e6f7420656e6f75676820696e20706f7420746f206163636570742063616e6469646174652e3c416c7265616479566f756368696e6704e8204d656d62657220697320616c726561647920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e2e2c4e6f74566f756368696e670460204d656d626572206973206e6f7420766f756368696e672e104865616404942043616e6e6f742072656d6f7665207468652068656164206f662074686520636861696e2e1c466f756e646572046c2043616e6e6f742072656d6f76652074686520666f756e6465722e28416c7265616479426964047420557365722068617320616c7265616479206d6164652061206269642e40416c726561647943616e6469646174650474205573657220697320616c726561647920612063616e6469646174652e304e6f7443616e64696461746504642055736572206973206e6f7420612063616e6469646174652e284d61784d656d62657273048420546f6f206d616e79206d656d6265727320696e2074686520736f63696574792e284e6f74466f756e646572047c205468652063616c6c6572206973206e6f742074686520666f756e6465722e1c4e6f74486561640470205468652063616c6c6572206973206e6f742074686520686561642e1a205265636f7665727901205265636f766572790c2c5265636f76657261626c6500010530543a3a4163636f756e744964e85265636f76657279436f6e6669673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e0004000409012054686520736574206f66207265636f76657261626c65206163636f756e747320616e64207468656972207265636f7665727920636f6e66696775726174696f6e2e404163746976655265636f76657269657300020530543a3a4163636f756e74496430543a3a4163636f756e744964e84163746976655265636f766572793c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e050400106820416374697665207265636f7665727920617474656d7074732e001501204669727374206163636f756e7420697320746865206163636f756e7420746f206265207265636f76657265642c20616e6420746865207365636f6e64206163636f756e74ac20697320746865207573657220747279696e6720746f207265636f76657220746865206163636f756e742e1450726f787900010230543a3a4163636f756e74496430543a3a4163636f756e7449640004000c9020546865206c697374206f6620616c6c6f7765642070726f7879206163636f756e74732e00f8204d61702066726f6d2074686520757365722077686f2063616e2061636365737320697420746f20746865207265636f7665726564206163636f756e742e01243061735f7265636f7665726564081c6163636f756e7430543a3a4163636f756e7449641063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e34a42053656e6420612063616c6c207468726f7567682061207265636f7665726564206163636f756e742e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a2501202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f752077616e7420746f206d616b6520612063616c6c206f6e2d626568616c662d6f662e0101202d206063616c6c603a205468652063616c6c20796f752077616e7420746f206d616b65207769746820746865207265636f7665726564206163636f756e742e002c2023203c7765696768743e94202d2054686520776569676874206f6620746865206063616c6c60202b2031302c3030302e0901202d204f6e652073746f72616765206c6f6f6b757020746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e347365745f7265636f766572656408106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e744964341d0120416c6c6f7720524f4f5420746f2062797061737320746865207265636f766572792070726f6365737320616e642073657420616e20612072657363756572206163636f756e747420666f722061206c6f7374206163636f756e74206469726563746c792e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f524f4f545f2e003020506172616d65746572733ab8202d20606c6f7374603a2054686520226c6f7374206163636f756e742220746f206265207265636f76657265642e1d01202d206072657363756572603a20546865202272657363756572206163636f756e74222077686963682063616e2063616c6c20617320746865206c6f7374206163636f756e742e002c2023203c7765696768743e64202d204f6e652073746f72616765207772697465204f28312930202d204f6e65206576656e74302023203c2f7765696768743e3c6372656174655f7265636f766572790c1c667269656e6473445665633c543a3a4163636f756e7449643e247468726573686f6c640c7531363064656c61795f706572696f6438543a3a426c6f636b4e756d6265726c5d01204372656174652061207265636f7665727920636f6e66696775726174696f6e20666f7220796f7572206163636f756e742e2054686973206d616b657320796f7572206163636f756e74207265636f76657261626c652e003101205061796d656e743a2060436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732062616c616e636549012077696c6c20626520726573657276656420666f722073746f72696e6720746865207265636f7665727920636f6e66696775726174696f6e2e2054686973206465706f7369742069732072657475726e6564bc20696e2066756c6c207768656e2074686520757365722063616c6c73206072656d6f76655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2501202d2060667269656e6473603a2041206c697374206f6620667269656e647320796f7520747275737420746f20766f75636820666f72207265636f7665727920617474656d7074732ed420202053686f756c64206265206f72646572656420616e6420636f6e7461696e206e6f206475706c69636174652076616c7565732e3101202d20607468726573686f6c64603a20546865206e756d626572206f6620667269656e64732074686174206d75737420766f75636820666f722061207265636f7665727920617474656d70741d012020206265666f726520746865206163636f756e742063616e206265207265636f76657265642e2053686f756c64206265206c657373207468616e206f7220657175616c20746f94202020746865206c656e677468206f6620746865206c697374206f6620667269656e64732e3d01202d206064656c61795f706572696f64603a20546865206e756d626572206f6620626c6f636b732061667465722061207265636f7665727920617474656d707420697320696e697469616c697a6564e820202074686174206e6565647320746f2070617373206265666f726520746865206163636f756e742063616e206265207265636f76657265642e002c2023203c7765696768743e68202d204b65793a204620286c656e206f6620667269656e6473292d01202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973206e6f7420616c7265616479207265636f76657261626c652e204f2831292eec202d204120636865636b20746861742074686520667269656e6473206c69737420697320736f7274656420616e6420756e697175652e204f2846299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f2858299c202d204f6e652073746f726167652077726974652e204f2831292e20436f646563204f2846292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e44696e6974696174655f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496458ec20496e697469617465207468652070726f6365737320666f72207265636f766572696e672061207265636f76657261626c65206163636f756e742e001d01205061796d656e743a20605265636f766572794465706f736974602062616c616e63652077696c6c20626520726573657276656420666f7220696e6974696174696e67207468652501207265636f766572792070726f636573732e2054686973206465706f7369742077696c6c20616c7761797320626520726570617472696174656420746f20746865206163636f756e74b820747279696e6720746f206265207265636f76657265642e205365652060636c6f73655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e2054686973206163636f756e7401012020206e6565647320746f206265207265636f76657261626c652028692e652e20686176652061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743ef8202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973207265636f76657261626c652e204f2846295101202d204f6e652073746f72616765207265616420746f20636865636b20746861742074686973207265636f766572792070726f63657373206861736e277420616c726561647920737461727465642e204f2831299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f285829e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831296c202d204f6e652073746f726167652077726974652e204f2831292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e38766f7563685f7265636f7665727908106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e74496464290120416c6c6f7720612022667269656e6422206f662061207265636f76657261626c65206163636f756e7420746f20766f75636820666f7220616e20616374697665207265636f76657279682070726f6365737320666f722074686174206163636f756e742e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d75737420626520612022667269656e64227420666f7220746865207265636f76657261626c65206163636f756e742e003020506172616d65746572733ad4202d20606c6f7374603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f2072657363756520746865206c6f7374206163636f756e74207468617420796f755420202077616e7420746f20766f75636820666f722e0025012054686520636f6d62696e6174696f6e206f662074686573652074776f20706172616d6574657273206d75737420706f696e7420746f20616e20616374697665207265636f76657279242070726f636573732e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629ec202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c6572206973206120667269656e642e204f286c6f6746291d01202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c657220686173206e6f7420616c726561647920766f75636865642e204f286c6f6756299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e00a420546f74616c20436f6d706c65786974793a204f2846202b206c6f6746202b2056202b206c6f675629302023203c2f7765696768743e38636c61696d5f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496450f420416c6c6f772061207375636365737366756c207265736375657220746f20636c61696d207468656972207265636f7665726564206163636f756e742e002d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061202272657363756572221d012077686f20686173207375636365737366756c6c7920636f6d706c6574656420746865206163636f756e74207265636f766572792070726f636573733a20636f6c6c6563746564310120607468726573686f6c6460206f72206d6f726520766f75636865732c20776169746564206064656c61795f706572696f646020626c6f636b732073696e636520696e6974696174696f6e2e003020506172616d65746572733a2d01202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f20636c61696d20686173206265656e207375636365737366756c6c79502020207265636f766572656420627920796f752e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205629302023203c2f7765696768743e38636c6f73655f7265636f76657279041c7265736375657230543a3a4163636f756e7449645015012041732074686520636f6e74726f6c6c6572206f662061207265636f76657261626c65206163636f756e742c20636c6f736520616e20616374697665207265636f76657279682070726f6365737320666f7220796f7572206163636f756e742e002101205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e2c20746865207265636f76657261626c65206163636f756e742077696c6c2072656365697665f820746865207265636f76657279206465706f73697420605265636f766572794465706f7369746020706c616365642062792074686520726573637565722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061f0207265636f76657261626c65206163636f756e74207769746820616e20616374697665207265636f766572792070726f6365737320666f722069742e003020506172616d65746572733a1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f207265736375652074686973207265636f76657261626c65206163636f756e742e002c2023203c7765696768743e84204b65793a205620286c656e206f6620766f756368696e6720667269656e6473293d01202d204f6e652073746f7261676520726561642f72656d6f766520746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629c0202d204f6e652062616c616e63652063616c6c20746f20726570617472696174652072657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2856202b205829302023203c2f7765696768743e3c72656d6f76655f7265636f7665727900545d012052656d6f766520746865207265636f766572792070726f6365737320666f7220796f7572206163636f756e742e205265636f7665726564206163636f756e747320617265207374696c6c2061636365737369626c652e001501204e4f54453a205468652075736572206d757374206d616b65207375726520746f2063616c6c2060636c6f73655f7265636f7665727960206f6e20616c6c206163746976650901207265636f7665727920617474656d707473206265666f72652063616c6c696e6720746869732066756e6374696f6e20656c73652069742077696c6c206661696c2e002501205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e20746865207265636f76657261626c65206163636f756e742077696c6c20756e7265736572766598207468656972207265636f7665727920636f6e66696775726174696f6e206465706f7369742ef4202860436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732900050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061e4207265636f76657261626c65206163636f756e742028692e652e206861732061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743e60204b65793a204620286c656e206f6620667269656e6473292901202d204f6e652073746f72616765207265616420746f206765742074686520707265666978206974657261746f7220666f7220616374697665207265636f7665726965732e204f2831293901202d204f6e652073746f7261676520726561642f72656d6f766520746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846299c202d204f6e652062616c616e63652063616c6c20746f20756e72657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e4063616e63656c5f7265636f7665726564041c6163636f756e7430543a3a4163636f756e7449642ce02043616e63656c20746865206162696c69747920746f20757365206061735f7265636f76657265646020666f7220606163636f756e74602e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a1901202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f75206172652061626c6520746f2063616c6c206f6e2d626568616c662d6f662e002c2023203c7765696768743e1101202d204f6e652073746f72616765206d75746174696f6e20746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e01183c5265636f766572794372656174656404244163636f756e74496404dc2041207265636f766572792070726f6365737320686173206265656e2073657420757020666f7220616e205c5b6163636f756e745c5d2e445265636f76657279496e6974696174656408244163636f756e744964244163636f756e744964082d012041207265636f766572792070726f6365737320686173206265656e20696e6974696174656420666f72206c6f7374206163636f756e742062792072657363756572206163636f756e742e48205c5b6c6f73742c20726573637565725c5d3c5265636f76657279566f75636865640c244163636f756e744964244163636f756e744964244163636f756e744964085d012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20766f756368656420666f722062792073656e6465722e68205c5b6c6f73742c20726573637565722c2073656e6465725c5d385265636f76657279436c6f73656408244163636f756e744964244163636f756e7449640821012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20636c6f7365642e48205c5b6c6f73742c20726573637565725c5d404163636f756e745265636f766572656408244163636f756e744964244163636f756e744964080501204c6f7374206163636f756e7420686173206265656e207375636365737366756c6c79207265636f76657265642062792072657363756572206163636f756e742e48205c5b6c6f73742c20726573637565725c5d3c5265636f7665727952656d6f76656404244163636f756e74496404e02041207265636f766572792070726f6365737320686173206265656e2072656d6f76656420666f7220616e205c5b6163636f756e745c5d2e1044436f6e6669674465706f736974426173653042616c616e63654f663c543e4000406352bfc60100000000000000000010550120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e00010120546869732069732068656c6420666f7220616e206164646974696f6e616c2073746f72616765206974656d2077686f73652076616c75652073697a65206973a8206032202b2073697a656f6628426c6f636b4e756d6265722c2042616c616e636529602062797465732e4c467269656e644465706f736974466163746f723042616c616e63654f663c543e4000203d88792d000000000000000000000c69012054686520616d6f756e74206f662063757272656e6379206e656564656420706572206164646974696f6e616c2075736572207768656e206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e00690120546869732069732068656c6420666f7220616464696e67206073697a656f66284163636f756e7449642960206279746573206d6f726520696e746f2061207072652d6578697374696e672073746f726167652076616c75652e284d6178467269656e64730c753136080900040d0120546865206d6178696d756d20616d6f756e74206f6620667269656e647320616c6c6f77656420696e2061207265636f7665727920636f6e66696775726174696f6e2e3c5265636f766572794465706f7369743042616c616e63654f663c543e4000406352bfc6010000000000000000001c1d0120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72207374617274696e672061207265636f766572792e0035012054686973206973207072696d6172696c792068656c6420666f7220646574657272696e67206d616c6963696f7573207265636f7665727920617474656d7074732c20616e642073686f756c642901206861766520612076616c7565206c6172676520656e6f7567682074686174206120626164206163746f7220776f756c642063686f6f7365206e6f7420746f20706c61636520746869732901206465706f7369742e20497420616c736f206163747320746f2066756e64206164646974696f6e616c2073746f72616765206974656d2077686f73652076616c75652073697a652069734101206073697a656f6628426c6f636b4e756d6265722c2042616c616e6365202b2054202a204163636f756e74496429602062797465732e2057686572652054206973206120636f6e666967757261626c652c207468726573686f6c642e40284e6f74416c6c6f77656404f42055736572206973206e6f7420616c6c6f77656420746f206d616b6520612063616c6c206f6e20626568616c66206f662074686973206163636f756e74345a65726f5468726573686f6c640490205468726573686f6c64206d7573742062652067726561746572207468616e207a65726f404e6f74456e6f756768467269656e647304d420467269656e6473206c697374206d7573742062652067726561746572207468616e207a65726f20616e64207468726573686f6c64284d6178467269656e647304ac20467269656e6473206c697374206d757374206265206c657373207468616e206d617820667269656e6473244e6f74536f7274656404cc20467269656e6473206c697374206d75737420626520736f7274656420616e642066726565206f66206475706c696361746573384e6f745265636f76657261626c6504a02054686973206163636f756e74206973206e6f742073657420757020666f72207265636f7665727948416c72656164795265636f76657261626c6504b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f7665727938416c72656164795374617274656404e02041207265636f766572792070726f636573732068617320616c7265616479207374617274656420666f722074686973206163636f756e74284e6f745374617274656404d02041207265636f766572792070726f6365737320686173206e6f74207374617274656420666f7220746869732072657363756572244e6f74467269656e6404ac2054686973206163636f756e74206973206e6f74206120667269656e642077686f2063616e20766f7563682c44656c6179506572696f64041d012054686520667269656e64206d757374207761697420756e74696c207468652064656c617920706572696f6420746f20766f75636820666f722074686973207265636f7665727938416c7265616479566f756368656404c0205468697320757365722068617320616c726561647920766f756368656420666f722074686973207265636f76657279245468726573686f6c6404ec20546865207468726573686f6c6420666f72207265636f766572696e672074686973206163636f756e7420686173206e6f74206265656e206d65742c5374696c6c41637469766504010120546865726520617265207374696c6c20616374697665207265636f7665727920617474656d7074732074686174206e65656420746f20626520636c6f73656430416c726561647950726f787904b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f76657279204261645374617465047c20536f6d6520696e7465726e616c2073746174652069732062726f6b656e2e1b1c56657374696e67011c56657374696e67041c56657374696e6700010230543a3a4163636f756e744964a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e00040004d820496e666f726d6174696f6e20726567617264696e67207468652076657374696e67206f66206120676976656e206163636f756e742e011010766573740034bc20556e6c6f636b20616e79207665737465642066756e6473206f66207468652073656e646572206163636f756e742e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652066756e6473207374696c6c68206c6f636b656420756e64657220746869732070616c6c65742e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20322052656164732c203220577269746573fc20202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d010120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d302023203c2f7765696768743e28766573745f6f7468657204187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653cbc20556e6c6f636b20616e79207665737465642066756e6473206f662061206074617267657460206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501202d2060746172676574603a20546865206163636f756e742077686f7365207665737465642066756e64732073686f756c6420626520756e6c6f636b65642e204d75737420686176652066756e6473207374696c6c68206c6f636b656420756e64657220746869732070616c6c65742e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c203320577269746573f420202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e74f820202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e74302023203c2f7765696768743e3c7665737465645f7472616e7366657208187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e406820437265617465206120766573746564207472616e736665722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e001501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c2033205772697465733d0120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745d410120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745d302023203c2f7765696768743e54666f7263655f7665737465645f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e446420466f726365206120766573746564207472616e736665722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00ec202d2060736f75726365603a20546865206163636f756e742077686f73652066756e64732073686f756c64206265207472616e736665727265642e1501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20342052656164732c203420577269746573350120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74390120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74302023203c2f7765696768743e01083856657374696e675570646174656408244163636f756e7449641c42616c616e63650c59012054686520616d6f756e742076657374656420686173206265656e20757064617465642e205468697320636f756c6420696e646963617465206d6f72652066756e64732061726520617661696c61626c652e2054686519012062616c616e636520676976656e2069732074686520616d6f756e74207768696368206973206c65667420756e7665737465642028616e642074687573206c6f636b6564292e58205c5b6163636f756e742c20756e7665737465645c5d4056657374696e67436f6d706c6574656404244163636f756e744964041d0120416e205c5b6163636f756e745c5d20686173206265636f6d652066756c6c79207665737465642e204e6f20667572746865722076657374696e672063616e2068617070656e2e04444d696e5665737465645472616e736665723042616c616e63654f663c543e400000c16ff2862300000000000000000004e820546865206d696e696d756d20616d6f756e74207472616e7366657272656420746f2063616c6c20607665737465645f7472616e73666572602e0c284e6f7456657374696e67048820546865206163636f756e7420676976656e206973206e6f742076657374696e672e5c4578697374696e6756657374696e675363686564756c65045d0120416e206578697374696e672076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e7420746861742063616e6e6f7420626520636c6f6262657265642e24416d6f756e744c6f7704090120416d6f756e74206265696e67207472616e7366657272656420697320746f6f206c6f7720746f2063726561746520612076657374696e67207363686564756c652e1c245363686564756c657201245363686564756c65720c184167656e646101010538543a3a426c6f636b4e756d62657271015665633c4f7074696f6e3c5363686564756c65643c3c5420617320436f6e6669673e3a3a43616c6c2c20543a3a426c6f636b4e756d6265722c20543a3a0a50616c6c6574734f726967696e2c20543a3a4163636f756e7449643e3e3e000400044d01204974656d7320746f2062652065786563757465642c20696e64657865642062792074686520626c6f636b206e756d626572207468617420746865792073686f756c64206265206578656375746564206f6e2e184c6f6f6b75700001051c5665633c75383e6c5461736b416464726573733c543a3a426c6f636b4e756d6265723e000400040101204c6f6f6b75702066726f6d206964656e7469747920746f2074686520626c6f636b206e756d62657220616e6420696e646578206f6620746865207461736b2e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e0118207363686564756c6510107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e287420416e6f6e796d6f75736c79207363686564756c652061207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7390202d2042617365205765696768743a2032322e3239202b202e313236202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64615020202020202d2057726974653a204167656e64613d01202d2057696c6c20757365206261736520776569676874206f662032352077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e1863616e63656c08107768656e38543a3a426c6f636b4e756d62657214696e6465780c75333228982043616e63656c20616e20616e6f6e796d6f75736c79207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032322e3135202b20322e383639202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64617020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f6e616d6564140869641c5665633c75383e107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e285c205363686564756c652061206e616d6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c738c202d2042617365205765696768743a2032392e36202b202e313539202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704d01202d2057696c6c20757365206261736520776569676874206f662033352077686963682073686f756c6420626520676f6f6420666f72206d6f7265207468616e203330207363686564756c65642063616c6c73302023203c2f7765696768743e3063616e63656c5f6e616d6564040869641c5665633c75383e287c2043616e63656c2061206e616d6564207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032342e3931202b20322e393037202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f61667465721014616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e14ac20416e6f6e796d6f75736c79207363686564756c652061207461736b20616674657220612064656c61792e002c2023203c7765696768743e582053616d65206173205b607363686564756c65605d2e302023203c2f7765696768743e507363686564756c655f6e616d65645f6166746572140869641c5665633c75383e14616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e1494205363686564756c652061206e616d6564207461736b20616674657220612064656c61792e002c2023203c7765696768743e702053616d65206173205b607363686564756c655f6e616d6564605d2e302023203c2f7765696768743e010c245363686564756c6564082c426c6f636b4e756d6265720c7533320494205363686564756c656420736f6d65207461736b2e205c5b7768656e2c20696e6465785c5d2043616e63656c6564082c426c6f636b4e756d6265720c75333204902043616e63656c656420736f6d65207461736b2e205c5b7768656e2c20696e6465785c5d28446973706174636865640c605461736b416464726573733c426c6f636b4e756d6265723e3c4f7074696f6e3c5665633c75383e3e384469737061746368526573756c7404ac204469737061746368656420736f6d65207461736b2e205c5b7461736b2c2069642c20726573756c745c5d0010404661696c6564546f5363686564756c650468204661696c656420746f207363686564756c6520612063616c6c204e6f74466f756e6404802043616e6e6f742066696e6420746865207363686564756c65642063616c6c2e5c546172676574426c6f636b4e756d626572496e5061737404a820476976656e2074617267657420626c6f636b206e756d62657220697320696e2074686520706173742e4852657363686564756c654e6f4368616e676504f42052657363686564756c65206661696c6564206265636175736520697420646f6573206e6f74206368616e6765207363686564756c65642074696d652e1d1450726f7879011450726f7879081c50726f7869657301010530543a3a4163636f756e744964a50128426f756e6465645665633c50726f7879446566696e6974696f6e3c543a3a4163636f756e7449642c20543a3a50726f7879547970652c20543a3a0a20426c6f636b4e756d6265723e2c20543a3a4d617850726f786965732c3e2c2042616c616e63654f663c543e29004400000000000000000000000000000000000845012054686520736574206f66206163636f756e742070726f786965732e204d61707320746865206163636f756e74207768696368206861732064656c65676174656420746f20746865206163636f756e7473210120776869636820617265206265696e672064656c65676174656420746f2c20746f67657468657220776974682074686520616d6f756e742068656c64206f6e206465706f7369742e34416e6e6f756e63656d656e747301010530543a3a4163636f756e744964a10128426f756e6465645665633c416e6e6f756e63656d656e743c543a3a4163636f756e7449642c2043616c6c486173684f663c543e2c20543a3a0a20426c6f636b4e756d6265723e2c20543a3a4d617850656e64696e672c3e2c2042616c616e63654f663c543e2c290044000000000000000000000000000000000004ac2054686520616e6e6f756e63656d656e7473206d616465206279207468652070726f787920286b6579292e01281470726f78790c107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e3c51012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f726973656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e246164645f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d62657234490120526567697374657220612070726f7879206163636f756e7420666f72207468652073656e64657220746861742069732061626c6520746f206d616b652063616c6c73206f6e2069747320626568616c662e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f206d616b6520612070726f78792e0101202d206070726f78795f74797065603a20546865207065726d697373696f6e7320616c6c6f77656420666f7220746869732070726f7879206163636f756e742e5101202d206064656c6179603a2054686520616e6e6f756e63656d656e7420706572696f64207265717569726564206f662074686520696e697469616c2070726f78792e2057696c6c2067656e6572616c6c7920626518207a65726f2e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3072656d6f76655f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d6265722cac20556e726567697374657220612070726f7879206163636f756e7420666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2901202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f2072656d6f766520617320612070726f78792e4501202d206070726f78795f74797065603a20546865207065726d697373696f6e732063757272656e746c7920656e61626c656420666f72207468652072656d6f7665642070726f7879206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3872656d6f76655f70726f786965730028b820556e726567697374657220616c6c2070726f7879206163636f756e747320666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901205741524e494e473a2054686973206d61792062652063616c6c6564206f6e206163636f756e747320637265617465642062792060616e6f6e796d6f7573602c20686f776576657220696620646f6e652c207468656e5d012074686520756e726573657276656420666565732077696c6c20626520696e61636365737369626c652e202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e24616e6f6e796d6f75730c2870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d62657214696e6465780c7531365c3d0120537061776e2061206672657368206e6577206163636f756e7420746861742069732067756172616e7465656420746f206265206f746865727769736520696e61636365737369626c652c20616e64010120696e697469616c697a65206974207769746820612070726f7879206f66206070726f78795f747970656020666f7220606f726967696e602073656e6465722e0070205265717569726573206120605369676e656460206f726967696e2e005501202d206070726f78795f74797065603a205468652074797065206f66207468652070726f78792074686174207468652073656e6465722077696c6c2062652072656769737465726564206173206f766572207468655101206e6577206163636f756e742e20546869732077696c6c20616c6d6f737420616c7761797320626520746865206d6f7374207065726d697373697665206050726f7879547970656020706f737369626c6520746f7c20616c6c6f7720666f72206d6178696d756d20666c65786962696c6974792e5501202d2060696e646578603a204120646973616d626967756174696f6e20696e6465782c20696e206361736520746869732069732063616c6c6564206d756c7469706c652074696d657320696e207468652073616d656101207472616e73616374696f6e2028652e672e207769746820607574696c6974793a3a626174636860292e20556e6c65737320796f75277265207573696e67206062617463686020796f752070726f6261626c79206a757374442077616e7420746f20757365206030602e5101202d206064656c6179603a2054686520616e6e6f756e63656d656e7420706572696f64207265717569726564206f662074686520696e697469616c2070726f78792e2057696c6c2067656e6572616c6c7920626518207a65726f2e005501204661696c73207769746820604475706c69636174656020696620746869732068617320616c7265616479206265656e2063616c6c656420696e2074686973207472616e73616374696f6e2c2066726f6d207468659c2073616d652073656e6465722c2077697468207468652073616d6520706172616d65746572732e00e8204661696c732069662074686572652061726520696e73756666696369656e742066756e647320746f2070617920666f72206465706f7369742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e9020544f444f3a204d69676874206265206f76657220636f756e74696e6720312072656164386b696c6c5f616e6f6e796d6f7573141c737061776e657230543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f78795479706514696e6465780c753136186865696768745c436f6d706163743c543a3a426c6f636b4e756d6265723e246578745f696e64657830436f6d706163743c7533323e50b82052656d6f76657320612070726576696f75736c7920737061776e656420616e6f6e796d6f75732070726f78792e004d01205741524e494e473a202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a20416e792066756e64732068656c6420696e2069742077696c6c2062653820696e61636365737369626c652e005d01205265717569726573206120605369676e656460206f726967696e2c20616e64207468652073656e646572206163636f756e74206d7573742068617665206265656e206372656174656420627920612063616c6c20746fac2060616e6f6e796d6f757360207769746820636f72726573706f6e64696e6720706172616d65746572732e005101202d2060737061776e6572603a20546865206163636f756e742074686174206f726967696e616c6c792063616c6c65642060616e6f6e796d6f75736020746f206372656174652074686973206163636f756e742e5101202d2060696e646578603a2054686520646973616d626967756174696f6e20696e646578206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e2050726f6261626c79206030602e0501202d206070726f78795f74797065603a205468652070726f78792074797065206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e4101202d2060686569676874603a2054686520686569676874206f662074686520636861696e207768656e207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e4d01202d20606578745f696e646578603a205468652065787472696e73696320696e64657820696e207768696368207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e004d01204661696c73207769746820604e6f5065726d697373696f6e6020696e2063617365207468652063616c6c6572206973206e6f7420612070726576696f75736c79206372656174656420616e6f6e796d6f7573f4206163636f756e742077686f73652060616e6f6e796d6f7573602063616c6c2068617320636f72726573706f6e64696e6720706172616d65746572732e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e20616e6e6f756e636508107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e540901205075626c697368207468652068617368206f6620612070726f78792d63616c6c20746861742077696c6c206265206d61646520696e20746865206675747572652e0061012054686973206d7573742062652063616c6c656420736f6d65206e756d626572206f6620626c6f636b73206265666f72652074686520636f72726573706f6e64696e67206070726f78796020697320617474656d707465642901206966207468652064656c6179206173736f6369617465642077697468207468652070726f78792072656c6174696f6e736869702069732067726561746572207468616e207a65726f2e001501204e6f206d6f7265207468616e20604d617850656e64696e676020616e6e6f756e63656d656e7473206d6179206265206d61646520617420616e79206f6e652074696d652e000d0120546869732077696c6c2074616b652061206465706f736974206f662060416e6e6f756e63656d656e744465706f736974466163746f72602061732077656c6c2061731d012060416e6e6f756e63656d656e744465706f736974426173656020696620746865726520617265206e6f206f746865722070656e64696e6720616e6e6f756e63656d656e74732e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420612070726f7879206f6620607265616c602e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656d6f76655f616e6e6f756e63656d656e7408107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40742052656d6f7665206120676976656e20616e6e6f756e63656d656e742e005d01204d61792062652063616c6c656420627920612070726f7879206163636f756e7420746f2072656d6f766520612063616c6c20746865792070726576696f75736c7920616e6e6f756e63656420616e642072657475726e3420746865206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656a6563745f616e6e6f756e63656d656e74082064656c656761746530543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40b42052656d6f76652074686520676976656e20616e6e6f756e63656d656e74206f6620612064656c65676174652e006501204d61792062652063616c6c6564206279206120746172676574202870726f7869656429206163636f756e7420746f2072656d6f766520612063616c6c2074686174206f6e65206f662074686569722064656c656761746573290120286064656c656761746560292068617320616e6e6f756e63656420746865792077616e7420746f20657865637574652e20546865206465706f7369742069732072657475726e65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733af8202d206064656c6567617465603a20546865206163636f756e7420746861742070726576696f75736c7920616e6e6f756e636564207468652063616c6c2ec0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e3c70726f78795f616e6e6f756e636564102064656c656761746530543a3a4163636f756e744964107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e4451012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f72697a656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e010c3450726f7879457865637574656404384469737061746368526573756c7404ec20412070726f78792077617320657865637574656420636f72726563746c792c20776974682074686520676976656e205c5b726573756c745c5d2e40416e6f6e796d6f75734372656174656410244163636f756e744964244163636f756e7449642450726f7879547970650c75313608ec20416e6f6e796d6f7573206163636f756e7420686173206265656e2063726561746564206279206e65772070726f7879207769746820676976656e690120646973616d626967756174696f6e20696e64657820616e642070726f787920747970652e205c5b616e6f6e796d6f75732c2077686f2c2070726f78795f747970652c20646973616d626967756174696f6e5f696e6465785c5d24416e6e6f756e6365640c244163636f756e744964244163636f756e744964104861736804510120416e20616e6e6f756e63656d656e742077617320706c6163656420746f206d616b6520612063616c6c20696e20746865206675747572652e205c5b7265616c2c2070726f78792c2063616c6c5f686173685c5d184050726f78794465706f736974426173653042616c616e63654f663c543e4000f09e544c390000000000000000000010110120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e6720612070726f78792e00010120546869732069732068656c6420666f7220616e206164646974696f6e616c2073746f72616765206974656d2077686f73652076616c75652073697a652069732501206073697a656f662842616c616e6365296020627974657320616e642077686f7365206b65792073697a65206973206073697a656f66284163636f756e74496429602062797465732e4850726f78794465706f736974466163746f723042616c616e63654f663c543e400060aa7714b40000000000000000000014bc2054686520616d6f756e74206f662063757272656e6379206e6565646564207065722070726f78792061646465642e00690120546869732069732068656c6420666f7220616464696e6720333220627974657320706c757320616e20696e7374616e6365206f66206050726f78795479706560206d6f726520696e746f2061207072652d6578697374696e6761012073746f726167652076616c75652e20546875732c207768656e20636f6e6669677572696e67206050726f78794465706f736974466163746f7260206f6e652073686f756c642074616b6520696e746f206163636f756e74c020603332202b2070726f78795f747970652e656e636f646528292e6c656e282960206279746573206f6620646174612e284d617850726f786965730c753332102000000004f020546865206d6178696d756d20616d6f756e74206f662070726f7869657320616c6c6f77656420666f7220612073696e676c65206163636f756e742e284d617850656e64696e670c753332102000000004450120546865206d6178696d756d20616d6f756e74206f662074696d652d64656c6179656420616e6e6f756e63656d656e747320746861742061726520616c6c6f77656420746f2062652070656e64696e672e5c416e6e6f756e63656d656e744465706f736974426173653042616c616e63654f663c543e4000f09e544c39000000000000000000000c310120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e6720616e20616e6e6f756e63656d656e742e00690120546869732069732068656c64207768656e2061206e65772073746f72616765206974656d20686f6c64696e672061206042616c616e636560206973206372656174656420287479706963616c6c79203136206279746573292e64416e6e6f756e63656d656e744465706f736974466163746f723042616c616e63654f663c543e4000c054ef28680100000000000000000010d42054686520616d6f756e74206f662063757272656e6379206e65656465642070657220616e6e6f756e63656d656e74206d6164652e00590120546869732069732068656c6420666f7220616464696e6720616e20604163636f756e744964602c2060486173686020616e642060426c6f636b4e756d6265726020287479706963616c6c79203638206279746573298c20696e746f2061207072652d6578697374696e672073746f726167652076616c75652e201c546f6f4d616e790425012054686572652061726520746f6f206d616e792070726f786965732072656769737465726564206f7220746f6f206d616e7920616e6e6f756e63656d656e74732070656e64696e672e204e6f74466f756e6404782050726f787920726567697374726174696f6e206e6f7420666f756e642e204e6f7450726f787904d02053656e646572206973206e6f7420612070726f7879206f6620746865206163636f756e7420746f2062652070726f786965642e2c556e70726f787961626c6504250120412063616c6c20776869636820697320696e636f6d70617469626c652077697468207468652070726f7879207479706527732066696c7465722077617320617474656d707465642e244475706c69636174650470204163636f756e7420697320616c726561647920612070726f78792e304e6f5065726d697373696f6e0419012043616c6c206d6179206e6f74206265206d6164652062792070726f78792062656361757365206974206d617920657363616c617465206974732070726976696c656765732e2c556e616e6e6f756e63656404d420416e6e6f756e63656d656e742c206966206d61646520617420616c6c2c20776173206d61646520746f6f20726563656e746c792e2c4e6f53656c6650726f787904682043616e6e6f74206164642073656c662061732070726f78792e1e204d756c746973696701204d756c746973696708244d756c74697369677300020530543a3a4163636f756e744964205b75383b2033325dd04d756c74697369673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e02040004942054686520736574206f66206f70656e206d756c7469736967206f7065726174696f6e732e1443616c6c73000106205b75383b2033325da0284f706171756543616c6c2c20543a3a4163636f756e7449642c2042616c616e63654f663c543e290004000001105061735f6d756c74695f7468726573686f6c645f3108446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e40550120496d6d6564696174656c792064697370617463682061206d756c74692d7369676e61747572652063616c6c207573696e6720612073696e676c6520617070726f76616c2066726f6d207468652063616c6c65722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e004101202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f206172652070617274206f66207468650501206d756c74692d7369676e61747572652c2062757420646f206e6f7420706172746963697061746520696e2074686520617070726f76616c2070726f636573732e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e00bc20526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c742e002c2023203c7765696768743e1d01204f285a202b204329207768657265205a20697320746865206c656e677468206f66207468652063616c6c20616e6420432069747320657865637574696f6e207765696768742e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d48202d204442205765696768743a204e6f6e654c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e2061735f6d756c746918247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e1063616c6c284f706171756543616c6c2873746f72655f63616c6c10626f6f6c286d61785f77656967687418576569676874b8590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e00b42049662074686572652061726520656e6f7567682c207468656e206469737061746368207468652063616c6c2e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e002101204e4f54453a20556e6c6573732074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2067656e6572616c6c792077616e7420746f207573651d012060617070726f76655f61735f6d756c74696020696e73746561642c2073696e6365206974206f6e6c7920726571756972657320612068617368206f66207468652063616c6c2e005d0120526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c7420696620607468726573686f6c64602069732065786163746c79206031602e204f74686572776973655901206f6e20737563636573732c20726573756c7420697320604f6b6020616e642074686520726573756c742066726f6d2074686520696e746572696f722063616c6c2c206966206974207761732065786563757465642ce0206d617920626520666f756e6420696e20746865206465706f736974656420604d756c7469736967457865637574656460206576656e742e002c2023203c7765696768743e54202d20604f2853202b205a202b2043616c6c29602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2e2501202d204f6e652063616c6c20656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285a296020776865726520605a602069732074782d6c656e2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e70202d2054686520776569676874206f6620746865206063616c6c602e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a250120202020202d2052656164733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c6029290120202020202d205772697465733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c60294c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e40617070726f76655f61735f6d756c746914247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e2463616c6c5f68617368205b75383b2033325d286d61785f7765696768741857656967687490590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e003901204e4f54453a2049662074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2077616e7420746f20757365206061735f6d756c74696020696e73746561642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743abc20202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745dc020202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d302023203c2f7765696768743e3c63616e63656c5f61735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e2474696d65706f696e746454696d65706f696e743c543a3a426c6f636b4e756d6265723e2463616c6c5f68617368205b75383b2033325d6859012043616e63656c2061207072652d6578697374696e672c206f6e2d676f696e67206d756c7469736967207472616e73616374696f6e2e20416e79206465706f7369742072657365727665642070726576696f75736c79c820666f722074686973206f7065726174696f6e2077696c6c20626520756e7265736572766564206f6e20737563636573732e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e6101202d206074696d65706f696e74603a205468652074696d65706f696e742028626c6f636b206e756d62657220616e64207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c7c207472616e73616374696f6e20666f7220746869732064697370617463682ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602e34202d204f6e65206576656e742e88202d20492f4f3a2031207265616420604f285329602c206f6e652072656d6f76652e74202d2053746f726167653a2072656d6f766573206f6e65206974656d2e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a190120202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c731d0120202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c73302023203c2f7765696768743e01102c4e65774d756c74697369670c244163636f756e744964244163636f756e7449642043616c6c48617368041d012041206e6577206d756c7469736967206f7065726174696f6e2068617320626567756e2e205c5b617070726f76696e672c206d756c74697369672c2063616c6c5f686173685c5d404d756c7469736967417070726f76616c10244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c4861736808cc2041206d756c7469736967206f7065726174696f6e20686173206265656e20617070726f76656420627920736f6d656f6e652eb8205c5b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d404d756c7469736967457865637574656414244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c48617368384469737061746368526573756c740459012041206d756c7469736967206f7065726174696f6e20686173206265656e2065786563757465642e205c5b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d444d756c746973696743616e63656c6c656410244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c486173680461012041206d756c7469736967206f7065726174696f6e20686173206265656e2063616e63656c6c65642e205c5b63616e63656c6c696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d0c2c4465706f736974426173653042616c616e63654f663c543e4000f01c0adbed0100000000000000000018710120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061206d756c746973696720657865637574696f6e206f7220746f2073746f72656c20612064697370617463682063616c6c20666f72206c617465722e00010120546869732069732068656c6420666f7220616e206164646974696f6e616c2073746f72616765206974656d2077686f73652076616c75652073697a652069733101206034202b2073697a656f662828426c6f636b4e756d6265722c2042616c616e63652c204163636f756e74496429296020627974657320616e642077686f7365206b65792073697a652069738020603332202b2073697a656f66284163636f756e74496429602062797465732e344465706f736974466163746f723042616c616e63654f663c543e400000cc7b9fae000000000000000000000c55012054686520616d6f756e74206f662063757272656e6379206e65656465642070657220756e6974207468726573686f6c64207768656e206372656174696e672061206d756c746973696720657865637574696f6e2e00250120546869732069732068656c6420666f7220616464696e67203332206279746573206d6f726520696e746f2061207072652d6578697374696e672073746f726167652076616c75652e384d61785369676e61746f726965730c75313608640004ec20546865206d6178696d756d20616d6f756e74206f66207369676e61746f7269657320616c6c6f77656420696e20746865206d756c74697369672e38404d696e696d756d5468726573686f6c640480205468726573686f6c64206d7573742062652032206f7220677265617465722e3c416c7265616479417070726f76656404b02043616c6c20697320616c726561647920617070726f7665642062792074686973207369676e61746f72792e444e6f417070726f76616c734e656564656404a02043616c6c20646f65736e2774206e65656420616e7920286d6f72652920617070726f76616c732e44546f6f4665775369676e61746f7269657304ac2054686572652061726520746f6f20666577207369676e61746f7269657320696e20746865206c6973742e48546f6f4d616e795369676e61746f7269657304b02054686572652061726520746f6f206d616e79207369676e61746f7269657320696e20746865206c6973742e545369676e61746f726965734f75744f664f7264657204110120546865207369676e61746f7269657320776572652070726f7669646564206f7574206f66206f726465723b20746865792073686f756c64206265206f7264657265642e4c53656e646572496e5369676e61746f72696573041101205468652073656e6465722077617320636f6e7461696e656420696e20746865206f74686572207369676e61746f726965733b2069742073686f756c646e27742062652e204e6f74466f756e6404e0204d756c7469736967206f7065726174696f6e206e6f7420666f756e64207768656e20617474656d7074696e6720746f2063616e63656c2e204e6f744f776e6572043101204f6e6c7920746865206163636f756e742074686174206f726967696e616c6c79206372656174656420746865206d756c74697369672069732061626c6520746f2063616e63656c2069742e2c4e6f54696d65706f696e74042101204e6f2074696d65706f696e742077617320676976656e2c2079657420746865206d756c7469736967206f7065726174696f6e20697320616c726561647920756e6465727761792e3857726f6e6754696d65706f696e74043101204120646966666572656e742074696d65706f696e742077617320676976656e20746f20746865206d756c7469736967206f7065726174696f6e207468617420697320756e6465727761792e4c556e657870656374656454696d65706f696e7404f820412074696d65706f696e742077617320676976656e2c20796574206e6f206d756c7469736967206f7065726174696f6e20697320756e6465727761792e3c4d6178576569676874546f6f4c6f7704d420546865206d6178696d756d2077656967687420696e666f726d6174696f6e2070726f76696465642077617320746f6f206c6f772e34416c726561647953746f72656404a420546865206461746120746f2062652073746f72656420697320616c72656164792073746f7265642e1f20426f756e7469657301205472656173757279102c426f756e7479436f756e7401002c426f756e7479496e646578100000000004c0204e756d626572206f6620626f756e74792070726f706f73616c7320746861742068617665206265656e206d6164652e20426f756e746965730001052c426f756e7479496e646578c8426f756e74793c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e000400047820426f756e7469657320746861742068617665206265656e206d6164652e48426f756e74794465736372697074696f6e730001052c426f756e7479496e6465781c5665633c75383e000400048020546865206465736372697074696f6e206f66206561636820626f756e74792e3c426f756e7479417070726f76616c730100405665633c426f756e7479496e6465783e040004ec20426f756e747920696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f74207965742066756e6465642e01243870726f706f73655f626f756e7479081476616c756554436f6d706163743c42616c616e63654f663c543e3e2c6465736372697074696f6e1c5665633c75383e30582050726f706f73652061206e657720626f756e74792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c20617355012060446174614465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e2049742077696c6c20626520756e72657365727665642075706f6e20617070726f76616c2c68206f7220736c6173686564207768656e2072656a65637465642e00fc202d206063757261746f72603a205468652063757261746f72206163636f756e742077686f6d2077696c6c206d616e616765207468697320626f756e74792e68202d2060666565603a205468652063757261746f72206665652e2901202d206076616c7565603a2054686520746f74616c207061796d656e7420616d6f756e74206f66207468697320626f756e74792c2063757261746f722066656520696e636c756465642ec4202d20606465736372697074696f6e603a20546865206465736372697074696f6e206f66207468697320626f756e74792e38617070726f76655f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e20610120417070726f7665206120626f756e74792070726f706f73616c2e2041742061206c617465722074696d652c2074686520626f756e74792077696c6c2062652066756e64656420616e64206265636f6d6520616374697665ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e3c70726f706f73655f63757261746f720c24626f756e74795f696450436f6d706163743c426f756e7479496e6465783e1c63757261746f728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c66656554436f6d706163743c42616c616e63654f663c543e3e1c942041737369676e20612063757261746f7220746f20612066756e64656420626f756e74792e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e40756e61737369676e5f63757261746f720424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e488020556e61737369676e2063757261746f722066726f6d206120626f756e74792e00210120546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206052656a6563744f726967696e602061207369676e6564206f726967696e2e00690120496620746869732066756e6374696f6e2069732063616c6c656420627920746865206052656a6563744f726967696e602c20776520617373756d652074686174207468652063757261746f72206973206d616c6963696f75730d01206f7220696e6163746976652e204173206120726573756c742c2077652077696c6c20736c617368207468652063757261746f72207768656e20706f737369626c652e00650120496620746865206f726967696e206973207468652063757261746f722c2077652074616b6520746869732061732061207369676e20746865792061726520756e61626c6520746f20646f207468656972206a6f6220616e64610120746865792077696c6c696e676c7920676976652075702e20576520636f756c6420736c617368207468656d2c2062757420666f72206e6f7720776520616c6c6f77207468656d20746f207265636f7665722074686569723901206465706f73697420616e64206578697420776974686f75742069737375652e20285765206d61792077616e7420746f206368616e67652074686973206966206974206973206162757365642e290061012046696e616c6c792c20746865206f726967696e2063616e20626520616e796f6e6520696620616e64206f6e6c79206966207468652063757261746f722069732022696e616374697665222e205468697320616c6c6f7773650120616e796f6e6520696e2074686520636f6d6d756e69747920746f2063616c6c206f7574207468617420612063757261746f72206973206e6f7420646f696e67207468656972206475652064696c6967656e63652c20616e643d012077652073686f756c64207069636b2061206e65772063757261746f722e20496e20746869732063617365207468652063757261746f722073686f756c6420616c736f20626520736c61736865642e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e386163636570745f63757261746f720424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e209820416363657074207468652063757261746f7220726f6c6520666f72206120626f756e74792e2d012041206465706f7369742077696c6c2062652072657365727665642066726f6d2063757261746f7220616e6420726566756e642075706f6e207375636365737366756c207061796f75742e0094204d6179206f6e6c792062652063616c6c65642066726f6d207468652063757261746f722e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e3061776172645f626f756e74790824626f756e74795f696450436f6d706163743c426f756e7479496e6465783e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528990120417761726420626f756e747920746f20612062656e6566696369617279206163636f756e742e205468652062656e65666963696172792077696c6c2062652061626c6520746f20636c61696d207468652066756e647320616674657220612064656c61792e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652063757261746f72206f66207468697320626f756e74792e008c202d2060626f756e74795f6964603a20426f756e747920494420746f2061776172642e1d01202d206062656e6566696369617279603a205468652062656e6566696369617279206163636f756e742077686f6d2077696c6c207265636569766520746865207061796f75742e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e30636c61696d5f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e24f020436c61696d20746865207061796f75742066726f6d20616e206177617264656420626f756e7479206166746572207061796f75742064656c61792e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652062656e6566696369617279206f66207468697320626f756e74792e008c202d2060626f756e74795f6964603a20426f756e747920494420746f20636c61696d2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e30636c6f73655f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e283d012043616e63656c20612070726f706f736564206f722061637469766520626f756e74792e20416c6c207468652066756e64732077696c6c2062652073656e7420746f20747265617375727920616e64d0207468652063757261746f72206465706f7369742077696c6c20626520756e726573657276656420696620706f737369626c652e00cc204f6e6c792060543a3a52656a6563744f726967696e602069732061626c6520746f2063616e63656c206120626f756e74792e0090202d2060626f756e74795f6964603a20426f756e747920494420746f2063616e63656c2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e50657874656e645f626f756e74795f6578706972790824626f756e74795f696450436f6d706163743c426f756e7479496e6465783e1c5f72656d61726b1c5665633c75383e28b020457874656e6420746865206578706972792074696d65206f6620616e2061637469766520626f756e74792e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652063757261746f72206f66207468697320626f756e74792e0090202d2060626f756e74795f6964603a20426f756e747920494420746f20657874656e642e90202d206072656d61726b603a206164646974696f6e616c20696e666f726d6174696f6e2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e011c38426f756e747950726f706f736564042c426f756e7479496e646578047c204e657720626f756e74792070726f706f73616c2e205c5b696e6465785c5d38426f756e747952656a6563746564082c426f756e7479496e6465781c42616c616e6365041101204120626f756e74792070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e205c5b696e6465782c20626f6e645c5d48426f756e7479426563616d65416374697665042c426f756e7479496e64657804e4204120626f756e74792070726f706f73616c2069732066756e64656420616e6420626563616d65206163746976652e205c5b696e6465785c5d34426f756e747941776172646564082c426f756e7479496e646578244163636f756e74496404f4204120626f756e7479206973206177617264656420746f20612062656e65666963696172792e205c5b696e6465782c2062656e65666963696172795c5d34426f756e7479436c61696d65640c2c426f756e7479496e6465781c42616c616e6365244163636f756e744964040d01204120626f756e747920697320636c61696d65642062792062656e65666963696172792e205c5b696e6465782c207061796f75742c2062656e65666963696172795c5d38426f756e747943616e63656c6564042c426f756e7479496e6465780484204120626f756e74792069732063616e63656c6c65642e205c5b696e6465785c5d38426f756e7479457874656e646564042c426f756e7479496e646578049c204120626f756e74792065787069727920697320657874656e6465642e205c5b696e6465785c5d1c48446174614465706f736974506572427974653042616c616e63654f663c543e400010a5d4e8000000000000000000000004fc2054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e20626f756e7479206465736372697074696f6e2e44426f756e74794465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004e82054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120626f756e74792070726f706f73616c2e60426f756e74794465706f7369745061796f757444656c617938543a3a426c6f636b4e756d6265721080700000045901205468652064656c617920706572696f6420666f72207768696368206120626f756e74792062656e6566696369617279206e65656420746f2077616974206265666f726520636c61696d20746865207061796f75742e48426f756e7479557064617465506572696f6438543a3a426c6f636b4e756d6265721000270600046c20426f756e7479206475726174696f6e20696e20626c6f636b732e50426f756e747943757261746f724465706f7369741c5065726d696c6c1020a10700046d012050657263656e74616765206f66207468652063757261746f722066656520746861742077696c6c20626520726573657276656420757066726f6e74206173206465706f73697420666f7220626f756e74792063757261746f722e48426f756e747956616c75654d696e696d756d3042616c616e63654f663c543e4000406352bfc6010000000000000000000470204d696e696d756d2076616c756520666f72206120626f756e74792e4c4d6178696d756d526561736f6e4c656e6774680c75333210004000000488204d6178696d756d2061636365707461626c6520726561736f6e206c656e6774682e2470496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e30496e76616c6964496e6465780494204e6f2070726f706f73616c206f7220626f756e7479206174207468617420696e6465782e30526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e40556e657870656374656453746174757304842054686520626f756e74792073746174757320697320756e65787065637465642e385265717569726543757261746f720460205265717569726520626f756e74792063757261746f722e30496e76616c696456616c7565045820496e76616c696420626f756e74792076616c75652e28496e76616c6964466565045020496e76616c696420626f756e7479206665652e3450656e64696e675061796f75740870204120626f756e7479207061796f75742069732070656e64696e672efc20546f2063616e63656c2074686520626f756e74792c20796f75206d75737420756e61737369676e20616e6420736c617368207468652063757261746f722e245072656d61747572650449012054686520626f756e746965732063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e201054697073012054726561737572790810546970730001051c543a3a48617368f04f70656e5469703c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265722c20543a3a486173683e0004000c650120546970734d6170207468617420617265206e6f742079657420636f6d706c657465642e204b65796564206279207468652068617368206f66206028726561736f6e2c2077686f29602066726f6d207468652076616c75652e3d012054686973206861732074686520696e73656375726520656e756d657261626c6520686173682066756e6374696f6e2073696e636520746865206b657920697473656c6620697320616c7265616479802067756172616e7465656420746f20626520612073656375726520686173682e1c526561736f6e730001061c543a3a486173681c5665633c75383e0004000849012053696d706c6520707265696d616765206c6f6f6b75702066726f6d2074686520726561736f6e2773206861736820746f20746865206f726967696e616c20646174612e20416761696e2c2068617320616e610120696e73656375726520656e756d657261626c6520686173682073696e636520746865206b65792069732067756172616e7465656420746f2062652074686520726573756c74206f6620612073656375726520686173682e0118387265706f72745f617765736f6d650818726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e7449644c5d01205265706f727420736f6d657468696e672060726561736f6e60207468617420646573657276657320612074697020616e6420636c61696d20616e79206576656e7475616c207468652066696e6465722773206665652e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c206173c02060446174614465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743ecc202d20436f6d706c65786974793a20604f2852296020776865726520605260206c656e677468206f662060726561736f6e602e942020202d20656e636f64696e6720616e642068617368696e67206f662027726561736f6e2774202d20446252656164733a2060526561736f6e73602c2060546970736078202d2044625772697465733a2060526561736f6e73602c20605469707360302023203c2f7765696768743e2c726574726163745f7469700410686173681c543a3a486173684c550120526574726163742061207072696f72207469702d7265706f72742066726f6d20607265706f72745f617765736f6d65602c20616e642063616e63656c207468652070726f63657373206f662074697070696e672e00e0204966207375636365737366756c2c20746865206f726967696e616c206465706f7369742077696c6c20626520756e72657365727665642e00510120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642074686520746970206964656e746966696564206279206068617368604501206d7573742068617665206265656e207265706f7274656420627920746865207369676e696e67206163636f756e74207468726f75676820607265706f72745f617765736f6d65602028616e64206e6f7450207468726f75676820607469705f6e657760292e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e009020456d697473206054697052657472616374656460206966207375636365737366756c2e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960dc2020202d20446570656e6473206f6e20746865206c656e677468206f662060543a3a48617368602077686963682069732066697865642e90202d20446252656164733a206054697073602c20606f726967696e206163636f756e7460c0202d2044625772697465733a2060526561736f6e73602c206054697073602c20606f726967696e206163636f756e7460302023203c2f7765696768743e1c7469705f6e65770c18726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e744964247469705f76616c756554436f6d706163743c42616c616e63654f663c543e3e58f4204769766520612074697020666f7220736f6d657468696e67206e65773b206e6f2066696e6465722773206665652077696c6c2062652074616b656e2e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743e5501202d20436f6d706c65786974793a20604f2852202b2054296020776865726520605260206c656e677468206f662060726561736f6e602c2060546020697320746865206e756d626572206f6620746970706572732ec02020202d20604f285429603a206465636f64696e6720605469707065726020766563206f66206c656e6774682060546009012020202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e0d0120202020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602ee42020202d20604f285229603a2068617368696e6720616e6420656e636f64696e67206f6620726561736f6e206f66206c656e6774682060526080202d20446252656164733a206054697070657273602c2060526561736f6e736078202d2044625772697465733a2060526561736f6e73602c20605469707360302023203c2f7765696768743e0c7469700810686173681c543a3a48617368247469705f76616c756554436f6d706163743c42616c616e63654f663c543e3e64b4204465636c6172652061207469702076616c756520666f7220616e20616c72656164792d6f70656e207469702e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f66207468652068617368206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279382020206163636f756e742049442e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e00650120456d6974732060546970436c6f73696e676020696620746865207468726573686f6c64206f66207469707065727320686173206265656e207265616368656420616e642074686520636f756e74646f776e20706572696f64342068617320737461727465642e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e15012020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602c20696e736572742074697020616e6420636865636b20636c6f73696e672c0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602e00610120202041637475616c6c792077656967687420636f756c64206265206c6f77657220617320697420646570656e6473206f6e20686f77206d616e7920746970732061726520696e20604f70656e5469706020627574206974d4202020697320776569676874656420617320696620616c6d6f73742066756c6c20692e65206f66206c656e6774682060542d31602e74202d20446252656164733a206054697070657273602c206054697073604c202d2044625772697465733a20605469707360302023203c2f7765696768743e24636c6f73655f7469700410686173681c543a3a48617368446020436c6f736520616e64207061796f75742061207469702e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0019012054686520746970206964656e74696669656420627920606861736860206d75737420686176652066696e69736865642069747320636f756e74646f776e20706572696f642e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e9c2020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602e0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602eac202d20446252656164733a206054697073602c206054697070657273602c20607469702066696e64657260dc202d2044625772697465733a2060526561736f6e73602c206054697073602c206054697070657273602c20607469702066696e64657260302023203c2f7765696768743e24736c6173685f7469700410686173681c543a3a4861736830982052656d6f766520616e6420736c61736820616e20616c72656164792d6f70656e207469702e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656a6563744f726967696e602e00f8204173206120726573756c742c207468652066696e64657220697320736c617368656420616e6420746865206465706f7369747320617265206c6f73742e008820456d6974732060546970536c617368656460206966207375636365737366756c2e002c2023203c7765696768743e0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602e302023203c2f7765696768743e0114184e657754697004104861736804cc2041206e6577207469702073756767657374696f6e20686173206265656e206f70656e65642e205c5b7469705f686173685c5d28546970436c6f73696e670410486173680411012041207469702073756767657374696f6e206861732072656163686564207468726573686f6c6420616e6420697320636c6f73696e672e205c5b7469705f686173685c5d24546970436c6f7365640c1048617368244163636f756e7449641c42616c616e636504f02041207469702073756767657374696f6e20686173206265656e20636c6f7365642e205c5b7469705f686173682c2077686f2c207061796f75745c5d3054697052657472616374656404104861736804c82041207469702073756767657374696f6e20686173206265656e207265747261637465642e205c5b7469705f686173685c5d28546970536c61736865640c1048617368244163636f756e7449641c42616c616e63650405012041207469702073756767657374696f6e20686173206265656e20736c61736865642e205c5b7469705f686173682c2066696e6465722c206465706f7369745c5d1430546970436f756e74646f776e38543a3a426c6f636b4e756d62657210807000000445012054686520706572696f6420666f722077686963682061207469702072656d61696e73206f70656e20616674657220697320686173206163686965766564207468726573686f6c6420746970706572732e3454697046696e646572734665651c50657263656e7404140431012054686520616d6f756e74206f66207468652066696e616c2074697020776869636820676f657320746f20746865206f726967696e616c207265706f72746572206f6620746865207469702e505469705265706f72744465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004d42054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120746970207265706f72742e48446174614465706f736974506572427974653042616c616e63654f663c543e400010a5d4e800000000000000000000000409012054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e2074686520746970207265706f727420726561736f6e2e4c4d6178696d756d526561736f6e4c656e6774680c75333210004000000488204d6178696d756d2061636365707461626c6520726561736f6e206c656e6774682e1830526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e30416c72656164794b6e6f776e048c20546865207469702077617320616c726561647920666f756e642f737461727465642e28556e6b6e6f776e54697004642054686520746970206861736820697320756e6b6e6f776e2e244e6f7446696e64657204210120546865206163636f756e7420617474656d7074696e6720746f20726574726163742074686520746970206973206e6f74207468652066696e646572206f6620746865207469702e245374696c6c4f70656e042d0120546865207469702063616e6e6f7420626520636c61696d65642f636c6f736564206265636175736520746865726520617265206e6f7420656e6f7567682074697070657273207965742e245072656d617475726504350120546865207469702063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e211841737365747301184173736574731014417373657400010228543a3a41737365744964f8417373657444657461696c733c543a3a42616c616e63652c20543a3a4163636f756e7449642c204465706f73697442616c616e63654f663c542c20493e3e00040004542044657461696c73206f6620616e2061737365742e1c4163636f756e7401020228543a3a4173736574496430543a3a4163636f756e74496488417373657442616c616e63653c543a3a42616c616e63652c20543a3a45787472613e02280000000000000000000004e420546865206e756d626572206f6620756e697473206f66206173736574732068656c6420627920616e7920676976656e206163636f756e742e24417070726f76616c7300030c28543a3a4173736574496430543a3a4163636f756e74496430543a3a4163636f756e7449640c020202b0417070726f76616c3c543a3a42616c616e63652c204465706f73697442616c616e63654f663c542c20493e3e04000c590120417070726f7665642062616c616e6365207472616e73666572732e2046697273742062616c616e63652069732074686520616d6f756e7420617070726f76656420666f72207472616e736665722e205365636f6e64e82069732074686520616d6f756e74206f662060543a3a43757272656e63796020726573657276656420666f722073746f72696e6720746869732e4901204669727374206b6579206973207468652061737365742049442c207365636f6e64206b657920697320746865206f776e657220616e64207468697264206b6579206973207468652064656c65676174652e204d6574616461746101010228543a3a41737365744964190141737365744d657461646174613c4465706f73697442616c616e63654f663c542c20493e2c20426f756e6465645665633c75382c20543a3a537472696e674c696d69743e0a3e005000000000000000000000000000000000000000000458204d65746164617461206f6620616e2061737365742e015c186372656174650c0869644c436f6d706163743c543a3a417373657449643e1461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c6d696e5f62616c616e636528543a3a42616c616e63654cec2049737375652061206e657720636c617373206f662066756e6769626c65206173736574732066726f6d2061207075626c6963206f726967696e2e0029012054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c7920616e6420697473206f776e657220697320746865206f726967696e2e00290120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d75737420686176652073756666696369656e742066756e647320667265652e00c02046756e6473206f662073656e64657220617265207265736572766564206279206041737365744465706f736974602e003020506172616d65746572733a5d01202d20606964603a20546865206964656e746966696572206f6620746865206e65772061737365742e2054686973206d757374206e6f742062652063757272656e746c7920696e2075736520746f206964656e746966794c20616e206578697374696e672061737365742e5d01202d206061646d696e603a205468652061646d696e206f66207468697320636c617373206f66206173736574732e205468652061646d696e2069732074686520696e697469616c2061646472657373206f662065616368a0206d656d626572206f662074686520617373657420636c61737327732061646d696e207465616d2e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e009c20456d69747320604372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f2831296030666f7263655f637265617465100869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653469735f73756666696369656e7410626f6f6c2c6d696e5f62616c616e63654c436f6d706163743c543a3a42616c616e63653e4cfc2049737375652061206e657720636c617373206f662066756e6769626c65206173736574732066726f6d20612070726976696c65676564206f726967696e2e00b82054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c792e00a820546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e602e00a020556e6c696b652060637265617465602c206e6f2066756e6473206172652072657365727665642e005d01202d20606964603a20546865206964656e746966696572206f6620746865206e65772061737365742e2054686973206d757374206e6f742062652063757272656e746c7920696e2075736520746f206964656e746966794c20616e206578697374696e672061737365742e5d01202d20606f776e6572603a20546865206f776e6572206f66207468697320636c617373206f66206173736574732e20546865206f776e6572206861732066756c6c20737570657275736572207065726d697373696f6e737d01206f76657220746869732061737365742c20627574206d6179206c61746572206368616e676520616e6420636f6e66696775726520746865207065726d697373696f6e73207573696e6720607472616e736665725f6f776e657273686970604020616e6420607365745f7465616d602e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e00b020456d6974732060466f7263654372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f283129601c64657374726f79080869644c436f6d706163743c543a3a417373657449643e1c7769746e6573733844657374726f795769746e65737348902044657374726f79206120636c617373206f662066756e6769626c65206173736574732e00590120546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e60206f72206d757374206265205369676e656420616e64207468652073656e646572206d7573742062652074686564206f776e6572206f662074686520617373657420606964602e005101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652064657374726f7965642e2054686973206d757374206964656e7469667920616e206578697374696e671c2061737365742e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e004901204e4f54453a2049742063616e2062652068656c7066756c20746f20666972737420667265657a6520616e206173736574206265666f72652064657374726f79696e6720697420736f207468617420796f754d012063616e2070726f76696465206163637572617465207769746e65737320696e666f726d6174696f6e20616e642070726576656e742075736572732066726f6d206d616e6970756c6174696e67207374617465b420696e20612077617920746861742063616e206d616b652069742068617264657220746f2064657374726f792e0078205765696768743a20604f2863202b2070202b206129602077686572653ac4202d206063203d20287769746e6573732e6163636f756e7473202d207769746e6573732e73756666696369656e7473296070202d206073203d207769746e6573732e73756666696369656e74736068202d206061203d207769746e6573732e617070726f76616c7360106d696e740c0869644c436f6d706163743c543a3a417373657449643e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e308c204d696e7420617373657473206f66206120706172746963756c617220636c6173732e003d0120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d7573742062652074686520497373756572206f662074686520617373657420606964602e000101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74206d696e7465642e1101202d206062656e6566696369617279603a20546865206163636f756e7420746f206265206372656469746564207769746820746865206d696e746564206173736574732ec8202d2060616d6f756e74603a2054686520616d6f756e74206f662074686520617373657420746f206265206d696e7465642e009820456d697473206049737375656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f283129605901204d6f6465733a205072652d6578697374696e672062616c616e6365206f66206062656e6566696369617279603b204163636f756e74207072652d6578697374656e6365206f66206062656e6566696369617279602e106275726e0c0869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e3c490120526564756365207468652062616c616e6365206f66206077686f60206279206173206d75636820617320706f737369626c6520757020746f2060616d6f756e746020617373657473206f6620606964602e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204d616e61676572206f662074686520617373657420606964602e00dc204261696c732077697468206042616c616e63655a65726f6020696620746865206077686f6020697320616c726561647920646561642e000101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74206275726e65642ea4202d206077686f603a20546865206163636f756e7420746f20626520646562697465642066726f6d2e2d01202d2060616d6f756e74603a20546865206d6178696d756d20616d6f756e74206279207768696368206077686f6027732062616c616e63652073686f756c6420626520726564756365642e00550120456d69747320604275726e6564602077697468207468652061637475616c20616d6f756e74206275726e65642e20496620746869732074616b6573207468652062616c616e636520746f2062656c6f77207468653d01206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74206275726e656420697320696e6372656173656420746f2074616b6520697420746f207a65726f2e003c205765696768743a20604f283129600d01204d6f6465733a20506f73742d6578697374656e6365206f66206077686f603b20507265202620706f7374205a6f6d6269652d737461747573206f66206077686f602e207472616e736665720c0869644c436f6d706163743c543a3a417373657449643e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e48d4204d6f766520736f6d65206173736574732066726f6d207468652073656e646572206163636f756e7420746f20616e6f746865722e005c204f726967696e206d757374206265205369676e65642e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642ea0202d2060746172676574603a20546865206163636f756e7420746f2062652063726564697465642e5501202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652073656e64657227732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e64650120607461726765746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e6101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652073656e6465722062616c616e63652061626f7665207a65726f206275742062656c6f77c020746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605501204d6f6465733a205072652d6578697374656e6365206f662060746172676574603b20506f73742d6578697374656e6365206f662073656e6465723b204163636f756e74207072652d6578697374656e6365206f66282060746172676574602e4c7472616e736665725f6b6565705f616c6976650c0869644c436f6d706163743c543a3a417373657449643e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e485d01204d6f766520736f6d65206173736574732066726f6d207468652073656e646572206163636f756e7420746f20616e6f746865722c206b656570696e67207468652073656e646572206163636f756e7420616c6976652e005c204f726967696e206d757374206265205369676e65642e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642ea0202d2060746172676574603a20546865206163636f756e7420746f2062652063726564697465642e5501202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652073656e64657227732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e64650120607461726765746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e6101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652073656e6465722062616c616e63652061626f7665207a65726f206275742062656c6f77c020746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605501204d6f6465733a205072652d6578697374656e6365206f662060746172676574603b20506f73742d6578697374656e6365206f662073656e6465723b204163636f756e74207072652d6578697374656e6365206f66282060746172676574602e38666f7263655f7472616e73666572100869644c436f6d706163743c543a3a417373657449643e18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e4cb8204d6f766520736f6d65206173736574732066726f6d206f6e65206163636f756e7420746f20616e6f746865722e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642e9c202d2060736f75726365603a20546865206163636f756e7420746f20626520646562697465642e98202d206064657374603a20546865206163636f756e7420746f2062652063726564697465642e5d01202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652060736f757263656027732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e645d012060646573746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e5101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652060736f75726365602062616c616e63652061626f7665207a65726f20627574d82062656c6f7720746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605501204d6f6465733a205072652d6578697374656e6365206f66206064657374603b20506f73742d6578697374656e6365206f662060736f75726365603b204163636f756e74207072652d6578697374656e6365206f6620206064657374602e18667265657a65080869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528e420446973616c6c6f77206675727468657220756e70726976696c65676564207472616e73666572732066726f6d20616e206163636f756e742e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c642062652074686520467265657a6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e8c202d206077686f603a20546865206163636f756e7420746f2062652066726f7a656e2e004020456d697473206046726f7a656e602e003c205765696768743a20604f283129601074686177080869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528d020416c6c6f7720756e70726976696c65676564207472616e73666572732066726f6d20616e206163636f756e7420616761696e2e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e94202d206077686f603a20546865206163636f756e7420746f20626520756e66726f7a656e2e004020456d6974732060546861776564602e003c205765696768743a20604f2831296030667265657a655f6173736574040869644c436f6d706163743c543a3a417373657449643e24f420446973616c6c6f77206675727468657220756e70726976696c65676564207472616e736665727320666f722074686520617373657420636c6173732e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c642062652074686520467265657a6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e004020456d697473206046726f7a656e602e003c205765696768743a20604f2831296028746861775f6173736574040869644c436f6d706163743c543a3a417373657449643e24c820416c6c6f7720756e70726976696c65676564207472616e736665727320666f722074686520617373657420616761696e2e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206265207468617765642e004020456d6974732060546861776564602e003c205765696768743a20604f28312960487472616e736665725f6f776e657273686970080869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652878204368616e676520746865204f776e6572206f6620616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742ea0202d20606f776e6572603a20546865206e6577204f776e6572206f6620746869732061737365742e005820456d69747320604f776e65724368616e676564602e003c205765696768743a20604f28312960207365745f7465616d100869644c436f6d706163743c543a3a417373657449643e186973737565728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c667265657a65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636530c8204368616e676520746865204973737565722c2041646d696e20616e6420467265657a6572206f6620616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2ea8202d2060697373756572603a20546865206e657720497373756572206f6620746869732061737365742ea0202d206061646d696e603a20546865206e65772041646d696e206f6620746869732061737365742eb0202d2060667265657a6572603a20546865206e657720467265657a6572206f6620746869732061737365742e005420456d69747320605465616d4368616e676564602e003c205765696768743a20604f28312960307365745f6d65746164617461100869644c436f6d706163743c543a3a417373657449643e106e616d651c5665633c75383e1873796d626f6c1c5665633c75383e20646563696d616c73087538407c2053657420746865206d6574616461746120666f7220616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00dc2046756e6473206f662073656e64657220617265207265736572766564206163636f7264696e6720746f2074686520666f726d756c613a550120604d657461646174614465706f73697442617365202b204d657461646174614465706f73697450657242797465202a20286e616d652e6c656e202b2073796d626f6c2e6c656e29602074616b696e6720696e746f90206163636f756e7420616e7920616c72656164792072657365727665642066756e64732e00bc202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f207570646174652e5101202d20606e616d65603a20546865207573657220667269656e646c79206e616d65206f6620746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e5101202d206073796d626f6c603a205468652065786368616e67652073796d626f6c20666f7220746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e3101202d2060646563696d616c73603a20546865206e756d626572206f6620646563696d616c732074686973206173736574207573657320746f20726570726573656e74206f6e6520756e69742e005420456d69747320604d65746164617461536574602e003c205765696768743a20604f2831296038636c6561725f6d65746164617461040869644c436f6d706163743c543a3a417373657449643e2c8420436c65617220746865206d6574616461746120666f7220616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00a820416e79206465706f73697420697320667265656420666f7220746865206173736574206f776e65722e00b8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f20636c6561722e006420456d69747320604d65746164617461436c6561726564602e003c205765696768743a20604f2831296048666f7263655f7365745f6d65746164617461140869644c436f6d706163743c543a3a417373657449643e106e616d651c5665633c75383e1873796d626f6c1c5665633c75383e20646563696d616c730875382469735f66726f7a656e10626f6f6c38bc20466f72636520746865206d6574616461746120666f7220616e20617373657420746f20736f6d652076616c75652e0070204f726967696e206d75737420626520466f7263654f726967696e2e006c20416e79206465706f736974206973206c65667420616c6f6e652e00bc202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f207570646174652e5101202d20606e616d65603a20546865207573657220667269656e646c79206e616d65206f6620746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e5101202d206073796d626f6c603a205468652065786368616e67652073796d626f6c20666f7220746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e3101202d2060646563696d616c73603a20546865206e756d626572206f6620646563696d616c732074686973206173736574207573657320746f20726570726573656e74206f6e6520756e69742e005420456d69747320604d65746164617461536574602e005501205765696768743a20604f284e202b20532960207768657265204e20616e6420532061726520746865206c656e677468206f6620746865206e616d6520616e642073796d626f6c20726573706563746976656c792e50666f7263655f636c6561725f6d65746164617461040869644c436f6d706163743c543a3a417373657449643e2c8420436c65617220746865206d6574616461746120666f7220616e2061737365742e0070204f726967696e206d75737420626520466f7263654f726967696e2e006420416e79206465706f7369742069732072657475726e65642e00b8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f20636c6561722e006420456d69747320604d65746164617461436c6561726564602e003c205765696768743a20604f2831296048666f7263655f61737365745f737461747573200869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365186973737565728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c667265657a65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c6d696e5f62616c616e63654c436f6d706163743c543a3a42616c616e63653e3469735f73756666696369656e7410626f6f6c2469735f66726f7a656e10626f6f6c589c20416c746572207468652061747472696275746573206f66206120676976656e2061737365742e0078204f726967696e206d7573742062652060466f7263654f726967696e602e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742ea0202d20606f776e6572603a20546865206e6577204f776e6572206f6620746869732061737365742ea8202d2060697373756572603a20546865206e657720497373756572206f6620746869732061737365742ea0202d206061646d696e603a20546865206e65772041646d696e206f6620746869732061737365742eb0202d2060667265657a6572603a20546865206e657720467265657a6572206f6620746869732061737365742e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e5501202d206069735f73756666696369656e74603a20576865746865722061206e6f6e2d7a65726f2062616c616e6365206f662074686973206173736574206973206465706f736974206f662073756666696369656e7451012076616c756520746f206163636f756e7420666f722074686520737461746520626c6f6174206173736f6369617465642077697468206974732062616c616e63652073746f726167652e2049662073657420746f5901206074727565602c207468656e206e6f6e2d7a65726f2062616c616e636573206d61792062652073746f72656420776974686f757420612060636f6e73756d657260207265666572656e63652028616e642074687573510120616e20454420696e207468652042616c616e6365732070616c6c6574206f7220776861746576657220656c7365206973207573656420746f20636f6e74726f6c20757365722d6163636f756e74207374617465242067726f777468292e4101202d206069735f66726f7a656e603a2057686574686572207468697320617373657420636c6173732069732066726f7a656e2065786365707420666f72207065726d697373696f6e65642f61646d696e3820696e737472756374696f6e732e00ec20456d697473206041737365745374617475734368616e67656460207769746820746865206964656e74697479206f66207468652061737365742e003c205765696768743a20604f2831296040617070726f76655f7472616e736665720c0869644c436f6d706163743c543a3a417373657449643e2064656c65676174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e50310120417070726f766520616e20616d6f756e74206f6620617373657420666f72207472616e7366657220627920612064656c6567617465642074686972642d7061727479206163636f756e742e005c204f726967696e206d757374206265205369676e65642e00510120456e737572657320746861742060417070726f76616c4465706f7369746020776f727468206f66206043757272656e6379602069732072657365727665642066726f6d207369676e696e67206163636f756e74590120666f722074686520707572706f7365206f6620686f6c64696e672074686520617070726f76616c2e20496620736f6d65206e6f6e2d7a65726f20616d6f756e74206f662061737365747320697320616c72656164794d0120617070726f7665642066726f6d207369676e696e67206163636f756e7420746f206064656c6567617465602c207468656e20697420697320746f70706564207570206f7220756e726573657276656420746f58206d656574207468652072696768742076616c75652e004901204e4f54453a20546865207369676e696e67206163636f756e7420646f6573206e6f74206e65656420746f206f776e2060616d6f756e7460206f66206173736574732061742074686520706f696e74206f6648206d616b696e6720746869732063616c6c2e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742e1101202d206064656c6567617465603a20546865206163636f756e7420746f2064656c6567617465207065726d697373696f6e20746f207472616e736665722061737365742e4d01202d2060616d6f756e74603a2054686520616d6f756e74206f662061737365742074686174206d6179206265207472616e73666572726564206279206064656c6567617465602e204966207468657265206973e420616c726561647920616e20617070726f76616c20696e20706c6163652c207468656e207468697320616374732061646469746976656c792e009420456d6974732060417070726f7665645472616e7366657260206f6e20737563636573732e003c205765696768743a20604f283129603c63616e63656c5f617070726f76616c080869644c436f6d706163743c543a3a417373657449643e2064656c65676174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365344d012043616e63656c20616c6c206f6620736f6d6520617373657420617070726f76656420666f722064656c656761746564207472616e7366657220627920612074686972642d7061727479206163636f756e742e004101204f726967696e206d757374206265205369676e656420616e64207468657265206d75737420626520616e20617070726f76616c20696e20706c616365206265747765656e207369676e657220616e6430206064656c6567617465602e004d0120556e726573657276657320616e79206465706f7369742070726576696f75736c792072657365727665642062792060617070726f76655f7472616e736665726020666f722074686520617070726f76616c2e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742e0901202d206064656c6567617465603a20546865206163636f756e742064656c656761746564207065726d697373696f6e20746f207472616e736665722061737365742e009820456d6974732060417070726f76616c43616e63656c6c656460206f6e20737563636573732e003c205765696768743a20604f2831296054666f7263655f63616e63656c5f617070726f76616c0c0869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652064656c65676174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365344d012043616e63656c20616c6c206f6620736f6d6520617373657420617070726f76656420666f722064656c656761746564207472616e7366657220627920612074686972642d7061727479206163636f756e742e004d01204f726967696e206d7573742062652065697468657220466f7263654f726967696e206f72205369676e6564206f726967696e207769746820746865207369676e6572206265696e67207468652041646d696e6c206163636f756e74206f662074686520617373657420606964602e004d0120556e726573657276657320616e79206465706f7369742070726576696f75736c792072657365727665642062792060617070726f76655f7472616e736665726020666f722074686520617070726f76616c2e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742e0901202d206064656c6567617465603a20546865206163636f756e742064656c656761746564207065726d697373696f6e20746f207472616e736665722061737365742e009820456d6974732060417070726f76616c43616e63656c6c656460206f6e20737563636573732e003c205765696768743a20604f28312960447472616e736665725f617070726f766564100869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c64657374696e6174696f6e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e485101205472616e7366657220736f6d652061737365742062616c616e63652066726f6d20612070726576696f75736c792064656c656761746564206163636f756e7420746f20736f6d652074686972642d706172747924206163636f756e742e004d01204f726967696e206d757374206265205369676e656420616e64207468657265206d75737420626520616e20617070726f76616c20696e20706c6163652062792074686520606f776e65726020746f2074686520207369676e65722e005d012049662074686520656e7469726520616d6f756e7420617070726f76656420666f72207472616e73666572206973207472616e736665727265642c207468656e20616e79206465706f7369742070726576696f75736c79b82072657365727665642062792060617070726f76655f7472616e736665726020697320756e72657365727665642e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742e6501202d20606f776e6572603a20546865206163636f756e742077686963682070726576696f75736c7920617070726f76656420666f722061207472616e73666572206f66206174206c656173742060616d6f756e746020616e64c02066726f6d207768696368207468652061737365742062616c616e63652077696c6c2062652077697468647261776e2e6501202d206064657374696e6174696f6e603a20546865206163636f756e7420746f207768696368207468652061737365742062616c616e6365206f662060616d6f756e74602077696c6c206265207472616e736665727265642eb8202d2060616d6f756e74603a2054686520616d6f756e74206f662061737365747320746f207472616e736665722e00a020456d69747320605472616e73666572726564417070726f76656460206f6e20737563636573732e003c205765696768743a20604f2831296001481c437265617465640c1c41737365744964244163636f756e744964244163636f756e74496404ec20536f6d6520617373657420636c6173732077617320637265617465642e205c5b61737365745f69642c2063726561746f722c206f776e65725c5d184973737565640c1c41737365744964244163636f756e7449641c42616c616e636504ec20536f6d65206173736574732077657265206973737565642e205c5b61737365745f69642c206f776e65722c20746f74616c5f737570706c795c5d2c5472616e73666572726564101c41737365744964244163636f756e744964244163636f756e7449641c42616c616e636504f420536f6d65206173736574732077657265207472616e736665727265642e205c5b61737365745f69642c2066726f6d2c20746f2c20616d6f756e745c5d184275726e65640c1c41737365744964244163636f756e7449641c42616c616e636504e420536f6d652061737365747320776572652064657374726f7965642e205c5b61737365745f69642c206f776e65722c2062616c616e63655c5d2c5465616d4368616e676564101c41737365744964244163636f756e744964244163636f756e744964244163636f756e74496404050120546865206d616e6167656d656e74207465616d206368616e676564205c5b61737365745f69642c206973737565722c2061646d696e2c20667265657a65725c5d304f776e65724368616e676564081c41737365744964244163636f756e744964049820546865206f776e6572206368616e676564205c5b61737365745f69642c206f776e65725c5d1846726f7a656e081c41737365744964244163636f756e74496404c420536f6d65206163636f756e74206077686f60207761732066726f7a656e2e205c5b61737365745f69642c2077686f5c5d18546861776564081c41737365744964244163636f756e74496404c420536f6d65206163636f756e74206077686f6020776173207468617765642e205c5b61737365745f69642c2077686f5c5d2c417373657446726f7a656e041c4173736574496404bc20536f6d65206173736574206061737365745f696460207761732066726f7a656e2e205c5b61737365745f69645c5d2c4173736574546861776564041c4173736574496404bc20536f6d65206173736574206061737365745f69646020776173207468617765642e205c5b61737365745f69645c5d2444657374726f796564041c41737365744964047820416e20617373657420636c617373207761732064657374726f7965642e30466f72636543726561746564081c41737365744964244163636f756e74496404e020536f6d6520617373657420636c6173732077617320666f7263652d637265617465642e205c5b61737365745f69642c206f776e65725c5d2c4d65746164617461536574141c417373657449641c5665633c75383e1c5665633c75383e08753810626f6f6c046101204e6577206d6574616461746120686173206265656e2073657420666f7220616e2061737365742e205c5b61737365745f69642c206e616d652c2073796d626f6c2c20646563696d616c732c2069735f66726f7a656e5c5d3c4d65746164617461436c6561726564041c4173736574496404d4204d6574616461746120686173206265656e20636c656172656420666f7220616e2061737365742e205c5b61737365745f69645c5d40417070726f7665645472616e73666572101c41737365744964244163636f756e744964244163636f756e7449641c42616c616e636508350120284164646974696f6e616c292066756e64732068617665206265656e20617070726f76656420666f72207472616e7366657220746f20612064657374696e6174696f6e206163636f756e742e9c205c5b61737365745f69642c20736f757263652c2064656c65676174652c20616d6f756e745c5d44417070726f76616c43616e63656c6c65640c1c41737365744964244163636f756e744964244163636f756e74496408f420416e20617070726f76616c20666f72206163636f756e74206064656c656761746560207761732063616e63656c6c656420627920606f776e6572602e60205c5b69642c206f776e65722c2064656c65676174655c5d4c5472616e73666572726564417070726f766564141c41737365744964244163636f756e744964244163636f756e744964244163636f756e7449641c42616c616e63650c350120416e2060616d6f756e746020776173207472616e7366657272656420696e2069747320656e7469726574792066726f6d20606f776e65726020746f206064657374696e6174696f6e60206279642074686520617070726f766564206064656c6567617465602e94205c5b69642c206f776e65722c2064656c65676174652c2064657374696e6174696f6e5c5d4841737365745374617475734368616e676564041c4173736574496408fc20416e2061737365742068617320686164206974732061747472696275746573206368616e676564206279207468652060466f72636560206f726967696e2e1c205c5b69645c5d00302842616c616e63654c6f77041901204163636f756e742062616c616e6365206d7573742062652067726561746572207468616e206f7220657175616c20746f20746865207472616e7366657220616d6f756e742e2c42616c616e63655a65726f04702042616c616e63652073686f756c64206265206e6f6e2d7a65726f2e304e6f5065726d697373696f6e04ec20546865207369676e696e67206163636f756e7420686173206e6f207065726d697373696f6e20746f20646f20746865206f7065726174696f6e2e1c556e6b6e6f776e047c2054686520676976656e20617373657420494420697320756e6b6e6f776e2e1846726f7a656e047820546865206f726967696e206163636f756e742069732066726f7a656e2e14496e557365047c2054686520617373657420494420697320616c72656164792074616b656e2e284261645769746e657373047020496e76616c6964207769746e657373206461746120676976656e2e384d696e42616c616e63655a65726f0490204d696e696d756d2062616c616e63652073686f756c64206265206e6f6e2d7a65726f2e284e6f50726f7669646572046501204e6f2070726f7669646572207265666572656e63652065786973747320746f20616c6c6f772061206e6f6e2d7a65726f2062616c616e6365206f662061206e6f6e2d73656c662d73756666696369656e742061737365742e2c4261644d65746164617461046020496e76616c6964206d6574616461746120676976656e2e28556e617070726f76656404c8204e6f20617070726f76616c20657869737473207468617420776f756c6420616c6c6f7720746865207472616e736665722e20576f756c644469650439012054686520736f75726365206163636f756e7420776f756c64206e6f74207375727669766520746865207472616e7366657220616e64206974206e6565647320746f207374617920616c6976652e220c4d6d72014c4d65726b6c654d6f756e7461696e52616e67650c20526f6f74486173680100583c5420617320436f6e6669673c493e3e3a3a486173688000000000000000000000000000000000000000000000000000000000000000000458204c6174657374204d4d5220526f6f7420686173682e384e756d6265724f664c656176657301000c75363420000000000000000004b02043757272656e742073697a65206f6620746865204d4d5220286e756d626572206f66206c6561766573292e144e6f6465730001060c753634583c5420617320436f6e6669673c493e3e3a3a48617368000400108020486173686573206f6620746865206e6f64657320696e20746865204d4d522e002d01204e6f7465207468697320636f6c6c656374696f6e206f6e6c7920636f6e7461696e73204d4d52207065616b732c2074686520696e6e6572206e6f6465732028616e64206c656176657329bc20617265207072756e656420616e64206f6e6c792073746f72656420696e20746865204f6666636861696e2044422e00000000231c4c6f7474657279011c4c6f747465727918304c6f7474657279496e64657801000c7533321000000000001c4c6f74746572790000ac4c6f7474657279436f6e6669673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e3e040004ac2054686520636f6e66696775726174696f6e20666f72207468652063757272656e74206c6f74746572792e305061727469636970616e747301010530543a3a4163636f756e74496454287533322c205665633c43616c6c496e6465783e29001400000000000419012055736572732077686f2068617665207075726368617365642061207469636b65742e20284c6f747465727920496e6465782c205469636b6574732050757263686173656429305469636b657473436f756e7401000c7533321000000000047820546f74616c206e756d626572206f66207469636b65747320736f6c642e1c5469636b6574730001050c75333230543a3a4163636f756e74496400040010542045616368207469636b65742773206f776e65722e006101204d6179206861766520726573696475616c2073746f726167652066726f6d2070726576696f7573206c6f747465726965732e2055736520605469636b657473436f756e746020746f20736565207768696368206f6e657390206172652061637475616c6c792076616c6964207469636b6574206d617070696e67732e2c43616c6c496e64696365730100385665633c43616c6c496e6465783e0400083901205468652063616c6c732073746f72656420696e20746869732070616c6c657420746f206265207573656420696e20616e20616374697665206c6f747465727920696620636f6e666967757265646c2062792060436f6e6669673a3a56616c696461746543616c6c602e0110286275795f7469636b6574041063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2c8c204275792061207469636b657420746f20656e74657220746865206c6f74746572792e00050120546869732065787472696e7369632061637473206173206120706173737468726f7567682066756e6374696f6e20666f72206063616c6c602e20496e20616c6c0d0120736974756174696f6e73207768657265206063616c6c6020616c6f6e6520776f756c6420737563636565642c20746869732065787472696e7369632073686f756c642420737563636565642e001101204966206063616c6c60206973207375636365737366756c2c207468656e2077652077696c6c20617474656d707420746f2070757263686173652061207469636b65742c1501207768696368206d6179206661696c2073696c656e746c792e20546f206465746563742073756363657373206f662061207469636b65742070757263686173652c20796f75b02073686f756c64206c697374656e20666f722074686520605469636b6574426f7567687460206576656e742e00c820546869732065787472696e736963206d7573742062652063616c6c65642062792061207369676e6564206f726967696e2e247365745f63616c6c73041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e181501205365742063616c6c7320696e2073746f726167652077686963682063616e206265207573656420746f2070757263686173652061206c6f7474657279207469636b65742e00210120546869732066756e6374696f6e206f6e6c79206d61747465727320696620796f752075736520746865206056616c696461746543616c6c6020696d706c656d656e746174696f6e29012070726f766964656420627920746869732070616c6c65742c20776869636820757365732073746f7261676520746f2064657465726d696e65207468652076616c69642063616c6c732e00d420546869732065787472696e736963206d7573742062652063616c6c656420627920746865204d616e61676572206f726967696e2e3473746172745f6c6f7474657279101470726963653042616c616e63654f663c543e186c656e67746838543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d6265721872657065617410626f6f6c28c82053746172742061206c6f7474657279207573696e67207468652070726f766964656420636f6e66696775726174696f6e2e00d820546869732065787472696e736963206d7573742062652063616c6c65642062792074686520604d616e616765724f726967696e602e003020506172616d65746572733a00a0202a20607072696365603a2054686520636f7374206f6620612073696e676c65207469636b65742e3d01202a20606c656e677468603a20486f77206c6f6e6720746865206c6f74746572792073686f756c642072756e20666f72207374617274696e67206174207468652063757272656e7420626c6f636b2e4901202a206064656c6179603a20486f77206c6f6e6720616674657220746865206c6f747465727920656e642077652073686f756c642077616974206265666f7265207069636b696e6720612077696e6e65722ee4202a2060726570656174603a20496620746865206c6f74746572792073686f756c6420726570656174207768656e20636f6d706c657465642e2c73746f705f726570656174001001012049662061206c6f747465727920697320726570656174696e672c20796f752063616e20757365207468697320746f2073746f7020746865207265706561742ec020546865206c6f74746572792077696c6c20636f6e74696e756520746f2072756e20746f20636f6d706c6574696f6e2e00d820546869732065787472696e736963206d7573742062652063616c6c65642062792074686520604d616e616765724f726967696e602e0110384c6f7474657279537461727465640004702041206c6f747465727920686173206265656e2073746172746564213043616c6c73557064617465640004882041206e657720736574206f662063616c6c732068617665206265656e20736574211857696e6e657208244163636f756e7449641c42616c616e6365046820412077696e6e657220686173206265656e2063686f73656e21305469636b6574426f7567687408244163636f756e7449642443616c6c496e64657804682041207469636b657420686173206265656e20626f7567687421082050616c6c657449642050616c6c657449642070792f6c6f74746f046020546865204c6f747465727927732070616c6c6574206964204d617843616c6c730c753332100a00000004dc20546865206d6178206e756d626572206f662063616c6c7320617661696c61626c6520696e20612073696e676c65206c6f74746572792e1c344e6f74436f6e66696775726564048c2041206c6f747465727920686173206e6f74206265656e20636f6e666967757265642e28496e50726f677265737304882041206c6f747465727920697320616c726561647920696e2070726f67726573732e30416c7265616479456e64656404742041206c6f74746572792068617320616c726561647920656e6465642e2c496e76616c696443616c6c04ac205468652063616c6c206973206e6f742076616c696420666f7220616e206f70656e206c6f74746572792e50416c726561647950617274696369706174696e6704f420596f752061726520616c72656164792070617274696369706174696e6720696e20746865206c6f7474657279207769746820746869732063616c6c2e30546f6f4d616e7943616c6c73049420546f6f206d616e792063616c6c7320666f7220612073696e676c65206c6f74746572792e38456e636f64696e674661696c6564045c204661696c656420746f20656e636f64652063616c6c73241047696c74011047696c74102c5175657565546f74616c730100605665633c287533322c2042616c616e63654f663c543e293e04001461012054686520746f74616c73206f66206974656d7320616e642062616c616e6365732077697468696e20656163682071756575652e2053617665732061206c6f74206f662073746f7261676520726561647320696e20746865802063617365206f66207370617273656c79207061636b6564207175657565732e006d012054686520766563746f7220697320696e6465786564206279206475726174696f6e20696e2060506572696f6460732c206f6666736574206279206f6e652c20736f20696e666f726d6174696f6e206f6e20746865207175657565d42077686f7365206475726174696f6e206973206f6e652060506572696f646020776f756c642062652073746f72616765206030602e185175657565730101020c753332a05665633c47696c744269643c42616c616e63654f663c543e2c20543a3a4163636f756e7449643e3e0004000439012054686520717565756573206f66206269647320726561647920746f206265636f6d652067696c74732e20496e6465786564206279206475726174696f6e2028696e2060506572696f646073292e2c416374697665546f74616c01007841637469766547696c7473546f74616c3c42616c616e63654f663c543e3e9000000000000000000000000000000000000000000000000000000000000000000000000004d020496e666f726d6174696f6e2072656c6174696e6720746f207468652067696c74732063757272656e746c79206163746976652e184163746976650001022c416374697665496e646578a50141637469766547696c743c42616c616e63654f663c543e2c3c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a4163636f756e7449642c3c0a54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a426c6f636b4e756d6265723e000400042101205468652063757272656e746c79206163746976652067696c74732c20696e6465786564206163636f7264696e6720746f20746865206f72646572206f66206372656174696f6e2e011024706c6163655f6269640818616d6f756e7454436f6d706163743c42616c616e63654f663c543e3e206475726174696f6e0c753332349420506c61636520612062696420666f7220612067696c7420746f206265206973737565642e004101204f726967696e206d757374206265205369676e65642c20616e64206163636f756e74206d7573742068617665206174206c656173742060616d6f756e746020696e20667265652062616c616e63652e003d01202d2060616d6f756e74603a2054686520616d6f756e74206f6620746865206269643b2074686573652066756e64732077696c6c2062652072657365727665642e20496620746865206269642069734101207375636365737366756c6c7920656c65766174656420696e746f20616e206973737565642067696c742c207468656e2074686573652066756e64732077696c6c20636f6e74696e756520746f206265fc20726573657276656420756e74696c207468652067696c7420657870697265732e204d757374206265206174206c6561737420604d696e467265657a65602e5901202d20606475726174696f6e603a20546865206e756d626572206f6620706572696f647320666f72207768696368207468652066756e64732077696c6c206265206c6f636b6564206966207468652067696c742069735d01206973737565642e2049742077696c6c20657870697265206f6e6c79206166746572207468697320706572696f642068617320656c61707365642061667465722074686520706f696e74206f662069737375616e63652ed8204d7573742062652067726561746572207468616e203120616e64206e6f206d6f7265207468616e20605175657565436f756e74602e003820436f6d706c657869746965733ab0202d20605175657565735b6475726174696f6e5d2e6c656e28296020286a7573742074616b65206d6178292e2c726574726163745f6269640818616d6f756e7454436f6d706163743c42616c616e63654f663c543e3e206475726174696f6e0c7533321c84205265747261637420612070726576696f75736c7920706c61636564206269642e006101204f726967696e206d757374206265205369676e65642c20616e6420746865206163636f756e742073686f756c6420686176652070726576696f75736c79206973737565642061207374696c6c2d6163746976652062696470206f662060616d6f756e746020666f7220606475726174696f6e602e00b0202d2060616d6f756e74603a2054686520616d6f756e74206f66207468652070726576696f7573206269642ec0202d20606475726174696f6e603a20546865206475726174696f6e206f66207468652070726576696f7573206269642e287365745f746172676574041874617267657450436f6d706163743c5065727175696e74696c6c3e189420536574207461726765742070726f706f7274696f6e206f662067696c742d66756e64732e0078204f726967696e206d757374206265206041646d696e4f726967696e602e005d01202d2060746172676574603a20546865207461726765742070726f706f7274696f6e206f6620656666656374697665206973737565642066756e647320746861742073686f756c6420626520756e6465722067696c74734420617420616e79206f6e652074696d652e10746861770414696e64657850436f6d706163743c416374697665496e6465783e1c59012052656d6f766520616e206163746976652062757420657870697265642067696c742e2052657365727665642066756e647320756e6465722067696c742061726520667265656420616e642062616c616e63652069735d012061646a757374656420746f20656e737572652074686174207468652066756e64732067726f77206f7220736872696e6b20746f206d61696e7461696e20746865206571756976616c656e742070726f706f7274696f6e84206f662065666665637469766520746f74616c206973737565642066756e64732e006101204f726967696e206d757374206265205369676e656420616e6420746865206163636f756e74206d75737420626520746865206f776e6572206f66207468652067696c74206f662074686520676976656e20696e6465782e00bc202d2060696e646578603a2054686520696e646578206f66207468652067696c7420746f206265207468617765642e011024426964506c616365640c244163636f756e7449643042616c616e63654f663c543e0c753332087c20412062696420776173207375636365737366756c6c7920706c616365642e70205c5b2077686f2c20616d6f756e742c206475726174696f6e205c5d304269645265747261637465640c244163636f756e7449643042616c616e63654f663c543e0c75333208090120412062696420776173207375636365737366756c6c792072656d6f76656420286265666f7265206265696e6720616363657074656420617320612067696c74292e70205c5b2077686f2c20616d6f756e742c206475726174696f6e205c5d2847696c74497373756564102c416374697665496e64657838543a3a426c6f636b4e756d626572244163636f756e7449643042616c616e63654f663c543e0831012041206269642077617320616363657074656420617320612067696c742e205468652062616c616e6365206d6179206e6f742062652072656c656173656420756e74696c206578706972792e84205c5b20696e6465782c206578706972792c2077686f2c20616d6f756e74205c5d2847696c74546861776564102c416374697665496e646578244163636f756e7449643042616c616e63654f663c543e3042616c616e63654f663c543e088420416e20657870697265642067696c7420686173206265656e207468617765642ed4205c5b20696e6465782c2077686f2c206f726967696e616c5f616d6f756e742c206164646974696f6e616c5f616d6f756e74205c5d1c285175657565436f756e740c753332102c010000085d01204e756d626572206f66206475726174696f6e2071756575657320696e20746f74616c2e2054686973207365747320746865206d6178696d756d206475726174696f6e20737570706f727465642c2077686963682069738c20746869732076616c7565206d756c7469706c6965642062792060506572696f64602e2c4d617851756575654c656e0c75333210e803000004f0204d6178696d756d206e756d626572206f66206974656d732074686174206d617920626520696e2065616368206475726174696f6e2071756575652e304669666f51756575654c656e0c75333210f40100000c090120506f7274696f6e206f662074686520717565756520776869636820697320667265652066726f6d206f72646572696e6720616e64206a7573742061204649464f2e009c204d757374206265206e6f2067726561746572207468616e20604d617851756575654c656e602e18506572696f6438543a3a426c6f636b4e756d62657210002f0d0008410120546865206261736520706572696f6420666f7220746865206475726174696f6e207175657565732e20546869732069732074686520636f6d6d6f6e206d756c7469706c65206163726f737320616c6ccc20737570706f7274656420667265657a696e67206475726174696f6e7320746861742063616e206265206269642075706f6e2e244d696e467265657a653042616c616e63654f663c543e400000c16ff2862300000000000000000018550120546865206d696e696d756d20616d6f756e74206f662066756e64732074686174206d6179206265206f66666572656420746f20667265657a6520666f7220612067696c742e204e6f746520746861742074686973510120646f6573206e6f742061637475616c6c79206c696d69742074686520616d6f756e74207768696368206d61792062652066726f7a656e20696e20612067696c742073696e63652067696c7473206d617920626519012073706c697420757020696e206f7264657220746f207361746973667920746865206465736972656420616d6f756e74206f662066756e647320756e6465722067696c74732e0065012049742073686f756c64206265206174206c656173742062696720656e6f75676820746f20656e737572652074686174207468657265206973206e6f20706f737369626c652073746f72616765207370616d2061747461636b64206f722071756575652d66696c6c696e672061747461636b2e30496e74616b65506572696f6438543a3a426c6f636b4e756d626572100a00000014590120546865206e756d626572206f6620626c6f636b73206265747765656e20636f6e736563757469766520617474656d70747320746f206973737565206d6f72652067696c747320696e20616e206566666f727420746f9c2067657420746f207468652074617267657420616d6f756e7420746f2062652066726f7a656e2e005d012041206c61726765722076616c756520726573756c747320696e2066657765722073746f726167652068697473206561636820626c6f636b2c20627574206120736c6f77657220706572696f6420746f2067657420746f3020746865207461726765742e344d6178496e74616b65426964730c753332100a0000000c550120546865206d6178696d756d20616d6f756e74206f66206269647320746861742063616e206265207475726e656420696e746f206973737565642067696c7473206561636820626c6f636b2e2041206c617267657261012076616c75652068657265206d65616e73206c657373206f662074686520626c6f636b20617661696c61626c6520666f72207472616e73616374696f6e732073686f756c64207468657265206265206120676c7574206f66b4206269647320746f206d616b6520696e746f2067696c747320746f20726561636820746865207461726765742e20404475726174696f6e546f6f536d616c6c04a820546865206475726174696f6e206f662074686520626964206973206c657373207468616e206f6e652e384475726174696f6e546f6f42696704f820546865206475726174696f6e20697320746865206269642069732067726561746572207468616e20746865206e756d626572206f66207175657565732e38416d6f756e74546f6f536d616c6c04e02054686520616d6f756e74206f662074686520626964206973206c657373207468616e20746865206d696e696d756d20616c6c6f7765642e24426964546f6f4c6f770865012054686520717565756520666f7220746865206269642773206475726174696f6e2069732066756c6c20616e642074686520616d6f756e742062696420697320746f6f206c6f7720746f2067657420696e207468726f7567686c207265706c6163696e6720616e206578697374696e67206269642e1c556e6b6e6f776e045c2047696c7420696e64657820697320756e6b6e6f776e2e204e6f744f776e6572046c204e6f7420746865206f776e6572206f66207468652067696c742e284e6f744578706972656404742047696c74206e6f74207965742061742065787069727920646174652e204e6f74466f756e6404ac2054686520676976656e2062696420666f722072657472616374696f6e206973206e6f7420666f756e642e251c556e6971756573011c556e69717565731814436c61737300010228543a3a436c6173734964c8436c61737344657461696c733c543a3a4163636f756e7449642c204465706f73697442616c616e63654f663c542c20493e3e000400046c2044657461696c73206f6620616e20617373657420636c6173732e1c4163636f756e7400030c30543a3a4163636f756e74496428543a3a436c617373496434543a3a496e7374616e636549640c020202082829040008610120546865206173736574732068656c6420627920616e7920676976656e206163636f756e743b20736574206f757420746869732077617920736f207468617420617373657473206f776e656420627920612073696e676c656c206163636f756e742063616e20626520656e756d6572617465642e14417373657400020228543a3a436c617373496434543a3a496e7374616e63654964d4496e7374616e636544657461696c733c543a3a4163636f756e7449642c204465706f73697442616c616e63654f663c542c20493e3e02040004d4205468652061737365747320696e206578697374656e636520616e64207468656972206f776e6572736869702064657461696c732e3c436c6173734d657461646174614f6600010228543a3a436c6173734964d4436c6173734d657461646174613c4465706f73697442616c616e63654f663c542c20493e2c20543a3a537472696e674c696d69743e0004000470204d65746164617461206f6620616e20617373657420636c6173732e48496e7374616e63654d657461646174614f6600020228543a3a436c617373496434543a3a496e7374616e63654964e0496e7374616e63654d657461646174613c4465706f73697442616c616e63654f663c542c20493e2c20543a3a537472696e674c696d69743e020400047c204d65746164617461206f6620616e20617373657420696e7374616e63652e2441747472696275746500030c28543a3a436c6173734964544f7074696f6e3c543a3a496e7374616e636549643e6c426f756e6465645665633c75382c20543a3a4b65794c696d69743e0c020202dc28426f756e6465645665633c75382c20543a3a56616c75654c696d69743e2c204465706f73697442616c616e63654f663c542c20493e2904000470204d65746164617461206f6620616e20617373657420636c6173732e0158186372656174650814636c6173734c436f6d706163743c543a3a436c61737349643e1461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636540fc2049737375652061206e657720636c617373206f66206e6f6e2d66756e6769626c65206173736574732066726f6d2061207075626c6963206f726967696e2e0029012054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c7920616e6420697473206f776e657220697320746865206f726967696e2e00290120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d75737420686176652073756666696369656e742066756e647320667265652e00b4206041737365744465706f736974602066756e6473206f662073656e646572206172652072657365727665642e003020506172616d65746572733a5501202d2060636c617373603a20546865206964656e746966696572206f6620746865206e657720617373657420636c6173732e2054686973206d757374206e6f742062652063757272656e746c7920696e207573652e5d01202d206061646d696e603a205468652061646d696e206f66207468697320636c617373206f66206173736574732e205468652061646d696e2069732074686520696e697469616c2061646472657373206f662065616368a0206d656d626572206f662074686520617373657420636c61737327732061646d696e207465616d2e009c20456d69747320604372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f2831296030666f7263655f6372656174650c14636c6173734c436f6d706163743c543a3a436c61737349643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636530667265655f686f6c64696e6710626f6f6c400d012049737375652061206e657720636c617373206f66206e6f6e2d66756e6769626c65206173736574732066726f6d20612070726976696c65676564206f726967696e2e00b82054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c792e00a820546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e602e00a020556e6c696b652060637265617465602c206e6f2066756e6473206172652072657365727665642e003d01202d2060636c617373603a20546865206964656e746966696572206f6620746865206e65772061737365742e2054686973206d757374206e6f742062652063757272656e746c7920696e207573652e5d01202d20606f776e6572603a20546865206f776e6572206f66207468697320636c617373206f66206173736574732e20546865206f776e6572206861732066756c6c20737570657275736572207065726d697373696f6e732901206f76657220746869732061737365742c20627574206d6179206c61746572206368616e676520616e6420636f6e66696775726520746865207065726d697373696f6e73207573696e679420607472616e736665725f6f776e6572736869706020616e6420607365745f7465616d602e00b020456d6974732060466f7263654372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f283129601c64657374726f790814636c6173734c436f6d706163743c543a3a436c61737349643e1c7769746e6573733844657374726f795769746e6573733c902044657374726f79206120636c617373206f662066756e6769626c65206173736574732e00610120546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e60206f72206d75737420626520605369676e65646020616e64207468652073656e646572206d7573742062652074686570206f776e6572206f66207468652061737365742060636c617373602e00f8202d2060636c617373603a20546865206964656e746966696572206f662074686520617373657420636c61737320746f2062652064657374726f7965642e4901202d20607769746e657373603a20496e666f726d6174696f6e206f6e2074686520696e7374616e636573206d696e74656420696e2074686520617373657420636c6173732e2054686973206d7573742062652420636f72726563742e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e0068205765696768743a20604f286e202b206d29602077686572653a68202d20606e203d207769746e6573732e696e7374616e636573608c202d20606d203d207769746e6573732e696e7374616e63655f6d6574616461746173606c202d206061203d207769746e6573732e6174747269627574657360106d696e740c14636c6173734c436f6d706163743c543a3a436c61737349643e20696e7374616e636558436f6d706163743c543a3a496e7374616e636549643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652cb8204d696e7420616e20617373657420696e7374616e6365206f66206120706172746963756c617220636c6173732e00490120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d7573742062652074686520497373756572206f66207468652061737365742060636c617373602e00c0202d2060636c617373603a2054686520636c617373206f662074686520617373657420746f206265206d696e7465642ef0202d2060696e7374616e6365603a2054686520696e7374616e63652076616c7565206f662074686520617373657420746f206265206d696e7465642ee0202d206062656e6566696369617279603a2054686520696e697469616c206f776e6572206f6620746865206d696e7465642061737365742e009820456d697473206049737375656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f28312960106275726e0c14636c6173734c436f6d706163743c543a3a436c61737349643e20696e7374616e636558436f6d706163743c543a3a496e7374616e636549643e2c636865636b5f6f776e6572ac4f7074696f6e3c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e34842044657374726f7920612073696e676c6520617373657420696e7374616e63652e003d01204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f66207468652061737365742060636c617373602e00c0202d2060636c617373603a2054686520636c617373206f662074686520617373657420746f206265206275726e65642ed8202d2060696e7374616e6365603a2054686520696e7374616e6365206f662074686520617373657420746f206265206275726e65642e5501202d2060636865636b5f6f776e6572603a2049662060536f6d6560207468656e20746865206f7065726174696f6e2077696c6c206661696c2077697468206057726f6e674f776e65726020756e6c65737320746865802020206173736574206973206f776e656420627920746869732076616c75652e00b820456d69747320604275726e6564602077697468207468652061637475616c20616d6f756e74206275726e65642e003c205765696768743a20604f2831296080204d6f6465733a2060636865636b5f6f776e65722e69735f736f6d652829602e207472616e736665720c14636c6173734c436f6d706163743c543a3a436c61737349643e20696e7374616e636558436f6d706163743c543a3a496e7374616e636549643e10646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653cc8204d6f766520616e2061737365742066726f6d207468652073656e646572206163636f756e7420746f20616e6f746865722e00f8204f726967696e206d757374206265205369676e656420616e6420746865207369676e696e67206163636f756e74206d757374206265206569746865723a88202d207468652041646d696e206f66207468652061737365742060636c617373603b94202d20746865204f776e6572206f66207468652061737365742060696e7374616e6365603b6101202d2074686520617070726f7665642064656c656761746520666f72207468652061737365742060696e7374616e6365602028696e207468697320636173652c2074686520617070726f76616c206973207265736574292e002c20417267756d656e74733ad4202d2060636c617373603a2054686520636c617373206f662074686520617373657420746f206265207472616e736665727265642eec202d2060696e7374616e6365603a2054686520696e7374616e6365206f662074686520617373657420746f206265207472616e736665727265642ee4202d206064657374603a20546865206163636f756e7420746f2072656365697665206f776e657273686970206f66207468652061737365742e005420456d69747320605472616e73666572726564602e003c205765696768743a20604f283129602472656465706f7369740814636c6173734c436f6d706163743c543a3a436c61737349643e24696e7374616e636573485665633c543a3a496e7374616e636549643e44a02052656576616c7561746520746865206465706f73697473206f6e20736f6d65206173736574732e003d01204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f66207468652061737365742060636c617373602e00c0202d2060636c617373603a2054686520636c617373206f662074686520617373657420746f2062652066726f7a656e2e5101202d2060696e7374616e636573603a2054686520696e7374616e636573206f662074686520617373657420636c6173732077686f7365206465706f736974732077696c6c2062652072656576616c75617465642e005901204e4f54453a205468697320657869737473206173206120626573742d6566666f72742066756e6374696f6e2e20416e7920617373657420696e7374616e6365732077686963682061726520756e6b6e6f776e206f723d0120696e207468652063617365207468617420746865206f776e6572206163636f756e7420646f6573206e6f7420686176652072657365727661626c652066756e647320746f2070617920666f7220616101206465706f73697420696e637265617365206172652069676e6f7265642e2047656e6572616c6c7920746865206f776e65722069736e277420676f696e6720746f2063616c6c2074686973206f6e20696e7374616e63657359012077686f7365206578697374696e67206465706f736974206973206c657373207468616e2074686520726566726573686564206465706f73697420617320697420776f756c64206f6e6c7920636f7374207468656d2c7c20736f2069742773206f66206c6974746c6520636f6e73657175656e63652e0055012049742077696c6c207374696c6c2072657475726e20616e206572726f7220696e20746865206361736520746861742074686520636c61737320697320756e6b6e6f776e206f6620746865207369676e657220697368206e6f74207065726d697474656420746f2063616c6c2069742e0074205765696768743a20604f28696e7374616e6365732e6c656e2829296018667265657a650814636c6173734c436f6d706163743c543a3a436c61737349643e20696e7374616e636558436f6d706163743c543a3a496e7374616e636549643e28f420446973616c6c6f77206675727468657220756e70726976696c65676564207472616e73666572206f6620616e20617373657420696e7374616e63652e004501204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c642062652074686520467265657a6572206f66207468652061737365742060636c617373602e00c0202d2060636c617373603a2054686520636c617373206f662074686520617373657420746f2062652066726f7a656e2ed8202d2060696e7374616e6365603a2054686520696e7374616e6365206f662074686520617373657420746f2062652066726f7a656e2e004020456d697473206046726f7a656e602e003c205765696768743a20604f2831296010746861770814636c6173734c436f6d706163743c543a3a436c61737349643e20696e7374616e636558436f6d706163743c543a3a496e7374616e636549643e28d42052652d616c6c6f7720756e70726976696c65676564207472616e73666572206f6620616e20617373657420696e7374616e63652e004501204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c642062652074686520467265657a6572206f66207468652061737365742060636c617373602e00c0202d2060636c617373603a2054686520636c617373206f662074686520617373657420746f206265207468617765642ed8202d2060696e7374616e6365603a2054686520696e7374616e6365206f662074686520617373657420746f206265207468617765642e004020456d6974732060546861776564602e003c205765696768743a20604f2831296030667265657a655f636c6173730414636c6173734c436f6d706163743c543a3a436c61737349643e24050120446973616c6c6f77206675727468657220756e70726976696c65676564207472616e736665727320666f7220612077686f6c6520617373657420636c6173732e004501204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c642062652074686520467265657a6572206f66207468652061737365742060636c617373602e00a4202d2060636c617373603a2054686520617373657420636c61737320746f2062652066726f7a656e2e005420456d6974732060436c61737346726f7a656e602e003c205765696768743a20604f2831296028746861775f636c6173730414636c6173734c436f6d706163743c543a3a436c61737349643e24e42052652d616c6c6f7720756e70726976696c65676564207472616e736665727320666f7220612077686f6c6520617373657420636c6173732e003d01204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f66207468652061737365742060636c617373602e008c202d2060636c617373603a2054686520636c61737320746f206265207468617765642e005420456d6974732060436c617373546861776564602e003c205765696768743a20604f28312960487472616e736665725f6f776e6572736869700814636c6173734c436f6d706163743c543a3a436c61737349643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652890204368616e676520746865204f776e6572206f6620616e20617373657420636c6173732e003d01204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f66207468652061737365742060636c617373602e00e8202d2060636c617373603a2054686520617373657420636c6173732077686f7365206f776e65722073686f756c64206265206368616e6765642eb8202d20606f776e6572603a20546865206e6577204f776e6572206f66207468697320617373657420636c6173732e005820456d69747320604f776e65724368616e676564602e003c205765696768743a20604f28312960207365745f7465616d1014636c6173734c436f6d706163743c543a3a436c61737349643e186973737565728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c667265657a65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636530e0204368616e676520746865204973737565722c2041646d696e20616e6420467265657a6572206f6620616e20617373657420636c6173732e003d01204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f66207468652061737365742060636c617373602e00e4202d2060636c617373603a2054686520617373657420636c6173732077686f7365207465616d2073686f756c64206265206368616e6765642ec0202d2060697373756572603a20546865206e657720497373756572206f66207468697320617373657420636c6173732eb8202d206061646d696e603a20546865206e65772041646d696e206f66207468697320617373657420636c6173732ec8202d2060667265657a6572603a20546865206e657720467265657a6572206f66207468697320617373657420636c6173732e005420456d69747320605465616d4368616e676564602e003c205765696768743a20604f2831296040617070726f76655f7472616e736665720c14636c6173734c436f6d706163743c543a3a436c61737349643e20696e7374616e636558436f6d706163743c543a3a496e7374616e636549643e2064656c65676174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c290120417070726f766520616e20696e7374616e636520746f206265207472616e7366657272656420627920612064656c6567617465642074686972642d7061727479206163636f756e742e001501204f726967696e206d757374206265205369676e656420616e64206d75737420626520746865206f776e6572206f66207468652061737365742060696e7374616e6365602e002501202d2060636c617373603a2054686520636c617373206f662074686520617373657420746f20626520617070726f76656420666f722064656c656761746564207472616e736665722e3d01202d2060696e7374616e6365603a2054686520696e7374616e6365206f662074686520617373657420746f20626520617070726f76656420666f722064656c656761746564207472616e736665722e2101202d206064656c6567617465603a20546865206163636f756e7420746f2064656c6567617465207065726d697373696f6e20746f207472616e73666572207468652061737365742e009420456d6974732060417070726f7665645472616e7366657260206f6e20737563636573732e003c205765696768743a20604f283129603c63616e63656c5f617070726f76616c0c14636c6173734c436f6d706163743c543a3a436c61737349643e20696e7374616e636558436f6d706163743c543a3a496e7374616e636549643e506d617962655f636865636b5f64656c6567617465ac4f7074696f6e3c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e4019012043616e63656c20746865207072696f7220617070726f76616c20666f7220746865207472616e73666572206f6620616e20617373657420627920612064656c65676174652e005c204f726967696e206d757374206265206569746865723a58202d207468652060466f72636560206f726967696e3b0501202d20605369676e656460207769746820746865207369676e6572206265696e67207468652041646d696e206f66207468652061737365742060636c617373603b1101202d20605369676e656460207769746820746865207369676e6572206265696e6720746865204f776e6572206f66207468652061737365742060696e7374616e6365603b002c20417267756d656e74733a1d01202d2060636c617373603a2054686520636c617373206f6620746865206173736574206f662077686f736520617070726f76616c2077696c6c2062652063616e63656c6c65642e3501202d2060696e7374616e6365603a2054686520696e7374616e6365206f6620746865206173736574206f662077686f736520617070726f76616c2077696c6c2062652063616e63656c6c65642e5501202d20606d617962655f636865636b5f64656c6567617465603a2049662060536f6d65602077696c6c20656e7375726520746861742074686520676976656e206163636f756e7420697320746865206f6e6520746fb42020207768696368207065726d697373696f6e206f66207472616e736665722069732064656c6567617465642e009820456d6974732060417070726f76616c43616e63656c6c656460206f6e20737563636573732e003c205765696768743a20604f2831296048666f7263655f61737365745f7374617475731c14636c6173734c436f6d706163743c543a3a436c61737349643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365186973737565728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c667265657a65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636530667265655f686f6c64696e6710626f6f6c2469735f66726f7a656e10626f6f6c449c20416c746572207468652061747472696275746573206f66206120676976656e2061737365742e0078204f726967696e206d7573742062652060466f7263654f726967696e602e00a0202d2060636c617373603a20546865206964656e746966696572206f66207468652061737365742ea0202d20606f776e6572603a20546865206e6577204f776e6572206f6620746869732061737365742ea8202d2060697373756572603a20546865206e657720497373756572206f6620746869732061737365742ea0202d206061646d696e603a20546865206e65772041646d696e206f6620746869732061737365742eb0202d2060667265657a6572603a20546865206e657720467265657a6572206f6620746869732061737365742e4d01202d2060667265655f686f6c64696e67603a20576865746865722061206465706f7369742069732074616b656e20666f7220686f6c64696e6720616e20696e7374616e6365206f66207468697320617373657424202020636c6173732e4101202d206069735f66726f7a656e603a2057686574686572207468697320617373657420636c6173732069732066726f7a656e2065786365707420666f72207065726d697373696f6e65642f61646d696e3820696e737472756374696f6e732e00ec20456d697473206041737365745374617475734368616e67656460207769746820746865206964656e74697479206f66207468652061737365742e003c205765696768743a20604f28312960347365745f6174747269627574651014636c6173734c436f6d706163743c543a3a436c61737349643e386d617962655f696e7374616e6365544f7074696f6e3c543a3a496e7374616e636549643e0c6b65796c426f756e6465645665633c75382c20543a3a4b65794c696d69743e1476616c756574426f756e6465645665633c75382c20543a3a56616c75654c696d69743e44c42053657420616e2061747472696275746520666f7220616e20617373657420636c617373206f7220696e7374616e63652e006101204f726967696e206d757374206265206569746865722060466f7263654f726967696e60206f72205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f66207468653c2061737365742060636c617373602e00550120496620746865206f726967696e206973205369676e65642c207468656e2066756e6473206f66207369676e657220617265207265736572766564206163636f7264696e6720746f2074686520666f726d756c613a2d0120604d657461646174614465706f73697442617365202b204465706f73697450657242797465202a20286b65792e6c656e202b2076616c75652e6c656e29602074616b696e6720696e746f90206163636f756e7420616e7920616c72656164792072657365727665642066756e64732e003d01202d2060636c617373603a20546865206964656e746966696572206f662074686520617373657420636c6173732077686f736520696e7374616e63652773206d6574616461746120746f207365742e4101202d20606d617962655f696e7374616e6365603a20546865206964656e746966696572206f662074686520617373657420696e7374616e63652077686f7365206d6574616461746120746f207365742e8c202d20606b6579603a20546865206b6579206f6620746865206174747269627574652ed0202d206076616c7565603a205468652076616c756520746f20776869636820746f2073657420746865206174747269627574652e005820456d6974732060417474726962757465536574602e003c205765696768743a20604f283129603c636c6561725f6174747269627574650c14636c6173734c436f6d706163743c543a3a436c61737349643e386d617962655f696e7374616e6365544f7074696f6e3c543a3a496e7374616e636549643e0c6b65796c426f756e6465645665633c75382c20543a3a4b65794c696d69743e44c42053657420616e2061747472696275746520666f7220616e20617373657420636c617373206f7220696e7374616e63652e006101204f726967696e206d757374206265206569746865722060466f7263654f726967696e60206f72205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f66207468653c2061737365742060636c617373602e00550120496620746865206f726967696e206973205369676e65642c207468656e2066756e6473206f66207369676e657220617265207265736572766564206163636f7264696e6720746f2074686520666f726d756c613a2d0120604d657461646174614465706f73697442617365202b204465706f73697450657242797465202a20286b65792e6c656e202b2076616c75652e6c656e29602074616b696e6720696e746f90206163636f756e7420616e7920616c72656164792072657365727665642066756e64732e003d01202d2060636c617373603a20546865206964656e746966696572206f662074686520617373657420636c6173732077686f736520696e7374616e63652773206d6574616461746120746f207365742e2901202d2060696e7374616e6365603a20546865206964656e746966696572206f662074686520617373657420696e7374616e63652077686f7365206d6574616461746120746f207365742e8c202d20606b6579603a20546865206b6579206f6620746865206174747269627574652ed0202d206076616c7565603a205468652076616c756520746f20776869636820746f2073657420746865206174747269627574652e005820456d6974732060417474726962757465536574602e003c205765696768743a20604f28312960307365745f6d657461646174611014636c6173734c436f6d706163743c543a3a436c61737349643e20696e7374616e636558436f6d706163743c543a3a496e7374616e636549643e106461746178426f756e6465645665633c75382c20543a3a537472696e674c696d69743e2469735f66726f7a656e10626f6f6c44a02053657420746865206d6574616461746120666f7220616e20617373657420696e7374616e63652e006101204f726967696e206d757374206265206569746865722060466f7263654f726967696e60206f72205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f66207468653c2061737365742060636c617373602e00550120496620746865206f726967696e206973205369676e65642c207468656e2066756e6473206f66207369676e657220617265207265736572766564206163636f7264696e6720746f2074686520666f726d756c613af820604d657461646174614465706f73697442617365202b204465706f73697450657242797465202a20646174612e6c656e602074616b696e6720696e746f90206163636f756e7420616e7920616c72656164792072657365727665642066756e64732e003d01202d2060636c617373603a20546865206964656e746966696572206f662074686520617373657420636c6173732077686f736520696e7374616e63652773206d6574616461746120746f207365742e2901202d2060696e7374616e6365603a20546865206964656e746966696572206f662074686520617373657420696e7374616e63652077686f7365206d6574616461746120746f207365742e5501202d206064617461603a205468652067656e6572616c20696e666f726d6174696f6e206f6620746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e3901202d206069735f66726f7a656e603a205768657468657220746865206d657461646174612073686f756c642062652066726f7a656e20616761696e73742066757274686572206368616e6765732e005420456d69747320604d65746164617461536574602e003c205765696768743a20604f2831296038636c6561725f6d657461646174610814636c6173734c436f6d706163743c543a3a436c61737349643e20696e7374616e636558436f6d706163743c543a3a496e7374616e636549643e34a820436c65617220746865206d6574616461746120666f7220616e20617373657420696e7374616e63652e006101204f726967696e206d757374206265206569746865722060466f7263654f726967696e60206f72205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f6620746865482061737365742060696e7374616e6365602e00c020416e79206465706f73697420697320667265656420666f722074686520617373657420636c617373206f776e65722e004501202d2060636c617373603a20546865206964656e746966696572206f662074686520617373657420636c6173732077686f736520696e7374616e63652773206d6574616461746120746f20636c6561722e3101202d2060696e7374616e6365603a20546865206964656e746966696572206f662074686520617373657420696e7374616e63652077686f7365206d6574616461746120746f20636c6561722e006420456d69747320604d65746164617461436c6561726564602e003c205765696768743a20604f28312960487365745f636c6173735f6d657461646174610c14636c6173734c436f6d706163743c543a3a436c61737349643e106461746178426f756e6465645665633c75382c20543a3a537472696e674c696d69743e2469735f66726f7a656e10626f6f6c40942053657420746865206d6574616461746120666f7220616e20617373657420636c6173732e005901204f726967696e206d757374206265206569746865722060466f7263654f726967696e60206f7220605369676e65646020616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f664c207468652061737365742060636c617373602e005d0120496620746865206f726967696e20697320605369676e6564602c207468656e2066756e6473206f66207369676e657220617265207265736572766564206163636f7264696e6720746f2074686520666f726d756c613af820604d657461646174614465706f73697442617365202b204465706f73697450657242797465202a20646174612e6c656e602074616b696e6720696e746f90206163636f756e7420616e7920616c72656164792072657365727665642066756e64732e000501202d2060636c617373603a20546865206964656e746966696572206f66207468652061737365742077686f7365206d6574616461746120746f207570646174652e5501202d206064617461603a205468652067656e6572616c20696e666f726d6174696f6e206f6620746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e3901202d206069735f66726f7a656e603a205768657468657220746865206d657461646174612073686f756c642062652066726f7a656e20616761696e73742066757274686572206368616e6765732e006820456d6974732060436c6173734d65746164617461536574602e003c205765696768743a20604f2831296050636c6561725f636c6173735f6d657461646174610414636c6173734c436f6d706163743c543a3a436c61737349643e309c20436c65617220746865206d6574616461746120666f7220616e20617373657420636c6173732e005901204f726967696e206d757374206265206569746865722060466f7263654f726967696e60206f7220605369676e65646020616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f664c207468652061737365742060636c617373602e00c020416e79206465706f73697420697320667265656420666f722074686520617373657420636c617373206f776e65722e001901202d2060636c617373603a20546865206964656e746966696572206f662074686520617373657420636c6173732077686f7365206d6574616461746120746f20636c6561722e007820456d6974732060436c6173734d65746164617461436c6561726564602e003c205765696768743a20604f2831296001581c437265617465640c1c436c6173734964244163636f756e744964244163636f756e74496404e020416e20617373657420636c6173732077617320637265617465642e205c5b20636c6173732c2063726561746f722c206f776e6572205c5d30466f72636543726561746564081c436c6173734964244163636f756e74496404d420416e20617373657420636c6173732077617320666f7263652d637265617465642e205c5b20636c6173732c206f776e6572205c5d2444657374726f796564041c436c617373496404b020416e2061737365742060636c61737360207761732064657374726f7965642e205c5b20636c617373205c5d184973737565640c1c436c617373496428496e7374616e63654964244163636f756e74496404f020416e2061737365742060696e73746163656020776173206973737565642e205c5b20636c6173732c20696e7374616e63652c206f776e6572205c5d2c5472616e73666572726564101c436c617373496428496e7374616e63654964244163636f756e744964244163636f756e74496404110120416e2061737365742060696e73746163656020776173207472616e736665727265642e205c5b20636c6173732c20696e7374616e63652c2066726f6d2c20746f205c5d184275726e65640c1c436c617373496428496e7374616e63654964244163636f756e74496404010120416e2061737365742060696e7374616e636560207761732064657374726f7965642e205c5b20636c6173732c20696e7374616e63652c206f776e6572205c5d1846726f7a656e081c436c617373496428496e7374616e6365496404e020536f6d652061737365742060696e7374616e636560207761732066726f7a656e2e205c5b20636c6173732c20696e7374616e6365205c5d18546861776564081c436c617373496428496e7374616e6365496404e020536f6d652061737365742060696e7374616e63656020776173207468617765642e205c5b20636c6173732c20696e7374616e6365205c5d2c436c61737346726f7a656e041c436c617373496404ac20536f6d652061737365742060636c61737360207761732066726f7a656e2e205c5b20636c617373205c5d2c436c617373546861776564041c436c617373496404ac20536f6d652061737365742060636c6173736020776173207468617765642e205c5b20636c617373205c5d304f776e65724368616e676564081c436c6173734964244163636f756e74496404a420546865206f776e6572206368616e676564205c5b20636c6173732c206e65775f6f776e6572205c5d2c5465616d4368616e676564101c436c6173734964244163636f756e744964244163636f756e744964244163636f756e74496404010120546865206d616e6167656d656e74207465616d206368616e676564205c5b20636c6173732c206973737565722c2061646d696e2c20667265657a6572205c5d40417070726f7665645472616e73666572101c436c617373496428496e7374616e63654964244163636f756e744964244163636f756e7449640c550120416e2060696e7374616e636560206f6620616e2061737365742060636c6173736020686173206265656e20617070726f7665642062792074686520606f776e65726020666f72207472616e73666572206279206130206064656c6567617465602e9c205c5b20636c6173732c20696e7374616e63652c206f776e65722c2064656c6567617465205c5d44417070726f76616c43616e63656c6c6564101c436c617373496428496e7374616e63654964244163636f756e744964244163636f756e7449640c610120416e20617070726f76616c20666f722061206064656c656761746560206163636f756e7420746f207472616e73666572207468652060696e7374616e636560206f6620616e2061737365742060636c6173736020776173682063616e63656c6c65642062792069747320606f776e6572602e9c205c5b20636c6173732c20696e7374616e63652c206f776e65722c2064656c6567617465205c5d4841737365745374617475734368616e676564041c436c6173734964081d0120416e2061737365742060636c617373602068617320686164206974732061747472696275746573206368616e676564206279207468652060466f72636560206f726967696e2e30205c5b20636c617373205c5d40436c6173734d657461646174615365740c1c436c617373496478426f756e6465645665633c75382c20543a3a537472696e674c696d69743e10626f6f6c042d01204e6577206d6574616461746120686173206265656e2073657420666f7220616e20617373657420636c6173732e205c5b20636c6173732c20646174612c2069735f66726f7a656e205c5d50436c6173734d65746164617461436c6561726564041c436c617373496404e8204d6574616461746120686173206265656e20636c656172656420666f7220616e20617373657420636c6173732e205c5b20636c617373205c5d2c4d65746164617461536574101c436c617373496428496e7374616e6365496478426f756e6465645665633c75382c20543a3a537472696e674c696d69743e10626f6f6c08c4204e6577206d6574616461746120686173206265656e2073657420666f7220616e20617373657420696e7374616e63652e9c205c5b20636c6173732c20696e7374616e63652c20646174612c2069735f66726f7a656e205c5d3c4d65746164617461436c6561726564081c436c617373496428496e7374616e63654964041d01204d6574616461746120686173206265656e20636c656172656420666f7220616e20617373657420696e7374616e63652e205c5b20636c6173732c20696e7374616e6365205c5d2c52656465706f7369746564081c436c6173734964485665633c543a3a496e7374616e636549643e044d01204d6574616461746120686173206265656e20636c656172656420666f7220616e20617373657420696e7374616e63652e205c5b20636c6173732c207375636365737366756c5f696e7374616e636573205c5d30417474726962757465536574101c436c6173734964544f7074696f6e3c543a3a496e7374616e636549643e6c426f756e6465645665633c75382c20543a3a4b65794c696d69743e74426f756e6465645665633c75382c20543a3a56616c75654c696d69743e081101204e657720617474726962757465206d6574616461746120686173206265656e2073657420666f7220616e20617373657420636c617373206f7220696e7374616e63652ea0205c5b20636c6173732c206d617962655f696e7374616e63652c206b65792c2076616c7565205c5d40417474726962757465436c65617265640c1c436c6173734964544f7074696f6e3c543a3a496e7374616e636549643e6c426f756e6465645665633c75382c20543a3a4b65794c696d69743e08110120417474726962757465206d6574616461746120686173206265656e20636c656172656420666f7220616e20617373657420636c617373206f7220696e7374616e63652eb8205c5b20636c6173732c206d617962655f696e7374616e63652c206b65792c206d617962655f76616c7565205c5d0028304e6f5065726d697373696f6e04ec20546865207369676e696e67206163636f756e7420686173206e6f207065726d697373696f6e20746f20646f20746865206f7065726174696f6e2e1c556e6b6e6f776e047c2054686520676976656e20617373657420494420697320756e6b6e6f776e2e34416c726561647945786973747304e82054686520617373657420696e7374616e63652049442068617320616c7265616479206265656e207573656420666f7220616e2061737365742e2857726f6e674f776e657204ec20546865206f776e6572207475726e6564206f757420746f20626520646966666572656e7420746f2077686174207761732065787065637465642e284261645769746e657373047020496e76616c6964207769746e657373206461746120676976656e2e14496e557365047c2054686520617373657420494420697320616c72656164792074616b656e2e1846726f7a656e049c2054686520617373657420696e7374616e6365206f7220636c6173732069732066726f7a656e2e3457726f6e6744656c656761746504f8205468652064656c6567617465207475726e6564206f757420746f20626520646966666572656e7420746f2077686174207761732065787065637465642e284e6f44656c6567617465047c205468657265206973206e6f2064656c656761746520617070726f7665642e28556e617070726f76656404c8204e6f20617070726f76616c20657869737473207468617420776f756c6420616c6c6f7720746865207472616e736665722e26485472616e73616374696f6e53746f7261676501485472616e73616374696f6e53746f7261676524305472616e73616374696f6e7300010238543a3a426c6f636b4e756d626572505665633c5472616e73616374696f6e496e666f3e00040004d020436f6c6c656374696f6e206f66207472616e73616374696f6e206d6574616461746120627920626c6f636b206e756d6265722e284368756e6b436f756e7401010238543a3a426c6f636b4e756d6265720c753332001000000000049420436f756e7420696e6465786564206368756e6b7320666f72206561636820626c6f636b2e1c4279746546656500003042616c616e63654f663c543e040004582053746f72616765206665652070657220627974652e20456e74727946656500003042616c616e63654f663c543e040004742053746f726167652066656520706572207472616e73616374696f6e2e484d61785472616e73616374696f6e53697a6501000c753332100000000004cc204d6178696d756d20646174612073657420696e20612073696e676c65207472616e73616374696f6e20696e2062797465732e504d6178426c6f636b5472616e73616374696f6e7301000c753332100000000004d4204d6178696d756d206e756d626572206f6620696e6465786564207472616e73616374696f6e7320696e2074686520626c6f636b2e3453746f72616765506572696f64010038543a3a426c6f636b4e756d6265721000000000086d012053746f7261676520706572696f6420666f72206461746120696e20626c6f636b732e2053686f756c64206d61746368206073705f73746f726167655f70726f6f663a3a44454641554c545f53544f524147455f504552494f44605420666f7220626c6f636b20617574686f72696e672e44426c6f636b5472616e73616374696f6e730100505665633c5472616e73616374696f6e496e666f3e0400003050726f6f66436865636b6564010010626f6f6c0400049420576173207468652070726f6f6620636865636b656420696e207468697320626c6f636b3f010c1473746f72650410646174611c5665633c75383e18790120496e64657820616e642073746f72652064617461206f6e20636861696e2e204d696e696d756d20646174612073697a6520697320312062797465732c206d6178696d756d20697320604d61785472616e73616374696f6e53697a65602e390120446174612077696c6c2062652072656d6f766564206166746572206053544f524147455f504552494f446020626c6f636b732c20756e6c657373206072656e6577602069732063616c6c65642e2c2023203c7765696768743e1501202d206e2a6c6f67286e29206f6620646174612073697a652c20617320616c6c20646174612069732070757368656420746f20616e20696e2d6d656d6f727920747269652e88204164646974696f6e616c6c7920636f6e7461696e7320612044422077726974652e302023203c2f7765696768743e1472656e65770814626c6f636b38543a3a426c6f636b4e756d62657214696e6465780c7533321c31012052656e65772070726576696f75736c792073746f72656420646174612e20506172616d6574657273206172652074686520626c6f636b206e756d626572207468617420636f6e7461696e7329012070726576696f7573206073746f726560206f72206072656e6577602063616c6c20616e64207472616e73616374696f6e20696e6465782077697468696e207468617420626c6f636b2e0501205472616e73616374696f6e20696e64657820697320656d697474656420696e20746865206053746f72656460206f72206052656e6577656460206576656e742e78204170706c6965732073616d652066656573206173206073746f7265602e2c2023203c7765696768743e30202d20436f6e7374616e742e302023203c2f7765696768743e2c636865636b5f70726f6f66041470726f6f665c5472616e73616374696f6e53746f7261676550726f6f661c1d0120436865636b2073746f726167652070726f6f6620666f7220626c6f636b206e756d6265722060626c6f636b5f6e756d6265722829202d2053746f72616765506572696f64602e0501204966207375636820626c6f636b20646f6573206e6f74206578697374207468652070726f6f6620697320657870656374656420746f20626520604e6f6e65602e2c2023203c7765696768743e6901202d204c696e65617220772e722e7420746865206e756d626572206f6620696e6465786564207472616e73616374696f6e7320696e207468652070726f76656420626c6f636b20666f722072616e646f6d2070726f62696e672ea020546865726527732061204442207265616420666f722065616368207472616e73616374696f6e2ed4204865726520776520617373756d652061206d6178696d756d206f66203130302070726f626564207472616e73616374696f6e732e302023203c2f7765696768743e010c1853746f726564040c753332048c2053746f726564206461746120756e6465722073706563696669656420696e6465782e1c52656e65776564040c75333204902052656e65776564206461746120756e6465722073706563696669656420696e6465782e3050726f6f66436865636b65640004a02053746f726167652070726f6f6620776173207375636365737366756c6c7920636865636b65642e003444496e73756666696369656e7446756e6473047820496e73756666696369656e74206163636f756e742062616c616e63652e344e6f74436f6e66696775726564045c20496e76616c696420636f6e66696775726174696f6e2e3c52656e657765644e6f74466f756e6404802052656e657765642065787472696e736963206973206e6f7420666f756e642e40456d7074795472616e73616374696f6e049820417474656d7074696e6720746f2073746f726520656d707479207472616e73616374696f6e3c556e657870656374656450726f6f6604982050726f6f6620776173206e6f7420657870656374656420696e207468697320626c6f636b2e30496e76616c696450726f6f66046c2050726f6f66206661696c656420766572696669636174696f6e2e304d697373696e6750726f6f66045c204d697373696e672073746f726167652070726f6f662e404d697373696e6753746174654461746104d820556e61626c6520746f207665726966792070726f6f6620626563617375652073746174652064617461206973206d697373696e672e2c446f75626c65436865636b048420446f75626c652070726f6f6620636865636b20696e2074686520626c6f636b2e3c50726f6f664e6f74436865636b656404b02053746f726167652070726f6f6620776173206e6f7420636865636b656420696e2074686520626c6f636b2e4c5472616e73616374696f6e546f6f4c617267650468205472616e73616374696f6e20697320746f6f206c617267652e4c546f6f4d616e795472616e73616374696f6e73049020546f6f206d616e79207472616e73616374696f6e7320696e2074686520626c6f636b2e28426164436f6e7465787404d820417474656d7074656420746f2063616c6c206073746f726560206f757473696465206f6620626c6f636b20657865637574696f6e2e27041c40436865636b5370656356657273696f6e38436865636b547856657273696f6e30436865636b47656e6573697338436865636b4d6f7274616c69747928436865636b4e6f6e63652c436865636b576569676874604368617267655472616e73616374696f6e5061796d656e74 \ No newline at end of file diff --git a/packages/polkadot/tests/meta/v13.json b/packages/polkadot/tests/meta/v13.json new file mode 100644 index 00000000..b9726c8e --- /dev/null +++ b/packages/polkadot/tests/meta/v13.json @@ -0,0 +1,16294 @@ +{ + "magicNumber": 1635018093, + "metadata": { + "v13": { + "modules": [ + { + "name": "System", + "storage": { + "prefix": "System", + "items": [ + { + "name": "Account", + "modifier": "Default", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "AccountInfo", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The full account information for a particular account ID." + ] + }, + { + "name": "ExtrinsicCount", + "modifier": "Optional", + "type": { + "plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total extrinsics count for the current block." + ] + }, + { + "name": "BlockWeight", + "modifier": "Default", + "type": { + "plain": "ConsumedWeight" + }, + "fallback": "0x000000000000000000000000000000000000000000000000", + "documentation": [ + " The current weight for the block." + ] + }, + { + "name": "AllExtrinsicsLen", + "modifier": "Optional", + "type": { + "plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Total length (in bytes) for all extrinsics put together, for the current block." + ] + }, + { + "name": "BlockHash", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "BlockNumber", + "value": "Hash", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Map of block numbers to block hashes." + ] + }, + { + "name": "ExtrinsicData", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "u32", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Extrinsics data for the current block (maps an extrinsic's index to its data)." + ] + }, + { + "name": "Number", + "modifier": "Default", + "type": { + "plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The current block number being processed. Set by `execute_block`." + ] + }, + { + "name": "ParentHash", + "modifier": "Default", + "type": { + "plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Hash of the previous block." + ] + }, + { + "name": "Digest", + "modifier": "Default", + "type": { + "plain": "DigestOf" + }, + "fallback": "0x00", + "documentation": [ + " Digest of the current block, also part of the block header." + ] + }, + { + "name": "Events", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Events deposited for the current block." + ] + }, + { + "name": "EventCount", + "modifier": "Default", + "type": { + "plain": "EventIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of events in the `Events` list." + ] + }, + { + "name": "EventTopics", + "modifier": "Default", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "Hash", + "value": "Vec<(BlockNumber,EventIndex)>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Mapping between a topic (represented by T::Hash) and a vector of indexes", + " of events in the `>` list.", + "", + " All topic vectors have deterministic storage locations depending on the topic. This", + " allows light-clients to leverage the changes trie storage tracking mechanism and", + " in case of changes fetch the list of events of interest.", + "", + " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just", + " the `EventIndex` then in case if the topic has the same contents on the next block", + " no notification will be triggered thus the event might be lost." + ] + }, + { + "name": "LastRuntimeUpgrade", + "modifier": "Optional", + "type": { + "plain": "LastRuntimeUpgradeInfo" + }, + "fallback": "0x00", + "documentation": [ + " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened." + ] + }, + { + "name": "UpgradedToU32RefCount", + "modifier": "Default", + "type": { + "plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not." + ] + }, + { + "name": "UpgradedToTripleRefCount", + "modifier": "Default", + "type": { + "plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False", + " (default) if not." + ] + }, + { + "name": "ExecutionPhase", + "modifier": "Optional", + "type": { + "plain": "Phase" + }, + "fallback": "0x00", + "documentation": [ + " The execution phase of the block." + ] + } + ] + }, + "calls": [ + { + "name": "fill_block", + "args": [ + { + "name": "_ratio", + "type": "Perbill" + } + ], + "documentation": [ + " A dispatch that will fill the block weight up to the given ratio." + ] + }, + { + "name": "remark", + "args": [ + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Make some on-chain remark.", + "", + " # ", + " - `O(1)`", + " # " + ] + }, + { + "name": "set_heap_pages", + "args": [ + { + "name": "pages", + "type": "u64" + } + ], + "documentation": [ + " Set the number of pages in the WebAssembly environment's heap.", + "", + " # ", + " - `O(1)`", + " - 1 storage write.", + " - Base Weight: 1.405 µs", + " - 1 write to HEAP_PAGES", + " # " + ] + }, + { + "name": "set_code", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new runtime code.", + "", + " # ", + " - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`", + " - 1 storage write (codec `O(C)`).", + " - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive).", + " - 1 event.", + " The weight of this function is dependent on the runtime, but generally this is very expensive.", + " We will treat this as a full block.", + " # " + ] + }, + { + "name": "set_code_without_checks", + "args": [ + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new runtime code without doing any checks of the given `code`.", + "", + " # ", + " - `O(C)` where `C` length of `code`", + " - 1 storage write (codec `O(C)`).", + " - 1 event.", + " The weight of this function is dependent on the runtime. We will treat this as a full block.", + " # " + ] + }, + { + "name": "set_changes_trie_config", + "args": [ + { + "name": "changes_trie_config", + "type": "Option" + } + ], + "documentation": [ + " Set the new changes trie configuration.", + "", + " # ", + " - `O(1)`", + " - 1 storage write or delete (codec `O(1)`).", + " - 1 call to `deposit_log`: Uses `append` API, so O(1)", + " - Base Weight: 7.218 µs", + " - DB Weight:", + " - Writes: Changes Trie, System Digest", + " # " + ] + }, + { + "name": "set_storage", + "args": [ + { + "name": "items", + "type": "Vec" + } + ], + "documentation": [ + " Set some items of storage.", + "", + " # ", + " - `O(I)` where `I` length of `items`", + " - `I` storage writes (`O(1)`).", + " - Base Weight: 0.568 * i µs", + " - Writes: Number of items", + " # " + ] + }, + { + "name": "kill_storage", + "args": [ + { + "name": "keys", + "type": "Vec" + } + ], + "documentation": [ + " Kill some items from storage.", + "", + " # ", + " - `O(IK)` where `I` length of `keys` and `K` length of one key", + " - `I` storage deletions.", + " - Base Weight: .378 * i µs", + " - Writes: Number of items", + " # " + ] + }, + { + "name": "kill_prefix", + "args": [ + { + "name": "prefix", + "type": "Key" + }, + { + "name": "_subkeys", + "type": "u32" + } + ], + "documentation": [ + " Kill all storage items with a key that starts with the given prefix.", + "", + " **NOTE:** We rely on the Root origin to provide us the number of subkeys under", + " the prefix we are removing to accurately calculate the weight of this function.", + "", + " # ", + " - `O(P)` where `P` amount of keys with prefix `prefix`", + " - `P` storage deletions.", + " - Base Weight: 0.834 * P µs", + " - Writes: Number of subkeys + 1", + " # " + ] + }, + { + "name": "remark_with_event", + "args": [ + { + "name": "remark", + "type": "Bytes" + } + ], + "documentation": [ + " Make some on-chain remark and emit event.", + "", + " # ", + " - `O(b)` where b is the length of the remark.", + " - 1 event.", + " # " + ] + } + ], + "events": [ + { + "name": "ExtrinsicSuccess", + "args": [ + "DispatchInfo" + ], + "documentation": [ + " An extrinsic completed successfully. \\[info\\]" + ] + }, + { + "name": "ExtrinsicFailed", + "args": [ + "DispatchError", + "DispatchInfo" + ], + "documentation": [ + " An extrinsic failed. \\[error, info\\]" + ] + }, + { + "name": "CodeUpdated", + "args": [], + "documentation": [ + " `:code` was updated." + ] + }, + { + "name": "NewAccount", + "args": [ + "AccountId" + ], + "documentation": [ + " A new \\[account\\] was created." + ] + }, + { + "name": "KilledAccount", + "args": [ + "AccountId" + ], + "documentation": [ + " An \\[account\\] was reaped." + ] + }, + { + "name": "Remarked", + "args": [ + "AccountId", + "Hash" + ], + "documentation": [ + " On on-chain remark happened. \\[origin, remark_hash\\]" + ] + } + ], + "constants": [ + { + "name": "BlockWeights", + "type": "BlockWeights", + "value": "0x00f2052a0100000000204aa9d1010000405973070000000001c06e96a62e010000010098f73e5d010000010000000000000000405973070000000001c0f6e810a30100000100204aa9d1010000010088526a740000004059730700000000000000", + "documentation": [ + " Block & extrinsics weights: base values and limits." + ] + }, + { + "name": "BlockLength", + "type": "BlockLength", + "value": "0x00003c000000500000005000", + "documentation": [ + " The maximum length of a block (in bytes)." + ] + }, + { + "name": "BlockHashCount", + "type": "BlockNumber", + "value": "0x60090000", + "documentation": [ + " Maximum number of block number to block hash mappings to keep (oldest pruned first)." + ] + }, + { + "name": "DbWeight", + "type": "RuntimeDbWeight", + "value": "0x40787d010000000000e1f50500000000", + "documentation": [ + " The weight of runtime database operations the runtime can invoke." + ] + }, + { + "name": "Version", + "type": "RuntimeVersion", + "value": "0x106e6f6465387375627374726174652d6e6f64650a0000000b0100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000", + "documentation": [ + " Get the chain's current version." + ] + }, + { + "name": "SS58Prefix", + "type": "u16", + "value": "0x2a00", + "documentation": [ + " The designated SS85 prefix of this chain.", + "", + " This replaces the \"ss58Format\" property declared in the chain spec. Reason is", + " that the runtime should know about the prefix in order to make use of it as", + " an identifier of the chain." + ] + } + ], + "errors": [ + { + "name": "InvalidSpecName", + "documentation": [ + " The name of specification does not match between the current runtime", + " and the new runtime." + ] + }, + { + "name": "SpecVersionNeedsToIncrease", + "documentation": [ + " The specification version is not allowed to decrease between the current runtime", + " and the new runtime." + ] + }, + { + "name": "FailedToExtractRuntimeVersion", + "documentation": [ + " Failed to extract the runtime version from the new runtime.", + "", + " Either calling `Core_version` or decoding `RuntimeVersion` failed." + ] + }, + { + "name": "NonDefaultComposite", + "documentation": [ + " Suicide called when the account has non-default composite data." + ] + }, + { + "name": "NonZeroRefCount", + "documentation": [ + " There is a non-zero reference count preventing the account from being purged." + ] + } + ], + "index": 0 + }, + { + "name": "Utility", + "storage": null, + "calls": [ + { + "name": "batch", + "args": [ + { + "name": "calls", + "type": "Vec" + } + ], + "documentation": [ + " Send a batch of dispatch calls.", + "", + " May be called from any origin.", + "", + " - `calls`: The calls to be dispatched from the same origin.", + "", + " If origin is root then call are dispatch without checking origin filter. (This includes", + " bypassing `frame_system::Config::BaseCallFilter`).", + "", + " # ", + " - Complexity: O(C) where C is the number of calls to be batched.", + " # ", + "", + " This will return `Ok` in all circumstances. To determine the success of the batch, an", + " event is deposited. If a call failed and the batch was interrupted, then the", + " `BatchInterrupted` event is deposited, along with the number of successful calls made", + " and the error of the failed call. If all were successful, then the `BatchCompleted`", + " event is deposited." + ] + }, + { + "name": "as_derivative", + "args": [ + { + "name": "index", + "type": "u16" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Send a call through an indexed pseudonym of the sender.", + "", + " Filter from origin are passed along. The call will be dispatched with an origin which", + " use the same filter as the origin of this call.", + "", + " NOTE: If you need to ensure that any account-based filtering is not honored (i.e.", + " because you expect `proxy` to have been used prior in the call stack and you do not want", + " the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`", + " in the Multisig pallet instead.", + "", + " NOTE: Prior to version *12, this was called `as_limited_sub`.", + "", + " The dispatch origin for this call must be _Signed_." + ] + }, + { + "name": "batch_all", + "args": [ + { + "name": "calls", + "type": "Vec" + } + ], + "documentation": [ + " Send a batch of dispatch calls and atomically execute them.", + " The whole transaction will rollback and fail if any of the calls failed.", + "", + " May be called from any origin.", + "", + " - `calls`: The calls to be dispatched from the same origin.", + "", + " If origin is root then call are dispatch without checking origin filter. (This includes", + " bypassing `frame_system::Config::BaseCallFilter`).", + "", + " # ", + " - Complexity: O(C) where C is the number of calls to be batched.", + " # " + ] + } + ], + "events": [ + { + "name": "BatchInterrupted", + "args": [ + "u32", + "DispatchError" + ], + "documentation": [ + " Batch of dispatches did not complete fully. Index of first failing dispatch given, as", + " well as the error. \\[index, error\\]" + ] + }, + { + "name": "BatchCompleted", + "args": [], + "documentation": [ + " Batch of dispatches completed fully with no error." + ] + } + ], + "constants": [], + "errors": [], + "index": 1 + }, + { + "name": "Babe", + "storage": { + "prefix": "Babe", + "items": [ + { + "name": "EpochIndex", + "modifier": "Default", + "type": { + "plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current epoch index." + ] + }, + { + "name": "Authorities", + "modifier": "Default", + "type": { + "plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + }, + "fallback": "0x00", + "documentation": [ + " Current epoch authorities." + ] + }, + { + "name": "GenesisSlot", + "modifier": "Default", + "type": { + "plain": "Slot" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The slot at which the first epoch actually started. This is 0", + " until the first block of the chain." + ] + }, + { + "name": "CurrentSlot", + "modifier": "Default", + "type": { + "plain": "Slot" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current slot number." + ] + }, + { + "name": "Randomness", + "modifier": "Default", + "type": { + "plain": "Randomness" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The epoch randomness for the *current* epoch.", + "", + " # Security", + "", + " This MUST NOT be used for gambling, as it can be influenced by a", + " malicious validator in the short term. It MAY be used in many", + " cryptographic protocols, however, so long as one remembers that this", + " (like everything else on-chain) it is public. For example, it can be", + " used where a number is needed that cannot have been chosen by an", + " adversary, for purposes such as public-coin zero-knowledge proofs." + ] + }, + { + "name": "PendingEpochConfigChange", + "modifier": "Optional", + "type": { + "plain": "NextConfigDescriptor" + }, + "fallback": "0x00", + "documentation": [ + " Pending epoch configuration change that will be applied when the next epoch is enacted." + ] + }, + { + "name": "NextRandomness", + "modifier": "Default", + "type": { + "plain": "Randomness" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Next epoch randomness." + ] + }, + { + "name": "NextAuthorities", + "modifier": "Default", + "type": { + "plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + }, + "fallback": "0x00", + "documentation": [ + " Next epoch authorities." + ] + }, + { + "name": "SegmentIndex", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Randomness under construction.", + "", + " We make a tradeoff between storage accesses and list length.", + " We store the under-construction randomness in segments of up to", + " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.", + "", + " Once a segment reaches this length, we begin the next one.", + " We reset all segments and return to `0` at the beginning of every", + " epoch." + ] + }, + { + "name": "UnderConstruction", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "u32", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay." + ] + }, + { + "name": "Initialized", + "modifier": "Optional", + "type": { + "plain": "MaybeRandomness" + }, + "fallback": "0x00", + "documentation": [ + " Temporary value (cleared at block finalization) which is `Some`", + " if per-block initialization has already been called for current block." + ] + }, + { + "name": "AuthorVrfRandomness", + "modifier": "Default", + "type": { + "plain": "MaybeRandomness" + }, + "fallback": "0x00", + "documentation": [ + " Temporary value (cleared at block finalization) that includes the VRF output generated", + " at this block. This field should always be populated during block processing unless", + " secondary plain slots are enabled (which don't contain a VRF output)." + ] + }, + { + "name": "EpochStart", + "modifier": "Default", + "type": { + "plain": "(BlockNumber,BlockNumber)" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The block numbers when the last and current epoch have started, respectively `N-1` and", + " `N`.", + " NOTE: We track this is in order to annotate the block number when a given pool of", + " entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in", + " slots, which may be skipped, the block numbers may not line up with the slot numbers." + ] + }, + { + "name": "Lateness", + "modifier": "Default", + "type": { + "plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " How late the current block is compared to its parent.", + "", + " This entry is populated as part of block execution and is cleaned up", + " on block finalization. Querying this storage entry outside of block", + " execution context should always yield zero." + ] + }, + { + "name": "EpochConfig", + "modifier": "Optional", + "type": { + "plain": "BabeEpochConfiguration" + }, + "fallback": "0x00", + "documentation": [ + " The configuration for the current epoch. Should never be `None` as it is initialized in genesis." + ] + }, + { + "name": "NextEpochConfig", + "modifier": "Optional", + "type": { + "plain": "BabeEpochConfiguration" + }, + "fallback": "0x00", + "documentation": [ + " The configuration for the next epoch, `None` if the config will not change", + " (you can fallback to `EpochConfig` instead in that case)." + ] + } + ] + }, + "calls": [ + { + "name": "report_equivocation", + "args": [ + { + "name": "equivocation_proof", + "type": "BabeEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report authority equivocation/misbehavior. This method will verify", + " the equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence will", + " be reported." + ] + }, + { + "name": "report_equivocation_unsigned", + "args": [ + { + "name": "equivocation_proof", + "type": "BabeEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report authority equivocation/misbehavior. This method will verify", + " the equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence will", + " be reported.", + " This extrinsic must be called unsigned and it is expected that only", + " block authors will call it (validated in `ValidateUnsigned`), as such", + " if the block author is defined it will be defined as the equivocation", + " reporter." + ] + }, + { + "name": "plan_config_change", + "args": [ + { + "name": "config", + "type": "NextConfigDescriptor" + } + ], + "documentation": [ + " Plan an epoch config change. The epoch config change is recorded and will be enacted on", + " the next call to `enact_epoch_change`. The config will be activated one epoch after.", + " Multiple calls to this method will replace any existing planned config change that had", + " not been enacted yet." + ] + } + ], + "events": null, + "constants": [ + { + "name": "EpochDuration", + "type": "u64", + "value": "0xc800000000000000", + "documentation": [ + " The amount of time, in slots, that each epoch should last.", + " NOTE: Currently it is not possible to change the epoch duration after", + " the chain has started. Attempting to do so will brick block production." + ] + }, + { + "name": "ExpectedBlockTime", + "type": "Moment", + "value": "0xb80b000000000000", + "documentation": [ + " The expected average block time at which BABE should be creating", + " blocks. Since BABE is probabilistic it is not trivial to figure out", + " what the expected average block time should be based on the slot", + " duration and the security parameter `c` (where `1 - c` represents", + " the probability of a slot being empty)." + ] + } + ], + "errors": [ + { + "name": "InvalidEquivocationProof", + "documentation": [ + " An equivocation proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "InvalidKeyOwnershipProof", + "documentation": [ + " A key ownership proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "DuplicateOffenceReport", + "documentation": [ + " A given equivocation report is valid but already previously reported." + ] + } + ], + "index": 2 + }, + { + "name": "Timestamp", + "storage": { + "prefix": "Timestamp", + "items": [ + { + "name": "Now", + "modifier": "Default", + "type": { + "plain": "Moment" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current time for the current block." + ] + }, + { + "name": "DidUpdate", + "modifier": "Default", + "type": { + "plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Did the timestamp get updated in this block?" + ] + } + ] + }, + "calls": [ + { + "name": "set", + "args": [ + { + "name": "now", + "type": "Compact" + } + ], + "documentation": [ + " Set the current time.", + "", + " This call should be invoked exactly once per block. It will panic at the finalization", + " phase, if this call hasn't been invoked by that time.", + "", + " The timestamp should be greater than the previous one by the amount specified by", + " `MinimumPeriod`.", + "", + " The dispatch origin for this call must be `Inherent`.", + "", + " # ", + " - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)", + " - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`)", + " - 1 event handler `on_timestamp_set`. Must be `O(1)`.", + " # " + ] + } + ], + "events": null, + "constants": [ + { + "name": "MinimumPeriod", + "type": "Moment", + "value": "0xdc05000000000000", + "documentation": [ + " The minimum period between blocks. Beware that this is different to the *expected* period", + " that the block production apparatus provides. Your chosen consensus system will generally", + " work with this to determine a sensible block time. e.g. For Aura, it will be double this", + " period on default settings." + ] + } + ], + "errors": [], + "index": 3 + }, + { + "name": "Authorship", + "storage": { + "prefix": "Authorship", + "items": [ + { + "name": "Uncles", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Uncles" + ] + }, + { + "name": "Author", + "modifier": "Optional", + "type": { + "plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " Author of current block." + ] + }, + { + "name": "DidSetUncles", + "modifier": "Default", + "type": { + "plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Whether uncles were already set in this block." + ] + } + ] + }, + "calls": [ + { + "name": "set_uncles", + "args": [ + { + "name": "new_uncles", + "type": "Vec
" + } + ], + "documentation": [ + " Provide a set of uncles." + ] + } + ], + "events": null, + "constants": [], + "errors": [ + { + "name": "InvalidUncleParent", + "documentation": [ + " The uncle parent not in the chain." + ] + }, + { + "name": "UnclesAlreadySet", + "documentation": [ + " Uncles already set in the block." + ] + }, + { + "name": "TooManyUncles", + "documentation": [ + " Too many uncles." + ] + }, + { + "name": "GenesisUncle", + "documentation": [ + " The uncle is genesis." + ] + }, + { + "name": "TooHighUncle", + "documentation": [ + " The uncle is too high in chain." + ] + }, + { + "name": "UncleAlreadyIncluded", + "documentation": [ + " The uncle is already included." + ] + }, + { + "name": "OldUncle", + "documentation": [ + " The uncle isn't recent enough to be included." + ] + } + ], + "index": 4 + }, + { + "name": "Indices", + "storage": { + "prefix": "Indices", + "items": [ + { + "name": "Accounts", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AccountIndex", + "value": "(AccountId,BalanceOf,bool)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The lookup from index to account." + ] + } + ] + }, + "calls": [ + { + "name": "claim", + "args": [ + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Assign an previously unassigned index.", + "", + " Payment: `Deposit` is reserved from the sender account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `index`: the index to be claimed. This must not be in use.", + "", + " Emits `IndexAssigned` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - One reserve operation.", + " - One event.", + " -------------------", + " - DB Weight: 1 Read/Write (Accounts)", + " # " + ] + }, + { + "name": "transfer", + "args": [ + { + "name": "new", + "type": "AccountId" + }, + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Assign an index already owned by the sender to another account. The balance reservation", + " is effectively transferred to the new account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `index`: the index to be re-assigned. This must be owned by the sender.", + " - `new`: the new owner of the index. This function is a no-op if it is equal to sender.", + "", + " Emits `IndexAssigned` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - One transfer operation.", + " - One event.", + " -------------------", + " - DB Weight:", + " - Reads: Indices Accounts, System Account (recipient)", + " - Writes: Indices Accounts, System Account (recipient)", + " # " + ] + }, + { + "name": "free", + "args": [ + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Free up an index owned by the sender.", + "", + " Payment: Any previous deposit placed for the index is unreserved in the sender account.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must own the index.", + "", + " - `index`: the index to be freed. This must be owned by the sender.", + "", + " Emits `IndexFreed` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - One reserve operation.", + " - One event.", + " -------------------", + " - DB Weight: 1 Read/Write (Accounts)", + " # " + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "new", + "type": "AccountId" + }, + { + "name": "index", + "type": "AccountIndex" + }, + { + "name": "freeze", + "type": "bool" + } + ], + "documentation": [ + " Force an index to an account. This doesn't require a deposit. If the index is already", + " held, then any deposit is reimbursed to its current owner.", + "", + " The dispatch origin for this call must be _Root_.", + "", + " - `index`: the index to be (re-)assigned.", + " - `new`: the new owner of the index. This function is a no-op if it is equal to sender.", + " - `freeze`: if set to `true`, will freeze the index so it cannot be transferred.", + "", + " Emits `IndexAssigned` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - Up to one reserve operation.", + " - One event.", + " -------------------", + " - DB Weight:", + " - Reads: Indices Accounts, System Account (original owner)", + " - Writes: Indices Accounts, System Account (original owner)", + " # " + ] + }, + { + "name": "freeze", + "args": [ + { + "name": "index", + "type": "AccountIndex" + } + ], + "documentation": [ + " Freeze an index so it will always point to the sender account. This consumes the deposit.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must have a", + " non-frozen account `index`.", + "", + " - `index`: the index to be frozen in place.", + "", + " Emits `IndexFrozen` if successful.", + "", + " # ", + " - `O(1)`.", + " - One storage mutation (codec `O(1)`).", + " - Up to one slash operation.", + " - One event.", + " -------------------", + " - DB Weight: 1 Read/Write (Accounts)", + " # " + ] + } + ], + "events": [ + { + "name": "IndexAssigned", + "args": [ + "AccountId", + "AccountIndex" + ], + "documentation": [ + " A account index was assigned. \\[index, who\\]" + ] + }, + { + "name": "IndexFreed", + "args": [ + "AccountIndex" + ], + "documentation": [ + " A account index has been freed up (unassigned). \\[index\\]" + ] + }, + { + "name": "IndexFrozen", + "args": [ + "AccountIndex", + "AccountId" + ], + "documentation": [ + " A account index has been frozen to its current account ID. \\[index, who\\]" + ] + } + ], + "constants": [ + { + "name": "Deposit", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The deposit needed for reserving an index." + ] + } + ], + "errors": [ + { + "name": "NotAssigned", + "documentation": [ + " The index was not already assigned." + ] + }, + { + "name": "NotOwner", + "documentation": [ + " The index is assigned to another account." + ] + }, + { + "name": "InUse", + "documentation": [ + " The index was not available." + ] + }, + { + "name": "NotTransfer", + "documentation": [ + " The source and destination accounts are identical." + ] + }, + { + "name": "Permanent", + "documentation": [ + " The index is permanent and may not be freed/changed." + ] + } + ], + "index": 5 + }, + { + "name": "Balances", + "storage": { + "prefix": "Balances", + "items": [ + { + "name": "TotalIssuance", + "modifier": "Default", + "type": { + "plain": "Balance" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The total units issued in the system." + ] + }, + { + "name": "Account", + "modifier": "Default", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "AccountData", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The balance of an account.", + "", + " NOTE: This is only used in the case that this pallet is used to store balances." + ] + }, + { + "name": "Locks", + "modifier": "Default", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Any liquidity locks on some account balances.", + " NOTE: Should only be accessed when setting, changing and freeing a lock." + ] + }, + { + "name": "Reserves", + "modifier": "Default", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Named reserves on some account balances." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "plain": "Releases" + }, + "fallback": "0x00", + "documentation": [ + " Storage version of the pallet.", + "", + " This is set to v2.0.0 for new networks." + ] + } + ] + }, + "calls": [ + { + "name": "transfer", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Transfer some liquid free balance to another account.", + "", + " `transfer` will set the `FreeBalance` of the sender and receiver.", + " It will decrease the total issuance of the system by the `TransferFee`.", + " If the sender's account is below the existential deposit as a result", + " of the transfer, the account will be reaped.", + "", + " The dispatch origin for this call must be `Signed` by the transactor.", + "", + " # ", + " - Dependent on arguments but not critical, given proper implementations for", + " input config types. See related functions below.", + " - It contains a limited number of reads and writes internally and no complex computation.", + "", + " Related functions:", + "", + " - `ensure_can_withdraw` is always called internally but has a bounded complexity.", + " - Transferring balances to accounts that did not exist before will cause", + " `T::OnNewAccount::on_new_account` to be called.", + " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`.", + " - `transfer_keep_alive` works the same way as `transfer`, but has an additional", + " check that the transfer will not kill the origin account.", + " ---------------------------------", + " - Base Weight: 73.64 µs, worst case scenario (account created, account removed)", + " - DB Weight: 1 Read and 1 Write to destination account", + " - Origin account is already in memory, so no DB operations for them.", + " # " + ] + }, + { + "name": "set_balance", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "new_free", + "type": "Compact" + }, + { + "name": "new_reserved", + "type": "Compact" + } + ], + "documentation": [ + " Set the balances of a given account.", + "", + " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", + " also decrease the total issuance of the system (`TotalIssuance`).", + " If the new free or reserved balance is below the existential deposit,", + " it will reset the account nonce (`frame_system::AccountNonce`).", + "", + " The dispatch origin for this call is `root`.", + "", + " # ", + " - Independent of the arguments.", + " - Contains a limited number of reads and writes.", + " ---------------------", + " - Base Weight:", + " - Creating: 27.56 µs", + " - Killing: 35.11 µs", + " - DB Weight: 1 Read, 1 Write to `who`", + " # " + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Exactly as `transfer`, except the origin must be root and the source account may be", + " specified.", + " # ", + " - Same as transfer, but additional read and write because the source account is", + " not assumed to be in the overlay.", + " # " + ] + }, + { + "name": "transfer_keep_alive", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Same as the [`transfer`] call, but with a check that the transfer will not kill the", + " origin account.", + "", + " 99% of the time you want [`transfer`] instead.", + "", + " [`transfer`]: struct.Pallet.html#method.transfer", + " # ", + " - Cheaper than transfer because account cannot be killed.", + " - Base Weight: 51.4 µs", + " - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)", + " #" + ] + }, + { + "name": "transfer_all", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "keep_alive", + "type": "bool" + } + ], + "documentation": [ + " Transfer the entire transferable balance from the caller account.", + "", + " NOTE: This function only attempts to transfer _transferable_ balances. This means that", + " any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be", + " transferred by this function. To ensure that this function results in a killed account,", + " you might need to prepare the account by removing any reference counters, storage", + " deposits, etc...", + "", + " The dispatch origin of this call must be Signed.", + "", + " - `dest`: The recipient of the transfer.", + " - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all", + " of the funds the account has, causing the sender account to be killed (false), or", + " transfer everything except at least the existential deposit, which will guarantee to", + " keep the sender account alive (true).", + " # ", + " - O(1). Just like transfer, but reading the user's transferable balance first.", + " #" + ] + } + ], + "events": [ + { + "name": "Endowed", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account was created with some free balance. \\[account, free_balance\\]" + ] + }, + { + "name": "DustLost", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account was removed whose balance was non-zero but below ExistentialDeposit,", + " resulting in an outright loss. \\[account, balance\\]" + ] + }, + { + "name": "Transfer", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Transfer succeeded. \\[from, to, value\\]" + ] + }, + { + "name": "BalanceSet", + "args": [ + "AccountId", + "Balance", + "Balance" + ], + "documentation": [ + " A balance was set by root. \\[who, free, reserved\\]" + ] + }, + { + "name": "Deposit", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some amount was deposited (e.g. for transaction fees). \\[who, deposit\\]" + ] + }, + { + "name": "Reserved", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some balance was reserved (moved from free to reserved). \\[who, value\\]" + ] + }, + { + "name": "Unreserved", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " Some balance was unreserved (moved from reserved to free). \\[who, value\\]" + ] + }, + { + "name": "ReserveRepatriated", + "args": [ + "AccountId", + "AccountId", + "Balance", + "BalanceStatus" + ], + "documentation": [ + " Some balance was moved from the reserve of the first account to the second account.", + " Final argument indicates the destination balance type.", + " \\[from, to, balance, destination_status\\]" + ] + } + ], + "constants": [ + { + "name": "ExistentialDeposit", + "type": "Balance", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The minimum amount required to keep an account open." + ] + } + ], + "errors": [ + { + "name": "VestingBalance", + "documentation": [ + " Vesting balance too high to send value" + ] + }, + { + "name": "LiquidityRestrictions", + "documentation": [ + " Account liquidity restrictions prevent withdrawal" + ] + }, + { + "name": "InsufficientBalance", + "documentation": [ + " Balance too low to send value" + ] + }, + { + "name": "ExistentialDeposit", + "documentation": [ + " Value too low to create account due to existential deposit" + ] + }, + { + "name": "KeepAlive", + "documentation": [ + " Transfer/payment would kill account" + ] + }, + { + "name": "ExistingVestingSchedule", + "documentation": [ + " A vesting schedule already exists for this account" + ] + }, + { + "name": "DeadAccount", + "documentation": [ + " Beneficiary account must pre-exist" + ] + }, + { + "name": "TooManyReserves", + "documentation": [ + " Number of named reserves exceed MaxReserves" + ] + } + ], + "index": 6 + }, + { + "name": "TransactionPayment", + "storage": { + "prefix": "TransactionPayment", + "items": [ + { + "name": "NextFeeMultiplier", + "modifier": "Default", + "type": { + "plain": "Multiplier" + }, + "fallback": "0x000064a7b3b6e00d0000000000000000", + "documentation": [] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "plain": "Releases" + }, + "fallback": "0x00", + "documentation": [] + } + ] + }, + "calls": null, + "events": null, + "constants": [ + { + "name": "TransactionByteFee", + "type": "BalanceOf", + "value": "0x00e40b54020000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + }, + { + "name": "WeightToFee", + "type": "Vec", + "value": "0x0401000000000000000000000000000000000000000001", + "documentation": [ + " The polynomial that is applied in order to derive fee from weight." + ] + } + ], + "errors": [], + "index": 7 + }, + { + "name": "ElectionProviderMultiPhase", + "storage": { + "prefix": "ElectionProviderMultiPhase", + "items": [ + { + "name": "Round", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x01000000", + "documentation": [ + " Internal counter for the number of rounds.", + "", + " This is useful for de-duplication of transactions submitted to the pool, and general", + " diagnostics of the pallet.", + "", + " This is merely incremented once per every time that an upstream `elect` is called." + ] + }, + { + "name": "CurrentPhase", + "modifier": "Default", + "type": { + "plain": "ElectionPhase" + }, + "fallback": "0x00", + "documentation": [ + " Current phase." + ] + }, + { + "name": "QueuedSolution", + "modifier": "Optional", + "type": { + "plain": "ReadySolution" + }, + "fallback": "0x00", + "documentation": [ + " Current best solution, signed or unsigned, queued to be returned upon `elect`." + ] + }, + { + "name": "Snapshot", + "modifier": "Optional", + "type": { + "plain": "RoundSnapshot" + }, + "fallback": "0x00", + "documentation": [ + " Snapshot data of the round.", + "", + " This is created at the beginning of the signed phase and cleared upon calling `elect`." + ] + }, + { + "name": "DesiredTargets", + "modifier": "Optional", + "type": { + "plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " Desired number of targets to elect for this round.", + "", + " Only exists when [`Snapshot`] is present." + ] + }, + { + "name": "SnapshotMetadata", + "modifier": "Optional", + "type": { + "plain": "SolutionOrSnapshotSize" + }, + "fallback": "0x00", + "documentation": [ + " The metadata of the [`RoundSnapshot`]", + "", + " Only exists when [`Snapshot`] is present." + ] + }, + { + "name": "SignedSubmissionNextIndex", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The next index to be assigned to an incoming signed submission.", + "", + " Every accepted submission is assigned a unique index; that index is bound to that particular", + " submission for the duration of the election. On election finalization, the next index is", + " reset to 0.", + "", + " We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its", + " capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,", + " because iteration is slow. Instead, we store the value here." + ] + }, + { + "name": "SignedSubmissionIndices", + "modifier": "Default", + "type": { + "plain": "SubmissionIndicesOf" + }, + "fallback": "0x00", + "documentation": [ + " A sorted, bounded set of `(score, index)`, where each `index` points to a value in", + " `SignedSubmissions`.", + "", + " We never need to process more than a single signed submission at a time. Signed submissions", + " can be quite large, so we're willing to pay the cost of multiple database accesses to access", + " them one at a time instead of reading and decoding all of them at once." + ] + }, + { + "name": "SignedSubmissionsMap", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "u32", + "value": "SignedSubmissionOf", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000", + "documentation": [ + " Unchecked, signed solutions.", + "", + " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while", + " allowing us to keep only a single one in memory at a time.", + "", + " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or", + " affect; we shouldn't need a cryptographically secure hasher." + ] + }, + { + "name": "MinimumUntrustedScore", + "modifier": "Optional", + "type": { + "plain": "ElectionScore" + }, + "fallback": "0x00", + "documentation": [ + " The minimum score that each 'untrusted' solution must attain in order to be considered", + " feasible.", + "", + " Can be set via `set_minimum_untrusted_score`." + ] + } + ] + }, + "calls": [ + { + "name": "submit_unsigned", + "args": [ + { + "name": "solution", + "type": "RawSolution" + }, + { + "name": "witness", + "type": "SolutionOrSnapshotSize" + } + ], + "documentation": [ + " Submit a solution for the unsigned phase.", + "", + " The dispatch origin fo this call must be __none__.", + "", + " This submission is checked on the fly. Moreover, this unsigned solution is only", + " validated when submitted to the pool from the **local** node. Effectively, this means", + " that only active validators can submit this transaction when authoring a block (similar", + " to an inherent).", + "", + " To prevent any incorrect solution (and thus wasted time/weight), this transaction will", + " panic if the solution submitted by the validator is invalid in any way, effectively", + " putting their authoring reward at risk.", + "", + " No deposit or reward is associated with this submission." + ] + }, + { + "name": "set_minimum_untrusted_score", + "args": [ + { + "name": "maybe_next_score", + "type": "Option" + } + ], + "documentation": [ + " Set a new value for `MinimumUntrustedScore`.", + "", + " Dispatch origin must be aligned with `T::ForceOrigin`.", + "", + " This check can be turned off by setting the value to `None`." + ] + }, + { + "name": "set_emergency_election_result", + "args": [ + { + "name": "solution", + "type": "ReadySolution" + } + ], + "documentation": [ + " Set a solution in the queue, to be handed out to the client of this pallet in the next", + " call to `ElectionProvider::elect`.", + "", + " This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`.", + "", + " The solution is not checked for any feasibility and is assumed to be trustworthy, as any", + " feasibility check itself can in principle cause the election process to fail (due to", + " memory/weight constrains)." + ] + }, + { + "name": "submit", + "args": [ + { + "name": "solution", + "type": "RawSolution" + }, + { + "name": "num_signed_submissions", + "type": "u32" + } + ], + "documentation": [ + " Submit a solution for the signed phase.", + "", + " The dispatch origin fo this call must be __signed__.", + "", + " The solution is potentially queued, based on the claimed score and processed at the end", + " of the signed phase.", + "", + " A deposit is reserved and recorded for the solution. Based on the outcome, the solution", + " might be rewarded, slashed, or get all or a part of the deposit back.", + "", + " # ", + " Queue size must be provided as witness data.", + " # " + ] + } + ], + "events": [ + { + "name": "SolutionStored", + "args": [ + "ElectionCompute", + "bool" + ], + "documentation": [ + " A solution was stored with the given compute.", + "", + " If the solution is signed, this means that it hasn't yet been processed. If the", + " solution is unsigned, this means that it has also been processed.", + "", + " The `bool` is `true` when a previous solution was ejected to make room for this one." + ] + }, + { + "name": "ElectionFinalized", + "args": [ + "Option" + ], + "documentation": [ + " The election has been finalized, with `Some` of the given computation, or else if the", + " election failed, `None`." + ] + }, + { + "name": "Rewarded", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has been rewarded for their signed submission being finalized." + ] + }, + { + "name": "Slashed", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has been slashed for submitting an invalid signed submission." + ] + }, + { + "name": "SignedPhaseStarted", + "args": [ + "u32" + ], + "documentation": [ + " The signed phase of the given round has started." + ] + }, + { + "name": "UnsignedPhaseStarted", + "args": [ + "u32" + ], + "documentation": [ + " The unsigned phase of the given round has started." + ] + } + ], + "constants": [ + { + "name": "UnsignedPhase", + "type": "BlockNumber", + "value": "0x32000000", + "documentation": [ + " Duration of the unsigned phase." + ] + }, + { + "name": "SignedPhase", + "type": "BlockNumber", + "value": "0x32000000", + "documentation": [ + " Duration of the signed phase." + ] + }, + { + "name": "SolutionImprovementThreshold", + "type": "Perbill", + "value": "0xa0860100", + "documentation": [ + " The minimum amount of improvement to the solution score that defines a solution as", + " \"better\" (in any phase)." + ] + }, + { + "name": "OffchainRepeat", + "type": "BlockNumber", + "value": "0x05000000", + "documentation": [ + " The repeat threshold of the offchain worker.", + "", + " For example, if it is 5, that means that at least 5 blocks will elapse between attempts", + " to submit the worker's solution." + ] + }, + { + "name": "SignedMaxSubmissions", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " Maximum number of signed submissions that can be queued.", + "", + " It is best to avoid adjusting this during an election, as it impacts downstream data", + " structures. In particular, `SignedSubmissionIndices` is bounded on this value. If you", + " update this value during an election, you _must_ ensure that", + " `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,", + " attempts to submit new solutions may cause a runtime panic." + ] + }, + { + "name": "SignedMaxWeight", + "type": "Weight", + "value": "0xc07c907c2d010000", + "documentation": [ + " Maximum weight of a signed solution.", + "", + " This should probably be similar to [`Config::MinerMaxWeight`]." + ] + }, + { + "name": "SignedRewardBase", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Base reward for a signed solution" + ] + }, + { + "name": "SignedDepositBase", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Base deposit for a signed solution." + ] + }, + { + "name": "SignedDepositByte", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " Per-byte deposit for a signed solution." + ] + }, + { + "name": "SignedDepositWeight", + "type": "BalanceOf", + "value": "0x00000000000000000000000000000000", + "documentation": [ + " Per-weight deposit for a signed solution." + ] + } + ], + "errors": [ + { + "name": "PreDispatchEarlySubmission", + "documentation": [ + " Submission was too early." + ] + }, + { + "name": "PreDispatchWrongWinnerCount", + "documentation": [ + " Wrong number of winners presented." + ] + }, + { + "name": "PreDispatchWeakSubmission", + "documentation": [ + " Submission was too weak, score-wise." + ] + }, + { + "name": "SignedQueueFull", + "documentation": [ + " The queue was full, and the solution was not better than any of the existing ones." + ] + }, + { + "name": "SignedCannotPayDeposit", + "documentation": [ + " The origin failed to pay the deposit." + ] + }, + { + "name": "SignedInvalidWitness", + "documentation": [ + " Witness data to dispatchable is invalid." + ] + }, + { + "name": "SignedTooMuchWeight", + "documentation": [ + " The signed submission consumes too much weight" + ] + }, + { + "name": "OcwCallWrongEra", + "documentation": [ + " OCW submitted solution for wrong round" + ] + }, + { + "name": "MissingSnapshotMetadata", + "documentation": [ + " Snapshot metadata should exist but didn't." + ] + }, + { + "name": "InvalidSubmissionIndex", + "documentation": [ + " `Self::insert_submission` returned an invalid index." + ] + }, + { + "name": "CallNotAllowed", + "documentation": [ + " The call is not allowed at this point." + ] + } + ], + "index": 8 + }, + { + "name": "Staking", + "storage": { + "prefix": "Staking", + "items": [ + { + "name": "HistoryDepth", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x54000000", + "documentation": [ + " Number of eras to keep in history.", + "", + " Information is kept for eras in `[current_era - history_depth; current_era]`.", + "", + " Must be more than the number of eras delayed by session otherwise. I.e. active era must", + " always be in history. I.e. `active_era > current_era - history_depth` must be", + " guaranteed." + ] + }, + { + "name": "ValidatorCount", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The ideal number of staking participants." + ] + }, + { + "name": "MinimumValidatorCount", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Minimum number of staking participants before emergency conditions are imposed." + ] + }, + { + "name": "Invulnerables", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", + " easy to initialize and the performance hit is minimal (we expect no more than four", + " invulnerables) and restricted to testnets." + ] + }, + { + "name": "Bonded", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all locked \"stash\" accounts to the controller account." + ] + }, + { + "name": "MinNominatorBond", + "modifier": "Default", + "type": { + "plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The minimum active bond to become and maintain the role of a nominator." + ] + }, + { + "name": "MinValidatorBond", + "modifier": "Default", + "type": { + "plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The minimum active bond to become and maintain the role of a validator." + ] + }, + { + "name": "Ledger", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "StakingLedger", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." + ] + }, + { + "name": "Payee", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "RewardDestination", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Where the reward payment should be made. Keyed by stash." + ] + }, + { + "name": "Validators", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "ValidatorPrefs", + "linked": false + } + }, + "fallback": "0x0000", + "documentation": [ + " The map from (wannabe) validator stash key to the preferences of that validator.", + "", + " When updating this storage item, you must also update the `CounterForValidators`." + ] + }, + { + "name": "CounterForValidators", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " A tracker to keep count of the number of items in the `Validators` map." + ] + }, + { + "name": "MaxValidatorsCount", + "modifier": "Optional", + "type": { + "plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " The maximum validator count before we stop allowing new validators to join.", + "", + " When this value is not set, no limits are enforced." + ] + }, + { + "name": "Nominators", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Nominations", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The map from nominator stash key to the set of stash keys of all validators to nominate.", + "", + " When updating this storage item, you must also update the `CounterForNominators`." + ] + }, + { + "name": "CounterForNominators", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " A tracker to keep count of the number of items in the `Nominators` map." + ] + }, + { + "name": "MaxNominatorsCount", + "modifier": "Optional", + "type": { + "plain": "u32" + }, + "fallback": "0x00", + "documentation": [ + " The maximum nominator count before we stop allowing new validators to join.", + "", + " When this value is not set, no limits are enforced." + ] + }, + { + "name": "CurrentEra", + "modifier": "Optional", + "type": { + "plain": "EraIndex" + }, + "fallback": "0x00", + "documentation": [ + " The current era index.", + "", + " This is the latest planned era, depending on how the Session pallet queues the validator", + " set, it might be active or not." + ] + }, + { + "name": "ActiveEra", + "modifier": "Optional", + "type": { + "plain": "ActiveEraInfo" + }, + "fallback": "0x00", + "documentation": [ + " The active era information, it holds index and start.", + "", + " The active era is the era being currently rewarded. Validator set of this era must be", + " equal to [`SessionInterface::validators`]." + ] + }, + { + "name": "ErasStartSessionIndex", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "SessionIndex", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The session index at which the era start for the last `HISTORY_DEPTH` eras.", + "", + " Note: This tracks the starting session (i.e. session index when era start being active)", + " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`." + ] + }, + { + "name": "ErasStakers", + "modifier": "Default", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "Exposure", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x000000", + "documentation": [ + " Exposure of validator at era.", + "", + " This is keyed first by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras.", + " If stakers hasn't been set or has been removed then empty exposure is returned." + ] + }, + { + "name": "ErasStakersClipped", + "modifier": "Default", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "Exposure", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x000000", + "documentation": [ + " Clipped Exposure of validator at era.", + "", + " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the", + " `T::MaxNominatorRewardedPerValidator` biggest stakers.", + " (Note: the field `total` and `own` of the exposure remains unchanged).", + " This is used to limit the i/o cost for the nominator payout.", + "", + " This is keyed fist by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras.", + " If stakers hasn't been set or has been removed then empty exposure is returned." + ] + }, + { + "name": "ErasValidatorPrefs", + "modifier": "Default", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "ValidatorPrefs", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x0000", + "documentation": [ + " Similar to `ErasStakers`, this holds the preferences of validators.", + "", + " This is keyed first by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras." + ] + }, + { + "name": "ErasValidatorReward", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "BalanceOf", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The total validator era payout for the last `HISTORY_DEPTH` eras.", + "", + " Eras that haven't finished yet or has been removed doesn't have reward." + ] + }, + { + "name": "ErasRewardPoints", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "EraRewardPoints", + "linked": false + } + }, + "fallback": "0x0000000000", + "documentation": [ + " Rewards for the last `HISTORY_DEPTH` eras.", + " If reward hasn't been set or has been removed then 0 reward is returned." + ] + }, + { + "name": "ErasTotalStake", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "BalanceOf", + "linked": false + } + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The total amount staked for the last `HISTORY_DEPTH` eras.", + " If total hasn't been set or has been removed then 0 stake is returned." + ] + }, + { + "name": "ForceEra", + "modifier": "Default", + "type": { + "plain": "Forcing" + }, + "fallback": "0x00", + "documentation": [ + " Mode of era forcing." + ] + }, + { + "name": "SlashRewardFraction", + "modifier": "Default", + "type": { + "plain": "Perbill" + }, + "fallback": "0x00000000", + "documentation": [ + " The percentage of the slash that is distributed to reporters.", + "", + " The rest of the slashed value is handled by the `Slash`." + ] + }, + { + "name": "CanceledSlashPayout", + "modifier": "Default", + "type": { + "plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of currency given to reporters of a slash event which was", + " canceled by extraordinary circumstances (e.g. governance)." + ] + }, + { + "name": "UnappliedSlashes", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "EraIndex", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " All unapplied slashes that are queued for later." + ] + }, + { + "name": "BondedEras", + "modifier": "Default", + "type": { + "plain": "Vec<(EraIndex,SessionIndex)>" + }, + "fallback": "0x00", + "documentation": [ + " A mapping from still-bonded eras to the first session index of that era.", + "", + " Must contains information for eras for the range:", + " `[active_era - bounding_duration; active_era]`" + ] + }, + { + "name": "ValidatorSlashInEra", + "modifier": "Optional", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "(Perbill,BalanceOf)", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on validators, mapped by era to the highest slash proportion", + " and slash value of the era." + ] + }, + { + "name": "NominatorSlashInEra", + "modifier": "Optional", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "EraIndex", + "key2": "AccountId", + "value": "BalanceOf", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " All slashing events on nominators, mapped by era to the highest slash value of the era." + ] + }, + { + "name": "SlashingSpans", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "SlashingSpans", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Slashing spans for stash accounts." + ] + }, + { + "name": "SpanSlash", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "(AccountId,SpanIndex)", + "value": "SpanRecord", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Records information about the maximum slash of a stash within a slashing span,", + " as well as how much reward has been paid out." + ] + }, + { + "name": "EarliestUnappliedSlash", + "modifier": "Optional", + "type": { + "plain": "EraIndex" + }, + "fallback": "0x00", + "documentation": [ + " The earliest era for which we have a pending, unapplied slash." + ] + }, + { + "name": "CurrentPlannedSession", + "modifier": "Default", + "type": { + "plain": "SessionIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The last planned session scheduled by the session pallet.", + "", + " This is basically in sync with the call to [`SessionManager::new_session`]." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "plain": "Releases" + }, + "fallback": "0x06", + "documentation": [ + " True if network has been upgraded to this version.", + " Storage version of the pallet.", + "", + " This is set to v6.0.0 for new networks." + ] + }, + { + "name": "ChillThreshold", + "modifier": "Optional", + "type": { + "plain": "Percent" + }, + "fallback": "0x00", + "documentation": [ + " The threshold for when users can start calling `chill_other` for other validators / nominators.", + " The threshold is compared to the actual number of validators / nominators (`CountFor*`) in", + " the system compared to the configured max (`Max*Count`)." + ] + } + ] + }, + "calls": [ + { + "name": "bond", + "args": [ + { + "name": "controller", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " Take the origin account as a stash and lock up `value` of its balance. `controller` will", + " be the account that controls it.", + "", + " `value` must be more than the `minimum_balance` specified by `T::Currency`.", + "", + " The dispatch origin for this call must be _Signed_ by the stash account.", + "", + " Emits `Bonded`.", + "", + " # ", + " - Independent of the arguments. Moderate complexity.", + " - O(1).", + " - Three extra DB entries.", + "", + " NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned", + " unless the `origin` falls below _existential deposit_ and gets removed as dust.", + " ------------------", + " Weight: O(1)", + " DB Weight:", + " - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks", + " - Write: Bonded, Payee, [Origin Account], Locks, Ledger", + " # " + ] + }, + { + "name": "bond_extra", + "args": [ + { + "name": "max_additional", + "type": "Compact" + } + ], + "documentation": [ + " Add some extra amount that have appeared in the stash `free_balance` into the balance up", + " for staking.", + "", + " Use this if there are additional funds in your stash account that you wish to bond.", + " Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount", + " that can be added.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller and", + " it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " Emits `Bonded`.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - O(1).", + " - One DB entry.", + " ------------", + " DB Weight:", + " - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks", + " - Write: [Origin Account], Locks, Ledger", + " # " + ] + }, + { + "name": "unbond", + "args": [ + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", + " period ends. If this leaves an amount actively bonded less than", + " T::Currency::minimum_balance(), then it is increased to the full amount.", + "", + " Once the unlock period is done, you can call `withdraw_unbonded` to actually move", + " the funds out of management ready for transfer.", + "", + " No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)", + " can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need", + " to be called first to remove some of the chunks (if possible).", + "", + " If a user encounters the `InsufficientBond` error when calling this extrinsic,", + " they should call `chill` first in order to free up their bonded funds.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " Emits `Unbonded`.", + "", + " See also [`Call::withdraw_unbonded`].", + "", + " # ", + " - Independent of the arguments. Limited but potentially exploitable complexity.", + " - Contains a limited number of reads.", + " - Each call (requires the remainder of the bonded balance to be above `minimum_balance`)", + " will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage.", + " The only way to clean the aforementioned storage item is also user-controlled via", + " `withdraw_unbonded`.", + " - One DB entry.", + " ----------", + " Weight: O(1)", + " DB Weight:", + " - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash,", + " - Write: Locks, Ledger, BalanceOf Stash,", + " " + ] + }, + { + "name": "withdraw_unbonded", + "args": [ + { + "name": "num_slashing_spans", + "type": "u32" + } + ], + "documentation": [ + " Remove any unlocked chunks from the `unlocking` queue from our management.", + "", + " This essentially frees up that balance to be used by the stash account to do", + " whatever it wants.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " Emits `Withdrawn`.", + "", + " See also [`Call::unbond`].", + "", + " # ", + " - Could be dependent on the `origin` argument and how much `unlocking` chunks exist.", + " It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is", + " indirectly user-controlled. See [`unbond`] for more detail.", + " - Contains a limited number of reads, yet the size of which could be large based on `ledger`.", + " - Writes are limited to the `origin` account key.", + " ---------------", + " Complexity O(S) where S is the number of slashing spans to remove", + " Update:", + " - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account]", + " - Writes: [Origin Account], Locks, Ledger", + " Kill:", + " - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin", + " Account], Locks, BalanceOf stash", + " - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,", + " [Origin Account], Locks, BalanceOf stash.", + " - Writes Each: SpanSlash * S", + " NOTE: Weight annotation is the kill scenario, we refund otherwise.", + " # " + ] + }, + { + "name": "validate", + "args": [ + { + "name": "prefs", + "type": "ValidatorPrefs" + } + ], + "documentation": [ + " Declare the desire to validate for the origin controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " -----------", + " Weight: O(1)", + " DB Weight:", + " - Read: Era Election Status, Ledger", + " - Write: Nominators, Validators", + " # " + ] + }, + { + "name": "nominate", + "args": [ + { + "name": "targets", + "type": "Vec" + } + ], + "documentation": [ + " Declare the desire to nominate `targets` for the origin controller.", + "", + " Effects will be felt at the beginning of the next era. This can only be called when", + " [`EraElectionStatus`] is `Closed`.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - The transaction's complexity is proportional to the size of `targets` (N)", + " which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).", + " - Both the reads and writes follow a similar pattern.", + " ---------", + " Weight: O(N)", + " where N is the number of targets", + " DB Weight:", + " - Reads: Era Election Status, Ledger, Current Era", + " - Writes: Validators, Nominators", + " # " + ] + }, + { + "name": "chill", + "args": [], + "documentation": [ + " Declare no desire to either validate or nominate.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains one read.", + " - Writes are limited to the `origin` account key.", + " --------", + " Weight: O(1)", + " DB Weight:", + " - Read: EraElectionStatus, Ledger", + " - Write: Validators, Nominators", + " # " + ] + }, + { + "name": "set_payee", + "args": [ + { + "name": "payee", + "type": "RewardDestination" + } + ], + "documentation": [ + " (Re-)set the payment target for a controller.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " ---------", + " - Weight: O(1)", + " - DB Weight:", + " - Read: Ledger", + " - Write: Payee", + " # " + ] + }, + { + "name": "set_controller", + "args": [ + { + "name": "controller", + "type": "LookupSource" + } + ], + "documentation": [ + " (Re-)set the controller of a stash.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller.", + "", + " # ", + " - Independent of the arguments. Insignificant complexity.", + " - Contains a limited number of reads.", + " - Writes are limited to the `origin` account key.", + " ----------", + " Weight: O(1)", + " DB Weight:", + " - Read: Bonded, Ledger New Controller, Ledger Old Controller", + " - Write: Bonded, Ledger New Controller, Ledger Old Controller", + " # " + ] + }, + { + "name": "set_validator_count", + "args": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Sets the ideal number of validators.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " Weight: O(1)", + " Write: Validator Count", + " # " + ] + }, + { + "name": "increase_validator_count", + "args": [ + { + "name": "additional", + "type": "Compact" + } + ], + "documentation": [ + " Increments the ideal number of validators.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " Same as [`set_validator_count`].", + " # " + ] + }, + { + "name": "scale_validator_count", + "args": [ + { + "name": "factor", + "type": "Percent" + } + ], + "documentation": [ + " Scale up the ideal number of validators by a factor.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " Same as [`set_validator_count`].", + " # " + ] + }, + { + "name": "force_no_eras", + "args": [], + "documentation": [ + " Force there to be no new eras indefinitely.", + "", + " The dispatch origin must be Root.", + "", + " # Warning", + "", + " The election process starts multiple blocks before the end of the era.", + " Thus the election process may be ongoing when this is called. In this case the", + " election will continue until the next era is triggered.", + "", + " # ", + " - No arguments.", + " - Weight: O(1)", + " - Write: ForceEra", + " # " + ] + }, + { + "name": "force_new_era", + "args": [], + "documentation": [ + " Force there to be a new era at the end of the next session. After this, it will be", + " reset to normal (non-forced) behaviour.", + "", + " The dispatch origin must be Root.", + "", + " # Warning", + "", + " The election process starts multiple blocks before the end of the era.", + " If this is called just before a new era is triggered, the election process may not", + " have enough blocks to get a result.", + "", + " # ", + " - No arguments.", + " - Weight: O(1)", + " - Write ForceEra", + " # " + ] + }, + { + "name": "set_invulnerables", + "args": [ + { + "name": "invulnerables", + "type": "Vec" + } + ], + "documentation": [ + " Set the validators who cannot be slashed (if any).", + "", + " The dispatch origin must be Root.", + "", + " # ", + " - O(V)", + " - Write: Invulnerables", + " # " + ] + }, + { + "name": "force_unstake", + "args": [ + { + "name": "stash", + "type": "AccountId" + }, + { + "name": "num_slashing_spans", + "type": "u32" + } + ], + "documentation": [ + " Force a current staker to become completely unstaked, immediately.", + "", + " The dispatch origin must be Root.", + "", + " # ", + " O(S) where S is the number of slashing spans to be removed", + " Reads: Bonded, Slashing Spans, Account, Locks", + " Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks", + " Writes Each: SpanSlash * S", + " # " + ] + }, + { + "name": "force_new_era_always", + "args": [], + "documentation": [ + " Force there to be a new era at the end of sessions indefinitely.", + "", + " The dispatch origin must be Root.", + "", + " # Warning", + "", + " The election process starts multiple blocks before the end of the era.", + " If this is called just before a new era is triggered, the election process may not", + " have enough blocks to get a result.", + "", + " # ", + " - Weight: O(1)", + " - Write: ForceEra", + " # " + ] + }, + { + "name": "cancel_deferred_slash", + "args": [ + { + "name": "era", + "type": "EraIndex" + }, + { + "name": "slash_indices", + "type": "Vec" + } + ], + "documentation": [ + " Cancel enactment of a deferred slash.", + "", + " Can be called by the `T::SlashCancelOrigin`.", + "", + " Parameters: era and indices of the slashes for that era to kill.", + "", + " # ", + " Complexity: O(U + S)", + " with U unapplied slashes weighted with U=1000", + " and S is the number of slash indices to be canceled.", + " - Read: Unapplied Slashes", + " - Write: Unapplied Slashes", + " # " + ] + }, + { + "name": "payout_stakers", + "args": [ + { + "name": "validator_stash", + "type": "AccountId" + }, + { + "name": "era", + "type": "EraIndex" + } + ], + "documentation": [ + " Pay out all the stakers behind a single validator for a single era.", + "", + " - `validator_stash` is the stash account of the validator. Their nominators, up to", + " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards.", + " - `era` may be any era between `[current_era - history_depth; current_era]`.", + "", + " The origin of this call must be _Signed_. Any account can call this function, even if", + " it is not one of the stakers.", + "", + " This can only be called when [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Time complexity: at most O(MaxNominatorRewardedPerValidator).", + " - Contains a limited number of reads and writes.", + " -----------", + " N is the Number of payouts for the validator (including the validator)", + " Weight:", + " - Reward Destination Staked: O(N)", + " - Reward Destination Controller (Creating): O(N)", + " DB Weight:", + " - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward,", + " ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items)", + " - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items)", + " - Write Each: System Account, Locks, Ledger (3 items)", + "", + " NOTE: weights are assuming that payouts are made to alive stash account (Staked).", + " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here.", + " # " + ] + }, + { + "name": "rebond", + "args": [ + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Rebond a portion of the stash scheduled to be unlocked.", + "", + " The dispatch origin must be signed by the controller, and it can be only called when", + " [`EraElectionStatus`] is `Closed`.", + "", + " # ", + " - Time complexity: O(L), where L is unlocking chunks", + " - Bounded by `MAX_UNLOCKING_CHUNKS`.", + " - Storage changes: Can't increase storage, only decrease it.", + " ---------------", + " - DB Weight:", + " - Reads: EraElectionStatus, Ledger, Locks, [Origin Account]", + " - Writes: [Origin Account], Locks, Ledger", + " # " + ] + }, + { + "name": "set_history_depth", + "args": [ + { + "name": "new_history_depth", + "type": "Compact" + }, + { + "name": "_era_items_deleted", + "type": "Compact" + } + ], + "documentation": [ + " Set `HistoryDepth` value. This function will delete any history information", + " when `HistoryDepth` is reduced.", + "", + " Parameters:", + " - `new_history_depth`: The new history depth you would like to set.", + " - `era_items_deleted`: The number of items that will be deleted by this dispatch.", + " This should report all the storage items that will be deleted by clearing old", + " era history. Needed to report an accurate weight for the dispatch. Trusted by", + " `Root` to report an accurate number.", + "", + " Origin must be root.", + "", + " # ", + " - E: Number of history depths removed, i.e. 10 -> 7 = 3", + " - Weight: O(E)", + " - DB Weight:", + " - Reads: Current Era, History Depth", + " - Writes: History Depth", + " - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs", + " - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex", + " # " + ] + }, + { + "name": "reap_stash", + "args": [ + { + "name": "stash", + "type": "AccountId" + }, + { + "name": "num_slashing_spans", + "type": "u32" + } + ], + "documentation": [ + " Remove all data structure concerning a staker/stash once its balance is at the minimum.", + " This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone", + " and the target `stash` must have no funds left beyond the ED.", + "", + " This can be called from any origin.", + "", + " - `stash`: The stash account to reap. Its balance must be zero.", + "", + " # ", + " Complexity: O(S) where S is the number of slashing spans on the account.", + " DB Weight:", + " - Reads: Stash Account, Bonded, Slashing Spans, Locks", + " - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks", + " - Writes Each: SpanSlash * S", + " # " + ] + }, + { + "name": "kick", + "args": [ + { + "name": "who", + "type": "Vec" + } + ], + "documentation": [ + " Remove the given nominations from the calling validator.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller", + " account should represent a validator.", + "", + " - `who`: A list of nominator stash accounts who are nominating this validator which", + " should no longer be nominating this validator.", + "", + " Note: Making this call only makes sense if you first set the validator preferences to", + " block any further nominations." + ] + }, + { + "name": "set_staking_limits", + "args": [ + { + "name": "min_nominator_bond", + "type": "BalanceOf" + }, + { + "name": "min_validator_bond", + "type": "BalanceOf" + }, + { + "name": "max_nominator_count", + "type": "Option" + }, + { + "name": "max_validator_count", + "type": "Option" + }, + { + "name": "threshold", + "type": "Option" + } + ], + "documentation": [ + " Update the various staking limits this pallet.", + "", + " * `min_nominator_bond`: The minimum active bond needed to be a nominator.", + " * `min_validator_bond`: The minimum active bond needed to be a validator.", + " * `max_nominator_count`: The max number of users who can be a nominator at once.", + " When set to `None`, no limit is enforced.", + " * `max_validator_count`: The max number of users who can be a validator at once.", + " When set to `None`, no limit is enforced.", + "", + " Origin must be Root to call this function.", + "", + " NOTE: Existing nominators and validators will not be affected by this update.", + " to kick people under the new limits, `chill_other` should be called." + ] + }, + { + "name": "chill_other", + "args": [ + { + "name": "controller", + "type": "AccountId" + } + ], + "documentation": [ + " Declare a `controller` to stop participating as either a validator or nominator.", + "", + " Effects will be felt at the beginning of the next era.", + "", + " The dispatch origin for this call must be _Signed_, but can be called by anyone.", + "", + " If the caller is the same as the controller being targeted, then no further checks are", + " enforced, and this function behaves just like `chill`.", + "", + " If the caller is different than the controller being targeted, the following conditions", + " must be met:", + " * A `ChillThreshold` must be set and checked which defines how close to the max", + " nominators or validators we must reach before users can start chilling one-another.", + " * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine", + " how close we are to the threshold.", + " * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines", + " if this is a person that should be chilled because they have not met the threshold", + " bond required.", + "", + " This can be helpful if bond requirements are updated, and we need to remove old users", + " who do not satisfy these requirements.", + "" + ] + } + ], + "events": [ + { + "name": "EraPayout", + "args": [ + "EraIndex", + "Balance", + "Balance" + ], + "documentation": [ + " The era payout has been set; the first balance is the validator-payout; the second is", + " the remainder from the maximum amount of reward.", + " \\[era_index, validator_payout, remainder\\]" + ] + }, + { + "name": "Reward", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " The staker has been rewarded by this amount. \\[stash, amount\\]" + ] + }, + { + "name": "Slash", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " One validator (and its nominators) has been slashed by the given amount.", + " \\[validator, amount\\]" + ] + }, + { + "name": "OldSlashingReportDiscarded", + "args": [ + "SessionIndex" + ], + "documentation": [ + " An old slashing report from a prior era was discarded because it could", + " not be processed. \\[session_index\\]" + ] + }, + { + "name": "StakingElection", + "args": [], + "documentation": [ + " A new set of stakers was elected." + ] + }, + { + "name": "Bonded", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has bonded this amount. \\[stash, amount\\]", + "", + " NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,", + " it will not be emitted for staking rewards when they are added to stake." + ] + }, + { + "name": "Unbonded", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has unbonded this amount. \\[stash, amount\\]" + ] + }, + { + "name": "Withdrawn", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`", + " from the unlocking queue. \\[stash, amount\\]" + ] + }, + { + "name": "Kicked", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A nominator has been kicked from a validator. \\[nominator, stash\\]" + ] + }, + { + "name": "StakingElectionFailed", + "args": [], + "documentation": [ + " The election failed. No new era is planned." + ] + } + ], + "constants": [ + { + "name": "SessionsPerEra", + "type": "SessionIndex", + "value": "0x06000000", + "documentation": [ + " Number of sessions per era." + ] + }, + { + "name": "BondingDuration", + "type": "EraIndex", + "value": "0xa0020000", + "documentation": [ + " Number of eras that staked funds must remain bonded for." + ] + }, + { + "name": "SlashDeferDuration", + "type": "EraIndex", + "value": "0xa8000000", + "documentation": [ + " Number of eras that slashes are deferred by, after computation.", + "", + " This should be less than the bonding duration. Set to 0 if slashes", + " should be applied immediately, without opportunity for intervention." + ] + }, + { + "name": "MaxNominatorRewardedPerValidator", + "type": "u32", + "value": "0x00010000", + "documentation": [ + " The maximum number of nominators rewarded for each validator.", + "", + " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim", + " their reward. This used to limit the i/o cost for the nominator payout." + ] + }, + { + "name": "MaxNominations", + "type": "u32", + "value": "0x10000000", + "documentation": [] + } + ], + "errors": [ + { + "name": "NotController", + "documentation": [ + " Not a controller account." + ] + }, + { + "name": "NotStash", + "documentation": [ + " Not a stash account." + ] + }, + { + "name": "AlreadyBonded", + "documentation": [ + " Stash is already bonded." + ] + }, + { + "name": "AlreadyPaired", + "documentation": [ + " Controller is already paired." + ] + }, + { + "name": "EmptyTargets", + "documentation": [ + " Targets cannot be empty." + ] + }, + { + "name": "DuplicateIndex", + "documentation": [ + " Duplicate index." + ] + }, + { + "name": "InvalidSlashIndex", + "documentation": [ + " Slash record index out of bounds." + ] + }, + { + "name": "InsufficientBond", + "documentation": [ + " Can not bond with value less than minimum required." + ] + }, + { + "name": "NoMoreChunks", + "documentation": [ + " Can not schedule more unlock chunks." + ] + }, + { + "name": "NoUnlockChunk", + "documentation": [ + " Can not rebond without unlocking chunks." + ] + }, + { + "name": "FundedTarget", + "documentation": [ + " Attempting to target a stash that still has funds." + ] + }, + { + "name": "InvalidEraToReward", + "documentation": [ + " Invalid era to reward." + ] + }, + { + "name": "InvalidNumberOfNominations", + "documentation": [ + " Invalid number of nominations." + ] + }, + { + "name": "NotSortedAndUnique", + "documentation": [ + " Items are not sorted and unique." + ] + }, + { + "name": "AlreadyClaimed", + "documentation": [ + " Rewards for this era have already been claimed for this validator." + ] + }, + { + "name": "IncorrectHistoryDepth", + "documentation": [ + " Incorrect previous history depth input provided." + ] + }, + { + "name": "IncorrectSlashingSpans", + "documentation": [ + " Incorrect number of slashing spans provided." + ] + }, + { + "name": "BadState", + "documentation": [ + " Internal state has become somehow corrupted and the operation cannot continue." + ] + }, + { + "name": "TooManyTargets", + "documentation": [ + " Too many nomination targets supplied." + ] + }, + { + "name": "BadTarget", + "documentation": [ + " A nomination target was supplied that was blocked or otherwise not a validator." + ] + }, + { + "name": "CannotChillOther", + "documentation": [ + " The user has enough bond and thus cannot be chilled forcefully by an external person." + ] + }, + { + "name": "TooManyNominators", + "documentation": [ + " There are too many nominators in the system. Governance needs to adjust the staking settings", + " to keep things safe for the runtime." + ] + }, + { + "name": "TooManyValidators", + "documentation": [ + " There are too many validators in the system. Governance needs to adjust the staking settings", + " to keep things safe for the runtime." + ] + } + ], + "index": 9 + }, + { + "name": "Session", + "storage": { + "prefix": "Session", + "items": [ + { + "name": "Validators", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of validators." + ] + }, + { + "name": "CurrentIndex", + "modifier": "Default", + "type": { + "plain": "SessionIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Current index of the session." + ] + }, + { + "name": "QueuedChanged", + "modifier": "Default", + "type": { + "plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the underlying economic identities or weighting behind the validators", + " has changed in the queued validator set." + ] + }, + { + "name": "QueuedKeys", + "modifier": "Default", + "type": { + "plain": "Vec<(ValidatorId,Keys)>" + }, + "fallback": "0x00", + "documentation": [ + " The queued keys for the next session. When the next session begins, these keys", + " will be used to determine the validator's session keys." + ] + }, + { + "name": "DisabledValidators", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Indices of disabled validators.", + "", + " The set is cleared when `on_session_ending` returns a new set of identities." + ] + }, + { + "name": "NextKeys", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "ValidatorId", + "value": "Keys", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The next session keys for a validator." + ] + }, + { + "name": "KeyOwner", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "(KeyTypeId,Bytes)", + "value": "ValidatorId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The owner of a key. The key is the `KeyTypeId` + the encoded key." + ] + } + ] + }, + "calls": [ + { + "name": "set_keys", + "args": [ + { + "name": "keys", + "type": "Keys" + }, + { + "name": "proof", + "type": "Bytes" + } + ], + "documentation": [ + " Sets the session key(s) of the function caller to `keys`.", + " Allows an account to set its session key prior to becoming a validator.", + " This doesn't take effect until the next session.", + "", + " The dispatch origin of this function must be signed.", + "", + " # ", + " - Complexity: `O(1)`", + " Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.", + " - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`", + " - DbWrites: `origin account`, `NextKeys`", + " - DbReads per key id: `KeyOwner`", + " - DbWrites per key id: `KeyOwner`", + " # " + ] + }, + { + "name": "purge_keys", + "args": [], + "documentation": [ + " Removes any session key(s) of the function caller.", + " This doesn't take effect until the next session.", + "", + " The dispatch origin of this function must be signed.", + "", + " # ", + " - Complexity: `O(1)` in number of key types.", + " Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.", + " - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`", + " - DbWrites: `NextKeys`, `origin account`", + " - DbWrites per key id: `KeyOwner`", + " # " + ] + } + ], + "events": [ + { + "name": "NewSession", + "args": [ + "SessionIndex" + ], + "documentation": [ + " New session has happened. Note that the argument is the \\[session_index\\], not the block", + " number as the type might suggest." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "InvalidProof", + "documentation": [ + " Invalid ownership proof." + ] + }, + { + "name": "NoAssociatedValidatorId", + "documentation": [ + " No associated validator ID for account." + ] + }, + { + "name": "DuplicatedKey", + "documentation": [ + " Registered duplicate key." + ] + }, + { + "name": "NoKeys", + "documentation": [ + " No keys are associated with this account." + ] + }, + { + "name": "NoAccount", + "documentation": [ + " Key setting account is not live, so it's impossible to associate keys." + ] + } + ], + "index": 10 + }, + { + "name": "Democracy", + "storage": { + "prefix": "Democracy", + "items": [ + { + "name": "PublicPropCount", + "modifier": "Default", + "type": { + "plain": "PropIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The number of (public) proposals that have been made so far." + ] + }, + { + "name": "PublicProps", + "modifier": "Default", + "type": { + "plain": "Vec<(PropIndex,Hash,AccountId)>" + }, + "fallback": "0x00", + "documentation": [ + " The public proposals. Unsorted. The second item is the proposal's hash." + ] + }, + { + "name": "DepositOf", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "PropIndex", + "value": "(Vec,BalanceOf)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Those who have locked a deposit.", + "", + " TWOX-NOTE: Safe, as increasing integer keys are safe." + ] + }, + { + "name": "Preimages", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "Hash", + "value": "PreimageStatus", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Map of hashes to the proposal preimage, along with who registered it and their deposit.", + " The block number is the block at which it was deposited." + ] + }, + { + "name": "ReferendumCount", + "modifier": "Default", + "type": { + "plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The next free referendum index, aka the number of referenda started so far." + ] + }, + { + "name": "LowestUnbaked", + "modifier": "Default", + "type": { + "plain": "ReferendumIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " The lowest referendum index representing an unbaked referendum. Equal to", + " `ReferendumCount` if there isn't a unbaked referendum." + ] + }, + { + "name": "ReferendumInfoOf", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "ReferendumIndex", + "value": "ReferendumInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information concerning any given referendum.", + "", + " TWOX-NOTE: SAFE as indexes are not under an attacker’s control." + ] + }, + { + "name": "VotingOf", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Voting", + "linked": false + } + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " All votes for a particular voter. We store the balance for the number of votes that we", + " have recorded. The second item is the total amount of delegations, that will be added.", + "", + " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway." + ] + }, + { + "name": "Locks", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "BlockNumber", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Accounts for which there are locks in action which may be removed at some point in the", + " future. The value is the block number at which the lock expires and may be removed.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "LastTabledWasExternal", + "modifier": "Default", + "type": { + "plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " True if the last referendum tabled was submitted externally. False if it was a public", + " proposal." + ] + }, + { + "name": "NextExternal", + "modifier": "Optional", + "type": { + "plain": "(Hash,VoteThreshold)" + }, + "fallback": "0x00", + "documentation": [ + " The referendum to be tabled whenever it would be valid to table an external proposal.", + " This happens when a referendum needs to be tabled and one of two conditions are met:", + " - `LastTabledWasExternal` is `false`; or", + " - `PublicProps` is empty." + ] + }, + { + "name": "Blacklist", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "Hash", + "value": "(BlockNumber,Vec)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A record of who vetoed what. Maps proposal hash to a possible existent block number", + " (until when it may not be resubmitted) and who vetoed it." + ] + }, + { + "name": "Cancellations", + "modifier": "Default", + "type": { + "map": { + "hasher": "Identity", + "key": "Hash", + "value": "bool", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Record of all proposals that have been subject to emergency cancellation." + ] + }, + { + "name": "StorageVersion", + "modifier": "Optional", + "type": { + "plain": "Releases" + }, + "fallback": "0x00", + "documentation": [ + " Storage version of the pallet.", + "", + " New networks start with last version." + ] + } + ] + }, + "calls": [ + { + "name": "propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken.", + "", + " The dispatch origin of this call must be _Signed_ and the sender must", + " have funds to cover the deposit.", + "", + " - `proposal_hash`: The hash of the proposal preimage.", + " - `value`: The amount of deposit (must be at least `MinimumDeposit`).", + "", + " Emits `Proposed`.", + "", + " Weight: `O(p)`" + ] + }, + { + "name": "second", + "args": [ + { + "name": "proposal", + "type": "Compact" + }, + { + "name": "seconds_upper_bound", + "type": "Compact" + } + ], + "documentation": [ + " Signals agreement with a particular proposal.", + "", + " The dispatch origin of this call must be _Signed_ and the sender", + " must have funds to cover the deposit, equal to the original deposit.", + "", + " - `proposal`: The index of the proposal to second.", + " - `seconds_upper_bound`: an upper bound on the current number of seconds on this", + " proposal. Extrinsic is weighted according to this value with no refund.", + "", + " Weight: `O(S)` where S is the number of seconds a proposal already has." + ] + }, + { + "name": "vote", + "args": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "name": "vote", + "type": "AccountVote" + } + ], + "documentation": [ + " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", + " otherwise it is a vote to keep the status quo.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `ref_index`: The index of the referendum to vote for.", + " - `vote`: The vote configuration.", + "", + " Weight: `O(R)` where R is the number of referendums the voter has voted on." + ] + }, + { + "name": "emergency_cancel", + "args": [ + { + "name": "ref_index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", + " referendum.", + "", + " The dispatch origin of this call must be `CancellationOrigin`.", + "", + " -`ref_index`: The index of the referendum to cancel.", + "", + " Weight: `O(1)`." + ] + }, + { + "name": "external_propose", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a referendum to be tabled once it is legal to schedule an external", + " referendum.", + "", + " The dispatch origin of this call must be `ExternalOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal.", + "", + " Weight: `O(V)` with V number of vetoers in the blacklist of proposal.", + " Decoding vec of length V. Charged as maximum" + ] + }, + { + "name": "external_propose_majority", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", + " an external referendum.", + "", + " The dispatch of this call must be `ExternalMajorityOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "external_propose_default", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", + " schedule an external referendum.", + "", + " The dispatch of this call must be `ExternalDefaultOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal.", + "", + " Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + " pre-scheduled `external_propose` call.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "fast_track", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "voting_period", + "type": "BlockNumber" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Schedule the currently externally-proposed majority-carries referendum to be tabled", + " immediately. If there is no externally-proposed referendum currently, or if there is one", + " but it is not a majority-carries referendum then it fails.", + "", + " The dispatch of this call must be `FastTrackOrigin`.", + "", + " - `proposal_hash`: The hash of the current external proposal.", + " - `voting_period`: The period that is allowed for voting on this proposal. Increased to", + " `FastTrackVotingPeriod` if too low.", + " - `delay`: The number of block after voting has ended in approval and this should be", + " enacted. This doesn't have a minimum amount.", + "", + " Emits `Started`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "veto_external", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Veto and blacklist the external proposal hash.", + "", + " The dispatch origin of this call must be `VetoOrigin`.", + "", + " - `proposal_hash`: The preimage hash of the proposal to veto and blacklist.", + "", + " Emits `Vetoed`.", + "", + " Weight: `O(V + log(V))` where V is number of `existing vetoers`" + ] + }, + { + "name": "cancel_referendum", + "args": [ + { + "name": "ref_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a referendum.", + "", + " The dispatch origin of this call must be _Root_.", + "", + " - `ref_index`: The index of the referendum to cancel.", + "", + " # Weight: `O(1)`." + ] + }, + { + "name": "cancel_queued", + "args": [ + { + "name": "which", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Cancel a proposal queued for enactment.", + "", + " The dispatch origin of this call must be _Root_.", + "", + " - `which`: The index of the referendum to cancel.", + "", + " Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`." + ] + }, + { + "name": "delegate", + "args": [ + { + "name": "to", + "type": "AccountId" + }, + { + "name": "conviction", + "type": "Conviction" + }, + { + "name": "balance", + "type": "BalanceOf" + } + ], + "documentation": [ + " Delegate the voting power (with some given conviction) of the sending account.", + "", + " The balance delegated is locked for as long as it's delegated, and thereafter for the", + " time appropriate for the conviction's lock period.", + "", + " The dispatch origin of this call must be _Signed_, and the signing account must either:", + " - be delegating already; or", + " - have no voting activity (if there is, then it will need to be removed/consolidated", + " through `reap_vote` or `unvote`).", + "", + " - `to`: The account whose voting the `target` account's voting power will follow.", + " - `conviction`: The conviction that will be attached to the delegated votes. When the", + " account is undelegated, the funds will be locked for the corresponding period.", + " - `balance`: The amount of the account's balance to be used in delegating. This must", + " not be more than the account's current balance.", + "", + " Emits `Delegated`.", + "", + " Weight: `O(R)` where R is the number of referendums the voter delegating to has", + " voted on. Weight is charged as if maximum votes." + ] + }, + { + "name": "undelegate", + "args": [], + "documentation": [ + " Undelegate the voting power of the sending account.", + "", + " Tokens may be unlocked following once an amount of time consistent with the lock period", + " of the conviction with which the delegation was issued.", + "", + " The dispatch origin of this call must be _Signed_ and the signing account must be", + " currently delegating.", + "", + " Emits `Undelegated`.", + "", + " Weight: `O(R)` where R is the number of referendums the voter delegating to has", + " voted on. Weight is charged as if maximum votes." + ] + }, + { + "name": "clear_public_proposals", + "args": [], + "documentation": [ + " Clears all public proposals.", + "", + " The dispatch origin of this call must be _Root_.", + "", + " Weight: `O(1)`." + ] + }, + { + "name": "note_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", + " in the dispatch queue but does require a deposit, returned once enacted.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `encoded_proposal`: The preimage of a proposal.", + "", + " Emits `PreimageNoted`.", + "", + " Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit)." + ] + }, + { + "name": "note_preimage_operational", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Same as `note_preimage` but origin is `OperationalPreimageOrigin`." + ] + }, + { + "name": "note_imminent_preimage", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Register the preimage for an upcoming proposal. This requires the proposal to be", + " in the dispatch queue. No deposit is needed. When this call is successful, i.e.", + " the preimage has not been uploaded before and matches some imminent proposal,", + " no fee is paid.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `encoded_proposal`: The preimage of a proposal.", + "", + " Emits `PreimageNoted`.", + "", + " Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit)." + ] + }, + { + "name": "note_imminent_preimage_operational", + "args": [ + { + "name": "encoded_proposal", + "type": "Bytes" + } + ], + "documentation": [ + " Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`." + ] + }, + { + "name": "reap_preimage", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "proposal_len_upper_bound", + "type": "Compact" + } + ], + "documentation": [ + " Remove an expired proposal preimage and collect the deposit.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `proposal_hash`: The preimage hash of a proposal.", + " - `proposal_length_upper_bound`: an upper bound on length of the proposal.", + " Extrinsic is weighted according to this value with no refund.", + "", + " This will only work after `VotingPeriod` blocks from the time that the preimage was", + " noted, if it's the same account doing it. If it's a different account, then it'll only", + " work an additional `EnactmentPeriod` later.", + "", + " Emits `PreimageReaped`.", + "", + " Weight: `O(D)` where D is length of proposal." + ] + }, + { + "name": "unlock", + "args": [ + { + "name": "target", + "type": "AccountId" + } + ], + "documentation": [ + " Unlock tokens that have an expired lock.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `target`: The account to remove the lock on.", + "", + " Weight: `O(R)` with R number of vote of target." + ] + }, + { + "name": "remove_vote", + "args": [ + { + "name": "index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Remove a vote for a referendum.", + "", + " If:", + " - the referendum was cancelled, or", + " - the referendum is ongoing, or", + " - the referendum has ended such that", + " - the vote of the account was in opposition to the result; or", + " - there was no conviction to the account's vote; or", + " - the account made a split vote", + " ...then the vote is removed cleanly and a following call to `unlock` may result in more", + " funds being available.", + "", + " If, however, the referendum has ended and:", + " - it finished corresponding to the vote of the account, and", + " - the account made a standard vote with conviction, and", + " - the lock period of the conviction is not over", + " ...then the lock will be aggregated into the overall account's lock, which may involve", + " *overlocking* (where the two locks are combined into a single lock that is the maximum", + " of both the amount locked and the time is it locked for).", + "", + " The dispatch origin of this call must be _Signed_, and the signer must have a vote", + " registered for referendum `index`.", + "", + " - `index`: The index of referendum of the vote to be removed.", + "", + " Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.", + " Weight is calculated for the maximum number of vote." + ] + }, + { + "name": "remove_other_vote", + "args": [ + { + "name": "target", + "type": "AccountId" + }, + { + "name": "index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Remove a vote for a referendum.", + "", + " If the `target` is equal to the signer, then this function is exactly equivalent to", + " `remove_vote`. If not equal to the signer, then the vote must have expired,", + " either because the referendum was cancelled, because the voter lost the referendum or", + " because the conviction period is over.", + "", + " The dispatch origin of this call must be _Signed_.", + "", + " - `target`: The account of the vote to be removed; this account must have voted for", + " referendum `index`.", + " - `index`: The index of referendum of the vote to be removed.", + "", + " Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.", + " Weight is calculated for the maximum number of vote." + ] + }, + { + "name": "enact_proposal", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "index", + "type": "ReferendumIndex" + } + ], + "documentation": [ + " Enact a proposal from a referendum. For now we just make the weight be the maximum." + ] + }, + { + "name": "blacklist", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "maybe_ref_index", + "type": "Option" + } + ], + "documentation": [ + " Permanently place a proposal into the blacklist. This prevents it from ever being", + " proposed again.", + "", + " If called on a queued public or external proposal, then this will result in it being", + " removed. If the `ref_index` supplied is an active referendum with the proposal hash,", + " then it will be cancelled.", + "", + " The dispatch origin of this call must be `BlacklistOrigin`.", + "", + " - `proposal_hash`: The proposal hash to blacklist permanently.", + " - `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be", + " cancelled.", + "", + " Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a", + " reasonable value)." + ] + }, + { + "name": "cancel_proposal", + "args": [ + { + "name": "prop_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a proposal.", + "", + " The dispatch origin of this call must be `CancelProposalOrigin`.", + "", + " - `prop_index`: The index of the proposal to cancel.", + "", + " Weight: `O(p)` where `p = PublicProps::::decode_len()`" + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "PropIndex", + "Balance" + ], + "documentation": [ + " A motion has been proposed by a public account. \\[proposal_index, deposit\\]" + ] + }, + { + "name": "Tabled", + "args": [ + "PropIndex", + "Balance", + "Vec" + ], + "documentation": [ + " A public proposal has been tabled for referendum vote. \\[proposal_index, deposit, depositors\\]" + ] + }, + { + "name": "ExternalTabled", + "args": [], + "documentation": [ + " An external proposal has been tabled." + ] + }, + { + "name": "Started", + "args": [ + "ReferendumIndex", + "VoteThreshold" + ], + "documentation": [ + " A referendum has begun. \\[ref_index, threshold\\]" + ] + }, + { + "name": "Passed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been approved by referendum. \\[ref_index\\]" + ] + }, + { + "name": "NotPassed", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A proposal has been rejected by referendum. \\[ref_index\\]" + ] + }, + { + "name": "Cancelled", + "args": [ + "ReferendumIndex" + ], + "documentation": [ + " A referendum has been cancelled. \\[ref_index\\]" + ] + }, + { + "name": "Executed", + "args": [ + "ReferendumIndex", + "bool" + ], + "documentation": [ + " A proposal has been enacted. \\[ref_index, is_ok\\]" + ] + }, + { + "name": "Delegated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " An account has delegated their vote to another account. \\[who, target\\]" + ] + }, + { + "name": "Undelegated", + "args": [ + "AccountId" + ], + "documentation": [ + " An \\[account\\] has cancelled a previous delegation operation." + ] + }, + { + "name": "Vetoed", + "args": [ + "AccountId", + "Hash", + "BlockNumber" + ], + "documentation": [ + " An external proposal has been vetoed. \\[who, proposal_hash, until\\]" + ] + }, + { + "name": "PreimageNoted", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal's preimage was noted, and the deposit taken. \\[proposal_hash, who, deposit\\]" + ] + }, + { + "name": "PreimageUsed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A proposal preimage was removed and used (the deposit was returned).", + " \\[proposal_hash, provider, deposit\\]" + ] + }, + { + "name": "PreimageInvalid", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was invalid.", + " \\[proposal_hash, ref_index\\]" + ] + }, + { + "name": "PreimageMissing", + "args": [ + "Hash", + "ReferendumIndex" + ], + "documentation": [ + " A proposal could not be executed because its preimage was missing.", + " \\[proposal_hash, ref_index\\]" + ] + }, + { + "name": "PreimageReaped", + "args": [ + "Hash", + "AccountId", + "Balance", + "AccountId" + ], + "documentation": [ + " A registered preimage was removed and the deposit collected by the reaper.", + " \\[proposal_hash, provider, deposit, reaper\\]" + ] + }, + { + "name": "Unlocked", + "args": [ + "AccountId" + ], + "documentation": [ + " An \\[account\\] has been unlocked successfully." + ] + }, + { + "name": "Blacklisted", + "args": [ + "Hash" + ], + "documentation": [ + " A proposal \\[hash\\] has been blacklisted permanently." + ] + } + ], + "constants": [ + { + "name": "EnactmentPeriod", + "type": "BlockNumber", + "value": "0x002f0d00", + "documentation": [ + " The minimum period of locking and the period between a proposal being approved and enacted.", + "", + " It should generally be a little more than the unstake period to ensure that", + " voting stakers have an opportunity to remove themselves from the system in the case where", + " they are on the losing side of a vote." + ] + }, + { + "name": "LaunchPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) new public referenda are launched." + ] + }, + { + "name": "VotingPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "MinimumDeposit", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "documentation": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "FastTrackVotingPeriod", + "type": "BlockNumber", + "value": "0x80510100", + "documentation": [ + " Minimum voting period allowed for a fast-track referendum." + ] + }, + { + "name": "CooloffPeriod", + "type": "BlockNumber", + "value": "0x004e0c00", + "documentation": [ + " Period in blocks where an external proposal may not be re-submitted after being vetoed." + ] + }, + { + "name": "PreimageByteDeposit", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount of balance that must be deposited per byte of preimage stored." + ] + }, + { + "name": "MaxVotes", + "type": "u32", + "value": "0x64000000", + "documentation": [ + " The maximum number of votes for an account.", + "", + " Also used to compute weight, an overly big value can", + " lead to extrinsic with very big weight: see `delegate` for instance." + ] + } + ], + "errors": [ + { + "name": "ValueLow", + "documentation": [ + " Value too low" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal does not exist" + ] + }, + { + "name": "BadIndex", + "documentation": [ + " Unknown index" + ] + }, + { + "name": "AlreadyCanceled", + "documentation": [ + " Cannot cancel the same proposal twice" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Proposal already made" + ] + }, + { + "name": "ProposalBlacklisted", + "documentation": [ + " Proposal still blacklisted" + ] + }, + { + "name": "NotSimpleMajority", + "documentation": [ + " Next external proposal not simple majority" + ] + }, + { + "name": "InvalidHash", + "documentation": [ + " Invalid hash" + ] + }, + { + "name": "NoProposal", + "documentation": [ + " No external proposal" + ] + }, + { + "name": "AlreadyVetoed", + "documentation": [ + " Identity may not veto a proposal twice" + ] + }, + { + "name": "NotDelegated", + "documentation": [ + " Not delegated" + ] + }, + { + "name": "DuplicatePreimage", + "documentation": [ + " Preimage already noted" + ] + }, + { + "name": "NotImminent", + "documentation": [ + " Not imminent" + ] + }, + { + "name": "TooEarly", + "documentation": [ + " Too early" + ] + }, + { + "name": "Imminent", + "documentation": [ + " Imminent" + ] + }, + { + "name": "PreimageMissing", + "documentation": [ + " Preimage not found" + ] + }, + { + "name": "ReferendumInvalid", + "documentation": [ + " Vote given for invalid referendum" + ] + }, + { + "name": "PreimageInvalid", + "documentation": [ + " Invalid preimage" + ] + }, + { + "name": "NoneWaiting", + "documentation": [ + " No proposals waiting" + ] + }, + { + "name": "NotLocked", + "documentation": [ + " The target account does not have a lock." + ] + }, + { + "name": "NotExpired", + "documentation": [ + " The lock on the account to be unlocked has not yet expired." + ] + }, + { + "name": "NotVoter", + "documentation": [ + " The given account did not vote on the referendum." + ] + }, + { + "name": "NoPermission", + "documentation": [ + " The actor has no permission to conduct the action." + ] + }, + { + "name": "AlreadyDelegating", + "documentation": [ + " The account is already delegating." + ] + }, + { + "name": "InsufficientFunds", + "documentation": [ + " Too high a balance was provided that the account cannot afford." + ] + }, + { + "name": "NotDelegating", + "documentation": [ + " The account is not currently delegating." + ] + }, + { + "name": "VotesExist", + "documentation": [ + " The account currently has votes attached to it and the operation cannot succeed until", + " these are removed, either through `unvote` or `reap_vote`." + ] + }, + { + "name": "InstantNotAllowed", + "documentation": [ + " The instant referendum origin is currently disallowed." + ] + }, + { + "name": "Nonsense", + "documentation": [ + " Delegation to oneself makes no sense." + ] + }, + { + "name": "WrongUpperBound", + "documentation": [ + " Invalid upper bound." + ] + }, + { + "name": "MaxVotesReached", + "documentation": [ + " Maximum number of votes reached." + ] + }, + { + "name": "InvalidWitness", + "documentation": [ + " The provided witness data is wrong." + ] + }, + { + "name": "TooManyProposals", + "documentation": [ + " Maximum number of proposals reached." + ] + } + ], + "index": 11 + }, + { + "name": "Council", + "storage": { + "prefix": "Instance1Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "type": { + "plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The prime member that helps determine the default vote behavior in case of absentations." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + }, + { + "name": "prime", + "type": "Option" + }, + { + "name": "old_count", + "type": "MemberCount" + } + ], + "documentation": [ + " Set the collective's membership.", + "", + " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", + " - `prime`: The prime member whose vote sets the default.", + " - `old_count`: The upper bound for the previous number of members in storage.", + " Used for weight estimation.", + "", + " Requires root origin.", + "", + " NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", + " the weight estimations rely on it to estimate dispatchable weight.", + "", + " # ", + " ## Weight", + " - `O(MP + N)` where:", + " - `M` old-members-count (code- and governance-bounded)", + " - `N` new-members-count (code- and governance-bounded)", + " - `P` proposals-count (code-bounded)", + " - DB:", + " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members", + " - 1 storage read (codec `O(P)`) for reading the proposals", + " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", + " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", + " # " + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective.", + "", + " # ", + " ## Weight", + " - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`", + " - DB: 1 read (codec `O(M)`) + DB access of `proposal`", + " - 1 event", + " # " + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Add a new proposal to either be voted on or executed directly.", + "", + " Requires the sender to be member.", + "", + " `threshold` determines whether `proposal` is executed directly (`threshold < 2`)", + " or put up for voting.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1)` or `O(B + M + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - branching is influenced by `threshold` where:", + " - `P1` is proposal execution complexity (`threshold < 2`)", + " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", + " - DB:", + " - 1 storage read `is_member` (codec `O(M)`)", + " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", + " - DB accesses influenced by `threshold`:", + " - EITHER storage accesses done by `proposal` (`threshold < 2`)", + " - OR proposal insertion (`threshold <= 2`)", + " - 1 storage mutation `Proposals` (codec `O(P2)`)", + " - 1 storage mutation `ProposalCount` (codec `O(1)`)", + " - 1 storage write `ProposalOf` (codec `O(B)`)", + " - 1 storage write `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " Add an aye or nay vote for the sender to the given proposal.", + "", + " Requires the sender to be a member.", + "", + " Transaction fees will be waived if the member is voting on any particular proposal", + " for the first time and the call is successful. Subsequent vote changes will charge a fee.", + " # ", + " ## Weight", + " - `O(M)` where `M` is members-count (code- and governance-bounded)", + " - DB:", + " - 1 storage read `Members` (codec `O(M)`)", + " - 1 storage mutation `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "close", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "proposal_weight_bound", + "type": "Compact" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Close a vote that is either approved, disapproved or whose voting period has ended.", + "", + " May be called by any signed account in order to finish voting and close the proposal.", + "", + " If called before the end of the voting period it will only close the vote if it is", + " has enough votes to be approved or disapproved.", + "", + " If called after the end of the voting period abstentions are counted as rejections", + " unless there is a prime member set and the prime member cast an approval.", + "", + " If the close operation completes successfully with disapproval, the transaction fee will", + " be waived. Otherwise execution of the approved operation will be charged to the caller.", + "", + " + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.", + " + `length_bound`: The upper bound for the length of the proposal in storage. Checked via", + " `storage::read` so it is `size_of::() == 4` larger than the pure length.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1 + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - `P1` is the complexity of `proposal` preimage.", + " - `P2` is proposal-count (code-bounded)", + " - DB:", + " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", + " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)", + " - any mutations done while executing `proposal` (`P1`)", + " - up to 3 events", + " # " + ] + }, + { + "name": "disapprove_proposal", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", + "", + " Must be called by the Root origin.", + "", + " Parameters:", + " * `proposal_hash`: The hash of the proposal that should be disapproved.", + "", + " # ", + " Complexity: O(P) where P is the number of max proposals", + " DB Weight:", + " * Reads: Proposals", + " * Writes: Voting, Proposals, ProposalOf", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`).", + " \\[account, proposal_index, proposal_hash, threshold\\]" + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`).", + " \\[account, proposal_hash, voted, yes, no\\]" + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold.", + " \\[proposal_hash\\]" + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold.", + " \\[proposal_hash\\]" + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A motion was executed; result will be `Ok` if it returned without error.", + " \\[proposal_hash, result\\]" + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A single member did some action; result will be `Ok` if it returned without error.", + " \\[proposal_hash, result\\]" + ] + }, + { + "name": "Closed", + "args": [ + "Hash", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A proposal was closed because its threshold was reached or after its duration was up.", + " \\[proposal_hash, yes, no\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "NotMember", + "documentation": [ + " Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "documentation": [ + " Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "documentation": [ + " Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "documentation": [ + " Members are already initialized!" + ] + }, + { + "name": "TooEarly", + "documentation": [ + " The close call was made too early, before the end of the voting." + ] + }, + { + "name": "TooManyProposals", + "documentation": [ + " There can only be a maximum of `MaxProposals` active proposals." + ] + }, + { + "name": "WrongProposalWeight", + "documentation": [ + " The given weight bound for the proposal was too low." + ] + }, + { + "name": "WrongProposalLength", + "documentation": [ + " The given length bound for the proposal was too low." + ] + } + ], + "index": 12 + }, + { + "name": "TechnicalCommittee", + "storage": { + "prefix": "Instance2Collective", + "items": [ + { + "name": "Proposals", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "Hash", + "value": "Proposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "Hash", + "value": "Votes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "type": { + "plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The prime member that helps determine the default vote behavior in case of absentations." + ] + } + ] + }, + "calls": [ + { + "name": "set_members", + "args": [ + { + "name": "new_members", + "type": "Vec" + }, + { + "name": "prime", + "type": "Option" + }, + { + "name": "old_count", + "type": "MemberCount" + } + ], + "documentation": [ + " Set the collective's membership.", + "", + " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", + " - `prime`: The prime member whose vote sets the default.", + " - `old_count`: The upper bound for the previous number of members in storage.", + " Used for weight estimation.", + "", + " Requires root origin.", + "", + " NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", + " the weight estimations rely on it to estimate dispatchable weight.", + "", + " # ", + " ## Weight", + " - `O(MP + N)` where:", + " - `M` old-members-count (code- and governance-bounded)", + " - `N` new-members-count (code- and governance-bounded)", + " - `P` proposals-count (code-bounded)", + " - DB:", + " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members", + " - 1 storage read (codec `O(P)`) for reading the proposals", + " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", + " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", + " # " + ] + }, + { + "name": "execute", + "args": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Dispatch a proposal from a member using the `Member` origin.", + "", + " Origin must be a member of the collective.", + "", + " # ", + " ## Weight", + " - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`", + " - DB: 1 read (codec `O(M)`) + DB access of `proposal`", + " - 1 event", + " # " + ] + }, + { + "name": "propose", + "args": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Add a new proposal to either be voted on or executed directly.", + "", + " Requires the sender to be member.", + "", + " `threshold` determines whether `proposal` is executed directly (`threshold < 2`)", + " or put up for voting.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1)` or `O(B + M + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - branching is influenced by `threshold` where:", + " - `P1` is proposal execution complexity (`threshold < 2`)", + " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", + " - DB:", + " - 1 storage read `is_member` (codec `O(M)`)", + " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", + " - DB accesses influenced by `threshold`:", + " - EITHER storage accesses done by `proposal` (`threshold < 2`)", + " - OR proposal insertion (`threshold <= 2`)", + " - 1 storage mutation `Proposals` (codec `O(P2)`)", + " - 1 storage mutation `ProposalCount` (codec `O(1)`)", + " - 1 storage write `ProposalOf` (codec `O(B)`)", + " - 1 storage write `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " Add an aye or nay vote for the sender to the given proposal.", + "", + " Requires the sender to be a member.", + "", + " Transaction fees will be waived if the member is voting on any particular proposal", + " for the first time and the call is successful. Subsequent vote changes will charge a fee.", + " # ", + " ## Weight", + " - `O(M)` where `M` is members-count (code- and governance-bounded)", + " - DB:", + " - 1 storage read `Members` (codec `O(M)`)", + " - 1 storage mutation `Voting` (codec `O(M)`)", + " - 1 event", + " # " + ] + }, + { + "name": "close", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "proposal_weight_bound", + "type": "Compact" + }, + { + "name": "length_bound", + "type": "Compact" + } + ], + "documentation": [ + " Close a vote that is either approved, disapproved or whose voting period has ended.", + "", + " May be called by any signed account in order to finish voting and close the proposal.", + "", + " If called before the end of the voting period it will only close the vote if it is", + " has enough votes to be approved or disapproved.", + "", + " If called after the end of the voting period abstentions are counted as rejections", + " unless there is a prime member set and the prime member cast an approval.", + "", + " If the close operation completes successfully with disapproval, the transaction fee will", + " be waived. Otherwise execution of the approved operation will be charged to the caller.", + "", + " + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.", + " + `length_bound`: The upper bound for the length of the proposal in storage. Checked via", + " `storage::read` so it is `size_of::() == 4` larger than the pure length.", + "", + " # ", + " ## Weight", + " - `O(B + M + P1 + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - `P1` is the complexity of `proposal` preimage.", + " - `P2` is proposal-count (code-bounded)", + " - DB:", + " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", + " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)", + " - any mutations done while executing `proposal` (`P1`)", + " - up to 3 events", + " # " + ] + }, + { + "name": "disapprove_proposal", + "args": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [ + " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", + "", + " Must be called by the Root origin.", + "", + " Parameters:", + " * `proposal_hash`: The hash of the proposal that should be disapproved.", + "", + " # ", + " Complexity: O(P) where P is the number of max proposals", + " DB Weight:", + " * Reads: Proposals", + " * Writes: Voting, Proposals, ProposalOf", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "AccountId", + "ProposalIndex", + "Hash", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given", + " `MemberCount`).", + " \\[account, proposal_index, proposal_hash, threshold\\]" + ] + }, + { + "name": "Voted", + "args": [ + "AccountId", + "Hash", + "bool", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given respectively as `MemberCount`).", + " \\[account, proposal_hash, voted, yes, no\\]" + ] + }, + { + "name": "Approved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold.", + " \\[proposal_hash\\]" + ] + }, + { + "name": "Disapproved", + "args": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold.", + " \\[proposal_hash\\]" + ] + }, + { + "name": "Executed", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A motion was executed; result will be `Ok` if it returned without error.", + " \\[proposal_hash, result\\]" + ] + }, + { + "name": "MemberExecuted", + "args": [ + "Hash", + "DispatchResult" + ], + "documentation": [ + " A single member did some action; result will be `Ok` if it returned without error.", + " \\[proposal_hash, result\\]" + ] + }, + { + "name": "Closed", + "args": [ + "Hash", + "MemberCount", + "MemberCount" + ], + "documentation": [ + " A proposal was closed because its threshold was reached or after its duration was up.", + " \\[proposal_hash, yes, no\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "NotMember", + "documentation": [ + " Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "documentation": [ + " Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "documentation": [ + " Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "documentation": [ + " Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "documentation": [ + " Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "documentation": [ + " Members are already initialized!" + ] + }, + { + "name": "TooEarly", + "documentation": [ + " The close call was made too early, before the end of the voting." + ] + }, + { + "name": "TooManyProposals", + "documentation": [ + " There can only be a maximum of `MaxProposals` active proposals." + ] + }, + { + "name": "WrongProposalWeight", + "documentation": [ + " The given weight bound for the proposal was too low." + ] + }, + { + "name": "WrongProposalLength", + "documentation": [ + " The given length bound for the proposal was too low." + ] + } + ], + "index": 13 + }, + { + "name": "Elections", + "storage": { + "prefix": "Elections", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current elected members.", + "", + " Invariant: Always sorted based on account id." + ] + }, + { + "name": "RunnersUp", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current reserved runners-up.", + "", + " Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the", + " last (i.e. _best_) runner-up will be replaced." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "plain": "Vec<(AccountId,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The present candidate list. A current member or runner-up can never enter this vector", + " and is always implicitly assumed to be a candidate.", + "", + " Second element is the deposit.", + "", + " Invariant: Always sorted based on account id." + ] + }, + { + "name": "ElectionRounds", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The total number of vote rounds that have happened, excluding the upcoming one." + ] + }, + { + "name": "Voting", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Voter", + "linked": false + } + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Votes and locked stake of a particular voter.", + "", + " TWOX-NOTE: SAFE as `AccountId` is a crypto hash." + ] + } + ] + }, + "calls": [ + { + "name": "vote", + "args": [ + { + "name": "votes", + "type": "Vec" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Vote for a set of candidates for the upcoming round of election. This can be called to", + " set the initial votes, or update already existing votes.", + "", + " Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is", + " reserved. The deposit is based on the number of votes and can be updated over time.", + "", + " The `votes` should:", + " - not be empty.", + " - be less than the number of possible candidates. Note that all current members and", + " runners-up are also automatically candidates for the next round.", + "", + " If `value` is more than `who`'s total balance, then the maximum of the two is used.", + "", + " The dispatch origin of this call must be signed.", + "", + " ### Warning", + "", + " It is the responsibility of the caller to **NOT** place all of their balance into the", + " lock and keep some for further operations.", + "", + " # ", + " We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less.", + " # " + ] + }, + { + "name": "remove_voter", + "args": [], + "documentation": [ + " Remove `origin` as a voter.", + "", + " This removes the lock and returns the deposit.", + "", + " The dispatch origin of this call must be signed and be a voter." + ] + }, + { + "name": "submit_candidacy", + "args": [ + { + "name": "candidate_count", + "type": "Compact" + } + ], + "documentation": [ + " Submit oneself for candidacy. A fixed amount of deposit is recorded.", + "", + " All candidates are wiped at the end of the term. They either become a member/runner-up,", + " or leave the system while their deposit is slashed.", + "", + " The dispatch origin of this call must be signed.", + "", + " ### Warning", + "", + " Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]", + " to get their deposit back. Losing the spot in an election will always lead to a slash.", + "", + " # ", + " The number of current candidates must be provided as witness data.", + " # " + ] + }, + { + "name": "renounce_candidacy", + "args": [ + { + "name": "renouncing", + "type": "Renouncing" + } + ], + "documentation": [ + " Renounce one's intention to be a candidate for the next election round. 3 potential", + " outcomes exist:", + "", + " - `origin` is a candidate and not elected in any set. In this case, the deposit is", + " unreserved, returned and origin is removed as a candidate.", + " - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and", + " origin is removed as a runner-up.", + " - `origin` is a current member. In this case, the deposit is unreserved and origin is", + " removed as a member, consequently not being a candidate for the next round anymore.", + " Similar to [`remove_members`], if replacement runners exists, they are immediately", + " used. If the prime is renouncing, then no prime will exist until the next round.", + "", + " The dispatch origin of this call must be signed, and have one of the above roles.", + "", + " # ", + " The type of renouncing must be provided as witness data.", + " # " + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "has_replacement", + "type": "bool" + } + ], + "documentation": [ + " Remove a particular member from the set. This is effective immediately and the bond of", + " the outgoing member is slashed.", + "", + " If a runner-up is available, then the best runner-up will be removed and replaces the", + " outgoing member. Otherwise, a new phragmen election is started.", + "", + " The dispatch origin of this call must be root.", + "", + " Note that this does not affect the designated block number of the next election.", + "", + " # ", + " If we have a replacement, we use a small weight. Else, since this is a root call and", + " will go into phragmen, we assume full block for now.", + " # " + ] + }, + { + "name": "clean_defunct_voters", + "args": [ + { + "name": "_num_voters", + "type": "u32" + }, + { + "name": "_num_defunct", + "type": "u32" + } + ], + "documentation": [ + " Clean all voters who are defunct (i.e. they do not serve any purpose at all). The", + " deposit of the removed voters are returned.", + "", + " This is an root function to be used only for cleaning the state.", + "", + " The dispatch origin of this call must be root.", + "", + " # ", + " The total number of voters and those that are defunct must be provided as witness data.", + " # " + ] + } + ], + "events": [ + { + "name": "NewTerm", + "args": [ + "Vec<(AccountId,Balance)>" + ], + "documentation": [ + " A new term with \\[new_members\\]. This indicates that enough candidates existed to run", + " the election, not that enough have has been elected. The inner value must be examined", + " for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond", + " slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to", + " begin with." + ] + }, + { + "name": "EmptyTerm", + "args": [], + "documentation": [ + " No (or not enough) candidates existed for this round. This is different from", + " `NewTerm(\\[\\])`. See the description of `NewTerm`." + ] + }, + { + "name": "ElectionError", + "args": [], + "documentation": [ + " Internal error happened while trying to perform election." + ] + }, + { + "name": "MemberKicked", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[member\\] has been removed. This should always be followed by either `NewTerm` or", + " `EmptyTerm`." + ] + }, + { + "name": "Renounced", + "args": [ + "AccountId" + ], + "documentation": [ + " Someone has renounced their candidacy." + ] + }, + { + "name": "CandidateSlashed", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A \\[candidate\\] was slashed by \\[amount\\] due to failing to obtain a seat as member or", + " runner-up.", + "", + " Note that old members and runners-up are also candidates." + ] + }, + { + "name": "SeatHolderSlashed", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A \\[seat holder\\] was slashed by \\[amount\\] by being forcefully removed from the set." + ] + } + ], + "constants": [ + { + "name": "PalletId", + "type": "LockIdentifier", + "value": "0x706872656c656374", + "documentation": [ + " Identifier for the elections-phragmen pallet's lock" + ] + }, + { + "name": "CandidacyBond", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [ + " How much should be locked up in order to submit one's candidacy." + ] + }, + { + "name": "VotingBondBase", + "type": "BalanceOf", + "value": "0x00f0436de36a01000000000000000000", + "documentation": [ + " Base deposit associated with voting.", + "", + " This should be sensibly high to economically ensure the pallet cannot be attacked by", + " creating a gigantic number of votes." + ] + }, + { + "name": "VotingBondFactor", + "type": "BalanceOf", + "value": "0x0000cc7b9fae00000000000000000000", + "documentation": [ + " The amount of bond that need to be locked for each vote (32 bytes)." + ] + }, + { + "name": "DesiredMembers", + "type": "u32", + "value": "0x0d000000", + "documentation": [ + " Number of members to elect." + ] + }, + { + "name": "DesiredRunnersUp", + "type": "u32", + "value": "0x07000000", + "documentation": [ + " Number of runners_up to keep." + ] + }, + { + "name": "TermDuration", + "type": "BlockNumber", + "value": "0x80130300", + "documentation": [ + " How long each seat is kept. This defines the next block number at which an election", + " round will happen. If set to zero, no elections are ever triggered and the module will", + " be in passive mode." + ] + } + ], + "errors": [ + { + "name": "UnableToVote", + "documentation": [ + " Cannot vote when no candidates or members exist." + ] + }, + { + "name": "NoVotes", + "documentation": [ + " Must vote for at least one candidate." + ] + }, + { + "name": "TooManyVotes", + "documentation": [ + " Cannot vote more than candidates." + ] + }, + { + "name": "MaximumVotesExceeded", + "documentation": [ + " Cannot vote more than maximum allowed." + ] + }, + { + "name": "LowBalance", + "documentation": [ + " Cannot vote with stake less than minimum balance." + ] + }, + { + "name": "UnableToPayBond", + "documentation": [ + " Voter can not pay voting bond." + ] + }, + { + "name": "MustBeVoter", + "documentation": [ + " Must be a voter." + ] + }, + { + "name": "ReportSelf", + "documentation": [ + " Cannot report self." + ] + }, + { + "name": "DuplicatedCandidate", + "documentation": [ + " Duplicated candidate submission." + ] + }, + { + "name": "MemberSubmit", + "documentation": [ + " Member cannot re-submit candidacy." + ] + }, + { + "name": "RunnerUpSubmit", + "documentation": [ + " Runner cannot re-submit candidacy." + ] + }, + { + "name": "InsufficientCandidateFunds", + "documentation": [ + " Candidate does not have enough funds." + ] + }, + { + "name": "NotMember", + "documentation": [ + " Not a member." + ] + }, + { + "name": "InvalidWitnessData", + "documentation": [ + " The provided count of number of candidates is incorrect." + ] + }, + { + "name": "InvalidVoteCount", + "documentation": [ + " The provided count of number of votes is incorrect." + ] + }, + { + "name": "InvalidRenouncing", + "documentation": [ + " The renouncing origin presented a wrong `Renouncing` parameter." + ] + }, + { + "name": "InvalidReplacement", + "documentation": [ + " Prediction regarding replacement after member removal is wrong." + ] + } + ], + "index": 14 + }, + { + "name": "TechnicalMembership", + "storage": { + "prefix": "Instance1Membership", + "items": [ + { + "name": "Members", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current membership, stored as an ordered Vec." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "type": { + "plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The current prime member, if one exists." + ] + } + ] + }, + "calls": [ + { + "name": "add_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Add a member `who` to the set.", + "", + " May only be called from `T::AddOrigin`." + ] + }, + { + "name": "remove_member", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Remove a member `who` from the set.", + "", + " May only be called from `T::RemoveOrigin`." + ] + }, + { + "name": "swap_member", + "args": [ + { + "name": "remove", + "type": "AccountId" + }, + { + "name": "add", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out one member `remove` for another `add`.", + "", + " May only be called from `T::SwapOrigin`.", + "", + " Prime membership is *not* passed from `remove` to `add`, if extant." + ] + }, + { + "name": "reset_members", + "args": [ + { + "name": "members", + "type": "Vec" + } + ], + "documentation": [ + " Change the membership to a new set, disregarding the existing membership. Be nice and", + " pass `members` pre-sorted.", + "", + " May only be called from `T::ResetOrigin`." + ] + }, + { + "name": "change_key", + "args": [ + { + "name": "new", + "type": "AccountId" + } + ], + "documentation": [ + " Swap out the sending member for some other key `new`.", + "", + " May only be called from `Signed` origin of a current member.", + "", + " Prime membership is passed from the origin account to `new`, if extant." + ] + }, + { + "name": "set_prime", + "args": [ + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Set the prime member. Must be a current member.", + "", + " May only be called from `T::PrimeOrigin`." + ] + }, + { + "name": "clear_prime", + "args": [], + "documentation": [ + " Remove the prime member if it exists.", + "", + " May only be called from `T::PrimeOrigin`." + ] + } + ], + "events": [ + { + "name": "MemberAdded", + "args": [], + "documentation": [ + " The given member was added; see the transaction for who." + ] + }, + { + "name": "MemberRemoved", + "args": [], + "documentation": [ + " The given member was removed; see the transaction for who." + ] + }, + { + "name": "MembersSwapped", + "args": [], + "documentation": [ + " Two members were swapped; see the transaction for who." + ] + }, + { + "name": "MembersReset", + "args": [], + "documentation": [ + " The membership was reset; see the transaction for who the new set is." + ] + }, + { + "name": "KeyChanged", + "args": [], + "documentation": [ + " One of the members' keys changed." + ] + }, + { + "name": "Dummy", + "args": [ + "PhantomData" + ], + "documentation": [ + " Phantom member, never used." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "AlreadyMember", + "documentation": [ + " Already a member." + ] + }, + { + "name": "NotMember", + "documentation": [ + " Not a member." + ] + } + ], + "index": 15 + }, + { + "name": "Grandpa", + "storage": { + "prefix": "Grandpa", + "items": [ + { + "name": "State", + "modifier": "Default", + "type": { + "plain": "StoredState" + }, + "fallback": "0x00", + "documentation": [ + " State of the current authority set." + ] + }, + { + "name": "PendingChange", + "modifier": "Optional", + "type": { + "plain": "StoredPendingChange" + }, + "fallback": "0x00", + "documentation": [ + " Pending change: (signaled at, scheduled change)." + ] + }, + { + "name": "NextForced", + "modifier": "Optional", + "type": { + "plain": "BlockNumber" + }, + "fallback": "0x00", + "documentation": [ + " next block number where we can force a change." + ] + }, + { + "name": "Stalled", + "modifier": "Optional", + "type": { + "plain": "(BlockNumber,BlockNumber)" + }, + "fallback": "0x00", + "documentation": [ + " `true` if we are currently stalled." + ] + }, + { + "name": "CurrentSetId", + "modifier": "Default", + "type": { + "plain": "SetId" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The number of changes (both in terms of keys and underlying economic responsibilities)", + " in the \"set\" of Grandpa validators from genesis." + ] + }, + { + "name": "SetIdSession", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "SetId", + "value": "SessionIndex", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from grandpa set ID to the index of the *most recent* session for which its", + " members were responsible.", + "", + " TWOX-NOTE: `SetId` is not under user control." + ] + } + ] + }, + "calls": [ + { + "name": "report_equivocation", + "args": [ + { + "name": "equivocation_proof", + "type": "GrandpaEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report voter equivocation/misbehavior. This method will verify the", + " equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence", + " will be reported." + ] + }, + { + "name": "report_equivocation_unsigned", + "args": [ + { + "name": "equivocation_proof", + "type": "GrandpaEquivocationProof" + }, + { + "name": "key_owner_proof", + "type": "KeyOwnerProof" + } + ], + "documentation": [ + " Report voter equivocation/misbehavior. This method will verify the", + " equivocation proof and validate the given key ownership proof", + " against the extracted offender. If both are valid, the offence", + " will be reported.", + "", + " This extrinsic must be called unsigned and it is expected that only", + " block authors will call it (validated in `ValidateUnsigned`), as such", + " if the block author is defined it will be defined as the equivocation", + " reporter." + ] + }, + { + "name": "note_stalled", + "args": [ + { + "name": "delay", + "type": "BlockNumber" + }, + { + "name": "best_finalized_block_number", + "type": "BlockNumber" + } + ], + "documentation": [ + " Note that the current authority set of the GRANDPA finality gadget has", + " stalled. This will trigger a forced authority set change at the beginning", + " of the next session, to be enacted `delay` blocks after that. The delay", + " should be high enough to safely assume that the block signalling the", + " forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters", + " will start the new authority set using the given finalized block as base.", + " Only callable by root." + ] + } + ], + "events": [ + { + "name": "NewAuthorities", + "args": [ + "AuthorityList" + ], + "documentation": [ + " New authority set has been applied. \\[authority_set\\]" + ] + }, + { + "name": "Paused", + "args": [], + "documentation": [ + " Current authority set has been paused." + ] + }, + { + "name": "Resumed", + "args": [], + "documentation": [ + " Current authority set has been resumed." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "PauseFailed", + "documentation": [ + " Attempt to signal GRANDPA pause when the authority set isn't live", + " (either paused or already pending pause)." + ] + }, + { + "name": "ResumeFailed", + "documentation": [ + " Attempt to signal GRANDPA resume when the authority set isn't paused", + " (either live or already pending resume)." + ] + }, + { + "name": "ChangePending", + "documentation": [ + " Attempt to signal GRANDPA change with one already pending." + ] + }, + { + "name": "TooSoon", + "documentation": [ + " Cannot signal forced change so soon after last." + ] + }, + { + "name": "InvalidKeyOwnershipProof", + "documentation": [ + " A key ownership proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "InvalidEquivocationProof", + "documentation": [ + " An equivocation proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "DuplicateOffenceReport", + "documentation": [ + " A given equivocation report is valid but already previously reported." + ] + } + ], + "index": 16 + }, + { + "name": "Treasury", + "storage": { + "prefix": "Treasury", + "items": [ + { + "name": "ProposalCount", + "modifier": "Default", + "type": { + "plain": "ProposalIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Number of proposals that have been made." + ] + }, + { + "name": "Proposals", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "ProposalIndex", + "value": "TreasuryProposal", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Proposals that have been made." + ] + }, + { + "name": "Approvals", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Proposal indices that have been approved but not yet awarded." + ] + } + ] + }, + "calls": [ + { + "name": "propose_spend", + "args": [ + { + "name": "value", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "LookupSource" + } + ], + "documentation": [ + " Put forward a suggestion for spending. A deposit proportional to the value", + " is reserved and slashed if the proposal is rejected. It is returned once the", + " proposal is awarded.", + "", + " # ", + " - Complexity: O(1)", + " - DbReads: `ProposalCount`, `origin account`", + " - DbWrites: `ProposalCount`, `Proposals`, `origin account`", + " # " + ] + }, + { + "name": "reject_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Reject a proposed spend. The original deposit will be slashed.", + "", + " May only be called from `T::RejectOrigin`.", + "", + " # ", + " - Complexity: O(1)", + " - DbReads: `Proposals`, `rejected proposer account`", + " - DbWrites: `Proposals`, `rejected proposer account`", + " # " + ] + }, + { + "name": "approve_proposal", + "args": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", + " and the original deposit will be returned.", + "", + " May only be called from `T::ApproveOrigin`.", + "", + " # ", + " - Complexity: O(1).", + " - DbReads: `Proposals`, `Approvals`", + " - DbWrite: `Approvals`", + " # " + ] + } + ], + "events": [ + { + "name": "Proposed", + "args": [ + "ProposalIndex" + ], + "documentation": [ + " New proposal. \\[proposal_index\\]" + ] + }, + { + "name": "Spending", + "args": [ + "Balance" + ], + "documentation": [ + " We have ended a spend period and will now allocate funds. \\[budget_remaining\\]" + ] + }, + { + "name": "Awarded", + "args": [ + "ProposalIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " Some funds have been allocated. \\[proposal_index, award, beneficiary\\]" + ] + }, + { + "name": "Rejected", + "args": [ + "ProposalIndex", + "Balance" + ], + "documentation": [ + " A proposal was rejected; funds were slashed. \\[proposal_index, slashed\\]" + ] + }, + { + "name": "Burnt", + "args": [ + "Balance" + ], + "documentation": [ + " Some of our funds have been burnt. \\[burn\\]" + ] + }, + { + "name": "Rollover", + "args": [ + "Balance" + ], + "documentation": [ + " Spending has finished; this is the amount that rolls over until next spend.", + " \\[budget_remaining\\]" + ] + }, + { + "name": "Deposit", + "args": [ + "Balance" + ], + "documentation": [ + " Some funds have been deposited. \\[deposit\\]" + ] + } + ], + "constants": [ + { + "name": "ProposalBond", + "type": "Permill", + "value": "0x50c30000", + "documentation": [ + " Fraction of a proposal's value that should be bonded in order to place the proposal.", + " An accepted proposal gets these back. A rejected proposal does not." + ] + }, + { + "name": "ProposalBondMinimum", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "SpendPeriod", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " Period between successive spends." + ] + }, + { + "name": "Burn", + "type": "Permill", + "value": "0x20a10700", + "documentation": [ + " Percentage of spare funds (if any) that are burnt per spend period." + ] + }, + { + "name": "PalletId", + "type": "PalletId", + "value": "0x70792f7472737279", + "documentation": [ + " The treasury's module id, used for deriving its sovereign account ID." + ] + } + ], + "errors": [ + { + "name": "InsufficientProposersBalance", + "documentation": [ + " Proposer's balance is too low." + ] + }, + { + "name": "InvalidIndex", + "documentation": [ + " No proposal or bounty at that index." + ] + }, + { + "name": "TooManyApprovals", + "documentation": [ + " Too many approvals in the queue." + ] + } + ], + "index": 17 + }, + { + "name": "Contracts", + "storage": { + "prefix": "Contracts", + "items": [ + { + "name": "PristineCode", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "CodeHash", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping from an original code hash to the original code, untouched by instrumentation." + ] + }, + { + "name": "CodeStorage", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "CodeHash", + "value": "PrefabWasmModule", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " A mapping between an original code hash and instrumented wasm code, ready for execution." + ] + }, + { + "name": "AccountCounter", + "modifier": "Default", + "type": { + "plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " The subtrie counter." + ] + }, + { + "name": "ContractInfoOf", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "ContractInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The code associated with a given account.", + "", + " TWOX-NOTE: SAFE since `AccountId` is a secure hash." + ] + }, + { + "name": "DeletionQueue", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Evicted contracts that await child trie deletion.", + "", + " Child trie deletion is a heavy operation depending on the amount of storage items", + " stored in said trie. Therefore this operation is performed lazily in `on_initialize`." + ] + } + ] + }, + "calls": [ + { + "name": "call", + "args": [ + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Makes a call to an account, optionally transferring some balance.", + "", + " * If the account is a smart-contract account, the associated code will be", + " executed and any value will be transferred.", + " * If the account is a regular account, any value will be transferred.", + " * If no account exists and the call value is not less than `existential_deposit`,", + " a regular account will be created and any value will be transferred." + ] + }, + { + "name": "instantiate_with_code", + "args": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code", + "type": "Bytes" + }, + { + "name": "data", + "type": "Bytes" + }, + { + "name": "salt", + "type": "Bytes" + } + ], + "documentation": [ + " Instantiates a new contract from the supplied `code` optionally transferring", + " some balance.", + "", + " This is the only function that can deploy new code to the chain.", + "", + " # Parameters", + "", + " * `endowment`: The balance to transfer from the `origin` to the newly created contract.", + " * `gas_limit`: The gas limit enforced when executing the constructor.", + " * `code`: The contract code to deploy in raw bytes.", + " * `data`: The input data to pass to the contract constructor.", + " * `salt`: Used for the address derivation. See [`Pallet::contract_address`].", + "", + " Instantiation is executed as follows:", + "", + " - The supplied `code` is instrumented, deployed, and a `code_hash` is created for that code.", + " - If the `code_hash` already exists on the chain the underlying `code` will be shared.", + " - The destination address is computed based on the sender, code_hash and the salt.", + " - The smart-contract account is created at the computed address.", + " - The `endowment` is transferred to the new account.", + " - The `deploy` function is executed in the context of the newly-created account." + ] + }, + { + "name": "instantiate", + "args": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code_hash", + "type": "CodeHash" + }, + { + "name": "data", + "type": "Bytes" + }, + { + "name": "salt", + "type": "Bytes" + } + ], + "documentation": [ + " Instantiates a contract from a previously deployed wasm binary.", + "", + " This function is identical to [`Self::instantiate_with_code`] but without the", + " code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary", + " must be supplied." + ] + }, + { + "name": "claim_surcharge", + "args": [ + { + "name": "dest", + "type": "AccountId" + }, + { + "name": "aux_sender", + "type": "Option" + } + ], + "documentation": [ + " Allows block producers to claim a small reward for evicting a contract. If a block", + " producer fails to do so, a regular users will be allowed to claim the reward.", + "", + " In case of a successful eviction no fees are charged from the sender. However, the", + " reward is capped by the total amount of rent that was paid by the contract while", + " it was alive.", + "", + " If contract is not evicted as a result of this call, [`Error::ContractNotEvictable`]", + " is returned and the sender is not eligible for the reward." + ] + } + ], + "events": [ + { + "name": "Instantiated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Contract deployed by address at the specified address. \\[deployer, contract\\]" + ] + }, + { + "name": "Evicted", + "args": [ + "AccountId" + ], + "documentation": [ + " Contract has been evicted and is now in tombstone state. \\[contract\\]" + ] + }, + { + "name": "Terminated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Contract has been terminated without leaving a tombstone.", + " \\[contract, beneficiary\\]", + "", + " # Params", + "", + " - `contract`: The contract that was terminated.", + " - `beneficiary`: The account that received the contracts remaining balance.", + "", + " # Note", + "", + " The only way for a contract to be removed without a tombstone and emitting", + " this event is by calling `seal_terminate`." + ] + }, + { + "name": "Restored", + "args": [ + "AccountId", + "AccountId", + "Hash", + "Balance" + ], + "documentation": [ + " Restoration of a contract has been successful.", + " \\[restorer, dest, code_hash, rent_allowance\\]", + "", + " # Params", + "", + " - `restorer`: Account ID of the restoring contract.", + " - `dest`: Account ID of the restored contract.", + " - `code_hash`: Code hash of the restored contract.", + " - `rent_allowance`: Rent allowance of the restored contract." + ] + }, + { + "name": "CodeStored", + "args": [ + "Hash" + ], + "documentation": [ + " Code with the specified hash has been stored. \\[code_hash\\]" + ] + }, + { + "name": "ScheduleUpdated", + "args": [ + "u32" + ], + "documentation": [ + " Triggered when the current schedule is updated.", + " \\[version\\]", + "", + " # Params", + "", + " - `version`: The version of the newly set schedule." + ] + }, + { + "name": "ContractEmitted", + "args": [ + "AccountId", + "Bytes" + ], + "documentation": [ + " A custom event emitted by the contract.", + " \\[contract, data\\]", + "", + " # Params", + "", + " - `contract`: The contract that emitted the event.", + " - `data`: Data supplied by the contract. Metadata generated during contract", + " compilation is needed to decode it." + ] + }, + { + "name": "CodeRemoved", + "args": [ + "Hash" + ], + "documentation": [ + " A code with the specified hash was removed.", + " \\[code_hash\\]", + "", + " This happens when the last contract that uses this code hash was removed or evicted." + ] + } + ], + "constants": [ + { + "name": "Schedule", + "type": "Schedule", + "value": "0x0400000000020000000100008000000010000000001000000001000020000000200000000040000000000200020000008e0f0000b04602009a8c0300a9720000767600005e380000ea5e00000753000097000000579e030088130500b60000007a170000c11100005721000099370000483a0000d0110000d8d12c08bc4300005c430000bb2e0000a942000000260000b72300009c370000ad540000de540000ca5400000354000018550000e553000011550000c053000007540000da540000a0530000e85300008d5400004a690000bd680000a56a000096670000b053000013540000055400006a5500009255000060550000f455000033550000cae32900000000007a332a00000000004041290000000000a6fb5d000000000060c02a0000000000e6d6290000000000065329000000000062002a0000000000d425290000000000b0522a00000000005cb3540000000000b41c1600000000008057640000000000000100000000000008f6380000000000710200000000000078d68a210000000098d6de2a000000007c75640900000000466d6f000000000070baac0000000000ec73de07000000007406000000000000922c190000000000fc9f1d00000000008618ee0900000000450200000000000082dc6108000000003e573102000000002704000000000000cc94430b000000009406e1100000000096fa930800000000dc010000000000009c020000000000001843c12400000000f001000000000000b80200000000000094070000000000008a9b2a0000000000561200000000000046432b0000000000ab0c000000000000c08c260000000000b005000000000000acd2260000000000b005000000000000", + "documentation": [ + " Cost schedule and limits." + ] + }, + { + "name": "SignedClaimHandicap", + "type": "BlockNumber", + "value": "0x02000000", + "documentation": [ + " Number of block delay an extrinsic claim surcharge has.", + "", + " When claim surcharge is called by an extrinsic the rent is checked", + " for current_block - delay" + ] + }, + { + "name": "TombstoneDeposit", + "type": "BalanceOf", + "value": "0x00f0e8857a9c02000000000000000000", + "documentation": [ + " The minimum amount required to generate a tombstone." + ] + }, + { + "name": "DepositPerContract", + "type": "BalanceOf", + "value": "0x00f0e8857a9c02000000000000000000", + "documentation": [ + " The balance every contract needs to deposit to stay alive indefinitely.", + "", + " This is different from the [`Self::TombstoneDeposit`] because this only needs to be", + " deposited while the contract is alive. Costs for additional storage are added to", + " this base cost.", + "", + " This is a simple way to ensure that contracts with empty storage eventually get deleted by", + " making them pay rent. This creates an incentive to remove them early in order to save rent." + ] + }, + { + "name": "DepositPerStorageByte", + "type": "BalanceOf", + "value": "0x0060defb740500000000000000000000", + "documentation": [ + " The balance a contract needs to deposit per storage byte to stay alive indefinitely.", + "", + " Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,", + " then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent.", + " But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000,", + " then it would pay 500 BU/day." + ] + }, + { + "name": "DepositPerStorageItem", + "type": "BalanceOf", + "value": "0x00f0ab75a40d00000000000000000000", + "documentation": [ + " The balance a contract needs to deposit per storage item to stay alive indefinitely.", + "", + " It works the same as [`Self::DepositPerStorageByte`] but for storage items." + ] + }, + { + "name": "RentFraction", + "type": "Perbill", + "value": "0x85040000", + "documentation": [ + " The fraction of the deposit that should be used as rent per block.", + "", + " When a contract hasn't enough balance deposited to stay alive indefinitely it needs", + " to pay per block for the storage it consumes that is not covered by the deposit.", + " This determines how high this rent payment is per block as a fraction of the deposit." + ] + }, + { + "name": "SurchargeReward", + "type": "BalanceOf", + "value": "0x005cb2ec220000000000000000000000", + "documentation": [ + " Reward that is received by the party whose touch has led", + " to removal of a contract." + ] + }, + { + "name": "DeletionQueueDepth", + "type": "u32", + "value": "0x1a040000", + "documentation": [ + " The maximum number of tries that can be queued for deletion." + ] + }, + { + "name": "DeletionWeightLimit", + "type": "Weight", + "value": "0x00d0ed902e000000", + "documentation": [ + " The maximum amount of weight that can be consumed per block for lazy trie removal." + ] + } + ], + "errors": [ + { + "name": "InvalidScheduleVersion", + "documentation": [ + " A new schedule must have a greater version than the current one." + ] + }, + { + "name": "InvalidSurchargeClaim", + "documentation": [ + " An origin must be signed or inherent and auxiliary sender only provided on inherent." + ] + }, + { + "name": "InvalidSourceContract", + "documentation": [ + " Cannot restore from nonexisting or tombstone contract." + ] + }, + { + "name": "InvalidDestinationContract", + "documentation": [ + " Cannot restore to nonexisting or alive contract." + ] + }, + { + "name": "InvalidTombstone", + "documentation": [ + " Tombstones don't match." + ] + }, + { + "name": "InvalidContractOrigin", + "documentation": [ + " An origin TrieId written in the current block." + ] + }, + { + "name": "OutOfGas", + "documentation": [ + " The executed contract exhausted its gas limit." + ] + }, + { + "name": "OutputBufferTooSmall", + "documentation": [ + " The output buffer supplied to a contract API call was too small." + ] + }, + { + "name": "BelowSubsistenceThreshold", + "documentation": [ + " Performing the requested transfer would have brought the contract below", + " the subsistence threshold. No transfer is allowed to do this in order to allow", + " for a tombstone to be created. Use `seal_terminate` to remove a contract without", + " leaving a tombstone behind." + ] + }, + { + "name": "NewContractNotFunded", + "documentation": [ + " The newly created contract is below the subsistence threshold after executing", + " its contructor. No contracts are allowed to exist below that threshold." + ] + }, + { + "name": "TransferFailed", + "documentation": [ + " Performing the requested transfer failed for a reason originating in the", + " chosen currency implementation of the runtime. Most probably the balance is", + " too low or locks are placed on it." + ] + }, + { + "name": "MaxCallDepthReached", + "documentation": [ + " Performing a call was denied because the calling depth reached the limit", + " of what is specified in the schedule." + ] + }, + { + "name": "ContractNotFound", + "documentation": [ + " No contract was found at the specified address." + ] + }, + { + "name": "ContractIsTombstone", + "documentation": [ + " A tombstone exist at the specified address.", + "", + " Tombstone cannot be called. Anyone can use `seal_restore_to` in order to revive", + " the contract, though." + ] + }, + { + "name": "RentNotPaid", + "documentation": [ + " The called contract does not have enough balance to pay for its storage.", + "", + " The contract ran out of balance and is therefore eligible for eviction into a", + " tombstone. Anyone can evict the contract by submitting a `claim_surcharge`", + " extrinsic. Alternatively, a plain balance transfer can be used in order to", + " increase the contracts funds so that it can be called again." + ] + }, + { + "name": "CodeTooLarge", + "documentation": [ + " The code supplied to `instantiate_with_code` exceeds the limit specified in the", + " current schedule." + ] + }, + { + "name": "CodeNotFound", + "documentation": [ + " No code could be found at the supplied code hash." + ] + }, + { + "name": "OutOfBounds", + "documentation": [ + " A buffer outside of sandbox memory was passed to a contract API function." + ] + }, + { + "name": "DecodingFailed", + "documentation": [ + " Input passed to a contract API function failed to decode as expected type." + ] + }, + { + "name": "ContractTrapped", + "documentation": [ + " Contract trapped during execution." + ] + }, + { + "name": "ValueTooLarge", + "documentation": [ + " The size defined in `T::MaxValueSize` was exceeded." + ] + }, + { + "name": "TerminatedWhileReentrant", + "documentation": [ + " Termination of a contract is not allowed while the contract is already", + " on the call stack. Can be triggered by `seal_terminate` or `seal_restore_to." + ] + }, + { + "name": "InputForwarded", + "documentation": [ + " `seal_call` forwarded this contracts input. It therefore is no longer available." + ] + }, + { + "name": "RandomSubjectTooLong", + "documentation": [ + " The subject passed to `seal_random` exceeds the limit." + ] + }, + { + "name": "TooManyTopics", + "documentation": [ + " The amount of topics passed to `seal_deposit_events` exceeds the limit." + ] + }, + { + "name": "DuplicateTopics", + "documentation": [ + " The topics passed to `seal_deposit_events` contains at least one duplicate." + ] + }, + { + "name": "NoChainExtension", + "documentation": [ + " The chain does not provide a chain extension. Calling the chain extension results", + " in this error. Note that this usually shouldn't happen as deploying such contracts", + " is rejected." + ] + }, + { + "name": "DeletionQueueFull", + "documentation": [ + " Removal of a contract failed because the deletion queue is full.", + "", + " This can happen when either calling [`Pallet::claim_surcharge`] or `seal_terminate`.", + " The queue is filled by deleting contracts and emptied by a fixed amount each block.", + " Trying again during another block is the only way to resolve this issue." + ] + }, + { + "name": "ContractNotEvictable", + "documentation": [ + " A contract could not be evicted because it has enough balance to pay rent.", + "", + " This can be returned from [`Pallet::claim_surcharge`] because the target", + " contract has enough balance to pay for its rent." + ] + }, + { + "name": "StorageExhausted", + "documentation": [ + " A storage modification exhausted the 32bit type that holds the storage size.", + "", + " This can either happen when the accumulated storage in bytes is too large or", + " when number of storage items is too large." + ] + }, + { + "name": "DuplicateContract", + "documentation": [ + " A contract with the same AccountId already exists." + ] + }, + { + "name": "TerminatedInConstructor", + "documentation": [ + " A contract self destructed in its constructor.", + "", + " This can be triggered by a call to `seal_terminate` or `seal_restore_to`." + ] + }, + { + "name": "DebugMessageInvalidUTF8", + "documentation": [ + " The debug message specified to `seal_debug_message` does contain invalid UTF-8." + ] + }, + { + "name": "ReentranceDenied", + "documentation": [ + " A call tried to invoke a contract that is flagged as non-reentrant." + ] + } + ], + "index": 18 + }, + { + "name": "Sudo", + "storage": { + "prefix": "Sudo", + "items": [ + { + "name": "Key", + "modifier": "Default", + "type": { + "plain": "AccountId" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The `AccountId` of the sudo key." + ] + } + ] + }, + "calls": [ + { + "name": "sudo", + "args": [ + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Root` origin.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Weight of derivative `call` execution + 10,000.", + " # " + ] + }, + { + "name": "sudo_unchecked_weight", + "args": [ + { + "name": "call", + "type": "Call" + }, + { + "name": "_weight", + "type": "Weight" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Root` origin.", + " This function does not check the weight of the call, and instead allows the", + " Sudo user to specify the weight of the call.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - The weight of this call is defined by the caller.", + " # " + ] + }, + { + "name": "set_key", + "args": [ + { + "name": "new", + "type": "LookupSource" + } + ], + "documentation": [ + " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB change.", + " # " + ] + }, + { + "name": "sudo_as", + "args": [ + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Authenticates the sudo key and dispatches a function call with `Signed` origin from", + " a given account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " # ", + " - O(1).", + " - Limited storage reads.", + " - One DB write (event).", + " - Weight of derivative `call` execution + 10,000.", + " # " + ] + } + ], + "events": [ + { + "name": "Sudid", + "args": [ + "DispatchResult" + ], + "documentation": [ + " A sudo just took place. \\[result\\]" + ] + }, + { + "name": "KeyChanged", + "args": [ + "AccountId" + ], + "documentation": [ + " The \\[sudoer\\] just switched identity; the old key is supplied." + ] + }, + { + "name": "SudoAsDone", + "args": [ + "DispatchResult" + ], + "documentation": [ + " A sudo just took place. \\[result\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "RequireSudo", + "documentation": [ + " Sender must be the Sudo account" + ] + } + ], + "index": 19 + }, + { + "name": "ImOnline", + "storage": { + "prefix": "ImOnline", + "items": [ + { + "name": "HeartbeatAfter", + "modifier": "Default", + "type": { + "plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " The block number after which it's ok to send heartbeats in the current", + " session.", + "", + " At the beginning of each session we set this to a value that should fall", + " roughly in the middle of the session duration. The idea is to first wait for", + " the validators to produce a block in the current session, so that the", + " heartbeat later on will not be necessary.", + "", + " This value will only be used as a fallback if we fail to get a proper session", + " progress estimate from `NextSessionRotation`, as those estimates should be", + " more accurate then the value we calculate for `HeartbeatAfter`." + ] + }, + { + "name": "Keys", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of keys that may issue a heartbeat." + ] + }, + { + "name": "ReceivedHeartbeats", + "modifier": "Optional", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "SessionIndex", + "key2": "AuthIndex", + "value": "Bytes", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " For each session index, we keep a mapping of `AuthIndex` to", + " `offchain::OpaqueNetworkState`." + ] + }, + { + "name": "AuthoredBlocks", + "modifier": "Default", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "SessionIndex", + "key2": "ValidatorId", + "value": "u32", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00000000", + "documentation": [ + " For each session index, we keep a mapping of `ValidatorId` to the", + " number of blocks authored by the given authority." + ] + } + ] + }, + "calls": [ + { + "name": "heartbeat", + "args": [ + { + "name": "heartbeat", + "type": "Heartbeat" + }, + { + "name": "_signature", + "type": "Signature" + } + ], + "documentation": [ + " # ", + " - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len)", + " and E is length of `heartbeat.network_state.external_address`", + " - `O(K)`: decoding of length `K`", + " - `O(E)`: decoding/encoding of length `E`", + " - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,", + " `ReceivedHeartbeats`", + " - DbWrites: `ReceivedHeartbeats`", + " # " + ] + } + ], + "events": [ + { + "name": "HeartbeatReceived", + "args": [ + "AuthorityId" + ], + "documentation": [ + " A new heartbeat was received from `AuthorityId` \\[authority_id\\]" + ] + }, + { + "name": "AllGood", + "args": [], + "documentation": [ + " At the end of the session, no offence was committed." + ] + }, + { + "name": "SomeOffline", + "args": [ + "Vec" + ], + "documentation": [ + " At the end of the session, at least one validator was found to be \\[offline\\]." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "InvalidKey", + "documentation": [ + " Non existent public key." + ] + }, + { + "name": "DuplicatedHeartbeat", + "documentation": [ + " Duplicated heartbeat." + ] + } + ], + "index": 20 + }, + { + "name": "AuthorityDiscovery", + "storage": null, + "calls": null, + "events": null, + "constants": [], + "errors": [], + "index": 21 + }, + { + "name": "Offences", + "storage": { + "prefix": "Offences", + "items": [ + { + "name": "Reports", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "ReportIdOf", + "value": "OffenceDetails", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The primary structure that holds all offence records keyed by report identifiers." + ] + }, + { + "name": "ConcurrentReportsIndex", + "modifier": "Default", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "Kind", + "key2": "OpaqueTimeSlot", + "value": "Vec", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " A vector of reports of the same kind that happened at the same time slot." + ] + }, + { + "name": "ReportsByKindIndex", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "Kind", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Enumerates all reports of a kind along with the time they happened.", + "", + " All reports are sorted by the time of offence.", + "", + " Note that the actual type of this mapping is `Vec`, this is because values of", + " different types are not supported at the moment so we are doing the manual serialization." + ] + } + ] + }, + "calls": null, + "events": [ + { + "name": "Offence", + "args": [ + "Kind", + "OpaqueTimeSlot" + ], + "documentation": [ + " There is an offence reported of the given `kind` happened at the `session_index` and", + " (kind-specific) time slot. This event is not deposited for duplicate slashes.", + " \\[kind, timeslot\\]." + ] + } + ], + "constants": [], + "errors": [], + "index": 22 + }, + { + "name": "Historical", + "storage": null, + "calls": null, + "events": null, + "constants": [], + "errors": [], + "index": 23 + }, + { + "name": "RandomnessCollectiveFlip", + "storage": { + "prefix": "RandomnessCollectiveFlip", + "items": [ + { + "name": "RandomMaterial", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Series of block headers from the last 81 blocks that acts as random seed material. This", + " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", + " the oldest hash." + ] + } + ] + }, + "calls": null, + "events": null, + "constants": [], + "errors": [], + "index": 24 + }, + { + "name": "Identity", + "storage": { + "prefix": "Identity", + "items": [ + { + "name": "IdentityOf", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Registration", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information that is pertinent to identify the entity behind an account.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "SuperOf", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "(AccountId,Data)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The super-identity of an alternative \"sub\" identity together with its name, within that", + " context. If the account is not some other account's sub-identity, then just `None`." + ] + }, + { + "name": "SubsOf", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(BalanceOf,Vec)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " Alternative \"sub\" identities of this account.", + "", + " The first item is the deposit, the second is a vector of the accounts.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "Registrars", + "modifier": "Default", + "type": { + "plain": "Vec>" + }, + "fallback": "0x00", + "documentation": [ + " The set of registrars. Not expected to get very big as can only be added through a", + " special origin (likely a council motion).", + "", + " The index into this can be cast to `RegistrarIndex` to get a valid value." + ] + } + ] + }, + "calls": [ + { + "name": "add_registrar", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Add a registrar to the system.", + "", + " The dispatch origin for this call must be `T::RegistrarOrigin`.", + "", + " - `account`: the account of the registrar.", + "", + " Emits `RegistrarAdded` if successful.", + "", + " # ", + " - `O(R)` where `R` registrar-count (governance-bounded and code-bounded).", + " - One storage mutation (codec `O(R)`).", + " - One event.", + " # " + ] + }, + { + "name": "set_identity", + "args": [ + { + "name": "info", + "type": "IdentityInfo" + } + ], + "documentation": [ + " Set an account's identity information and reserve the appropriate deposit.", + "", + " If the account already has identity information, the deposit is taken as part payment", + " for the new deposit.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `info`: The identity information.", + "", + " Emits `IdentitySet` if successful.", + "", + " # ", + " - `O(X + X' + R)`", + " - where `X` additional-field-count (deposit-bounded and code-bounded)", + " - where `R` judgements-count (registrar-count-bounded)", + " - One balance reserve operation.", + " - One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`).", + " - One event.", + " # " + ] + }, + { + "name": "set_subs", + "args": [ + { + "name": "subs", + "type": "Vec<(AccountId,Data)>" + } + ], + "documentation": [ + " Set the sub-accounts of the sender.", + "", + " Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", + " and an amount `SubAccountDeposit` will be reserved for each item in `subs`.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " identity.", + "", + " - `subs`: The identity's (new) sub-accounts.", + "", + " # ", + " - `O(P + S)`", + " - where `P` old-subs-count (hard- and deposit-bounded).", + " - where `S` subs-count (hard- and deposit-bounded).", + " - At most one balance operations.", + " - DB:", + " - `P + S` storage mutations (codec complexity `O(1)`)", + " - One storage read (codec complexity `O(P)`).", + " - One storage write (codec complexity `O(S)`).", + " - One storage-exists (`IdentityOf::contains_key`).", + " # " + ] + }, + { + "name": "clear_identity", + "args": [], + "documentation": [ + " Clear an account's identity info and all sub-accounts and return all deposits.", + "", + " Payment: All reserved balances on the account are returned.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " identity.", + "", + " Emits `IdentityCleared` if successful.", + "", + " # ", + " - `O(R + S + X)`", + " - where `R` registrar-count (governance-bounded).", + " - where `S` subs-count (hard- and deposit-bounded).", + " - where `X` additional-field-count (deposit-bounded and code-bounded).", + " - One balance-unreserve operation.", + " - `2` storage reads and `S + 2` storage deletions.", + " - One event.", + " # " + ] + }, + { + "name": "request_judgement", + "args": [ + { + "name": "reg_index", + "type": "Compact" + }, + { + "name": "max_fee", + "type": "Compact" + } + ], + "documentation": [ + " Request a judgement from a registrar.", + "", + " Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", + " given.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a", + " registered identity.", + "", + " - `reg_index`: The index of the registrar whose judgement is requested.", + " - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:", + "", + " ```nocompile", + " Self::registrars().get(reg_index).unwrap().fee", + " ```", + "", + " Emits `JudgementRequested` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-reserve operation.", + " - Storage: 1 read `O(R)`, 1 mutate `O(X + R)`.", + " - One event.", + " # " + ] + }, + { + "name": "cancel_request", + "args": [ + { + "name": "reg_index", + "type": "RegistrarIndex" + } + ], + "documentation": [ + " Cancel a previous request.", + "", + " Payment: A previously reserved deposit is returned on success.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a", + " registered identity.", + "", + " - `reg_index`: The index of the registrar whose judgement is no longer requested.", + "", + " Emits `JudgementUnrequested` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-reserve operation.", + " - One storage mutation `O(R + X)`.", + " - One event", + " # " + ] + }, + { + "name": "set_fee", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "fee", + "type": "Compact" + } + ], + "documentation": [ + " Set the fee required for a judgement to be requested from a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `fee`: the new fee.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " - Benchmark: 7.315 + R * 0.329 µs (min squares analysis)", + " # " + ] + }, + { + "name": "set_account_id", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "new", + "type": "AccountId" + } + ], + "documentation": [ + " Change the account associated with a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `new`: the new account ID.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " - Benchmark: 8.823 + R * 0.32 µs (min squares analysis)", + " # " + ] + }, + { + "name": "set_fields", + "args": [ + { + "name": "index", + "type": "Compact" + }, + { + "name": "fields", + "type": "IdentityFields" + } + ], + "documentation": [ + " Set the field information for a registrar.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `index`.", + "", + " - `index`: the index of the registrar whose fee is to be set.", + " - `fields`: the fields that the registrar concerns themselves with.", + "", + " # ", + " - `O(R)`.", + " - One storage mutation `O(R)`.", + " - Benchmark: 7.464 + R * 0.325 µs (min squares analysis)", + " # " + ] + }, + { + "name": "provide_judgement", + "args": [ + { + "name": "reg_index", + "type": "Compact" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "judgement", + "type": "IdentityJudgement" + } + ], + "documentation": [ + " Provide a judgement for an account's identity.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must be the account", + " of the registrar whose index is `reg_index`.", + "", + " - `reg_index`: the index of the registrar whose judgement is being made.", + " - `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + " - `judgement`: the judgement of the registrar of index `reg_index` about `target`.", + "", + " Emits `JudgementGiven` if successful.", + "", + " # ", + " - `O(R + X)`.", + " - One balance-transfer operation.", + " - Up to one account-lookup operation.", + " - Storage: 1 read `O(R)`, 1 mutate `O(R + X)`.", + " - One event.", + " # " + ] + }, + { + "name": "kill_identity", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove an account's identity and sub-account information and slash the deposits.", + "", + " Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", + " `Slash`. Verification request deposits are not returned; they should be cancelled", + " manually using `cancel_request`.", + "", + " The dispatch origin for this call must match `T::ForceOrigin`.", + "", + " - `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + "", + " Emits `IdentityKilled` if successful.", + "", + " # ", + " - `O(R + S + X)`.", + " - One balance-reserve operation.", + " - `S + 2` storage mutations.", + " - One event.", + " # " + ] + }, + { + "name": "add_sub", + "args": [ + { + "name": "sub", + "type": "LookupSource" + }, + { + "name": "data", + "type": "Data" + } + ], + "documentation": [ + " Add the given account to the sender's subs.", + "", + " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + " to the sender.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " sub identity of `sub`." + ] + }, + { + "name": "rename_sub", + "args": [ + { + "name": "sub", + "type": "LookupSource" + }, + { + "name": "data", + "type": "Data" + } + ], + "documentation": [ + " Alter the associated name of the given sub-account.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " sub identity of `sub`." + ] + }, + { + "name": "remove_sub", + "args": [ + { + "name": "sub", + "type": "LookupSource" + } + ], + "documentation": [ + " Remove the given account from the sender's subs.", + "", + " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + " to the sender.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " sub identity of `sub`." + ] + }, + { + "name": "quit_sub", + "args": [], + "documentation": [ + " Remove the sender as a sub-account.", + "", + " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + " to the sender (*not* the original depositor).", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have a registered", + " super-identity.", + "", + " NOTE: This should not normally be used, but is provided in the case that the non-", + " controller of an account is maliciously registered as a sub-account." + ] + } + ], + "events": [ + { + "name": "IdentitySet", + "args": [ + "AccountId" + ], + "documentation": [ + " A name was set or reset (which will remove all judgements). \\[who\\]" + ] + }, + { + "name": "IdentityCleared", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was cleared, and the given balance returned. \\[who, deposit\\]" + ] + }, + { + "name": "IdentityKilled", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A name was removed and the given balance slashed. \\[who, deposit\\]" + ] + }, + { + "name": "JudgementRequested", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement was asked from a registrar. \\[who, registrar_index\\]" + ] + }, + { + "name": "JudgementUnrequested", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement request was retracted. \\[who, registrar_index\\]" + ] + }, + { + "name": "JudgementGiven", + "args": [ + "AccountId", + "RegistrarIndex" + ], + "documentation": [ + " A judgement was given by a registrar. \\[target, registrar_index\\]" + ] + }, + { + "name": "RegistrarAdded", + "args": [ + "RegistrarIndex" + ], + "documentation": [ + " A registrar was added. \\[registrar_index\\]" + ] + }, + { + "name": "SubIdentityAdded", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " A sub-identity was added to an identity and the deposit paid. \\[sub, main, deposit\\]" + ] + }, + { + "name": "SubIdentityRemoved", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " A sub-identity was removed from an identity and the deposit freed.", + " \\[sub, main, deposit\\]" + ] + }, + { + "name": "SubIdentityRevoked", + "args": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " A sub-identity was cleared, and the given deposit repatriated from the", + " main identity account to the sub-identity account. \\[sub, main, deposit\\]" + ] + } + ], + "constants": [ + { + "name": "BasicDeposit", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [ + " The amount held on deposit for a registered identity" + ] + }, + { + "name": "FieldDeposit", + "type": "BalanceOf", + "value": "0x00a031a95fe300000000000000000000", + "documentation": [ + " The amount held on deposit per additional field for a registered identity." + ] + }, + { + "name": "SubAccountDeposit", + "type": "BalanceOf", + "value": "0x0080f420e6b500000000000000000000", + "documentation": [ + " The amount held on deposit for a registered subaccount. This should account for the fact", + " that one storage item's value will increase by the size of an account ID, and there will be", + " another trie item whose value is the size of an account ID plus 32 bytes." + ] + }, + { + "name": "MaxSubAccounts", + "type": "u32", + "value": "0x64000000", + "documentation": [ + " The maximum number of sub-accounts allowed per identified account." + ] + }, + { + "name": "MaxAdditionalFields", + "type": "u32", + "value": "0x64000000", + "documentation": [ + " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O", + " required to access an identity, but can be pretty high." + ] + }, + { + "name": "MaxRegistrars", + "type": "u32", + "value": "0x14000000", + "documentation": [ + " Maxmimum number of registrars allowed in the system. Needed to bound the complexity", + " of, e.g., updating judgements." + ] + } + ], + "errors": [ + { + "name": "TooManySubAccounts", + "documentation": [ + " Too many subs-accounts." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Account isn't found." + ] + }, + { + "name": "NotNamed", + "documentation": [ + " Account isn't named." + ] + }, + { + "name": "EmptyIndex", + "documentation": [ + " Empty index." + ] + }, + { + "name": "FeeChanged", + "documentation": [ + " Fee is changed." + ] + }, + { + "name": "NoIdentity", + "documentation": [ + " No identity found." + ] + }, + { + "name": "StickyJudgement", + "documentation": [ + " Sticky judgement." + ] + }, + { + "name": "JudgementGiven", + "documentation": [ + " Judgement given." + ] + }, + { + "name": "InvalidJudgement", + "documentation": [ + " Invalid judgement." + ] + }, + { + "name": "InvalidIndex", + "documentation": [ + " The index is invalid." + ] + }, + { + "name": "InvalidTarget", + "documentation": [ + " The target is invalid." + ] + }, + { + "name": "TooManyFields", + "documentation": [ + " Too many additional fields." + ] + }, + { + "name": "TooManyRegistrars", + "documentation": [ + " Maximum amount of registrars reached. Cannot add any more." + ] + }, + { + "name": "AlreadyClaimed", + "documentation": [ + " Account ID is already named." + ] + }, + { + "name": "NotSub", + "documentation": [ + " Sender is not a sub-account." + ] + }, + { + "name": "NotOwned", + "documentation": [ + " Sub-account isn't owned by sender." + ] + } + ], + "index": 25 + }, + { + "name": "Society", + "storage": { + "prefix": "Society", + "items": [ + { + "name": "Founder", + "modifier": "Optional", + "type": { + "plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The first member." + ] + }, + { + "name": "Rules", + "modifier": "Optional", + "type": { + "plain": "Hash" + }, + "fallback": "0x00", + "documentation": [ + " A hash of the rules of this society concerning membership. Can only be set once and", + " only by the founder." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of candidates; bidders that are attempting to become members." + ] + }, + { + "name": "SuspendedCandidates", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(BalanceOf,BidKind)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of suspended candidates." + ] + }, + { + "name": "Pot", + "modifier": "Default", + "type": { + "plain": "BalanceOf" + }, + "fallback": "0x00000000000000000000000000000000", + "documentation": [ + " Amount of our account balance that is specifically for the next round's bid(s)." + ] + }, + { + "name": "Head", + "modifier": "Optional", + "type": { + "plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The most primary from the most recently approved members." + ] + }, + { + "name": "Members", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current set of members, ordered." + ] + }, + { + "name": "SuspendedMembers", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "bool", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of suspended members." + ] + }, + { + "name": "Bids", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The current bids, stored ordered by the value of the bid." + ] + }, + { + "name": "Vouching", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "VouchingStatus", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Members currently vouching or banned from vouching again" + ] + }, + { + "name": "Payouts", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "Vec<(BlockNumber,BalanceOf)>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Pending payouts; ordered by block number, with the amount that should be paid out." + ] + }, + { + "name": "Strikes", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "StrikeCount", + "linked": false + } + }, + "fallback": "0x00000000", + "documentation": [ + " The ongoing number of losing votes cast by the member." + ] + }, + { + "name": "Votes", + "modifier": "Optional", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "AccountId", + "value": "SocietyVote", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Double map from Candidate -> Voter -> (Maybe) Vote." + ] + }, + { + "name": "Defender", + "modifier": "Optional", + "type": { + "plain": "AccountId" + }, + "fallback": "0x00", + "documentation": [ + " The defending member currently being challenged." + ] + }, + { + "name": "DefenderVotes", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "SocietyVote", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Votes for the defender." + ] + }, + { + "name": "MaxMembers", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " The max number of members for the society at one time." + ] + } + ] + }, + "calls": [ + { + "name": "bid", + "args": [ + { + "name": "value", + "type": "BalanceOf" + } + ], + "documentation": [ + " A user outside of the society can make a bid for entry.", + "", + " Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", + " when the bid becomes a member, or if the bid calls `unbid`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `value`: A one time payment the bid would like to receive when joining the society.", + "", + " # ", + " Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)", + " - Storage Reads:", + " \t- One storage read to check for suspended candidate. O(1)", + " \t- One storage read to check for suspended member. O(1)", + " \t- One storage read to retrieve all current bids. O(B)", + " \t- One storage read to retrieve all current candidates. O(C)", + " \t- One storage read to retrieve all members. O(M)", + " - Storage Writes:", + " \t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)", + " \t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + " - Notable Computation:", + " \t- O(B + C + log M) search to check user is not already a part of society.", + " \t- O(log B) search to insert the new bid sorted.", + " - External Module Operations:", + " \t- One balance reserve operation. O(X)", + " \t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + " - Events:", + " \t- One event for new bid.", + " \t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + " Total Complexity: O(M + B + C + logM + logB + X)", + " # " + ] + }, + { + "name": "unbid", + "args": [ + { + "name": "pos", + "type": "u32" + } + ], + "documentation": [ + " A bidder can remove their bid for entry into society.", + " By doing so, they will have their candidate deposit returned or", + " they will unvouch their voucher.", + "", + " Payment: The bid deposit is unreserved if the user made a bid.", + "", + " The dispatch origin for this call must be _Signed_ and a bidder.", + "", + " Parameters:", + " - `pos`: Position in the `Bids` vector of the bid who wants to unbid.", + "", + " # ", + " Key: B (len of bids), X (balance unreserve)", + " - One storage read and write to retrieve and update the bids. O(B)", + " - Either one unreserve balance action O(X) or one vouching storage removal. O(1)", + " - One event.", + "", + " Total Complexity: O(B + X)", + " # " + ] + }, + { + "name": "vouch", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "value", + "type": "BalanceOf" + }, + { + "name": "tip", + "type": "BalanceOf" + } + ], + "documentation": [ + " As a member, vouch for someone to join society by placing a bid on their behalf.", + "", + " There is no deposit required to vouch for a new bid, but a member can only vouch for", + " one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by", + " the suspension judgement origin, the member will be banned from vouching again.", + "", + " As a vouching member, you can claim a tip if the candidate is accepted. This tip will", + " be paid as a portion of the reward the member will receive for joining the society.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `who`: The user who you would like to vouch for.", + " - `value`: The total reward to be paid between you and the candidate if they become", + " a member in the society.", + " - `tip`: Your cut of the total `value` payout when the candidate is inducted into", + " the society. Tips larger than `value` will be saturated upon payout.", + "", + " # ", + " Key: B (len of bids), C (len of candidates), M (len of members)", + " - Storage Reads:", + " \t- One storage read to retrieve all members. O(M)", + " \t- One storage read to check member is not already vouching. O(1)", + " \t- One storage read to check for suspended candidate. O(1)", + " \t- One storage read to check for suspended member. O(1)", + " \t- One storage read to retrieve all current bids. O(B)", + " \t- One storage read to retrieve all current candidates. O(C)", + " - Storage Writes:", + " \t- One storage write to insert vouching status to the member. O(1)", + " \t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)", + " \t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + " - Notable Computation:", + " \t- O(log M) search to check sender is a member.", + " \t- O(B + C + log M) search to check user is not already a part of society.", + " \t- O(log B) search to insert the new bid sorted.", + " - External Module Operations:", + " \t- One balance reserve operation. O(X)", + " \t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + " - Events:", + " \t- One event for vouch.", + " \t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + " Total Complexity: O(M + B + C + logM + logB + X)", + " # " + ] + }, + { + "name": "unvouch", + "args": [ + { + "name": "pos", + "type": "u32" + } + ], + "documentation": [ + " As a vouching member, unvouch a bid. This only works while vouched user is", + " only a bidder (and not a candidate).", + "", + " The dispatch origin for this call must be _Signed_ and a vouching member.", + "", + " Parameters:", + " - `pos`: Position in the `Bids` vector of the bid who should be unvouched.", + "", + " # ", + " Key: B (len of bids)", + " - One storage read O(1) to check the signer is a vouching member.", + " - One storage mutate to retrieve and update the bids. O(B)", + " - One vouching storage removal. O(1)", + " - One event.", + "", + " Total Complexity: O(B)", + " # " + ] + }, + { + "name": "vote", + "args": [ + { + "name": "candidate", + "type": "LookupSource" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " As a member, vote on a candidate.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `candidate`: The candidate that the member would like to bid on.", + " - `approve`: A boolean which says if the candidate should be", + " approved (`true`) or rejected (`false`).", + "", + " # ", + " Key: C (len of candidates), M (len of members)", + " - One storage read O(M) and O(log M) search to check user is a member.", + " - One account lookup.", + " - One storage read O(C) and O(C) search to check that user is a candidate.", + " - One storage write to add vote to votes. O(1)", + " - One event.", + "", + " Total Complexity: O(M + logM + C)", + " # " + ] + }, + { + "name": "defender_vote", + "args": [ + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [ + " As a member, vote on the defender.", + "", + " The dispatch origin for this call must be _Signed_ and a member.", + "", + " Parameters:", + " - `approve`: A boolean which says if the candidate should be", + " approved (`true`) or rejected (`false`).", + "", + " # ", + " - Key: M (len of members)", + " - One storage read O(M) and O(log M) search to check user is a member.", + " - One storage write to add vote to votes. O(1)", + " - One event.", + "", + " Total Complexity: O(M + logM)", + " # " + ] + }, + { + "name": "payout", + "args": [], + "documentation": [ + " Transfer the first matured payout for the sender and remove it from the records.", + "", + " NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts.", + "", + " Payment: The member will receive a payment equal to their first matured", + " payout to their free balance.", + "", + " The dispatch origin for this call must be _Signed_ and a member with", + " payouts remaining.", + "", + " # ", + " Key: M (len of members), P (number of payouts for a particular member)", + " - One storage read O(M) and O(log M) search to check signer is a member.", + " - One storage read O(P) to get all payouts for a member.", + " - One storage read O(1) to get the current block number.", + " - One currency transfer call. O(X)", + " - One storage write or removal to update the member's payouts. O(P)", + "", + " Total Complexity: O(M + logM + P + X)", + " # " + ] + }, + { + "name": "found", + "args": [ + { + "name": "founder", + "type": "AccountId" + }, + { + "name": "max_members", + "type": "u32" + }, + { + "name": "rules", + "type": "Bytes" + } + ], + "documentation": [ + " Found the society.", + "", + " This is done as a discrete action in order to allow for the", + " module to be included into a running chain and can only be done once.", + "", + " The dispatch origin for this call must be from the _FounderSetOrigin_.", + "", + " Parameters:", + " - `founder` - The first member and head of the newly founded society.", + " - `max_members` - The initial max number of members for the society.", + " - `rules` - The rules of this society concerning membership.", + "", + " # ", + " - Two storage mutates to set `Head` and `Founder`. O(1)", + " - One storage write to add the first member to society. O(1)", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + }, + { + "name": "unfound", + "args": [], + "documentation": [ + " Annul the founding of the society.", + "", + " The dispatch origin for this call must be Signed, and the signing account must be both", + " the `Founder` and the `Head`. This implies that it may only be done when there is one", + " member.", + "", + " # ", + " - Two storage reads O(1).", + " - Four storage removals O(1).", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + }, + { + "name": "judge_suspended_member", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "forgive", + "type": "bool" + } + ], + "documentation": [ + " Allow suspension judgement origin to make judgement on a suspended member.", + "", + " If a suspended member is forgiven, we simply add them back as a member, not affecting", + " any of the existing storage items for that member.", + "", + " If a suspended member is rejected, remove all associated storage items, including", + " their payouts, and remove any vouched bids they currently have.", + "", + " The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + " Parameters:", + " - `who` - The suspended member to be judged.", + " - `forgive` - A boolean representing whether the suspension judgement origin", + " forgives (`true`) or rejects (`false`) a suspended member.", + "", + " # ", + " Key: B (len of bids), M (len of members)", + " - One storage read to check `who` is a suspended member. O(1)", + " - Up to one storage write O(M) with O(log M) binary search to add a member back to society.", + " - Up to 3 storage removals O(1) to clean up a removed member.", + " - Up to one storage write O(B) with O(B) search to remove vouched bid from bids.", + " - Up to one additional event if unvouch takes place.", + " - One storage removal. O(1)", + " - One event for the judgement.", + "", + " Total Complexity: O(M + logM + B)", + " # " + ] + }, + { + "name": "judge_suspended_candidate", + "args": [ + { + "name": "who", + "type": "AccountId" + }, + { + "name": "judgement", + "type": "SocietyJudgement" + } + ], + "documentation": [ + " Allow suspended judgement origin to make judgement on a suspended candidate.", + "", + " If the judgement is `Approve`, we add them to society as a member with the appropriate", + " payment for joining society.", + "", + " If the judgement is `Reject`, we either slash the deposit of the bid, giving it back", + " to the society treasury, or we ban the voucher from vouching again.", + "", + " If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go", + " through the induction process again.", + "", + " The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + " Parameters:", + " - `who` - The suspended candidate to be judged.", + " - `judgement` - `Approve`, `Reject`, or `Rebid`.", + "", + " # ", + " Key: B (len of bids), M (len of members), X (balance action)", + " - One storage read to check `who` is a suspended candidate.", + " - One storage removal of the suspended candidate.", + " - Approve Logic", + " \t- One storage read to get the available pot to pay users with. O(1)", + " \t- One storage write to update the available pot. O(1)", + " \t- One storage read to get the current block number. O(1)", + " \t- One storage read to get all members. O(M)", + " \t- Up to one unreserve currency action.", + " \t- Up to two new storage writes to payouts.", + " \t- Up to one storage write with O(log M) binary search to add a member to society.", + " - Reject Logic", + " \t- Up to one repatriate reserved currency action. O(X)", + " \t- Up to one storage write to ban the vouching member from vouching again.", + " - Rebid Logic", + " \t- Storage mutate with O(log B) binary search to place the user back into bids.", + " - Up to one additional event if unvouch takes place.", + " - One storage removal.", + " - One event for the judgement.", + "", + " Total Complexity: O(M + logM + B + X)", + " # " + ] + }, + { + "name": "set_max_members", + "args": [ + { + "name": "max", + "type": "u32" + } + ], + "documentation": [ + " Allows root origin to change the maximum number of members in society.", + " Max membership count must be greater than 1.", + "", + " The dispatch origin for this call must be from _ROOT_.", + "", + " Parameters:", + " - `max` - The maximum number of members for the society.", + "", + " # ", + " - One storage write to update the max. O(1)", + " - One event.", + "", + " Total Complexity: O(1)", + " # " + ] + } + ], + "events": [ + { + "name": "Founded", + "args": [ + "AccountId" + ], + "documentation": [ + " The society is founded by the given identity. \\[founder\\]" + ] + }, + { + "name": "Bid", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A membership bid just happened. The given account is the candidate's ID and their offer", + " is the second. \\[candidate_id, offer\\]" + ] + }, + { + "name": "Vouch", + "args": [ + "AccountId", + "Balance", + "AccountId" + ], + "documentation": [ + " A membership bid just happened by vouching. The given account is the candidate's ID and", + " their offer is the second. The vouching party is the third. \\[candidate_id, offer, vouching\\]" + ] + }, + { + "name": "AutoUnbid", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[candidate\\] was dropped (due to an excess of bids in the system)." + ] + }, + { + "name": "Unbid", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[candidate\\] was dropped (by their request)." + ] + }, + { + "name": "Unvouch", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[candidate\\] was dropped (by request of who vouched for them)." + ] + }, + { + "name": "Inducted", + "args": [ + "AccountId", + "Vec" + ], + "documentation": [ + " A group of candidates have been inducted. The batch's primary is the first value, the", + " batch in full is the second. \\[primary, candidates\\]" + ] + }, + { + "name": "SuspendedMemberJudgement", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A suspended member has been judged. \\[who, judged\\]" + ] + }, + { + "name": "CandidateSuspended", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[candidate\\] has been suspended" + ] + }, + { + "name": "MemberSuspended", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[member\\] has been suspended" + ] + }, + { + "name": "Challenged", + "args": [ + "AccountId" + ], + "documentation": [ + " A \\[member\\] has been challenged" + ] + }, + { + "name": "Vote", + "args": [ + "AccountId", + "AccountId", + "bool" + ], + "documentation": [ + " A vote has been placed \\[candidate, voter, vote\\]" + ] + }, + { + "name": "DefenderVote", + "args": [ + "AccountId", + "bool" + ], + "documentation": [ + " A vote has been placed for a defending member \\[voter, vote\\]" + ] + }, + { + "name": "NewMaxMembers", + "args": [ + "u32" + ], + "documentation": [ + " A new \\[max\\] member count has been set" + ] + }, + { + "name": "Unfounded", + "args": [ + "AccountId" + ], + "documentation": [ + " Society is unfounded. \\[founder\\]" + ] + }, + { + "name": "Deposit", + "args": [ + "Balance" + ], + "documentation": [ + " Some funds were deposited into the society account. \\[value\\]" + ] + } + ], + "constants": [ + { + "name": "CandidateDeposit", + "type": "BalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "documentation": [ + " The minimum amount of a deposit required for a bid to be made." + ] + }, + { + "name": "WrongSideDeduction", + "type": "BalanceOf", + "value": "0x0080f420e6b500000000000000000000", + "documentation": [ + " The amount of the unpaid reward that gets deducted in the case that either a skeptic", + " doesn't vote or someone votes in the wrong way." + ] + }, + { + "name": "MaxStrikes", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " The number of times a member may vote the wrong way (or not at all, when they are a skeptic)", + " before they become suspended." + ] + }, + { + "name": "PeriodSpend", + "type": "BalanceOf", + "value": "0x0000c52ebca2b1000000000000000000", + "documentation": [ + " The amount of incentive paid within each period. Doesn't include VoterTip." + ] + }, + { + "name": "RotationPeriod", + "type": "BlockNumber", + "value": "0x00770100", + "documentation": [ + " The number of blocks between candidate/membership rotation periods." + ] + }, + { + "name": "ChallengePeriod", + "type": "BlockNumber", + "value": "0x80130300", + "documentation": [ + " The number of blocks between membership challenges." + ] + }, + { + "name": "PalletId", + "type": "PalletId", + "value": "0x70792f736f636965", + "documentation": [ + " The societies's module id" + ] + }, + { + "name": "MaxCandidateIntake", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " Maximum candidate intake per round." + ] + } + ], + "errors": [ + { + "name": "BadPosition", + "documentation": [ + " An incorrect position was provided." + ] + }, + { + "name": "NotMember", + "documentation": [ + " User is not a member." + ] + }, + { + "name": "AlreadyMember", + "documentation": [ + " User is already a member." + ] + }, + { + "name": "Suspended", + "documentation": [ + " User is suspended." + ] + }, + { + "name": "NotSuspended", + "documentation": [ + " User is not suspended." + ] + }, + { + "name": "NoPayout", + "documentation": [ + " Nothing to payout." + ] + }, + { + "name": "AlreadyFounded", + "documentation": [ + " Society already founded." + ] + }, + { + "name": "InsufficientPot", + "documentation": [ + " Not enough in pot to accept candidate." + ] + }, + { + "name": "AlreadyVouching", + "documentation": [ + " Member is already vouching or banned from vouching again." + ] + }, + { + "name": "NotVouching", + "documentation": [ + " Member is not vouching." + ] + }, + { + "name": "Head", + "documentation": [ + " Cannot remove the head of the chain." + ] + }, + { + "name": "Founder", + "documentation": [ + " Cannot remove the founder." + ] + }, + { + "name": "AlreadyBid", + "documentation": [ + " User has already made a bid." + ] + }, + { + "name": "AlreadyCandidate", + "documentation": [ + " User is already a candidate." + ] + }, + { + "name": "NotCandidate", + "documentation": [ + " User is not a candidate." + ] + }, + { + "name": "MaxMembers", + "documentation": [ + " Too many members in the society." + ] + }, + { + "name": "NotFounder", + "documentation": [ + " The caller is not the founder." + ] + }, + { + "name": "NotHead", + "documentation": [ + " The caller is not the head." + ] + } + ], + "index": 26 + }, + { + "name": "Recovery", + "storage": { + "prefix": "Recovery", + "items": [ + { + "name": "Recoverable", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "RecoveryConfig", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The set of recoverable accounts and their recovery configuration." + ] + }, + { + "name": "ActiveRecoveries", + "modifier": "Optional", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "AccountId", + "value": "ActiveRecovery", + "key2Hasher": "Twox64Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Active recovery attempts.", + "", + " First account is the account to be recovered, and the second account", + " is the user trying to recover the account." + ] + }, + { + "name": "Proxy", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The list of allowed proxy accounts.", + "", + " Map from the user who can access it to the recovered account." + ] + } + ] + }, + "calls": [ + { + "name": "as_recovered", + "args": [ + { + "name": "account", + "type": "AccountId" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Send a call through a recovered account.", + "", + " The dispatch origin for this call must be _Signed_ and registered to", + " be able to make calls on behalf of the recovered account.", + "", + " Parameters:", + " - `account`: The recovered account you want to make a call on-behalf-of.", + " - `call`: The call you want to make with the recovered account.", + "", + " # ", + " - The weight of the `call` + 10,000.", + " - One storage lookup to check account is recovered by `who`. O(1)", + " # " + ] + }, + { + "name": "set_recovered", + "args": [ + { + "name": "lost", + "type": "AccountId" + }, + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " Allow ROOT to bypass the recovery process and set an a rescuer account", + " for a lost account directly.", + "", + " The dispatch origin for this call must be _ROOT_.", + "", + " Parameters:", + " - `lost`: The \"lost account\" to be recovered.", + " - `rescuer`: The \"rescuer account\" which can call as the lost account.", + "", + " # ", + " - One storage write O(1)", + " - One event", + " # " + ] + }, + { + "name": "create_recovery", + "args": [ + { + "name": "friends", + "type": "Vec" + }, + { + "name": "threshold", + "type": "u16" + }, + { + "name": "delay_period", + "type": "BlockNumber" + } + ], + "documentation": [ + " Create a recovery configuration for your account. This makes your account recoverable.", + "", + " Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", + " will be reserved for storing the recovery configuration. This deposit is returned", + " in full when the user calls `remove_recovery`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `friends`: A list of friends you trust to vouch for recovery attempts.", + " Should be ordered and contain no duplicate values.", + " - `threshold`: The number of friends that must vouch for a recovery attempt", + " before the account can be recovered. Should be less than or equal to", + " the length of the list of friends.", + " - `delay_period`: The number of blocks after a recovery attempt is initialized", + " that needs to pass before the account can be recovered.", + "", + " # ", + " - Key: F (len of friends)", + " - One storage read to check that account is not already recoverable. O(1).", + " - A check that the friends list is sorted and unique. O(F)", + " - One currency reserve operation. O(X)", + " - One storage write. O(1). Codec O(F).", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "initiate_recovery", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Initiate the process for recovering a recoverable account.", + "", + " Payment: `RecoveryDeposit` balance will be reserved for initiating the", + " recovery process. This deposit will always be repatriated to the account", + " trying to be recovered. See `close_recovery`.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `account`: The lost account that you want to recover. This account", + " needs to be recoverable (i.e. have a recovery configuration).", + "", + " # ", + " - One storage read to check that account is recoverable. O(F)", + " - One storage read to check that this recovery process hasn't already started. O(1)", + " - One currency reserve operation. O(X)", + " - One storage read to get the current block number. O(1)", + " - One storage write. O(1).", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "vouch_recovery", + "args": [ + { + "name": "lost", + "type": "AccountId" + }, + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " Allow a \"friend\" of a recoverable account to vouch for an active recovery", + " process for that account.", + "", + " The dispatch origin for this call must be _Signed_ and must be a \"friend\"", + " for the recoverable account.", + "", + " Parameters:", + " - `lost`: The lost account that you want to recover.", + " - `rescuer`: The account trying to rescue the lost account that you", + " want to vouch for.", + "", + " The combination of these two parameters must point to an active recovery", + " process.", + "", + " # ", + " Key: F (len of friends in config), V (len of vouching friends)", + " - One storage read to get the recovery configuration. O(1), Codec O(F)", + " - One storage read to get the active recovery process. O(1), Codec O(V)", + " - One binary search to confirm caller is a friend. O(logF)", + " - One binary search to confirm caller has not already vouched. O(logV)", + " - One storage write. O(1), Codec O(V).", + " - One event.", + "", + " Total Complexity: O(F + logF + V + logV)", + " # " + ] + }, + { + "name": "claim_recovery", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Allow a successful rescuer to claim their recovered account.", + "", + " The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", + " who has successfully completed the account recovery process: collected", + " `threshold` or more vouches, waited `delay_period` blocks since initiation.", + "", + " Parameters:", + " - `account`: The lost account that you want to claim has been successfully", + " recovered by you.", + "", + " # ", + " Key: F (len of friends in config), V (len of vouching friends)", + " - One storage read to get the recovery configuration. O(1), Codec O(F)", + " - One storage read to get the active recovery process. O(1), Codec O(V)", + " - One storage read to get the current block number. O(1)", + " - One storage write. O(1), Codec O(V).", + " - One event.", + "", + " Total Complexity: O(F + V)", + " # " + ] + }, + { + "name": "close_recovery", + "args": [ + { + "name": "rescuer", + "type": "AccountId" + } + ], + "documentation": [ + " As the controller of a recoverable account, close an active recovery", + " process for your account.", + "", + " Payment: By calling this function, the recoverable account will receive", + " the recovery deposit `RecoveryDeposit` placed by the rescuer.", + "", + " The dispatch origin for this call must be _Signed_ and must be a", + " recoverable account with an active recovery process for it.", + "", + " Parameters:", + " - `rescuer`: The account trying to rescue this recoverable account.", + "", + " # ", + " Key: V (len of vouching friends)", + " - One storage read/remove to get the active recovery process. O(1), Codec O(V)", + " - One balance call to repatriate reserved. O(X)", + " - One event.", + "", + " Total Complexity: O(V + X)", + " # " + ] + }, + { + "name": "remove_recovery", + "args": [], + "documentation": [ + " Remove the recovery process for your account. Recovered accounts are still accessible.", + "", + " NOTE: The user must make sure to call `close_recovery` on all active", + " recovery attempts before calling this function else it will fail.", + "", + " Payment: By calling this function the recoverable account will unreserve", + " their recovery configuration deposit.", + " (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)", + "", + " The dispatch origin for this call must be _Signed_ and must be a", + " recoverable account (i.e. has a recovery configuration).", + "", + " # ", + " Key: F (len of friends)", + " - One storage read to get the prefix iterator for active recoveries. O(1)", + " - One storage read/remove to get the recovery configuration. O(1), Codec O(F)", + " - One balance call to unreserved. O(X)", + " - One event.", + "", + " Total Complexity: O(F + X)", + " # " + ] + }, + { + "name": "cancel_recovered", + "args": [ + { + "name": "account", + "type": "AccountId" + } + ], + "documentation": [ + " Cancel the ability to use `as_recovered` for `account`.", + "", + " The dispatch origin for this call must be _Signed_ and registered to", + " be able to make calls on behalf of the recovered account.", + "", + " Parameters:", + " - `account`: The recovered account you are able to call on-behalf-of.", + "", + " # ", + " - One storage mutation to check account is recovered by `who`. O(1)", + " # " + ] + } + ], + "events": [ + { + "name": "RecoveryCreated", + "args": [ + "AccountId" + ], + "documentation": [ + " A recovery process has been set up for an \\[account\\]." + ] + }, + { + "name": "RecoveryInitiated", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process has been initiated for lost account by rescuer account.", + " \\[lost, rescuer\\]" + ] + }, + { + "name": "RecoveryVouched", + "args": [ + "AccountId", + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process for lost account by rescuer account has been vouched for by sender.", + " \\[lost, rescuer, sender\\]" + ] + }, + { + "name": "RecoveryClosed", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " A recovery process for lost account by rescuer account has been closed.", + " \\[lost, rescuer\\]" + ] + }, + { + "name": "AccountRecovered", + "args": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Lost account has been successfully recovered by rescuer account.", + " \\[lost, rescuer\\]" + ] + }, + { + "name": "RecoveryRemoved", + "args": [ + "AccountId" + ], + "documentation": [ + " A recovery process has been removed for an \\[account\\]." + ] + } + ], + "constants": [ + { + "name": "ConfigDepositBase", + "type": "BalanceOf", + "value": "0x00406352bfc601000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for creating a recovery configuration.", + "", + " This is held for an additional storage item whose value size is", + " `2 + sizeof(BlockNumber, Balance)` bytes." + ] + }, + { + "name": "FriendDepositFactor", + "type": "BalanceOf", + "value": "0x00203d88792d00000000000000000000", + "documentation": [ + " The amount of currency needed per additional user when creating a recovery configuration.", + "", + " This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage value." + ] + }, + { + "name": "MaxFriends", + "type": "u16", + "value": "0x0900", + "documentation": [ + " The maximum amount of friends allowed in a recovery configuration." + ] + }, + { + "name": "RecoveryDeposit", + "type": "BalanceOf", + "value": "0x00406352bfc601000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for starting a recovery.", + "", + " This is primarily held for deterring malicious recovery attempts, and should", + " have a value large enough that a bad actor would choose not to place this", + " deposit. It also acts to fund additional storage item whose value size is", + " `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable", + " threshold." + ] + } + ], + "errors": [ + { + "name": "NotAllowed", + "documentation": [ + " User is not allowed to make a call on behalf of this account" + ] + }, + { + "name": "ZeroThreshold", + "documentation": [ + " Threshold must be greater than zero" + ] + }, + { + "name": "NotEnoughFriends", + "documentation": [ + " Friends list must be greater than zero and threshold" + ] + }, + { + "name": "MaxFriends", + "documentation": [ + " Friends list must be less than max friends" + ] + }, + { + "name": "NotSorted", + "documentation": [ + " Friends list must be sorted and free of duplicates" + ] + }, + { + "name": "NotRecoverable", + "documentation": [ + " This account is not set up for recovery" + ] + }, + { + "name": "AlreadyRecoverable", + "documentation": [ + " This account is already set up for recovery" + ] + }, + { + "name": "AlreadyStarted", + "documentation": [ + " A recovery process has already started for this account" + ] + }, + { + "name": "NotStarted", + "documentation": [ + " A recovery process has not started for this rescuer" + ] + }, + { + "name": "NotFriend", + "documentation": [ + " This account is not a friend who can vouch" + ] + }, + { + "name": "DelayPeriod", + "documentation": [ + " The friend must wait until the delay period to vouch for this recovery" + ] + }, + { + "name": "AlreadyVouched", + "documentation": [ + " This user has already vouched for this recovery" + ] + }, + { + "name": "Threshold", + "documentation": [ + " The threshold for recovering this account has not been met" + ] + }, + { + "name": "StillActive", + "documentation": [ + " There are still active recovery attempts that need to be closed" + ] + }, + { + "name": "AlreadyProxy", + "documentation": [ + " This account is already set up for recovery" + ] + }, + { + "name": "BadState", + "documentation": [ + " Some internal state is broken." + ] + } + ], + "index": 27 + }, + { + "name": "Vesting", + "storage": { + "prefix": "Vesting", + "items": [ + { + "name": "Vesting", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AccountId", + "value": "VestingInfo", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Information regarding the vesting of a given account." + ] + } + ] + }, + "calls": [ + { + "name": "vest", + "args": [], + "documentation": [ + " Unlock any vested funds of the sender account.", + "", + " The dispatch origin for this call must be _Signed_ and the sender must have funds still", + " locked under this pallet.", + "", + " Emits either `VestingCompleted` or `VestingUpdated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 2 Reads, 2 Writes", + " - Reads: Vesting Storage, Balances Locks, [Sender Account]", + " - Writes: Vesting Storage, Balances Locks, [Sender Account]", + " # " + ] + }, + { + "name": "vest_other", + "args": [ + { + "name": "target", + "type": "LookupSource" + } + ], + "documentation": [ + " Unlock any vested funds of a `target` account.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `target`: The account whose vested funds should be unlocked. Must have funds still", + " locked under this pallet.", + "", + " Emits either `VestingCompleted` or `VestingUpdated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 3 Reads, 3 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account", + " - Writes: Vesting Storage, Balances Locks, Target Account", + " # " + ] + }, + { + "name": "vested_transfer", + "args": [ + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "schedule", + "type": "VestingInfo" + } + ], + "documentation": [ + " Create a vested transfer.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `target`: The account that should be transferred the vested funds.", + " - `amount`: The amount of funds to transfer and will be vested.", + " - `schedule`: The vesting schedule attached to the transfer.", + "", + " Emits `VestingCreated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 3 Reads, 3 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]", + " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]", + " # " + ] + }, + { + "name": "force_vested_transfer", + "args": [ + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "schedule", + "type": "VestingInfo" + } + ], + "documentation": [ + " Force a vested transfer.", + "", + " The dispatch origin for this call must be _Root_.", + "", + " - `source`: The account whose funds should be transferred.", + " - `target`: The account that should be transferred the vested funds.", + " - `amount`: The amount of funds to transfer and will be vested.", + " - `schedule`: The vesting schedule attached to the transfer.", + "", + " Emits `VestingCreated`.", + "", + " # ", + " - `O(1)`.", + " - DbWeight: 4 Reads, 4 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account", + " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account", + " # " + ] + } + ], + "events": [ + { + "name": "VestingUpdated", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " The amount vested has been updated. This could indicate more funds are available. The", + " balance given is the amount which is left unvested (and thus locked).", + " \\[account, unvested\\]" + ] + }, + { + "name": "VestingCompleted", + "args": [ + "AccountId" + ], + "documentation": [ + " An \\[account\\] has become fully vested. No further vesting can happen." + ] + } + ], + "constants": [ + { + "name": "MinVestedTransfer", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "documentation": [ + " The minimum amount transferred to call `vested_transfer`." + ] + } + ], + "errors": [ + { + "name": "NotVesting", + "documentation": [ + " The account given is not vesting." + ] + }, + { + "name": "ExistingVestingSchedule", + "documentation": [ + " An existing vesting schedule already exists for this account that cannot be clobbered." + ] + }, + { + "name": "AmountLow", + "documentation": [ + " Amount being transferred is too low to create a vesting schedule." + ] + } + ], + "index": 28 + }, + { + "name": "Scheduler", + "storage": { + "prefix": "Scheduler", + "items": [ + { + "name": "Agenda", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "BlockNumber", + "value": "Vec>", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Items to be executed, indexed by the block number that they should be executed on." + ] + }, + { + "name": "Lookup", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "Bytes", + "value": "TaskAddress", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Lookup from identity to the block number and index of the task." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "type": { + "plain": "Releases" + }, + "fallback": "0x00", + "documentation": [ + " Storage version of the pallet.", + "", + " New networks start with last version." + ] + } + ] + }, + "calls": [ + { + "name": "schedule", + "args": [ + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Anonymously schedule a task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 22.29 + .126 * S µs", + " - DB Weight:", + " - Read: Agenda", + " - Write: Agenda", + " - Will use base weight of 25 which should be good for up to 30 scheduled calls", + " # " + ] + }, + { + "name": "cancel", + "args": [ + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "index", + "type": "u32" + } + ], + "documentation": [ + " Cancel an anonymously scheduled task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 22.15 + 2.869 * S µs", + " - DB Weight:", + " - Read: Agenda", + " - Write: Agenda, Lookup", + " - Will use base weight of 100 which should be good for up to 30 scheduled calls", + " # " + ] + }, + { + "name": "schedule_named", + "args": [ + { + "name": "id", + "type": "Bytes" + }, + { + "name": "when", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Schedule a named task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 29.6 + .159 * S µs", + " - DB Weight:", + " - Read: Agenda, Lookup", + " - Write: Agenda, Lookup", + " - Will use base weight of 35 which should be good for more than 30 scheduled calls", + " # " + ] + }, + { + "name": "cancel_named", + "args": [ + { + "name": "id", + "type": "Bytes" + } + ], + "documentation": [ + " Cancel a named scheduled task.", + "", + " # ", + " - S = Number of already scheduled calls", + " - Base Weight: 24.91 + 2.907 * S µs", + " - DB Weight:", + " - Read: Agenda, Lookup", + " - Write: Agenda, Lookup", + " - Will use base weight of 100 which should be good for up to 30 scheduled calls", + " # " + ] + }, + { + "name": "schedule_after", + "args": [ + { + "name": "after", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Anonymously schedule a task after a delay.", + "", + " # ", + " Same as [`schedule`].", + " # " + ] + }, + { + "name": "schedule_named_after", + "args": [ + { + "name": "id", + "type": "Bytes" + }, + { + "name": "after", + "type": "BlockNumber" + }, + { + "name": "maybe_periodic", + "type": "Option" + }, + { + "name": "priority", + "type": "Priority" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Schedule a named task after a delay.", + "", + " # ", + " Same as [`schedule_named`].", + " # " + ] + } + ], + "events": [ + { + "name": "Scheduled", + "args": [ + "BlockNumber", + "u32" + ], + "documentation": [ + " Scheduled some task. \\[when, index\\]" + ] + }, + { + "name": "Canceled", + "args": [ + "BlockNumber", + "u32" + ], + "documentation": [ + " Canceled some task. \\[when, index\\]" + ] + }, + { + "name": "Dispatched", + "args": [ + "TaskAddress", + "Option", + "DispatchResult" + ], + "documentation": [ + " Dispatched some task. \\[task, id, result\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "FailedToSchedule", + "documentation": [ + " Failed to schedule a call" + ] + }, + { + "name": "NotFound", + "documentation": [ + " Cannot find the scheduled call." + ] + }, + { + "name": "TargetBlockNumberInPast", + "documentation": [ + " Given target block number is in the past." + ] + }, + { + "name": "RescheduleNoChange", + "documentation": [ + " Reschedule failed because it does not change scheduled time." + ] + } + ], + "index": 29 + }, + { + "name": "Proxy", + "storage": { + "prefix": "Proxy", + "items": [ + { + "name": "Proxies", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(Vec,BalanceOf)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " The set of account proxies. Maps the account which has delegated to the accounts", + " which are being delegated to, together with the amount held on deposit." + ] + }, + { + "name": "Announcements", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(Vec,BalanceOf)", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000", + "documentation": [ + " The announcements made by the proxy (key)." + ] + } + ] + }, + "calls": [ + { + "name": "proxy", + "args": [ + { + "name": "real", + "type": "AccountId" + }, + { + "name": "force_proxy_type", + "type": "Option" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Dispatch the given `call` from an account that the sender is authorised for through", + " `add_proxy`.", + "", + " Removes any corresponding announcement(s).", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", + " - `call`: The call to be made by the `real` account.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "add_proxy", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Register a proxy account for the sender that is able to make calls on its behalf.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `proxy`: The account that the `caller` would like to make a proxy.", + " - `proxy_type`: The permissions allowed for this proxy account.", + " - `delay`: The announcement period required of the initial proxy. Will generally be", + " zero.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "remove_proxy", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Unregister a proxy account for the sender.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `proxy`: The account that the `caller` would like to remove as a proxy.", + " - `proxy_type`: The permissions currently enabled for the removed proxy account.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "remove_proxies", + "args": [], + "documentation": [ + " Unregister all proxy accounts for the sender.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " WARNING: This may be called on accounts created by `anonymous`, however if done, then", + " the unreserved fees will be inaccessible. **All access to this account will be lost.**", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "anonymous", + "args": [ + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "delay", + "type": "BlockNumber" + }, + { + "name": "index", + "type": "u16" + } + ], + "documentation": [ + " Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and", + " initialize it with a proxy of `proxy_type` for `origin` sender.", + "", + " Requires a `Signed` origin.", + "", + " - `proxy_type`: The type of the proxy that the sender will be registered as over the", + " new account. This will almost always be the most permissive `ProxyType` possible to", + " allow for maximum flexibility.", + " - `index`: A disambiguation index, in case this is called multiple times in the same", + " transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just", + " want to use `0`.", + " - `delay`: The announcement period required of the initial proxy. Will generally be", + " zero.", + "", + " Fails with `Duplicate` if this has already been called in this transaction, from the", + " same sender, with the same parameters.", + "", + " Fails if there are insufficient funds to pay for deposit.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # ", + " TODO: Might be over counting 1 read" + ] + }, + { + "name": "kill_anonymous", + "args": [ + { + "name": "spawner", + "type": "AccountId" + }, + { + "name": "proxy_type", + "type": "ProxyType" + }, + { + "name": "index", + "type": "u16" + }, + { + "name": "height", + "type": "Compact" + }, + { + "name": "ext_index", + "type": "Compact" + } + ], + "documentation": [ + " Removes a previously spawned anonymous proxy.", + "", + " WARNING: **All access to this account will be lost.** Any funds held in it will be", + " inaccessible.", + "", + " Requires a `Signed` origin, and the sender account must have been created by a call to", + " `anonymous` with corresponding parameters.", + "", + " - `spawner`: The account that originally called `anonymous` to create this account.", + " - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.", + " - `proxy_type`: The proxy type originally passed to `anonymous`.", + " - `height`: The height of the chain when the call to `anonymous` was processed.", + " - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.", + "", + " Fails with `NoPermission` in case the caller is not a previously created anonymous", + " account whose `anonymous` call has corresponding parameters.", + "", + " # ", + " Weight is a function of the number of proxies the user has (P).", + " # " + ] + }, + { + "name": "announce", + "args": [ + { + "name": "real", + "type": "AccountId" + }, + { + "name": "call_hash", + "type": "CallHashOf" + } + ], + "documentation": [ + " Publish the hash of a proxy-call that will be made in the future.", + "", + " This must be called some number of blocks before the corresponding `proxy` is attempted", + " if the delay associated with the proxy relationship is greater than zero.", + "", + " No more than `MaxPending` announcements may be made at any one time.", + "", + " This will take a deposit of `AnnouncementDepositFactor` as well as", + " `AnnouncementDepositBase` if there are no other pending announcements.", + "", + " The dispatch origin for this call must be _Signed_ and a proxy of `real`.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `call_hash`: The hash of the call to be made by the `real` account.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + }, + { + "name": "remove_announcement", + "args": [ + { + "name": "real", + "type": "AccountId" + }, + { + "name": "call_hash", + "type": "CallHashOf" + } + ], + "documentation": [ + " Remove a given announcement.", + "", + " May be called by a proxy account to remove a call they previously announced and return", + " the deposit.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `call_hash`: The hash of the call to be made by the `real` account.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + }, + { + "name": "reject_announcement", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "call_hash", + "type": "CallHashOf" + } + ], + "documentation": [ + " Remove the given announcement of a delegate.", + "", + " May be called by a target (proxied) account to remove a call that one of their delegates", + " (`delegate`) has announced they want to execute. The deposit is returned.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `delegate`: The account that previously announced the call.", + " - `call_hash`: The hash of the call to be made.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + }, + { + "name": "proxy_announced", + "args": [ + { + "name": "delegate", + "type": "AccountId" + }, + { + "name": "real", + "type": "AccountId" + }, + { + "name": "force_proxy_type", + "type": "Option" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Dispatch the given `call` from an account that the sender is authorized for through", + " `add_proxy`.", + "", + " Removes any corresponding announcement(s).", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Parameters:", + " - `real`: The account that the proxy will make a call on behalf of.", + " - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", + " - `call`: The call to be made by the `real` account.", + "", + " # ", + " Weight is a function of:", + " - A: the number of announcements made.", + " - P: the number of proxies the user has.", + " # " + ] + } + ], + "events": [ + { + "name": "ProxyExecuted", + "args": [ + "DispatchResult" + ], + "documentation": [ + " A proxy was executed correctly, with the given \\[result\\]." + ] + }, + { + "name": "AnonymousCreated", + "args": [ + "AccountId", + "AccountId", + "ProxyType", + "u16" + ], + "documentation": [ + " Anonymous account has been created by new proxy with given", + " disambiguation index and proxy type. \\[anonymous, who, proxy_type, disambiguation_index\\]" + ] + }, + { + "name": "Announced", + "args": [ + "AccountId", + "AccountId", + "Hash" + ], + "documentation": [ + " An announcement was placed to make a call in the future. \\[real, proxy, call_hash\\]" + ] + } + ], + "constants": [ + { + "name": "ProxyDepositBase", + "type": "BalanceOf", + "value": "0x00f09e544c3900000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for creating a proxy.", + "", + " This is held for an additional storage item whose value size is", + " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes." + ] + }, + { + "name": "ProxyDepositFactor", + "type": "BalanceOf", + "value": "0x0060aa7714b400000000000000000000", + "documentation": [ + " The amount of currency needed per proxy added.", + "", + " This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing", + " storage value. Thus, when configuring `ProxyDepositFactor` one should take into account", + " `32 + proxy_type.encode().len()` bytes of data." + ] + }, + { + "name": "MaxProxies", + "type": "u32", + "value": "0x20000000", + "documentation": [ + " The maximum amount of proxies allowed for a single account." + ] + }, + { + "name": "MaxPending", + "type": "u32", + "value": "0x20000000", + "documentation": [ + " The maximum amount of time-delayed announcements that are allowed to be pending." + ] + }, + { + "name": "AnnouncementDepositBase", + "type": "BalanceOf", + "value": "0x00f09e544c3900000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for creating an announcement.", + "", + " This is held when a new storage item holding a `Balance` is created (typically 16 bytes)." + ] + }, + { + "name": "AnnouncementDepositFactor", + "type": "BalanceOf", + "value": "0x00c054ef286801000000000000000000", + "documentation": [ + " The amount of currency needed per announcement made.", + "", + " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)", + " into a pre-existing storage value." + ] + } + ], + "errors": [ + { + "name": "TooMany", + "documentation": [ + " There are too many proxies registered or too many announcements pending." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Proxy registration not found." + ] + }, + { + "name": "NotProxy", + "documentation": [ + " Sender is not a proxy of the account to be proxied." + ] + }, + { + "name": "Unproxyable", + "documentation": [ + " A call which is incompatible with the proxy type's filter was attempted." + ] + }, + { + "name": "Duplicate", + "documentation": [ + " Account is already a proxy." + ] + }, + { + "name": "NoPermission", + "documentation": [ + " Call may not be made by proxy because it may escalate its privileges." + ] + }, + { + "name": "Unannounced", + "documentation": [ + " Announcement, if made at all, was made too recently." + ] + }, + { + "name": "NoSelfProxy", + "documentation": [ + " Cannot add self as proxy." + ] + } + ], + "index": 30 + }, + { + "name": "Multisig", + "storage": { + "prefix": "Multisig", + "items": [ + { + "name": "Multisigs", + "modifier": "Optional", + "type": { + "doubleMap": { + "hasher": "Twox64Concat", + "key1": "AccountId", + "key2": "[u8;32]", + "value": "Multisig", + "key2Hasher": "Blake2_128Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " The set of open multisig operations." + ] + }, + { + "name": "Calls", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "[u8;32]", + "value": "(OpaqueCall,AccountId,BalanceOf)", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [] + } + ] + }, + "calls": [ + { + "name": "as_multi_threshold_1", + "args": [ + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Immediately dispatch a multi-signature call using a single approval from the caller.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `other_signatories`: The accounts (other than the sender) who are part of the", + " multi-signature, but do not participate in the approval process.", + " - `call`: The call to be executed.", + "", + " Result is equivalent to the dispatched result.", + "", + " # ", + " O(Z + C) where Z is the length of the call and C its execution weight.", + " -------------------------------", + " - DB Weight: None", + " - Plus Call Weight", + " # " + ] + }, + { + "name": "as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "maybe_timepoint", + "type": "Option" + }, + { + "name": "call", + "type": "OpaqueCall" + }, + { + "name": "store_call", + "type": "bool" + }, + { + "name": "max_weight", + "type": "Weight" + } + ], + "documentation": [ + " Register approval for a dispatch to be made from a deterministic composite account if", + " approved by a total of `threshold - 1` of `other_signatories`.", + "", + " If there are enough, then dispatch the call.", + "", + " Payment: `DepositBase` will be reserved if this is the first approval, plus", + " `threshold` times `DepositFactor`. It is returned once this dispatch happens or", + " is cancelled.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + " not the first approval, then it must be `Some`, with the timepoint (block number and", + " transaction index) of the first approval transaction.", + " - `call`: The call to be executed.", + "", + " NOTE: Unless this is the final approval, you will generally want to use", + " `approve_as_multi` instead, since it only requires a hash of the call.", + "", + " Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise", + " on success, result is `Ok` and the result from the interior call, if it was executed,", + " may be found in the deposited `MultisigExecuted` event.", + "", + " # ", + " - `O(S + Z + Call)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.", + " - One encode & hash, both of complexity `O(S)`.", + " - Up to one binary search and insert (`O(logS + S)`).", + " - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + " - One event.", + " - The weight of the `call`.", + " - Storage: inserts one item, value size bounded by `MaxSignatories`, with a", + " deposit taken for its lifetime of", + " `DepositBase + threshold * DepositFactor`.", + " -------------------------------", + " - DB Weight:", + " - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`)", + " - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`)", + " - Plus Call Weight", + " # " + ] + }, + { + "name": "approve_as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "maybe_timepoint", + "type": "Option" + }, + { + "name": "call_hash", + "type": "[u8;32]" + }, + { + "name": "max_weight", + "type": "Weight" + } + ], + "documentation": [ + " Register approval for a dispatch to be made from a deterministic composite account if", + " approved by a total of `threshold - 1` of `other_signatories`.", + "", + " Payment: `DepositBase` will be reserved if this is the first approval, plus", + " `threshold` times `DepositFactor`. It is returned once this dispatch happens or", + " is cancelled.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + " not the first approval, then it must be `Some`, with the timepoint (block number and", + " transaction index) of the first approval transaction.", + " - `call_hash`: The hash of the call to be executed.", + "", + " NOTE: If this is the final approval, you will want to use `as_multi` instead.", + "", + " # ", + " - `O(S)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One encode & hash, both of complexity `O(S)`.", + " - Up to one binary search and insert (`O(logS + S)`).", + " - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + " - One event.", + " - Storage: inserts one item, value size bounded by `MaxSignatories`, with a", + " deposit taken for its lifetime of", + " `DepositBase + threshold * DepositFactor`.", + " ----------------------------------", + " - DB Weight:", + " - Read: Multisig Storage, [Caller Account]", + " - Write: Multisig Storage, [Caller Account]", + " # " + ] + }, + { + "name": "cancel_as_multi", + "args": [ + { + "name": "threshold", + "type": "u16" + }, + { + "name": "other_signatories", + "type": "Vec" + }, + { + "name": "timepoint", + "type": "Timepoint" + }, + { + "name": "call_hash", + "type": "[u8;32]" + } + ], + "documentation": [ + " Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", + " for this operation will be unreserved on success.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " - `threshold`: The total number of approvals for this dispatch before it is executed.", + " - `other_signatories`: The accounts (other than the sender) who can approve this", + " dispatch. May not be empty.", + " - `timepoint`: The timepoint (block number and transaction index) of the first approval", + " transaction for this dispatch.", + " - `call_hash`: The hash of the call to be executed.", + "", + " # ", + " - `O(S)`.", + " - Up to one balance-reserve or unreserve operation.", + " - One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + " - One encode & hash, both of complexity `O(S)`.", + " - One event.", + " - I/O: 1 read `O(S)`, one remove.", + " - Storage: removes one item.", + " ----------------------------------", + " - DB Weight:", + " - Read: Multisig Storage, [Caller Account], Refund Account, Calls", + " - Write: Multisig Storage, [Caller Account], Refund Account, Calls", + " # " + ] + } + ], + "events": [ + { + "name": "NewMultisig", + "args": [ + "AccountId", + "AccountId", + "CallHash" + ], + "documentation": [ + " A new multisig operation has begun. \\[approving, multisig, call_hash\\]" + ] + }, + { + "name": "MultisigApproval", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "CallHash" + ], + "documentation": [ + " A multisig operation has been approved by someone.", + " \\[approving, timepoint, multisig, call_hash\\]" + ] + }, + { + "name": "MultisigExecuted", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "CallHash", + "DispatchResult" + ], + "documentation": [ + " A multisig operation has been executed. \\[approving, timepoint, multisig, call_hash\\]" + ] + }, + { + "name": "MultisigCancelled", + "args": [ + "AccountId", + "Timepoint", + "AccountId", + "CallHash" + ], + "documentation": [ + " A multisig operation has been cancelled. \\[cancelling, timepoint, multisig, call_hash\\]" + ] + } + ], + "constants": [ + { + "name": "DepositBase", + "type": "BalanceOf", + "value": "0x00f01c0adbed01000000000000000000", + "documentation": [ + " The base amount of currency needed to reserve for creating a multisig execution or to store", + " a dispatch call for later.", + "", + " This is held for an additional storage item whose value size is", + " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is", + " `32 + sizeof(AccountId)` bytes." + ] + }, + { + "name": "DepositFactor", + "type": "BalanceOf", + "value": "0x0000cc7b9fae00000000000000000000", + "documentation": [ + " The amount of currency needed per unit threshold when creating a multisig execution.", + "", + " This is held for adding 32 bytes more into a pre-existing storage value." + ] + }, + { + "name": "MaxSignatories", + "type": "u16", + "value": "0x6400", + "documentation": [ + " The maximum amount of signatories allowed in the multisig." + ] + } + ], + "errors": [ + { + "name": "MinimumThreshold", + "documentation": [ + " Threshold must be 2 or greater." + ] + }, + { + "name": "AlreadyApproved", + "documentation": [ + " Call is already approved by this signatory." + ] + }, + { + "name": "NoApprovalsNeeded", + "documentation": [ + " Call doesn't need any (more) approvals." + ] + }, + { + "name": "TooFewSignatories", + "documentation": [ + " There are too few signatories in the list." + ] + }, + { + "name": "TooManySignatories", + "documentation": [ + " There are too many signatories in the list." + ] + }, + { + "name": "SignatoriesOutOfOrder", + "documentation": [ + " The signatories were provided out of order; they should be ordered." + ] + }, + { + "name": "SenderInSignatories", + "documentation": [ + " The sender was contained in the other signatories; it shouldn't be." + ] + }, + { + "name": "NotFound", + "documentation": [ + " Multisig operation not found when attempting to cancel." + ] + }, + { + "name": "NotOwner", + "documentation": [ + " Only the account that originally created the multisig is able to cancel it." + ] + }, + { + "name": "NoTimepoint", + "documentation": [ + " No timepoint was given, yet the multisig operation is already underway." + ] + }, + { + "name": "WrongTimepoint", + "documentation": [ + " A different timepoint was given to the multisig operation that is underway." + ] + }, + { + "name": "UnexpectedTimepoint", + "documentation": [ + " A timepoint was given, yet no multisig operation is underway." + ] + }, + { + "name": "MaxWeightTooLow", + "documentation": [ + " The maximum weight information provided was too low." + ] + }, + { + "name": "AlreadyStored", + "documentation": [ + " The data to be stored is already stored." + ] + } + ], + "index": 31 + }, + { + "name": "Bounties", + "storage": { + "prefix": "Treasury", + "items": [ + { + "name": "BountyCount", + "modifier": "Default", + "type": { + "plain": "BountyIndex" + }, + "fallback": "0x00000000", + "documentation": [ + " Number of bounty proposals that have been made." + ] + }, + { + "name": "Bounties", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "BountyIndex", + "value": "Bounty", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Bounties that have been made." + ] + }, + { + "name": "BountyDescriptions", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "BountyIndex", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The description of each bounty." + ] + }, + { + "name": "BountyApprovals", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " Bounty indices that have been approved but not yet funded." + ] + } + ] + }, + "calls": [ + { + "name": "propose_bounty", + "args": [ + { + "name": "value", + "type": "Compact" + }, + { + "name": "description", + "type": "Bytes" + } + ], + "documentation": [ + " Propose a new bounty.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", + " `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,", + " or slashed when rejected.", + "", + " - `curator`: The curator account whom will manage this bounty.", + " - `fee`: The curator fee.", + " - `value`: The total payment amount of this bounty, curator fee included.", + " - `description`: The description of this bounty." + ] + }, + { + "name": "approve_bounty", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a bounty proposal. At a later time, the bounty will be funded and become active", + " and the original deposit will be returned.", + "", + " May only be called from `T::ApproveOrigin`.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "propose_curator", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + }, + { + "name": "curator", + "type": "LookupSource" + }, + { + "name": "fee", + "type": "Compact" + } + ], + "documentation": [ + " Assign a curator to a funded bounty.", + "", + " May only be called from `T::ApproveOrigin`.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "unassign_curator", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Unassign curator from a bounty.", + "", + " This function can only be called by the `RejectOrigin` a signed origin.", + "", + " If this function is called by the `RejectOrigin`, we assume that the curator is malicious", + " or inactive. As a result, we will slash the curator when possible.", + "", + " If the origin is the curator, we take this as a sign they are unable to do their job and", + " they willingly give up. We could slash them, but for now we allow them to recover their", + " deposit and exit without issue. (We may want to change this if it is abused.)", + "", + " Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows", + " anyone in the community to call out that a curator is not doing their due diligence, and", + " we should pick a new curator. In this case the curator should also be slashed.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "accept_curator", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Accept the curator role for a bounty.", + " A deposit will be reserved from curator and refund upon successful payout.", + "", + " May only be called from the curator.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "award_bounty", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "LookupSource" + } + ], + "documentation": [ + " Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay.", + "", + " The dispatch origin for this call must be the curator of this bounty.", + "", + " - `bounty_id`: Bounty ID to award.", + " - `beneficiary`: The beneficiary account whom will receive the payout.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "claim_bounty", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Claim the payout from an awarded bounty after payout delay.", + "", + " The dispatch origin for this call must be the beneficiary of this bounty.", + "", + " - `bounty_id`: Bounty ID to claim.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "close_bounty", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + } + ], + "documentation": [ + " Cancel a proposed or active bounty. All the funds will be sent to treasury and", + " the curator deposit will be unreserved if possible.", + "", + " Only `T::RejectOrigin` is able to cancel a bounty.", + "", + " - `bounty_id`: Bounty ID to cancel.", + "", + " # ", + " - O(1).", + " # " + ] + }, + { + "name": "extend_bounty_expiry", + "args": [ + { + "name": "bounty_id", + "type": "Compact" + }, + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Extend the expiry time of an active bounty.", + "", + " The dispatch origin for this call must be the curator of this bounty.", + "", + " - `bounty_id`: Bounty ID to extend.", + " - `remark`: additional information.", + "", + " # ", + " - O(1).", + " # " + ] + } + ], + "events": [ + { + "name": "BountyProposed", + "args": [ + "BountyIndex" + ], + "documentation": [ + " New bounty proposal. \\[index\\]" + ] + }, + { + "name": "BountyRejected", + "args": [ + "BountyIndex", + "Balance" + ], + "documentation": [ + " A bounty proposal was rejected; funds were slashed. \\[index, bond\\]" + ] + }, + { + "name": "BountyBecameActive", + "args": [ + "BountyIndex" + ], + "documentation": [ + " A bounty proposal is funded and became active. \\[index\\]" + ] + }, + { + "name": "BountyAwarded", + "args": [ + "BountyIndex", + "AccountId" + ], + "documentation": [ + " A bounty is awarded to a beneficiary. \\[index, beneficiary\\]" + ] + }, + { + "name": "BountyClaimed", + "args": [ + "BountyIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " A bounty is claimed by beneficiary. \\[index, payout, beneficiary\\]" + ] + }, + { + "name": "BountyCanceled", + "args": [ + "BountyIndex" + ], + "documentation": [ + " A bounty is cancelled. \\[index\\]" + ] + }, + { + "name": "BountyExtended", + "args": [ + "BountyIndex" + ], + "documentation": [ + " A bounty expiry is extended. \\[index\\]" + ] + } + ], + "constants": [ + { + "name": "DataDepositPerByte", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount held on deposit per byte within bounty description." + ] + }, + { + "name": "BountyDepositBase", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The amount held on deposit for placing a bounty proposal." + ] + }, + { + "name": "BountyDepositPayoutDelay", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " The delay period for which a bounty beneficiary need to wait before claim the payout." + ] + }, + { + "name": "BountyUpdatePeriod", + "type": "BlockNumber", + "value": "0x00270600", + "documentation": [ + " Bounty duration in blocks." + ] + }, + { + "name": "BountyCuratorDeposit", + "type": "Permill", + "value": "0x20a10700", + "documentation": [ + " Percentage of the curator fee that will be reserved upfront as deposit for bounty curator." + ] + }, + { + "name": "BountyValueMinimum", + "type": "BalanceOf", + "value": "0x00406352bfc601000000000000000000", + "documentation": [ + " Minimum value for a bounty." + ] + }, + { + "name": "MaximumReasonLength", + "type": "u32", + "value": "0x00400000", + "documentation": [ + " Maximum acceptable reason length." + ] + } + ], + "errors": [ + { + "name": "InsufficientProposersBalance", + "documentation": [ + " Proposer's balance is too low." + ] + }, + { + "name": "InvalidIndex", + "documentation": [ + " No proposal or bounty at that index." + ] + }, + { + "name": "ReasonTooBig", + "documentation": [ + " The reason given is just too big." + ] + }, + { + "name": "UnexpectedStatus", + "documentation": [ + " The bounty status is unexpected." + ] + }, + { + "name": "RequireCurator", + "documentation": [ + " Require bounty curator." + ] + }, + { + "name": "InvalidValue", + "documentation": [ + " Invalid bounty value." + ] + }, + { + "name": "InvalidFee", + "documentation": [ + " Invalid bounty fee." + ] + }, + { + "name": "PendingPayout", + "documentation": [ + " A bounty payout is pending.", + " To cancel the bounty, you must unassign and slash the curator." + ] + }, + { + "name": "Premature", + "documentation": [ + " The bounties cannot be claimed/closed because it's still in the countdown period." + ] + } + ], + "index": 32 + }, + { + "name": "Tips", + "storage": { + "prefix": "Treasury", + "items": [ + { + "name": "Tips", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "Hash", + "value": "OpenTip", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", + " This has the insecure enumerable hash function since the key itself is already", + " guaranteed to be a secure hash." + ] + }, + { + "name": "Reasons", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "Hash", + "value": "Bytes", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Simple preimage lookup from the reason's hash to the original data. Again, has an", + " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." + ] + } + ] + }, + "calls": [ + { + "name": "report_awesome", + "args": [ + { + "name": "reason", + "type": "Bytes" + }, + { + "name": "who", + "type": "AccountId" + } + ], + "documentation": [ + " Report something `reason` that deserves a tip and claim any eventual the finder's fee.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", + " `DataDepositPerByte` for each byte in `reason`.", + "", + " - `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + " - `who`: The account which should be credited for the tip.", + "", + " Emits `NewTip` if successful.", + "", + " # ", + " - Complexity: `O(R)` where `R` length of `reason`.", + " - encoding and hashing of 'reason'", + " - DbReads: `Reasons`, `Tips`", + " - DbWrites: `Reasons`, `Tips`", + " # " + ] + }, + { + "name": "retract_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "documentation": [ + " Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", + "", + " If successful, the original deposit will be unreserved.", + "", + " The dispatch origin for this call must be _Signed_ and the tip identified by `hash`", + " must have been reported by the signing account through `report_awesome` (and not", + " through `tip_new`).", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + " Emits `TipRetracted` if successful.", + "", + " # ", + " - Complexity: `O(1)`", + " - Depends on the length of `T::Hash` which is fixed.", + " - DbReads: `Tips`, `origin account`", + " - DbWrites: `Reasons`, `Tips`, `origin account`", + " # " + ] + }, + { + "name": "tip_new", + "args": [ + { + "name": "reason", + "type": "Bytes" + }, + { + "name": "who", + "type": "AccountId" + }, + { + "name": "tip_value", + "type": "Compact" + } + ], + "documentation": [ + " Give a tip for something new; no finder's fee will be taken.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must be a", + " member of the `Tippers` set.", + "", + " - `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + " - `who`: The account which should be credited for the tip.", + " - `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + " Emits `NewTip` if successful.", + "", + " # ", + " - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers.", + " - `O(T)`: decoding `Tipper` vec of length `T`", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + " - `O(R)`: hashing and encoding of reason of length `R`", + " - DbReads: `Tippers`, `Reasons`", + " - DbWrites: `Reasons`, `Tips`", + " # " + ] + }, + { + "name": "tip", + "args": [ + { + "name": "hash", + "type": "Hash" + }, + { + "name": "tip_value", + "type": "Compact" + } + ], + "documentation": [ + " Declare a tip value for an already-open tip.", + "", + " The dispatch origin for this call must be _Signed_ and the signing account must be a", + " member of the `Tippers` set.", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary", + " account ID.", + " - `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + " Emits `TipClosing` if the threshold of tippers has been reached and the countdown period", + " has started.", + "", + " # ", + " - Complexity: `O(T)` where `T` is the number of tippers.", + " decoding `Tipper` vec of length `T`, insert tip and check closing,", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + "", + " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it", + " is weighted as if almost full i.e of length `T-1`.", + " - DbReads: `Tippers`, `Tips`", + " - DbWrites: `Tips`", + " # " + ] + }, + { + "name": "close_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "documentation": [ + " Close and payout a tip.", + "", + " The dispatch origin for this call must be _Signed_.", + "", + " The tip identified by `hash` must have finished its countdown period.", + "", + " - `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + " # ", + " - Complexity: `O(T)` where `T` is the number of tippers.", + " decoding `Tipper` vec of length `T`.", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + " - DbReads: `Tips`, `Tippers`, `tip finder`", + " - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`", + " # " + ] + }, + { + "name": "slash_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "documentation": [ + " Remove and slash an already-open tip.", + "", + " May only be called from `T::RejectOrigin`.", + "", + " As a result, the finder is slashed and the deposits are lost.", + "", + " Emits `TipSlashed` if successful.", + "", + " # ", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + " # " + ] + } + ], + "events": [ + { + "name": "NewTip", + "args": [ + "Hash" + ], + "documentation": [ + " A new tip suggestion has been opened. \\[tip_hash\\]" + ] + }, + { + "name": "TipClosing", + "args": [ + "Hash" + ], + "documentation": [ + " A tip suggestion has reached threshold and is closing. \\[tip_hash\\]" + ] + }, + { + "name": "TipClosed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A tip suggestion has been closed. \\[tip_hash, who, payout\\]" + ] + }, + { + "name": "TipRetracted", + "args": [ + "Hash" + ], + "documentation": [ + " A tip suggestion has been retracted. \\[tip_hash\\]" + ] + }, + { + "name": "TipSlashed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "documentation": [ + " A tip suggestion has been slashed. \\[tip_hash, finder, deposit\\]" + ] + } + ], + "constants": [ + { + "name": "TipCountdown", + "type": "BlockNumber", + "value": "0x80700000", + "documentation": [ + " The period for which a tip remains open after is has achieved threshold tippers." + ] + }, + { + "name": "TipFindersFee", + "type": "Percent", + "value": "0x14", + "documentation": [ + " The amount of the final tip which goes to the original reporter of the tip." + ] + }, + { + "name": "TipReportDepositBase", + "type": "BalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "documentation": [ + " The amount held on deposit for placing a tip report." + ] + }, + { + "name": "DataDepositPerByte", + "type": "BalanceOf", + "value": "0x0010a5d4e80000000000000000000000", + "documentation": [ + " The amount held on deposit per byte within the tip report reason." + ] + }, + { + "name": "MaximumReasonLength", + "type": "u32", + "value": "0x00400000", + "documentation": [ + " Maximum acceptable reason length." + ] + } + ], + "errors": [ + { + "name": "ReasonTooBig", + "documentation": [ + " The reason given is just too big." + ] + }, + { + "name": "AlreadyKnown", + "documentation": [ + " The tip was already found/started." + ] + }, + { + "name": "UnknownTip", + "documentation": [ + " The tip hash is unknown." + ] + }, + { + "name": "NotFinder", + "documentation": [ + " The account attempting to retract the tip is not the finder of the tip." + ] + }, + { + "name": "StillOpen", + "documentation": [ + " The tip cannot be claimed/closed because there are not enough tippers yet." + ] + }, + { + "name": "Premature", + "documentation": [ + " The tip cannot be claimed/closed because it's still in the countdown period." + ] + } + ], + "index": 33 + }, + { + "name": "Assets", + "storage": { + "prefix": "Assets", + "items": [ + { + "name": "Asset", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AssetId", + "value": "AssetDetails", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Details of an asset." + ] + }, + { + "name": "Account", + "modifier": "Default", + "type": { + "doubleMap": { + "hasher": "Blake2_128Concat", + "key1": "AssetId", + "key2": "AccountId", + "value": "AssetBalance", + "key2Hasher": "Blake2_128Concat" + } + }, + "fallback": "0x00000000000000000000", + "documentation": [ + " The number of units of assets held by any given account." + ] + }, + { + "name": "Approvals", + "modifier": "Optional", + "type": { + "nMap": { + "keyVec": [ + "AssetId", + "AccountId", + "AccountId" + ], + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat", + "Blake2_128Concat" + ], + "value": "AssetApproval" + } + }, + "fallback": "0x00", + "documentation": [ + " Approved balance transfers. First balance is the amount approved for transfer. Second", + " is the amount of `T::Currency` reserved for storing this.", + " First key is the asset ID, second key is the owner and third key is the delegate." + ] + }, + { + "name": "Metadata", + "modifier": "Default", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AssetId", + "value": "AssetMetadata", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000", + "documentation": [ + " Metadata of an asset." + ] + } + ] + }, + "calls": [ + { + "name": "create", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "admin", + "type": "LookupSource" + }, + { + "name": "min_balance", + "type": "TAssetBalance" + } + ], + "documentation": [ + " Issue a new class of fungible assets from a public origin.", + "", + " This new asset class has no assets initially and its owner is the origin.", + "", + " The origin must be Signed and the sender must have sufficient funds free.", + "", + " Funds of sender are reserved by `AssetDeposit`.", + "", + " Parameters:", + " - `id`: The identifier of the new asset. This must not be currently in use to identify", + " an existing asset.", + " - `admin`: The admin of this class of assets. The admin is the initial address of each", + " member of the asset class's admin team.", + " - `min_balance`: The minimum balance of this new asset that any single account must", + " have. If an account's balance is reduced below this, then it collapses to zero.", + "", + " Emits `Created` event when successful.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "force_create", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "is_sufficient", + "type": "bool" + }, + { + "name": "min_balance", + "type": "Compact" + } + ], + "documentation": [ + " Issue a new class of fungible assets from a privileged origin.", + "", + " This new asset class has no assets initially.", + "", + " The origin must conform to `ForceOrigin`.", + "", + " Unlike `create`, no funds are reserved.", + "", + " - `id`: The identifier of the new asset. This must not be currently in use to identify", + " an existing asset.", + " - `owner`: The owner of this class of assets. The owner has full superuser permissions", + " over this asset, but may later change and configure the permissions using `transfer_ownership`", + " and `set_team`.", + " - `min_balance`: The minimum balance of this new asset that any single account must", + " have. If an account's balance is reduced below this, then it collapses to zero.", + "", + " Emits `ForceCreated` event when successful.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "destroy", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "witness", + "type": "AssetDestroyWitness" + } + ], + "documentation": [ + " Destroy a class of fungible assets.", + "", + " The origin must conform to `ForceOrigin` or must be Signed and the sender must be the", + " owner of the asset `id`.", + "", + " - `id`: The identifier of the asset to be destroyed. This must identify an existing", + " asset.", + "", + " Emits `Destroyed` event when successful.", + "", + " NOTE: It can be helpful to first freeze an asset before destroying it so that you", + " can provide accurate witness information and prevent users from manipulating state", + " in a way that can make it harder to destroy.", + "", + " Weight: `O(c + p + a)` where:", + " - `c = (witness.accounts - witness.sufficients)`", + " - `s = witness.sufficients`", + " - `a = witness.approvals`" + ] + }, + { + "name": "mint", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Mint assets of a particular class.", + "", + " The origin must be Signed and the sender must be the Issuer of the asset `id`.", + "", + " - `id`: The identifier of the asset to have some amount minted.", + " - `beneficiary`: The account to be credited with the minted assets.", + " - `amount`: The amount of the asset to be minted.", + "", + " Emits `Issued` event when successful.", + "", + " Weight: `O(1)`", + " Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`." + ] + }, + { + "name": "burn", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "who", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Reduce the balance of `who` by as much as possible up to `amount` assets of `id`.", + "", + " Origin must be Signed and the sender should be the Manager of the asset `id`.", + "", + " Bails with `BalanceZero` if the `who` is already dead.", + "", + " - `id`: The identifier of the asset to have some amount burned.", + " - `who`: The account to be debited from.", + " - `amount`: The maximum amount by which `who`'s balance should be reduced.", + "", + " Emits `Burned` with the actual amount burned. If this takes the balance to below the", + " minimum for the asset, then the amount burned is increased to take it to zero.", + "", + " Weight: `O(1)`", + " Modes: Post-existence of `who`; Pre & post Zombie-status of `who`." + ] + }, + { + "name": "transfer", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Move some assets from the sender account to another.", + "", + " Origin must be Signed.", + "", + " - `id`: The identifier of the asset to have some amount transferred.", + " - `target`: The account to be credited.", + " - `amount`: The amount by which the sender's balance of assets should be reduced and", + " `target`'s balance increased. The amount actually transferred may be slightly greater in", + " the case that the transfer would otherwise take the sender balance above zero but below", + " the minimum balance. Must be greater than zero.", + "", + " Emits `Transferred` with the actual amount transferred. If this takes the source balance", + " to below the minimum for the asset, then the amount transferred is increased to take it", + " to zero.", + "", + " Weight: `O(1)`", + " Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of", + " `target`." + ] + }, + { + "name": "transfer_keep_alive", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Move some assets from the sender account to another, keeping the sender account alive.", + "", + " Origin must be Signed.", + "", + " - `id`: The identifier of the asset to have some amount transferred.", + " - `target`: The account to be credited.", + " - `amount`: The amount by which the sender's balance of assets should be reduced and", + " `target`'s balance increased. The amount actually transferred may be slightly greater in", + " the case that the transfer would otherwise take the sender balance above zero but below", + " the minimum balance. Must be greater than zero.", + "", + " Emits `Transferred` with the actual amount transferred. If this takes the source balance", + " to below the minimum for the asset, then the amount transferred is increased to take it", + " to zero.", + "", + " Weight: `O(1)`", + " Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of", + " `target`." + ] + }, + { + "name": "force_transfer", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "source", + "type": "LookupSource" + }, + { + "name": "dest", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Move some assets from one account to another.", + "", + " Origin must be Signed and the sender should be the Admin of the asset `id`.", + "", + " - `id`: The identifier of the asset to have some amount transferred.", + " - `source`: The account to be debited.", + " - `dest`: The account to be credited.", + " - `amount`: The amount by which the `source`'s balance of assets should be reduced and", + " `dest`'s balance increased. The amount actually transferred may be slightly greater in", + " the case that the transfer would otherwise take the `source` balance above zero but", + " below the minimum balance. Must be greater than zero.", + "", + " Emits `Transferred` with the actual amount transferred. If this takes the source balance", + " to below the minimum for the asset, then the amount transferred is increased to take it", + " to zero.", + "", + " Weight: `O(1)`", + " Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of", + " `dest`." + ] + }, + { + "name": "freeze", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "who", + "type": "LookupSource" + } + ], + "documentation": [ + " Disallow further unprivileged transfers from an account.", + "", + " Origin must be Signed and the sender should be the Freezer of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + " - `who`: The account to be frozen.", + "", + " Emits `Frozen`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "thaw", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "who", + "type": "LookupSource" + } + ], + "documentation": [ + " Allow unprivileged transfers from an account again.", + "", + " Origin must be Signed and the sender should be the Admin of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + " - `who`: The account to be unfrozen.", + "", + " Emits `Thawed`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "freeze_asset", + "args": [ + { + "name": "id", + "type": "Compact" + } + ], + "documentation": [ + " Disallow further unprivileged transfers for the asset class.", + "", + " Origin must be Signed and the sender should be the Freezer of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + "", + " Emits `Frozen`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "thaw_asset", + "args": [ + { + "name": "id", + "type": "Compact" + } + ], + "documentation": [ + " Allow unprivileged transfers for the asset again.", + "", + " Origin must be Signed and the sender should be the Admin of the asset `id`.", + "", + " - `id`: The identifier of the asset to be thawed.", + "", + " Emits `Thawed`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "transfer_ownership", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + } + ], + "documentation": [ + " Change the Owner of an asset.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + " - `id`: The identifier of the asset.", + " - `owner`: The new Owner of this asset.", + "", + " Emits `OwnerChanged`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "set_team", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "issuer", + "type": "LookupSource" + }, + { + "name": "admin", + "type": "LookupSource" + }, + { + "name": "freezer", + "type": "LookupSource" + } + ], + "documentation": [ + " Change the Issuer, Admin and Freezer of an asset.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + " - `issuer`: The new Issuer of this asset.", + " - `admin`: The new Admin of this asset.", + " - `freezer`: The new Freezer of this asset.", + "", + " Emits `TeamChanged`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "set_metadata", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "name", + "type": "Bytes" + }, + { + "name": "symbol", + "type": "Bytes" + }, + { + "name": "decimals", + "type": "u8" + } + ], + "documentation": [ + " Set the metadata for an asset.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + " Funds of sender are reserved according to the formula:", + " `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into", + " account any already reserved funds.", + "", + " - `id`: The identifier of the asset to update.", + " - `name`: The user friendly name of this asset. Limited in length by `StringLimit`.", + " - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`.", + " - `decimals`: The number of decimals this asset uses to represent one unit.", + "", + " Emits `MetadataSet`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "clear_metadata", + "args": [ + { + "name": "id", + "type": "Compact" + } + ], + "documentation": [ + " Clear the metadata for an asset.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + " Any deposit is freed for the asset owner.", + "", + " - `id`: The identifier of the asset to clear.", + "", + " Emits `MetadataCleared`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "force_set_metadata", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "name", + "type": "Bytes" + }, + { + "name": "symbol", + "type": "Bytes" + }, + { + "name": "decimals", + "type": "u8" + }, + { + "name": "is_frozen", + "type": "bool" + } + ], + "documentation": [ + " Force the metadata for an asset to some value.", + "", + " Origin must be ForceOrigin.", + "", + " Any deposit is left alone.", + "", + " - `id`: The identifier of the asset to update.", + " - `name`: The user friendly name of this asset. Limited in length by `StringLimit`.", + " - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`.", + " - `decimals`: The number of decimals this asset uses to represent one unit.", + "", + " Emits `MetadataSet`.", + "", + " Weight: `O(N + S)` where N and S are the length of the name and symbol respectively." + ] + }, + { + "name": "force_clear_metadata", + "args": [ + { + "name": "id", + "type": "Compact" + } + ], + "documentation": [ + " Clear the metadata for an asset.", + "", + " Origin must be ForceOrigin.", + "", + " Any deposit is returned.", + "", + " - `id`: The identifier of the asset to clear.", + "", + " Emits `MetadataCleared`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "force_asset_status", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "issuer", + "type": "LookupSource" + }, + { + "name": "admin", + "type": "LookupSource" + }, + { + "name": "freezer", + "type": "LookupSource" + }, + { + "name": "min_balance", + "type": "Compact" + }, + { + "name": "is_sufficient", + "type": "bool" + }, + { + "name": "is_frozen", + "type": "bool" + } + ], + "documentation": [ + " Alter the attributes of a given asset.", + "", + " Origin must be `ForceOrigin`.", + "", + " - `id`: The identifier of the asset.", + " - `owner`: The new Owner of this asset.", + " - `issuer`: The new Issuer of this asset.", + " - `admin`: The new Admin of this asset.", + " - `freezer`: The new Freezer of this asset.", + " - `min_balance`: The minimum balance of this new asset that any single account must", + " have. If an account's balance is reduced below this, then it collapses to zero.", + " - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient", + " value to account for the state bloat associated with its balance storage. If set to", + " `true`, then non-zero balances may be stored without a `consumer` reference (and thus", + " an ED in the Balances pallet or whatever else is used to control user-account state", + " growth).", + " - `is_frozen`: Whether this asset class is frozen except for permissioned/admin", + " instructions.", + "", + " Emits `AssetStatusChanged` with the identity of the asset.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "approve_transfer", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "delegate", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Approve an amount of asset for transfer by a delegated third-party account.", + "", + " Origin must be Signed.", + "", + " Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account", + " for the purpose of holding the approval. If some non-zero amount of assets is already", + " approved from signing account to `delegate`, then it is topped up or unreserved to", + " meet the right value.", + "", + " NOTE: The signing account does not need to own `amount` of assets at the point of", + " making this call.", + "", + " - `id`: The identifier of the asset.", + " - `delegate`: The account to delegate permission to transfer asset.", + " - `amount`: The amount of asset that may be transferred by `delegate`. If there is", + " already an approval in place, then this acts additively.", + "", + " Emits `ApprovedTransfer` on success.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "cancel_approval", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "delegate", + "type": "LookupSource" + } + ], + "documentation": [ + " Cancel all of some asset approved for delegated transfer by a third-party account.", + "", + " Origin must be Signed and there must be an approval in place between signer and", + " `delegate`.", + "", + " Unreserves any deposit previously reserved by `approve_transfer` for the approval.", + "", + " - `id`: The identifier of the asset.", + " - `delegate`: The account delegated permission to transfer asset.", + "", + " Emits `ApprovalCancelled` on success.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "force_cancel_approval", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "delegate", + "type": "LookupSource" + } + ], + "documentation": [ + " Cancel all of some asset approved for delegated transfer by a third-party account.", + "", + " Origin must be either ForceOrigin or Signed origin with the signer being the Admin", + " account of the asset `id`.", + "", + " Unreserves any deposit previously reserved by `approve_transfer` for the approval.", + "", + " - `id`: The identifier of the asset.", + " - `delegate`: The account delegated permission to transfer asset.", + "", + " Emits `ApprovalCancelled` on success.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "transfer_approved", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "destination", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "documentation": [ + " Transfer some asset balance from a previously delegated account to some third-party", + " account.", + "", + " Origin must be Signed and there must be an approval in place by the `owner` to the", + " signer.", + "", + " If the entire amount approved for transfer is transferred, then any deposit previously", + " reserved by `approve_transfer` is unreserved.", + "", + " - `id`: The identifier of the asset.", + " - `owner`: The account which previously approved for a transfer of at least `amount` and", + " from which the asset balance will be withdrawn.", + " - `destination`: The account to which the asset balance of `amount` will be transferred.", + " - `amount`: The amount of assets to transfer.", + "", + " Emits `TransferredApproved` on success.", + "", + " Weight: `O(1)`" + ] + } + ], + "events": [ + { + "name": "Created", + "args": [ + "AssetId", + "AccountId", + "AccountId" + ], + "documentation": [ + " Some asset class was created. \\[asset_id, creator, owner\\]" + ] + }, + { + "name": "Issued", + "args": [ + "AssetId", + "AccountId", + "TAssetBalance" + ], + "documentation": [ + " Some assets were issued. \\[asset_id, owner, total_supply\\]" + ] + }, + { + "name": "Transferred", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "TAssetBalance" + ], + "documentation": [ + " Some assets were transferred. \\[asset_id, from, to, amount\\]" + ] + }, + { + "name": "Burned", + "args": [ + "AssetId", + "AccountId", + "TAssetBalance" + ], + "documentation": [ + " Some assets were destroyed. \\[asset_id, owner, balance\\]" + ] + }, + { + "name": "TeamChanged", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "AccountId" + ], + "documentation": [ + " The management team changed \\[asset_id, issuer, admin, freezer\\]" + ] + }, + { + "name": "OwnerChanged", + "args": [ + "AssetId", + "AccountId" + ], + "documentation": [ + " The owner changed \\[asset_id, owner\\]" + ] + }, + { + "name": "Frozen", + "args": [ + "AssetId", + "AccountId" + ], + "documentation": [ + " Some account `who` was frozen. \\[asset_id, who\\]" + ] + }, + { + "name": "Thawed", + "args": [ + "AssetId", + "AccountId" + ], + "documentation": [ + " Some account `who` was thawed. \\[asset_id, who\\]" + ] + }, + { + "name": "AssetFrozen", + "args": [ + "AssetId" + ], + "documentation": [ + " Some asset `asset_id` was frozen. \\[asset_id\\]" + ] + }, + { + "name": "AssetThawed", + "args": [ + "AssetId" + ], + "documentation": [ + " Some asset `asset_id` was thawed. \\[asset_id\\]" + ] + }, + { + "name": "Destroyed", + "args": [ + "AssetId" + ], + "documentation": [ + " An asset class was destroyed." + ] + }, + { + "name": "ForceCreated", + "args": [ + "AssetId", + "AccountId" + ], + "documentation": [ + " Some asset class was force-created. \\[asset_id, owner\\]" + ] + }, + { + "name": "MetadataSet", + "args": [ + "AssetId", + "Bytes", + "Bytes", + "u8", + "bool" + ], + "documentation": [ + " New metadata has been set for an asset. \\[asset_id, name, symbol, decimals, is_frozen\\]" + ] + }, + { + "name": "MetadataCleared", + "args": [ + "AssetId" + ], + "documentation": [ + " Metadata has been cleared for an asset. \\[asset_id\\]" + ] + }, + { + "name": "ApprovedTransfer", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "TAssetBalance" + ], + "documentation": [ + " (Additional) funds have been approved for transfer to a destination account.", + " \\[asset_id, source, delegate, amount\\]" + ] + }, + { + "name": "ApprovalCancelled", + "args": [ + "AssetId", + "AccountId", + "AccountId" + ], + "documentation": [ + " An approval for account `delegate` was cancelled by `owner`.", + " \\[id, owner, delegate\\]" + ] + }, + { + "name": "TransferredApproved", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "AccountId", + "TAssetBalance" + ], + "documentation": [ + " An `amount` was transferred in its entirety from `owner` to `destination` by", + " the approved `delegate`.", + " \\[id, owner, delegate, destination\\]" + ] + }, + { + "name": "AssetStatusChanged", + "args": [ + "AssetId" + ], + "documentation": [ + " An asset has had its attributes changed by the `Force` origin.", + " \\[id\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "BalanceLow", + "documentation": [ + " Account balance must be greater than or equal to the transfer amount." + ] + }, + { + "name": "BalanceZero", + "documentation": [ + " Balance should be non-zero." + ] + }, + { + "name": "NoPermission", + "documentation": [ + " The signing account has no permission to do the operation." + ] + }, + { + "name": "Unknown", + "documentation": [ + " The given asset ID is unknown." + ] + }, + { + "name": "Frozen", + "documentation": [ + " The origin account is frozen." + ] + }, + { + "name": "InUse", + "documentation": [ + " The asset ID is already taken." + ] + }, + { + "name": "BadWitness", + "documentation": [ + " Invalid witness data given." + ] + }, + { + "name": "MinBalanceZero", + "documentation": [ + " Minimum balance should be non-zero." + ] + }, + { + "name": "NoProvider", + "documentation": [ + " No provider reference exists to allow a non-zero balance of a non-self-sufficient asset." + ] + }, + { + "name": "BadMetadata", + "documentation": [ + " Invalid metadata given." + ] + }, + { + "name": "Unapproved", + "documentation": [ + " No approval exists that would allow the transfer." + ] + }, + { + "name": "WouldDie", + "documentation": [ + " The source account would not survive the transfer and it needs to stay alive." + ] + } + ], + "index": 34 + }, + { + "name": "Mmr", + "storage": { + "prefix": "MerkleMountainRange", + "items": [ + { + "name": "RootHash", + "modifier": "Default", + "type": { + "plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Latest MMR Root hash." + ] + }, + { + "name": "NumberOfLeaves", + "modifier": "Default", + "type": { + "plain": "u64" + }, + "fallback": "0x0000000000000000", + "documentation": [ + " Current size of the MMR (number of leaves)." + ] + }, + { + "name": "Nodes", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "u64", + "value": "Hash", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Hashes of the nodes in the MMR.", + "", + " Note this collection only contains MMR peaks, the inner nodes (and leaves)", + " are pruned and only stored in the Offchain DB." + ] + } + ] + }, + "calls": null, + "events": null, + "constants": [], + "errors": [], + "index": 35 + }, + { + "name": "Lottery", + "storage": { + "prefix": "Lottery", + "items": [ + { + "name": "LotteryIndex", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [] + }, + { + "name": "Lottery", + "modifier": "Optional", + "type": { + "plain": "LotteryConfig" + }, + "fallback": "0x00", + "documentation": [ + " The configuration for the current lottery." + ] + }, + { + "name": "Participants", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(u32,Vec)", + "linked": false + } + }, + "fallback": "0x0000000000", + "documentation": [ + " Users who have purchased a ticket. (Lottery Index, Tickets Purchased)" + ] + }, + { + "name": "TicketsCount", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Total number of tickets sold." + ] + }, + { + "name": "Tickets", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "u32", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Each ticket's owner.", + "", + " May have residual storage from previous lotteries. Use `TicketsCount` to see which ones", + " are actually valid ticket mappings." + ] + }, + { + "name": "CallIndices", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [ + " The calls stored in this pallet to be used in an active lottery if configured", + " by `Config::ValidateCall`." + ] + } + ] + }, + "calls": [ + { + "name": "buy_ticket", + "args": [ + { + "name": "call", + "type": "Call" + } + ], + "documentation": [ + " Buy a ticket to enter the lottery.", + "", + " This extrinsic acts as a passthrough function for `call`. In all", + " situations where `call` alone would succeed, this extrinsic should", + " succeed.", + "", + " If `call` is successful, then we will attempt to purchase a ticket,", + " which may fail silently. To detect success of a ticket purchase, you", + " should listen for the `TicketBought` event.", + "", + " This extrinsic must be called by a signed origin." + ] + }, + { + "name": "set_calls", + "args": [ + { + "name": "calls", + "type": "Vec" + } + ], + "documentation": [ + " Set calls in storage which can be used to purchase a lottery ticket.", + "", + " This function only matters if you use the `ValidateCall` implementation", + " provided by this pallet, which uses storage to determine the valid calls.", + "", + " This extrinsic must be called by the Manager origin." + ] + }, + { + "name": "start_lottery", + "args": [ + { + "name": "price", + "type": "BalanceOf" + }, + { + "name": "length", + "type": "BlockNumber" + }, + { + "name": "delay", + "type": "BlockNumber" + }, + { + "name": "repeat", + "type": "bool" + } + ], + "documentation": [ + " Start a lottery using the provided configuration.", + "", + " This extrinsic must be called by the `ManagerOrigin`.", + "", + " Parameters:", + "", + " * `price`: The cost of a single ticket.", + " * `length`: How long the lottery should run for starting at the current block.", + " * `delay`: How long after the lottery end we should wait before picking a winner.", + " * `repeat`: If the lottery should repeat when completed." + ] + }, + { + "name": "stop_repeat", + "args": [], + "documentation": [ + " If a lottery is repeating, you can use this to stop the repeat.", + " The lottery will continue to run to completion.", + "", + " This extrinsic must be called by the `ManagerOrigin`." + ] + } + ], + "events": [ + { + "name": "LotteryStarted", + "args": [], + "documentation": [ + " A lottery has been started!" + ] + }, + { + "name": "CallsUpdated", + "args": [], + "documentation": [ + " A new set of calls have been set!" + ] + }, + { + "name": "Winner", + "args": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A winner has been chosen!" + ] + }, + { + "name": "TicketBought", + "args": [ + "AccountId", + "CallIndex" + ], + "documentation": [ + " A ticket has been bought!" + ] + } + ], + "constants": [ + { + "name": "PalletId", + "type": "PalletId", + "value": "0x70792f6c6f74746f", + "documentation": [ + " The Lottery's pallet id" + ] + }, + { + "name": "MaxCalls", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " The max number of calls available in a single lottery." + ] + } + ], + "errors": [ + { + "name": "NotConfigured", + "documentation": [ + " A lottery has not been configured." + ] + }, + { + "name": "InProgress", + "documentation": [ + " A lottery is already in progress." + ] + }, + { + "name": "AlreadyEnded", + "documentation": [ + " A lottery has already ended." + ] + }, + { + "name": "InvalidCall", + "documentation": [ + " The call is not valid for an open lottery." + ] + }, + { + "name": "AlreadyParticipating", + "documentation": [ + " You are already participating in the lottery with this call." + ] + }, + { + "name": "TooManyCalls", + "documentation": [ + " Too many calls for a single lottery." + ] + }, + { + "name": "EncodingFailed", + "documentation": [ + " Failed to encode calls" + ] + } + ], + "index": 36 + }, + { + "name": "Gilt", + "storage": { + "prefix": "Gilt", + "items": [ + { + "name": "QueueTotals", + "modifier": "Default", + "type": { + "plain": "Vec<(u32,BalanceOf)>" + }, + "fallback": "0x00", + "documentation": [ + " The totals of items and balances within each queue. Saves a lot of storage reads in the", + " case of sparsely packed queues.", + "", + " The vector is indexed by duration in `Period`s, offset by one, so information on the queue", + " whose duration is one `Period` would be storage `0`." + ] + }, + { + "name": "Queues", + "modifier": "Default", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "u32", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The queues of bids ready to become gilts. Indexed by duration (in `Period`s)." + ] + }, + { + "name": "ActiveTotal", + "modifier": "Default", + "type": { + "plain": "ActiveGiltsTotal" + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " Information relating to the gilts currently active." + ] + }, + { + "name": "Active", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "ActiveIndex", + "value": "ActiveGilt", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " The currently active gilts, indexed according to the order of creation." + ] + } + ] + }, + "calls": [ + { + "name": "place_bid", + "args": [ + { + "name": "amount", + "type": "Compact" + }, + { + "name": "duration", + "type": "u32" + } + ], + "documentation": [ + " Place a bid for a gilt to be issued.", + "", + " Origin must be Signed, and account must have at least `amount` in free balance.", + "", + " - `amount`: The amount of the bid; these funds will be reserved. If the bid is", + " successfully elevated into an issued gilt, then these funds will continue to be", + " reserved until the gilt expires. Must be at least `MinFreeze`.", + " - `duration`: The number of periods for which the funds will be locked if the gilt is", + " issued. It will expire only after this period has elapsed after the point of issuance.", + " Must be greater than 1 and no more than `QueueCount`.", + "", + " Complexities:", + " - `Queues[duration].len()` (just take max)." + ] + }, + { + "name": "retract_bid", + "args": [ + { + "name": "amount", + "type": "Compact" + }, + { + "name": "duration", + "type": "u32" + } + ], + "documentation": [ + " Retract a previously placed bid.", + "", + " Origin must be Signed, and the account should have previously issued a still-active bid", + " of `amount` for `duration`.", + "", + " - `amount`: The amount of the previous bid.", + " - `duration`: The duration of the previous bid." + ] + }, + { + "name": "set_target", + "args": [ + { + "name": "target", + "type": "Compact" + } + ], + "documentation": [ + " Set target proportion of gilt-funds.", + "", + " Origin must be `AdminOrigin`.", + "", + " - `target`: The target proportion of effective issued funds that should be under gilts", + " at any one time." + ] + }, + { + "name": "thaw", + "args": [ + { + "name": "index", + "type": "Compact" + } + ], + "documentation": [ + " Remove an active but expired gilt. Reserved funds under gilt are freed and balance is", + " adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion", + " of effective total issued funds.", + "", + " Origin must be Signed and the account must be the owner of the gilt of the given index.", + "", + " - `index`: The index of the gilt to be thawed." + ] + } + ], + "events": [ + { + "name": "BidPlaced", + "args": [ + "AccountId", + "BalanceOf", + "u32" + ], + "documentation": [ + " A bid was successfully placed.", + " \\[ who, amount, duration \\]" + ] + }, + { + "name": "BidRetracted", + "args": [ + "AccountId", + "BalanceOf", + "u32" + ], + "documentation": [ + " A bid was successfully removed (before being accepted as a gilt).", + " \\[ who, amount, duration \\]" + ] + }, + { + "name": "GiltIssued", + "args": [ + "ActiveIndex", + "BlockNumber", + "AccountId", + "BalanceOf" + ], + "documentation": [ + " A bid was accepted as a gilt. The balance may not be released until expiry.", + " \\[ index, expiry, who, amount \\]" + ] + }, + { + "name": "GiltThawed", + "args": [ + "ActiveIndex", + "AccountId", + "BalanceOf", + "BalanceOf" + ], + "documentation": [ + " An expired gilt has been thawed.", + " \\[ index, who, original_amount, additional_amount \\]" + ] + } + ], + "constants": [ + { + "name": "QueueCount", + "type": "u32", + "value": "0x2c010000", + "documentation": [ + " Number of duration queues in total. This sets the maximum duration supported, which is", + " this value multiplied by `Period`." + ] + }, + { + "name": "MaxQueueLen", + "type": "u32", + "value": "0xe8030000", + "documentation": [ + " Maximum number of items that may be in each duration queue." + ] + }, + { + "name": "FifoQueueLen", + "type": "u32", + "value": "0xf4010000", + "documentation": [ + " Portion of the queue which is free from ordering and just a FIFO.", + "", + " Must be no greater than `MaxQueueLen`." + ] + }, + { + "name": "Period", + "type": "BlockNumber", + "value": "0x002f0d00", + "documentation": [ + " The base period for the duration queues. This is the common multiple across all", + " supported freezing durations that can be bid upon." + ] + }, + { + "name": "MinFreeze", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "documentation": [ + " The minimum amount of funds that may be offered to freeze for a gilt. Note that this", + " does not actually limit the amount which may be frozen in a gilt since gilts may be", + " split up in order to satisfy the desired amount of funds under gilts.", + "", + " It should be at least big enough to ensure that there is no possible storage spam attack", + " or queue-filling attack." + ] + }, + { + "name": "IntakePeriod", + "type": "BlockNumber", + "value": "0x0a000000", + "documentation": [ + " The number of blocks between consecutive attempts to issue more gilts in an effort to", + " get to the target amount to be frozen.", + "", + " A larger value results in fewer storage hits each block, but a slower period to get to", + " the target." + ] + }, + { + "name": "MaxIntakeBids", + "type": "u32", + "value": "0x0a000000", + "documentation": [ + " The maximum amount of bids that can be turned into issued gilts each block. A larger", + " value here means less of the block available for transactions should there be a glut of", + " bids to make into gilts to reach the target." + ] + } + ], + "errors": [ + { + "name": "DurationTooSmall", + "documentation": [ + " The duration of the bid is less than one." + ] + }, + { + "name": "DurationTooBig", + "documentation": [ + " The duration is the bid is greater than the number of queues." + ] + }, + { + "name": "AmountTooSmall", + "documentation": [ + " The amount of the bid is less than the minimum allowed." + ] + }, + { + "name": "BidTooLow", + "documentation": [ + " The queue for the bid's duration is full and the amount bid is too low to get in through", + " replacing an existing bid." + ] + }, + { + "name": "Unknown", + "documentation": [ + " Gilt index is unknown." + ] + }, + { + "name": "NotOwner", + "documentation": [ + " Not the owner of the gilt." + ] + }, + { + "name": "NotExpired", + "documentation": [ + " Gilt not yet at expiry date." + ] + }, + { + "name": "NotFound", + "documentation": [ + " The given bid for retraction is not found." + ] + } + ], + "index": 37 + }, + { + "name": "Uniques", + "storage": { + "prefix": "Uniques", + "items": [ + { + "name": "Class", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "ClassId", + "value": "ClassDetails", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Details of an asset class." + ] + }, + { + "name": "Account", + "modifier": "Optional", + "type": { + "nMap": { + "keyVec": [ + "AccountId", + "ClassId", + "InstanceId" + ], + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat", + "Blake2_128Concat" + ], + "value": "()" + } + }, + "fallback": "0x00", + "documentation": [ + " The assets held by any given account; set out this way so that assets owned by a single", + " account can be enumerated." + ] + }, + { + "name": "Asset", + "modifier": "Optional", + "type": { + "doubleMap": { + "hasher": "Blake2_128Concat", + "key1": "ClassId", + "key2": "InstanceId", + "value": "InstanceDetails", + "key2Hasher": "Blake2_128Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " The assets in existence and their ownership details." + ] + }, + { + "name": "ClassMetadataOf", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "ClassId", + "value": "ClassMetadata", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Metadata of an asset class." + ] + }, + { + "name": "InstanceMetadataOf", + "modifier": "Optional", + "type": { + "doubleMap": { + "hasher": "Blake2_128Concat", + "key1": "ClassId", + "key2": "InstanceId", + "value": "InstanceMetadata", + "key2Hasher": "Blake2_128Concat" + } + }, + "fallback": "0x00", + "documentation": [ + " Metadata of an asset instance." + ] + }, + { + "name": "Attribute", + "modifier": "Optional", + "type": { + "nMap": { + "keyVec": [ + "ClassId", + "Option", + "Bytes" + ], + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat", + "Blake2_128Concat" + ], + "value": "(Bytes,DepositBalanceOf)" + } + }, + "fallback": "0x00", + "documentation": [ + " Metadata of an asset class." + ] + } + ] + }, + "calls": [ + { + "name": "create", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "admin", + "type": "LookupSource" + } + ], + "documentation": [ + " Issue a new class of non-fungible assets from a public origin.", + "", + " This new asset class has no assets initially and its owner is the origin.", + "", + " The origin must be Signed and the sender must have sufficient funds free.", + "", + " `AssetDeposit` funds of sender are reserved.", + "", + " Parameters:", + " - `class`: The identifier of the new asset class. This must not be currently in use.", + " - `admin`: The admin of this class of assets. The admin is the initial address of each", + " member of the asset class's admin team.", + "", + " Emits `Created` event when successful.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "force_create", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "free_holding", + "type": "bool" + } + ], + "documentation": [ + " Issue a new class of non-fungible assets from a privileged origin.", + "", + " This new asset class has no assets initially.", + "", + " The origin must conform to `ForceOrigin`.", + "", + " Unlike `create`, no funds are reserved.", + "", + " - `class`: The identifier of the new asset. This must not be currently in use.", + " - `owner`: The owner of this class of assets. The owner has full superuser permissions", + " over this asset, but may later change and configure the permissions using", + " `transfer_ownership` and `set_team`.", + "", + " Emits `ForceCreated` event when successful.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "destroy", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "witness", + "type": "DestroyWitness" + } + ], + "documentation": [ + " Destroy a class of fungible assets.", + "", + " The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the", + " owner of the asset `class`.", + "", + " - `class`: The identifier of the asset class to be destroyed.", + " - `witness`: Information on the instances minted in the asset class. This must be", + " correct.", + "", + " Emits `Destroyed` event when successful.", + "", + " Weight: `O(n + m)` where:", + " - `n = witness.instances`", + " - `m = witness.instance_metadatas`", + " - `a = witness.attributes`" + ] + }, + { + "name": "mint", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instance", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + } + ], + "documentation": [ + " Mint an asset instance of a particular class.", + "", + " The origin must be Signed and the sender must be the Issuer of the asset `class`.", + "", + " - `class`: The class of the asset to be minted.", + " - `instance`: The instance value of the asset to be minted.", + " - `beneficiary`: The initial owner of the minted asset.", + "", + " Emits `Issued` event when successful.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "burn", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instance", + "type": "Compact" + }, + { + "name": "check_owner", + "type": "Option" + } + ], + "documentation": [ + " Destroy a single asset instance.", + "", + " Origin must be Signed and the sender should be the Admin of the asset `class`.", + "", + " - `class`: The class of the asset to be burned.", + " - `instance`: The instance of the asset to be burned.", + " - `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the", + " asset is owned by this value.", + "", + " Emits `Burned` with the actual amount burned.", + "", + " Weight: `O(1)`", + " Modes: `check_owner.is_some()`." + ] + }, + { + "name": "transfer", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instance", + "type": "Compact" + }, + { + "name": "dest", + "type": "LookupSource" + } + ], + "documentation": [ + " Move an asset from the sender account to another.", + "", + " Origin must be Signed and the signing account must be either:", + " - the Admin of the asset `class`;", + " - the Owner of the asset `instance`;", + " - the approved delegate for the asset `instance` (in this case, the approval is reset).", + "", + " Arguments:", + " - `class`: The class of the asset to be transferred.", + " - `instance`: The instance of the asset to be transferred.", + " - `dest`: The account to receive ownership of the asset.", + "", + " Emits `Transferred`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "redeposit", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instances", + "type": "Vec" + } + ], + "documentation": [ + " Reevaluate the deposits on some assets.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `class`.", + "", + " - `class`: The class of the asset to be frozen.", + " - `instances`: The instances of the asset class whose deposits will be reevaluated.", + "", + " NOTE: This exists as a best-effort function. Any asset instances which are unknown or", + " in the case that the owner account does not have reservable funds to pay for a", + " deposit increase are ignored. Generally the owner isn't going to call this on instances", + " whose existing deposit is less than the refreshed deposit as it would only cost them,", + " so it's of little consequence.", + "", + " It will still return an error in the case that the class is unknown of the signer is", + " not permitted to call it.", + "", + " Weight: `O(instances.len())`" + ] + }, + { + "name": "freeze", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instance", + "type": "Compact" + } + ], + "documentation": [ + " Disallow further unprivileged transfer of an asset instance.", + "", + " Origin must be Signed and the sender should be the Freezer of the asset `class`.", + "", + " - `class`: The class of the asset to be frozen.", + " - `instance`: The instance of the asset to be frozen.", + "", + " Emits `Frozen`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "thaw", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instance", + "type": "Compact" + } + ], + "documentation": [ + " Re-allow unprivileged transfer of an asset instance.", + "", + " Origin must be Signed and the sender should be the Freezer of the asset `class`.", + "", + " - `class`: The class of the asset to be thawed.", + " - `instance`: The instance of the asset to be thawed.", + "", + " Emits `Thawed`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "freeze_class", + "args": [ + { + "name": "class", + "type": "Compact" + } + ], + "documentation": [ + " Disallow further unprivileged transfers for a whole asset class.", + "", + " Origin must be Signed and the sender should be the Freezer of the asset `class`.", + "", + " - `class`: The asset class to be frozen.", + "", + " Emits `ClassFrozen`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "thaw_class", + "args": [ + { + "name": "class", + "type": "Compact" + } + ], + "documentation": [ + " Re-allow unprivileged transfers for a whole asset class.", + "", + " Origin must be Signed and the sender should be the Admin of the asset `class`.", + "", + " - `class`: The class to be thawed.", + "", + " Emits `ClassThawed`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "transfer_ownership", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + } + ], + "documentation": [ + " Change the Owner of an asset class.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `class`.", + "", + " - `class`: The asset class whose owner should be changed.", + " - `owner`: The new Owner of this asset class.", + "", + " Emits `OwnerChanged`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "set_team", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "issuer", + "type": "LookupSource" + }, + { + "name": "admin", + "type": "LookupSource" + }, + { + "name": "freezer", + "type": "LookupSource" + } + ], + "documentation": [ + " Change the Issuer, Admin and Freezer of an asset class.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `class`.", + "", + " - `class`: The asset class whose team should be changed.", + " - `issuer`: The new Issuer of this asset class.", + " - `admin`: The new Admin of this asset class.", + " - `freezer`: The new Freezer of this asset class.", + "", + " Emits `TeamChanged`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "approve_transfer", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instance", + "type": "Compact" + }, + { + "name": "delegate", + "type": "LookupSource" + } + ], + "documentation": [ + " Approve an instance to be transferred by a delegated third-party account.", + "", + " Origin must be Signed and must be the owner of the asset `instance`.", + "", + " - `class`: The class of the asset to be approved for delegated transfer.", + " - `instance`: The instance of the asset to be approved for delegated transfer.", + " - `delegate`: The account to delegate permission to transfer the asset.", + "", + " Emits `ApprovedTransfer` on success.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "cancel_approval", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instance", + "type": "Compact" + }, + { + "name": "maybe_check_delegate", + "type": "Option" + } + ], + "documentation": [ + " Cancel the prior approval for the transfer of an asset by a delegate.", + "", + " Origin must be either:", + " - the `Force` origin;", + " - `Signed` with the signer being the Admin of the asset `class`;", + " - `Signed` with the signer being the Owner of the asset `instance`;", + "", + " Arguments:", + " - `class`: The class of the asset of whose approval will be cancelled.", + " - `instance`: The instance of the asset of whose approval will be cancelled.", + " - `maybe_check_delegate`: If `Some` will ensure that the given account is the one to", + " which permission of transfer is delegated.", + "", + " Emits `ApprovalCancelled` on success.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "force_asset_status", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "issuer", + "type": "LookupSource" + }, + { + "name": "admin", + "type": "LookupSource" + }, + { + "name": "freezer", + "type": "LookupSource" + }, + { + "name": "free_holding", + "type": "bool" + }, + { + "name": "is_frozen", + "type": "bool" + } + ], + "documentation": [ + " Alter the attributes of a given asset.", + "", + " Origin must be `ForceOrigin`.", + "", + " - `class`: The identifier of the asset.", + " - `owner`: The new Owner of this asset.", + " - `issuer`: The new Issuer of this asset.", + " - `admin`: The new Admin of this asset.", + " - `freezer`: The new Freezer of this asset.", + " - `free_holding`: Whether a deposit is taken for holding an instance of this asset", + " class.", + " - `is_frozen`: Whether this asset class is frozen except for permissioned/admin", + " instructions.", + "", + " Emits `AssetStatusChanged` with the identity of the asset.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "set_attribute", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "maybe_instance", + "type": "Option" + }, + { + "name": "key", + "type": "Bytes" + }, + { + "name": "value", + "type": "Bytes" + } + ], + "documentation": [ + " Set an attribute for an asset class or instance.", + "", + " Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", + " asset `class`.", + "", + " If the origin is Signed, then funds of signer are reserved according to the formula:", + " `MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into", + " account any already reserved funds.", + "", + " - `class`: The identifier of the asset class whose instance's metadata to set.", + " - `maybe_instance`: The identifier of the asset instance whose metadata to set.", + " - `key`: The key of the attribute.", + " - `value`: The value to which to set the attribute.", + "", + " Emits `AttributeSet`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "clear_attribute", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "maybe_instance", + "type": "Option" + }, + { + "name": "key", + "type": "Bytes" + } + ], + "documentation": [ + " Set an attribute for an asset class or instance.", + "", + " Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", + " asset `class`.", + "", + " If the origin is Signed, then funds of signer are reserved according to the formula:", + " `MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into", + " account any already reserved funds.", + "", + " - `class`: The identifier of the asset class whose instance's metadata to set.", + " - `instance`: The identifier of the asset instance whose metadata to set.", + " - `key`: The key of the attribute.", + " - `value`: The value to which to set the attribute.", + "", + " Emits `AttributeSet`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "set_metadata", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instance", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + }, + { + "name": "is_frozen", + "type": "bool" + } + ], + "documentation": [ + " Set the metadata for an asset instance.", + "", + " Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", + " asset `class`.", + "", + " If the origin is Signed, then funds of signer are reserved according to the formula:", + " `MetadataDepositBase + DepositPerByte * data.len` taking into", + " account any already reserved funds.", + "", + " - `class`: The identifier of the asset class whose instance's metadata to set.", + " - `instance`: The identifier of the asset instance whose metadata to set.", + " - `data`: The general information of this asset. Limited in length by `StringLimit`.", + " - `is_frozen`: Whether the metadata should be frozen against further changes.", + "", + " Emits `MetadataSet`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "clear_metadata", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "instance", + "type": "Compact" + } + ], + "documentation": [ + " Clear the metadata for an asset instance.", + "", + " Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", + " asset `instance`.", + "", + " Any deposit is freed for the asset class owner.", + "", + " - `class`: The identifier of the asset class whose instance's metadata to clear.", + " - `instance`: The identifier of the asset instance whose metadata to clear.", + "", + " Emits `MetadataCleared`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "set_class_metadata", + "args": [ + { + "name": "class", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + }, + { + "name": "is_frozen", + "type": "bool" + } + ], + "documentation": [ + " Set the metadata for an asset class.", + "", + " Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of", + " the asset `class`.", + "", + " If the origin is `Signed`, then funds of signer are reserved according to the formula:", + " `MetadataDepositBase + DepositPerByte * data.len` taking into", + " account any already reserved funds.", + "", + " - `class`: The identifier of the asset whose metadata to update.", + " - `data`: The general information of this asset. Limited in length by `StringLimit`.", + " - `is_frozen`: Whether the metadata should be frozen against further changes.", + "", + " Emits `ClassMetadataSet`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "clear_class_metadata", + "args": [ + { + "name": "class", + "type": "Compact" + } + ], + "documentation": [ + " Clear the metadata for an asset class.", + "", + " Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of", + " the asset `class`.", + "", + " Any deposit is freed for the asset class owner.", + "", + " - `class`: The identifier of the asset class whose metadata to clear.", + "", + " Emits `ClassMetadataCleared`.", + "", + " Weight: `O(1)`" + ] + } + ], + "events": [ + { + "name": "Created", + "args": [ + "ClassId", + "AccountId", + "AccountId" + ], + "documentation": [ + " An asset class was created. \\[ class, creator, owner \\]" + ] + }, + { + "name": "ForceCreated", + "args": [ + "ClassId", + "AccountId" + ], + "documentation": [ + " An asset class was force-created. \\[ class, owner \\]" + ] + }, + { + "name": "Destroyed", + "args": [ + "ClassId" + ], + "documentation": [ + " An asset `class` was destroyed. \\[ class \\]" + ] + }, + { + "name": "Issued", + "args": [ + "ClassId", + "InstanceId", + "AccountId" + ], + "documentation": [ + " An asset `instace` was issued. \\[ class, instance, owner \\]" + ] + }, + { + "name": "Transferred", + "args": [ + "ClassId", + "InstanceId", + "AccountId", + "AccountId" + ], + "documentation": [ + " An asset `instace` was transferred. \\[ class, instance, from, to \\]" + ] + }, + { + "name": "Burned", + "args": [ + "ClassId", + "InstanceId", + "AccountId" + ], + "documentation": [ + " An asset `instance` was destroyed. \\[ class, instance, owner \\]" + ] + }, + { + "name": "Frozen", + "args": [ + "ClassId", + "InstanceId" + ], + "documentation": [ + " Some asset `instance` was frozen. \\[ class, instance \\]" + ] + }, + { + "name": "Thawed", + "args": [ + "ClassId", + "InstanceId" + ], + "documentation": [ + " Some asset `instance` was thawed. \\[ class, instance \\]" + ] + }, + { + "name": "ClassFrozen", + "args": [ + "ClassId" + ], + "documentation": [ + " Some asset `class` was frozen. \\[ class \\]" + ] + }, + { + "name": "ClassThawed", + "args": [ + "ClassId" + ], + "documentation": [ + " Some asset `class` was thawed. \\[ class \\]" + ] + }, + { + "name": "OwnerChanged", + "args": [ + "ClassId", + "AccountId" + ], + "documentation": [ + " The owner changed \\[ class, new_owner \\]" + ] + }, + { + "name": "TeamChanged", + "args": [ + "ClassId", + "AccountId", + "AccountId", + "AccountId" + ], + "documentation": [ + " The management team changed \\[ class, issuer, admin, freezer \\]" + ] + }, + { + "name": "ApprovedTransfer", + "args": [ + "ClassId", + "InstanceId", + "AccountId", + "AccountId" + ], + "documentation": [ + " An `instance` of an asset `class` has been approved by the `owner` for transfer by a", + " `delegate`.", + " \\[ class, instance, owner, delegate \\]" + ] + }, + { + "name": "ApprovalCancelled", + "args": [ + "ClassId", + "InstanceId", + "AccountId", + "AccountId" + ], + "documentation": [ + " An approval for a `delegate` account to transfer the `instance` of an asset `class` was", + " cancelled by its `owner`.", + " \\[ class, instance, owner, delegate \\]" + ] + }, + { + "name": "AssetStatusChanged", + "args": [ + "ClassId" + ], + "documentation": [ + " An asset `class` has had its attributes changed by the `Force` origin.", + " \\[ class \\]" + ] + }, + { + "name": "ClassMetadataSet", + "args": [ + "ClassId", + "Bytes", + "bool" + ], + "documentation": [ + " New metadata has been set for an asset class. \\[ class, data, is_frozen \\]" + ] + }, + { + "name": "ClassMetadataCleared", + "args": [ + "ClassId" + ], + "documentation": [ + " Metadata has been cleared for an asset class. \\[ class \\]" + ] + }, + { + "name": "MetadataSet", + "args": [ + "ClassId", + "InstanceId", + "Bytes", + "bool" + ], + "documentation": [ + " New metadata has been set for an asset instance.", + " \\[ class, instance, data, is_frozen \\]" + ] + }, + { + "name": "MetadataCleared", + "args": [ + "ClassId", + "InstanceId" + ], + "documentation": [ + " Metadata has been cleared for an asset instance. \\[ class, instance \\]" + ] + }, + { + "name": "Redeposited", + "args": [ + "ClassId", + "Vec" + ], + "documentation": [ + " Metadata has been cleared for an asset instance. \\[ class, successful_instances \\]" + ] + }, + { + "name": "AttributeSet", + "args": [ + "ClassId", + "Option", + "Bytes", + "Bytes" + ], + "documentation": [ + " New attribute metadata has been set for an asset class or instance.", + " \\[ class, maybe_instance, key, value \\]" + ] + }, + { + "name": "AttributeCleared", + "args": [ + "ClassId", + "Option", + "Bytes" + ], + "documentation": [ + " Attribute metadata has been cleared for an asset class or instance.", + " \\[ class, maybe_instance, key, maybe_value \\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "NoPermission", + "documentation": [ + " The signing account has no permission to do the operation." + ] + }, + { + "name": "Unknown", + "documentation": [ + " The given asset ID is unknown." + ] + }, + { + "name": "AlreadyExists", + "documentation": [ + " The asset instance ID has already been used for an asset." + ] + }, + { + "name": "WrongOwner", + "documentation": [ + " The owner turned out to be different to what was expected." + ] + }, + { + "name": "BadWitness", + "documentation": [ + " Invalid witness data given." + ] + }, + { + "name": "InUse", + "documentation": [ + " The asset ID is already taken." + ] + }, + { + "name": "Frozen", + "documentation": [ + " The asset instance or class is frozen." + ] + }, + { + "name": "WrongDelegate", + "documentation": [ + " The delegate turned out to be different to what was expected." + ] + }, + { + "name": "NoDelegate", + "documentation": [ + " There is no delegate approved." + ] + }, + { + "name": "Unapproved", + "documentation": [ + " No approval exists that would allow the transfer." + ] + } + ], + "index": 38 + }, + { + "name": "TransactionStorage", + "storage": { + "prefix": "TransactionStorage", + "items": [ + { + "name": "Transactions", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "BlockNumber", + "value": "Vec", + "linked": false + } + }, + "fallback": "0x00", + "documentation": [ + " Collection of transaction metadata by block number." + ] + }, + { + "name": "ChunkCount", + "modifier": "Default", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "BlockNumber", + "value": "u32", + "linked": false + } + }, + "fallback": "0x00000000", + "documentation": [ + " Count indexed chunks for each block." + ] + }, + { + "name": "ByteFee", + "modifier": "Optional", + "type": { + "plain": "BalanceOf" + }, + "fallback": "0x00", + "documentation": [ + " Storage fee per byte." + ] + }, + { + "name": "EntryFee", + "modifier": "Optional", + "type": { + "plain": "BalanceOf" + }, + "fallback": "0x00", + "documentation": [ + " Storage fee per transaction." + ] + }, + { + "name": "MaxTransactionSize", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Maximum data set in a single transaction in bytes." + ] + }, + { + "name": "MaxBlockTransactions", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "documentation": [ + " Maximum number of indexed transactions in the block." + ] + }, + { + "name": "StoragePeriod", + "modifier": "Default", + "type": { + "plain": "BlockNumber" + }, + "fallback": "0x00000000", + "documentation": [ + " Storage period for data in blocks. Should match `sp_storage_proof::DEFAULT_STORAGE_PERIOD`", + " for block authoring." + ] + }, + { + "name": "BlockTransactions", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "documentation": [] + }, + { + "name": "ProofChecked", + "modifier": "Default", + "type": { + "plain": "bool" + }, + "fallback": "0x00", + "documentation": [ + " Was the proof checked in this block?" + ] + } + ] + }, + "calls": [ + { + "name": "store", + "args": [ + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Index and store data on chain. Minimum data size is 1 bytes, maximum is `MaxTransactionSize`.", + " Data will be removed after `STORAGE_PERIOD` blocks, unless `renew` is called.", + " # ", + " - n*log(n) of data size, as all data is pushed to an in-memory trie.", + " Additionally contains a DB write.", + " # " + ] + }, + { + "name": "renew", + "args": [ + { + "name": "block", + "type": "BlockNumber" + }, + { + "name": "index", + "type": "u32" + } + ], + "documentation": [ + " Renew previously stored data. Parameters are the block number that contains", + " previous `store` or `renew` call and transaction index within that block.", + " Transaction index is emitted in the `Stored` or `Renewed` event.", + " Applies same fees as `store`.", + " # ", + " - Constant.", + " # " + ] + }, + { + "name": "check_proof", + "args": [ + { + "name": "proof", + "type": "TransactionStorageProof" + } + ], + "documentation": [ + " Check storage proof for block number `block_number() - StoragePeriod`.", + " If such block does not exist the proof is expected to be `None`.", + " # ", + " - Linear w.r.t the number of indexed transactions in the proved block for random probing.", + " There's a DB read for each transaction.", + " Here we assume a maximum of 100 probed transactions.", + " # " + ] + } + ], + "events": [ + { + "name": "Stored", + "args": [ + "u32" + ], + "documentation": [ + " Stored data under specified index." + ] + }, + { + "name": "Renewed", + "args": [ + "u32" + ], + "documentation": [ + " Renewed data under specified index." + ] + }, + { + "name": "ProofChecked", + "args": [], + "documentation": [ + " Storage proof was successfully checked." + ] + } + ], + "constants": [], + "errors": [ + { + "name": "InsufficientFunds", + "documentation": [ + " Insufficient account balance." + ] + }, + { + "name": "NotConfigured", + "documentation": [ + " Invalid configuration." + ] + }, + { + "name": "RenewedNotFound", + "documentation": [ + " Renewed extrinsic is not found." + ] + }, + { + "name": "EmptyTransaction", + "documentation": [ + " Attempting to store empty transaction" + ] + }, + { + "name": "UnexpectedProof", + "documentation": [ + " Proof was not expected in this block." + ] + }, + { + "name": "InvalidProof", + "documentation": [ + " Proof failed verification." + ] + }, + { + "name": "MissingProof", + "documentation": [ + " Missing storage proof." + ] + }, + { + "name": "MissingStateData", + "documentation": [ + " Unable to verify proof becasue state data is missing." + ] + }, + { + "name": "DoubleCheck", + "documentation": [ + " Double proof check in the block." + ] + }, + { + "name": "ProofNotChecked", + "documentation": [ + " Storage proof was not checked in the block." + ] + }, + { + "name": "TransactionTooLarge", + "documentation": [ + " Transaction is too large." + ] + }, + { + "name": "TooManyTransactions", + "documentation": [ + " Too many transactions in the block." + ] + }, + { + "name": "BadContext", + "documentation": [ + " Attempted to call `store` outside of block execution." + ] + } + ], + "index": 39 + } + ], + "extrinsic": { + "version": 4, + "signedExtensions": [ + "CheckSpecVersion", + "CheckTxVersion", + "CheckGenesis", + "CheckMortality", + "CheckNonce", + "CheckWeight", + "ChargeTransactionPayment" + ] + } + } + } +} From 1b6f91e5b17a21e64b5780bcdeab5d007fb5f6b3 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Fri, 16 Jul 2021 11:21:53 +0300 Subject: [PATCH 193/237] polkadot: added ss58codec implementation --- packages/polkadot/src/Network/Polkadot.hs | 4 +- .../polkadot/src/Network/Polkadot/Account.hs | 68 +++++++++++++++++-- .../polkadot/src/Network/Polkadot/Crypto.hs | 39 +++++++---- .../Network/Polkadot/Extrinsic/Signature.hs | 25 +++---- .../src/Network/Polkadot/Primitives.hs | 2 +- 5 files changed, 100 insertions(+), 38 deletions(-) diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs index 881dac9a..4eab788f 100644 --- a/packages/polkadot/src/Network/Polkadot.hs +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -22,7 +22,9 @@ module Network.Polkadot ) where import Codec.Scale as Scale -import Network.Polkadot.Crypto as Crypto +import Network.Polkadot.Crypto as Crypto hiding (MultiAddress, + MultiSignature, + MultiSigner) import Network.Polkadot.Primitives as Primitives import Network.Polkadot.Query (query) import Network.Polkadot.Storage.Key (Argument (..)) diff --git a/packages/polkadot/src/Network/Polkadot/Account.hs b/packages/polkadot/src/Network/Polkadot/Account.hs index a8256749..c061dfe9 100644 --- a/packages/polkadot/src/Network/Polkadot/Account.hs +++ b/packages/polkadot/src/Network/Polkadot/Account.hs @@ -1,4 +1,7 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UndecidableInstances #-} -- | -- Module : Network.Polkadot.Account @@ -14,11 +17,16 @@ module Network.Polkadot.Account where +import Codec.Scale (decode, encode) +import Control.Monad ((<=<)) import Data.BigNum (h256) +import Data.Bits (bit, shiftL, shiftR, (.&.), (.|.)) import Data.ByteArray (convert) +import Data.ByteString (ByteString) +import qualified Data.ByteString as BS (drop, length, pack, take) import Data.Digest.Blake2 (blake2_256) import Data.Maybe (fromJust) -import Data.Text (Text) +import Data.Word (Word16) import Network.Polkadot.Primitives (MultiSigner (..)) import qualified Network.Polkadot.Primitives as P (AccountId) @@ -40,15 +48,63 @@ instance IdentifyAccount MultiSigner where into_account Sr25519Signer = error "Sr25519 has no support yet" instance Show MultiSigner where - show = show . into_account + show = show . to_ss58check . into_account -- | Key that can be encoded to/from SS58. -- -- See -- for information on the codec. class Ss58Codec a where - -- | Some if the string is a properly encoded SS58Check address. - from_ss58check :: Text -> Either String a + -- | Some if the string is a properly encoded SS58Check address (default prefix). + from_ss58check :: ByteString -> Either String a + from_ss58check = from_ss58check_with_version 42 + + -- | Return the ss58-check string for this key (default prefix). + to_ss58check :: a -> ByteString + to_ss58check = to_ss58check_with_version 42 -- | Return the ss58-check string for this key. - to_ss58check :: a -> Text + to_ss58check_with_version :: Word16 -> a -> ByteString + + -- | Some if the string is a properly encoded SS58Check address (default prefix). + from_ss58check_with_version :: Word16 -> ByteString -> Either String a + +instance Ss58Codec P.AccountId where + from_ss58check_with_version v = decode <=< from_ss58check_with_version' v <=< from_base58 + to_ss58check_with_version v = to_base58 . to_ss58check_with_version' v . encode + +-- | TODO +to_base58 :: ByteString -> ByteString +to_base58 = id + +-- | TODO +from_base58 :: ByteString -> Either String ByteString +from_base58 = return + +to_ss58check_with_version' :: Word16 -> ByteString -> ByteString +to_ss58check_with_version' v input = encodeVersion v <> input <> ss58hash input + +from_ss58check_with_version' :: Word16 -> ByteString -> Either String ByteString +from_ss58check_with_version' v input = versionGuard >> ss58hashGuard + where + checksumLen = 2 + versionLen | v < 64 = 1 + | otherwise = 2 + inputLen = BS.length input - checksumLen - versionLen + input' = BS.take inputLen (BS.drop versionLen input) + versionGuard + | encodeVersion v == BS.take versionLen input = return () + | otherwise = Left "Bad version" + ss58hashGuard + | ss58hash input' == BS.drop (versionLen + inputLen) input = return input' + | otherwise = Left "Bad checksum" + +ss58hash :: ByteString -> ByteString +ss58hash = BS.take 2 . blake2_256 . ("SS58PRE" <>) + +encodeVersion :: Word16 -> ByteString +encodeVersion v + | v < 64 = BS.pack [fromIntegral v] + | otherwise = let first = bit 6 .|. ((v `shiftR` 2) .&. 63) + second = (v `shiftR` 8) .|. ((v .&. 3) `shiftL` 6) + in BS.pack (fromIntegral <$> [first, second]) diff --git a/packages/polkadot/src/Network/Polkadot/Crypto.hs b/packages/polkadot/src/Network/Polkadot/Crypto.hs index e65bf7fd..427502db 100644 --- a/packages/polkadot/src/Network/Polkadot/Crypto.hs +++ b/packages/polkadot/src/Network/Polkadot/Crypto.hs @@ -14,7 +14,8 @@ module Network.Polkadot.Crypto ( Pair(..) - , MultiPair(multi_address, multi_signer, multi_signature) + , Verify(..) + , MultiPair(..) , Ed25519 , Ecdsa ) where @@ -34,11 +35,10 @@ import Data.ByteArray (ByteArrayAccess) import Data.ByteString (ByteString) import qualified Data.ByteString as BS (last, take) import Data.Maybe (fromJust) -import Data.Proxy (Proxy (..)) import Data.Text (Text) import Data.Word (Word8) -import Network.Polkadot.Account (into_account) +import Network.Polkadot.Account (IdentifyAccount (..)) import qualified Network.Polkadot.Primitives as P (MultiAddress (..), MultiSignature (..), MultiSigner (..)) @@ -61,6 +61,19 @@ class Pair a where -- | Sign a message. sign :: ByteArrayAccess ba => a -> ba -> Signature a +-- | Means of signature verification. +class Verify a where + -- | Verify a message. + verify :: (IdentifyAccount s, ByteArrayAccess ba) + => a + -- ^ Message signature. + -> ba + -- ^ Message content. + -> s + -- ^ Type of the signer. + -> Bool + -- ^ Returns `true` if signature is valid for the value. + -- | Multiple cryptographic type support. class Pair a => MultiPair a where -- | Universal short representation of signer account. @@ -70,11 +83,11 @@ class Pair a => MultiPair a where -- | Universal signature representation. type MultiSignature a -- | Derive universal account address. - multi_address :: Proxy a -> PublicKey a -> MultiAddress a + multi_address :: a -> MultiAddress a -- | Derive universal signer account identifier. - multi_signer :: Proxy a -> PublicKey a -> MultiSigner a - -- | Derive universal signature. - multi_signature :: Proxy a -> Signature a -> MultiSignature a + multi_signer :: a -> MultiSigner a + -- | Sign message and derive universal signature. + multi_sign :: ByteArrayAccess ba => a -> ba -> MultiSignature a -- | Ed25519 cryptographic pair. data Ed25519 = Ed25519 !Ed25519.PublicKey !Ed25519.SecretKey @@ -122,14 +135,14 @@ instance MultiPair Ed25519 where type MultiSigner Ed25519 = P.MultiSigner type MultiAddress Ed25519 = P.MultiAddress type MultiSignature Ed25519 = P.MultiSignature - multi_signer _ = P.Ed25519Signer - multi_address _ = P.MaId . into_account . multi_signer (Proxy :: Proxy Ed25519) - multi_signature _ = P.Ed25519Signature + multi_signer = P.Ed25519Signer . public + multi_address = P.MaId . into_account . multi_signer + multi_sign = (P.Ed25519Signature .) . sign instance MultiPair Ecdsa where type MultiSigner Ecdsa = P.MultiSigner type MultiAddress Ecdsa = P.MultiAddress type MultiSignature Ecdsa = P.MultiSignature - multi_signer _ = P.EcdsaSigner - multi_address _ = P.MaId . into_account . multi_signer (Proxy :: Proxy Ecdsa) - multi_signature _ = uncurry P.EcdsaSignature + multi_signer = P.EcdsaSigner . public + multi_address = P.MaId . into_account . multi_signer + multi_sign = (uncurry P.EcdsaSignature .) . sign diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs index c6bf2a5c..93e5281a 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs @@ -19,27 +19,14 @@ module Network.Polkadot.Extrinsic.Signature where import Codec.Scale (encode) import Codec.Scale.Class (Decode (..), Encode (..)) +import Data.ByteString (ByteString) import Data.Word (Word32) import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) -import Network.Polkadot.Extrinsic.Era (Era) -import Network.Polkadot.Primitives (Balance, Hash, Index, - MultiSignature) - --- A container for the Signature associated with a specific Extrinsic. -{- -data Signature where - Sign :: (Signer a, Encode b) => a -> Payload b -> Signature - Raw :: (Decode s, Decode a) => s -> Payload a -> Signature - -instance Encode Signature where - put s = case s of - Sign s p -> put (sign s $ encode p) >> put p - Raw s p -> put s >> put p -instance Decode Signature where - get = Raw <$> get <*> get --} +import Network.Polkadot.Crypto (MultiPair (MultiSignature, multi_sign)) +import Network.Polkadot.Extrinsic.Era (Era) +import Network.Polkadot.Primitives (Balance, Hash, Index) -- | Extrinsic payload data. data Payload a = Payload @@ -60,3 +47,7 @@ data Payload a = Payload , transactionVersion :: Word32 -- ^ The transactionVersion for this signature. } deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) + +-- | Sign extrinsic payload by account. +signExtrinsic :: (MultiPair a, Encode b) => a -> Payload b -> MultiSignature a +signExtrinsic pair payload = multi_sign pair (encode payload :: ByteString) diff --git a/packages/polkadot/src/Network/Polkadot/Primitives.hs b/packages/polkadot/src/Network/Polkadot/Primitives.hs index cc8ad1e9..2810551a 100644 --- a/packages/polkadot/src/Network/Polkadot/Primitives.hs +++ b/packages/polkadot/src/Network/Polkadot/Primitives.hs @@ -89,4 +89,4 @@ data MultiAddress -- ^ It's a 32 byte representation. | MaAddress20 !H160 -- ^ Its a 20 byte representation. - deriving (Eq, Ord, GHC.Generic, Generic, Encode, Decode) + deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) From 30e5da375e2b3c1ebcff25a9f6fc595db54bedca Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Sun, 1 Aug 2021 16:59:44 +0300 Subject: [PATCH 194/237] polkadot: fix Ss58Codec & added extrinsic signing --- packages/bignum/package.yaml | 2 +- packages/bignum/src/Data/BigNum.hs | 15 ++- packages/crypto/src/Crypto/Ecdsa/Utils.hs | 14 ++- packages/polkadot/package.yaml | 1 + .../polkadot/src/Network/Polkadot/Account.hs | 38 ++++--- .../polkadot/src/Network/Polkadot/Crypto.hs | 32 ++++-- .../src/Network/Polkadot/Extrinsic.hs | 94 +++++++++++++--- .../src/Network/Polkadot/Extrinsic/Era.hs | 33 +++--- .../Network/Polkadot/Extrinsic/Signature.hs | 105 ++++++++++++------ .../src/Network/Polkadot/Primitives.hs | 4 +- .../Network/Polkadot/Test/AccountSpec.hs | 42 +++++++ .../Network/Polkadot/Test/ExtrinsicSpec.hs | 42 +++++++ .../Network/Polkadot/Test/MetadataSpec.hs | 4 +- .../Network/Polkadot/Test/StorageSpec.hs | 2 +- packages/scale/src/Codec/Scale/Core.hs | 10 ++ stack.yaml | 1 + 16 files changed, 331 insertions(+), 108 deletions(-) create mode 100644 packages/polkadot/tests/Network/Polkadot/Test/AccountSpec.hs create mode 100644 packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index 15490a0f..7a6252c1 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -14,7 +14,7 @@ dependencies: - base >4.11 && <4.14 - memory >0.14 && <0.16 - cereal >0.5 && <0.6 -- basement >0.0 && <0.1 +- wide-word >0.1 && <0.2 - web3-scale >=1.0 && <1.1 - web3-hexstring >=1.0 && <1.1 diff --git a/packages/bignum/src/Data/BigNum.hs b/packages/bignum/src/Data/BigNum.hs index b2013aa5..9f6e334e 100644 --- a/packages/bignum/src/Data/BigNum.hs +++ b/packages/bignum/src/Data/BigNum.hs @@ -15,12 +15,10 @@ module Data.BigNum (Word256, Word128, H160, h160, H256, h256, H512, h512) where -import Basement.Block (Block) -import Basement.Types.Word128 (Word128 (..)) -import Basement.Types.Word256 (Word256 (..)) import Codec.Scale () import Codec.Scale.Class (Decode (..), Encode (..)) -import Data.ByteArray (ByteArrayAccess, convert) +import Data.ByteArray (ByteArrayAccess, Bytes, + convert) import qualified Data.ByteArray as A (length) import Data.ByteArray.HexString.Convert (FromHex (..), ToHex (..), fromBytes) @@ -28,7 +26,8 @@ import Data.Maybe (fromJust) import Data.Serialize.Get (getByteString) import Data.Serialize.Put (putByteString) import Data.String (IsString (..)) -import Data.Word (Word8) +import Data.WideWord.Word128 (Word128 (..)) +import Data.WideWord.Word256 (Word256 (..)) instance Encode Word128 where put (Word128 l h)= put h >> put l @@ -52,7 +51,7 @@ instance Decode Word256 where return (Word256 lx hx l h) -- | 20 byte of data. -newtype H160 = H160 (Block Word8) +newtype H160 = H160 Bytes deriving (Eq, Ord, ByteArrayAccess) -- | Convert any 20 byte array into H160 type, otherwise returns Nothing. @@ -82,7 +81,7 @@ instance Decode H160 where get = (fromJust . h160) <$> getByteString 20 -- | 32 byte of data. -newtype H256 = H256 (Block Word8) +newtype H256 = H256 Bytes deriving (Eq, Ord, ByteArrayAccess) -- | Convert any 32 byte array into H256 type, otherwise returns Nothing. @@ -112,7 +111,7 @@ instance Decode H256 where get = (fromJust . h256) <$> getByteString 32 -- | 64 byte of data. -newtype H512 = H512 (Block Word8) +newtype H512 = H512 Bytes deriving (Eq, Ord, ByteArrayAccess) -- | Convert any 64 byte array into H512 type, otherwise returns Nothing. diff --git a/packages/crypto/src/Crypto/Ecdsa/Utils.hs b/packages/crypto/src/Crypto/Ecdsa/Utils.hs index 224ae4cf..eeb67777 100644 --- a/packages/crypto/src/Crypto/Ecdsa/Utils.hs +++ b/packages/crypto/src/Crypto/Ecdsa/Utils.hs @@ -17,7 +17,8 @@ import Crypto.PubKey.ECC.ECDSA (PrivateKey (..), PublicKey (..)) import Crypto.PubKey.ECC.Generate (generateQ) import Crypto.PubKey.ECC.Types (CurveName (SEC_p256k1), Point (..), getCurveByName) -import Data.ByteArray (ByteArray, ByteArrayAccess) +import Data.ByteArray (ByteArray, ByteArrayAccess, + singleton) -- | Import ECDSA private key from byte array. -- @@ -40,6 +41,13 @@ derivePubKey (PrivateKey curve p) = PublicKey curve (generateQ curve p) -- | Export public key to byte array (64 byte length). exportPubKey :: ByteArray publicKey => PublicKey -> publicKey -{-# INLINE exportPubKey #-} -exportPubKey (PublicKey _ (Point x y)) = i2osp x <> i2osp y exportPubKey (PublicKey _ PointO) = mempty +exportPubKey (PublicKey _ (Point x y)) = i2osp x <> i2osp y + +-- | Export compressed public key to byte array (33 byte length). +exportPubKeyCompress :: ByteArray publicKey => PublicKey -> publicKey +exportPubKeyCompress (PublicKey _ PointO) = mempty +exportPubKeyCompress (PublicKey _ (Point x y)) = prefix <> i2osp x + where + prefix | even y = singleton 0x02 + | otherwise = singleton 0x03 diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 1025bdd7..03d14e48 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -21,6 +21,7 @@ dependencies: - containers >0.6 && <0.7 - cryptonite >0.22 && <0.28 - bytestring >0.10 && <0.11 +- base58-bytestring >=0.1 && <0.2 - animalcase >0.1 && <0.2 - generics-sop >0.3 && <0.6 - microlens-th >0.4 && <0.5 diff --git a/packages/polkadot/src/Network/Polkadot/Account.hs b/packages/polkadot/src/Network/Polkadot/Account.hs index c061dfe9..0e6269b0 100644 --- a/packages/polkadot/src/Network/Polkadot/Account.hs +++ b/packages/polkadot/src/Network/Polkadot/Account.hs @@ -1,7 +1,6 @@ -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeFamilies #-} -- | -- Module : Network.Polkadot.Account @@ -15,16 +14,18 @@ -- Polkadot account types. -- -module Network.Polkadot.Account where +module Network.Polkadot.Account (Ss58Codec(..), IdentifyAccount(..)) where import Codec.Scale (decode, encode) import Control.Monad ((<=<)) import Data.BigNum (h256) import Data.Bits (bit, shiftL, shiftR, (.&.), (.|.)) -import Data.ByteArray (convert) +import Data.ByteArray (cons, convert) import Data.ByteString (ByteString) import qualified Data.ByteString as BS (drop, length, pack, take) -import Data.Digest.Blake2 (blake2_256) +import Data.ByteString.Base58 (bitcoinAlphabet, decodeBase58, + encodeBase58) +import Data.Digest.Blake2 (blake2_256, blake2_512) import Data.Maybe (fromJust) import Data.Word (Word16) @@ -44,7 +45,7 @@ class IdentifyAccount a where instance IdentifyAccount MultiSigner where type AccountId MultiSigner = P.AccountId into_account (Ed25519Signer pub) = fromJust (h256 pub) - into_account (EcdsaSigner pub) = fromJust (h256 $ blake2_256 $ convert pub) + into_account (EcdsaSigner px pub) = fromJust (h256 $ blake2_256 $ cons px $ convert pub) into_account Sr25519Signer = error "Sr25519 has no support yet" instance Show MultiSigner where @@ -73,16 +74,16 @@ instance Ss58Codec P.AccountId where from_ss58check_with_version v = decode <=< from_ss58check_with_version' v <=< from_base58 to_ss58check_with_version v = to_base58 . to_ss58check_with_version' v . encode --- | TODO to_base58 :: ByteString -> ByteString -to_base58 = id +to_base58 = encodeBase58 bitcoinAlphabet --- | TODO from_base58 :: ByteString -> Either String ByteString -from_base58 = return +from_base58 = maybe (Left "Bad encoding") Right . decodeBase58 bitcoinAlphabet to_ss58check_with_version' :: Word16 -> ByteString -> ByteString -to_ss58check_with_version' v input = encodeVersion v <> input <> ss58hash input +to_ss58check_with_version' v input = out <> ss58hash out + where + out = encode_version v <> input from_ss58check_with_version' :: Word16 -> ByteString -> Either String ByteString from_ss58check_with_version' v input = versionGuard >> ss58hashGuard @@ -93,17 +94,18 @@ from_ss58check_with_version' v input = versionGuard >> ss58hashGuard inputLen = BS.length input - checksumLen - versionLen input' = BS.take inputLen (BS.drop versionLen input) versionGuard - | encodeVersion v == BS.take versionLen input = return () + | encode_version v == BS.take versionLen input = return () | otherwise = Left "Bad version" ss58hashGuard - | ss58hash input' == BS.drop (versionLen + inputLen) input = return input' + | ss58hash (BS.take (versionLen + inputLen) input) + == BS.drop (versionLen + inputLen) input = return input' | otherwise = Left "Bad checksum" ss58hash :: ByteString -> ByteString -ss58hash = BS.take 2 . blake2_256 . ("SS58PRE" <>) +ss58hash = BS.take 2 . blake2_512 . ("SS58PRE" <>) -encodeVersion :: Word16 -> ByteString -encodeVersion v +encode_version :: Word16 -> ByteString +encode_version v | v < 64 = BS.pack [fromIntegral v] | otherwise = let first = bit 6 .|. ((v `shiftR` 2) .&. 63) second = (v `shiftR` 8) .|. ((v .&. 3) `shiftL` 6) diff --git a/packages/polkadot/src/Network/Polkadot/Crypto.hs b/packages/polkadot/src/Network/Polkadot/Crypto.hs index 427502db..a684ac00 100644 --- a/packages/polkadot/src/Network/Polkadot/Crypto.hs +++ b/packages/polkadot/src/Network/Polkadot/Crypto.hs @@ -21,7 +21,10 @@ module Network.Polkadot.Crypto ) where import qualified Crypto.Ecdsa.Signature as Ecdsa (pack, sign) -import Crypto.Ecdsa.Utils (exportPubKey) +import Crypto.Ecdsa.Utils as Ecdsa (derivePubKey, + exportPubKeyCompress, + importKey) +import Crypto.Error (CryptoFailable (..)) import qualified Crypto.PubKey.ECC.ECDSA as Ecdsa (PrivateKey (..), PublicKey (..)) import qualified Crypto.PubKey.ECC.Generate as Ecdsa (generate) @@ -29,9 +32,11 @@ import Crypto.PubKey.ECC.Types (CurveName (SEC_p256k1), getCurveByName) import qualified Crypto.PubKey.Ed25519 as Ed25519 (PublicKey, SecretKey, generateSecretKey, - sign, toPublic) + secretKey, sign, + toPublic) import Data.BigNum (H256, H512, h256, h512) -import Data.ByteArray (ByteArrayAccess) +import Data.ByteArray (ByteArrayAccess, uncons) +import qualified Data.ByteArray as BA (length) import Data.ByteString (ByteString) import qualified Data.ByteString as BS (last, take) import Data.Maybe (fromJust) @@ -53,7 +58,7 @@ class Pair a where -- | Generate new secure (random) key pair. generate :: IO a -- | Generate new key pair from the provided `seed`. - from_seed :: ByteArrayAccess ba => ba -> a + from_seed :: ByteArrayAccess ba => ba -> Either String a -- | Generate key pair from given recovery phrase and password. from_phrase :: Text -> Maybe Text -> Either String a -- | Get a public key. @@ -102,7 +107,9 @@ instance Pair Ed25519 where generate = do sec <- Ed25519.generateSecretKey return $ Ed25519 (Ed25519.toPublic sec) sec - from_seed = undefined + from_seed seed = case Ed25519.secretKey seed of + CryptoPassed sec -> Right $ Ed25519 (Ed25519.toPublic sec) sec + CryptoFailed e -> Left (show e) from_phrase = undefined public (Ed25519 pub _) = fromJust $ h256 pub sign (Ed25519 pub sec) input = ed25519_sign sec pub input @@ -115,12 +122,19 @@ instance Show Ecdsa where show = ("Ecdsa " ++) . show . public instance Pair Ecdsa where - type PublicKey Ecdsa = H512 + type PublicKey Ecdsa = (Word8, H256) type Signature Ecdsa = (H512, Word8) generate = uncurry Ecdsa <$> Ecdsa.generate (getCurveByName SEC_p256k1) - from_seed = undefined + from_seed seed + | BA.length seed == 32 = let sec = Ecdsa.importKey seed + in Right $ Ecdsa (Ecdsa.derivePubKey sec) sec + | otherwise = Left "Seed should be 32 byte length" from_phrase = undefined - public (Ecdsa pub _) = fromJust $ h512 (exportPubKey pub :: ByteString) + public (Ecdsa pub _) = pack $ uncons $ Ecdsa.exportPubKeyCompress pub + where + pack :: Maybe (Word8, ByteString) -> (Word8, H256) + pack (Just (px, key)) = (px, fromJust (h256 key)) + pack _ = error "impossible branch" sign (Ecdsa _ sec) input = ecdsa_sign sec input ed25519_sign :: ByteArrayAccess a => Ed25519.SecretKey -> Ed25519.PublicKey -> a -> H512 @@ -143,6 +157,6 @@ instance MultiPair Ecdsa where type MultiSigner Ecdsa = P.MultiSigner type MultiAddress Ecdsa = P.MultiAddress type MultiSignature Ecdsa = P.MultiSignature - multi_signer = P.EcdsaSigner . public + multi_signer = uncurry P.EcdsaSigner . public multi_address = P.MaId . into_account . multi_signer multi_sign = (uncurry P.EcdsaSignature .) . sign diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs index 6deb823b..b5ab76e6 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs @@ -1,4 +1,6 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE ScopedTypeVariables #-} -- | -- Module : Network.Polkadot.Extrinsic @@ -14,23 +16,83 @@ module Network.Polkadot.Extrinsic where -import Codec.Scale (encode) -import Codec.Scale.Class (Decode (..), Encode (..)) -import Data.ByteString (ByteString) -import Network.Polkadot.Primitives (MultiSignature) ---import Network.Polkadot.Extrinsic.Signature (Signature) +import Codec.Scale (encode) +import Codec.Scale.Class (Decode (..), Encode (..)) +import Control.Arrow ((&&&)) +import Control.Monad (when) +import Data.Bits (clearBit, setBit, + testBit) +import Data.ByteArray.HexString (HexString) +import Data.ByteString (ByteString) +import Data.Word (Word8) --- | The third generation of compact extrinsics. -data Extrinsic = Extrinsic !ByteString !(Maybe MultiSignature) +--import Network.Polkadot.Extrinsic.Extra (PolkadotExtra) +import Network.Polkadot.Crypto (MultiPair (..)) +import Network.Polkadot.Extrinsic.Signature (SignedExtension, + SignedPayload (..), + sign_payload) -instance Encode Extrinsic where - put xt = put encoded -- put lenght-prefixed extrinsic +-- | Current version of the 'UncheckedExtrinsic' format. +extrinsic_version :: Word8 +extrinsic_version = 4 + +-- | Default Polkadot compatible extrinsic type. +--type Extrinsic a = UncheckedExtrinsic a MultiAddress MultiSignature Extra + +-- | A extrinsic right from the external world. This is unchecked and so +-- can contain a signature. +data UncheckedExtrinsic c a s e + = UncheckedExtrinsic + { extrinsicSignature :: !(Maybe (a, s, e)) + -- ^ The signature, address, number of extrinsics have come before from + -- the same signer and an era describing the longevity of this transaction, + -- if this is a signed extrinsic. + , extrinsicFunction :: !c + -- ^ The function that should be called. + } + +instance Encode c => Show (UncheckedExtrinsic c a b c) where + show (UncheckedExtrinsic _ call) = "UncheckedExtrinsic " ++ show encoded + where + encoded :: HexString + encoded = encode call + +instance (Encode c, Encode (a, s, e)) => Encode (UncheckedExtrinsic c a s e) where + put xt = put encoded where encoded :: ByteString encoded = case xt of - Extrinsic call Nothing -> - let version = "\x04" -- V4, signed bit unset - in version <> encode call - Extrinsic call (Just sig) -> - let version = "\x84" -- V4, signed bit set - in version <> encode sig <> encode call + UncheckedExtrinsic Nothing call + -> encode extrinsic_version <> encode call + UncheckedExtrinsic (Just s) call + -> encode (setBit extrinsic_version 7) <> encode s <> encode call + +instance (Decode c, Decode (a, s, e)) => Decode (UncheckedExtrinsic c a s e) where + get = do + (_v :: [()]) <- get + (signed, version) <- (flip testBit 7 &&& flip clearBit 7) <$> get + when (version /= extrinsic_version) $ fail "bad version" + UncheckedExtrinsic + <$> (if signed then fmap Just get else return Nothing) + <*> get + +-- | New instance of a signed extrinsic aka "transaction". +new_signed :: c -> a -> s -> e -> UncheckedExtrinsic c a s e +new_signed call address sig extra = UncheckedExtrinsic (Just (address, sig, extra)) call + +-- | New instance of an unsigned extrinsic aka "inherent". +new_unsigned :: f -> UncheckedExtrinsic f a b c +new_unsigned = UncheckedExtrinsic Nothing + +-- | Create and sign extrinsic by account. +sign_extrinsic :: (MultiPair a, Encode c, SignedExtension e) + => a + -- ^ Account to sign extrinsic. + -> c + -- ^ Function to call on runtime. + -> e + -- ^ Additional data to sign like nonce, blockhash, etc. + -> UncheckedExtrinsic c (MultiAddress a) (MultiSignature a) e +sign_extrinsic a c e = new_signed c (multi_address a) sig e + where + sig = sign_payload a $ SignedPayload (c, e) diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs index 80541875..d750530c 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs @@ -14,12 +14,13 @@ module Network.Polkadot.Extrinsic.Era ( Era(..) + , mkMortal ) where import Codec.Scale.Class (Decode (..), Encode (..)) import Codec.Scale.Core () import Data.Bits (shiftL, shiftR) -import Data.Word (Word16, Word8) +import Data.Word (Word16, Word8, byteSwap16) -- | The era for an extrinsic, indicating either a mortal or immortal extrinsic. data Era @@ -34,23 +35,20 @@ data Era instance Decode Era where get = do - ix <- get - case ix :: Word8 of + first <- get + case first :: Word8 of 0 -> return ImmortalEra - 1 -> getMortal <$> get - _ -> fail "wrong extrinsic era enum" + _ -> decodeMortal first <$> get where - getMortal :: Word16 -> Era - getMortal encoded = MortalEra period phase - where - era = fromIntegral (encoded :: Word16) - period = 2 `shiftL` (era `rem` 16) - quantizeFactor = max (period `shiftR` 12) 1 - phase = (era `shiftR` 4) * quantizeFactor + decodeMortal :: Word8 -> Word8 -> Era + decodeMortal first second = + let first' = fromIntegral first + second' = fromIntegral second + in mkMortal (first' + second' `shiftL` 8) instance Encode Era where put ImmortalEra = put (0 :: Word8) - put MortalEra{..} = put (1 :: Word8) >> put encoded + put MortalEra{..} = put encoded where encoded :: Word16 encoded = min 15 (max 1 (getTrailingZeros period - 1)) + ((phase `div` quantizeFactor) `shiftL` 4) @@ -58,6 +56,15 @@ instance Encode Era where period = fromIntegral mortalEraPeriod phase = fromIntegral mortalEraPhase +mkMortal :: Word16 -> Era +mkMortal raw = MortalEra period phase + where + encoded = byteSwap16 raw + era = fromIntegral encoded + period = 2 `shiftL` (era `rem` 16) + quantizeFactor = max (period `shiftR` 12) 1 + phase = (era `shiftR` 4) * quantizeFactor + getTrailingZeros :: Integral a => a -> a getTrailingZeros = foldl zero 0 . takeWhile (> 0) . iterate (`div` 2) where diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs index 93e5281a..391c6753 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs @@ -1,7 +1,5 @@ -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE GADTs #-} -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE TypeFamilies #-} -- | -- Module : Network.Polkadot.Extrinsic.Signature @@ -17,37 +15,72 @@ module Network.Polkadot.Extrinsic.Signature where -import Codec.Scale (encode) -import Codec.Scale.Class (Decode (..), Encode (..)) -import Data.ByteString (ByteString) -import Data.Word (Word32) -import Generics.SOP (Generic) -import qualified GHC.Generics as GHC (Generic) - -import Network.Polkadot.Crypto (MultiPair (MultiSignature, multi_sign)) -import Network.Polkadot.Extrinsic.Era (Era) -import Network.Polkadot.Primitives (Balance, Hash, Index) - --- | Extrinsic payload data. -data Payload a = Payload - { blockHash :: Hash - -- ^ The block 'Hash' the signature applies to (mortal/immortal). - , era :: Era - -- ^ The 'Era' of extrinsic. - , genesisHash :: Hash - -- ^ The genesis 'Hash' the signature applies to (mortal/immortal). - , method :: a - -- ^ The encoded method contained in the payload. - , nonce :: Index - -- ^ Transaction number that can only be used once. - , specVersion :: Word32 - -- ^ The specVersion for this signature. - , tip :: Balance - -- ^ Additional incentive for validator to include this trasaction into block. - , transactionVersion :: Word32 - -- ^ The transactionVersion for this signature. - } deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) +import Codec.Scale (Decode, encode) +import Codec.Scale.Class (Encode (..)) +import Data.ByteString (ByteString) +import qualified Data.ByteString as BS (length) +import Data.Digest.Blake2 (blake2_256) + +import Network.Polkadot.Crypto (MultiPair (MultiSignature, multi_sign)) + +-- | A payload that has been signed for an unchecked extrinsics. +-- +-- Note that the payload that we sign to produce unchecked extrinsic signature +-- is going to be different than the `SignaturePayload` - so the thing the extrinsic +-- actually contains. +newtype SignedPayload call extra = SignedPayload (call, extra) + +instance (Encode c, SignedExtension e) => Encode (SignedPayload c e) where + put (SignedPayload (call, extra)) + | BS.length encoded > 256 = put (blake2_256 encoded) + | otherwise = put encoded + where + encoded = encode (call, extra, additional_signed extra) + +-- | Means by which a transaction may be extended. This type embodies both the data and the logic +-- that should be additionally associated with the transaction. It should be plain old data. +class (Encode a, Decode a, Encode (AdditionalSigned a), Decode (AdditionalSigned a)) + => SignedExtension a where + -- | Any additional data that will go into the signed payload. This may be created dynamically + -- from the transaction using the `additional_signed` function. + type AdditionalSigned a + + -- | Construct any additional data that should be in the signed payload of the transaction. Can + -- also perform any pre-signature-verification checks and return an error if needed. + additional_signed :: a -> AdditionalSigned a + +instance SignedExtension () where + type AdditionalSigned () = () + additional_signed _ = () + +instance (SignedExtension a, SignedExtension b) => SignedExtension (a, b) where + type AdditionalSigned (a, b) = (AdditionalSigned a, AdditionalSigned b) + additional_signed (a, b) = (additional_signed a, additional_signed b) + +instance (SignedExtension a, SignedExtension b, SignedExtension c) => SignedExtension (a, b, c) where + type AdditionalSigned (a, b, c) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c) + additional_signed (a, b, c) = (additional_signed a, additional_signed b, additional_signed c) + +instance (SignedExtension a, SignedExtension b, SignedExtension c, SignedExtension d) => SignedExtension (a, b, c, d) where + type AdditionalSigned (a, b, c, d) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c, AdditionalSigned d) + additional_signed (a, b, c, d) = (additional_signed a, additional_signed b, additional_signed c, additional_signed d) + +instance (SignedExtension a, SignedExtension b, SignedExtension c, SignedExtension d, SignedExtension e) => SignedExtension (a, b, c, d, e) where + type AdditionalSigned (a, b, c, d, e) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c, AdditionalSigned d, AdditionalSigned e) + additional_signed (a, b, c, d, e) = (additional_signed a, additional_signed b, additional_signed c, additional_signed d, additional_signed e) + +instance (SignedExtension a, SignedExtension b, SignedExtension c, SignedExtension d, SignedExtension e, SignedExtension f) => SignedExtension (a, b, c, d, e, f) where + type AdditionalSigned (a, b, c, d, e, f) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c, AdditionalSigned d, AdditionalSigned e, AdditionalSigned f) + additional_signed (a, b, c, d, e, f) = (additional_signed a, additional_signed b, additional_signed c, additional_signed d, additional_signed e, additional_signed f) + +instance (SignedExtension a, SignedExtension b, SignedExtension c, SignedExtension d, SignedExtension e, SignedExtension f, SignedExtension g) => SignedExtension (a, b, c, d, e, f, g) where + type AdditionalSigned (a, b, c, d, e, f, g) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c, AdditionalSigned d, AdditionalSigned e, AdditionalSigned f, AdditionalSigned g) + additional_signed (a, b, c, d, e, f, g) = (additional_signed a, additional_signed b, additional_signed c, additional_signed d, additional_signed e, additional_signed f, additional_signed g) + -- | Sign extrinsic payload by account. -signExtrinsic :: (MultiPair a, Encode b) => a -> Payload b -> MultiSignature a -signExtrinsic pair payload = multi_sign pair (encode payload :: ByteString) +sign_payload :: (MultiPair a, Encode c, SignedExtension e) + => a + -> SignedPayload c e + -> MultiSignature a +sign_payload pair payload = multi_sign pair (encode payload :: ByteString) diff --git a/packages/polkadot/src/Network/Polkadot/Primitives.hs b/packages/polkadot/src/Network/Polkadot/Primitives.hs index 2810551a..d2915e48 100644 --- a/packages/polkadot/src/Network/Polkadot/Primitives.hs +++ b/packages/polkadot/src/Network/Polkadot/Primitives.hs @@ -21,8 +21,8 @@ import Codec.Scale.Compact (Compact) import Data.BigNum (H160, H256, H512, Word128) import Data.ByteArray.HexString (HexString) import Data.Word (Word32, Word64, Word8) -import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) +import Generics.SOP (Generic) -- | The user account balance, 'u128' type. type Balance = Word128 @@ -73,7 +73,7 @@ data MultiSigner -- ^ sr25519 crypto has no support yet | Ed25519Signer !H256 -- ^ Ed25519 public key. - | EcdsaSigner !H512 + | EcdsaSigner !Word8 !H256 -- ^ ECDSA public key. deriving (Eq, Ord, GHC.Generic, Generic, Encode, Decode) diff --git a/packages/polkadot/tests/Network/Polkadot/Test/AccountSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/AccountSpec.hs new file mode 100644 index 00000000..3d7c2eea --- /dev/null +++ b/packages/polkadot/tests/Network/Polkadot/Test/AccountSpec.hs @@ -0,0 +1,42 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} + +-- | +-- Module : Network.Polkadot.Test.AccountSpec +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- + +module Network.Polkadot.Test.AccountSpec where + +import Data.ByteArray.HexString.TH (hex) +import Test.Hspec + +import Network.Polkadot.Account +import Network.Polkadot.Crypto + +spec :: Spec +spec = parallel $ do + let alice :: Ecdsa + Right alice = from_seed [hex|0x8beef718111d62174809fc2b332c14471f6038404c5cee7b33ac2573ba60ed06|] + let bob :: Ed25519 + Right bob = from_seed [hex|0xbd4e72a17a76b43ab59e7733cd0818d47c2e0ebcf88bfc5fb0192c8ee520c7d1|] + + describe "Public" $ do + it "Ecdsa" $ + show (public alice) `shouldBe` "(2,0xc96289d7426111e7ec5cbb90d7d201ab0b3d7ab17166826ae4ff27cb0c6d3f23)" + it "Ed25519" $ + show (public bob) `shouldBe` "0x8a016b9a1ca3709974ed7b1e1c79d6ed0f795899d212edc189cdb31318fec607" + + describe "Ss58Codec" $ do + it "Ecdsa" $ + to_ss58check (into_account $ multi_signer alice) + `shouldBe` "5EWfGfxVbLK2upe3Zfcqo9ZtALArwLgxkwcZaT3gMujmmFxU" + it "Ed25519" $ + to_ss58check (into_account $ multi_signer bob) + `shouldBe` "5FBetQhjRiJMfqqMU3f4cz8ho4majAPLzuZSdmxwxPtQTZ8V" diff --git a/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs new file mode 100644 index 00000000..cffa208d --- /dev/null +++ b/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs @@ -0,0 +1,42 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} + +-- | +-- Module : Network.Polkadot.Test.ExtrinsicSpec +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- + +module Network.Polkadot.Test.ExtrinsicSpec where + +import Codec.Scale (Compact (..), decode) +import Data.ByteArray.HexString.TH (hex) +import Test.Hspec + +import Network.Polkadot.Extrinsic.Era (Era (..), mkMortal) + +spec :: Spec +spec = parallel $ do + describe "Era" $ do + it "decodes an Extrinsic Era with immortal" $ + decode [hex|0x00|] `shouldBe` Right ImmortalEra + + it "creates from an actual valid era" $ + mkMortal 0xc503 `shouldBe` MortalEra 64 60 + + it "creates for an actual era (2)" $ + mkMortal 0x8502 `shouldBe` MortalEra 64 40 + + it "creates form an actual era (3)" $ + mkMortal 0x6502 `shouldBe` MortalEra 64 38 + + it "creates from a actual 100 block hash count" $ + mkMortal 0xd607 `shouldBe` MortalEra 128 125 + + it "creates from a actual 2400 block hash count" $ + mkMortal 0x9be3 `shouldBe` MortalEra 4096 3641 diff --git a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs index ad268c19..cd28e760 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs @@ -2,7 +2,7 @@ {-# LANGUAGE QuasiQuotes #-} -- | --- Module : Codec.Scale.Test.MetadataSpec +-- Module : Network.Polkadot.Test.MetadataSpec -- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- @@ -67,6 +67,7 @@ spec = parallel $ do Right json <- eitherDecodeFileStrict "tests/meta/v12.json" toJSON meta `shouldBeJson` json +{- describe "Metadata V13" $ do it "succeeds decode from hex and json" $ do let Left e = decode [hexFrom|tests/meta/v13.hex|] :: Either String Metadata @@ -75,3 +76,4 @@ spec = parallel $ do (meta, _) = metadataTypes hex Right json <- eitherDecodeFileStrict "tests/meta/v13.json" toJSON meta `shouldBeJson` json +-} diff --git a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs index 0a939caa..01eafaea 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs @@ -2,7 +2,7 @@ {-# LANGUAGE QuasiQuotes #-} -- | --- Module : Codec.Scale.Test.StorageSpec +-- Module : Network.Polkadot.Test.StorageSpec -- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- diff --git a/packages/scale/src/Codec/Scale/Core.hs b/packages/scale/src/Codec/Scale/Core.hs index 0e2ed63f..f9a769a7 100644 --- a/packages/scale/src/Codec/Scale/Core.hs +++ b/packages/scale/src/Codec/Scale/Core.hs @@ -39,6 +39,16 @@ import Codec.Scale.Compact (Compact (..)) import Codec.Scale.Generic () import Codec.Scale.TH (tupleInstances) +-- +-- Empty instance. +-- + +instance Encode () where + put = return + +instance Decode () where + get = return () + -- -- Boolean instance. -- diff --git a/stack.yaml b/stack.yaml index 33786ce0..dc0377ef 100644 --- a/stack.yaml +++ b/stack.yaml @@ -21,6 +21,7 @@ packages: # Extra package dependencies extra-deps: - hspec-expectations-json-1.0.0.2@sha256:a8c771b7a5449ef600c984d596304ebace8e109f5830f5351566a4d13c0072d4 +- base58-bytestring-0.1.0@sha256:a1da72ee89d5450bac1c792d9fcbe95ed7154ab7246f2172b57bd4fd9b5eab79 - animalcase-0.1.0.2@sha256:d7b80c3130c68d7ce8ddd9782588b2c4dd7da86461f302c54cc4acddf0902b51 - relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c - vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c From dddad942ddad912923841a84037810987e06c77d Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Aug 2021 06:46:52 +0300 Subject: [PATCH 195/237] polkadot: added signed extensions --- packages/polkadot/src/Network/Polkadot.hs | 3 + .../src/Network/Polkadot/Extrinsic.hs | 154 +++++++++--------- .../src/Network/Polkadot/Extrinsic/Era.hs | 59 ++++--- .../src/Network/Polkadot/Extrinsic/Payload.hs | 42 +++++ .../{Signature.hs => SignedExtension.hs} | 79 ++++----- .../Extrinsic/SignedExtension/System.hs | 81 +++++++++ .../SignedExtension/TransactionPayment.hs | 33 ++++ .../Network/Polkadot/Extrinsic/Unchecked.hs | 100 ++++++++++++ .../Network/Polkadot/Test/ExtrinsicSpec.hs | 12 +- 9 files changed, 419 insertions(+), 144 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs rename packages/polkadot/src/Network/Polkadot/Extrinsic/{Signature.hs => SignedExtension.hs} (53%) create mode 100644 packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/TransactionPayment.hs create mode 100644 packages/polkadot/src/Network/Polkadot/Extrinsic/Unchecked.hs diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs index 4eab788f..1b4250ff 100644 --- a/packages/polkadot/src/Network/Polkadot.hs +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -19,12 +19,15 @@ module Network.Polkadot , module Scale , module Primitives , module Crypto + -- * Extrinsic sign & send functions. + , module Extrinsic ) where import Codec.Scale as Scale import Network.Polkadot.Crypto as Crypto hiding (MultiAddress, MultiSignature, MultiSigner) +import Network.Polkadot.Extrinsic as Extrinsic import Network.Polkadot.Primitives as Primitives import Network.Polkadot.Query (query) import Network.Polkadot.Storage.Key (Argument (..)) diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs index b5ab76e6..d0bac81b 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs @@ -1,7 +1,3 @@ -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE ScopedTypeVariables #-} - -- | -- Module : Network.Polkadot.Extrinsic -- Copyright : Aleksandr Krupenkin 2016-2021 @@ -14,85 +10,87 @@ -- Extrinsic is a piece of data from external world. -- -module Network.Polkadot.Extrinsic where - -import Codec.Scale (encode) -import Codec.Scale.Class (Decode (..), Encode (..)) -import Control.Arrow ((&&&)) -import Control.Monad (when) -import Data.Bits (clearBit, setBit, - testBit) -import Data.ByteArray.HexString (HexString) -import Data.ByteString (ByteString) -import Data.Word (Word8) +module Network.Polkadot.Extrinsic + ( Extrinsic + , SignedExtra + , sign_extrinsic + , new_extra' + , new_extra + , new_era + ) where ---import Network.Polkadot.Extrinsic.Extra (PolkadotExtra) -import Network.Polkadot.Crypto (MultiPair (..)) -import Network.Polkadot.Extrinsic.Signature (SignedExtension, - SignedPayload (..), - sign_payload) +import Codec.Scale (Compact (..)) +import Data.Maybe (fromJust) +import Data.Text.Encoding (decodeUtf8) +import Network.JsonRpc.TinyClient (JsonRpc) --- | Current version of the 'UncheckedExtrinsic' format. -extrinsic_version :: Word8 -extrinsic_version = 4 +import Network.Polkadot.Account (to_ss58check) +import Network.Polkadot.Extrinsic.Era (Era (..)) +import Network.Polkadot.Extrinsic.SignedExtension.System +import Network.Polkadot.Extrinsic.SignedExtension.TransactionPayment +import Network.Polkadot.Extrinsic.Unchecked (UncheckedExtrinsic, + sign_extrinsic) +import Network.Polkadot.Primitives (AccountId, + Balance, + Index, + MultiAddress, + MultiSignature) +import Network.Polkadot.Rpc.Account (nextIndex) +import Network.Polkadot.Rpc.Chain (getHeader) +import Network.Polkadot.Rpc.Types (Header (headerNumber)) -- | Default Polkadot compatible extrinsic type. ---type Extrinsic a = UncheckedExtrinsic a MultiAddress MultiSignature Extra - --- | A extrinsic right from the external world. This is unchecked and so --- can contain a signature. -data UncheckedExtrinsic c a s e - = UncheckedExtrinsic - { extrinsicSignature :: !(Maybe (a, s, e)) - -- ^ The signature, address, number of extrinsics have come before from - -- the same signer and an era describing the longevity of this transaction, - -- if this is a signed extrinsic. - , extrinsicFunction :: !c - -- ^ The function that should be called. - } - -instance Encode c => Show (UncheckedExtrinsic c a b c) where - show (UncheckedExtrinsic _ call) = "UncheckedExtrinsic " ++ show encoded - where - encoded :: HexString - encoded = encode call +type Extrinsic a = UncheckedExtrinsic a MultiAddress MultiSignature SignedExtra -instance (Encode c, Encode (a, s, e)) => Encode (UncheckedExtrinsic c a s e) where - put xt = put encoded - where - encoded :: ByteString - encoded = case xt of - UncheckedExtrinsic Nothing call - -> encode extrinsic_version <> encode call - UncheckedExtrinsic (Just s) call - -> encode (setBit extrinsic_version 7) <> encode s <> encode call +-- | Default Polkadot signed extra. +type SignedExtra = + ( CheckSpecVersion + , CheckTxVersion + , CheckGenesis + , CheckEra + , CheckNonce + , CheckWeight + , ChargeTransactionPayment + ) -instance (Decode c, Decode (a, s, e)) => Decode (UncheckedExtrinsic c a s e) where - get = do - (_v :: [()]) <- get - (signed, version) <- (flip testBit 7 &&& flip clearBit 7) <$> get - when (version /= extrinsic_version) $ fail "bad version" - UncheckedExtrinsic - <$> (if signed then fmap Just get else return Nothing) - <*> get - --- | New instance of a signed extrinsic aka "transaction". -new_signed :: c -> a -> s -> e -> UncheckedExtrinsic c a s e -new_signed call address sig extra = UncheckedExtrinsic (Just (address, sig, extra)) call +new_extra :: JsonRpc m + => AccountId + -- ^ Transaction sender address. + -> Balance + -- ^ Transaction tips, or set zero for no tips. + -> m SignedExtra + -- ^ Returns Polkadot transaction extra. +new_extra account_id tip = do + nonce <- fromIntegral <$> nextIndex ss58account + era <- new_era + return $ new_extra' era nonce tip + where + ss58account = decodeUtf8 $ to_ss58check account_id --- | New instance of an unsigned extrinsic aka "inherent". -new_unsigned :: f -> UncheckedExtrinsic f a b c -new_unsigned = UncheckedExtrinsic Nothing +-- | Create signed extra from general data. +new_extra' :: Era + -- ^ Transaction mortality. + -> Index + -- ^ Transaction nonce value. + -> Balance + -- ^ Transaction tips, or set zero for no tips. + -> SignedExtra + -- ^ Returns Polkadot transaction extra. +new_extra' era nonce tip = + ( CheckSpecVersion + , CheckTxVersion + , CheckGenesis + , CheckEra era + , CheckNonce (Compact nonce) + , CheckWeight + , ChargeTransactionPayment (Compact tip) + ) --- | Create and sign extrinsic by account. -sign_extrinsic :: (MultiPair a, Encode c, SignedExtension e) - => a - -- ^ Account to sign extrinsic. - -> c - -- ^ Function to call on runtime. - -> e - -- ^ Additional data to sign like nonce, blockhash, etc. - -> UncheckedExtrinsic c (MultiAddress a) (MultiSignature a) e -sign_extrinsic a c e = new_signed c (multi_address a) sig e - where - sig = sign_payload a $ SignedPayload (c, e) +-- | Create a mortal 'Era' with biggest lifetime period. +-- +-- Note: The assumption is runtime has `BlockHashCount` = 2400. This is common +-- for Polkadot runtimes. +new_era :: JsonRpc m => m Era +new_era = do + blockNumber <- (headerNumber . fromJust) <$> getHeader Nothing + return $ MortalEra 2048 $ fromIntegral (blockNumber - 1) diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs index d750530c..ec9d78a0 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE RecordWildCards #-} - -- | -- Module : Network.Polkadot.Extrinsic.Era -- Copyright : Aleksandr Krupenkin 2016-2021 @@ -9,28 +7,34 @@ -- Stability : experimental -- Portability : unportable -- --- +-- An era to describe the longevity of a transaction. -- module Network.Polkadot.Extrinsic.Era ( Era(..) - , mkMortal + , new_mortal_compact + , birth + , death ) where import Codec.Scale.Class (Decode (..), Encode (..)) import Codec.Scale.Core () import Data.Bits (shiftL, shiftR) -import Data.Word (Word16, Word8, byteSwap16) +import Data.Word (Word16, Word32, Word8, byteSwap16) -- | The era for an extrinsic, indicating either a mortal or immortal extrinsic. data Era = ImmortalEra -- ^ The ImmortalEra for an extrinsic. - | MortalEra + | MortalEra !Word32 !Word32 -- ^ The MortalEra for an extrinsic, indicating period and phase. - { mortalEraPeriod :: Int - , mortalEraPhase :: Int - } + -- + -- Period and phase are encoded: + -- - The period of validity from the block hash found in the signing material. + -- - The phase in the period that this transaction's lifetime begins (and, importantly, + -- implies which block hash is included in the signature material). If the `period` is + -- greater than 1 << 12, then it will be a factor of the times greater than 1 << 12 that + -- `period` is. deriving (Eq, Ord, Show) instance Decode Era where @@ -44,30 +48,43 @@ instance Decode Era where decodeMortal first second = let first' = fromIntegral first second' = fromIntegral second - in mkMortal (first' + second' `shiftL` 8) + in new_mortal_compact (first' + second' `shiftL` 8) instance Encode Era where put ImmortalEra = put (0 :: Word8) - put MortalEra{..} = put encoded + put (MortalEra period' phase') = put encoded where encoded :: Word16 - encoded = min 15 (max 1 (getTrailingZeros period - 1)) + ((phase `div` quantizeFactor) `shiftL` 4) + encoded = min 15 (max 1 (trailing_zeros period - 1)) + ((phase `div` quantizeFactor) `shiftL` 4) quantizeFactor = max (period `shiftR` 12) 1 - period = fromIntegral mortalEraPeriod - phase = fromIntegral mortalEraPhase + period = fromIntegral period' + phase = fromIntegral phase' -mkMortal :: Word16 -> Era -mkMortal raw = MortalEra period phase +-- | Create a mortal 'Era' type from two bytes of data. +new_mortal_compact :: Word16 -> Era +new_mortal_compact raw = MortalEra period phase where - encoded = byteSwap16 raw - era = fromIntegral encoded - period = 2 `shiftL` (era `rem` 16) + era = fromIntegral $ byteSwap16 raw + + period = 2 `shiftL` (fromIntegral (era `rem` 16)) quantizeFactor = max (period `shiftR` 12) 1 phase = (era `shiftR` 4) * quantizeFactor -getTrailingZeros :: Integral a => a -> a -getTrailingZeros = foldl zero 0 . takeWhile (> 0) . iterate (`div` 2) +trailing_zeros :: Integral a => a -> a +trailing_zeros = foldl zero 0 . takeWhile (> 0) . iterate (`div` 2) where zero a x | x `mod` 2 == 0 = a + 1 | otherwise = a + +-- | Get the block number of the start of the era whose properties this object +-- describes that `current` belongs to. +birth :: (Integral a, Integral b) => Era -> a -> b +birth ImmortalEra _ = 0 +birth (MortalEra period phase) current = fromIntegral $ + (max (fromIntegral current) phase - phase) `div` period * period + phase + +-- | Get the block number of the first block at which the era has ended. +death :: (Integral a, Integral b, Bounded b) => Era -> a -> b +death ImmortalEra _ = maxBound +death e@(MortalEra period _) current = fromIntegral $ birth e current + period diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs new file mode 100644 index 00000000..ef7035c9 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs @@ -0,0 +1,42 @@ +-- | +-- Module : Network.Polkadot.Extrinsic.Payload +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- Extrinsic payload and payload signing methods. +-- + +module Network.Polkadot.Extrinsic.Payload where + +import Codec.Scale (encode) +import Codec.Scale.Class (Encode (..)) +import Data.ByteString (ByteString) +import qualified Data.ByteString as BS (length) +import Data.Digest.Blake2 (blake2_256) +import Network.JsonRpc.TinyClient (JsonRpc) + +import Network.Polkadot.Crypto (MultiPair (MultiSignature, multi_sign)) +import Network.Polkadot.Extrinsic.SignedExtension (SignedExtension (..)) + +-- | A payload that has been signed for an unchecked extrinsics. +-- +-- Note that the payload that we sign to produce unchecked extrinsic signature +-- is going to be different than the `Payload` - so the thing the extrinsic +-- actually contains. +type Payload call extra = (call, extra) + +-- | Sign extrinsic's payload by multi-pair. +sign_payload :: (MultiPair a, Encode c, SignedExtension e, JsonRpc m) + => a + -> Payload c e + -> m (MultiSignature a) +sign_payload pair (call, extra) = do + additional <- additional_signed extra + let encoded = encode (call, extra, additional) + payload | BS.length encoded > 256 = blake2_256 encoded + | otherwise = encoded + return $ multi_sign pair (encode payload :: ByteString) diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension.hs similarity index 53% rename from packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs rename to packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension.hs index 391c6753..5b75f3a5 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Signature.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension.hs @@ -2,7 +2,7 @@ {-# LANGUAGE TypeFamilies #-} -- | --- Module : Network.Polkadot.Extrinsic.Signature +-- Module : Network.Polkadot.Extrinsic.SignedExtension -- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- @@ -10,32 +10,14 @@ -- Stability : experimental -- Portability : portable -- --- Extrinsic payload signing and signature types. +-- Additional data that could be attached to the transaction. -- -module Network.Polkadot.Extrinsic.Signature where +module Network.Polkadot.Extrinsic.SignedExtension where -import Codec.Scale (Decode, encode) -import Codec.Scale.Class (Encode (..)) -import Data.ByteString (ByteString) -import qualified Data.ByteString as BS (length) -import Data.Digest.Blake2 (blake2_256) -import Network.Polkadot.Crypto (MultiPair (MultiSignature, multi_sign)) - --- | A payload that has been signed for an unchecked extrinsics. --- --- Note that the payload that we sign to produce unchecked extrinsic signature --- is going to be different than the `SignaturePayload` - so the thing the extrinsic --- actually contains. -newtype SignedPayload call extra = SignedPayload (call, extra) - -instance (Encode c, SignedExtension e) => Encode (SignedPayload c e) where - put (SignedPayload (call, extra)) - | BS.length encoded > 256 = put (blake2_256 encoded) - | otherwise = put encoded - where - encoded = encode (call, extra, additional_signed extra) +import Codec.Scale (Decode, Encode) +import Network.JsonRpc.TinyClient (JsonRpc) -- | Means by which a transaction may be extended. This type embodies both the data and the logic -- that should be additionally associated with the transaction. It should be plain old data. @@ -47,40 +29,59 @@ class (Encode a, Decode a, Encode (AdditionalSigned a), Decode (AdditionalSigned -- | Construct any additional data that should be in the signed payload of the transaction. Can -- also perform any pre-signature-verification checks and return an error if needed. - additional_signed :: a -> AdditionalSigned a + additional_signed :: JsonRpc m => a -> m (AdditionalSigned a) instance SignedExtension () where type AdditionalSigned () = () - additional_signed _ = () + additional_signed _ = return () instance (SignedExtension a, SignedExtension b) => SignedExtension (a, b) where type AdditionalSigned (a, b) = (AdditionalSigned a, AdditionalSigned b) - additional_signed (a, b) = (additional_signed a, additional_signed b) + additional_signed (a, b) = (,) + <$> additional_signed a + <*> additional_signed b instance (SignedExtension a, SignedExtension b, SignedExtension c) => SignedExtension (a, b, c) where type AdditionalSigned (a, b, c) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c) - additional_signed (a, b, c) = (additional_signed a, additional_signed b, additional_signed c) + additional_signed (a, b, c) = (,,) + <$> additional_signed a + <*> additional_signed b + <*> additional_signed c instance (SignedExtension a, SignedExtension b, SignedExtension c, SignedExtension d) => SignedExtension (a, b, c, d) where type AdditionalSigned (a, b, c, d) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c, AdditionalSigned d) - additional_signed (a, b, c, d) = (additional_signed a, additional_signed b, additional_signed c, additional_signed d) + additional_signed (a, b, c, d) = (,,,) + <$> additional_signed a + <*> additional_signed b + <*> additional_signed c + <*> additional_signed d instance (SignedExtension a, SignedExtension b, SignedExtension c, SignedExtension d, SignedExtension e) => SignedExtension (a, b, c, d, e) where type AdditionalSigned (a, b, c, d, e) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c, AdditionalSigned d, AdditionalSigned e) - additional_signed (a, b, c, d, e) = (additional_signed a, additional_signed b, additional_signed c, additional_signed d, additional_signed e) + additional_signed (a, b, c, d, e) = (,,,,) + <$> additional_signed a + <*> additional_signed b + <*> additional_signed c + <*> additional_signed d + <*> additional_signed e instance (SignedExtension a, SignedExtension b, SignedExtension c, SignedExtension d, SignedExtension e, SignedExtension f) => SignedExtension (a, b, c, d, e, f) where type AdditionalSigned (a, b, c, d, e, f) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c, AdditionalSigned d, AdditionalSigned e, AdditionalSigned f) - additional_signed (a, b, c, d, e, f) = (additional_signed a, additional_signed b, additional_signed c, additional_signed d, additional_signed e, additional_signed f) + additional_signed (a, b, c, d, e, f) = (,,,,,) + <$> additional_signed a + <*> additional_signed b + <*> additional_signed c + <*> additional_signed d + <*> additional_signed e + <*> additional_signed f instance (SignedExtension a, SignedExtension b, SignedExtension c, SignedExtension d, SignedExtension e, SignedExtension f, SignedExtension g) => SignedExtension (a, b, c, d, e, f, g) where type AdditionalSigned (a, b, c, d, e, f, g) = (AdditionalSigned a, AdditionalSigned b, AdditionalSigned c, AdditionalSigned d, AdditionalSigned e, AdditionalSigned f, AdditionalSigned g) - additional_signed (a, b, c, d, e, f, g) = (additional_signed a, additional_signed b, additional_signed c, additional_signed d, additional_signed e, additional_signed f, additional_signed g) - - --- | Sign extrinsic payload by account. -sign_payload :: (MultiPair a, Encode c, SignedExtension e) - => a - -> SignedPayload c e - -> MultiSignature a -sign_payload pair payload = multi_sign pair (encode payload :: ByteString) + additional_signed (a, b, c, d, e, f, g) = (,,,,,,) + <$> additional_signed a + <*> additional_signed b + <*> additional_signed c + <*> additional_signed d + <*> additional_signed e + <*> additional_signed f + <*> additional_signed g diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs new file mode 100644 index 00000000..b71c788a --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs @@ -0,0 +1,81 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TypeFamilies #-} + +-- | +-- Module : Network.Polkadot.Extrinsic.SignedExtension.System +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- A frame system signed extensions. +-- + +module Network.Polkadot.Extrinsic.SignedExtension.System where + +import Codec.Scale (Compact, Decode, + Encode, Generic) +import Data.BigNum (h256) +import Data.Maybe (fromJust) +import Data.Word (Word32) +import qualified GHC.Generics as GHC (Generic) + +import Network.Polkadot.Extrinsic.Era (Era, birth) +import Network.Polkadot.Extrinsic.SignedExtension (SignedExtension (..)) +import Network.Polkadot.Primitives (Hash, Index) +import Network.Polkadot.Rpc.Chain (getBlockHash, + getHeader) +import Network.Polkadot.Rpc.State (getRuntimeVersion) +import Network.Polkadot.Rpc.Types (Header (headerNumber), + RuntimeVersion (..)) + +-- | Ensure the runtime version registered in the transaction is the same as at present. +data CheckSpecVersion = CheckSpecVersion + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +instance SignedExtension CheckSpecVersion where + type AdditionalSigned CheckSpecVersion = Word32 + additional_signed _ = runtimeSpecVersion <$> getRuntimeVersion Nothing + +data CheckTxVersion = CheckTxVersion + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +instance SignedExtension CheckTxVersion where + type AdditionalSigned CheckTxVersion = Word32 + additional_signed _ = runtimeTransactionVersion <$> getRuntimeVersion Nothing + +data CheckGenesis = CheckGenesis + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +instance SignedExtension CheckGenesis where + type AdditionalSigned CheckGenesis = Hash + additional_signed _ = do + -- chain must have genesis block, fromJust is safe + (fromJust . (h256 =<<)) <$> getBlockHash (Just 0) + +newtype CheckEra = CheckEra Era + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +instance SignedExtension CheckEra where + type AdditionalSigned CheckEra = Hash + additional_signed (CheckEra era) = do + -- chain must have top header, fromJust is safe here + current <- (headerNumber . fromJust) <$> getHeader Nothing + (fromJust . (h256 =<<)) <$> getBlockHash (Just $ birth era current) + +newtype CheckNonce = CheckNonce (Compact Index) + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +instance SignedExtension CheckNonce where + type AdditionalSigned CheckNonce = () + additional_signed _ = return () + +data CheckWeight = CheckWeight + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +instance SignedExtension CheckWeight where + type AdditionalSigned CheckWeight = () + additional_signed _ = return () diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/TransactionPayment.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/TransactionPayment.hs new file mode 100644 index 00000000..a908662b --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/TransactionPayment.hs @@ -0,0 +1,33 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TypeFamilies #-} + +-- | +-- Module : Network.Polkadot.Extrinsic.SignedExtension.TransactionPayment +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : portable +-- +-- A pallet-transaction-payment signed extension. +-- + +module Network.Polkadot.Extrinsic.SignedExtension.TransactionPayment where + +import Codec.Scale (Compact, Decode, + Encode, Generic) +import qualified GHC.Generics as GHC (Generic) + +import Network.Polkadot.Extrinsic.SignedExtension (SignedExtension (..)) +import Network.Polkadot.Primitives (Balance) + +-- | Require the transactor pay for themselves and maybe include a tip to +-- gain additional priority in the queue. +newtype ChargeTransactionPayment = ChargeTransactionPayment (Compact Balance) + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +instance SignedExtension ChargeTransactionPayment where + type AdditionalSigned ChargeTransactionPayment = () + additional_signed _ = return () diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Unchecked.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Unchecked.hs new file mode 100644 index 00000000..38b5f834 --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Unchecked.hs @@ -0,0 +1,100 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE ScopedTypeVariables #-} + +-- | +-- Module : Network.Polkadot.Extrinsic.Unchecked +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- Extrinsic is a piece of data from external world. +-- + +module Network.Polkadot.Extrinsic.Unchecked + ( UncheckedExtrinsic (..) + , new_unsigned + , new_signed + , sign_extrinsic + ) where + +import Codec.Scale (encode) +import Codec.Scale.Class (Decode (..), + Encode (..)) +import Control.Arrow ((&&&)) +import Control.Monad (when) +import Data.Bits (clearBit, setBit, + testBit) +import Data.ByteArray.HexString (HexString) +import Data.ByteString (ByteString) +import Data.Word (Word8) +import Network.JsonRpc.TinyClient (JsonRpc) + +import Network.Polkadot.Crypto (MultiPair (..)) +import Network.Polkadot.Extrinsic.Payload (sign_payload) +import Network.Polkadot.Extrinsic.SignedExtension (SignedExtension) + +-- | Current version of the 'UncheckedExtrinsic' format. +extrinsic_version :: Word8 +extrinsic_version = 4 + +-- | A extrinsic right from the external world. This is unchecked and so +-- can contain a signature. +data UncheckedExtrinsic c a s e + = UncheckedExtrinsic + { extrinsicSignature :: !(Maybe (a, s, e)) + -- ^ The signature, address, number of extrinsics have come before from + -- the same signer and an era describing the longevity of this transaction, + -- if this is a signed extrinsic. + , extrinsicFunction :: !c + -- ^ The function that should be called. + } + +instance Encode c => Show (UncheckedExtrinsic c a b c) where + show (UncheckedExtrinsic _ call) = "UncheckedExtrinsic " ++ show encoded + where + encoded :: HexString + encoded = encode call + +instance (Encode c, Encode a, Encode s, Encode e) => Encode (UncheckedExtrinsic c a s e) where + put xt = put encoded + where + encoded :: ByteString + encoded = case xt of + UncheckedExtrinsic Nothing call + -> encode extrinsic_version <> encode call + UncheckedExtrinsic (Just s) call + -> encode (setBit extrinsic_version 7) <> encode s <> encode call + +instance (Decode c, Decode a, Decode s, Decode e) => Decode (UncheckedExtrinsic c a s e) where + get = do + (_v :: [()]) <- get + (signed, version) <- (flip testBit 7 &&& flip clearBit 7) <$> get + when (version /= extrinsic_version) $ fail "bad version" + UncheckedExtrinsic + <$> (if signed then fmap Just get else return Nothing) + <*> get + +-- | New instance of a signed extrinsic aka "transaction". +new_signed :: c -> a -> s -> e -> UncheckedExtrinsic c a s e +new_signed call address sig extra = UncheckedExtrinsic (Just (address, sig, extra)) call + +-- | New instance of an unsigned extrinsic aka "inherent". +new_unsigned :: f -> UncheckedExtrinsic f a b c +new_unsigned = UncheckedExtrinsic Nothing + +-- | Create and sign extrinsic by account. +sign_extrinsic :: (MultiPair a, Encode c, SignedExtension e, JsonRpc m) + => a + -- ^ Account to sign extrinsic. + -> c + -- ^ Function to call on runtime. + -> e + -- ^ Additional data to sign like nonce, blockhash, etc. + -> m (UncheckedExtrinsic c (MultiAddress a) (MultiSignature a) e) +sign_extrinsic a c e = do + sig <- sign_payload a (c, e) + return $ new_signed c (multi_address a) sig e diff --git a/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs index cffa208d..1c43c70e 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs @@ -18,7 +18,7 @@ import Codec.Scale (Compact (..), decode) import Data.ByteArray.HexString.TH (hex) import Test.Hspec -import Network.Polkadot.Extrinsic.Era (Era (..), mkMortal) +import Network.Polkadot.Extrinsic.Era (Era (..), new_mortal_compact) spec :: Spec spec = parallel $ do @@ -27,16 +27,16 @@ spec = parallel $ do decode [hex|0x00|] `shouldBe` Right ImmortalEra it "creates from an actual valid era" $ - mkMortal 0xc503 `shouldBe` MortalEra 64 60 + new_mortal_compact 0xc503 `shouldBe` MortalEra 64 60 it "creates for an actual era (2)" $ - mkMortal 0x8502 `shouldBe` MortalEra 64 40 + new_mortal_compact 0x8502 `shouldBe` MortalEra 64 40 it "creates form an actual era (3)" $ - mkMortal 0x6502 `shouldBe` MortalEra 64 38 + new_mortal_compact 0x6502 `shouldBe` MortalEra 64 38 it "creates from a actual 100 block hash count" $ - mkMortal 0xd607 `shouldBe` MortalEra 128 125 + new_mortal_compact 0xd607 `shouldBe` MortalEra 128 125 it "creates from a actual 2400 block hash count" $ - mkMortal 0x9be3 `shouldBe` MortalEra 4096 3641 + new_mortal_compact 0x9be3 `shouldBe` MortalEra 4096 3641 From 9048bc7857314e58a951f9169b5a82079df9cbf1 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Aug 2021 07:24:53 +0300 Subject: [PATCH 196/237] polkadot: added sign_and_send function --- packages/polkadot/src/Network/Polkadot.hs | 2 + .../src/Network/Polkadot/Extrinsic.hs | 66 ++++++++++++++----- 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs index 1b4250ff..7f5adea6 100644 --- a/packages/polkadot/src/Network/Polkadot.hs +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -20,10 +20,12 @@ module Network.Polkadot , module Primitives , module Crypto -- * Extrinsic sign & send functions. + , module Account , module Extrinsic ) where import Codec.Scale as Scale +import Network.Polkadot.Account as Account hiding (AccountId) import Network.Polkadot.Crypto as Crypto hiding (MultiAddress, MultiSignature, MultiSigner) diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs index d0bac81b..177ccdd4 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE FlexibleContexts #-} + -- | -- Module : Network.Polkadot.Extrinsic -- Copyright : Aleksandr Krupenkin 2016-2021 @@ -13,34 +15,40 @@ module Network.Polkadot.Extrinsic ( Extrinsic , SignedExtra - , sign_extrinsic + , sign_and_send + , mortal_max , new_extra' , new_extra - , new_era ) where -import Codec.Scale (Compact (..)) +import Codec.Scale (Compact (..), + Encode, + encode) +import Data.ByteArray.HexString (HexString) import Data.Maybe (fromJust) import Data.Text.Encoding (decodeUtf8) import Network.JsonRpc.TinyClient (JsonRpc) -import Network.Polkadot.Account (to_ss58check) +import Network.Polkadot.Account (AccountId, + IdentifyAccount (..), + Ss58Codec (to_ss58check)) +import Network.Polkadot.Crypto (MultiPair (..)) import Network.Polkadot.Extrinsic.Era (Era (..)) import Network.Polkadot.Extrinsic.SignedExtension.System import Network.Polkadot.Extrinsic.SignedExtension.TransactionPayment import Network.Polkadot.Extrinsic.Unchecked (UncheckedExtrinsic, sign_extrinsic) -import Network.Polkadot.Primitives (AccountId, - Balance, - Index, - MultiAddress, - MultiSignature) +import Network.Polkadot.Primitives (Balance, + Index) +import qualified Network.Polkadot.Primitives as P (MultiAddress, + MultiSignature) import Network.Polkadot.Rpc.Account (nextIndex) +import Network.Polkadot.Rpc.Author (submitExtrinsic) import Network.Polkadot.Rpc.Chain (getHeader) import Network.Polkadot.Rpc.Types (Header (headerNumber)) -- | Default Polkadot compatible extrinsic type. -type Extrinsic a = UncheckedExtrinsic a MultiAddress MultiSignature SignedExtra +type Extrinsic a = UncheckedExtrinsic a P.MultiAddress P.MultiSignature SignedExtra -- | Default Polkadot signed extra. type SignedExtra = @@ -53,8 +61,8 @@ type SignedExtra = , ChargeTransactionPayment ) -new_extra :: JsonRpc m - => AccountId +new_extra :: (Ss58Codec a, JsonRpc m) + => a -- ^ Transaction sender address. -> Balance -- ^ Transaction tips, or set zero for no tips. @@ -62,7 +70,7 @@ new_extra :: JsonRpc m -- ^ Returns Polkadot transaction extra. new_extra account_id tip = do nonce <- fromIntegral <$> nextIndex ss58account - era <- new_era + era <- mortal_max return $ new_extra' era nonce tip where ss58account = decodeUtf8 $ to_ss58check account_id @@ -90,7 +98,31 @@ new_extra' era nonce tip = -- -- Note: The assumption is runtime has `BlockHashCount` = 2400. This is common -- for Polkadot runtimes. -new_era :: JsonRpc m => m Era -new_era = do - blockNumber <- (headerNumber . fromJust) <$> getHeader Nothing - return $ MortalEra 2048 $ fromIntegral (blockNumber - 1) +mortal_max :: JsonRpc m => m Era +mortal_max = do + current <- (headerNumber . fromJust) <$> getHeader Nothing + return $ MortalEra 2048 $ fromIntegral (current - 1) + +-- | Sign extrinsic and send it using node RPC call. +sign_and_send :: ( MultiPair pair + , IdentifyAccount (MultiSigner pair) + , Ss58Codec (AccountId (MultiSigner pair)) + , Encode (MultiAddress pair) + , Encode (MultiSignature pair) + , Encode call + , JsonRpc m + ) + => pair + -- ^ Sender account pair. + -> call + -- ^ Runtime function to call. + -> Balance + -- ^ Tips for speedup transaction (set zero for no boost). + -> m HexString + -- ^ Transaction hash. +sign_and_send pair call tip = do + extra <- new_extra account_id tip + xt <- sign_extrinsic pair call extra + submitExtrinsic (encode xt) + where + account_id = into_account (multi_signer pair) From e260e08d6e5a749e3f3f72400481c91ecae5187e Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Aug 2021 07:34:04 +0300 Subject: [PATCH 197/237] polkadot: payload encoding bug fix --- packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs index ef7035c9..9c435fc3 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs @@ -14,7 +14,6 @@ module Network.Polkadot.Extrinsic.Payload where import Codec.Scale (encode) import Codec.Scale.Class (Encode (..)) -import Data.ByteString (ByteString) import qualified Data.ByteString as BS (length) import Data.Digest.Blake2 (blake2_256) import Network.JsonRpc.TinyClient (JsonRpc) @@ -39,4 +38,4 @@ sign_payload pair (call, extra) = do let encoded = encode (call, extra, additional) payload | BS.length encoded > 256 = blake2_256 encoded | otherwise = encoded - return $ multi_sign pair (encode payload :: ByteString) + return $ multi_sign pair payload From 133329031228836994f0df8ea963834310f56f2f Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Aug 2021 17:21:36 +0300 Subject: [PATCH 198/237] scale: fix compact number encoding --- packages/scale/package.yaml | 2 +- packages/scale/src/Codec/Scale/Compact.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index 8817ed23..386beb9d 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -1,6 +1,6 @@ name: web3-scale version: 1.0.0.0 -synopsis: SCALE codec for Haskell Web3 library. +synopsis: SCALE v2.0 codec for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" license: Apache-2.0 diff --git a/packages/scale/src/Codec/Scale/Compact.hs b/packages/scale/src/Codec/Scale/Compact.hs index 5d97ce1a..0e2c6f6a 100644 --- a/packages/scale/src/Codec/Scale/Compact.hs +++ b/packages/scale/src/Codec/Scale/Compact.hs @@ -47,7 +47,7 @@ instance Integral a => Encode (Compact a) where let step 0 = Nothing step i = Just (fromIntegral i, i `shiftR` 8) unroll = unfoldr step n - putWord8 (fromIntegral (length unroll) `shiftL` 2 .|. 3) + putWord8 (fromIntegral (length unroll - 4) `shiftL` 2 .|. 3) mapM_ putWord8 unroll instance Integral a => Decode (Compact a) where @@ -66,5 +66,5 @@ instance Integral a => Decode (Compact a) where bigIntegerMode = do let unstep b a = a `shiftL` 8 .|. fromIntegral b roll = fromInteger . foldr unstep 0 - len <- flip shiftR 2 <$> getWord8 + len <- ((+4) . flip shiftR 2) <$> getWord8 roll <$> replicateM (fromIntegral len) getWord8 From 01926d3db4f4c83ecd9fc15bc4ce5bfa5c656c02 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Aug 2021 17:22:46 +0300 Subject: [PATCH 199/237] polkadot: extrinsic encoding and rpc bug fixes --- packages/polkadot/src/Network/Polkadot.hs | 2 + .../polkadot/src/Network/Polkadot/Call.hs | 27 ++++++++++++++ .../src/Network/Polkadot/Extrinsic.hs | 5 ++- .../src/Network/Polkadot/Extrinsic/Era.hs | 6 ++- .../Extrinsic/SignedExtension/System.hs | 7 ++-- .../src/Network/Polkadot/Rpc/Types.hs | 37 +++++++++++++++---- 6 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 packages/polkadot/src/Network/Polkadot/Call.hs diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs index 7f5adea6..d721c08e 100644 --- a/packages/polkadot/src/Network/Polkadot.hs +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -22,10 +22,12 @@ module Network.Polkadot -- * Extrinsic sign & send functions. , module Account , module Extrinsic + , module Call ) where import Codec.Scale as Scale import Network.Polkadot.Account as Account hiding (AccountId) +import Network.Polkadot.Call as Call import Network.Polkadot.Crypto as Crypto hiding (MultiAddress, MultiSignature, MultiSigner) diff --git a/packages/polkadot/src/Network/Polkadot/Call.hs b/packages/polkadot/src/Network/Polkadot/Call.hs new file mode 100644 index 00000000..275156ce --- /dev/null +++ b/packages/polkadot/src/Network/Polkadot/Call.hs @@ -0,0 +1,27 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DeriveGeneric #-} + +-- | +-- Module : Network.Polkadot.Extrinsic +-- Copyright : Aleksandr Krupenkin 2016-2021 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- +-- + +module Network.Polkadot.Call where + +import Codec.Scale (Compact (..), Decode, Encode, + Generic) +import qualified GHC.Generics as GHC (Generic) + +import Network.Polkadot.Primitives (AccountId, Balance, MultiAddress) + +data BalancesCall = Transfer MultiAddress (Compact Balance) | SetBalance + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) + +data Call = System | Utility | Babe | Timestamp | Authorship | Indices | Balances BalancesCall + deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs index 177ccdd4..091bbb1e 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs @@ -45,7 +45,8 @@ import qualified Network.Polkadot.Primitives a import Network.Polkadot.Rpc.Account (nextIndex) import Network.Polkadot.Rpc.Author (submitExtrinsic) import Network.Polkadot.Rpc.Chain (getHeader) -import Network.Polkadot.Rpc.Types (Header (headerNumber)) +import Network.Polkadot.Rpc.Types (headerNumber, + unBlockNumber) -- | Default Polkadot compatible extrinsic type. type Extrinsic a = UncheckedExtrinsic a P.MultiAddress P.MultiSignature SignedExtra @@ -100,7 +101,7 @@ new_extra' era nonce tip = -- for Polkadot runtimes. mortal_max :: JsonRpc m => m Era mortal_max = do - current <- (headerNumber . fromJust) <$> getHeader Nothing + current <- (unBlockNumber . headerNumber . fromJust) <$> getHeader Nothing return $ MortalEra 2048 $ fromIntegral (current - 1) -- | Sign extrinsic and send it using node RPC call. diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs index ec9d78a0..efdaae2b 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs @@ -19,7 +19,7 @@ module Network.Polkadot.Extrinsic.Era import Codec.Scale.Class (Decode (..), Encode (..)) import Codec.Scale.Core () -import Data.Bits (shiftL, shiftR) +import Data.Bits (shiftL, shiftR, (.|.)) import Data.Word (Word16, Word32, Word8, byteSwap16) -- | The era for an extrinsic, indicating either a mortal or immortal extrinsic. @@ -55,7 +55,9 @@ instance Encode Era where put (MortalEra period' phase') = put encoded where encoded :: Word16 - encoded = min 15 (max 1 (trailing_zeros period - 1)) + ((phase `div` quantizeFactor) `shiftL` 4) + encoded = first .|. second + first = (1 `max` (trailing_zeros period - 1)) `min` 15 + second = (phase `div` quantizeFactor) `shiftL` 4 quantizeFactor = max (period `shiftR` 12) 1 period = fromIntegral period' phase = fromIntegral phase' diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs index b71c788a..84c9a764 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs @@ -29,8 +29,9 @@ import Network.Polkadot.Primitives (Hash, Index) import Network.Polkadot.Rpc.Chain (getBlockHash, getHeader) import Network.Polkadot.Rpc.State (getRuntimeVersion) -import Network.Polkadot.Rpc.Types (Header (headerNumber), - RuntimeVersion (..)) +import Network.Polkadot.Rpc.Types (RuntimeVersion (..), + headerNumber, + unBlockNumber) -- | Ensure the runtime version registered in the transaction is the same as at present. data CheckSpecVersion = CheckSpecVersion @@ -63,7 +64,7 @@ instance SignedExtension CheckEra where type AdditionalSigned CheckEra = Hash additional_signed (CheckEra era) = do -- chain must have top header, fromJust is safe here - current <- (headerNumber . fromJust) <$> getHeader Nothing + current <- (unBlockNumber . headerNumber . fromJust) <$> getHeader Nothing (fromJust . (h256 =<<)) <$> getBlockHash (Just $ birth era current) newtype CheckNonce = CheckNonce (Compact Index) diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs index c1709d28..ab5f94b5 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs @@ -28,7 +28,8 @@ import Data.Char (toLower) import Data.Text (Text) import Data.Word (Word32, Word64, Word8) import GHC.Generics (Generic) -import Lens.Micro (over, _head) +import Lens.Micro (_head, over) +import Numeric (readHex, showHex) -- | The role the node is running as. data NodeRole = Full @@ -225,29 +226,49 @@ data CreatedBlock = CreatedBlock $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 12 }) ''CreatedBlock) +-- | Generic header digest. +data Digest = Digest + { digestLogs :: ![HexString] + -- ^ A list of logs in the digest. + } + deriving (Eq, Generic, Show) + +-- | Hex-encoded block number. +newtype BlockNumber = BlockNumber { unBlockNumber :: Integer } + deriving (Eq, Ord, Show) + +instance FromJSON BlockNumber where + parseJSON = fmap (BlockNumber . fst . head . readHex . drop 2) . parseJSON + +instance ToJSON BlockNumber where + toJSON = toJSON . ("0x" <>) . flip showHex "" . unBlockNumber + +$(deriveJSON (defaultOptions + { fieldLabelModifier = over _head toLower . drop 6 }) ''Digest) + -- | Abstraction over a block header for a substrate chain. data Header = Header { headerParentHash :: HexString -- ^ The parent hash. - , headerNumber :: Int + , headerNumber :: BlockNumber -- ^ The block number. , headerStateRoot :: HexString -- ^ The state trie merkle root , headerExtrinsicsRoot :: HexString -- ^ The merkle root of the extrinsics. - , headerDigest :: HexString + , headerDigest :: Digest -- ^ A chain-specific digest of data useful for light clients or referencing auxiliary data. } deriving (Eq, Generic, Show) $(deriveJSON (defaultOptions - { fieldLabelModifier = over _head toLower . drop 5 }) ''Header) + { fieldLabelModifier = over _head toLower . drop 6 }) ''Header) -- | Abstraction over a substrate block. data Block = Block - { blockHeader :: Header + { blockHeader :: !Header -- ^ The block header. - , blockExtrinsics :: [HexString] + , blockExtrinsics :: ![HexString] -- ^ The accompanying extrinsics. } deriving (Eq, Generic, Show) @@ -257,9 +278,9 @@ $(deriveJSON (defaultOptions -- | Abstraction over a substrate block and justification. data SignedBlock = SignedBlock - { signedBlock :: Block + { signedBlock :: !Block -- ^ Full block. - , signedJustification :: Maybe HexString + , signedJustification :: !(Maybe HexString) -- ^ Block justification. } deriving (Eq, Generic, Show) From 18d490e8a9807e8b3adebcc9ab120d0151b679dd Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Aug 2021 17:44:24 +0300 Subject: [PATCH 200/237] polkadot: fix metadata V13 codec --- packages/polkadot/src/Network/Polkadot/Metadata/V13.hs | 6 +++--- .../polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs index f4b7468b..1e9500ad 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs @@ -26,7 +26,7 @@ import Data.Char (toLower) import Data.Text (Text) import Data.Word (Word8) import qualified GHC.Generics as GHC (Generic) -import Lens.Micro (over, _head) +import Lens.Micro (_head, over) import Network.Polkadot.Metadata.Type (Type) import qualified Network.Polkadot.Metadata.V12 as V12 @@ -41,8 +41,8 @@ type MapType = V12.MapType type DoubleMapType = V12.DoubleMapType data NMapType = NMapType - { nmapHashers :: ![StorageHasher] - , nmapKeyVec :: ![Type] + { nmapKeyVec :: ![Type] + , nmapHashers :: ![StorageHasher] , nmapValue :: !Type } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) diff --git a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs index cd28e760..0444c947 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs @@ -67,13 +67,9 @@ spec = parallel $ do Right json <- eitherDecodeFileStrict "tests/meta/v12.json" toJSON meta `shouldBeJson` json -{- describe "Metadata V13" $ do it "succeeds decode from hex and json" $ do - let Left e = decode [hexFrom|tests/meta/v13.hex|] :: Either String Metadata - putStrLn e let (Right hex) = decode [hexFrom|tests/meta/v13.hex|] :: Either String Metadata (meta, _) = metadataTypes hex Right json <- eitherDecodeFileStrict "tests/meta/v13.json" toJSON meta `shouldBeJson` json --} From 110c5b0740900a4d98e732736e5931c83d7ed1a5 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 11 Aug 2021 08:11:13 +0300 Subject: [PATCH 201/237] polkadot: added call struct generator --- .../polkadot/src/Network/Polkadot/Call.hs | 40 +- .../polkadot/src/Network/Polkadot/Metadata.hs | 7 +- .../Polkadot/Metadata/Type/Discovery.hs | 27 +- .../Network/Polkadot/Metadata/Type/Parser.hs | 1 - .../src/Network/Polkadot/Metadata/V10.hs | 17 +- .../src/Network/Polkadot/Metadata/V11.hs | 17 +- .../src/Network/Polkadot/Metadata/V12.hs | 2 +- .../src/Network/Polkadot/Metadata/V13.hs | 4 +- .../src/Network/Polkadot/Metadata/V9.hs | 41 +- .../src/Network/Polkadot/Primitives.hs | 8 +- .../Network/Polkadot/Test/MetadataSpec.hs | 2 + .../Network/Polkadot/Test/StorageSpec.hs | 4 +- packages/polkadot/tests/meta/v10.json | 1470 ++--- packages/polkadot/tests/meta/v11.json | 1960 +++---- packages/polkadot/tests/meta/v12.hex | 2 +- packages/polkadot/tests/meta/v12.json | 5156 +++++++++++------ packages/polkadot/tests/meta/v13.json | 2702 +++++---- packages/polkadot/tests/meta/v9.json | 948 +-- 18 files changed, 7064 insertions(+), 5344 deletions(-) diff --git a/packages/polkadot/src/Network/Polkadot/Call.hs b/packages/polkadot/src/Network/Polkadot/Call.hs index 275156ce..e1d3c749 100644 --- a/packages/polkadot/src/Network/Polkadot/Call.hs +++ b/packages/polkadot/src/Network/Polkadot/Call.hs @@ -2,7 +2,7 @@ {-# LANGUAGE DeriveGeneric #-} -- | --- Module : Network.Polkadot.Extrinsic +-- Module : Network.Polkadot.Call -- Copyright : Aleksandr Krupenkin 2016-2021 -- License : Apache-2.0 -- @@ -14,14 +14,38 @@ module Network.Polkadot.Call where -import Codec.Scale (Compact (..), Decode, Encode, - Generic) -import qualified GHC.Generics as GHC (Generic) +import Codec.Scale (Decode, Encode, Generic, decode) +import Data.List (findIndex) +import Data.Text (Text) +import Data.Word (Word8) +import qualified GHC.Generics as GHC (Generic) +import Network.JsonRpc.TinyClient (JsonRpc) -import Network.Polkadot.Primitives (AccountId, Balance, MultiAddress) +import Network.Polkadot.Metadata (MetadataVersioned (V13), + metadata) +import Network.Polkadot.Metadata.V13 (moduleCalls, moduleName, + modules) +import Network.Polkadot.Metadata.V9 (functionName) +import Network.Polkadot.Rpc.State (getMetadata) -data BalancesCall = Transfer MultiAddress (Compact Balance) | SetBalance +-- | Call function of module using standard substrate extrionsic. +data Call a = Call !Word8 !Word8 !a deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -data Call = System | Utility | Babe | Timestamp | Authorship | Indices | Balances BalancesCall - deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) +-- | Create 'Call' type from text-encoded module and function. +new_call :: (Encode a, Decode a, JsonRpc m, MonadFail m) + => Text + -- ^ Module name. + -> Text + -- ^ Function name. + -> a + -- ^ Tuple of arguments. + -> m (Call a) +new_call modName funName args = do + Right (V13 meta) <- (fmap metadata . decode) <$> getMetadata + case findIndex ((modName ==) . moduleName) (modules meta) of + Nothing -> fail $ "module " <> show modName <> " not found" + Just modIx -> + case findIndex ((funName ==) . functionName) =<< moduleCalls (modules meta !! modIx) of + Nothing -> fail $ "function " <> show funName <> " not found" + Just funIx -> return $ Call (fromIntegral modIx) (fromIntegral funIx) args diff --git a/packages/polkadot/src/Network/Polkadot/Metadata.hs b/packages/polkadot/src/Network/Polkadot/Metadata.hs index 2226d9b5..c232f6f5 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata.hs @@ -18,12 +18,14 @@ module Network.Polkadot.Metadata where import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (sumEncoding), +import Data.Aeson (Options (constructorTagModifier, sumEncoding), SumEncoding (ObjectWithSingleField), defaultOptions) import Data.Aeson.TH (deriveJSON) +import Data.Char (toLower) import Data.Set (Set) import qualified GHC.Generics as GHC (Generic) +import Lens.Micro (_head, over) import Network.Polkadot.Metadata.MagicNumber (MagicNumber (..)) import Network.Polkadot.Metadata.Type (Type) @@ -52,7 +54,8 @@ data MetadataVersioned | V13 V13.Metadata deriving (Eq, Show, Generic, GHC.Generic, Decode, Encode) -$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''MetadataVersioned) +$(deriveJSON (defaultOptions + { constructorTagModifier = over _head toLower, sumEncoding = ObjectWithSingleField }) ''MetadataVersioned) -- | The versioned runtime metadata as a decoded structure. data Metadata = Metadata diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs index 34848350..c25f19eb 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs @@ -77,14 +77,29 @@ instance {-# OVERLAPPING #-} Discovery Text where -- | Register 'Type' when found. instance {-# OVERLAPPING #-} Discovery Type where - discovery t = update . go =<< use prefix + discovery t = update . maybe t Type . flip typeOverlap t =<< use prefix where update x = types %= insert x >> return x - -- type overlapping hacks - go px | isOverlap || isCtxOverlap px = Type (px <> unType t) - | otherwise = t - isOverlap = unType t `elem` [ "Judgement", "EquivocationProof" ] - isCtxOverlap a = (unType t, a) `elem` [ ("Proposal", "Treasury"), ("Vote", "Society") ] + +-- | Type overlapping hacks +typeOverlap :: Text + -- ^ Module name + -> Type + -- ^ Module type + -> Maybe Text + -- ^ New type name +typeOverlap "Society" (Type "Vote") = Just "SocietyVote" +typeOverlap "Treasury" (Type "Proposal") = Just "TreasuryProposal" +typeOverlap "Assets" (Type "Balance") = Just "TAssetBalance" +typeOverlap "Assets" (Type "Compact") = Just "Compact" +typeOverlap "Assets" (Type "Approval") = Just "AssetApproval" +typeOverlap "Assets" (Type "ApprovalKey") = Just "AssetApprovalKey" +typeOverlap "Assets" (Type "DestroyWitness") = Just "AssetDestroyWitness" +typeOverlap "Identity" (Type "Judgement") = Just "IdentityJudgement" +typeOverlap "ElectionProviderMultiPhase" (Type "Phase") = Just "ElectionPhase" +typeOverlap a (Type "Judgement") = Just (a <> "Judgement") +typeOverlap a (Type "EquivocationProof") = Just (a <> "EquivocationProof") +typeOverlap _ _ = Nothing -- | If input type is generic structure, let's go deep using generics. diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs index 461f10c7..6adea454 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs @@ -56,7 +56,6 @@ render_box name (Just args) aliases :: Maybe QSelf -> PathSegment -> Text -> Text aliases _ _ "Vec" = "Bytes" -aliases _ _ "BoundedVec" = "Vec" aliases _ _ "Announcement" = "ProxyAnnouncement" aliases _ _ "Status" = "BalanceStatus" aliases (Just (q, _)) _ "Source" = toText q <> "Source" diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs index 0a1c2e7e..64ad6816 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs @@ -17,7 +17,7 @@ module Network.Polkadot.Metadata.V10 where import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (fieldLabelModifier, sumEncoding), +import Data.Aeson (Options (constructorTagModifier, fieldLabelModifier, sumEncoding), SumEncoding (ObjectWithSingleField), defaultOptions) import Data.Aeson.TH (deriveJSON) @@ -25,7 +25,7 @@ import Data.ByteArray.HexString (HexString) import Data.Char (toLower) import Data.Text (Text) import qualified GHC.Generics as GHC (Generic) -import Lens.Micro (over, _head) +import Lens.Micro (_head, over) import Network.Polkadot.Metadata.Type (Type) import qualified Network.Polkadot.Metadata.V9 as V9 @@ -74,14 +74,15 @@ data StorageEntryType | DoubleMap !DoubleMapType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''StorageEntryType) +$(deriveJSON (defaultOptions + { constructorTagModifier = over _head toLower, sumEncoding = ObjectWithSingleField }) ''StorageEntryType) data StorageEntryMetadata = StorageEntryMetadata - { entryName :: !Text - , entryModifier :: !StorageEntryModifier - , entryType :: !StorageEntryType - , entryFallback :: !HexString - , entryDocumentation :: ![Text] + { entryName :: !Text + , entryModifier :: !StorageEntryModifier + , entryType :: !StorageEntryType + , entryFallback :: !HexString + , entryDocs :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON (defaultOptions diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs index 27974dca..e84dc9f4 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs @@ -17,7 +17,7 @@ module Network.Polkadot.Metadata.V11 where import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (fieldLabelModifier, sumEncoding), +import Data.Aeson (Options (constructorTagModifier, fieldLabelModifier, sumEncoding), SumEncoding (ObjectWithSingleField), defaultOptions) import Data.Aeson.TH (deriveJSON) @@ -26,7 +26,7 @@ import Data.Char (toLower) import Data.Text (Text) import Data.Word (Word8) import qualified GHC.Generics as GHC (Generic) -import Lens.Micro (over, _head) +import Lens.Micro (_head, over) import Network.Polkadot.Metadata.Type (Type) import qualified Network.Polkadot.Metadata.V10 as V10 @@ -76,14 +76,15 @@ data StorageEntryType | DoubleMap !DoubleMapType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''StorageEntryType) +$(deriveJSON (defaultOptions + { constructorTagModifier = over _head toLower, sumEncoding = ObjectWithSingleField }) ''StorageEntryType) data StorageEntryMetadata = StorageEntryMetadata - { entryName :: !Text - , entryModifier :: !StorageEntryModifier - , entryType :: !StorageEntryType - , entryFallback :: !HexString - , entryDocumentation :: ![Text] + { entryName :: !Text + , entryModifier :: !StorageEntryModifier + , entryType :: !StorageEntryType + , entryFallback :: !HexString + , entryDocs :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON (defaultOptions diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs index f89fd83d..d9f53804 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs @@ -24,7 +24,7 @@ import Data.Char (toLower) import Data.Text (Text) import Data.Word (Word8) import qualified GHC.Generics as GHC (Generic) -import Lens.Micro (over, _head) +import Lens.Micro (_head, over) import qualified Network.Polkadot.Metadata.V11 as V11 diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs index 1e9500ad..4dc11907 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs @@ -17,7 +17,7 @@ module Network.Polkadot.Metadata.V13 where import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (fieldLabelModifier, sumEncoding), +import Data.Aeson (Options (constructorTagModifier, fieldLabelModifier, sumEncoding), SumEncoding (ObjectWithSingleField), defaultOptions) import Data.Aeson.TH (deriveJSON) @@ -57,7 +57,7 @@ data StorageEntryType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON (defaultOptions - { fieldLabelModifier = over _head toLower, sumEncoding = ObjectWithSingleField }) ''StorageEntryType) + { constructorTagModifier = over _head toLower, sumEncoding = ObjectWithSingleField }) ''StorageEntryType) data StorageEntryMetadata = StorageEntryMetadata { entryName :: !Text diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs index accaf47b..c90f88f0 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs @@ -18,7 +18,7 @@ module Network.Polkadot.Metadata.V9 where import Codec.Scale (Decode, Encode, Generic) -import Data.Aeson (Options (fieldLabelModifier, sumEncoding), +import Data.Aeson (Options (constructorTagModifier, fieldLabelModifier, sumEncoding), SumEncoding (ObjectWithSingleField), defaultOptions) import Data.Aeson.TH (deriveJSON) @@ -26,7 +26,7 @@ import Data.ByteArray.HexString (HexString) import Data.Char (toLower) import Data.Text (Text) import qualified GHC.Generics as GHC (Generic) -import Lens.Micro (over, _head) +import Lens.Micro (_head, over) import Network.Polkadot.Metadata.Type (Type) @@ -39,36 +39,36 @@ $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 8 }) ''FunctionArgumentMetadata) data FunctionMetadata = FunctionMetadata - { functionName :: !Text - , functionArgs :: ![FunctionArgumentMetadata] - , functionDocumentation :: ![Text] + { functionName :: !Text + , functionArgs :: ![FunctionArgumentMetadata] + , functionDocs :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 8 }) ''FunctionMetadata) data EventMetadata = EventMetadata - { eventName :: !Text - , eventArgs :: ![Type] - , eventDocumentation :: ![Text] + { eventName :: !Text + , eventArgs :: ![Type] + , eventDocs :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 5 }) ''EventMetadata) data ModuleConstantMetadata = ModuleConstantMetadata - { constantName :: !Text - , constantType :: !Type - , constantValue :: !HexString - , constantDocumentation :: ![Text] + { constantName :: !Text + , constantType :: !Type + , constantValue :: !HexString + , constantDocs :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 8 }) ''ModuleConstantMetadata) data ErrorMetadata = ErrorMetadata - { errorName :: !Text - , errorDocumentation :: ![Text] + { errorName :: !Text + , errorDocs :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON (defaultOptions @@ -111,7 +111,8 @@ data StorageEntryType | DoubleMap !DoubleMapType deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) -$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''StorageEntryType) +$(deriveJSON (defaultOptions + { constructorTagModifier = over _head toLower, sumEncoding = ObjectWithSingleField }) ''StorageEntryType) data StorageEntryModifier = Optional | Default | Required deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) @@ -119,11 +120,11 @@ data StorageEntryModifier = Optional | Default | Required $(deriveJSON defaultOptions ''StorageEntryModifier) data StorageEntryMetadata = StorageEntryMetadata - { entryName :: !Text - , entryModifier :: !StorageEntryModifier - , entryType :: !StorageEntryType - , entryFallback :: !HexString - , entryDocumentation :: ![Text] + { entryName :: !Text + , entryModifier :: !StorageEntryModifier + , entryType :: !StorageEntryType + , entryFallback :: !HexString + , entryDocs :: ![Text] } deriving (Eq, Show, Generic, GHC.Generic, Encode, Decode) $(deriveJSON (defaultOptions diff --git a/packages/polkadot/src/Network/Polkadot/Primitives.hs b/packages/polkadot/src/Network/Polkadot/Primitives.hs index d2915e48..c9917e81 100644 --- a/packages/polkadot/src/Network/Polkadot/Primitives.hs +++ b/packages/polkadot/src/Network/Polkadot/Primitives.hs @@ -55,9 +55,11 @@ data AccountData = AccountData -- | General account information. data AccountInfo = AccountInfo - { accountNonce :: !Index - , accountRefcount :: !Word32 - , accountData :: !AccountData + { accountNonce :: !Index + , accountConsumers :: !Word32 + , accountProviders :: !Word32 + , accountSufficients :: !Word32 + , accountData :: !AccountData } deriving (Eq, Ord, Show, GHC.Generic, Generic, Encode, Decode) -- | Multiple signatures support type. diff --git a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs index 0444c947..7aa0443f 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs @@ -60,6 +60,7 @@ spec = parallel $ do Right json <- eitherDecodeFileStrict "tests/meta/v10.json" toJSON meta `shouldBeJson` json +{- describe "Metadata V12" $ do it "succeeds decode from hex and json" $ do let (Right hex) = decode [hexFrom|tests/meta/v12.hex|] :: Either String Metadata @@ -73,3 +74,4 @@ spec = parallel $ do (meta, _) = metadataTypes hex Right json <- eitherDecodeFileStrict "tests/meta/v13.json" toJSON meta `shouldBeJson` json +-} diff --git a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs index 01eafaea..738ed12d 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs @@ -24,7 +24,7 @@ import Network.Polkadot.Storage (fromMetadata) spec :: Spec spec = parallel $ do describe "Metadata Storage" $ do - it "succeeds decode from hex and parse storage entries" $ do + it "decode and parse storage entries" $ do let (Right hex) = decode [hexFrom|tests/meta/v13.hex|] :: Either String Metadata (meta, _) = metadataTypes hex - show (fromMetadata (toLatest meta)) `shouldBe` "fromList [(\"assets\",fromList [(\"account\",DoubleMapEntry),(\"asset\",MapEntry)]),(\"authorship\",fromList [(\"author\",PlainEntry),(\"didSetUncles\",PlainEntry),(\"uncles\",PlainEntry)]),(\"babe\",fromList [(\"authorVrfRandomness\",PlainEntry),(\"authorities\",PlainEntry),(\"currentSlot\",PlainEntry),(\"epochIndex\",PlainEntry),(\"genesisSlot\",PlainEntry),(\"initialized\",PlainEntry),(\"lateness\",PlainEntry),(\"nextEpochConfig\",PlainEntry),(\"nextRandomness\",PlainEntry),(\"randomness\",PlainEntry),(\"segmentIndex\",PlainEntry),(\"underConstruction\",MapEntry)]),(\"balances\",fromList [(\"account\",MapEntry),(\"locks\",MapEntry),(\"storageVersion\",PlainEntry),(\"totalIssuance\",PlainEntry)]),(\"bounties\",fromList [(\"bounties\",MapEntry),(\"bountyApprovals\",PlainEntry),(\"bountyCount\",PlainEntry),(\"bountyDescriptions\",MapEntry)]),(\"contracts\",fromList [(\"accountCounter\",PlainEntry),(\"codeStorage\",MapEntry),(\"contractInfoOf\",MapEntry),(\"currentSchedule\",PlainEntry),(\"pristineCode\",MapEntry)]),(\"council\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposalOf\",MapEntry),(\"proposals\",PlainEntry),(\"voting\",MapEntry)]),(\"democracy\",fromList [(\"blacklist\",MapEntry),(\"cancellations\",MapEntry),(\"depositOf\",MapEntry),(\"lastTabledWasExternal\",PlainEntry),(\"locks\",MapEntry),(\"lowestUnbaked\",PlainEntry),(\"nextExternal\",PlainEntry),(\"preimages\",MapEntry),(\"publicPropCount\",PlainEntry),(\"publicProps\",PlainEntry),(\"referendumCount\",PlainEntry),(\"referendumInfoOf\",MapEntry),(\"storageVersion\",PlainEntry),(\"votingOf\",MapEntry)]),(\"elections\",fromList [(\"candidates\",PlainEntry),(\"electionRounds\",PlainEntry),(\"members\",PlainEntry),(\"runnersUp\",PlainEntry),(\"voting\",MapEntry)]),(\"grandpa\",fromList [(\"currentSetId\",PlainEntry),(\"nextForced\",PlainEntry),(\"pendingChange\",PlainEntry),(\"setIdSession\",MapEntry),(\"stalled\",PlainEntry),(\"state\",PlainEntry)]),(\"identity\",fromList [(\"identityOf\",MapEntry),(\"registrars\",PlainEntry),(\"subsOf\",MapEntry),(\"superOf\",MapEntry)]),(\"imOnline\",fromList [(\"authoredBlocks\",DoubleMapEntry),(\"heartbeatAfter\",PlainEntry),(\"keys\",PlainEntry),(\"receivedHeartbeats\",DoubleMapEntry)]),(\"indices\",fromList [(\"accounts\",MapEntry)]),(\"mmr\",fromList [(\"nodes\",MapEntry),(\"numberOfLeaves\",PlainEntry),(\"rootHash\",PlainEntry)]),(\"multisig\",fromList [(\"calls\",MapEntry),(\"multisigs\",DoubleMapEntry)]),(\"offences\",fromList [(\"concurrentReportsIndex\",DoubleMapEntry),(\"deferredOffences\",PlainEntry),(\"reports\",MapEntry),(\"reportsByKindIndex\",MapEntry)]),(\"proxy\",fromList [(\"announcements\",MapEntry),(\"proxies\",MapEntry)]),(\"randomnessCollectiveFlip\",fromList [(\"randomMaterial\",PlainEntry)]),(\"recovery\",fromList [(\"activeRecoveries\",DoubleMapEntry),(\"proxy\",MapEntry),(\"recoverable\",MapEntry)]),(\"scheduler\",fromList [(\"agenda\",MapEntry),(\"lookup\",MapEntry),(\"storageVersion\",PlainEntry)]),(\"session\",fromList [(\"currentIndex\",PlainEntry),(\"disabledValidators\",PlainEntry),(\"keyOwner\",MapEntry),(\"nextKeys\",MapEntry),(\"queuedChanged\",PlainEntry),(\"queuedKeys\",PlainEntry),(\"validators\",PlainEntry)]),(\"society\",fromList [(\"bids\",PlainEntry),(\"candidates\",PlainEntry),(\"defender\",PlainEntry),(\"defenderVotes\",MapEntry),(\"founder\",PlainEntry),(\"head\",PlainEntry),(\"maxMembers\",PlainEntry),(\"members\",PlainEntry),(\"payouts\",MapEntry),(\"pot\",PlainEntry),(\"rules\",PlainEntry),(\"strikes\",MapEntry),(\"suspendedCandidates\",MapEntry),(\"suspendedMembers\",MapEntry),(\"votes\",DoubleMapEntry),(\"vouching\",MapEntry)]),(\"staking\",fromList [(\"activeEra\",PlainEntry),(\"bonded\",MapEntry),(\"bondedEras\",PlainEntry),(\"canceledSlashPayout\",PlainEntry),(\"currentEra\",PlainEntry),(\"earliestUnappliedSlash\",PlainEntry),(\"eraElectionStatus\",PlainEntry),(\"erasRewardPoints\",MapEntry),(\"erasStakers\",DoubleMapEntry),(\"erasStakersClipped\",DoubleMapEntry),(\"erasStartSessionIndex\",MapEntry),(\"erasTotalStake\",MapEntry),(\"erasValidatorPrefs\",DoubleMapEntry),(\"erasValidatorReward\",MapEntry),(\"forceEra\",PlainEntry),(\"historyDepth\",PlainEntry),(\"invulnerables\",PlainEntry),(\"isCurrentSessionFinal\",PlainEntry),(\"ledger\",MapEntry),(\"minimumValidatorCount\",PlainEntry),(\"nominatorSlashInEra\",DoubleMapEntry),(\"nominators\",MapEntry),(\"payee\",MapEntry),(\"queuedElected\",PlainEntry),(\"queuedScore\",PlainEntry),(\"slashRewardFraction\",PlainEntry),(\"slashingSpans\",MapEntry),(\"snapshotNominators\",PlainEntry),(\"snapshotValidators\",PlainEntry),(\"spanSlash\",MapEntry),(\"storageVersion\",PlainEntry),(\"unappliedSlashes\",MapEntry),(\"validatorCount\",PlainEntry),(\"validatorSlashInEra\",DoubleMapEntry),(\"validators\",MapEntry)]),(\"sudo\",fromList [(\"key\",PlainEntry)]),(\"system\",fromList [(\"account\",MapEntry),(\"allExtrinsicsLen\",PlainEntry),(\"blockHash\",MapEntry),(\"blockWeight\",PlainEntry),(\"digest\",PlainEntry),(\"eventCount\",PlainEntry),(\"eventTopics\",MapEntry),(\"events\",PlainEntry),(\"executionPhase\",PlainEntry),(\"extrinsicCount\",PlainEntry),(\"extrinsicData\",MapEntry),(\"extrinsicsRoot\",PlainEntry),(\"lastRuntimeUpgrade\",PlainEntry),(\"number\",PlainEntry),(\"parentHash\",PlainEntry),(\"upgradedToU32RefCount\",PlainEntry)]),(\"technicalCommittee\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposalOf\",MapEntry),(\"proposals\",PlainEntry),(\"voting\",MapEntry)]),(\"technicalMembership\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry)]),(\"timestamp\",fromList [(\"didUpdate\",PlainEntry),(\"now\",PlainEntry)]),(\"tips\",fromList [(\"reasons\",MapEntry),(\"tips\",MapEntry)]),(\"transactionPayment\",fromList [(\"nextFeeMultiplier\",PlainEntry),(\"storageVersion\",PlainEntry)]),(\"treasury\",fromList [(\"approvals\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposals\",MapEntry)]),(\"vesting\",fromList [(\"vesting\",MapEntry)])]" + show (fromMetadata (toLatest meta)) `shouldBe` "fromList [(\"assets\",fromList [(\"account\",DoubleMapEntry),(\"approvals\",NMapEntry),(\"asset\",MapEntry),(\"metadata\",MapEntry)]),(\"authorship\",fromList [(\"author\",PlainEntry),(\"didSetUncles\",PlainEntry),(\"uncles\",PlainEntry)]),(\"babe\",fromList [(\"authorVrfRandomness\",PlainEntry),(\"authorities\",PlainEntry),(\"currentSlot\",PlainEntry),(\"epochConfig\",PlainEntry),(\"epochIndex\",PlainEntry),(\"epochStart\",PlainEntry),(\"genesisSlot\",PlainEntry),(\"initialized\",PlainEntry),(\"lateness\",PlainEntry),(\"nextAuthorities\",PlainEntry),(\"nextEpochConfig\",PlainEntry),(\"nextRandomness\",PlainEntry),(\"pendingEpochConfigChange\",PlainEntry),(\"randomness\",PlainEntry),(\"segmentIndex\",PlainEntry),(\"underConstruction\",MapEntry)]),(\"balances\",fromList [(\"account\",MapEntry),(\"locks\",MapEntry),(\"reserves\",MapEntry),(\"storageVersion\",PlainEntry),(\"totalIssuance\",PlainEntry)]),(\"bounties\",fromList [(\"bounties\",MapEntry),(\"bountyApprovals\",PlainEntry),(\"bountyCount\",PlainEntry),(\"bountyDescriptions\",MapEntry)]),(\"contracts\",fromList [(\"accountCounter\",PlainEntry),(\"codeStorage\",MapEntry),(\"contractInfoOf\",MapEntry),(\"deletionQueue\",PlainEntry),(\"pristineCode\",MapEntry)]),(\"council\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposalOf\",MapEntry),(\"proposals\",PlainEntry),(\"voting\",MapEntry)]),(\"democracy\",fromList [(\"blacklist\",MapEntry),(\"cancellations\",MapEntry),(\"depositOf\",MapEntry),(\"lastTabledWasExternal\",PlainEntry),(\"locks\",MapEntry),(\"lowestUnbaked\",PlainEntry),(\"nextExternal\",PlainEntry),(\"preimages\",MapEntry),(\"publicPropCount\",PlainEntry),(\"publicProps\",PlainEntry),(\"referendumCount\",PlainEntry),(\"referendumInfoOf\",MapEntry),(\"storageVersion\",PlainEntry),(\"votingOf\",MapEntry)]),(\"electionProviderMultiPhase\",fromList [(\"currentPhase\",PlainEntry),(\"desiredTargets\",PlainEntry),(\"minimumUntrustedScore\",PlainEntry),(\"queuedSolution\",PlainEntry),(\"round\",PlainEntry),(\"signedSubmissionIndices\",PlainEntry),(\"signedSubmissionNextIndex\",PlainEntry),(\"signedSubmissionsMap\",MapEntry),(\"snapshot\",PlainEntry),(\"snapshotMetadata\",PlainEntry)]),(\"elections\",fromList [(\"candidates\",PlainEntry),(\"electionRounds\",PlainEntry),(\"members\",PlainEntry),(\"runnersUp\",PlainEntry),(\"voting\",MapEntry)]),(\"gilt\",fromList [(\"active\",MapEntry),(\"activeTotal\",PlainEntry),(\"queueTotals\",PlainEntry),(\"queues\",MapEntry)]),(\"grandpa\",fromList [(\"currentSetId\",PlainEntry),(\"nextForced\",PlainEntry),(\"pendingChange\",PlainEntry),(\"setIdSession\",MapEntry),(\"stalled\",PlainEntry),(\"state\",PlainEntry)]),(\"identity\",fromList [(\"identityOf\",MapEntry),(\"registrars\",PlainEntry),(\"subsOf\",MapEntry),(\"superOf\",MapEntry)]),(\"imOnline\",fromList [(\"authoredBlocks\",DoubleMapEntry),(\"heartbeatAfter\",PlainEntry),(\"keys\",PlainEntry),(\"receivedHeartbeats\",DoubleMapEntry)]),(\"indices\",fromList [(\"accounts\",MapEntry)]),(\"lottery\",fromList [(\"callIndices\",PlainEntry),(\"lottery\",PlainEntry),(\"lotteryIndex\",PlainEntry),(\"participants\",MapEntry),(\"tickets\",MapEntry),(\"ticketsCount\",PlainEntry)]),(\"mmr\",fromList [(\"nodes\",MapEntry),(\"numberOfLeaves\",PlainEntry),(\"rootHash\",PlainEntry)]),(\"multisig\",fromList [(\"calls\",MapEntry),(\"multisigs\",DoubleMapEntry)]),(\"offences\",fromList [(\"concurrentReportsIndex\",DoubleMapEntry),(\"reports\",MapEntry),(\"reportsByKindIndex\",MapEntry)]),(\"proxy\",fromList [(\"announcements\",MapEntry),(\"proxies\",MapEntry)]),(\"randomnessCollectiveFlip\",fromList [(\"randomMaterial\",PlainEntry)]),(\"recovery\",fromList [(\"activeRecoveries\",DoubleMapEntry),(\"proxy\",MapEntry),(\"recoverable\",MapEntry)]),(\"scheduler\",fromList [(\"agenda\",MapEntry),(\"lookup\",MapEntry),(\"storageVersion\",PlainEntry)]),(\"session\",fromList [(\"currentIndex\",PlainEntry),(\"disabledValidators\",PlainEntry),(\"keyOwner\",MapEntry),(\"nextKeys\",MapEntry),(\"queuedChanged\",PlainEntry),(\"queuedKeys\",PlainEntry),(\"validators\",PlainEntry)]),(\"society\",fromList [(\"bids\",PlainEntry),(\"candidates\",PlainEntry),(\"defender\",PlainEntry),(\"defenderVotes\",MapEntry),(\"founder\",PlainEntry),(\"head\",PlainEntry),(\"maxMembers\",PlainEntry),(\"members\",PlainEntry),(\"payouts\",MapEntry),(\"pot\",PlainEntry),(\"rules\",PlainEntry),(\"strikes\",MapEntry),(\"suspendedCandidates\",MapEntry),(\"suspendedMembers\",MapEntry),(\"votes\",DoubleMapEntry),(\"vouching\",MapEntry)]),(\"staking\",fromList [(\"activeEra\",PlainEntry),(\"bonded\",MapEntry),(\"bondedEras\",PlainEntry),(\"canceledSlashPayout\",PlainEntry),(\"chillThreshold\",PlainEntry),(\"counterForNominators\",PlainEntry),(\"counterForValidators\",PlainEntry),(\"currentEra\",PlainEntry),(\"currentPlannedSession\",PlainEntry),(\"earliestUnappliedSlash\",PlainEntry),(\"erasRewardPoints\",MapEntry),(\"erasStakers\",DoubleMapEntry),(\"erasStakersClipped\",DoubleMapEntry),(\"erasStartSessionIndex\",MapEntry),(\"erasTotalStake\",MapEntry),(\"erasValidatorPrefs\",DoubleMapEntry),(\"erasValidatorReward\",MapEntry),(\"forceEra\",PlainEntry),(\"historyDepth\",PlainEntry),(\"invulnerables\",PlainEntry),(\"ledger\",MapEntry),(\"maxNominatorsCount\",PlainEntry),(\"maxValidatorsCount\",PlainEntry),(\"minNominatorBond\",PlainEntry),(\"minValidatorBond\",PlainEntry),(\"minimumValidatorCount\",PlainEntry),(\"nominatorSlashInEra\",DoubleMapEntry),(\"nominators\",MapEntry),(\"payee\",MapEntry),(\"slashRewardFraction\",PlainEntry),(\"slashingSpans\",MapEntry),(\"spanSlash\",MapEntry),(\"storageVersion\",PlainEntry),(\"unappliedSlashes\",MapEntry),(\"validatorCount\",PlainEntry),(\"validatorSlashInEra\",DoubleMapEntry),(\"validators\",MapEntry)]),(\"sudo\",fromList [(\"key\",PlainEntry)]),(\"system\",fromList [(\"account\",MapEntry),(\"allExtrinsicsLen\",PlainEntry),(\"blockHash\",MapEntry),(\"blockWeight\",PlainEntry),(\"digest\",PlainEntry),(\"eventCount\",PlainEntry),(\"eventTopics\",MapEntry),(\"events\",PlainEntry),(\"executionPhase\",PlainEntry),(\"extrinsicCount\",PlainEntry),(\"extrinsicData\",MapEntry),(\"lastRuntimeUpgrade\",PlainEntry),(\"number\",PlainEntry),(\"parentHash\",PlainEntry),(\"upgradedToTripleRefCount\",PlainEntry),(\"upgradedToU32RefCount\",PlainEntry)]),(\"technicalCommittee\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposalOf\",MapEntry),(\"proposals\",PlainEntry),(\"voting\",MapEntry)]),(\"technicalMembership\",fromList [(\"members\",PlainEntry),(\"prime\",PlainEntry)]),(\"timestamp\",fromList [(\"didUpdate\",PlainEntry),(\"now\",PlainEntry)]),(\"tips\",fromList [(\"reasons\",MapEntry),(\"tips\",MapEntry)]),(\"transactionPayment\",fromList [(\"nextFeeMultiplier\",PlainEntry),(\"storageVersion\",PlainEntry)]),(\"transactionStorage\",fromList [(\"blockTransactions\",PlainEntry),(\"byteFee\",PlainEntry),(\"chunkCount\",MapEntry),(\"entryFee\",PlainEntry),(\"maxBlockTransactions\",PlainEntry),(\"maxTransactionSize\",PlainEntry),(\"proofChecked\",PlainEntry),(\"storagePeriod\",PlainEntry),(\"transactions\",MapEntry)]),(\"treasury\",fromList [(\"approvals\",PlainEntry),(\"proposalCount\",PlainEntry),(\"proposals\",MapEntry)]),(\"uniques\",fromList [(\"account\",NMapEntry),(\"asset\",DoubleMapEntry),(\"attribute\",NMapEntry),(\"class\",MapEntry),(\"classMetadataOf\",MapEntry),(\"instanceMetadataOf\",DoubleMapEntry)]),(\"vesting\",fromList [(\"vesting\",MapEntry)])]" diff --git a/packages/polkadot/tests/meta/v10.json b/packages/polkadot/tests/meta/v10.json index 084b138a..66a3d548 100644 --- a/packages/polkadot/tests/meta/v10.json +++ b/packages/polkadot/tests/meta/v10.json @@ -1,7 +1,7 @@ { "magicNumber": 1635018093, "metadata": { - "V10": { + "v10": { "modules": [ { "name": "System", @@ -12,7 +12,7 @@ "name": "AccountNonce", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Index", @@ -20,7 +20,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Extrinsics nonce for accounts." ] }, @@ -28,10 +28,10 @@ "name": "ExtrinsicCount", "modifier": "Optional", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total extrinsics count for the current block." ] }, @@ -39,10 +39,10 @@ "name": "AllExtrinsicsWeight", "modifier": "Optional", "type": { - "Plain": "Weight" + "plain": "Weight" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total weight for all extrinsics put together, for the current block." ] }, @@ -50,10 +50,10 @@ "name": "AllExtrinsicsLen", "modifier": "Optional", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total length (in bytes) for all extrinsics put together, for the current block." ] }, @@ -61,7 +61,7 @@ "name": "BlockHash", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "BlockNumber", "value": "Hash", @@ -69,7 +69,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Map of block numbers to block hashes." ] }, @@ -77,7 +77,7 @@ "name": "ExtrinsicData", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "u32", "value": "Bytes", @@ -85,7 +85,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Extrinsics data for the current block (maps an extrinsic's index to its data)." ] }, @@ -93,10 +93,10 @@ "name": "Number", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The current block number being processed. Set by `execute_block`." ] }, @@ -104,10 +104,10 @@ "name": "ParentHash", "modifier": "Default", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Hash of the previous block." ] }, @@ -115,10 +115,10 @@ "name": "ExtrinsicsRoot", "modifier": "Default", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Extrinsics root of the current block, also part of the block header." ] }, @@ -126,10 +126,10 @@ "name": "Digest", "modifier": "Default", "type": { - "Plain": "DigestOf" + "plain": "DigestOf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Digest of the current block, also part of the block header." ] }, @@ -137,10 +137,10 @@ "name": "Events", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Events deposited for the current block." ] }, @@ -148,10 +148,10 @@ "name": "EventCount", "modifier": "Default", "type": { - "Plain": "EventIndex" + "plain": "EventIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of events in the `Events` list." ] }, @@ -159,7 +159,7 @@ "name": "EventTopics", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "Vec<(BlockNumber,EventIndex)>", @@ -167,7 +167,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Mapping between a topic (represented by T::Hash) and a vector of indexes", " of events in the `>` list.", "", @@ -186,7 +186,7 @@ { "name": "fill_block", "args": [], - "documentation": [ + "docs": [ " A big dispatch that will disallow any other transaction to be included." ] }, @@ -198,7 +198,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Make some on-chain remark." ] }, @@ -210,7 +210,7 @@ "type": "u64" } ], - "documentation": [ + "docs": [ " Set the number of pages in the WebAssembly environment's heap." ] }, @@ -222,7 +222,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set the new runtime code." ] }, @@ -234,7 +234,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set the new runtime code without doing any checks of the given `code`." ] }, @@ -246,7 +246,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Set the new changes trie configuration." ] }, @@ -258,7 +258,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set some items of storage." ] }, @@ -270,7 +270,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Kill some items from storage." ] }, @@ -282,7 +282,7 @@ "type": "Key" } ], - "documentation": [ + "docs": [ " Kill all storage items with a key that starts with the given prefix." ] } @@ -293,7 +293,7 @@ "args": [ "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic completed successfully." ] }, @@ -303,7 +303,7 @@ "DispatchError", "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic failed." ] } @@ -312,35 +312,35 @@ "errors": [ { "name": "InvalidSpecName", - "documentation": [ + "docs": [ " The name of specification does not match between the current runtime", " and the new runtime." ] }, { "name": "SpecVersionNotAllowedToDecrease", - "documentation": [ + "docs": [ " The specification version is not allowed to decrease between the current runtime", " and the new runtime." ] }, { "name": "ImplVersionNotAllowedToDecrease", - "documentation": [ + "docs": [ " The implementation version is not allowed to decrease between the current runtime", " and the new runtime." ] }, { "name": "SpecOrImplVersionNeedToIncrease", - "documentation": [ + "docs": [ " The specification or the implementation version need to increase between the", " current runtime and the new runtime." ] }, { "name": "FailedToExtractRuntimeVersion", - "documentation": [ + "docs": [ " Failed to extract the runtime version from the new runtime.", "", " Either calling `Core_version` or decoding `RuntimeVersion` failed." @@ -357,7 +357,7 @@ "name": "Multisigs", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "AccountId", "key2": "[u8;32]", @@ -366,7 +366,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of open multisig operations." ] } @@ -381,7 +381,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Send a batch of dispatch calls.", "", " This will execute until the first one fails and then stop.", @@ -414,7 +414,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Send a call through an indexed pseudonym of the sender.", "", " The dispatch origin for this call must be _Signed_.", @@ -444,7 +444,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Register approval for a dispatch to be made from a deterministic composite account if", " approved by a total of `threshold - 1` of `other_signatories`.", "", @@ -508,7 +508,7 @@ "type": "[u8;32]" } ], - "documentation": [ + "docs": [ " Register approval for a dispatch to be made from a deterministic composite account if", " approved by a total of `threshold - 1` of `other_signatories`.", "", @@ -563,7 +563,7 @@ "type": "[u8;32]" } ], - "documentation": [ + "docs": [ " Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", " for this operation will be unreserved on success.", "", @@ -596,7 +596,7 @@ "u32", "DispatchError" ], - "documentation": [ + "docs": [ " Batch of dispatches did not complete fully. Index of first failing dispatch given, as", " well as the error." ] @@ -604,7 +604,7 @@ { "name": "BatchCompleted", "args": [], - "documentation": [ + "docs": [ " Batch of dispatches completed fully with no error." ] }, @@ -614,7 +614,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A new multisig operation has begun. First param is the account that is approving,", " second is the multisig account." ] @@ -626,7 +626,7 @@ "Timepoint", "AccountId" ], - "documentation": [ + "docs": [ " A multisig operation has been approved by someone. First param is the account that is", " approving, third is the multisig account." ] @@ -639,7 +639,7 @@ "AccountId", "DispatchResult" ], - "documentation": [ + "docs": [ " A multisig operation has been executed. First param is the account that is", " approving, third is the multisig account." ] @@ -651,7 +651,7 @@ "Timepoint", "AccountId" ], - "documentation": [ + "docs": [ " A multisig operation has been cancelled. First param is the account that is", " cancelling, third is the multisig account." ] @@ -669,10 +669,10 @@ "name": "EpochIndex", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current epoch index." ] }, @@ -680,10 +680,10 @@ "name": "Authorities", "modifier": "Default", "type": { - "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + "plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Current epoch authorities." ] }, @@ -691,10 +691,10 @@ "name": "GenesisSlot", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The slot at which the first epoch actually started. This is 0", " until the first block of the chain." ] @@ -703,10 +703,10 @@ "name": "CurrentSlot", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current slot number." ] }, @@ -714,10 +714,10 @@ "name": "Randomness", "modifier": "Default", "type": { - "Plain": "[u8;32]" + "plain": "[u8;32]" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The epoch randomness for the *current* epoch.", "", " # Security", @@ -734,10 +734,10 @@ "name": "NextRandomness", "modifier": "Default", "type": { - "Plain": "[u8;32]" + "plain": "[u8;32]" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Next epoch randomness." ] }, @@ -745,10 +745,10 @@ "name": "SegmentIndex", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Randomness under construction.", "", " We make a tradeoff between storage accesses and list length.", @@ -764,7 +764,7 @@ "name": "UnderConstruction", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "u32", "value": "Vec<[u8;32]>", @@ -772,16 +772,16 @@ } }, "fallback": "0x00", - "documentation": [] + "docs": [] }, { "name": "Initialized", "modifier": "Optional", "type": { - "Plain": "MaybeVrf" + "plain": "MaybeVrf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Temporary value (cleared at block finalization) which is `Some`", " if per-block initialization has already been called for current block." ] @@ -795,7 +795,7 @@ "name": "EpochDuration", "type": "u64", "value": "0xc800000000000000", - "documentation": [ + "docs": [ " The number of **slots** that an epoch takes. We couple sessions to", " epochs, i.e. we start a new session once the new epoch begins." ] @@ -804,7 +804,7 @@ "name": "ExpectedBlockTime", "type": "Moment", "value": "0xb80b000000000000", - "documentation": [ + "docs": [ " The expected average block time at which BABE should be creating", " blocks. Since BABE is probabilistic it is not trivial to figure out", " what the expected average block time should be based on the slot", @@ -824,10 +824,10 @@ "name": "Now", "modifier": "Default", "type": { - "Plain": "Moment" + "plain": "Moment" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current time for the current block." ] }, @@ -835,10 +835,10 @@ "name": "DidUpdate", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Did the timestamp get updated in this block?" ] } @@ -853,7 +853,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the current time.", "", " This call should be invoked exactly once per block. It will panic at the finalization", @@ -872,7 +872,7 @@ "name": "MinimumPeriod", "type": "Moment", "value": "0xdc05000000000000", - "documentation": [ + "docs": [ " The minimum period between blocks. Beware that this is different to the *expected* period", " that the block production apparatus provides. Your chosen consensus system will generally", " work with this to determine a sensible block time. e.g. For Aura, it will be double this", @@ -891,10 +891,10 @@ "name": "Uncles", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Uncles" ] }, @@ -902,10 +902,10 @@ "name": "Author", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Author of current block." ] }, @@ -913,10 +913,10 @@ "name": "DidSetUncles", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Whether uncles were already set in this block." ] } @@ -931,7 +931,7 @@ "type": "Vec
" } ], - "documentation": [ + "docs": [ " Provide a set of uncles." ] } @@ -941,43 +941,43 @@ "errors": [ { "name": "InvalidUncleParent", - "documentation": [ + "docs": [ " The uncle parent not in the chain." ] }, { "name": "UnclesAlreadySet", - "documentation": [ + "docs": [ " Uncles already set in the block." ] }, { "name": "TooManyUncles", - "documentation": [ + "docs": [ " Too many uncles." ] }, { "name": "GenesisUncle", - "documentation": [ + "docs": [ " The uncle is genesis." ] }, { "name": "TooHighUncle", - "documentation": [ + "docs": [ " The uncle is too high in chain." ] }, { "name": "UncleAlreadyIncluded", - "documentation": [ + "docs": [ " The uncle is already included." ] }, { "name": "OldUncle", - "documentation": [ + "docs": [ " The uncle isn't recent enough to be included." ] } @@ -992,10 +992,10 @@ "name": "NextEnumSet", "modifier": "Default", "type": { - "Plain": "AccountIndex" + "plain": "AccountIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The next free enumeration set." ] }, @@ -1003,7 +1003,7 @@ "name": "EnumSet", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountIndex", "value": "Vec", @@ -1011,7 +1011,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The enumeration sets." ] } @@ -1025,7 +1025,7 @@ "AccountId", "AccountIndex" ], - "documentation": [ + "docs": [ " A new account index was assigned.", "", " This event is not triggered when an existing index is reassigned", @@ -1045,10 +1045,10 @@ "name": "TotalIssuance", "modifier": "Default", "type": { - "Plain": "Balance" + "plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The total units issued in the system." ] }, @@ -1056,7 +1056,7 @@ "name": "Vesting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "VestingSchedule", @@ -1064,7 +1064,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information regarding the vesting of a given account." ] }, @@ -1072,7 +1072,7 @@ "name": "FreeBalance", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Balance", @@ -1080,7 +1080,7 @@ } }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The 'free' balance of a given account.", "", " This is the only balance that matters in terms of most operations on tokens. It", @@ -1098,7 +1098,7 @@ "name": "ReservedBalance", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Balance", @@ -1106,7 +1106,7 @@ } }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The amount of the balance of a given account that is externally reserved; this can still get", " slashed, but gets slashed last of all.", "", @@ -1124,7 +1124,7 @@ "name": "Locks", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Vec", @@ -1132,7 +1132,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any liquidity locks on some account balances." ] } @@ -1151,7 +1151,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Transfer some liquid free balance to another account.", "", " `transfer` will set the `FreeBalance` of the sender and receiver.", @@ -1195,7 +1195,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the balances of a given account.", "", " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", @@ -1227,7 +1227,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Exactly as `transfer`, except the origin must be root and the source account may be", " specified." ] @@ -1244,7 +1244,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Same as the [`transfer`] call, but with a check that the transfer will not kill the", " origin account.", "", @@ -1261,7 +1261,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A new account was created." ] }, @@ -1271,7 +1271,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account was reaped." ] }, @@ -1283,7 +1283,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " Transfer succeeded (from, to, value, fees)." ] }, @@ -1294,7 +1294,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " A balance was set by root (who, free, reserved)." ] }, @@ -1304,7 +1304,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some amount was deposited (e.g. for transaction fees)." ] } @@ -1314,7 +1314,7 @@ "name": "ExistentialDeposit", "type": "Balance", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The minimum amount required to keep an account open." ] }, @@ -1322,7 +1322,7 @@ "name": "TransferFee", "type": "Balance", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to make a transfer." ] }, @@ -1330,7 +1330,7 @@ "name": "CreationFee", "type": "Balance", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to create an account." ] } @@ -1338,49 +1338,49 @@ "errors": [ { "name": "VestingBalance", - "documentation": [ + "docs": [ " Vesting balance too high to send value" ] }, { "name": "LiquidityRestrictions", - "documentation": [ + "docs": [ " Account liquidity restrictions prevent withdrawal" ] }, { "name": "Overflow", - "documentation": [ + "docs": [ " Got an overflow after adding" ] }, { "name": "InsufficientBalance", - "documentation": [ + "docs": [ " Balance too low to send value" ] }, { "name": "ExistentialDeposit", - "documentation": [ + "docs": [ " Value too low to create account due to existential deposit" ] }, { "name": "KeepAlive", - "documentation": [ + "docs": [ " Transfer/payment would kill account" ] }, { "name": "ExistingVestingSchedule", - "documentation": [ + "docs": [ " A vesting schedule already exists for this account" ] }, { "name": "DeadAccount", - "documentation": [ + "docs": [ " Beneficiary account must pre-exist" ] } @@ -1395,10 +1395,10 @@ "name": "NextFeeMultiplier", "modifier": "Default", "type": { - "Plain": "Multiplier" + "plain": "Multiplier" }, "fallback": "0x0000000000000000", - "documentation": [] + "docs": [] } ] }, @@ -1409,7 +1409,7 @@ "name": "TransactionBaseFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the base." ] }, @@ -1417,7 +1417,7 @@ "name": "TransactionByteFee", "type": "BalanceOf", "value": "0x00e40b54020000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the per-byte portion." ] } @@ -1433,10 +1433,10 @@ "name": "ValidatorCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The ideal number of staking participants." ] }, @@ -1444,10 +1444,10 @@ "name": "MinimumValidatorCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x04000000", - "documentation": [ + "docs": [ " Minimum number of staking participants before emergency conditions are imposed." ] }, @@ -1455,10 +1455,10 @@ "name": "Invulnerables", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", " easy to initialize and the performance hit is minimal (we expect no more than four", " invulnerables) and restricted to testnets." @@ -1468,7 +1468,7 @@ "name": "Bonded", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "AccountId", @@ -1476,7 +1476,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all locked \"stash\" accounts to the controller account." ] }, @@ -1484,7 +1484,7 @@ "name": "Ledger", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "StakingLedger", @@ -1492,7 +1492,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." ] }, @@ -1500,7 +1500,7 @@ "name": "Payee", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "RewardDestination", @@ -1508,7 +1508,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Where the reward payment should be made. Keyed by stash." ] }, @@ -1516,7 +1516,7 @@ "name": "Validators", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "ValidatorPrefs", @@ -1524,7 +1524,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The map from (wannabe) validator stash key to the preferences of that validator." ] }, @@ -1532,7 +1532,7 @@ "name": "Nominators", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Nominations", @@ -1540,7 +1540,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The map from nominator stash key to the set of stash keys of all validators to nominate.", "", " NOTE: is private so that we can ensure upgraded before all typical accesses.", @@ -1551,7 +1551,7 @@ "name": "Stakers", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Exposure", @@ -1559,7 +1559,7 @@ } }, "fallback": "0x000000", - "documentation": [ + "docs": [ " Nominators for a particular account that is in action right now. You can't iterate", " through validators here, but you can find them in the Session module.", "", @@ -1570,10 +1570,10 @@ "name": "CurrentElected", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The currently elected validator set keyed by stash account ID." ] }, @@ -1581,10 +1581,10 @@ "name": "CurrentEra", "modifier": "Default", "type": { - "Plain": "EraIndex" + "plain": "EraIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The current era index." ] }, @@ -1592,10 +1592,10 @@ "name": "CurrentEraStart", "modifier": "Default", "type": { - "Plain": "MomentOf" + "plain": "MomentOf" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The start of the current era." ] }, @@ -1603,10 +1603,10 @@ "name": "CurrentEraStartSessionIndex", "modifier": "Default", "type": { - "Plain": "SessionIndex" + "plain": "SessionIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The session index at which the current era started." ] }, @@ -1614,10 +1614,10 @@ "name": "CurrentEraPointsEarned", "modifier": "Default", "type": { - "Plain": "EraPoints" + "plain": "EraPoints" }, "fallback": "0x0000000000", - "documentation": [ + "docs": [ " Rewards for the current era. Using indices of current elected set." ] }, @@ -1625,10 +1625,10 @@ "name": "SlotStake", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The amount of balance actively at stake for each validator slot, currently.", "", " This is used to derive rewards and punishments." @@ -1638,10 +1638,10 @@ "name": "ForceEra", "modifier": "Default", "type": { - "Plain": "Forcing" + "plain": "Forcing" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the next session change will be a new era regardless of index." ] }, @@ -1649,10 +1649,10 @@ "name": "SlashRewardFraction", "modifier": "Default", "type": { - "Plain": "Perbill" + "plain": "Perbill" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The percentage of the slash that is distributed to reporters.", "", " The rest of the slashed value is handled by the `Slash`." @@ -1662,10 +1662,10 @@ "name": "CanceledSlashPayout", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The amount of currency given to reporters of a slash event which was", " canceled by extraordinary circumstances (e.g. governance)." ] @@ -1674,7 +1674,7 @@ "name": "UnappliedSlashes", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "EraIndex", "value": "Vec", @@ -1682,7 +1682,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All unapplied slashes that are queued for later." ] }, @@ -1690,10 +1690,10 @@ "name": "BondedEras", "modifier": "Default", "type": { - "Plain": "Vec<(EraIndex,SessionIndex)>" + "plain": "Vec<(EraIndex,SessionIndex)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from still-bonded eras to the first session index of that era." ] }, @@ -1701,7 +1701,7 @@ "name": "ValidatorSlashInEra", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "EraIndex", "key2": "AccountId", @@ -1710,7 +1710,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on validators, mapped by era to the highest slash proportion", " and slash value of the era." ] @@ -1719,7 +1719,7 @@ "name": "NominatorSlashInEra", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "EraIndex", "key2": "AccountId", @@ -1728,7 +1728,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on nominators, mapped by era to the highest slash value of the era." ] }, @@ -1736,7 +1736,7 @@ "name": "SlashingSpans", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "SlashingSpans", @@ -1744,7 +1744,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Slashing spans for stash accounts." ] }, @@ -1752,7 +1752,7 @@ "name": "SpanSlash", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "(AccountId,SpanIndex)", "value": "SpanRecord", @@ -1760,7 +1760,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Records information about the maximum slash of a stash within a slashing span,", " as well as how much reward has been paid out." ] @@ -1769,10 +1769,10 @@ "name": "EarliestUnappliedSlash", "modifier": "Optional", "type": { - "Plain": "EraIndex" + "plain": "EraIndex" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The earliest era for which we have a pending, unapplied slash." ] }, @@ -1780,10 +1780,10 @@ "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The version of storage for upgrade." ] } @@ -1806,7 +1806,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " Take the origin account as a stash and lock up `value` of its balance. `controller` will", " be the account that controls it.", "", @@ -1832,7 +1832,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add some extra amount that have appeared in the stash `free_balance` into the balance up", " for staking.", "", @@ -1857,7 +1857,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", " period ends. If this leaves an amount actively bonded less than", " T::Currency::minimum_balance(), then it is increased to the full amount.", @@ -1886,7 +1886,7 @@ { "name": "withdraw_unbonded", "args": [], - "documentation": [ + "docs": [ " Remove any unlocked chunks from the `unlocking` queue from our management.", "", " This essentially frees up that balance to be used by the stash account to do", @@ -1913,7 +1913,7 @@ "type": "ValidatorPrefs" } ], - "documentation": [ + "docs": [ " Declare the desire to validate for the origin controller.", "", " Effects will be felt at the beginning of the next era.", @@ -1935,7 +1935,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Declare the desire to nominate `targets` for the origin controller.", "", " Effects will be felt at the beginning of the next era.", @@ -1952,7 +1952,7 @@ { "name": "chill", "args": [], - "documentation": [ + "docs": [ " Declare no desire to either validate or nominate.", "", " Effects will be felt at the beginning of the next era.", @@ -1974,7 +1974,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " (Re-)set the payment target for a controller.", "", " Effects will be felt at the beginning of the next era.", @@ -1996,7 +1996,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " (Re-)set the controller of a stash.", "", " Effects will be felt at the beginning of the next era.", @@ -2018,14 +2018,14 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " The ideal number of validators." ] }, { "name": "force_no_eras", "args": [], - "documentation": [ + "docs": [ " Force there to be no new eras indefinitely.", "", " # ", @@ -2036,7 +2036,7 @@ { "name": "force_new_era", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of the next session. After this, it will be", " reset to normal (non-forced) behaviour.", "", @@ -2053,7 +2053,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set the validators who cannot be slashed (if any)." ] }, @@ -2065,14 +2065,14 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Force a current staker to become completely unstaked, immediately." ] }, { "name": "force_new_era_always", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of sessions indefinitely.", "", " # ", @@ -2092,7 +2092,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Cancel enactment of a deferred slash. Can be called by either the root origin or", " the `T::SlashCancelOrigin`.", " passing the era and indices of the slashes for that era to kill.", @@ -2110,7 +2110,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Rebond a portion of the stash scheduled to be unlocked.", "", " # ", @@ -2127,7 +2127,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " All validators have been rewarded by the first balance; the second is the remainder", " from the maximum amount of reward." ] @@ -2138,7 +2138,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " One validator (and its nominators) has been slashed by the given amount." ] }, @@ -2147,7 +2147,7 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " An old slashing report from a prior era was discarded because it could", " not be processed." ] @@ -2158,7 +2158,7 @@ "name": "SessionsPerEra", "type": "SessionIndex", "value": "0x06000000", - "documentation": [ + "docs": [ " Number of sessions per era." ] }, @@ -2166,7 +2166,7 @@ "name": "BondingDuration", "type": "EraIndex", "value": "0xa0020000", - "documentation": [ + "docs": [ " Number of eras that staked funds must remain bonded for." ] } @@ -2174,61 +2174,61 @@ "errors": [ { "name": "NotController", - "documentation": [ + "docs": [ " Not a controller account." ] }, { "name": "NotStash", - "documentation": [ + "docs": [ " Not a stash account." ] }, { "name": "AlreadyBonded", - "documentation": [ + "docs": [ " Stash is already bonded." ] }, { "name": "AlreadyPaired", - "documentation": [ + "docs": [ " Controller is already paired." ] }, { "name": "EmptyTargets", - "documentation": [ + "docs": [ " Targets cannot be empty." ] }, { "name": "DuplicateIndex", - "documentation": [ + "docs": [ " Duplicate index." ] }, { "name": "InvalidSlashIndex", - "documentation": [ + "docs": [ " Slash record index out of bounds." ] }, { "name": "InsufficientValue", - "documentation": [ + "docs": [ " Can not bond with value less than minimum balance." ] }, { "name": "NoMoreChunks", - "documentation": [ + "docs": [ " Can not schedule more unlock chunks." ] }, { "name": "NoUnlockChunk", - "documentation": [ + "docs": [ " Can not rebond without unlocking chunks." ] } @@ -2243,10 +2243,10 @@ "name": "Validators", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of validators." ] }, @@ -2254,10 +2254,10 @@ "name": "CurrentIndex", "modifier": "Default", "type": { - "Plain": "SessionIndex" + "plain": "SessionIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Current index of the session." ] }, @@ -2265,10 +2265,10 @@ "name": "QueuedChanged", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the underlying economic identities or weighting behind the validators", " has changed in the queued validator set." ] @@ -2277,10 +2277,10 @@ "name": "QueuedKeys", "modifier": "Default", "type": { - "Plain": "Vec<(ValidatorId,Keys)>" + "plain": "Vec<(ValidatorId,Keys)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The queued keys for the next session. When the next session begins, these keys", " will be used to determine the validator's session keys." ] @@ -2289,10 +2289,10 @@ "name": "DisabledValidators", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Indices of disabled validators.", "", " The set is cleared when `on_session_ending` returns a new set of identities." @@ -2302,7 +2302,7 @@ "name": "NextKeys", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "Bytes", "key2": "ValidatorId", @@ -2311,7 +2311,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The next session keys for a validator.", "", " The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of", @@ -2322,7 +2322,7 @@ "name": "KeyOwner", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "Bytes", "key2": "(KeyTypeId,Bytes)", @@ -2331,7 +2331,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The owner of a key. The second key is the `KeyTypeId` + the encoded key.", "", " The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of", @@ -2353,7 +2353,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Sets the session key(s) of the function caller to `key`.", " Allows an account to set its session key prior to becoming a validator.", " This doesn't take effect until the next session.", @@ -2373,7 +2373,7 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " New session has happened. Note that the argument is the session index, not the block", " number as the type might suggest." ] @@ -2384,7 +2384,7 @@ "name": "DEDUP_KEY_PREFIX", "type": "Bytes", "value": "0x343a73657373696f6e3a6b657973", - "documentation": [ + "docs": [ " Used as first key for `NextKeys` and `KeyOwner` to put all the data into the same branch", " of the trie." ] @@ -2393,19 +2393,19 @@ "errors": [ { "name": "InvalidProof", - "documentation": [ + "docs": [ " Invalid ownership proof." ] }, { "name": "NoAssociatedValidatorId", - "documentation": [ + "docs": [ " No associated validator ID for account." ] }, { "name": "DuplicatedKey", - "documentation": [ + "docs": [ " Registered duplicate key." ] } @@ -2420,10 +2420,10 @@ "name": "PublicPropCount", "modifier": "Default", "type": { - "Plain": "PropIndex" + "plain": "PropIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of (public) proposals that have been made so far." ] }, @@ -2431,10 +2431,10 @@ "name": "PublicProps", "modifier": "Default", "type": { - "Plain": "Vec<(PropIndex,Hash,AccountId)>" + "plain": "Vec<(PropIndex,Hash,AccountId)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The public proposals. Unsorted. The second item is the proposal's hash." ] }, @@ -2442,7 +2442,7 @@ "name": "Preimages", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "(Bytes,AccountId,BalanceOf,BlockNumber)", @@ -2450,7 +2450,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map of hashes to the proposal preimage, along with who registered it and their deposit.", " The block number is the block at which it was deposited." ] @@ -2459,7 +2459,7 @@ "name": "DepositOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "PropIndex", "value": "(BalanceOf,Vec)", @@ -2467,7 +2467,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Those who have locked a deposit." ] }, @@ -2475,10 +2475,10 @@ "name": "ReferendumCount", "modifier": "Default", "type": { - "Plain": "ReferendumIndex" + "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The next free referendum index, aka the number of referenda started so far." ] }, @@ -2486,10 +2486,10 @@ "name": "LowestUnbaked", "modifier": "Default", "type": { - "Plain": "ReferendumIndex" + "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The lowest referendum index representing an unbaked referendum. Equal to", " `ReferendumCount` if there isn't a unbaked referendum." ] @@ -2498,7 +2498,7 @@ "name": "ReferendumInfoOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "ReferendumIndex", "value": "ReferendumInfo", @@ -2506,7 +2506,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information concerning any given referendum." ] }, @@ -2514,10 +2514,10 @@ "name": "DispatchQueue", "modifier": "Default", "type": { - "Plain": "Vec<(BlockNumber,Hash,ReferendumIndex)>" + "plain": "Vec<(BlockNumber,Hash,ReferendumIndex)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Queue of successful referenda to be dispatched. Stored ordered by block number." ] }, @@ -2525,7 +2525,7 @@ "name": "VotersFor", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "ReferendumIndex", "value": "Vec", @@ -2533,7 +2533,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Get the voters for the current proposal." ] }, @@ -2541,7 +2541,7 @@ "name": "VoteOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "(ReferendumIndex,AccountId)", "value": "Vote", @@ -2549,7 +2549,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Get the vote in a given referendum of a particular voter. The result is meaningful only", " if `voters_for` includes the voter when called with the referendum (you'll get the", " default `Vote` value otherwise). If you don't want to check `voters_for`, then you can", @@ -2560,7 +2560,7 @@ "name": "Proxy", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "AccountId", @@ -2568,7 +2568,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Who is able to vote for whom. Value is the fund-holding account, key is the", " vote-transaction-sending account." ] @@ -2577,7 +2577,7 @@ "name": "Delegations", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "(AccountId,Conviction)", @@ -2585,7 +2585,7 @@ } }, "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Get the account (and lock periods) to which another account is delegating vote." ] }, @@ -2593,10 +2593,10 @@ "name": "LastTabledWasExternal", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the last referendum tabled was submitted externally. False if it was a public", " proposal." ] @@ -2605,10 +2605,10 @@ "name": "NextExternal", "modifier": "Optional", "type": { - "Plain": "(Hash,VoteThreshold)" + "plain": "(Hash,VoteThreshold)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The referendum to be tabled whenever it would be valid to table an external proposal.", " This happens when a referendum needs to be tabled and one of two conditions are met:", " - `LastTabledWasExternal` is `false`; or", @@ -2619,7 +2619,7 @@ "name": "Blacklist", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "(BlockNumber,Vec)", @@ -2627,7 +2627,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A record of who vetoed what. Maps proposal hash to a possible existent block number", " (until when it may not be resubmitted) and who vetoed it." ] @@ -2636,7 +2636,7 @@ "name": "Cancellations", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "bool", @@ -2644,7 +2644,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Record of all proposals that have been subject to emergency cancellation." ] } @@ -2663,7 +2663,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Propose a sensitive action to be taken.", "", " # ", @@ -2680,7 +2680,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Propose a sensitive action to be taken.", "", " # ", @@ -2701,7 +2701,7 @@ "type": "Vote" } ], - "documentation": [ + "docs": [ " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", " otherwise it is a vote to keep the status quo.", "", @@ -2723,7 +2723,7 @@ "type": "Vote" } ], - "documentation": [ + "docs": [ " Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact", " the proposal; otherwise it is a vote to keep the status quo.", "", @@ -2741,7 +2741,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", " referendum." ] @@ -2754,7 +2754,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a referendum to be tabled once it is legal to schedule an external", " referendum." ] @@ -2767,7 +2767,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", " an external referendum.", "", @@ -2783,7 +2783,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", " schedule an external referendum.", "", @@ -2807,7 +2807,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Schedule the currently externally-proposed majority-carries referendum to be tabled", " immediately. If there is no externally-proposed referendum currently, or if there is one", " but it is not a majority-carries referendum then it fails.", @@ -2827,7 +2827,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Veto and blacklist the external proposal hash." ] }, @@ -2839,7 +2839,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove a referendum." ] }, @@ -2851,7 +2851,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Cancel a proposal queued for enactment." ] }, @@ -2863,7 +2863,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Specify a proxy. Called by the stash.", "", " # ", @@ -2874,7 +2874,7 @@ { "name": "resign_proxy", "args": [], - "documentation": [ + "docs": [ " Clear the proxy. Called by the proxy.", "", " # ", @@ -2890,7 +2890,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Clear the proxy. Called by the stash.", "", " # ", @@ -2910,7 +2910,7 @@ "type": "Conviction" } ], - "documentation": [ + "docs": [ " Delegate vote.", "", " # ", @@ -2921,7 +2921,7 @@ { "name": "undelegate", "args": [], - "documentation": [ + "docs": [ " Undelegate vote.", "", " # ", @@ -2932,7 +2932,7 @@ { "name": "clear_public_proposals", "args": [], - "documentation": [ + "docs": [ " Veto and blacklist the proposal hash. Must be from Root origin." ] }, @@ -2944,7 +2944,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", " in the dispatch queue but does require a deposit, returned once enacted." ] @@ -2957,7 +2957,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This requires the proposal to be", " in the dispatch queue. No deposit is needed." ] @@ -2970,7 +2970,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Remove an expired proposal preimage and collect the deposit.", "", " This will only work after `VotingPeriod` blocks from the time that the preimage was", @@ -2986,7 +2986,7 @@ "PropIndex", "Balance" ], - "documentation": [ + "docs": [ " A motion has been proposed by a public account." ] }, @@ -2997,14 +2997,14 @@ "Balance", "Vec" ], - "documentation": [ + "docs": [ " A public proposal has been tabled for referendum vote." ] }, { "name": "ExternalTabled", "args": [], - "documentation": [ + "docs": [ " An external proposal has been tabled." ] }, @@ -3014,7 +3014,7 @@ "ReferendumIndex", "VoteThreshold" ], - "documentation": [ + "docs": [ " A referendum has begun." ] }, @@ -3023,7 +3023,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been approved by referendum." ] }, @@ -3032,7 +3032,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been rejected by referendum." ] }, @@ -3041,7 +3041,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A referendum has been cancelled." ] }, @@ -3051,7 +3051,7 @@ "ReferendumIndex", "bool" ], - "documentation": [ + "docs": [ " A proposal has been enacted." ] }, @@ -3061,7 +3061,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An account has delegated their vote to another account." ] }, @@ -3070,7 +3070,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An account has cancelled a previous delegation operation." ] }, @@ -3081,7 +3081,7 @@ "Hash", "BlockNumber" ], - "documentation": [ + "docs": [ " An external proposal has been vetoed." ] }, @@ -3092,7 +3092,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal's preimage was noted, and the deposit taken." ] }, @@ -3103,7 +3103,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal preimage was removed and used (the deposit was returned)." ] }, @@ -3113,7 +3113,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was invalid." ] }, @@ -3123,7 +3123,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was missing." ] }, @@ -3135,7 +3135,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A registered preimage was removed and the deposit collected by the reaper (last item)." ] } @@ -3145,7 +3145,7 @@ "name": "EnactmentPeriod", "type": "BlockNumber", "value": "0x002f0d00", - "documentation": [ + "docs": [ " The minimum period of locking and the period between a proposal being approved and enacted.", "", " It should generally be a little more than the unstake period to ensure that", @@ -3157,7 +3157,7 @@ "name": "LaunchPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) new public referenda are launched." ] }, @@ -3165,7 +3165,7 @@ "name": "VotingPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) to check for new votes." ] }, @@ -3173,7 +3173,7 @@ "name": "MinimumDeposit", "type": "BalanceOf", "value": "0x0000c16ff28623000000000000000000", - "documentation": [ + "docs": [ " The minimum amount to be used as a deposit for a public referendum proposal." ] }, @@ -3181,7 +3181,7 @@ "name": "EmergencyVotingPeriod", "type": "BlockNumber", "value": "0x80510100", - "documentation": [ + "docs": [ " Minimum voting period allowed for an emergency referendum." ] }, @@ -3189,7 +3189,7 @@ "name": "CooloffPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " Period in blocks where an external proposal may not be re-submitted after being vetoed." ] }, @@ -3197,7 +3197,7 @@ "name": "PreimageByteDeposit", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount of balance that must be deposited per byte of preimage stored." ] } @@ -3205,133 +3205,133 @@ "errors": [ { "name": "ValueLow", - "documentation": [ + "docs": [ " Value too low" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal does not exist" ] }, { "name": "NotProxy", - "documentation": [ + "docs": [ " Not a proxy" ] }, { "name": "BadIndex", - "documentation": [ + "docs": [ " Unknown index" ] }, { "name": "AlreadyCanceled", - "documentation": [ + "docs": [ " Cannot cancel the same proposal twice" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Proposal already made" ] }, { "name": "ProposalBlacklisted", - "documentation": [ + "docs": [ " Proposal still blacklisted" ] }, { "name": "NotSimpleMajority", - "documentation": [ + "docs": [ " Next external proposal not simple majority" ] }, { "name": "InvalidHash", - "documentation": [ + "docs": [ " Invalid hash" ] }, { "name": "NoProposal", - "documentation": [ + "docs": [ " No external proposal" ] }, { "name": "AlreadyVetoed", - "documentation": [ + "docs": [ " Identity may not veto a proposal twice" ] }, { "name": "AlreadyProxy", - "documentation": [ + "docs": [ " Already a proxy" ] }, { "name": "WrongProxy", - "documentation": [ + "docs": [ " Wrong proxy" ] }, { "name": "NotDelegated", - "documentation": [ + "docs": [ " Not delegated" ] }, { "name": "DuplicatePreimage", - "documentation": [ + "docs": [ " Preimage already noted" ] }, { "name": "NotImminent", - "documentation": [ + "docs": [ " Not imminent" ] }, { "name": "Early", - "documentation": [ + "docs": [ " Too early" ] }, { "name": "Imminent", - "documentation": [ + "docs": [ " Imminent" ] }, { "name": "PreimageMissing", - "documentation": [ + "docs": [ " Preimage not found" ] }, { "name": "ReferendumInvalid", - "documentation": [ + "docs": [ " Vote given for invalid referendum" ] }, { "name": "PreimageInvalid", - "documentation": [ + "docs": [ " Invalid preimage" ] }, { "name": "NoneWaiting", - "documentation": [ + "docs": [ " No proposals waiting" ] } @@ -3346,10 +3346,10 @@ "name": "Proposals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -3357,7 +3357,7 @@ "name": "ProposalOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "Proposal", @@ -3365,7 +3365,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -3373,7 +3373,7 @@ "name": "Voting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "Votes", @@ -3381,7 +3381,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -3389,10 +3389,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -3400,10 +3400,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] } @@ -3418,7 +3418,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set the collective's membership manually to `new_members`. Be nice to the chain and", " provide it pre-sorted.", "", @@ -3433,7 +3433,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective." @@ -3451,7 +3451,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " # ", " - Bounded storage reads and writes.", " - Argument `threshold` has bearing on weight.", @@ -3474,7 +3474,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " # ", " - Bounded storage read and writes.", " - Will be slightly heavier if the proposal is approved / disapproved after the vote.", @@ -3491,7 +3491,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`)." ] @@ -3505,7 +3505,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`)." ] @@ -3515,7 +3515,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold." ] }, @@ -3524,7 +3524,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold." ] }, @@ -3534,7 +3534,7 @@ "Hash", "bool" ], - "documentation": [ + "docs": [ " A motion was executed; `bool` is true if returned without error." ] }, @@ -3544,7 +3544,7 @@ "Hash", "bool" ], - "documentation": [ + "docs": [ " A single member did some action; `bool` is true if returned without error." ] } @@ -3553,37 +3553,37 @@ "errors": [ { "name": "NotMember", - "documentation": [ + "docs": [ " Account is not a member" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Duplicate proposals not allowed" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal must exist" ] }, { "name": "WrongIndex", - "documentation": [ + "docs": [ " Mismatched index" ] }, { "name": "DuplicateVote", - "documentation": [ + "docs": [ " Duplicate vote ignored" ] }, { "name": "AlreadyInitialized", - "documentation": [ + "docs": [ " Members are already initialized!" ] } @@ -3598,10 +3598,10 @@ "name": "Proposals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -3609,7 +3609,7 @@ "name": "ProposalOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "Proposal", @@ -3617,7 +3617,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -3625,7 +3625,7 @@ "name": "Voting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "Votes", @@ -3633,7 +3633,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -3641,10 +3641,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -3652,10 +3652,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] } @@ -3670,7 +3670,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set the collective's membership manually to `new_members`. Be nice to the chain and", " provide it pre-sorted.", "", @@ -3685,7 +3685,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective." @@ -3703,7 +3703,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " # ", " - Bounded storage reads and writes.", " - Argument `threshold` has bearing on weight.", @@ -3726,7 +3726,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " # ", " - Bounded storage read and writes.", " - Will be slightly heavier if the proposal is approved / disapproved after the vote.", @@ -3743,7 +3743,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`)." ] @@ -3757,7 +3757,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`)." ] @@ -3767,7 +3767,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold." ] }, @@ -3776,7 +3776,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold." ] }, @@ -3786,7 +3786,7 @@ "Hash", "bool" ], - "documentation": [ + "docs": [ " A motion was executed; `bool` is true if returned without error." ] }, @@ -3796,7 +3796,7 @@ "Hash", "bool" ], - "documentation": [ + "docs": [ " A single member did some action; `bool` is true if returned without error." ] } @@ -3805,37 +3805,37 @@ "errors": [ { "name": "NotMember", - "documentation": [ + "docs": [ " Account is not a member" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Duplicate proposals not allowed" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal must exist" ] }, { "name": "WrongIndex", - "documentation": [ + "docs": [ " Mismatched index" ] }, { "name": "DuplicateVote", - "documentation": [ + "docs": [ " Duplicate vote ignored" ] }, { "name": "AlreadyInitialized", - "documentation": [ + "docs": [ " Members are already initialized!" ] } @@ -3850,10 +3850,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec<(AccountId,BalanceOf)>" + "plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current elected membership. Sorted based on account id." ] }, @@ -3861,10 +3861,10 @@ "name": "RunnersUp", "modifier": "Default", "type": { - "Plain": "Vec<(AccountId,BalanceOf)>" + "plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current runners_up. Sorted based on low to high merit (worse to best runner)." ] }, @@ -3872,10 +3872,10 @@ "name": "ElectionRounds", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The total number of vote rounds that have happened, excluding the upcoming one." ] }, @@ -3883,7 +3883,7 @@ "name": "VotesOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Vec", @@ -3891,7 +3891,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes of a particular voter, with the round index of the votes." ] }, @@ -3899,7 +3899,7 @@ "name": "StakeOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "BalanceOf", @@ -3907,7 +3907,7 @@ } }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " Locked stake of a voter." ] }, @@ -3915,10 +3915,10 @@ "name": "Candidates", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The present candidate list. Sorted based on account-id. A current member or a runner can", " never enter this vector and is always implicitly assumed to be a candidate." ] @@ -3938,7 +3938,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Vote for a set of candidates for the upcoming round of election.", "", " The `votes` should:", @@ -3959,7 +3959,7 @@ { "name": "remove_voter", "args": [], - "documentation": [ + "docs": [ " Remove `origin` as a voter. This removes the lock and returns the bond.", "", " # ", @@ -3977,7 +3977,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Report `target` for being an defunct voter. In case of a valid report, the reporter is", " rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and", " their bond is slashed.", @@ -3996,7 +3996,7 @@ { "name": "submit_candidacy", "args": [], - "documentation": [ + "docs": [ " Submit oneself for candidacy.", "", " A candidate will either:", @@ -4015,7 +4015,7 @@ { "name": "renounce_candidacy", "args": [], - "documentation": [ + "docs": [ " Renounce one's intention to be a candidate for the next election round. 3 potential", " outcomes exist:", " - `origin` is a candidate and not elected in any set. In this case, the bond is", @@ -4035,7 +4035,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove a particular member from the set. This is effective immediately and the bond of", " the outgoing member is slashed.", "", @@ -4058,7 +4058,7 @@ "args": [ "Vec<(AccountId,Balance)>" ], - "documentation": [ + "docs": [ " A new term with new members. This indicates that enough candidates existed, not that", " enough have has been elected. The inner value must be examined for this purpose." ] @@ -4066,7 +4066,7 @@ { "name": "EmptyTerm", "args": [], - "documentation": [ + "docs": [ " No (or not enough) candidates existed for this round." ] }, @@ -4075,7 +4075,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A member has been removed. This should always be followed by either `NewTerm` ot", " `EmptyTerm`." ] @@ -4085,7 +4085,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A member has renounced their candidacy." ] }, @@ -4096,7 +4096,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A voter (first element) was reported (byt the second element) with the the report being", " successful or not (third element)." ] @@ -4107,115 +4107,115 @@ "name": "CandidacyBond", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [] + "docs": [] }, { "name": "VotingBond", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [] + "docs": [] }, { "name": "DesiredMembers", "type": "u32", "value": "0x0d000000", - "documentation": [] + "docs": [] }, { "name": "DesiredRunnersUp", "type": "u32", "value": "0x07000000", - "documentation": [] + "docs": [] }, { "name": "TermDuration", "type": "BlockNumber", "value": "0x80130300", - "documentation": [] + "docs": [] } ], "errors": [ { "name": "UnableToVote", - "documentation": [ + "docs": [ " Cannot vote when no candidates or members exist." ] }, { "name": "NoVotes", - "documentation": [ + "docs": [ " Must vote for at least one candidate." ] }, { "name": "TooManyVotes", - "documentation": [ + "docs": [ " Cannot vote more than candidates." ] }, { "name": "MaximumVotesExceeded", - "documentation": [ + "docs": [ " Cannot vote more than maximum allowed." ] }, { "name": "LowBalance", - "documentation": [ + "docs": [ " Cannot vote with stake less than minimum balance." ] }, { "name": "UnableToPayBond", - "documentation": [ + "docs": [ " Voter can not pay voting bond." ] }, { "name": "MustBeVoter", - "documentation": [ + "docs": [ " Must be a voter." ] }, { "name": "ReportSelf", - "documentation": [ + "docs": [ " Cannot report self." ] }, { "name": "DuplicatedCandidate", - "documentation": [ + "docs": [ " Duplicated candidate submission." ] }, { "name": "MemberSubmit", - "documentation": [ + "docs": [ " Member cannot re-submit candidacy." ] }, { "name": "RunnerSubmit", - "documentation": [ + "docs": [ " Runner cannot re-submit candidacy." ] }, { "name": "InsufficientCandidateFunds", - "documentation": [ + "docs": [ " Candidate does not have enough funds." ] }, { "name": "InvalidOrigin", - "documentation": [ + "docs": [ " Origin is not a candidate, member or a runner up." ] }, { "name": "NotMember", - "documentation": [ + "docs": [ " Not a member." ] } @@ -4230,10 +4230,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current membership, stored as an ordered Vec." ] } @@ -4248,7 +4248,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Add a member `who` to the set.", "", " May only be called from `AddOrigin` or root." @@ -4262,7 +4262,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Remove a member `who` from the set.", "", " May only be called from `RemoveOrigin` or root." @@ -4280,7 +4280,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out one member `remove` for another `add`.", "", " May only be called from `SwapOrigin` or root." @@ -4294,7 +4294,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Change the membership to a new set, disregarding the existing membership. Be nice and", " pass `members` pre-sorted.", "", @@ -4309,7 +4309,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out the sending member for some other key `new`.", "", " May only be called from `Signed` origin of a current member." @@ -4320,35 +4320,35 @@ { "name": "MemberAdded", "args": [], - "documentation": [ + "docs": [ " The given member was added; see the transaction for who." ] }, { "name": "MemberRemoved", "args": [], - "documentation": [ + "docs": [ " The given member was removed; see the transaction for who." ] }, { "name": "MembersSwapped", "args": [], - "documentation": [ + "docs": [ " Two members were swapped; see the transaction for who." ] }, { "name": "MembersReset", "args": [], - "documentation": [ + "docs": [ " The membership was reset; see the transaction for who the new set is." ] }, { "name": "KeyChanged", "args": [], - "documentation": [ + "docs": [ " One of the members' keys changed." ] }, @@ -4357,7 +4357,7 @@ "args": [ "PhantomData" ], - "documentation": [ + "docs": [ " Phantom member, never used." ] } @@ -4377,7 +4377,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Hint that the author of this block thinks the best finalized", " block is the given number." ] @@ -4389,7 +4389,7 @@ "name": "WindowSize", "type": "BlockNumber", "value": "0x65000000", - "documentation": [ + "docs": [ " The number of recent samples to keep from this chain. Default is 101." ] }, @@ -4397,7 +4397,7 @@ "name": "ReportLatency", "type": "BlockNumber", "value": "0xe8030000", - "documentation": [ + "docs": [ " The delay after which point things become suspicious. Default is 1000." ] } @@ -4405,13 +4405,13 @@ "errors": [ { "name": "AlreadyUpdated", - "documentation": [ + "docs": [ " Final hint must be updated only once in the block" ] }, { "name": "BadHint", - "documentation": [ + "docs": [ " Finalized height above block number" ] } @@ -4426,10 +4426,10 @@ "name": "Authorities", "modifier": "Default", "type": { - "Plain": "AuthorityList" + "plain": "AuthorityList" }, "fallback": "0x00", - "documentation": [ + "docs": [ " DEPRECATED", "", " This used to store the current authority set, which has been migrated to the well-known", @@ -4440,10 +4440,10 @@ "name": "State", "modifier": "Default", "type": { - "Plain": "StoredState" + "plain": "StoredState" }, "fallback": "0x00", - "documentation": [ + "docs": [ " State of the current authority set." ] }, @@ -4451,10 +4451,10 @@ "name": "PendingChange", "modifier": "Optional", "type": { - "Plain": "StoredPendingChange" + "plain": "StoredPendingChange" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending change: (signaled at, scheduled change)." ] }, @@ -4462,10 +4462,10 @@ "name": "NextForced", "modifier": "Optional", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00", - "documentation": [ + "docs": [ " next block number where we can force a change." ] }, @@ -4473,10 +4473,10 @@ "name": "Stalled", "modifier": "Optional", "type": { - "Plain": "(BlockNumber,BlockNumber)" + "plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " `true` if we are currently stalled." ] }, @@ -4484,10 +4484,10 @@ "name": "CurrentSetId", "modifier": "Default", "type": { - "Plain": "SetId" + "plain": "SetId" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The number of changes (both in terms of keys and underlying economic responsibilities)", " in the \"set\" of Grandpa validators from genesis." ] @@ -4496,7 +4496,7 @@ "name": "SetIdSession", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "SetId", "value": "SessionIndex", @@ -4504,7 +4504,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from grandpa set ID to the index of the *most recent* session for which its members were responsible." ] } @@ -4519,7 +4519,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Report some misbehavior." ] } @@ -4530,21 +4530,21 @@ "args": [ "AuthorityList" ], - "documentation": [ + "docs": [ " New authority set has been applied." ] }, { "name": "Paused", "args": [], - "documentation": [ + "docs": [ " Current authority set has been paused." ] }, { "name": "Resumed", "args": [], - "documentation": [ + "docs": [ " Current authority set has been resumed." ] } @@ -4553,27 +4553,27 @@ "errors": [ { "name": "PauseFailed", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA pause when the authority set isn't live", " (either paused or already pending pause)." ] }, { "name": "ResumeFailed", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA resume when the authority set isn't paused", " (either live or already pending resume)." ] }, { "name": "ChangePending", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA change with one already pending." ] }, { "name": "TooSoon", - "documentation": [ + "docs": [ " Cannot signal forced change so soon after last." ] } @@ -4588,10 +4588,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "ProposalIndex" + "plain": "ProposalIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Number of proposals that have been made." ] }, @@ -4599,7 +4599,7 @@ "name": "Proposals", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "ProposalIndex", "value": "TreasuryProposal", @@ -4607,7 +4607,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposals that have been made." ] }, @@ -4615,10 +4615,10 @@ "name": "Approvals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposal indices that have been approved but not yet awarded." ] }, @@ -4626,7 +4626,7 @@ "name": "Tips", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "Hash", "value": "OpenTip", @@ -4634,7 +4634,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Tips that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", " This has the insecure enumerable hash function since the key itself is already", " guaranteed to be a secure hash." @@ -4644,7 +4644,7 @@ "name": "Reasons", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "Hash", "value": "Bytes", @@ -4652,7 +4652,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Simple preimage lookup from the reason's hash to the original data. Again, has an", " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." ] @@ -4672,7 +4672,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Put forward a suggestion for spending. A deposit proportional to the value", " is reserved and slashed if the proposal is rejected. It is returned once the", " proposal is awarded.", @@ -4692,7 +4692,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Reject a proposed spend. The original deposit will be slashed.", "", " # ", @@ -4710,7 +4710,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", " and the original deposit will be returned.", "", @@ -4733,7 +4733,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Report something `reason` that deserves a tip and claim any eventual the finder's fee.", "", " The dispatch origin for this call must be _Signed_.", @@ -4763,7 +4763,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", "", " If successful, the original deposit will be unreserved.", @@ -4801,7 +4801,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " Give a tip for something new; no finder's fee will be taken.", "", " The dispatch origin for this call must be _Signed_ and the signing account must be a", @@ -4835,7 +4835,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " Declare a tip value for an already-open tip.", "", " The dispatch origin for this call must be _Signed_ and the signing account must be a", @@ -4865,7 +4865,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Close and payout a tip.", "", " The dispatch origin for this call must be _Signed_.", @@ -4889,7 +4889,7 @@ "args": [ "ProposalIndex" ], - "documentation": [ + "docs": [ " New proposal." ] }, @@ -4898,7 +4898,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " We have ended a spend period and will now allocate funds." ] }, @@ -4909,7 +4909,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " Some funds have been allocated." ] }, @@ -4919,7 +4919,7 @@ "ProposalIndex", "Balance" ], - "documentation": [ + "docs": [ " A proposal was rejected; funds were slashed." ] }, @@ -4928,7 +4928,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some of our funds have been burnt." ] }, @@ -4937,7 +4937,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Spending has finished; this is the amount that rolls over until next spend." ] }, @@ -4946,7 +4946,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some funds have been deposited." ] }, @@ -4955,7 +4955,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A new tip suggestion has been opened." ] }, @@ -4964,7 +4964,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A tip suggestion has reached threshold and is closing." ] }, @@ -4975,7 +4975,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A tip suggestion has been closed." ] }, @@ -4984,7 +4984,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A tip suggestion has been retracted." ] } @@ -4994,7 +4994,7 @@ "name": "ProposalBond", "type": "Permill", "value": "0x50c30000", - "documentation": [ + "docs": [ " Fraction of a proposal's value that should be bonded in order to place the proposal.", " An accepted proposal gets these back. A rejected proposal does not." ] @@ -5003,7 +5003,7 @@ "name": "ProposalBondMinimum", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Minimum amount of funds that should be placed in a deposit for making a proposal." ] }, @@ -5011,7 +5011,7 @@ "name": "SpendPeriod", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " Period between successive spends." ] }, @@ -5019,7 +5019,7 @@ "name": "Burn", "type": "Permill", "value": "0x20a10700", - "documentation": [ + "docs": [ " Percentage of spare funds (if any) that are burnt per spend period." ] }, @@ -5027,7 +5027,7 @@ "name": "TipCountdown", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " The period for which a tip remains open after is has achieved threshold tippers." ] }, @@ -5035,7 +5035,7 @@ "name": "TipFindersFee", "type": "Percent", "value": "0x14", - "documentation": [ + "docs": [ " The amount of the final tip which goes to the original reporter of the tip." ] }, @@ -5043,7 +5043,7 @@ "name": "TipReportDepositBase", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for placing a tip report." ] }, @@ -5051,7 +5051,7 @@ "name": "TipReportDepositPerByte", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit per byte within the tip report reason." ] } @@ -5059,49 +5059,49 @@ "errors": [ { "name": "InsufficientProposersBalance", - "documentation": [ + "docs": [ " Proposer's balance is too low." ] }, { "name": "InvalidProposalIndex", - "documentation": [ + "docs": [ " No proposal at that index." ] }, { "name": "ReasonTooBig", - "documentation": [ + "docs": [ " The reason given is just too big." ] }, { "name": "AlreadyKnown", - "documentation": [ + "docs": [ " The tip was already found/started." ] }, { "name": "UnknownTip", - "documentation": [ + "docs": [ " The tip hash is unknown." ] }, { "name": "NotFinder", - "documentation": [ + "docs": [ " The account attempting to retract the tip is not the finder of the tip." ] }, { "name": "StillOpen", - "documentation": [ + "docs": [ " The tip cannot be claimed/closed because there are not enough tippers yet." ] }, { "name": "Premature", - "documentation": [ + "docs": [ " The tip cannot be claimed/closed because it's still in the countdown period." ] } @@ -5116,10 +5116,10 @@ "name": "GasSpent", "modifier": "Default", "type": { - "Plain": "Gas" + "plain": "Gas" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Gas spent so far in this block." ] }, @@ -5127,10 +5127,10 @@ "name": "CurrentSchedule", "modifier": "Default", "type": { - "Plain": "Schedule" + "plain": "Schedule" }, "fallback": "0x0000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af0000000000000001000000000000000100000000000000040000000000010010000000004000000020000000", - "documentation": [ + "docs": [ " Current cost schedule for contracts." ] }, @@ -5138,7 +5138,7 @@ "name": "PristineCode", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "CodeHash", "value": "Bytes", @@ -5146,7 +5146,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from an original code hash to the original code, untouched by instrumentation." ] }, @@ -5154,7 +5154,7 @@ "name": "CodeStorage", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "CodeHash", "value": "PrefabWasmModule", @@ -5162,7 +5162,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping between an original code hash and instrumented wasm code, ready for execution." ] }, @@ -5170,10 +5170,10 @@ "name": "AccountCounter", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The subtrie counter." ] }, @@ -5181,7 +5181,7 @@ "name": "ContractInfoOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "ContractInfo", @@ -5189,7 +5189,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The code associated with a given account." ] }, @@ -5197,10 +5197,10 @@ "name": "GasPrice", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", - "documentation": [ + "docs": [ " The price of one unit of gas." ] } @@ -5215,7 +5215,7 @@ "type": "Schedule" } ], - "documentation": [ + "docs": [ " Updates the schedule for metering contracts.", "", " The schedule must have a greater version than the stored schedule." @@ -5233,7 +5233,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Stores the given binary Wasm code into the chain's storage and returns its `codehash`.", " You can instantiate contracts only with stored code." ] @@ -5258,7 +5258,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Makes a call to an account, optionally transferring some balance.", "", " * If the account is a smart-contract account, the associated code will be", @@ -5288,7 +5288,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Instantiates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance.", "", " Instantiation is executed as follows:", @@ -5313,7 +5313,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Allows block producers to claim a small reward for evicting a contract. If a block producer", " fails to do so, a regular users will be allowed to claim the reward.", "", @@ -5330,7 +5330,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Transfer happened `from` to `to` with given `value` as part of a `call` or `instantiate`." ] }, @@ -5340,7 +5340,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Contract deployed by address at the specified address." ] }, @@ -5349,7 +5349,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " Code with the specified hash has been stored." ] }, @@ -5358,7 +5358,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " Triggered when the current schedule is updated." ] }, @@ -5368,7 +5368,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A call was dispatched from the given account. The bool signals whether it was", " successful execution or not." ] @@ -5379,7 +5379,7 @@ "AccountId", "Bytes" ], - "documentation": [ + "docs": [ " An event from contract of account." ] } @@ -5389,7 +5389,7 @@ "name": "SignedClaimHandicap", "type": "BlockNumber", "value": "0x02000000", - "documentation": [ + "docs": [ " Number of block delay an extrinsic claim surcharge has.", "", " When claim surcharge is called by an extrinsic the rent is checked", @@ -5400,7 +5400,7 @@ "name": "TombstoneDeposit", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The minimum amount required to generate a tombstone." ] }, @@ -5408,7 +5408,7 @@ "name": "StorageSizeOffset", "type": "u32", "value": "0x08000000", - "documentation": [ + "docs": [ " Size of a contract at the time of instantiaion. This is a simple way to ensure that", " empty contracts eventually gets deleted." ] @@ -5417,7 +5417,7 @@ "name": "RentByteFee", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Price of a byte of storage per one block interval. Should be greater than 0." ] }, @@ -5425,7 +5425,7 @@ "name": "RentDepositOffset", "type": "BalanceOf", "value": "0x00008a5d784563010000000000000000", - "documentation": [ + "docs": [ " The amount of funds a contract should deposit in order to offset", " the cost of one byte.", "", @@ -5439,7 +5439,7 @@ "name": "SurchargeReward", "type": "BalanceOf", "value": "0x0080a1a76b4a35000000000000000000", - "documentation": [ + "docs": [ " Reward that is received by the party whose touch has led", " to removal of a contract." ] @@ -5448,7 +5448,7 @@ "name": "TransferFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to make a transfer." ] }, @@ -5456,7 +5456,7 @@ "name": "CreationFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to create an account." ] }, @@ -5464,7 +5464,7 @@ "name": "TransactionBaseFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the base." ] }, @@ -5472,7 +5472,7 @@ "name": "TransactionByteFee", "type": "BalanceOf", "value": "0x00e40b54020000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the per-byte portion." ] }, @@ -5480,7 +5480,7 @@ "name": "ContractFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to instantiate a contract instance. A reasonable default value", " is 21." ] @@ -5489,7 +5489,7 @@ "name": "CallBaseFee", "type": "Gas", "value": "0xe803000000000000", - "documentation": [ + "docs": [ " The base fee charged for calling into a contract. A reasonable default", " value is 135." ] @@ -5498,7 +5498,7 @@ "name": "InstantiateBaseFee", "type": "Gas", "value": "0xe803000000000000", - "documentation": [ + "docs": [ " The base fee charged for instantiating a contract. A reasonable default value", " is 175." ] @@ -5507,7 +5507,7 @@ "name": "MaxDepth", "type": "u32", "value": "0x20000000", - "documentation": [ + "docs": [ " The maximum nesting level of a call/instantiate stack. A reasonable default", " value is 100." ] @@ -5516,7 +5516,7 @@ "name": "MaxValueSize", "type": "u32", "value": "0x00400000", - "documentation": [ + "docs": [ " The maximum size of a storage value in bytes. A reasonable default is 16 KiB." ] }, @@ -5524,7 +5524,7 @@ "name": "BlockGasLimit", "type": "Gas", "value": "0x8096980000000000", - "documentation": [ + "docs": [ " The maximum amount of gas that could be expended per block. A reasonable", " default value is 10_000_000." ] @@ -5533,37 +5533,37 @@ "errors": [ { "name": "InvalidScheduleVersion", - "documentation": [ + "docs": [ " A new schedule must have a greater version than the current one." ] }, { "name": "InvalidSurchargeClaim", - "documentation": [ + "docs": [ " An origin must be signed or inherent and auxiliary sender only provided on inherent." ] }, { "name": "InvalidSourceContract", - "documentation": [ + "docs": [ " Cannot restore from nonexisting or tombstone contract." ] }, { "name": "InvalidDestinationContract", - "documentation": [ + "docs": [ " Cannot restore to nonexisting or alive contract." ] }, { "name": "InvalidTombstone", - "documentation": [ + "docs": [ " Tombstones don't match." ] }, { "name": "InvalidContractOrigin", - "documentation": [ + "docs": [ " An origin TrieId written in the current block." ] } @@ -5578,10 +5578,10 @@ "name": "Key", "modifier": "Default", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The `AccountId` of the sudo key." ] } @@ -5596,7 +5596,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Root` origin.", "", " The dispatch origin for this call must be _Signed_.", @@ -5617,7 +5617,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", "", " The dispatch origin for this call must be _Signed_.", @@ -5641,7 +5641,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Signed` origin from", " a given account.", "", @@ -5662,7 +5662,7 @@ "args": [ "bool" ], - "documentation": [ + "docs": [ " A sudo just took place." ] }, @@ -5671,7 +5671,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " The sudoer just switched identity; the old key is supplied." ] }, @@ -5680,7 +5680,7 @@ "args": [ "bool" ], - "documentation": [ + "docs": [ " A sudo just took place." ] } @@ -5689,7 +5689,7 @@ "errors": [ { "name": "RequireSudo", - "documentation": [ + "docs": [ " Sender must be the Sudo account" ] } @@ -5704,10 +5704,10 @@ "name": "GossipAt", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The block number when we should gossip." ] }, @@ -5715,10 +5715,10 @@ "name": "Keys", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of keys that may issue a heartbeat." ] }, @@ -5726,7 +5726,7 @@ "name": "ReceivedHeartbeats", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "SessionIndex", "key2": "AuthIndex", @@ -5735,7 +5735,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " For each session index, we keep a mapping of `AuthIndex`", " to `offchain::OpaqueNetworkState`." ] @@ -5744,7 +5744,7 @@ "name": "AuthoredBlocks", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "SessionIndex", "key2": "ValidatorId", @@ -5753,7 +5753,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " For each session index, we keep a mapping of `T::ValidatorId` to the", " number of blocks authored by the given authority." ] @@ -5773,7 +5773,7 @@ "type": "Signature" } ], - "documentation": [] + "docs": [] } ], "events": [ @@ -5782,14 +5782,14 @@ "args": [ "AuthorityId" ], - "documentation": [ + "docs": [ " A new heartbeat was received from `AuthorityId`" ] }, { "name": "AllGood", "args": [], - "documentation": [ + "docs": [ " At the end of the session, no offence was committed." ] }, @@ -5798,7 +5798,7 @@ "args": [ "Vec" ], - "documentation": [ + "docs": [ " At the end of the session, at least once validator was found to be offline." ] } @@ -5807,13 +5807,13 @@ "errors": [ { "name": "InvalidKey", - "documentation": [ + "docs": [ " Non existent public key." ] }, { "name": "DuplicatedHeartbeat", - "documentation": [ + "docs": [ " Duplicated heartbeat." ] } @@ -5836,7 +5836,7 @@ "name": "Reports", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "ReportIdOf", "value": "OffenceDetails", @@ -5844,7 +5844,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The primary structure that holds all offence records keyed by report identifiers." ] }, @@ -5852,7 +5852,7 @@ "name": "ConcurrentReportsIndex", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "Kind", "key2": "OpaqueTimeSlot", @@ -5861,7 +5861,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A vector of reports of the same kind that happened at the same time slot." ] }, @@ -5869,7 +5869,7 @@ "name": "ReportsByKindIndex", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Kind", "value": "Bytes", @@ -5877,7 +5877,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Enumerates all reports of a kind along with the time they happened.", "", " All reports are sorted by the time of offence.", @@ -5896,7 +5896,7 @@ "Kind", "OpaqueTimeSlot" ], - "documentation": [ + "docs": [ " There is an offence reported of the given `kind` happened at the `session_index` and", " (kind-specific) time slot. This event is not deposited for duplicate slashes." ] @@ -5914,10 +5914,10 @@ "name": "RandomMaterial", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Series of block headers from the last 81 blocks that acts as random seed material. This", " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", " the oldest hash." @@ -5939,7 +5939,7 @@ "name": "IdentityOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Registration", @@ -5947,7 +5947,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information that is pertinent to identify the entity behind an account." ] }, @@ -5955,7 +5955,7 @@ "name": "SuperOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "(AccountId,Data)", @@ -5963,7 +5963,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The super-identity of an alternative \"sub\" identity together with its name, within that", " context. If the account is not some other account's sub-identity, then just `None`." ] @@ -5972,7 +5972,7 @@ "name": "SubsOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "(BalanceOf,Vec)", @@ -5980,7 +5980,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " Alternative \"sub\" identities of this account.", "", " The first item is the deposit, the second is a vector of the accounts." @@ -5990,10 +5990,10 @@ "name": "Registrars", "modifier": "Default", "type": { - "Plain": "Vec>" + "plain": "Vec>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of registrars. Not expected to get very big as can only be added through a", " special origin (likely a council motion).", "", @@ -6011,7 +6011,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Add a registrar to the system.", "", " The dispatch origin for this call must be `RegistrarOrigin` or `Root`.", @@ -6035,7 +6035,7 @@ "type": "IdentityInfo" } ], - "documentation": [ + "docs": [ " Set an account's identity information and reserve the appropriate deposit.", "", " If the account already has identity information, the deposit is taken as part payment", @@ -6064,7 +6064,7 @@ "type": "Vec<(AccountId,Data)>" } ], - "documentation": [ + "docs": [ " Set the sub-accounts of the sender.", "", " Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", @@ -6086,7 +6086,7 @@ { "name": "clear_identity", "args": [], - "documentation": [ + "docs": [ " Clear an account's identity info and all sub-account and return all deposits.", "", " Payment: All reserved balances on the account are returned.", @@ -6116,7 +6116,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Request a judgement from a registrar.", "", " Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", @@ -6150,7 +6150,7 @@ "type": "RegistrarIndex" } ], - "documentation": [ + "docs": [ " Cancel a previous request.", "", " Payment: A previously reserved deposit is returned on success.", @@ -6182,7 +6182,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the fee required for a judgement to be requested from a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -6209,7 +6209,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Change the account associated with a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -6236,7 +6236,7 @@ "type": "IdentityFields" } ], - "documentation": [ + "docs": [ " Set the field information for a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -6267,7 +6267,7 @@ "type": "IdentityJudgement" } ], - "documentation": [ + "docs": [ " Provide a judgement for an account's identity.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -6297,7 +6297,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove an account's identity and sub-account information and slash the deposits.", "", " Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", @@ -6326,7 +6326,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A name was set or reset (which will remove all judgements)." ] }, @@ -6336,7 +6336,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was cleared, and the given balance returned." ] }, @@ -6346,7 +6346,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was removed and the given balance slashed." ] }, @@ -6356,7 +6356,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement was asked from a registrar." ] }, @@ -6366,7 +6366,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement request was retracted." ] }, @@ -6376,7 +6376,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement was given by a registrar." ] }, @@ -6385,7 +6385,7 @@ "args": [ "RegistrarIndex" ], - "documentation": [ + "docs": [ " A registrar was added." ] } @@ -6394,67 +6394,67 @@ "errors": [ { "name": "TooManySubAccounts", - "documentation": [ + "docs": [ " Too many subs-accounts." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Account isn't found." ] }, { "name": "NotNamed", - "documentation": [ + "docs": [ " Account isn't named." ] }, { "name": "EmptyIndex", - "documentation": [ + "docs": [ " Empty index." ] }, { "name": "FeeChanged", - "documentation": [ + "docs": [ " Fee is changed." ] }, { "name": "NoIdentity", - "documentation": [ + "docs": [ " No identity found." ] }, { "name": "StickyJudgement", - "documentation": [ + "docs": [ " Sticky judgement." ] }, { "name": "JudgementGiven", - "documentation": [ + "docs": [ " Judgement given." ] }, { "name": "InvalidJudgement", - "documentation": [ + "docs": [ " Invalid judgement." ] }, { "name": "InvalidIndex", - "documentation": [ + "docs": [ " The index is invalid." ] }, { "name": "InvalidTarget", - "documentation": [ + "docs": [ " The target is invalid." ] } @@ -6469,10 +6469,10 @@ "name": "Founder", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The first member." ] }, @@ -6480,10 +6480,10 @@ "name": "Rules", "modifier": "Optional", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A hash of the rules of this society concerning membership. Can only be set once and", " only by the founder." ] @@ -6492,10 +6492,10 @@ "name": "Candidates", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of candidates; bidders that are attempting to become members." ] }, @@ -6503,7 +6503,7 @@ "name": "SuspendedCandidates", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "(BalanceOf,BidKind)", @@ -6511,7 +6511,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of suspended candidates." ] }, @@ -6519,10 +6519,10 @@ "name": "Pot", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " Amount of our account balance that is specifically for the next round's bid(s)." ] }, @@ -6530,10 +6530,10 @@ "name": "Head", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The most primary from the most recently approved members." ] }, @@ -6541,10 +6541,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of members, ordered." ] }, @@ -6552,7 +6552,7 @@ "name": "SuspendedMembers", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "bool", @@ -6560,7 +6560,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of suspended members." ] }, @@ -6568,10 +6568,10 @@ "name": "Bids", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current bids, stored ordered by the value of the bid." ] }, @@ -6579,7 +6579,7 @@ "name": "Vouching", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "VouchingStatus", @@ -6587,7 +6587,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Members currently vouching or banned from vouching again" ] }, @@ -6595,7 +6595,7 @@ "name": "Payouts", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Vec<(BlockNumber,BalanceOf)>", @@ -6603,7 +6603,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending payouts; ordered by block number, with the amount that should be paid out." ] }, @@ -6611,7 +6611,7 @@ "name": "Strikes", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "StrikeCount", @@ -6619,7 +6619,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The ongoing number of losing votes cast by the member." ] }, @@ -6627,7 +6627,7 @@ "name": "Votes", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "AccountId", "key2": "AccountId", @@ -6636,7 +6636,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Double map from Candidate -> Voter -> (Maybe) Vote." ] }, @@ -6644,10 +6644,10 @@ "name": "Defender", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The defending member currently being challenged." ] }, @@ -6655,7 +6655,7 @@ "name": "DefenderVotes", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "SocietyVote", @@ -6663,7 +6663,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes for the defender." ] }, @@ -6671,10 +6671,10 @@ "name": "MaxMembers", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The max number of members for the society at one time." ] } @@ -6689,7 +6689,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " A user outside of the society can make a bid for entry.", "", " Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", @@ -6733,7 +6733,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " A bidder can remove their bid for entry into society.", " By doing so, they will have their candidate deposit returned or", " they will unvouch their voucher.", @@ -6771,7 +6771,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " As a member, vouch for someone to join society by placing a bid on their behalf.", "", " There is no deposit required to vouch for a new bid, but a member can only vouch for", @@ -6826,7 +6826,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " As a vouching member, unvouch a bid. This only works while vouched user is", " only a bidder (and not a candidate).", "", @@ -6858,7 +6858,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " As a member, vote on a candidate.", "", " The dispatch origin for this call must be _Signed_ and a member.", @@ -6888,7 +6888,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " As a member, vote on the defender.", "", " The dispatch origin for this call must be _Signed_ and a member.", @@ -6910,7 +6910,7 @@ { "name": "payout", "args": [], - "documentation": [ + "docs": [ " Transfer the first matured payout for the sender and remove it from the records.", "", " NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts.", @@ -6949,7 +6949,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Found the society.", "", " This is done as a discrete action in order to allow for the", @@ -6974,7 +6974,7 @@ { "name": "unfound", "args": [], - "documentation": [ + "docs": [ " Anull the founding of the society.", "", " The dispatch origin for this call must be Signed, and the signing account must be both", @@ -7002,7 +7002,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Allow suspension judgement origin to make judgement on a suspended member.", "", " If a suspended member is forgiven, we simply add them back as a member, not affecting", @@ -7044,7 +7044,7 @@ "type": "SocietyJudgement" } ], - "documentation": [ + "docs": [ " Allow suspended judgement origin to make judgement on a suspended candidate.", "", " If the judgement is `Approve`, we add them to society as a member with the appropriate", @@ -7095,7 +7095,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Allows root origin to change the maximum number of members in society.", " Max membership count must be greater than 1.", "", @@ -7119,7 +7119,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " The society is founded by the given identity." ] }, @@ -7129,7 +7129,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A membership bid just happened. The given account is the candidate's ID and their offer", " is the second." ] @@ -7141,7 +7141,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A membership bid just happened by vouching. The given account is the candidate's ID and", " their offer is the second. The vouching party is the third." ] @@ -7151,7 +7151,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A candidate was dropped (due to an excess of bids in the system)." ] }, @@ -7160,7 +7160,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A candidate was dropped (by their request)." ] }, @@ -7169,7 +7169,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A candidate was dropped (by request of who vouched for them)." ] }, @@ -7179,7 +7179,7 @@ "AccountId", "Vec" ], - "documentation": [ + "docs": [ " A group of candidates have been inducted. The batch's primary is the first value, the", " batch in full is the second." ] @@ -7190,7 +7190,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A suspended member has been judged" ] }, @@ -7199,7 +7199,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A candidate has been suspended" ] }, @@ -7208,7 +7208,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A member has been suspended" ] }, @@ -7217,7 +7217,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A member has been challenged" ] }, @@ -7228,7 +7228,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A vote has been placed (candidate, voter, vote)" ] }, @@ -7238,7 +7238,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A vote has been placed for a defending member (voter, vote)" ] }, @@ -7247,7 +7247,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " A new max member count has been set" ] }, @@ -7256,7 +7256,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " Society is unfounded." ] } @@ -7266,7 +7266,7 @@ "name": "CandidateDeposit", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [ + "docs": [ " The minimum amount of a deposit required for a bid to be made." ] }, @@ -7274,7 +7274,7 @@ "name": "WrongSideDeduction", "type": "BalanceOf", "value": "0x0080f420e6b500000000000000000000", - "documentation": [ + "docs": [ " The amount of the unpaid reward that gets deducted in the case that either a skeptic", " doesn't vote or someone votes in the wrong way." ] @@ -7283,7 +7283,7 @@ "name": "MaxStrikes", "type": "u32", "value": "0x0a000000", - "documentation": [ + "docs": [ " The number of times a member may vote the wrong way (or not at all, when they are a skeptic)", " before they become suspended." ] @@ -7292,7 +7292,7 @@ "name": "PeriodSpend", "type": "BalanceOf", "value": "0x0000c52ebca2b1000000000000000000", - "documentation": [ + "docs": [ " The amount of incentive paid within each period. Doesn't include VoterTip." ] }, @@ -7300,7 +7300,7 @@ "name": "RotationPeriod", "type": "BlockNumber", "value": "0x00770100", - "documentation": [ + "docs": [ " The number of blocks between candidate/membership rotation periods." ] }, @@ -7308,7 +7308,7 @@ "name": "ChallengePeriod", "type": "BlockNumber", "value": "0x80130300", - "documentation": [ + "docs": [ " The number of blocks between membership challenges." ] } @@ -7316,109 +7316,109 @@ "errors": [ { "name": "BadPosition", - "documentation": [ + "docs": [ " An incorrect position was provided." ] }, { "name": "NotMember", - "documentation": [ + "docs": [ " User is not a member." ] }, { "name": "AlreadyMember", - "documentation": [ + "docs": [ " User is already a member." ] }, { "name": "Suspended", - "documentation": [ + "docs": [ " User is suspended." ] }, { "name": "NotSuspended", - "documentation": [ + "docs": [ " User is not suspended." ] }, { "name": "NoPayout", - "documentation": [ + "docs": [ " Nothing to payout." ] }, { "name": "AlreadyFounded", - "documentation": [ + "docs": [ " Society already founded." ] }, { "name": "InsufficientPot", - "documentation": [ + "docs": [ " Not enough in pot to accept candidate." ] }, { "name": "AlreadyVouching", - "documentation": [ + "docs": [ " Member is already vouching or banned from vouching again." ] }, { "name": "NotVouching", - "documentation": [ + "docs": [ " Member is not vouching." ] }, { "name": "Head", - "documentation": [ + "docs": [ " Cannot remove the head of the chain." ] }, { "name": "Founder", - "documentation": [ + "docs": [ " Cannot remove the founder." ] }, { "name": "AlreadyBid", - "documentation": [ + "docs": [ " User has already made a bid." ] }, { "name": "AlreadyCandidate", - "documentation": [ + "docs": [ " User is already a candidate." ] }, { "name": "NotCandidate", - "documentation": [ + "docs": [ " User is not a candidate." ] }, { "name": "MaxMembers", - "documentation": [ + "docs": [ " Too many members in the society." ] }, { "name": "NotFounder", - "documentation": [ + "docs": [ " The caller is not the founder." ] }, { "name": "NotHead", - "documentation": [ + "docs": [ " The caller is not the head." ] } @@ -7433,7 +7433,7 @@ "name": "Recoverable", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "RecoveryConfig", @@ -7441,7 +7441,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of recoverable accounts and their recovery configuration." ] }, @@ -7449,7 +7449,7 @@ "name": "ActiveRecoveries", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "AccountId", "key2": "AccountId", @@ -7458,7 +7458,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Active recovery attempts.", "", " First account is the account to be recovered, and the second account", @@ -7469,7 +7469,7 @@ "name": "Recovered", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "AccountId", @@ -7477,7 +7477,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The final list of recovered accounts.", "", " Map from the recovered account to the user who can access it." @@ -7498,7 +7498,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Send a call through a recovered account.", "", " The dispatch origin for this call must be _Signed_ and registered to", @@ -7526,7 +7526,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow ROOT to bypass the recovery process and set an a rescuer account", " for a lost account directly.", "", @@ -7558,7 +7558,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Create a recovery configuration for your account. This makes your account recoverable.", "", " Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", @@ -7596,7 +7596,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Initiate the process for recovering a recoverable account.", "", " Payment: `RecoveryDeposit` balance will be reserved for initiating the", @@ -7633,7 +7633,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow a \"friend\" of a recoverable account to vouch for an active recovery", " process for that account.", "", @@ -7669,7 +7669,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow a successful rescuer to claim their recovered account.", "", " The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", @@ -7700,7 +7700,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " As the controller of a recoverable account, close an active recovery", " process for your account.", "", @@ -7726,7 +7726,7 @@ { "name": "remove_recovery", "args": [], - "documentation": [ + "docs": [ " Remove the recovery process for your account.", "", " NOTE: The user must make sure to call `close_recovery` on all active", @@ -7757,7 +7757,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been set up for an account" ] }, @@ -7767,7 +7767,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been initiated for account_1 by account_2" ] }, @@ -7778,7 +7778,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process for account_1 by account_2 has been vouched for by account_3" ] }, @@ -7788,7 +7788,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process for account_1 by account_2 has been closed" ] }, @@ -7798,7 +7798,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Account_1 has been successfully recovered by account_2" ] }, @@ -7807,7 +7807,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been removed for an account" ] } diff --git a/packages/polkadot/tests/meta/v11.json b/packages/polkadot/tests/meta/v11.json index 1f1b05e8..22ce8ddb 100644 --- a/packages/polkadot/tests/meta/v11.json +++ b/packages/polkadot/tests/meta/v11.json @@ -1,7 +1,7 @@ { "magicNumber": 1635018093, "metadata": { - "V11": { + "v11": { "modules": [ { "name": "System", @@ -12,7 +12,7 @@ "name": "Account", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "AccountInfo", @@ -20,7 +20,7 @@ } }, "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The full account information for a particular account ID." ] }, @@ -28,10 +28,10 @@ "name": "ExtrinsicCount", "modifier": "Optional", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total extrinsics count for the current block." ] }, @@ -39,10 +39,10 @@ "name": "BlockWeight", "modifier": "Default", "type": { - "Plain": "ExtrinsicsWeight" + "plain": "ExtrinsicsWeight" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The current weight for the block." ] }, @@ -50,10 +50,10 @@ "name": "AllExtrinsicsLen", "modifier": "Optional", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total length (in bytes) for all extrinsics put together, for the current block." ] }, @@ -61,7 +61,7 @@ "name": "BlockHash", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "BlockNumber", "value": "Hash", @@ -69,7 +69,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Map of block numbers to block hashes." ] }, @@ -77,7 +77,7 @@ "name": "ExtrinsicData", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "u32", "value": "Bytes", @@ -85,7 +85,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Extrinsics data for the current block (maps an extrinsic's index to its data)." ] }, @@ -93,10 +93,10 @@ "name": "Number", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The current block number being processed. Set by `execute_block`." ] }, @@ -104,10 +104,10 @@ "name": "ParentHash", "modifier": "Default", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Hash of the previous block." ] }, @@ -115,10 +115,10 @@ "name": "ExtrinsicsRoot", "modifier": "Default", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Extrinsics root of the current block, also part of the block header." ] }, @@ -126,10 +126,10 @@ "name": "Digest", "modifier": "Default", "type": { - "Plain": "DigestOf" + "plain": "DigestOf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Digest of the current block, also part of the block header." ] }, @@ -137,10 +137,10 @@ "name": "Events", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Events deposited for the current block." ] }, @@ -148,10 +148,10 @@ "name": "EventCount", "modifier": "Default", "type": { - "Plain": "EventIndex" + "plain": "EventIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of events in the `Events` list." ] }, @@ -159,7 +159,7 @@ "name": "EventTopics", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "Hash", "value": "Vec<(BlockNumber,EventIndex)>", @@ -167,7 +167,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Mapping between a topic (represented by T::Hash) and a vector of indexes", " of events in the `>` list.", "", @@ -184,10 +184,10 @@ "name": "LastRuntimeUpgrade", "modifier": "Optional", "type": { - "Plain": "LastRuntimeUpgradeInfo" + "plain": "LastRuntimeUpgradeInfo" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened." ] }, @@ -195,10 +195,10 @@ "name": "ExecutionPhase", "modifier": "Optional", "type": { - "Plain": "Phase" + "plain": "Phase" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The execution phase of the block." ] } @@ -213,7 +213,7 @@ "type": "Perbill" } ], - "documentation": [ + "docs": [ " A dispatch that will fill the block weight up to the given ratio." ] }, @@ -225,7 +225,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Make some on-chain remark.", "", " # ", @@ -243,7 +243,7 @@ "type": "u64" } ], - "documentation": [ + "docs": [ " Set the number of pages in the WebAssembly environment's heap.", "", " # ", @@ -262,7 +262,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set the new runtime code.", "", " # ", @@ -283,7 +283,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set the new runtime code without doing any checks of the given `code`.", "", " # ", @@ -302,7 +302,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Set the new changes trie configuration.", "", " # ", @@ -323,7 +323,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set some items of storage.", "", " # ", @@ -342,7 +342,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Kill some items from storage.", "", " # ", @@ -365,7 +365,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Kill all storage items with a key that starts with the given prefix.", "", " **NOTE:** We rely on the Root origin to provide us the number of subkeys under", @@ -382,7 +382,7 @@ { "name": "suicide", "args": [], - "documentation": [ + "docs": [ " Kill the sending account, assuming there are no references outstanding and the composite", " data is equal to its default value.", "", @@ -402,7 +402,7 @@ "args": [ "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic completed successfully. [info]" ] }, @@ -412,14 +412,14 @@ "DispatchError", "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic failed. [error, info]" ] }, { "name": "CodeUpdated", "args": [], - "documentation": [ + "docs": [ " `:code` was updated." ] }, @@ -428,7 +428,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A new [account] was created." ] }, @@ -437,7 +437,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An [account] was reaped." ] } @@ -447,7 +447,7 @@ "name": "BlockHashCount", "type": "BlockNumber", "value": "0x60090000", - "documentation": [ + "docs": [ " The maximum number of blocks to allow in mortal eras." ] }, @@ -455,7 +455,7 @@ "name": "MaximumBlockWeight", "type": "Weight", "value": "0x00204aa9d1010000", - "documentation": [ + "docs": [ " The maximum weight of a block." ] }, @@ -463,7 +463,7 @@ "name": "DbWeight", "type": "RuntimeDbWeight", "value": "0x40787d010000000000e1f50500000000", - "documentation": [ + "docs": [ " The weight of runtime database operations the runtime can invoke." ] }, @@ -471,7 +471,7 @@ "name": "BlockExecutionWeight", "type": "Weight", "value": "0x00f2052a01000000", - "documentation": [ + "docs": [ " The base weight of executing a block, independent of the transactions in the block." ] }, @@ -479,7 +479,7 @@ "name": "ExtrinsicBaseWeight", "type": "Weight", "value": "0x4059730700000000", - "documentation": [ + "docs": [ " The base weight of an Extrinsic in the block, independent of the of extrinsic being executed." ] }, @@ -487,7 +487,7 @@ "name": "MaximumBlockLength", "type": "u32", "value": "0x00005000", - "documentation": [ + "docs": [ " The maximum length of a block (in bytes)." ] } @@ -495,21 +495,21 @@ "errors": [ { "name": "InvalidSpecName", - "documentation": [ + "docs": [ " The name of specification does not match between the current runtime", " and the new runtime." ] }, { "name": "SpecVersionNeedsToIncrease", - "documentation": [ + "docs": [ " The specification version is not allowed to decrease between the current runtime", " and the new runtime." ] }, { "name": "FailedToExtractRuntimeVersion", - "documentation": [ + "docs": [ " Failed to extract the runtime version from the new runtime.", "", " Either calling `Core_version` or decoding `RuntimeVersion` failed." @@ -517,13 +517,13 @@ }, { "name": "NonDefaultComposite", - "documentation": [ + "docs": [ " Suicide called when the account has non-default composite data." ] }, { "name": "NonZeroRefCount", - "documentation": [ + "docs": [ " There is a non-zero reference count preventing the account from being purged." ] } @@ -541,7 +541,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Send a batch of dispatch calls.", "", " May be called from any origin.", @@ -576,7 +576,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Send a call through an indexed pseudonym of the sender.", "", " Filter from origin are passed along. The call will be dispatched with an origin which", @@ -600,7 +600,7 @@ "u32", "DispatchError" ], - "documentation": [ + "docs": [ " Batch of dispatches did not complete fully. Index of first failing dispatch given, as", " well as the error. [index, error]" ] @@ -608,7 +608,7 @@ { "name": "BatchCompleted", "args": [], - "documentation": [ + "docs": [ " Batch of dispatches completed fully with no error." ] } @@ -625,10 +625,10 @@ "name": "EpochIndex", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current epoch index." ] }, @@ -636,10 +636,10 @@ "name": "Authorities", "modifier": "Default", "type": { - "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + "plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Current epoch authorities." ] }, @@ -647,10 +647,10 @@ "name": "GenesisSlot", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The slot at which the first epoch actually started. This is 0", " until the first block of the chain." ] @@ -659,10 +659,10 @@ "name": "CurrentSlot", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current slot number." ] }, @@ -670,10 +670,10 @@ "name": "Randomness", "modifier": "Default", "type": { - "Plain": "Randomness" + "plain": "Randomness" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The epoch randomness for the *current* epoch.", "", " # Security", @@ -690,10 +690,10 @@ "name": "NextEpochConfig", "modifier": "Optional", "type": { - "Plain": "NextConfigDescriptor" + "plain": "NextConfigDescriptor" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Next epoch configuration, if changed." ] }, @@ -701,10 +701,10 @@ "name": "NextRandomness", "modifier": "Default", "type": { - "Plain": "Randomness" + "plain": "Randomness" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Next epoch randomness." ] }, @@ -712,10 +712,10 @@ "name": "SegmentIndex", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Randomness under construction.", "", " We make a tradeoff between storage accesses and list length.", @@ -731,7 +731,7 @@ "name": "UnderConstruction", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "u32", "value": "Vec", @@ -739,7 +739,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay." ] }, @@ -747,10 +747,10 @@ "name": "Initialized", "modifier": "Optional", "type": { - "Plain": "MaybeRandomness" + "plain": "MaybeRandomness" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Temporary value (cleared at block finalization) which is `Some`", " if per-block initialization has already been called for current block." ] @@ -759,10 +759,10 @@ "name": "Lateness", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " How late the current block is compared to its parent.", "", " This entry is populated as part of block execution and is cleaned up", @@ -785,7 +785,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report authority equivocation/misbehavior. This method will verify", " the equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence will", @@ -804,7 +804,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report authority equivocation/misbehavior. This method will verify", " the equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence will", @@ -822,7 +822,7 @@ "name": "EpochDuration", "type": "u64", "value": "0xc800000000000000", - "documentation": [ + "docs": [ " The number of **slots** that an epoch takes. We couple sessions to", " epochs, i.e. we start a new session once the new epoch begins." ] @@ -831,7 +831,7 @@ "name": "ExpectedBlockTime", "type": "Moment", "value": "0xb80b000000000000", - "documentation": [ + "docs": [ " The expected average block time at which BABE should be creating", " blocks. Since BABE is probabilistic it is not trivial to figure out", " what the expected average block time should be based on the slot", @@ -851,10 +851,10 @@ "name": "Now", "modifier": "Default", "type": { - "Plain": "Moment" + "plain": "Moment" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current time for the current block." ] }, @@ -862,10 +862,10 @@ "name": "DidUpdate", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Did the timestamp get updated in this block?" ] } @@ -880,7 +880,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the current time.", "", " This call should be invoked exactly once per block. It will panic at the finalization", @@ -905,7 +905,7 @@ "name": "MinimumPeriod", "type": "Moment", "value": "0xdc05000000000000", - "documentation": [ + "docs": [ " The minimum period between blocks. Beware that this is different to the *expected* period", " that the block production apparatus provides. Your chosen consensus system will generally", " work with this to determine a sensible block time. e.g. For Aura, it will be double this", @@ -924,10 +924,10 @@ "name": "Uncles", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Uncles" ] }, @@ -935,10 +935,10 @@ "name": "Author", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Author of current block." ] }, @@ -946,10 +946,10 @@ "name": "DidSetUncles", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Whether uncles were already set in this block." ] } @@ -964,7 +964,7 @@ "type": "Vec
" } ], - "documentation": [ + "docs": [ " Provide a set of uncles." ] } @@ -974,43 +974,43 @@ "errors": [ { "name": "InvalidUncleParent", - "documentation": [ + "docs": [ " The uncle parent not in the chain." ] }, { "name": "UnclesAlreadySet", - "documentation": [ + "docs": [ " Uncles already set in the block." ] }, { "name": "TooManyUncles", - "documentation": [ + "docs": [ " Too many uncles." ] }, { "name": "GenesisUncle", - "documentation": [ + "docs": [ " The uncle is genesis." ] }, { "name": "TooHighUncle", - "documentation": [ + "docs": [ " The uncle is too high in chain." ] }, { "name": "UncleAlreadyIncluded", - "documentation": [ + "docs": [ " The uncle is already included." ] }, { "name": "OldUncle", - "documentation": [ + "docs": [ " The uncle isn't recent enough to be included." ] } @@ -1025,7 +1025,7 @@ "name": "Accounts", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountIndex", "value": "(AccountId,BalanceOf,bool)", @@ -1033,7 +1033,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The lookup from index to account." ] } @@ -1048,7 +1048,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Assign an previously unassigned index.", "", " Payment: `Deposit` is reserved from the sender account.", @@ -1082,7 +1082,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Assign an index already owned by the sender to another account. The balance reservation", " is effectively transferred to the new account.", "", @@ -1114,7 +1114,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Free up an index owned by the sender.", "", " Payment: Any previous deposit placed for the index is unreserved in the sender account.", @@ -1152,7 +1152,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Force an index to an account. This doesn't require a deposit. If the index is already", " held, then any deposit is reimbursed to its current owner.", "", @@ -1185,7 +1185,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Freeze an index so it will always point to the sender account. This consumes the deposit.", "", " The dispatch origin for this call must be _Signed_ and the signing account must have a", @@ -1214,7 +1214,7 @@ "AccountId", "AccountIndex" ], - "documentation": [ + "docs": [ " A account index was assigned. [who, index]" ] }, @@ -1223,7 +1223,7 @@ "args": [ "AccountIndex" ], - "documentation": [ + "docs": [ " A account index has been freed up (unassigned). [index]" ] }, @@ -1233,7 +1233,7 @@ "AccountIndex", "AccountId" ], - "documentation": [ + "docs": [ " A account index has been frozen to its current account ID. [who, index]" ] } @@ -1243,7 +1243,7 @@ "name": "Deposit", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The deposit needed for reserving an index." ] } @@ -1259,10 +1259,10 @@ "name": "TotalIssuance", "modifier": "Default", "type": { - "Plain": "Balance" + "plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The total units issued in the system." ] }, @@ -1270,7 +1270,7 @@ "name": "Account", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "AccountData", @@ -1278,7 +1278,7 @@ } }, "fallback": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The balance of an account.", "", " NOTE: This is only used in the case that this module is used to store balances." @@ -1288,7 +1288,7 @@ "name": "Locks", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "Vec", @@ -1296,7 +1296,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any liquidity locks on some account balances.", " NOTE: Should only be accessed when setting, changing and freeing a lock." ] @@ -1305,10 +1305,10 @@ "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "Releases" + "plain": "Releases" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage version of the pallet.", "", " This is set to v2.0.0 for new networks." @@ -1329,7 +1329,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Transfer some liquid free balance to another account.", "", " `transfer` will set the `FreeBalance` of the sender and receiver.", @@ -1375,7 +1375,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the balances of a given account.", "", " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", @@ -1412,7 +1412,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Exactly as `transfer`, except the origin must be root and the source account may be", " specified.", " # ", @@ -1433,7 +1433,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Same as the [`transfer`] call, but with a check that the transfer will not kill the", " origin account.", "", @@ -1455,7 +1455,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account was created with some free balance. [account, free_balance]" ] }, @@ -1465,7 +1465,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account was removed whose balance was non-zero but below ExistentialDeposit,", " resulting in an outright loss. [account, balance]" ] @@ -1477,7 +1477,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Transfer succeeded. [from, to, value]" ] }, @@ -1488,7 +1488,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " A balance was set by root. [who, free, reserved]" ] }, @@ -1498,7 +1498,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some amount was deposited (e.g. for transaction fees). [who, deposit]" ] }, @@ -1508,7 +1508,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some balance was reserved (moved from free to reserved). [who, value]" ] }, @@ -1518,7 +1518,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some balance was unreserved (moved from reserved to free). [who, value]" ] }, @@ -1530,7 +1530,7 @@ "Balance", "BalanceStatus" ], - "documentation": [ + "docs": [ " Some balance was moved from the reserve of the first account to the second account.", " Final argument indicates the destination balance type.", " [from, to, balance, destination_status]" @@ -1542,7 +1542,7 @@ "name": "ExistentialDeposit", "type": "Balance", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The minimum amount required to keep an account open." ] } @@ -1550,49 +1550,49 @@ "errors": [ { "name": "VestingBalance", - "documentation": [ + "docs": [ " Vesting balance too high to send value" ] }, { "name": "LiquidityRestrictions", - "documentation": [ + "docs": [ " Account liquidity restrictions prevent withdrawal" ] }, { "name": "Overflow", - "documentation": [ + "docs": [ " Got an overflow after adding" ] }, { "name": "InsufficientBalance", - "documentation": [ + "docs": [ " Balance too low to send value" ] }, { "name": "ExistentialDeposit", - "documentation": [ + "docs": [ " Value too low to create account due to existential deposit" ] }, { "name": "KeepAlive", - "documentation": [ + "docs": [ " Transfer/payment would kill account" ] }, { "name": "ExistingVestingSchedule", - "documentation": [ + "docs": [ " A vesting schedule already exists for this account" ] }, { "name": "DeadAccount", - "documentation": [ + "docs": [ " Beneficiary account must pre-exist" ] } @@ -1607,19 +1607,19 @@ "name": "NextFeeMultiplier", "modifier": "Default", "type": { - "Plain": "Multiplier" + "plain": "Multiplier" }, "fallback": "0x000064a7b3b6e00d0000000000000000", - "documentation": [] + "docs": [] }, { "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "Releases" + "plain": "Releases" }, "fallback": "0x00", - "documentation": [] + "docs": [] } ] }, @@ -1630,7 +1630,7 @@ "name": "TransactionByteFee", "type": "BalanceOf", "value": "0x00e40b54020000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the per-byte portion." ] }, @@ -1638,7 +1638,7 @@ "name": "WeightToFee", "type": "Vec", "value": "0x0401000000000000000000000000000000000000000001", - "documentation": [ + "docs": [ " The polynomial that is applied in order to derive fee from weight." ] } @@ -1654,10 +1654,10 @@ "name": "HistoryDepth", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x54000000", - "documentation": [ + "docs": [ " Number of eras to keep in history.", "", " Information is kept for eras in `[current_era - history_depth; current_era]`.", @@ -1671,10 +1671,10 @@ "name": "ValidatorCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The ideal number of staking participants." ] }, @@ -1682,10 +1682,10 @@ "name": "MinimumValidatorCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Minimum number of staking participants before emergency conditions are imposed." ] }, @@ -1693,10 +1693,10 @@ "name": "Invulnerables", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", " easy to initialize and the performance hit is minimal (we expect no more than four", " invulnerables) and restricted to testnets." @@ -1706,7 +1706,7 @@ "name": "Bonded", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "AccountId", @@ -1714,7 +1714,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all locked \"stash\" accounts to the controller account." ] }, @@ -1722,7 +1722,7 @@ "name": "Ledger", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "StakingLedger", @@ -1730,7 +1730,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." ] }, @@ -1738,7 +1738,7 @@ "name": "Payee", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "RewardDestination", @@ -1746,7 +1746,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Where the reward payment should be made. Keyed by stash." ] }, @@ -1754,7 +1754,7 @@ "name": "Validators", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "ValidatorPrefs", @@ -1762,7 +1762,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The map from (wannabe) validator stash key to the preferences of that validator." ] }, @@ -1770,7 +1770,7 @@ "name": "Nominators", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "Nominations", @@ -1778,7 +1778,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The map from nominator stash key to the set of stash keys of all validators to nominate." ] }, @@ -1786,10 +1786,10 @@ "name": "CurrentEra", "modifier": "Optional", "type": { - "Plain": "EraIndex" + "plain": "EraIndex" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current era index.", "", " This is the latest planned era, depending on how the Session pallet queues the validator", @@ -1800,10 +1800,10 @@ "name": "ActiveEra", "modifier": "Optional", "type": { - "Plain": "ActiveEraInfo" + "plain": "ActiveEraInfo" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The active era information, it holds index and start.", "", " The active era is the era currently rewarded.", @@ -1814,7 +1814,7 @@ "name": "ErasStartSessionIndex", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "SessionIndex", @@ -1822,7 +1822,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The session index at which the era start for the last `HISTORY_DEPTH` eras." ] }, @@ -1830,7 +1830,7 @@ "name": "ErasStakers", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -1839,7 +1839,7 @@ } }, "fallback": "0x000000", - "documentation": [ + "docs": [ " Exposure of validator at era.", "", " This is keyed first by the era index to allow bulk deletion and then the stash account.", @@ -1852,7 +1852,7 @@ "name": "ErasStakersClipped", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -1861,7 +1861,7 @@ } }, "fallback": "0x000000", - "documentation": [ + "docs": [ " Clipped Exposure of validator at era.", "", " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the", @@ -1879,7 +1879,7 @@ "name": "ErasValidatorPrefs", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -1888,7 +1888,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Similar to `ErasStakers`, this holds the preferences of validators.", "", " This is keyed first by the era index to allow bulk deletion and then the stash account.", @@ -1900,7 +1900,7 @@ "name": "ErasValidatorReward", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "BalanceOf", @@ -1908,7 +1908,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The total validator era payout for the last `HISTORY_DEPTH` eras.", "", " Eras that haven't finished yet or has been removed doesn't have reward." @@ -1918,7 +1918,7 @@ "name": "ErasRewardPoints", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "EraRewardPoints", @@ -1926,7 +1926,7 @@ } }, "fallback": "0x0000000000", - "documentation": [ + "docs": [ " Rewards for the last `HISTORY_DEPTH` eras.", " If reward hasn't been set or has been removed then 0 reward is returned." ] @@ -1935,7 +1935,7 @@ "name": "ErasTotalStake", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "BalanceOf", @@ -1943,7 +1943,7 @@ } }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The total amount staked for the last `HISTORY_DEPTH` eras.", " If total hasn't been set or has been removed then 0 stake is returned." ] @@ -1952,10 +1952,10 @@ "name": "ForceEra", "modifier": "Default", "type": { - "Plain": "Forcing" + "plain": "Forcing" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Mode of era forcing." ] }, @@ -1963,10 +1963,10 @@ "name": "SlashRewardFraction", "modifier": "Default", "type": { - "Plain": "Perbill" + "plain": "Perbill" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The percentage of the slash that is distributed to reporters.", "", " The rest of the slashed value is handled by the `Slash`." @@ -1976,10 +1976,10 @@ "name": "CanceledSlashPayout", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The amount of currency given to reporters of a slash event which was", " canceled by extraordinary circumstances (e.g. governance)." ] @@ -1988,7 +1988,7 @@ "name": "UnappliedSlashes", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "Vec", @@ -1996,7 +1996,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All unapplied slashes that are queued for later." ] }, @@ -2004,10 +2004,10 @@ "name": "BondedEras", "modifier": "Default", "type": { - "Plain": "Vec<(EraIndex,SessionIndex)>" + "plain": "Vec<(EraIndex,SessionIndex)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from still-bonded eras to the first session index of that era.", "", " Must contains information for eras for the range:", @@ -2018,7 +2018,7 @@ "name": "ValidatorSlashInEra", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -2027,7 +2027,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on validators, mapped by era to the highest slash proportion", " and slash value of the era." ] @@ -2036,7 +2036,7 @@ "name": "NominatorSlashInEra", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -2045,7 +2045,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on nominators, mapped by era to the highest slash value of the era." ] }, @@ -2053,7 +2053,7 @@ "name": "SlashingSpans", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "SlashingSpans", @@ -2061,7 +2061,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Slashing spans for stash accounts." ] }, @@ -2069,7 +2069,7 @@ "name": "SpanSlash", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "(AccountId,SpanIndex)", "value": "SpanRecord", @@ -2077,7 +2077,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Records information about the maximum slash of a stash within a slashing span,", " as well as how much reward has been paid out." ] @@ -2086,10 +2086,10 @@ "name": "EarliestUnappliedSlash", "modifier": "Optional", "type": { - "Plain": "EraIndex" + "plain": "EraIndex" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The earliest era for which we have a pending, unapplied slash." ] }, @@ -2097,10 +2097,10 @@ "name": "SnapshotValidators", "modifier": "Optional", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Snapshot of validators at the beginning of the current election window. This should only", " have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`." ] @@ -2109,10 +2109,10 @@ "name": "SnapshotNominators", "modifier": "Optional", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Snapshot of nominators at the beginning of the current election window. This should only", " have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`." ] @@ -2121,10 +2121,10 @@ "name": "QueuedElected", "modifier": "Optional", "type": { - "Plain": "ElectionResult" + "plain": "ElectionResult" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The next validator set. At the end of an era, if this is available (potentially from the", " result of an offchain worker), it is immediately used. Otherwise, the on-chain election", " is executed." @@ -2134,10 +2134,10 @@ "name": "QueuedScore", "modifier": "Optional", "type": { - "Plain": "ElectionScore" + "plain": "ElectionScore" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The score of the current [`QueuedElected`]." ] }, @@ -2145,10 +2145,10 @@ "name": "EraElectionStatus", "modifier": "Default", "type": { - "Plain": "ElectionStatus" + "plain": "ElectionStatus" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Flag to control the execution of the offchain election. When `Open(_)`, we accept", " solutions to be submitted." ] @@ -2157,10 +2157,10 @@ "name": "IsCurrentSessionFinal", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the current **planned** session is final. Note that this does not take era", " forcing into account." ] @@ -2169,10 +2169,10 @@ "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "Releases" + "plain": "Releases" }, "fallback": "0x03", - "documentation": [ + "docs": [ " True if network has been upgraded to this version.", " Storage version of the pallet.", "", @@ -2198,7 +2198,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " Take the origin account as a stash and lock up `value` of its balance. `controller` will", " be the account that controls it.", "", @@ -2231,7 +2231,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add some extra amount that have appeared in the stash `free_balance` into the balance up", " for staking.", "", @@ -2264,7 +2264,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", " period ends. If this leaves an amount actively bonded less than", " T::Currency::minimum_balance(), then it is increased to the full amount.", @@ -2307,7 +2307,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Remove any unlocked chunks from the `unlocking` queue from our management.", "", " This essentially frees up that balance to be used by the stash account to do", @@ -2348,7 +2348,7 @@ "type": "ValidatorPrefs" } ], - "documentation": [ + "docs": [ " Declare the desire to validate for the origin controller.", "", " Effects will be felt at the beginning of the next era.", @@ -2376,7 +2376,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Declare the desire to nominate `targets` for the origin controller.", "", " Effects will be felt at the beginning of the next era. This can only be called when", @@ -2401,7 +2401,7 @@ { "name": "chill", "args": [], - "documentation": [ + "docs": [ " Declare no desire to either validate or nominate.", "", " Effects will be felt at the beginning of the next era.", @@ -2429,7 +2429,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " (Re-)set the payment target for a controller.", "", " Effects will be felt at the beginning of the next era.", @@ -2456,7 +2456,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " (Re-)set the controller of a stash.", "", " Effects will be felt at the beginning of the next era.", @@ -2483,7 +2483,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Sets the ideal number of validators.", "", " The dispatch origin must be Root.", @@ -2502,7 +2502,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Increments the ideal number of validators.", "", " The dispatch origin must be Root.", @@ -2521,7 +2521,7 @@ "type": "Percent" } ], - "documentation": [ + "docs": [ " Scale up the ideal number of validators by a factor.", "", " The dispatch origin must be Root.", @@ -2535,7 +2535,7 @@ { "name": "force_no_eras", "args": [], - "documentation": [ + "docs": [ " Force there to be no new eras indefinitely.", "", " The dispatch origin must be Root.", @@ -2550,7 +2550,7 @@ { "name": "force_new_era", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of the next session. After this, it will be", " reset to normal (non-forced) behaviour.", "", @@ -2571,7 +2571,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set the validators who cannot be slashed (if any).", "", " The dispatch origin must be Root.", @@ -2595,7 +2595,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Force a current staker to become completely unstaked, immediately.", "", " The dispatch origin must be Root.", @@ -2612,7 +2612,7 @@ { "name": "force_new_era_always", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of sessions indefinitely.", "", " The dispatch origin must be Root.", @@ -2635,7 +2635,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Cancel enactment of a deferred slash.", "", " Can be called by the `T::SlashCancelOrigin`.", @@ -2664,7 +2664,7 @@ "type": "EraIndex" } ], - "documentation": [ + "docs": [ " Pay out all the stakers behind a single validator for a single era.", "", " - `validator_stash` is the stash account of the validator. Their nominators, up to", @@ -2700,7 +2700,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Rebond a portion of the stash scheduled to be unlocked.", "", " The dispatch origin must be signed by the controller, and it can be only called when", @@ -2730,7 +2730,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set `HistoryDepth` value. This function will delete any history information", " when `HistoryDepth` is reduced.", "", @@ -2766,7 +2766,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Remove all data structure concerning a staker/stash once its balance is zero.", " This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone", " and the target `stash` must have no funds left.", @@ -2809,7 +2809,7 @@ "type": "ElectionSize" } ], - "documentation": [ + "docs": [ " Submit an election result to the chain. If the solution:", "", " 1. is valid.", @@ -2883,7 +2883,7 @@ "type": "ElectionSize" } ], - "documentation": [ + "docs": [ " Unsigned version of `submit_election_solution`.", "", " Note that this must pass the [`ValidateUnsigned`] check which only allows transactions", @@ -2904,7 +2904,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " The era payout has been set; the first balance is the validator-payout; the second is", " the remainder from the maximum amount of reward.", " [era_index, validator_payout, remainder]" @@ -2916,7 +2916,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " The staker has been rewarded by this amount. [stash, amount]" ] }, @@ -2926,7 +2926,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " One validator (and its nominators) has been slashed by the given amount.", " [validator, amount]" ] @@ -2936,7 +2936,7 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " An old slashing report from a prior era was discarded because it could", " not be processed. [session_index]" ] @@ -2946,7 +2946,7 @@ "args": [ "ElectionCompute" ], - "documentation": [ + "docs": [ " A new set of stakers was elected with the given [compute]." ] }, @@ -2955,7 +2955,7 @@ "args": [ "ElectionCompute" ], - "documentation": [ + "docs": [ " A new solution for the upcoming election has been stored. [compute]" ] }, @@ -2965,7 +2965,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has bonded this amount. [stash, amount]", "", " NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,", @@ -2978,7 +2978,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has unbonded this amount. [stash, amount]" ] }, @@ -2988,7 +2988,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`", " from the unlocking queue. [stash, amount]" ] @@ -2999,7 +2999,7 @@ "name": "SessionsPerEra", "type": "SessionIndex", "value": "0x06000000", - "documentation": [ + "docs": [ " Number of sessions per era." ] }, @@ -3007,7 +3007,7 @@ "name": "BondingDuration", "type": "EraIndex", "value": "0xa0020000", - "documentation": [ + "docs": [ " Number of eras that staked funds must remain bonded for." ] }, @@ -3015,7 +3015,7 @@ "name": "SlashDeferDuration", "type": "EraIndex", "value": "0xa8000000", - "documentation": [ + "docs": [ " Number of eras that slashes are deferred by, after computation.", "", " This should be less than the bonding duration.", @@ -3027,7 +3027,7 @@ "name": "ElectionLookahead", "type": "BlockNumber", "value": "0x32000000", - "documentation": [ + "docs": [ " The number of blocks before the end of the era from which election submissions are allowed.", "", " Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will", @@ -3041,7 +3041,7 @@ "name": "MaxIterations", "type": "u32", "value": "0x0a000000", - "documentation": [ + "docs": [ " Maximum number of balancing iterations to run in the offchain submission.", "", " If set to 0, balance_solution will not be executed at all." @@ -3051,7 +3051,7 @@ "name": "MinSolutionScoreBump", "type": "Perbill", "value": "0x20a10700", - "documentation": [ + "docs": [ " The threshold of improvement that should be provided for a new solution to be accepted." ] }, @@ -3059,7 +3059,7 @@ "name": "MaxNominatorRewardedPerValidator", "type": "u32", "value": "0x40000000", - "documentation": [ + "docs": [ " The maximum number of nominators rewarded for each validator.", "", " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim", @@ -3070,190 +3070,190 @@ "errors": [ { "name": "NotController", - "documentation": [ + "docs": [ " Not a controller account." ] }, { "name": "NotStash", - "documentation": [ + "docs": [ " Not a stash account." ] }, { "name": "AlreadyBonded", - "documentation": [ + "docs": [ " Stash is already bonded." ] }, { "name": "AlreadyPaired", - "documentation": [ + "docs": [ " Controller is already paired." ] }, { "name": "EmptyTargets", - "documentation": [ + "docs": [ " Targets cannot be empty." ] }, { "name": "DuplicateIndex", - "documentation": [ + "docs": [ " Duplicate index." ] }, { "name": "InvalidSlashIndex", - "documentation": [ + "docs": [ " Slash record index out of bounds." ] }, { "name": "InsufficientValue", - "documentation": [ + "docs": [ " Can not bond with value less than minimum balance." ] }, { "name": "NoMoreChunks", - "documentation": [ + "docs": [ " Can not schedule more unlock chunks." ] }, { "name": "NoUnlockChunk", - "documentation": [ + "docs": [ " Can not rebond without unlocking chunks." ] }, { "name": "FundedTarget", - "documentation": [ + "docs": [ " Attempting to target a stash that still has funds." ] }, { "name": "InvalidEraToReward", - "documentation": [ + "docs": [ " Invalid era to reward." ] }, { "name": "InvalidNumberOfNominations", - "documentation": [ + "docs": [ " Invalid number of nominations." ] }, { "name": "NotSortedAndUnique", - "documentation": [ + "docs": [ " Items are not sorted and unique." ] }, { "name": "AlreadyClaimed", - "documentation": [ + "docs": [ " Rewards for this era have already been claimed for this validator." ] }, { "name": "OffchainElectionEarlySubmission", - "documentation": [ + "docs": [ " The submitted result is received out of the open window." ] }, { "name": "OffchainElectionWeakSubmission", - "documentation": [ + "docs": [ " The submitted result is not as good as the one stored on chain." ] }, { "name": "SnapshotUnavailable", - "documentation": [ + "docs": [ " The snapshot data of the current window is missing." ] }, { "name": "OffchainElectionBogusWinnerCount", - "documentation": [ + "docs": [ " Incorrect number of winners were presented." ] }, { "name": "OffchainElectionBogusWinner", - "documentation": [ + "docs": [ " One of the submitted winners is not an active candidate on chain (index is out of range", " in snapshot)." ] }, { "name": "OffchainElectionBogusCompact", - "documentation": [ + "docs": [ " Error while building the assignment type from the compact. This can happen if an index", " is invalid, or if the weights _overflow_." ] }, { "name": "OffchainElectionBogusNominator", - "documentation": [ + "docs": [ " One of the submitted nominators is not an active nominator on chain." ] }, { "name": "OffchainElectionBogusNomination", - "documentation": [ + "docs": [ " One of the submitted nominators has an edge to which they have not voted on chain." ] }, { "name": "OffchainElectionSlashedNomination", - "documentation": [ + "docs": [ " One of the submitted nominators has an edge which is submitted before the last non-zero", " slash of the target." ] }, { "name": "OffchainElectionBogusSelfVote", - "documentation": [ + "docs": [ " A self vote must only be originated from a validator to ONLY themselves." ] }, { "name": "OffchainElectionBogusEdge", - "documentation": [ + "docs": [ " The submitted result has unknown edges that are not among the presented winners." ] }, { "name": "OffchainElectionBogusScore", - "documentation": [ + "docs": [ " The claimed score does not match with the one computed from the data." ] }, { "name": "OffchainElectionBogusElectionSize", - "documentation": [ + "docs": [ " The election size is invalid." ] }, { "name": "CallNotAllowed", - "documentation": [ + "docs": [ " The call is not allowed at the given time due to restrictions of election period." ] }, { "name": "IncorrectHistoryDepth", - "documentation": [ + "docs": [ " Incorrect previous history depth input provided." ] }, { "name": "IncorrectSlashingSpans", - "documentation": [ + "docs": [ " Incorrect number of slashing spans provided." ] } @@ -3268,10 +3268,10 @@ "name": "Validators", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of validators." ] }, @@ -3279,10 +3279,10 @@ "name": "CurrentIndex", "modifier": "Default", "type": { - "Plain": "SessionIndex" + "plain": "SessionIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Current index of the session." ] }, @@ -3290,10 +3290,10 @@ "name": "QueuedChanged", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the underlying economic identities or weighting behind the validators", " has changed in the queued validator set." ] @@ -3302,10 +3302,10 @@ "name": "QueuedKeys", "modifier": "Default", "type": { - "Plain": "Vec<(ValidatorId,Keys)>" + "plain": "Vec<(ValidatorId,Keys)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The queued keys for the next session. When the next session begins, these keys", " will be used to determine the validator's session keys." ] @@ -3314,10 +3314,10 @@ "name": "DisabledValidators", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Indices of disabled validators.", "", " The set is cleared when `on_session_ending` returns a new set of identities." @@ -3327,7 +3327,7 @@ "name": "NextKeys", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "ValidatorId", "value": "Keys", @@ -3335,7 +3335,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The next session keys for a validator." ] }, @@ -3343,7 +3343,7 @@ "name": "KeyOwner", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "(KeyTypeId,Bytes)", "value": "ValidatorId", @@ -3351,7 +3351,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The owner of a key. The key is the `KeyTypeId` + the encoded key." ] } @@ -3370,7 +3370,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Sets the session key(s) of the function caller to `keys`.", " Allows an account to set its session key prior to becoming a validator.", " This doesn't take effect until the next session.", @@ -3390,7 +3390,7 @@ { "name": "purge_keys", "args": [], - "documentation": [ + "docs": [ " Removes any session key(s) of the function caller.", " This doesn't take effect until the next session.", "", @@ -3412,7 +3412,7 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " New session has happened. Note that the argument is the [session_index], not the block", " number as the type might suggest." ] @@ -3422,25 +3422,25 @@ "errors": [ { "name": "InvalidProof", - "documentation": [ + "docs": [ " Invalid ownership proof." ] }, { "name": "NoAssociatedValidatorId", - "documentation": [ + "docs": [ " No associated validator ID for account." ] }, { "name": "DuplicatedKey", - "documentation": [ + "docs": [ " Registered duplicate key." ] }, { "name": "NoKeys", - "documentation": [ + "docs": [ " No keys are associated with this account." ] } @@ -3455,10 +3455,10 @@ "name": "PublicPropCount", "modifier": "Default", "type": { - "Plain": "PropIndex" + "plain": "PropIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of (public) proposals that have been made so far." ] }, @@ -3466,10 +3466,10 @@ "name": "PublicProps", "modifier": "Default", "type": { - "Plain": "Vec<(PropIndex,Hash,AccountId)>" + "plain": "Vec<(PropIndex,Hash,AccountId)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The public proposals. Unsorted. The second item is the proposal's hash." ] }, @@ -3477,7 +3477,7 @@ "name": "DepositOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "PropIndex", "value": "(Vec,BalanceOf)", @@ -3485,7 +3485,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Those who have locked a deposit.", "", " TWOX-NOTE: Safe, as increasing integer keys are safe." @@ -3495,7 +3495,7 @@ "name": "Preimages", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "PreimageStatus", @@ -3503,7 +3503,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map of hashes to the proposal preimage, along with who registered it and their deposit.", " The block number is the block at which it was deposited." ] @@ -3512,10 +3512,10 @@ "name": "ReferendumCount", "modifier": "Default", "type": { - "Plain": "ReferendumIndex" + "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The next free referendum index, aka the number of referenda started so far." ] }, @@ -3523,10 +3523,10 @@ "name": "LowestUnbaked", "modifier": "Default", "type": { - "Plain": "ReferendumIndex" + "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The lowest referendum index representing an unbaked referendum. Equal to", " `ReferendumCount` if there isn't a unbaked referendum." ] @@ -3535,7 +3535,7 @@ "name": "ReferendumInfoOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "ReferendumIndex", "value": "ReferendumInfo", @@ -3543,7 +3543,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information concerning any given referendum.", "", " TWOX-NOTE: SAFE as indexes are not under an attacker’s control." @@ -3553,7 +3553,7 @@ "name": "VotingOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "Voting", @@ -3561,7 +3561,7 @@ } }, "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " All votes for a particular voter. We store the balance for the number of votes that we", " have recorded. The second item is the total amount of delegations, that will be added.", "", @@ -3572,7 +3572,7 @@ "name": "Locks", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "BlockNumber", @@ -3580,7 +3580,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Accounts for which there are locks in action which may be removed at some point in the", " future. The value is the block number at which the lock expires and may be removed.", "", @@ -3591,10 +3591,10 @@ "name": "LastTabledWasExternal", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the last referendum tabled was submitted externally. False if it was a public", " proposal." ] @@ -3603,10 +3603,10 @@ "name": "NextExternal", "modifier": "Optional", "type": { - "Plain": "(Hash,VoteThreshold)" + "plain": "(Hash,VoteThreshold)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The referendum to be tabled whenever it would be valid to table an external proposal.", " This happens when a referendum needs to be tabled and one of two conditions are met:", " - `LastTabledWasExternal` is `false`; or", @@ -3617,7 +3617,7 @@ "name": "Blacklist", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "(BlockNumber,Vec)", @@ -3625,7 +3625,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A record of who vetoed what. Maps proposal hash to a possible existent block number", " (until when it may not be resubmitted) and who vetoed it." ] @@ -3634,7 +3634,7 @@ "name": "Cancellations", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "bool", @@ -3642,7 +3642,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Record of all proposals that have been subject to emergency cancellation." ] }, @@ -3650,10 +3650,10 @@ "name": "StorageVersion", "modifier": "Optional", "type": { - "Plain": "Releases" + "plain": "Releases" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage version of the pallet.", "", " New networks start with last version." @@ -3674,7 +3674,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Propose a sensitive action to be taken.", "", " The dispatch origin of this call must be _Signed_ and the sender must", @@ -3704,7 +3704,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Signals agreement with a particular proposal.", "", " The dispatch origin of this call must be _Signed_ and the sender", @@ -3733,7 +3733,7 @@ "type": "AccountVote" } ], - "documentation": [ + "docs": [ " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", " otherwise it is a vote to keep the status quo.", "", @@ -3758,7 +3758,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", " referendum.", "", @@ -3781,7 +3781,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a referendum to be tabled once it is legal to schedule an external", " referendum.", "", @@ -3805,7 +3805,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", " an external referendum.", "", @@ -3830,7 +3830,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", " schedule an external referendum.", "", @@ -3863,7 +3863,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Schedule the currently externally-proposed majority-carries referendum to be tabled", " immediately. If there is no externally-proposed referendum currently, or if there is one", " but it is not a majority-carries referendum then it fails.", @@ -3894,7 +3894,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Veto and blacklist the external proposal hash.", "", " The dispatch origin of this call must be `VetoOrigin`.", @@ -3919,7 +3919,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove a referendum.", "", " The dispatch origin of this call must be _Root_.", @@ -3940,7 +3940,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Cancel a proposal queued for enactment.", "", " The dispatch origin of this call must be _Root_.", @@ -3970,7 +3970,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " Delegate the voting power (with some given conviction) of the sending account.", "", " The balance delegated is locked for as long as it's delegated, and thereafter for the", @@ -4002,7 +4002,7 @@ { "name": "undelegate", "args": [], - "documentation": [ + "docs": [ " Undelegate the voting power of the sending account.", "", " Tokens may be unlocked following once an amount of time consistent with the lock period", @@ -4026,7 +4026,7 @@ { "name": "clear_public_proposals", "args": [], - "documentation": [ + "docs": [ " Clears all public proposals.", "", " The dispatch origin of this call must be _Root_.", @@ -4045,7 +4045,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", " in the dispatch queue but does require a deposit, returned once enacted.", "", @@ -4070,7 +4070,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Same as `note_preimage` but origin is `OperationalPreimageOrigin`." ] }, @@ -4082,7 +4082,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This requires the proposal to be", " in the dispatch queue. No deposit is needed. When this call is successful, i.e.", " the preimage has not been uploaded before and matches some imminent proposal,", @@ -4109,7 +4109,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`." ] }, @@ -4125,7 +4125,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove an expired proposal preimage and collect the deposit.", "", " The dispatch origin of this call must be _Signed_.", @@ -4155,7 +4155,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Unlock tokens that have an expired lock.", "", " The dispatch origin of this call must be _Signed_.", @@ -4177,7 +4177,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Remove a vote for a referendum.", "", " If:", @@ -4223,7 +4223,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Remove a vote for a referendum.", "", " If the `target` is equal to the signer, then this function is exactly equivalent to", @@ -4257,7 +4257,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Enact a proposal from a referendum. For now we just make the weight be the maximum." ] } @@ -4269,7 +4269,7 @@ "PropIndex", "Balance" ], - "documentation": [ + "docs": [ " A motion has been proposed by a public account. [proposal_index, deposit]" ] }, @@ -4280,14 +4280,14 @@ "Balance", "Vec" ], - "documentation": [ + "docs": [ " A public proposal has been tabled for referendum vote. [proposal_index, deposit, depositors]" ] }, { "name": "ExternalTabled", "args": [], - "documentation": [ + "docs": [ " An external proposal has been tabled." ] }, @@ -4297,7 +4297,7 @@ "ReferendumIndex", "VoteThreshold" ], - "documentation": [ + "docs": [ " A referendum has begun. [ref_index, threshold]" ] }, @@ -4306,7 +4306,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been approved by referendum. [ref_index]" ] }, @@ -4315,7 +4315,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been rejected by referendum. [ref_index]" ] }, @@ -4324,7 +4324,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A referendum has been cancelled. [ref_index]" ] }, @@ -4334,7 +4334,7 @@ "ReferendumIndex", "bool" ], - "documentation": [ + "docs": [ " A proposal has been enacted. [ref_index, is_ok]" ] }, @@ -4344,7 +4344,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An account has delegated their vote to another account. [who, target]" ] }, @@ -4353,7 +4353,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An [account] has cancelled a previous delegation operation." ] }, @@ -4364,7 +4364,7 @@ "Hash", "BlockNumber" ], - "documentation": [ + "docs": [ " An external proposal has been vetoed. [who, proposal_hash, until]" ] }, @@ -4375,7 +4375,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal's preimage was noted, and the deposit taken. [proposal_hash, who, deposit]" ] }, @@ -4386,7 +4386,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal preimage was removed and used (the deposit was returned).", " [proposal_hash, provider, deposit]" ] @@ -4397,7 +4397,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was invalid. [proposal_hash, ref_index]" ] }, @@ -4407,7 +4407,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was missing. [proposal_hash, ref_index]" ] }, @@ -4419,7 +4419,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A registered preimage was removed and the deposit collected by the reaper.", " [proposal_hash, provider, deposit, reaper]" ] @@ -4429,7 +4429,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An [account] has been unlocked successfully." ] } @@ -4439,7 +4439,7 @@ "name": "EnactmentPeriod", "type": "BlockNumber", "value": "0x002f0d00", - "documentation": [ + "docs": [ " The minimum period of locking and the period between a proposal being approved and enacted.", "", " It should generally be a little more than the unstake period to ensure that", @@ -4451,7 +4451,7 @@ "name": "LaunchPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) new public referenda are launched." ] }, @@ -4459,7 +4459,7 @@ "name": "VotingPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) to check for new votes." ] }, @@ -4467,7 +4467,7 @@ "name": "MinimumDeposit", "type": "BalanceOf", "value": "0x0000c16ff28623000000000000000000", - "documentation": [ + "docs": [ " The minimum amount to be used as a deposit for a public referendum proposal." ] }, @@ -4475,7 +4475,7 @@ "name": "FastTrackVotingPeriod", "type": "BlockNumber", "value": "0x80510100", - "documentation": [ + "docs": [ " Minimum voting period allowed for an emergency referendum." ] }, @@ -4483,7 +4483,7 @@ "name": "CooloffPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " Period in blocks where an external proposal may not be re-submitted after being vetoed." ] }, @@ -4491,7 +4491,7 @@ "name": "PreimageByteDeposit", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount of balance that must be deposited per byte of preimage stored." ] }, @@ -4499,7 +4499,7 @@ "name": "MaxVotes", "type": "u32", "value": "0x64000000", - "documentation": [ + "docs": [ " The maximum number of votes for an account." ] } @@ -4507,200 +4507,200 @@ "errors": [ { "name": "ValueLow", - "documentation": [ + "docs": [ " Value too low" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal does not exist" ] }, { "name": "BadIndex", - "documentation": [ + "docs": [ " Unknown index" ] }, { "name": "AlreadyCanceled", - "documentation": [ + "docs": [ " Cannot cancel the same proposal twice" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Proposal already made" ] }, { "name": "ProposalBlacklisted", - "documentation": [ + "docs": [ " Proposal still blacklisted" ] }, { "name": "NotSimpleMajority", - "documentation": [ + "docs": [ " Next external proposal not simple majority" ] }, { "name": "InvalidHash", - "documentation": [ + "docs": [ " Invalid hash" ] }, { "name": "NoProposal", - "documentation": [ + "docs": [ " No external proposal" ] }, { "name": "AlreadyVetoed", - "documentation": [ + "docs": [ " Identity may not veto a proposal twice" ] }, { "name": "NotDelegated", - "documentation": [ + "docs": [ " Not delegated" ] }, { "name": "DuplicatePreimage", - "documentation": [ + "docs": [ " Preimage already noted" ] }, { "name": "NotImminent", - "documentation": [ + "docs": [ " Not imminent" ] }, { "name": "TooEarly", - "documentation": [ + "docs": [ " Too early" ] }, { "name": "Imminent", - "documentation": [ + "docs": [ " Imminent" ] }, { "name": "PreimageMissing", - "documentation": [ + "docs": [ " Preimage not found" ] }, { "name": "ReferendumInvalid", - "documentation": [ + "docs": [ " Vote given for invalid referendum" ] }, { "name": "PreimageInvalid", - "documentation": [ + "docs": [ " Invalid preimage" ] }, { "name": "NoneWaiting", - "documentation": [ + "docs": [ " No proposals waiting" ] }, { "name": "NotLocked", - "documentation": [ + "docs": [ " The target account does not have a lock." ] }, { "name": "NotExpired", - "documentation": [ + "docs": [ " The lock on the account to be unlocked has not yet expired." ] }, { "name": "NotVoter", - "documentation": [ + "docs": [ " The given account did not vote on the referendum." ] }, { "name": "NoPermission", - "documentation": [ + "docs": [ " The actor has no permission to conduct the action." ] }, { "name": "AlreadyDelegating", - "documentation": [ + "docs": [ " The account is already delegating." ] }, { "name": "Overflow", - "documentation": [ + "docs": [ " An unexpected integer overflow occurred." ] }, { "name": "Underflow", - "documentation": [ + "docs": [ " An unexpected integer underflow occurred." ] }, { "name": "InsufficientFunds", - "documentation": [ + "docs": [ " Too high a balance was provided that the account cannot afford." ] }, { "name": "NotDelegating", - "documentation": [ + "docs": [ " The account is not currently delegating." ] }, { "name": "VotesExist", - "documentation": [ + "docs": [ " The account currently has votes attached to it and the operation cannot succeed until", " these are removed, either through `unvote` or `reap_vote`." ] }, { "name": "InstantNotAllowed", - "documentation": [ + "docs": [ " The instant referendum origin is currently disallowed." ] }, { "name": "Nonsense", - "documentation": [ + "docs": [ " Delegation to oneself makes no sense." ] }, { "name": "WrongUpperBound", - "documentation": [ + "docs": [ " Invalid upper bound." ] }, { "name": "MaxVotesReached", - "documentation": [ + "docs": [ " Maximum number of votes reached." ] } @@ -4715,10 +4715,10 @@ "name": "Proposals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -4726,7 +4726,7 @@ "name": "ProposalOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Proposal", @@ -4734,7 +4734,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -4742,7 +4742,7 @@ "name": "Voting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Votes", @@ -4750,7 +4750,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -4758,10 +4758,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -4769,10 +4769,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] }, @@ -4780,10 +4780,10 @@ "name": "Prime", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The member who provides the default vote for any other members that do not vote before", " the timeout. If None, then no member has that privilege." ] @@ -4807,7 +4807,7 @@ "type": "MemberCount" } ], - "documentation": [ + "docs": [ " Set the collective's membership.", "", " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", @@ -4846,7 +4846,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective.", @@ -4875,7 +4875,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add a new proposal to either be voted on or executed directly.", "", " Requires the sender to be member.", @@ -4921,7 +4921,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Add an aye or nay vote for the sender to the given proposal.", "", " Requires the sender to be a member.", @@ -4956,7 +4956,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Close a vote that is either approved, disapproved or whose voting period has ended.", "", " May be called by any signed account in order to finish voting and close the proposal.", @@ -4994,7 +4994,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", "", " Must be called by the Root origin.", @@ -5020,7 +5020,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`).", " [account, proposal_index, proposal_hash, threshold]" @@ -5035,7 +5035,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`).", " [account, proposal_hash, voted, yes, no]" @@ -5046,7 +5046,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold.", " [proposal_hash]" ] @@ -5056,7 +5056,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold.", " [proposal_hash]" ] @@ -5067,7 +5067,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A motion was executed; result will be `Ok` if it returned without error.", " [proposal_hash, result]" ] @@ -5078,7 +5078,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A single member did some action; result will be `Ok` if it returned without error.", " [proposal_hash, result]" ] @@ -5090,7 +5090,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A proposal was closed because its threshold was reached or after its duration was up.", " [proposal_hash, yes, no]" ] @@ -5100,61 +5100,61 @@ "errors": [ { "name": "NotMember", - "documentation": [ + "docs": [ " Account is not a member" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Duplicate proposals not allowed" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal must exist" ] }, { "name": "WrongIndex", - "documentation": [ + "docs": [ " Mismatched index" ] }, { "name": "DuplicateVote", - "documentation": [ + "docs": [ " Duplicate vote ignored" ] }, { "name": "AlreadyInitialized", - "documentation": [ + "docs": [ " Members are already initialized!" ] }, { "name": "TooEarly", - "documentation": [ + "docs": [ " The close call was made too early, before the end of the voting." ] }, { "name": "TooManyProposals", - "documentation": [ + "docs": [ " There can only be a maximum of `MaxProposals` active proposals." ] }, { "name": "WrongProposalWeight", - "documentation": [ + "docs": [ " The given weight bound for the proposal was too low." ] }, { "name": "WrongProposalLength", - "documentation": [ + "docs": [ " The given length bound for the proposal was too low." ] } @@ -5169,10 +5169,10 @@ "name": "Proposals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -5180,7 +5180,7 @@ "name": "ProposalOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Proposal", @@ -5188,7 +5188,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -5196,7 +5196,7 @@ "name": "Voting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Votes", @@ -5204,7 +5204,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -5212,10 +5212,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -5223,10 +5223,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] }, @@ -5234,10 +5234,10 @@ "name": "Prime", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The member who provides the default vote for any other members that do not vote before", " the timeout. If None, then no member has that privilege." ] @@ -5261,7 +5261,7 @@ "type": "MemberCount" } ], - "documentation": [ + "docs": [ " Set the collective's membership.", "", " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", @@ -5300,7 +5300,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective.", @@ -5329,7 +5329,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add a new proposal to either be voted on or executed directly.", "", " Requires the sender to be member.", @@ -5375,7 +5375,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Add an aye or nay vote for the sender to the given proposal.", "", " Requires the sender to be a member.", @@ -5410,7 +5410,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Close a vote that is either approved, disapproved or whose voting period has ended.", "", " May be called by any signed account in order to finish voting and close the proposal.", @@ -5448,7 +5448,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", "", " Must be called by the Root origin.", @@ -5474,7 +5474,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`).", " [account, proposal_index, proposal_hash, threshold]" @@ -5489,7 +5489,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`).", " [account, proposal_hash, voted, yes, no]" @@ -5500,7 +5500,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold.", " [proposal_hash]" ] @@ -5510,7 +5510,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold.", " [proposal_hash]" ] @@ -5521,7 +5521,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A motion was executed; result will be `Ok` if it returned without error.", " [proposal_hash, result]" ] @@ -5532,7 +5532,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A single member did some action; result will be `Ok` if it returned without error.", " [proposal_hash, result]" ] @@ -5544,7 +5544,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A proposal was closed because its threshold was reached or after its duration was up.", " [proposal_hash, yes, no]" ] @@ -5554,61 +5554,61 @@ "errors": [ { "name": "NotMember", - "documentation": [ + "docs": [ " Account is not a member" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Duplicate proposals not allowed" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal must exist" ] }, { "name": "WrongIndex", - "documentation": [ + "docs": [ " Mismatched index" ] }, { "name": "DuplicateVote", - "documentation": [ + "docs": [ " Duplicate vote ignored" ] }, { "name": "AlreadyInitialized", - "documentation": [ + "docs": [ " Members are already initialized!" ] }, { "name": "TooEarly", - "documentation": [ + "docs": [ " The close call was made too early, before the end of the voting." ] }, { "name": "TooManyProposals", - "documentation": [ + "docs": [ " There can only be a maximum of `MaxProposals` active proposals." ] }, { "name": "WrongProposalWeight", - "documentation": [ + "docs": [ " The given weight bound for the proposal was too low." ] }, { "name": "WrongProposalLength", - "documentation": [ + "docs": [ " The given length bound for the proposal was too low." ] } @@ -5623,10 +5623,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec<(AccountId,BalanceOf)>" + "plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current elected membership. Sorted based on account id." ] }, @@ -5634,10 +5634,10 @@ "name": "RunnersUp", "modifier": "Default", "type": { - "Plain": "Vec<(AccountId,BalanceOf)>" + "plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current runners_up. Sorted based on low to high merit (worse to best runner)." ] }, @@ -5645,10 +5645,10 @@ "name": "ElectionRounds", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The total number of vote rounds that have happened, excluding the upcoming one." ] }, @@ -5656,7 +5656,7 @@ "name": "Voting", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "(BalanceOf,Vec)", @@ -5664,7 +5664,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " Votes and locked stake of a particular voter.", "", " TWOX-NOTE: SAFE as `AccountId` is a crypto hash" @@ -5674,10 +5674,10 @@ "name": "Candidates", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The present candidate list. Sorted based on account-id. A current member or runner-up", " can never enter this vector and is always implicitly assumed to be a candidate." ] @@ -5697,7 +5697,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Vote for a set of candidates for the upcoming round of election. This can be called to", " set the initial votes, or update already existing votes.", "", @@ -5728,7 +5728,7 @@ { "name": "remove_voter", "args": [], - "documentation": [ + "docs": [ " Remove `origin` as a voter. This removes the lock and returns the bond.", "", " # ", @@ -5752,7 +5752,7 @@ "type": "DefunctVoter" } ], - "documentation": [ + "docs": [ " Report `target` for being an defunct voter. In case of a valid report, the reporter is", " rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and", " their bond is slashed.", @@ -5790,7 +5790,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Submit oneself for candidacy.", "", " A candidate will either:", @@ -5822,7 +5822,7 @@ "type": "Renouncing" } ], - "documentation": [ + "docs": [ " Renounce one's intention to be a candidate for the next election round. 3 potential", " outcomes exist:", " - `origin` is a candidate and not elected in any set. In this case, the bond is", @@ -5875,7 +5875,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Remove a particular member from the set. This is effective immediately and the bond of", " the outgoing member is slashed.", "", @@ -5903,7 +5903,7 @@ "args": [ "Vec<(AccountId,Balance)>" ], - "documentation": [ + "docs": [ " A new term with [new_members]. This indicates that enough candidates existed to run the", " election, not that enough have has been elected. The inner value must be examined for", " this purpose. A `NewTerm([])` indicates that some candidates got their bond slashed and", @@ -5913,7 +5913,7 @@ { "name": "EmptyTerm", "args": [], - "documentation": [ + "docs": [ " No (or not enough) candidates existed for this round. This is different from", " `NewTerm([])`. See the description of `NewTerm`." ] @@ -5923,7 +5923,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A [member] has been removed. This should always be followed by either `NewTerm` ot", " `EmptyTerm`." ] @@ -5933,7 +5933,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A [member] has renounced their candidacy." ] }, @@ -5944,7 +5944,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A voter was reported with the the report being successful or not.", " [voter, reporter, success]" ] @@ -5955,139 +5955,139 @@ "name": "CandidacyBond", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [] + "docs": [] }, { "name": "VotingBond", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [] + "docs": [] }, { "name": "DesiredMembers", "type": "u32", "value": "0x0d000000", - "documentation": [] + "docs": [] }, { "name": "DesiredRunnersUp", "type": "u32", "value": "0x07000000", - "documentation": [] + "docs": [] }, { "name": "TermDuration", "type": "BlockNumber", "value": "0x80130300", - "documentation": [] + "docs": [] }, { "name": "ModuleId", "type": "LockIdentifier", "value": "0x706872656c656374", - "documentation": [] + "docs": [] } ], "errors": [ { "name": "UnableToVote", - "documentation": [ + "docs": [ " Cannot vote when no candidates or members exist." ] }, { "name": "NoVotes", - "documentation": [ + "docs": [ " Must vote for at least one candidate." ] }, { "name": "TooManyVotes", - "documentation": [ + "docs": [ " Cannot vote more than candidates." ] }, { "name": "MaximumVotesExceeded", - "documentation": [ + "docs": [ " Cannot vote more than maximum allowed." ] }, { "name": "LowBalance", - "documentation": [ + "docs": [ " Cannot vote with stake less than minimum balance." ] }, { "name": "UnableToPayBond", - "documentation": [ + "docs": [ " Voter can not pay voting bond." ] }, { "name": "MustBeVoter", - "documentation": [ + "docs": [ " Must be a voter." ] }, { "name": "ReportSelf", - "documentation": [ + "docs": [ " Cannot report self." ] }, { "name": "DuplicatedCandidate", - "documentation": [ + "docs": [ " Duplicated candidate submission." ] }, { "name": "MemberSubmit", - "documentation": [ + "docs": [ " Member cannot re-submit candidacy." ] }, { "name": "RunnerSubmit", - "documentation": [ + "docs": [ " Runner cannot re-submit candidacy." ] }, { "name": "InsufficientCandidateFunds", - "documentation": [ + "docs": [ " Candidate does not have enough funds." ] }, { "name": "NotMember", - "documentation": [ + "docs": [ " Not a member." ] }, { "name": "InvalidCandidateCount", - "documentation": [ + "docs": [ " The provided count of number of candidates is incorrect." ] }, { "name": "InvalidVoteCount", - "documentation": [ + "docs": [ " The provided count of number of votes is incorrect." ] }, { "name": "InvalidRenouncing", - "documentation": [ + "docs": [ " The renouncing origin presented a wrong `Renouncing` parameter." ] }, { "name": "InvalidReplacement", - "documentation": [ + "docs": [ " Prediction regarding replacement after member removal is wrong." ] } @@ -6102,10 +6102,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current membership, stored as an ordered Vec." ] }, @@ -6113,10 +6113,10 @@ "name": "Prime", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current prime member, if one exists." ] } @@ -6131,7 +6131,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Add a member `who` to the set.", "", " May only be called from `T::AddOrigin`." @@ -6145,7 +6145,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Remove a member `who` from the set.", "", " May only be called from `T::RemoveOrigin`." @@ -6163,7 +6163,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out one member `remove` for another `add`.", "", " May only be called from `T::SwapOrigin`.", @@ -6179,7 +6179,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Change the membership to a new set, disregarding the existing membership. Be nice and", " pass `members` pre-sorted.", "", @@ -6194,7 +6194,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out the sending member for some other key `new`.", "", " May only be called from `Signed` origin of a current member.", @@ -6210,7 +6210,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Set the prime member. Must be a current member.", "", " May only be called from `T::PrimeOrigin`." @@ -6219,7 +6219,7 @@ { "name": "clear_prime", "args": [], - "documentation": [ + "docs": [ " Remove the prime member if it exists.", "", " May only be called from `T::PrimeOrigin`." @@ -6230,35 +6230,35 @@ { "name": "MemberAdded", "args": [], - "documentation": [ + "docs": [ " The given member was added; see the transaction for who." ] }, { "name": "MemberRemoved", "args": [], - "documentation": [ + "docs": [ " The given member was removed; see the transaction for who." ] }, { "name": "MembersSwapped", "args": [], - "documentation": [ + "docs": [ " Two members were swapped; see the transaction for who." ] }, { "name": "MembersReset", "args": [], - "documentation": [ + "docs": [ " The membership was reset; see the transaction for who the new set is." ] }, { "name": "KeyChanged", "args": [], - "documentation": [ + "docs": [ " One of the members' keys changed." ] }, @@ -6267,7 +6267,7 @@ "args": [ "PhantomData" ], - "documentation": [ + "docs": [ " Phantom member, never used." ] } @@ -6287,7 +6287,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Hint that the author of this block thinks the best finalized", " block is the given number." ] @@ -6299,7 +6299,7 @@ "name": "WindowSize", "type": "BlockNumber", "value": "0x65000000", - "documentation": [ + "docs": [ " The number of recent samples to keep from this chain. Default is 101." ] }, @@ -6307,7 +6307,7 @@ "name": "ReportLatency", "type": "BlockNumber", "value": "0xe8030000", - "documentation": [ + "docs": [ " The delay after which point things become suspicious. Default is 1000." ] } @@ -6315,13 +6315,13 @@ "errors": [ { "name": "AlreadyUpdated", - "documentation": [ + "docs": [ " Final hint must be updated only once in the block" ] }, { "name": "BadHint", - "documentation": [ + "docs": [ " Finalized height above block number" ] } @@ -6336,10 +6336,10 @@ "name": "State", "modifier": "Default", "type": { - "Plain": "StoredState" + "plain": "StoredState" }, "fallback": "0x00", - "documentation": [ + "docs": [ " State of the current authority set." ] }, @@ -6347,10 +6347,10 @@ "name": "PendingChange", "modifier": "Optional", "type": { - "Plain": "StoredPendingChange" + "plain": "StoredPendingChange" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending change: (signaled at, scheduled change)." ] }, @@ -6358,10 +6358,10 @@ "name": "NextForced", "modifier": "Optional", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00", - "documentation": [ + "docs": [ " next block number where we can force a change." ] }, @@ -6369,10 +6369,10 @@ "name": "Stalled", "modifier": "Optional", "type": { - "Plain": "(BlockNumber,BlockNumber)" + "plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " `true` if we are currently stalled." ] }, @@ -6380,10 +6380,10 @@ "name": "CurrentSetId", "modifier": "Default", "type": { - "Plain": "SetId" + "plain": "SetId" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The number of changes (both in terms of keys and underlying economic responsibilities)", " in the \"set\" of Grandpa validators from genesis." ] @@ -6392,7 +6392,7 @@ "name": "SetIdSession", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "SetId", "value": "SessionIndex", @@ -6400,7 +6400,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from grandpa set ID to the index of the *most recent* session for which its", " members were responsible.", "", @@ -6422,7 +6422,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report voter equivocation/misbehavior. This method will verify the", " equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence", @@ -6441,7 +6441,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report voter equivocation/misbehavior. This method will verify the", " equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence", @@ -6465,7 +6465,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Note that the current authority set of the GRANDPA finality gadget has", " stalled. This will trigger a forced authority set change at the beginning", " of the next session, to be enacted `delay` blocks after that. The delay", @@ -6482,21 +6482,21 @@ "args": [ "AuthorityList" ], - "documentation": [ + "docs": [ " New authority set has been applied. [authority_set]" ] }, { "name": "Paused", "args": [], - "documentation": [ + "docs": [ " Current authority set has been paused." ] }, { "name": "Resumed", "args": [], - "documentation": [ + "docs": [ " Current authority set has been resumed." ] } @@ -6505,45 +6505,45 @@ "errors": [ { "name": "PauseFailed", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA pause when the authority set isn't live", " (either paused or already pending pause)." ] }, { "name": "ResumeFailed", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA resume when the authority set isn't paused", " (either live or already pending resume)." ] }, { "name": "ChangePending", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA change with one already pending." ] }, { "name": "TooSoon", - "documentation": [ + "docs": [ " Cannot signal forced change so soon after last." ] }, { "name": "InvalidKeyOwnershipProof", - "documentation": [ + "docs": [ " A key ownership proof provided as part of an equivocation report is invalid." ] }, { "name": "InvalidEquivocationProof", - "documentation": [ + "docs": [ " An equivocation proof provided as part of an equivocation report is invalid." ] }, { "name": "DuplicateOffenceReport", - "documentation": [ + "docs": [ " A given equivocation report is valid but already previously reported." ] } @@ -6558,10 +6558,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "ProposalIndex" + "plain": "ProposalIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Number of proposals that have been made." ] }, @@ -6569,7 +6569,7 @@ "name": "Proposals", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "ProposalIndex", "value": "TreasuryProposal", @@ -6577,7 +6577,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposals that have been made." ] }, @@ -6585,10 +6585,10 @@ "name": "Approvals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposal indices that have been approved but not yet awarded." ] }, @@ -6596,7 +6596,7 @@ "name": "Tips", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "Hash", "value": "OpenTip", @@ -6604,7 +6604,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Tips that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", " This has the insecure enumerable hash function since the key itself is already", " guaranteed to be a secure hash." @@ -6614,7 +6614,7 @@ "name": "Reasons", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Bytes", @@ -6622,7 +6622,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Simple preimage lookup from the reason's hash to the original data. Again, has an", " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." ] @@ -6642,7 +6642,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Put forward a suggestion for spending. A deposit proportional to the value", " is reserved and slashed if the proposal is rejected. It is returned once the", " proposal is awarded.", @@ -6662,7 +6662,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Reject a proposed spend. The original deposit will be slashed.", "", " May only be called from `T::RejectOrigin`.", @@ -6682,7 +6682,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", " and the original deposit will be returned.", "", @@ -6707,7 +6707,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Report something `reason` that deserves a tip and claim any eventual the finder's fee.", "", " The dispatch origin for this call must be _Signed_.", @@ -6737,7 +6737,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", "", " If successful, the original deposit will be unreserved.", @@ -6775,7 +6775,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " Give a tip for something new; no finder's fee will be taken.", "", " The dispatch origin for this call must be _Signed_ and the signing account must be a", @@ -6812,7 +6812,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " Declare a tip value for an already-open tip.", "", " The dispatch origin for this call must be _Signed_ and the signing account must be a", @@ -6848,7 +6848,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Close and payout a tip.", "", " The dispatch origin for this call must be _Signed_.", @@ -6875,7 +6875,7 @@ "args": [ "ProposalIndex" ], - "documentation": [ + "docs": [ " New proposal. [proposal_index]" ] }, @@ -6884,7 +6884,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " We have ended a spend period and will now allocate funds. [budget_remaining]" ] }, @@ -6895,7 +6895,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " Some funds have been allocated. [proposal_index, award, beneficiary]" ] }, @@ -6905,7 +6905,7 @@ "ProposalIndex", "Balance" ], - "documentation": [ + "docs": [ " A proposal was rejected; funds were slashed. [proposal_index, slashed]" ] }, @@ -6914,7 +6914,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some of our funds have been burnt. [burn]" ] }, @@ -6923,7 +6923,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Spending has finished; this is the amount that rolls over until next spend. [budget_remaining]" ] }, @@ -6932,7 +6932,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some funds have been deposited. [deposit]" ] }, @@ -6941,7 +6941,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A new tip suggestion has been opened. [tip_hash]" ] }, @@ -6950,7 +6950,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A tip suggestion has reached threshold and is closing. [tip_hash]" ] }, @@ -6961,7 +6961,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A tip suggestion has been closed. [tip_hash, who, payout]" ] }, @@ -6970,7 +6970,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A tip suggestion has been retracted. [tip_hash]" ] } @@ -6980,7 +6980,7 @@ "name": "ProposalBond", "type": "Permill", "value": "0x50c30000", - "documentation": [ + "docs": [ " Fraction of a proposal's value that should be bonded in order to place the proposal.", " An accepted proposal gets these back. A rejected proposal does not." ] @@ -6989,7 +6989,7 @@ "name": "ProposalBondMinimum", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Minimum amount of funds that should be placed in a deposit for making a proposal." ] }, @@ -6997,7 +6997,7 @@ "name": "SpendPeriod", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " Period between successive spends." ] }, @@ -7005,7 +7005,7 @@ "name": "Burn", "type": "Permill", "value": "0x20a10700", - "documentation": [ + "docs": [ " Percentage of spare funds (if any) that are burnt per spend period." ] }, @@ -7013,7 +7013,7 @@ "name": "TipCountdown", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " The period for which a tip remains open after is has achieved threshold tippers." ] }, @@ -7021,7 +7021,7 @@ "name": "TipFindersFee", "type": "Percent", "value": "0x14", - "documentation": [ + "docs": [ " The amount of the final tip which goes to the original reporter of the tip." ] }, @@ -7029,7 +7029,7 @@ "name": "TipReportDepositBase", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for placing a tip report." ] }, @@ -7037,7 +7037,7 @@ "name": "TipReportDepositPerByte", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit per byte within the tip report reason." ] }, @@ -7045,7 +7045,7 @@ "name": "ModuleId", "type": "ModuleId", "value": "0x70792f7472737279", - "documentation": [ + "docs": [ " The treasury's module id, used for deriving its sovereign account ID." ] } @@ -7053,49 +7053,49 @@ "errors": [ { "name": "InsufficientProposersBalance", - "documentation": [ + "docs": [ " Proposer's balance is too low." ] }, { "name": "InvalidProposalIndex", - "documentation": [ + "docs": [ " No proposal at that index." ] }, { "name": "ReasonTooBig", - "documentation": [ + "docs": [ " The reason given is just too big." ] }, { "name": "AlreadyKnown", - "documentation": [ + "docs": [ " The tip was already found/started." ] }, { "name": "UnknownTip", - "documentation": [ + "docs": [ " The tip hash is unknown." ] }, { "name": "NotFinder", - "documentation": [ + "docs": [ " The account attempting to retract the tip is not the finder of the tip." ] }, { "name": "StillOpen", - "documentation": [ + "docs": [ " The tip cannot be claimed/closed because there are not enough tippers yet." ] }, { "name": "Premature", - "documentation": [ + "docs": [ " The tip cannot be claimed/closed because it's still in the countdown period." ] } @@ -7110,10 +7110,10 @@ "name": "CurrentSchedule", "modifier": "Default", "type": { - "Plain": "Schedule" + "plain": "Schedule" }, "fallback": "0x0000000020a107000000000020a107000000000020a107000000000020a107000000000020a107000000000020a107000000000020a1070000000000e0f7050400000000e024370500000000e0f705040000000020a107000000000020a107000000000080f0fa020000000000e1f5050000000004000000000001001000000000400000002000000000000800", - "documentation": [ + "docs": [ " Current cost schedule for contracts." ] }, @@ -7121,7 +7121,7 @@ "name": "PristineCode", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "CodeHash", "value": "Bytes", @@ -7129,7 +7129,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from an original code hash to the original code, untouched by instrumentation." ] }, @@ -7137,7 +7137,7 @@ "name": "CodeStorage", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "CodeHash", "value": "PrefabWasmModule", @@ -7145,7 +7145,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping between an original code hash and instrumented wasm code, ready for execution." ] }, @@ -7153,10 +7153,10 @@ "name": "AccountCounter", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The subtrie counter." ] }, @@ -7164,7 +7164,7 @@ "name": "ContractInfoOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "ContractInfo", @@ -7172,7 +7172,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The code associated with a given account.", "", " TWOX-NOTE: SAFE since `AccountId` is a secure hash." @@ -7189,7 +7189,7 @@ "type": "Schedule" } ], - "documentation": [ + "docs": [ " Updates the schedule for metering contracts.", "", " The schedule must have a greater version than the stored schedule." @@ -7203,7 +7203,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Stores the given binary Wasm code into the chain's storage and returns its `codehash`.", " You can instantiate contracts only with stored code." ] @@ -7228,7 +7228,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Makes a call to an account, optionally transferring some balance.", "", " * If the account is a smart-contract account, the associated code will be", @@ -7258,7 +7258,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Instantiates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance.", "", " Instantiation is executed as follows:", @@ -7283,7 +7283,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Allows block producers to claim a small reward for evicting a contract. If a block producer", " fails to do so, a regular users will be allowed to claim the reward.", "", @@ -7299,7 +7299,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Contract deployed by address at the specified address. [owner, contract]" ] }, @@ -7309,7 +7309,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " Contract has been evicted and is now in tombstone state.", " [contract, tombstone]", " ", @@ -7327,7 +7327,7 @@ "Hash", "Balance" ], - "documentation": [ + "docs": [ " Restoration for a contract has been successful.", " [donor, dest, code_hash, rent_allowance]", " ", @@ -7344,7 +7344,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " Code with the specified hash has been stored.", " [code_hash]" ] @@ -7354,7 +7354,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " Triggered when the current [schedule] is updated." ] }, @@ -7364,7 +7364,7 @@ "AccountId", "Bytes" ], - "documentation": [ + "docs": [ " An event deposited upon execution of a contract from the account.", " [account, data]" ] @@ -7375,7 +7375,7 @@ "name": "SignedClaimHandicap", "type": "BlockNumber", "value": "0x02000000", - "documentation": [ + "docs": [ " Number of block delay an extrinsic claim surcharge has.", "", " When claim surcharge is called by an extrinsic the rent is checked", @@ -7386,7 +7386,7 @@ "name": "TombstoneDeposit", "type": "BalanceOf", "value": "0x00a0acb9030000000000000000000000", - "documentation": [ + "docs": [ " The minimum amount required to generate a tombstone." ] }, @@ -7394,7 +7394,7 @@ "name": "StorageSizeOffset", "type": "u32", "value": "0x08000000", - "documentation": [ + "docs": [ " A size offset for an contract. A just created account with untouched storage will have that", " much of storage from the perspective of the state rent.", "", @@ -7407,7 +7407,7 @@ "name": "RentByteFee", "type": "BalanceOf", "value": "0x00286bee000000000000000000000000", - "documentation": [ + "docs": [ " Price of a byte of storage per one block interval. Should be greater than 0." ] }, @@ -7415,7 +7415,7 @@ "name": "RentDepositOffset", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount of funds a contract should deposit in order to offset", " the cost of one byte.", "", @@ -7429,7 +7429,7 @@ "name": "SurchargeReward", "type": "BalanceOf", "value": "0x005cb2ec220000000000000000000000", - "documentation": [ + "docs": [ " Reward that is received by the party whose touch has led", " to removal of a contract." ] @@ -7438,7 +7438,7 @@ "name": "MaxDepth", "type": "u32", "value": "0x20000000", - "documentation": [ + "docs": [ " The maximum nesting level of a call/instantiate stack. A reasonable default", " value is 100." ] @@ -7447,7 +7447,7 @@ "name": "MaxValueSize", "type": "u32", "value": "0x00400000", - "documentation": [ + "docs": [ " The maximum size of a storage value in bytes. A reasonable default is 16 KiB." ] } @@ -7455,55 +7455,55 @@ "errors": [ { "name": "InvalidScheduleVersion", - "documentation": [ + "docs": [ " A new schedule must have a greater version than the current one." ] }, { "name": "InvalidSurchargeClaim", - "documentation": [ + "docs": [ " An origin must be signed or inherent and auxiliary sender only provided on inherent." ] }, { "name": "InvalidSourceContract", - "documentation": [ + "docs": [ " Cannot restore from nonexisting or tombstone contract." ] }, { "name": "InvalidDestinationContract", - "documentation": [ + "docs": [ " Cannot restore to nonexisting or alive contract." ] }, { "name": "InvalidTombstone", - "documentation": [ + "docs": [ " Tombstones don't match." ] }, { "name": "InvalidContractOrigin", - "documentation": [ + "docs": [ " An origin TrieId written in the current block." ] }, { "name": "OutOfGas", - "documentation": [ + "docs": [ " The executed contract exhausted its gas limit." ] }, { "name": "OutputBufferTooSmall", - "documentation": [ + "docs": [ " The output buffer supplied to a contract API call was too small." ] }, { "name": "BelowSubsistenceThreshold", - "documentation": [ + "docs": [ " Performing the requested transfer would have brought the contract below", " the subsistence threshold. No transfer is allowed to do this in order to allow", " for a tombstone to be created. Use `seal_terminate` to remove a contract without", @@ -7512,14 +7512,14 @@ }, { "name": "NewContractNotFunded", - "documentation": [ + "docs": [ " The newly created contract is below the subsistence threshold after executing", " its contructor. No contracts are allowed to exist below that threshold." ] }, { "name": "TransferFailed", - "documentation": [ + "docs": [ " Performing the requested transfer failed for a reason originating in the", " chosen currency implementation of the runtime. Most probably the balance is", " too low or locks are placed on it." @@ -7527,45 +7527,45 @@ }, { "name": "MaxCallDepthReached", - "documentation": [ + "docs": [ " Performing a call was denied because the calling depth reached the limit", " of what is specified in the schedule." ] }, { "name": "NotCallable", - "documentation": [ + "docs": [ " The contract that was called is either no contract at all (a plain account)", " or is a tombstone." ] }, { "name": "CodeTooLarge", - "documentation": [ + "docs": [ " The code supplied to `put_code` exceeds the limit specified in the current schedule." ] }, { "name": "CodeNotFound", - "documentation": [ + "docs": [ " No code could be found at the supplied code hash." ] }, { "name": "OutOfBounds", - "documentation": [ + "docs": [ " A buffer outside of sandbox memory was passed to a contract API function." ] }, { "name": "DecodingFailed", - "documentation": [ + "docs": [ " Input passed to a contract API function failed to decode as expected type." ] }, { "name": "ContractTrapped", - "documentation": [ + "docs": [ " Contract trapped during execution." ] } @@ -7580,10 +7580,10 @@ "name": "Key", "modifier": "Default", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The `AccountId` of the sudo key." ] } @@ -7598,7 +7598,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Root` origin.", "", " The dispatch origin for this call must be _Signed_.", @@ -7623,7 +7623,7 @@ "type": "Weight" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Root` origin.", " This function does not check the weight of the call, and instead allows the", " Sudo user to specify the weight of the call.", @@ -7644,7 +7644,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", "", " The dispatch origin for this call must be _Signed_.", @@ -7668,7 +7668,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Signed` origin from", " a given account.", "", @@ -7689,7 +7689,7 @@ "args": [ "DispatchResult" ], - "documentation": [ + "docs": [ " A sudo just took place. [result]" ] }, @@ -7698,7 +7698,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " The [sudoer] just switched identity; the old key is supplied." ] }, @@ -7707,7 +7707,7 @@ "args": [ "bool" ], - "documentation": [ + "docs": [ " A sudo just took place. [result]" ] } @@ -7716,7 +7716,7 @@ "errors": [ { "name": "RequireSudo", - "documentation": [ + "docs": [ " Sender must be the Sudo account" ] } @@ -7731,10 +7731,10 @@ "name": "HeartbeatAfter", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The block number after which it's ok to send heartbeats in current session.", "", " At the beginning of each session we set this to a value that should", @@ -7747,10 +7747,10 @@ "name": "Keys", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of keys that may issue a heartbeat." ] }, @@ -7758,7 +7758,7 @@ "name": "ReceivedHeartbeats", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "SessionIndex", "key2": "AuthIndex", @@ -7767,7 +7767,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " For each session index, we keep a mapping of `AuthIndex` to", " `offchain::OpaqueNetworkState`." ] @@ -7776,7 +7776,7 @@ "name": "AuthoredBlocks", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "SessionIndex", "key2": "ValidatorId", @@ -7785,7 +7785,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " For each session index, we keep a mapping of `T::ValidatorId` to the", " number of blocks authored by the given authority." ] @@ -7805,7 +7805,7 @@ "type": "Signature" } ], - "documentation": [ + "docs": [ " # ", " - Complexity: `O(K + E)` where K is length of `Keys` and E is length of", " `Heartbeat.network_state.external_address`", @@ -7825,14 +7825,14 @@ "args": [ "AuthorityId" ], - "documentation": [ + "docs": [ " A new heartbeat was received from `AuthorityId` [authority_id]" ] }, { "name": "AllGood", "args": [], - "documentation": [ + "docs": [ " At the end of the session, no offence was committed." ] }, @@ -7841,7 +7841,7 @@ "args": [ "Vec" ], - "documentation": [ + "docs": [ " At the end of the session, at least one validator was found to be [offline]." ] } @@ -7850,13 +7850,13 @@ "errors": [ { "name": "InvalidKey", - "documentation": [ + "docs": [ " Non existent public key." ] }, { "name": "DuplicatedHeartbeat", - "documentation": [ + "docs": [ " Duplicated heartbeat." ] } @@ -7879,7 +7879,7 @@ "name": "Reports", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "ReportIdOf", "value": "OffenceDetails", @@ -7887,7 +7887,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The primary structure that holds all offence records keyed by report identifiers." ] }, @@ -7895,10 +7895,10 @@ "name": "DeferredOffences", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Deferred reports that have been rejected by the offence handler and need to be submitted", " at a later time." ] @@ -7907,7 +7907,7 @@ "name": "ConcurrentReportsIndex", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "Kind", "key2": "OpaqueTimeSlot", @@ -7916,7 +7916,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A vector of reports of the same kind that happened at the same time slot." ] }, @@ -7924,7 +7924,7 @@ "name": "ReportsByKindIndex", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "Kind", "value": "Bytes", @@ -7932,7 +7932,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Enumerates all reports of a kind along with the time they happened.", "", " All reports are sorted by the time of offence.", @@ -7952,7 +7952,7 @@ "OpaqueTimeSlot", "bool" ], - "documentation": [ + "docs": [ " There is an offence reported of the given `kind` happened at the `session_index` and", " (kind-specific) time slot. This event is not deposited for duplicate slashes. last", " element indicates of the offence was applied (true) or queued (false) ", @@ -7980,10 +7980,10 @@ "name": "RandomMaterial", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Series of block headers from the last 81 blocks that acts as random seed material. This", " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", " the oldest hash." @@ -8005,7 +8005,7 @@ "name": "IdentityOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "Registration", @@ -8013,7 +8013,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information that is pertinent to identify the entity behind an account.", "", " TWOX-NOTE: OK ― `AccountId` is a secure hash." @@ -8023,7 +8023,7 @@ "name": "SuperOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "(AccountId,Data)", @@ -8031,7 +8031,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The super-identity of an alternative \"sub\" identity together with its name, within that", " context. If the account is not some other account's sub-identity, then just `None`." ] @@ -8040,7 +8040,7 @@ "name": "SubsOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "(BalanceOf,Vec)", @@ -8048,7 +8048,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " Alternative \"sub\" identities of this account.", "", " The first item is the deposit, the second is a vector of the accounts.", @@ -8060,10 +8060,10 @@ "name": "Registrars", "modifier": "Default", "type": { - "Plain": "Vec>" + "plain": "Vec>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of registrars. Not expected to get very big as can only be added through a", " special origin (likely a council motion).", "", @@ -8081,7 +8081,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Add a registrar to the system.", "", " The dispatch origin for this call must be `T::RegistrarOrigin`.", @@ -8105,7 +8105,7 @@ "type": "IdentityInfo" } ], - "documentation": [ + "docs": [ " Set an account's identity information and reserve the appropriate deposit.", "", " If the account already has identity information, the deposit is taken as part payment", @@ -8135,7 +8135,7 @@ "type": "Vec<(AccountId,Data)>" } ], - "documentation": [ + "docs": [ " Set the sub-accounts of the sender.", "", " Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", @@ -8162,7 +8162,7 @@ { "name": "clear_identity", "args": [], - "documentation": [ + "docs": [ " Clear an account's identity info and all sub-accounts and return all deposits.", "", " Payment: All reserved balances on the account are returned.", @@ -8195,7 +8195,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Request a judgement from a registrar.", "", " Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", @@ -8229,7 +8229,7 @@ "type": "RegistrarIndex" } ], - "documentation": [ + "docs": [ " Cancel a previous request.", "", " Payment: A previously reserved deposit is returned on success.", @@ -8261,7 +8261,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the fee required for a judgement to be requested from a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8289,7 +8289,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Change the account associated with a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8317,7 +8317,7 @@ "type": "IdentityFields" } ], - "documentation": [ + "docs": [ " Set the field information for a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8349,7 +8349,7 @@ "type": "IdentityJudgement" } ], - "documentation": [ + "docs": [ " Provide a judgement for an account's identity.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8379,7 +8379,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove an account's identity and sub-account information and slash the deposits.", "", " Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", @@ -8413,7 +8413,7 @@ "type": "Data" } ], - "documentation": [ + "docs": [ " Add the given account to the sender's subs.", "", " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", @@ -8435,7 +8435,7 @@ "type": "Data" } ], - "documentation": [ + "docs": [ " Alter the associated name of the given sub-account.", "", " The dispatch origin for this call must be _Signed_ and the sender must have a registered", @@ -8450,7 +8450,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove the given account from the sender's subs.", "", " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", @@ -8463,7 +8463,7 @@ { "name": "quit_sub", "args": [], - "documentation": [ + "docs": [ " Remove the sender as a sub-account.", "", " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", @@ -8483,7 +8483,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A name was set or reset (which will remove all judgements). [who]" ] }, @@ -8493,7 +8493,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was cleared, and the given balance returned. [who, deposit]" ] }, @@ -8503,7 +8503,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was removed and the given balance slashed. [who, deposit]" ] }, @@ -8513,7 +8513,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement was asked from a registrar. [who, registrar_index]" ] }, @@ -8523,7 +8523,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement request was retracted. [who, registrar_index]" ] }, @@ -8533,7 +8533,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement was given by a registrar. [target, registrar_index]" ] }, @@ -8542,7 +8542,7 @@ "args": [ "RegistrarIndex" ], - "documentation": [ + "docs": [ " A registrar was added. [registrar_index]" ] }, @@ -8553,7 +8553,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A sub-identity was added to an identity and the deposit paid. [sub, main, deposit]" ] }, @@ -8564,7 +8564,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A sub-identity was removed from an identity and the deposit freed.", " [sub, main, deposit]" ] @@ -8576,7 +8576,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A sub-identity was cleared, and the given deposit repatriated from the", " main identity account to the sub-identity account. [sub, main, deposit]" ] @@ -8587,7 +8587,7 @@ "name": "BasicDeposit", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for a registered identity." ] }, @@ -8595,7 +8595,7 @@ "name": "FieldDeposit", "type": "BalanceOf", "value": "0x00a031a95fe300000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit per additional field for a registered identity." ] }, @@ -8603,7 +8603,7 @@ "name": "SubAccountDeposit", "type": "BalanceOf", "value": "0x0080f420e6b500000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for a registered subaccount. This should account for the fact", " that one storage item's value will increase by the size of an account ID, and there will be", " another trie item whose value is the size of an account ID plus 32 bytes." @@ -8613,7 +8613,7 @@ "name": "MaxSubAccounts", "type": "u32", "value": "0x64000000", - "documentation": [ + "docs": [ " The maximum number of sub-accounts allowed per identified account." ] }, @@ -8621,7 +8621,7 @@ "name": "MaxAdditionalFields", "type": "u32", "value": "0x64000000", - "documentation": [ + "docs": [ " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O", " required to access an identity, but can be pretty high." ] @@ -8630,7 +8630,7 @@ "name": "MaxRegistrars", "type": "u32", "value": "0x14000000", - "documentation": [ + "docs": [ " Maxmimum number of registrars allowed in the system. Needed to bound the complexity", " of, e.g., updating judgements." ] @@ -8639,97 +8639,97 @@ "errors": [ { "name": "TooManySubAccounts", - "documentation": [ + "docs": [ " Too many subs-accounts." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Account isn't found." ] }, { "name": "NotNamed", - "documentation": [ + "docs": [ " Account isn't named." ] }, { "name": "EmptyIndex", - "documentation": [ + "docs": [ " Empty index." ] }, { "name": "FeeChanged", - "documentation": [ + "docs": [ " Fee is changed." ] }, { "name": "NoIdentity", - "documentation": [ + "docs": [ " No identity found." ] }, { "name": "StickyJudgement", - "documentation": [ + "docs": [ " Sticky judgement." ] }, { "name": "JudgementGiven", - "documentation": [ + "docs": [ " Judgement given." ] }, { "name": "InvalidJudgement", - "documentation": [ + "docs": [ " Invalid judgement." ] }, { "name": "InvalidIndex", - "documentation": [ + "docs": [ " The index is invalid." ] }, { "name": "InvalidTarget", - "documentation": [ + "docs": [ " The target is invalid." ] }, { "name": "TooManyFields", - "documentation": [ + "docs": [ " Too many additional fields." ] }, { "name": "TooManyRegistrars", - "documentation": [ + "docs": [ " Maximum amount of registrars reached. Cannot add any more." ] }, { "name": "AlreadyClaimed", - "documentation": [ + "docs": [ " Account ID is already named." ] }, { "name": "NotSub", - "documentation": [ + "docs": [ " Sender is not a sub-account." ] }, { "name": "NotOwned", - "documentation": [ + "docs": [ " Sub-account isn't owned by sender." ] } @@ -8744,10 +8744,10 @@ "name": "Founder", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The first member." ] }, @@ -8755,10 +8755,10 @@ "name": "Rules", "modifier": "Optional", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A hash of the rules of this society concerning membership. Can only be set once and", " only by the founder." ] @@ -8767,10 +8767,10 @@ "name": "Candidates", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of candidates; bidders that are attempting to become members." ] }, @@ -8778,7 +8778,7 @@ "name": "SuspendedCandidates", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "(BalanceOf,BidKind)", @@ -8786,7 +8786,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of suspended candidates." ] }, @@ -8794,10 +8794,10 @@ "name": "Pot", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " Amount of our account balance that is specifically for the next round's bid(s)." ] }, @@ -8805,10 +8805,10 @@ "name": "Head", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The most primary from the most recently approved members." ] }, @@ -8816,10 +8816,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of members, ordered." ] }, @@ -8827,7 +8827,7 @@ "name": "SuspendedMembers", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "bool", @@ -8835,7 +8835,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of suspended members." ] }, @@ -8843,10 +8843,10 @@ "name": "Bids", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current bids, stored ordered by the value of the bid." ] }, @@ -8854,7 +8854,7 @@ "name": "Vouching", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "VouchingStatus", @@ -8862,7 +8862,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Members currently vouching or banned from vouching again" ] }, @@ -8870,7 +8870,7 @@ "name": "Payouts", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "Vec<(BlockNumber,BalanceOf)>", @@ -8878,7 +8878,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending payouts; ordered by block number, with the amount that should be paid out." ] }, @@ -8886,7 +8886,7 @@ "name": "Strikes", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "StrikeCount", @@ -8894,7 +8894,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The ongoing number of losing votes cast by the member." ] }, @@ -8902,7 +8902,7 @@ "name": "Votes", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "AccountId", "key2": "AccountId", @@ -8911,7 +8911,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Double map from Candidate -> Voter -> (Maybe) Vote." ] }, @@ -8919,10 +8919,10 @@ "name": "Defender", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The defending member currently being challenged." ] }, @@ -8930,7 +8930,7 @@ "name": "DefenderVotes", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "SocietyVote", @@ -8938,7 +8938,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes for the defender." ] }, @@ -8946,10 +8946,10 @@ "name": "MaxMembers", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The max number of members for the society at one time." ] } @@ -8964,7 +8964,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " A user outside of the society can make a bid for entry.", "", " Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", @@ -9008,7 +9008,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " A bidder can remove their bid for entry into society.", " By doing so, they will have their candidate deposit returned or", " they will unvouch their voucher.", @@ -9046,7 +9046,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " As a member, vouch for someone to join society by placing a bid on their behalf.", "", " There is no deposit required to vouch for a new bid, but a member can only vouch for", @@ -9101,7 +9101,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " As a vouching member, unvouch a bid. This only works while vouched user is", " only a bidder (and not a candidate).", "", @@ -9133,7 +9133,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " As a member, vote on a candidate.", "", " The dispatch origin for this call must be _Signed_ and a member.", @@ -9163,7 +9163,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " As a member, vote on the defender.", "", " The dispatch origin for this call must be _Signed_ and a member.", @@ -9185,7 +9185,7 @@ { "name": "payout", "args": [], - "documentation": [ + "docs": [ " Transfer the first matured payout for the sender and remove it from the records.", "", " NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts.", @@ -9224,7 +9224,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Found the society.", "", " This is done as a discrete action in order to allow for the", @@ -9249,7 +9249,7 @@ { "name": "unfound", "args": [], - "documentation": [ + "docs": [ " Annul the founding of the society.", "", " The dispatch origin for this call must be Signed, and the signing account must be both", @@ -9277,7 +9277,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Allow suspension judgement origin to make judgement on a suspended member.", "", " If a suspended member is forgiven, we simply add them back as a member, not affecting", @@ -9319,7 +9319,7 @@ "type": "SocietyJudgement" } ], - "documentation": [ + "docs": [ " Allow suspended judgement origin to make judgement on a suspended candidate.", "", " If the judgement is `Approve`, we add them to society as a member with the appropriate", @@ -9370,7 +9370,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Allows root origin to change the maximum number of members in society.", " Max membership count must be greater than 1.", "", @@ -9394,7 +9394,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " The society is founded by the given identity. [founder]" ] }, @@ -9404,7 +9404,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A membership bid just happened. The given account is the candidate's ID and their offer", " is the second. [candidate_id, offer]" ] @@ -9416,7 +9416,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A membership bid just happened by vouching. The given account is the candidate's ID and", " their offer is the second. The vouching party is the third. [candidate_id, offer, vouching]" ] @@ -9426,7 +9426,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A [candidate] was dropped (due to an excess of bids in the system)." ] }, @@ -9435,7 +9435,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A [candidate] was dropped (by their request)." ] }, @@ -9444,7 +9444,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A [candidate] was dropped (by request of who vouched for them)." ] }, @@ -9454,7 +9454,7 @@ "AccountId", "Vec" ], - "documentation": [ + "docs": [ " A group of candidates have been inducted. The batch's primary is the first value, the", " batch in full is the second. [primary, candidates]" ] @@ -9465,7 +9465,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A suspended member has been judged. [who, judged]" ] }, @@ -9474,7 +9474,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A [candidate] has been suspended" ] }, @@ -9483,7 +9483,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A [member] has been suspended" ] }, @@ -9492,7 +9492,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A [member] has been challenged" ] }, @@ -9503,7 +9503,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A vote has been placed [candidate, voter, vote]" ] }, @@ -9513,7 +9513,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A vote has been placed for a defending member [voter, vote]" ] }, @@ -9522,7 +9522,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " A new [max] member count has been set" ] }, @@ -9531,7 +9531,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " Society is unfounded. [founder]" ] }, @@ -9540,7 +9540,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some funds were deposited into the society account. [value]" ] } @@ -9550,7 +9550,7 @@ "name": "CandidateDeposit", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [ + "docs": [ " The minimum amount of a deposit required for a bid to be made." ] }, @@ -9558,7 +9558,7 @@ "name": "WrongSideDeduction", "type": "BalanceOf", "value": "0x0080f420e6b500000000000000000000", - "documentation": [ + "docs": [ " The amount of the unpaid reward that gets deducted in the case that either a skeptic", " doesn't vote or someone votes in the wrong way." ] @@ -9567,7 +9567,7 @@ "name": "MaxStrikes", "type": "u32", "value": "0x0a000000", - "documentation": [ + "docs": [ " The number of times a member may vote the wrong way (or not at all, when they are a skeptic)", " before they become suspended." ] @@ -9576,7 +9576,7 @@ "name": "PeriodSpend", "type": "BalanceOf", "value": "0x0000c52ebca2b1000000000000000000", - "documentation": [ + "docs": [ " The amount of incentive paid within each period. Doesn't include VoterTip." ] }, @@ -9584,7 +9584,7 @@ "name": "RotationPeriod", "type": "BlockNumber", "value": "0x00770100", - "documentation": [ + "docs": [ " The number of blocks between candidate/membership rotation periods." ] }, @@ -9592,7 +9592,7 @@ "name": "ChallengePeriod", "type": "BlockNumber", "value": "0x80130300", - "documentation": [ + "docs": [ " The number of blocks between membership challenges." ] }, @@ -9600,7 +9600,7 @@ "name": "ModuleId", "type": "ModuleId", "value": "0x70792f736f636965", - "documentation": [ + "docs": [ " The societies's module id" ] } @@ -9608,109 +9608,109 @@ "errors": [ { "name": "BadPosition", - "documentation": [ + "docs": [ " An incorrect position was provided." ] }, { "name": "NotMember", - "documentation": [ + "docs": [ " User is not a member." ] }, { "name": "AlreadyMember", - "documentation": [ + "docs": [ " User is already a member." ] }, { "name": "Suspended", - "documentation": [ + "docs": [ " User is suspended." ] }, { "name": "NotSuspended", - "documentation": [ + "docs": [ " User is not suspended." ] }, { "name": "NoPayout", - "documentation": [ + "docs": [ " Nothing to payout." ] }, { "name": "AlreadyFounded", - "documentation": [ + "docs": [ " Society already founded." ] }, { "name": "InsufficientPot", - "documentation": [ + "docs": [ " Not enough in pot to accept candidate." ] }, { "name": "AlreadyVouching", - "documentation": [ + "docs": [ " Member is already vouching or banned from vouching again." ] }, { "name": "NotVouching", - "documentation": [ + "docs": [ " Member is not vouching." ] }, { "name": "Head", - "documentation": [ + "docs": [ " Cannot remove the head of the chain." ] }, { "name": "Founder", - "documentation": [ + "docs": [ " Cannot remove the founder." ] }, { "name": "AlreadyBid", - "documentation": [ + "docs": [ " User has already made a bid." ] }, { "name": "AlreadyCandidate", - "documentation": [ + "docs": [ " User is already a candidate." ] }, { "name": "NotCandidate", - "documentation": [ + "docs": [ " User is not a candidate." ] }, { "name": "MaxMembers", - "documentation": [ + "docs": [ " Too many members in the society." ] }, { "name": "NotFounder", - "documentation": [ + "docs": [ " The caller is not the founder." ] }, { "name": "NotHead", - "documentation": [ + "docs": [ " The caller is not the head." ] } @@ -9725,7 +9725,7 @@ "name": "Recoverable", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "RecoveryConfig", @@ -9733,7 +9733,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of recoverable accounts and their recovery configuration." ] }, @@ -9741,7 +9741,7 @@ "name": "ActiveRecoveries", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "AccountId", "key2": "AccountId", @@ -9750,7 +9750,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Active recovery attempts.", "", " First account is the account to be recovered, and the second account", @@ -9761,7 +9761,7 @@ "name": "Proxy", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "AccountId", @@ -9769,7 +9769,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The list of allowed proxy accounts.", "", " Map from the user who can access it to the recovered account." @@ -9790,7 +9790,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Send a call through a recovered account.", "", " The dispatch origin for this call must be _Signed_ and registered to", @@ -9818,7 +9818,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow ROOT to bypass the recovery process and set an a rescuer account", " for a lost account directly.", "", @@ -9850,7 +9850,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Create a recovery configuration for your account. This makes your account recoverable.", "", " Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", @@ -9888,7 +9888,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Initiate the process for recovering a recoverable account.", "", " Payment: `RecoveryDeposit` balance will be reserved for initiating the", @@ -9925,7 +9925,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow a \"friend\" of a recoverable account to vouch for an active recovery", " process for that account.", "", @@ -9961,7 +9961,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow a successful rescuer to claim their recovered account.", "", " The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", @@ -9992,7 +9992,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " As the controller of a recoverable account, close an active recovery", " process for your account.", "", @@ -10018,7 +10018,7 @@ { "name": "remove_recovery", "args": [], - "documentation": [ + "docs": [ " Remove the recovery process for your account. Recovered accounts are still accessible.", "", " NOTE: The user must make sure to call `close_recovery` on all active", @@ -10050,7 +10050,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Cancel the ability to use `as_recovered` for `account`.", "", " The dispatch origin for this call must be _Signed_ and registered to", @@ -10071,7 +10071,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been set up for an [account]." ] }, @@ -10081,7 +10081,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been initiated for lost account by rescuer account.", " [lost, rescuer]" ] @@ -10093,7 +10093,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process for lost account by rescuer account has been vouched for by sender.", " [lost, rescuer, sender]" ] @@ -10104,7 +10104,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process for lost account by rescuer account has been closed.", " [lost, rescuer]" ] @@ -10115,7 +10115,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Lost account has been successfully recovered by rescuer account.", " [lost, rescuer]" ] @@ -10125,7 +10125,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been removed for an [account]." ] } @@ -10135,7 +10135,7 @@ "name": "ConfigDepositBase", "type": "BalanceOf", "value": "0x00406352bfc601000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for creating a recovery configuration." ] }, @@ -10143,7 +10143,7 @@ "name": "FriendDepositFactor", "type": "BalanceOf", "value": "0x00203d88792d00000000000000000000", - "documentation": [ + "docs": [ " The amount of currency needed per additional user when creating a recovery configuration." ] }, @@ -10151,7 +10151,7 @@ "name": "MaxFriends", "type": "u16", "value": "0x0900", - "documentation": [ + "docs": [ " The maximum amount of friends allowed in a recovery configuration." ] }, @@ -10159,7 +10159,7 @@ "name": "RecoveryDeposit", "type": "BalanceOf", "value": "0x00406352bfc601000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for starting a recovery." ] } @@ -10167,97 +10167,97 @@ "errors": [ { "name": "NotAllowed", - "documentation": [ + "docs": [ " User is not allowed to make a call on behalf of this account" ] }, { "name": "ZeroThreshold", - "documentation": [ + "docs": [ " Threshold must be greater than zero" ] }, { "name": "NotEnoughFriends", - "documentation": [ + "docs": [ " Friends list must be greater than zero and threshold" ] }, { "name": "MaxFriends", - "documentation": [ + "docs": [ " Friends list must be less than max friends" ] }, { "name": "NotSorted", - "documentation": [ + "docs": [ " Friends list must be sorted and free of duplicates" ] }, { "name": "NotRecoverable", - "documentation": [ + "docs": [ " This account is not set up for recovery" ] }, { "name": "AlreadyRecoverable", - "documentation": [ + "docs": [ " This account is already set up for recovery" ] }, { "name": "AlreadyStarted", - "documentation": [ + "docs": [ " A recovery process has already started for this account" ] }, { "name": "NotStarted", - "documentation": [ + "docs": [ " A recovery process has not started for this rescuer" ] }, { "name": "NotFriend", - "documentation": [ + "docs": [ " This account is not a friend who can vouch" ] }, { "name": "DelayPeriod", - "documentation": [ + "docs": [ " The friend must wait until the delay period to vouch for this recovery" ] }, { "name": "AlreadyVouched", - "documentation": [ + "docs": [ " This user has already vouched for this recovery" ] }, { "name": "Threshold", - "documentation": [ + "docs": [ " The threshold for recovering this account has not been met" ] }, { "name": "StillActive", - "documentation": [ + "docs": [ " There are still active recovery attempts that need to be closed" ] }, { "name": "Overflow", - "documentation": [ + "docs": [ " There was an overflow in a calculation" ] }, { "name": "AlreadyProxy", - "documentation": [ + "docs": [ " This account is already set up for recovery" ] } @@ -10272,7 +10272,7 @@ "name": "Vesting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "VestingInfo", @@ -10280,7 +10280,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information regarding the vesting of a given account." ] } @@ -10290,7 +10290,7 @@ { "name": "vest", "args": [], - "documentation": [ + "docs": [ " Unlock any vested funds of the sender account.", "", " The dispatch origin for this call must be _Signed_ and the sender must have funds still", @@ -10318,7 +10318,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Unlock any vested funds of a `target` account.", "", " The dispatch origin for this call must be _Signed_.", @@ -10352,7 +10352,7 @@ "type": "VestingInfo" } ], - "documentation": [ + "docs": [ " Create a vested transfer.", "", " The dispatch origin for this call must be _Signed_.", @@ -10389,7 +10389,7 @@ "type": "VestingInfo" } ], - "documentation": [ + "docs": [ " Force a vested transfer.", "", " The dispatch origin for this call must be _Root_.", @@ -10419,7 +10419,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " The amount vested has been updated. This could indicate more funds are available. The", " balance given is the amount which is left unvested (and thus locked). ", " [account, unvested]" @@ -10430,7 +10430,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An [account] has become fully vested. No further vesting can happen." ] } @@ -10440,7 +10440,7 @@ "name": "MinVestedTransfer", "type": "BalanceOf", "value": "0x0000c16ff28623000000000000000000", - "documentation": [ + "docs": [ " The minimum amount to be transferred to create a new vesting schedule." ] } @@ -10448,19 +10448,19 @@ "errors": [ { "name": "NotVesting", - "documentation": [ + "docs": [ " The account given is not vesting." ] }, { "name": "ExistingVestingSchedule", - "documentation": [ + "docs": [ " An existing vesting schedule already exists for this account that cannot be clobbered." ] }, { "name": "AmountLow", - "documentation": [ + "docs": [ " Amount being transferred is too low to create a vesting schedule." ] } @@ -10475,7 +10475,7 @@ "name": "Agenda", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "BlockNumber", "value": "Vec>", @@ -10483,7 +10483,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Items to be executed, indexed by the block number that they should be executed on." ] }, @@ -10491,7 +10491,7 @@ "name": "Lookup", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "Bytes", "value": "TaskAddress", @@ -10499,7 +10499,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Lookup from identity to the block number and index of the task." ] }, @@ -10507,10 +10507,10 @@ "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "Releases" + "plain": "Releases" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage version of the pallet.", "", " New networks start with last version." @@ -10539,7 +10539,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Anonymously schedule a task.", "", " # ", @@ -10564,7 +10564,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Cancel an anonymously scheduled task.", "", " # ", @@ -10601,7 +10601,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Schedule a named task.", "", " # ", @@ -10622,7 +10622,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Cancel a named scheduled task.", "", " # ", @@ -10655,7 +10655,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Anonymously schedule a task after a delay.", "", " # ", @@ -10687,7 +10687,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Schedule a named task after a delay.", "", " # ", @@ -10703,7 +10703,7 @@ "BlockNumber", "u32" ], - "documentation": [ + "docs": [ " Scheduled some task. [when, index]" ] }, @@ -10713,7 +10713,7 @@ "BlockNumber", "u32" ], - "documentation": [ + "docs": [ " Canceled some task. [when, index]" ] }, @@ -10724,7 +10724,7 @@ "Option", "DispatchResult" ], - "documentation": [ + "docs": [ " Dispatched some task. [task, id, result]" ] } @@ -10733,19 +10733,19 @@ "errors": [ { "name": "FailedToSchedule", - "documentation": [ + "docs": [ " Failed to schedule a call" ] }, { "name": "FailedToCancel", - "documentation": [ + "docs": [ " Failed to cancel a scheduled call" ] }, { "name": "TargetBlockNumberInPast", - "documentation": [ + "docs": [ " Given target block number is in the past." ] } @@ -10760,7 +10760,7 @@ "name": "Proxies", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "(Vec,BalanceOf)", @@ -10768,7 +10768,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " The set of account proxies. Maps the account which has delegated to the accounts", " which are being delegated to, together with the amount held on deposit." ] @@ -10777,7 +10777,7 @@ "name": "Announcements", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "(Vec,BalanceOf)", @@ -10785,7 +10785,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " The announcements made by the proxy (key)." ] } @@ -10808,7 +10808,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Dispatch the given `call` from an account that the sender is authorised for through", " `add_proxy`.", "", @@ -10842,7 +10842,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Register a proxy account for the sender that is able to make calls on its behalf.", "", " The dispatch origin for this call must be _Signed_.", @@ -10872,7 +10872,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Unregister a proxy account for the sender.", "", " The dispatch origin for this call must be _Signed_.", @@ -10889,7 +10889,7 @@ { "name": "remove_proxies", "args": [], - "documentation": [ + "docs": [ " Unregister all proxy accounts for the sender.", "", " The dispatch origin for this call must be _Signed_.", @@ -10918,7 +10918,7 @@ "type": "u16" } ], - "documentation": [ + "docs": [ " Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and", " initialize it with a proxy of `proxy_type` for `origin` sender.", "", @@ -10968,7 +10968,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Removes a previously spawned anonymous proxy.", "", " WARNING: **All access to this account will be lost.** Any funds held in it will be", @@ -11003,7 +11003,7 @@ "type": "CallHashOf" } ], - "documentation": [ + "docs": [ " Publish the hash of a proxy-call that will be made in the future.", "", " This must be called some number of blocks before the corresponding `proxy` is attempted", @@ -11039,7 +11039,7 @@ "type": "CallHashOf" } ], - "documentation": [ + "docs": [ " Remove a given announcement.", "", " May be called by a proxy account to remove a call they previously announced and return", @@ -11070,7 +11070,7 @@ "type": "CallHashOf" } ], - "documentation": [ + "docs": [ " Remove the given announcement of a delegate.", "", " May be called by a target (proxied) account to remove a call that one of their delegates", @@ -11109,7 +11109,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Dispatch the given `call` from an account that the sender is authorised for through", " `add_proxy`.", "", @@ -11136,7 +11136,7 @@ "args": [ "DispatchResult" ], - "documentation": [ + "docs": [ " A proxy was executed correctly, with the given [result]." ] }, @@ -11148,7 +11148,7 @@ "ProxyType", "u16" ], - "documentation": [ + "docs": [ " Anonymous account has been created by new proxy with given", " disambiguation index and proxy type. [anonymous, who, proxy_type, disambiguation_index]" ] @@ -11160,7 +11160,7 @@ "AccountId", "Hash" ], - "documentation": [ + "docs": [ " An announcement was placed to make a call in the future. [real, proxy, call_hash]" ] } @@ -11170,7 +11170,7 @@ "name": "ProxyDepositBase", "type": "BalanceOf", "value": "0x00f09e544c3900000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for creating a proxy." ] }, @@ -11178,7 +11178,7 @@ "name": "ProxyDepositFactor", "type": "BalanceOf", "value": "0x0060aa7714b400000000000000000000", - "documentation": [ + "docs": [ " The amount of currency needed per proxy added." ] }, @@ -11186,7 +11186,7 @@ "name": "MaxProxies", "type": "u16", "value": "0x2000", - "documentation": [ + "docs": [ " The maximum amount of proxies allowed for a single account." ] }, @@ -11194,7 +11194,7 @@ "name": "MaxPending", "type": "u32", "value": "0x20000000", - "documentation": [ + "docs": [ " `MaxPending` metadata shadow." ] }, @@ -11202,7 +11202,7 @@ "name": "AnnouncementDepositBase", "type": "BalanceOf", "value": "0x00f09e544c3900000000000000000000", - "documentation": [ + "docs": [ " `AnnouncementDepositBase` metadata shadow." ] }, @@ -11210,7 +11210,7 @@ "name": "AnnouncementDepositFactor", "type": "BalanceOf", "value": "0x00c054ef286801000000000000000000", - "documentation": [ + "docs": [ " `AnnouncementDepositFactor` metadata shadow." ] } @@ -11218,43 +11218,43 @@ "errors": [ { "name": "TooMany", - "documentation": [ + "docs": [ " There are too many proxies registered or too many announcements pending." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Proxy registration not found." ] }, { "name": "NotProxy", - "documentation": [ + "docs": [ " Sender is not a proxy of the account to be proxied." ] }, { "name": "Unproxyable", - "documentation": [ + "docs": [ " A call which is incompatible with the proxy type's filter was attempted." ] }, { "name": "Duplicate", - "documentation": [ + "docs": [ " Account is already a proxy." ] }, { "name": "NoPermission", - "documentation": [ + "docs": [ " Call may not be made by proxy because it may escalate its privileges." ] }, { "name": "Unannounced", - "documentation": [ + "docs": [ " Announcement, if made at all, was made too recently." ] } @@ -11269,7 +11269,7 @@ "name": "Multisigs", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "AccountId", "key2": "[u8;32]", @@ -11278,7 +11278,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of open multisig operations." ] }, @@ -11286,7 +11286,7 @@ "name": "Calls", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "[u8;32]", "value": "(OpaqueCall,AccountId,BalanceOf)", @@ -11294,7 +11294,7 @@ } }, "fallback": "0x00", - "documentation": [] + "docs": [] } ] }, @@ -11311,7 +11311,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Immediately dispatch a multi-signature call using a single approval from the caller.", "", " The dispatch origin for this call must be _Signed_.", @@ -11359,7 +11359,7 @@ "type": "Weight" } ], - "documentation": [ + "docs": [ " Register approval for a dispatch to be made from a deterministic composite account if", " approved by a total of `threshold - 1` of `other_signatories`.", "", @@ -11437,7 +11437,7 @@ "type": "Weight" } ], - "documentation": [ + "docs": [ " Register approval for a dispatch to be made from a deterministic composite account if", " approved by a total of `threshold - 1` of `other_signatories`.", "", @@ -11499,7 +11499,7 @@ "type": "[u8;32]" } ], - "documentation": [ + "docs": [ " Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", " for this operation will be unreserved on success.", "", @@ -11538,7 +11538,7 @@ "AccountId", "CallHash" ], - "documentation": [ + "docs": [ " A new multisig operation has begun. [approving, multisig, call_hash]" ] }, @@ -11550,7 +11550,7 @@ "AccountId", "CallHash" ], - "documentation": [ + "docs": [ " A multisig operation has been approved by someone. [approving, timepoint, multisig, call_hash]" ] }, @@ -11563,7 +11563,7 @@ "CallHash", "DispatchResult" ], - "documentation": [ + "docs": [ " A multisig operation has been executed. [approving, timepoint, multisig, call_hash]" ] }, @@ -11575,7 +11575,7 @@ "AccountId", "CallHash" ], - "documentation": [ + "docs": [ " A multisig operation has been cancelled. [cancelling, timepoint, multisig, call_hash]" ] } @@ -11584,85 +11584,85 @@ "errors": [ { "name": "MinimumThreshold", - "documentation": [ + "docs": [ " Threshold must be 2 or greater." ] }, { "name": "AlreadyApproved", - "documentation": [ + "docs": [ " Call is already approved by this signatory." ] }, { "name": "NoApprovalsNeeded", - "documentation": [ + "docs": [ " Call doesn't need any (more) approvals." ] }, { "name": "TooFewSignatories", - "documentation": [ + "docs": [ " There are too few signatories in the list." ] }, { "name": "TooManySignatories", - "documentation": [ + "docs": [ " There are too many signatories in the list." ] }, { "name": "SignatoriesOutOfOrder", - "documentation": [ + "docs": [ " The signatories were provided out of order; they should be ordered." ] }, { "name": "SenderInSignatories", - "documentation": [ + "docs": [ " The sender was contained in the other signatories; it shouldn't be." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Multisig operation not found when attempting to cancel." ] }, { "name": "NotOwner", - "documentation": [ + "docs": [ " Only the account that originally created the multisig is able to cancel it." ] }, { "name": "NoTimepoint", - "documentation": [ + "docs": [ " No timepoint was given, yet the multisig operation is already underway." ] }, { "name": "WrongTimepoint", - "documentation": [ + "docs": [ " A different timepoint was given to the multisig operation that is underway." ] }, { "name": "UnexpectedTimepoint", - "documentation": [ + "docs": [ " A timepoint was given, yet no multisig operation is underway." ] }, { "name": "WeightTooLow", - "documentation": [ + "docs": [ " The maximum weight information provided was too low." ] }, { "name": "AlreadyStored", - "documentation": [ + "docs": [ " The data to be stored is already stored." ] } diff --git a/packages/polkadot/tests/meta/v12.hex b/packages/polkadot/tests/meta/v12.hex index 1b0130db..6ede6938 100644 --- a/packages/polkadot/tests/meta/v12.hex +++ b/packages/polkadot/tests/meta/v12.hex @@ -1 +1 @@ -0x6d6574610c8c1853797374656d011853797374656d401c4163636f756e7401010230543a3a4163636f756e744964944163636f756e74496e666f3c543a3a496e6465782c20543a3a4163636f756e74446174613e00210100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004e8205468652066756c6c206163636f756e7420696e666f726d6174696f6e20666f72206120706172746963756c6172206163636f756e742049442e3845787472696e736963436f756e7400000c753332040004b820546f74616c2065787472696e7369637320636f756e7420666f72207468652063757272656e7420626c6f636b2e2c426c6f636b576569676874010038436f6e73756d6564576569676874600000000000000000000000000000000000000000000000000488205468652063757272656e742077656967687420666f722074686520626c6f636b2e40416c6c45787472696e736963734c656e00000c753332040004410120546f74616c206c656e6774682028696e2062797465732920666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e24426c6f636b4861736801010538543a3a426c6f636b4e756d6265721c543a3a48617368008000000000000000000000000000000000000000000000000000000000000000000498204d6170206f6620626c6f636b206e756d6265727320746f20626c6f636b206861736865732e3445787472696e736963446174610101050c7533321c5665633c75383e000400043d012045787472696e73696373206461746120666f72207468652063757272656e7420626c6f636b20286d61707320616e2065787472696e736963277320696e64657820746f206974732064617461292e184e756d626572010038543a3a426c6f636b4e756d6265721000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000004702048617368206f66207468652070726576696f757320626c6f636b2e3845787472696e73696373526f6f7401001c543a3a486173688000000000000000000000000000000000000000000000000000000000000000000415012045787472696e7369637320726f6f74206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e1844696765737401002c4469676573744f663c543e040004f020446967657374206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e184576656e747301008c5665633c4576656e745265636f72643c543a3a4576656e742c20543a3a486173683e3e040004a0204576656e7473206465706f736974656420666f72207468652063757272656e7420626c6f636b2e284576656e74436f756e740100284576656e74496e646578100000000004b820546865206e756d626572206f66206576656e747320696e2074686520604576656e74733c543e60206c6973742e2c4576656e74546f706963730101021c543a3a48617368845665633c28543a3a426c6f636b4e756d6265722c204576656e74496e646578293e000400282501204d617070696e67206265747765656e206120746f7069632028726570726573656e74656420627920543a3a486173682920616e64206120766563746f72206f6620696e646578657394206f66206576656e747320696e2074686520603c4576656e74733c543e3e60206c6973742e00510120416c6c20746f70696320766563746f727320686176652064657465726d696e69737469632073746f72616765206c6f636174696f6e7320646570656e64696e67206f6e2074686520746f7069632e2054686973450120616c6c6f7773206c696768742d636c69656e747320746f206c6576657261676520746865206368616e67657320747269652073746f7261676520747261636b696e67206d656368616e69736d20616e64e420696e2063617365206f66206368616e67657320666574636820746865206c697374206f66206576656e7473206f6620696e7465726573742e004d01205468652076616c756520686173207468652074797065206028543a3a426c6f636b4e756d6265722c204576656e74496e646578296020626563617573652069662077652075736564206f6e6c79206a7573744d012074686520604576656e74496e64657860207468656e20696e20636173652069662074686520746f70696320686173207468652073616d6520636f6e74656e7473206f6e20746865206e65787420626c6f636b0101206e6f206e6f74696669636174696f6e2077696c6c20626520747269676765726564207468757320746865206576656e74206d69676874206265206c6f73742e484c61737452756e74696d65557067726164650000584c61737452756e74696d6555706772616465496e666f04000455012053746f726573207468652060737065635f76657273696f6e6020616e642060737065635f6e616d6560206f66207768656e20746865206c6173742072756e74696d6520757067726164652068617070656e65642e545570677261646564546f553332526566436f756e74010010626f6f6c0400044d012054727565206966207765206861766520757067726164656420736f207468617420607479706520526566436f756e74602069732060753332602e2046616c7365202864656661756c7429206966206e6f742e38457865637574696f6e50686173650000145068617365040004882054686520657865637574696f6e207068617365206f662074686520626c6f636b2e01282866696c6c5f626c6f636b04185f726174696f1c50657262696c6c040901204120646973706174636820746861742077696c6c2066696c6c2074686520626c6f636b2077656967687420757020746f2074686520676976656e20726174696f2e1872656d61726b041c5f72656d61726b1c5665633c75383e1c6c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e002c2023203c7765696768743e24202d20604f28312960e0202d2042617365205765696768743a20302e36363520c2b5732c20696e646570656e64656e74206f662072656d61726b206c656e6774682e50202d204e6f204442206f7065726174696f6e732e302023203c2f7765696768743e387365745f686561705f7061676573041470616765730c75363420fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e002c2023203c7765696768743e24202d20604f283129604c202d20312073746f726167652077726974652e64202d2042617365205765696768743a20312e34303520c2b57360202d203120777269746520746f20484541505f5041474553302023203c2f7765696768743e207365745f636f64650410636f64651c5665633c75383e28682053657420746865206e65772072756e74696d6520636f64652e002c2023203c7765696768743e3501202d20604f2843202b2053296020776865726520604360206c656e677468206f662060636f64656020616e642060536020636f6d706c6578697479206f66206063616e5f7365745f636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e7901202d20312063616c6c20746f206063616e5f7365745f636f6465603a20604f28532960202863616c6c73206073705f696f3a3a6d6973633a3a72756e74696d655f76657273696f6e6020776869636820697320657870656e73697665292e2c202d2031206576656e742e7d012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652c206275742067656e6572616c6c792074686973206973207665727920657870656e736976652e902057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f636f64655f776974686f75745f636865636b730410636f64651c5665633c75383e201d012053657420746865206e65772072756e74696d6520636f646520776974686f757420646f696e6720616e7920636865636b73206f662074686520676976656e2060636f6465602e002c2023203c7765696768743e90202d20604f2843296020776865726520604360206c656e677468206f662060636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e2c202d2031206576656e742e75012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652e2057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f6368616e6765735f747269655f636f6e666967044c6368616e6765735f747269655f636f6e666967804f7074696f6e3c4368616e67657354726965436f6e66696775726174696f6e3e28a02053657420746865206e6577206368616e676573207472696520636f6e66696775726174696f6e2e002c2023203c7765696768743e24202d20604f28312960b0202d20312073746f72616765207772697465206f722064656c6574652028636f64656320604f28312960292ed8202d20312063616c6c20746f20606465706f7369745f6c6f67603a20557365732060617070656e6460204150492c20736f204f28312964202d2042617365205765696768743a20372e32313820c2b57334202d204442205765696768743aa820202020202d205772697465733a204368616e67657320547269652c2053797374656d20446967657374302023203c2f7765696768743e2c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e206c2053657420736f6d65206974656d73206f662073746f726167652e002c2023203c7765696768743e94202d20604f2849296020776865726520604960206c656e677468206f6620606974656d73607c202d206049602073746f72616765207772697465732028604f28312960292e74202d2042617365205765696768743a20302e353638202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e306b696c6c5f73746f7261676504106b657973205665633c4b65793e2078204b696c6c20736f6d65206974656d732066726f6d2073746f726167652e002c2023203c7765696768743efc202d20604f28494b296020776865726520604960206c656e677468206f6620606b6579736020616e6420604b60206c656e677468206f66206f6e65206b657964202d206049602073746f726167652064656c6574696f6e732e70202d2042617365205765696768743a202e333738202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e2c6b696c6c5f70726566697808187072656669780c4b6579205f7375626b6579730c7533322c1501204b696c6c20616c6c2073746f72616765206974656d7320776974682061206b657920746861742073746172747320776974682074686520676976656e207072656669782e003d01202a2a4e4f54453a2a2a2057652072656c79206f6e2074686520526f6f74206f726967696e20746f2070726f7669646520757320746865206e756d626572206f66207375626b65797320756e64657241012074686520707265666978207765206172652072656d6f76696e6720746f2061636375726174656c792063616c63756c6174652074686520776569676874206f6620746869732066756e6374696f6e2e002c2023203c7765696768743edc202d20604f285029602077686572652060506020616d6f756e74206f66206b65797320776974682070726566697820607072656669786064202d206050602073746f726167652064656c6574696f6e732e74202d2042617365205765696768743a20302e383334202a205020c2b57380202d205772697465733a204e756d626572206f66207375626b657973202b2031302023203c2f7765696768743e1c7375696369646500286501204b696c6c207468652073656e64696e67206163636f756e742c20617373756d696e6720746865726520617265206e6f207265666572656e636573206f75747374616e64696e6720616e642074686520636f6d706f7369746590206461746120697320657175616c20746f206974732064656661756c742076616c75652e002c2023203c7765696768743e24202d20604f283129607c202d20312073746f72616765207265616420616e642064656c6574696f6e2e54202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d5c2042617365205765696768743a20382e36323620c2b5731101204e6f2044422052656164206f72205772697465206f7065726174696f6e7320626563617573652063616c6c657220697320616c726561647920696e206f7665726c6179302023203c2f7765696768743e01144045787472696e7369635375636365737304304469737061746368496e666f04b820416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e205c5b696e666f5c5d3c45787472696e7369634661696c6564083444697370617463684572726f72304469737061746368496e666f049420416e2065787472696e736963206661696c65642e205c5b6572726f722c20696e666f5c5d2c436f64655570646174656400045420603a636f6465602077617320757064617465642e284e65774163636f756e7404244163636f756e744964047c2041206e6577205c5b6163636f756e745c5d2077617320637265617465642e344b696c6c65644163636f756e7404244163636f756e744964046c20416e205c5b6163636f756e745c5d20776173207265617065642e0c38426c6f636b48617368436f756e7438543a3a426c6f636b4e756d626572106009000004d820546865206d6178696d756d206e756d626572206f6620626c6f636b7320746f20616c6c6f7720696e206d6f7274616c20657261732e2044625765696768743c52756e74696d6544625765696768744040787d010000000000e1f505000000000409012054686520776569676874206f662072756e74696d65206461746162617365206f7065726174696f6e73207468652072756e74696d652063616e20696e766f6b652e30426c6f636b57656967687473506c696d6974733a3a426c6f636b57656967687473850100f2052a0100000000204aa9d1010000405973070000000001c06e96a62e010000010098f73e5d010000010000000000000000405973070000000001c0f6e810a30100000100204aa9d1010000010088526a740000004059730700000000000000046101205468652077656967687420636f6e66696775726174696f6e20286c696d697473202620626173652076616c7565732920666f72206561636820636c617373206f662065787472696e7369637320616e6420626c6f636b2e143c496e76616c6964537065634e616d6508150120546865206e616d65206f662073706563696669636174696f6e20646f6573206e6f74206d61746368206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e685370656356657273696f6e4e65656473546f496e637265617365084501205468652073706563696669636174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e744661696c6564546f4578747261637452756e74696d6556657273696f6e0cf0204661696c656420746f2065787472616374207468652072756e74696d652076657273696f6e2066726f6d20746865206e65772072756e74696d652e000d01204569746865722063616c6c696e672060436f72655f76657273696f6e60206f72206465636f64696e67206052756e74696d6556657273696f6e60206661696c65642e4c4e6f6e44656661756c74436f6d706f7369746504010120537569636964652063616c6c6564207768656e20746865206163636f756e7420686173206e6f6e2d64656661756c7420636f6d706f7369746520646174612e3c4e6f6e5a65726f526566436f756e740439012054686572652069732061206e6f6e2d7a65726f207265666572656e636520636f756e742070726576656e74696e6720746865206163636f756e742066726f6d206265696e67207075726765642e001c5574696c69747900010c146261746368041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e48802053656e642061206261746368206f662064697370617463682063616c6c732e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e006101204966206f726967696e20697320726f6f74207468656e2063616c6c2061726520646973706174636820776974686f757420636865636b696e67206f726967696e2066696c7465722e20285468697320696e636c75646573cc20627970617373696e6720606672616d655f73797374656d3a3a436f6e6669673a3a4261736543616c6c46696c74657260292e002c2023203c7765696768743e0501202d20436f6d706c65786974793a204f284329207768657265204320697320746865206e756d626572206f662063616c6c7320746f20626520626174636865642e302023203c2f7765696768743e00590120546869732077696c6c2072657475726e20604f6b6020696e20616c6c2063697263756d7374616e6365732e20546f2064657465726d696e65207468652073756363657373206f66207468652062617463682c20616e3501206576656e74206973206465706f73697465642e20496620612063616c6c206661696c656420616e64207468652062617463682077617320696e7465727275707465642c207468656e20746865590120604261746368496e74657272757074656460206576656e74206973206465706f73697465642c20616c6f6e67207769746820746865206e756d626572206f66207375636365737366756c2063616c6c73206d616465510120616e6420746865206572726f72206f6620746865206661696c65642063616c6c2e20496620616c6c2077657265207375636365737366756c2c207468656e2074686520604261746368436f6d706c657465646050206576656e74206973206465706f73697465642e3461735f646572697661746976650814696e6465780c7531361063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e34e02053656e6420612063616c6c207468726f75676820616e20696e64657865642070736575646f6e796d206f66207468652073656e6465722e0059012046696c7465722066726f6d206f726967696e206172652070617373656420616c6f6e672e205468652063616c6c2077696c6c2062652064697370617463686564207769746820616e206f726967696e207768696368c020757365207468652073616d652066696c74657220617320746865206f726967696e206f6620746869732063616c6c2e004901204e4f54453a20496620796f75206e65656420746f20656e73757265207468617420616e79206163636f756e742d62617365642066696c746572696e67206973206e6f7420686f6e6f7265642028692e652e6501206265636175736520796f7520657870656374206070726f78796020746f2068617665206265656e2075736564207072696f7220696e207468652063616c6c20737461636b20616e6420796f7520646f206e6f742077616e745501207468652063616c6c207265737472696374696f6e7320746f206170706c7920746f20616e79207375622d6163636f756e7473292c207468656e20757365206061735f6d756c74695f7468726573686f6c645f31608020696e20746865204d756c74697369672070616c6c657420696e73746561642e00f8204e4f54453a205072696f7220746f2076657273696f6e202a31322c2074686973207761732063616c6c6564206061735f6c696d697465645f737562602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e2462617463685f616c6c041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e34f02053656e642061206261746368206f662064697370617463682063616c6c7320616e642061746f6d6963616c6c792065786563757465207468656d2e2501205468652077686f6c65207472616e73616374696f6e2077696c6c20726f6c6c6261636b20616e64206661696c20696620616e79206f66207468652063616c6c73206661696c65642e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e006101204966206f726967696e20697320726f6f74207468656e2063616c6c2061726520646973706174636820776974686f757420636865636b696e67206f726967696e2066696c7465722e20285468697320696e636c75646573cc20627970617373696e6720606672616d655f73797374656d3a3a436f6e6669673a3a4261736543616c6c46696c74657260292e002c2023203c7765696768743e0501202d20436f6d706c65786974793a204f284329207768657265204320697320746865206e756d626572206f662063616c6c7320746f20626520626174636865642e302023203c2f7765696768743e0108404261746368496e746572727570746564080c7533323444697370617463684572726f72085901204261746368206f66206469737061746368657320646964206e6f7420636f6d706c6574652066756c6c792e20496e646578206f66206669727374206661696c696e6720646973706174636820676976656e2c206173902077656c6c20617320746865206572726f722e205c5b696e6465782c206572726f725c5d384261746368436f6d706c657465640004cc204261746368206f66206469737061746368657320636f6d706c657465642066756c6c792077697468206e6f206572726f722e0000011042616265011042616265302845706f6368496e64657801000c75363420000000000000000004542043757272656e742065706f636820696e6465782e2c417574686f72697469657301009c5665633c28417574686f7269747949642c2042616265417574686f72697479576569676874293e0400046c2043757272656e742065706f636820617574686f7269746965732e2c47656e65736973536c6f7401000c75363420000000000000000008f82054686520736c6f74206174207768696368207468652066697273742065706f63682061637475616c6c7920737461727465642e205468697320697320309020756e74696c2074686520666972737420626c6f636b206f662074686520636861696e2e2c43757272656e74536c6f7401000c75363420000000000000000004542043757272656e7420736c6f74206e756d6265722e2852616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e65737380000000000000000000000000000000000000000000000000000000000000000028b8205468652065706f63682072616e646f6d6e65737320666f7220746865202a63757272656e742a2065706f63682e002c20232053656375726974790005012054686973204d555354204e4f54206265207573656420666f722067616d626c696e672c2061732069742063616e20626520696e666c75656e6365642062792061f8206d616c6963696f75732076616c696461746f7220696e207468652073686f7274207465726d2e204974204d4159206265207573656420696e206d616e7915012063727970746f677261706869632070726f746f636f6c732c20686f77657665722c20736f206c6f6e67206173206f6e652072656d656d6265727320746861742074686973150120286c696b652065766572797468696e6720656c7365206f6e2d636861696e29206974206973207075626c69632e20466f72206578616d706c652c2069742063616e206265050120757365642077686572652061206e756d626572206973206e656564656420746861742063616e6e6f742068617665206265656e2063686f73656e20627920616e0d01206164766572736172792c20666f7220707572706f7365732073756368206173207075626c69632d636f696e207a65726f2d6b6e6f776c656467652070726f6f66732e3c4e65787445706f6368436f6e6669670000504e657874436f6e66696744657363726970746f7204000498204e6578742065706f636820636f6e66696775726174696f6e2c206966206368616e6765642e384e65787452616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e657373800000000000000000000000000000000000000000000000000000000000000000045c204e6578742065706f63682072616e646f6d6e6573732e305365676d656e74496e64657801000c7533321000000000247c2052616e646f6d6e65737320756e64657220636f6e737472756374696f6e2e00f4205765206d616b6520612074726164656f6666206265747765656e2073746f7261676520616363657373657320616e64206c697374206c656e6774682e01012057652073746f72652074686520756e6465722d636f6e737472756374696f6e2072616e646f6d6e65737320696e207365676d656e7473206f6620757020746f942060554e4445525f434f4e535452554354494f4e5f5345474d454e545f4c454e475448602e00ec204f6e63652061207365676d656e7420726561636865732074686973206c656e6774682c20776520626567696e20746865206e657874206f6e652e090120576520726573657420616c6c207365676d656e747320616e642072657475726e20746f206030602061742074686520626567696e6e696e67206f662065766572791c2065706f63682e44556e646572436f6e737472756374696f6e0101050c7533326c5665633c7363686e6f72726b656c3a3a52616e646f6d6e6573733e0004000415012054574f582d4e4f54453a20605365676d656e74496e6465786020697320616e20696e6372656173696e6720696e74656765722c20736f2074686973206973206f6b61792e2c496e697469616c697a656400003c4d6179626552616e646f6d6e65737304000801012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e292077686963682069732060536f6d65601d01206966207065722d626c6f636b20696e697469616c697a6174696f6e2068617320616c7265616479206265656e2063616c6c656420666f722063757272656e7420626c6f636b2e4c417574686f7256726652616e646f6d6e65737301003c4d6179626552616e646f6d6e65737304000c5d012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e29207468617420696e636c756465732074686520565246206f75747075742067656e6572617465645101206174207468697320626c6f636b2e2054686973206669656c642073686f756c6420616c7761797320626520706f70756c6174656420647572696e6720626c6f636b2070726f63657373696e6720756e6c6573731901207365636f6e6461727920706c61696e20736c6f74732061726520656e61626c65642028776869636820646f6e277420636f6e7461696e206120565246206f7574707574292e204c6174656e657373010038543a3a426c6f636b4e756d626572100000000014d820486f77206c617465207468652063757272656e7420626c6f636b20697320636f6d706172656420746f2069747320706172656e742e001501205468697320656e74727920697320706f70756c617465642061732070617274206f6620626c6f636b20657865637574696f6e20616e6420697320636c65616e65642075701101206f6e20626c6f636b2066696e616c697a6174696f6e2e205175657279696e6720746869732073746f7261676520656e747279206f757473696465206f6620626c6f636bb020657865637574696f6e20636f6e746578742073686f756c6420616c77617973207969656c64207a65726f2e01084c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66200d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e00083445706f63684475726174696f6e0c75363420c800000000000000080d0120546865206e756d626572206f66202a2a736c6f74732a2a207468617420616e2065706f63682074616b65732e20576520636f75706c652073657373696f6e7320746ffc2065706f6368732c20692e652e2077652073746172742061206e65772073657373696f6e206f6e636520746865206e65772065706f636820626567696e732e444578706563746564426c6f636b54696d6524543a3a4d6f6d656e7420b80b00000000000014050120546865206578706563746564206176657261676520626c6f636b2074696d6520617420776869636820424142452073686f756c64206265206372656174696e67110120626c6f636b732e2053696e636520424142452069732070726f626162696c6973746963206974206973206e6f74207472697669616c20746f20666967757265206f75740501207768617420746865206578706563746564206176657261676520626c6f636b2074696d652073686f756c64206265206261736564206f6e2074686520736c6f740901206475726174696f6e20616e642074686520736563757269747920706172616d657465722060636020287768657265206031202d20636020726570726573656e7473a0207468652070726f626162696c697479206f66206120736c6f74206265696e6720656d707479292e00022454696d657374616d70012454696d657374616d70080c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f01040c736574040c6e6f7748436f6d706163743c543a3a4d6f6d656e743e3c5820536574207468652063757272656e742074696d652e00590120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6ed82070686173652c20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e004501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062794420604d696e696d756d506572696f64602e00d820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060496e686572656e74602e002c2023203c7765696768743e3501202d20604f2831296020284e6f7465207468617420696d706c656d656e746174696f6e73206f6620604f6e54696d657374616d7053657460206d75737420616c736f20626520604f2831296029a101202d20312073746f72616765207265616420616e6420312073746f72616765206d75746174696f6e2028636f64656320604f28312960292e202862656361757365206f6620604469645570646174653a3a74616b656020696e20606f6e5f66696e616c697a656029d8202d2031206576656e742068616e646c657220606f6e5f74696d657374616d705f736574602e204d75737420626520604f283129602e302023203c2f7765696768743e0004344d696e696d756d506572696f6424543a3a4d6f6d656e7420dc0500000000000010690120546865206d696e696d756d20706572696f64206265747765656e20626c6f636b732e204265776172652074686174207468697320697320646966666572656e7420746f20746865202a65787065637465642a20706572696f64690120746861742074686520626c6f636b2070726f64756374696f6e206170706172617475732070726f76696465732e20596f75722063686f73656e20636f6e73656e7375732073797374656d2077696c6c2067656e6572616c6c79650120776f726b2077697468207468697320746f2064657465726d696e6520612073656e7369626c6520626c6f636b2074696d652e20652e672e20466f7220417572612c2069742077696c6c20626520646f75626c6520746869737020706572696f64206f6e2064656661756c742073657474696e67732e000328417574686f72736869700128417574686f72736869700c18556e636c65730100e85665633c556e636c65456e7472794974656d3c543a3a426c6f636b4e756d6265722c20543a3a486173682c20543a3a4163636f756e7449643e3e0400041c20556e636c657318417574686f72000030543a3a4163636f756e7449640400046420417574686f72206f662063757272656e7420626c6f636b2e30446964536574556e636c6573010010626f6f6c040004bc205768657468657220756e636c6573207765726520616c72656164792073657420696e207468697320626c6f636b2e0104287365745f756e636c657304286e65775f756e636c6573385665633c543a3a4865616465723e04642050726f76696465206120736574206f6620756e636c65732e00001c48496e76616c6964556e636c65506172656e74048c2054686520756e636c6520706172656e74206e6f7420696e2074686520636861696e2e40556e636c6573416c7265616479536574048420556e636c657320616c72656164792073657420696e2074686520626c6f636b2e34546f6f4d616e79556e636c6573044420546f6f206d616e7920756e636c65732e3047656e65736973556e636c6504582054686520756e636c652069732067656e657369732e30546f6f48696768556e636c6504802054686520756e636c6520697320746f6f206869676820696e20636861696e2e50556e636c65416c7265616479496e636c75646564047c2054686520756e636c6520697320616c726561647920696e636c756465642e204f6c64556e636c6504b82054686520756e636c652069736e277420726563656e7420656e6f75676820746f20626520696e636c756465642e041c496e6469636573011c496e646963657304204163636f756e74730001023c543a3a4163636f756e74496e6465788828543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20626f6f6c29000400048820546865206c6f6f6b75702066726f6d20696e64657820746f206163636f756e742e011414636c61696d0414696e6465783c543a3a4163636f756e74496e646578489c2041737369676e20616e2070726576696f75736c7920756e61737369676e656420696e6465782e00e0205061796d656e743a20604465706f736974602069732072657365727665642066726f6d207468652073656e646572206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e00f4202d2060696e646578603a2074686520696e64657820746f20626520636c61696d65642e2054686973206d757374206e6f7420626520696e207573652e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e207472616e73666572080c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e6465785061012041737369676e20616e20696e64657820616c7265616479206f776e6564206279207468652073656e64657220746f20616e6f74686572206163636f756e742e205468652062616c616e6365207265736572766174696f6ebc206973206566666563746976656c79207472616e7366657272656420746f20746865206e6577206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002901202d2060696e646578603a2074686520696e64657820746f2062652072652d61737369676e65642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e68202d204f6e65207472616e73666572206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743ae4202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429e8202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429302023203c2f7765696768743e10667265650414696e6465783c543a3a4163636f756e74496e6465784898204672656520757020616e20696e646578206f776e6564206279207468652073656e6465722e006101205061796d656e743a20416e792070726576696f7573206465706f73697420706c6163656420666f722074686520696e64657820697320756e726573657276656420696e207468652073656e646572206163636f756e742e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206f776e2074686520696e6465782e001101202d2060696e646578603a2074686520696e64657820746f2062652066726565642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e008820456d6974732060496e646578467265656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e38666f7263655f7472616e736665720c0c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e64657818667265657a6510626f6f6c54590120466f72636520616e20696e64657820746f20616e206163636f756e742e205468697320646f65736e277420726571756972652061206465706f7369742e2049662074686520696e64657820697320616c7265616479ec2068656c642c207468656e20616e79206465706f736974206973207265696d62757273656420746f206974732063757272656e74206f776e65722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00a8202d2060696e646578603a2074686520696e64657820746f206265202872652d2961737369676e65642e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e4501202d2060667265657a65603a2069662073657420746f206074727565602c2077696c6c20667265657a652074686520696e64657820736f2069742063616e6e6f74206265207472616e736665727265642e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e7c202d20557020746f206f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743af8202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229fc202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229302023203c2f7765696768743e18667265657a650414696e6465783c543a3a4163636f756e74496e64657844690120467265657a6520616e20696e64657820736f2069742077696c6c20616c7761797320706f696e7420746f207468652073656e646572206163636f756e742e205468697320636f6e73756d657320746865206465706f7369742e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d7573742068617665206170206e6f6e2d66726f7a656e206163636f756e742060696e646578602e00b0202d2060696e646578603a2074686520696e64657820746f2062652066726f7a656e20696e20706c6163652e008c20456d6974732060496e64657846726f7a656e60206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e74202d20557020746f206f6e6520736c617368206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e010c34496e64657841737369676e656408244163636f756e744964304163636f756e74496e64657804b42041206163636f756e7420696e646578207761732061737369676e65642e205c5b696e6465782c2077686f5c5d28496e646578467265656404304163636f756e74496e64657804e82041206163636f756e7420696e64657820686173206265656e2066726565642075702028756e61737369676e6564292e205c5b696e6465785c5d2c496e64657846726f7a656e08304163636f756e74496e646578244163636f756e7449640429012041206163636f756e7420696e64657820686173206265656e2066726f7a656e20746f206974732063757272656e74206163636f756e742049442e205c5b696e6465782c2077686f5c5d041c4465706f7369743042616c616e63654f663c543e4000407a10f35a0000000000000000000004ac20546865206465706f736974206e656564656420666f7220726573657276696e6720616e20696e6465782e00052042616c616e636573012042616c616e6365731034546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004982054686520746f74616c20756e6974732069737375656420696e207468652073797374656d2e1c4163636f756e7401010230543a3a4163636f756e7449645c4163636f756e74446174613c543a3a42616c616e63653e000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c6c205468652062616c616e6365206f6620616e206163636f756e742e004101204e4f54453a2054686973206973206f6e6c79207573656420696e20746865206361736520746861742074686973206d6f64756c65206973207573656420746f2073746f72652062616c616e6365732e144c6f636b7301010230543a3a4163636f756e744964705665633c42616c616e63654c6f636b3c543a3a42616c616e63653e3e00040008b820416e79206c6971756964697479206c6f636b73206f6e20736f6d65206163636f756e742062616c616e6365732e2501204e4f54453a2053686f756c64206f6e6c79206265206163636573736564207768656e2073657474696e672c206368616e67696e6720616e642066726565696e672061206c6f636b2e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076322e302e3020666f72206e6577206e6574776f726b732e0110207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e6cd8205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572206163636f756e742e00090120607472616e73666572602077696c6c207365742074686520604672656542616c616e636560206f66207468652073656e64657220616e642072656365697665722e21012049742077696c6c2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d2062792074686520605472616e73666572466565602e1501204966207468652073656e6465722773206163636f756e742069732062656c6f7720746865206578697374656e7469616c206465706f736974206173206120726573756c74b4206f6620746865207472616e736665722c20746865206163636f756e742077696c6c206265207265617065642e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605369676e65646020627920746865207472616e736163746f722e002c2023203c7765696768743e3101202d20446570656e64656e74206f6e20617267756d656e747320627574206e6f7420637269746963616c2c20676976656e2070726f70657220696d706c656d656e746174696f6e7320666f72cc202020696e70757420636f6e6669672074797065732e205365652072656c617465642066756e6374696f6e732062656c6f772e6901202d20497420636f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e642077726974657320696e7465726e616c6c7920616e64206e6f20636f6d706c657820636f6d7075746174696f6e2e004c2052656c617465642066756e6374696f6e733a0051012020202d2060656e737572655f63616e5f77697468647261776020697320616c776179732063616c6c656420696e7465726e616c6c792062757420686173206120626f756e64656420636f6d706c65786974792e2d012020202d205472616e7366657272696e672062616c616e63657320746f206163636f756e7473207468617420646964206e6f74206578697374206265666f72652077696c6c206361757365d420202020202060543a3a4f6e4e65774163636f756e743a3a6f6e5f6e65775f6163636f756e746020746f2062652063616c6c65642e61012020202d2052656d6f76696e6720656e6f7567682066756e64732066726f6d20616e206163636f756e742077696c6c20747269676765722060543a3a4475737452656d6f76616c3a3a6f6e5f756e62616c616e636564602e49012020202d20607472616e736665725f6b6565705f616c6976656020776f726b73207468652073616d652077617920617320607472616e73666572602c206275742068617320616e206164646974696f6e616cf82020202020636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c20746865206f726967696e206163636f756e742e88202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d4501202d2042617365205765696768743a2037332e363420c2b5732c20776f7273742063617365207363656e6172696f20286163636f756e7420637265617465642c206163636f756e742072656d6f76656429dc202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374696e6174696f6e206163636f756e741501202d204f726967696e206163636f756e7420697320616c726561647920696e206d656d6f72792c20736f206e6f204442206f7065726174696f6e7320666f72207468656d2e302023203c2f7765696768743e2c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365206e65775f667265654c436f6d706163743c543a3a42616c616e63653e306e65775f72657365727665644c436f6d706163743c543a3a42616c616e63653e489420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e00210120546869732077696c6c20616c74657220604672656542616c616e63656020616e642060526573657276656442616c616e63656020696e2073746f726167652e2069742077696c6c090120616c736f2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d202860546f74616c49737375616e636560292e190120496620746865206e65772066726565206f722072657365727665642062616c616e63652069732062656c6f7720746865206578697374656e7469616c206465706f7369742c01012069742077696c6c20726573657420746865206163636f756e74206e6f6e63652028606672616d655f73797374656d3a3a4163636f756e744e6f6e636560292e00b420546865206469737061746368206f726967696e20666f7220746869732063616c6c2069732060726f6f74602e002c2023203c7765696768743e80202d20496e646570656e64656e74206f662074686520617267756d656e74732ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e58202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c202d2042617365205765696768743a6820202020202d204372656174696e673a2032372e353620c2b5736420202020202d204b696c6c696e673a2033352e313120c2b57398202d204442205765696768743a203120526561642c203120577269746520746f206077686f60302023203c2f7765696768743e38666f7263655f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e1851012045786163746c7920617320607472616e73666572602c2065786365707420746865206f726967696e206d75737420626520726f6f7420616e642074686520736f75726365206163636f756e74206d61792062652c207370656369666965642e2c2023203c7765696768743e4101202d2053616d65206173207472616e736665722c20627574206164646974696f6e616c207265616420616e6420777269746520626563617573652074686520736f75726365206163636f756e74206973902020206e6f7420617373756d656420746f20626520696e20746865206f7665726c61792e302023203c2f7765696768743e4c7472616e736665725f6b6565705f616c6976650810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e2c51012053616d6520617320746865205b607472616e73666572605d2063616c6c2c206275742077697468206120636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c2074686540206f726967696e206163636f756e742e00bc20393925206f66207468652074696d6520796f752077616e74205b607472616e73666572605d20696e73746561642e00c4205b607472616e73666572605d3a207374727563742e4d6f64756c652e68746d6c236d6574686f642e7472616e736665722c2023203c7765696768743ee8202d2043686561706572207468616e207472616e736665722062656361757365206163636f756e742063616e6e6f74206265206b696c6c65642e60202d2042617365205765696768743a2035312e3420c2b5731d01202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374202873656e64657220697320696e206f7665726c617920616c7265616479292c20233c2f7765696768743e01201c456e646f77656408244163636f756e7449641c42616c616e636504250120416e206163636f756e74207761732063726561746564207769746820736f6d6520667265652062616c616e63652e205c5b6163636f756e742c20667265655f62616c616e63655c5d20447573744c6f737408244163636f756e7449641c42616c616e636508410120416e206163636f756e74207761732072656d6f7665642077686f73652062616c616e636520776173206e6f6e2d7a65726f206275742062656c6f77204578697374656e7469616c4465706f7369742cd020726573756c74696e6720696e20616e206f75747269676874206c6f73732e205c5b6163636f756e742c2062616c616e63655c5d205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e636504a0205472616e73666572207375636365656465642e205c5b66726f6d2c20746f2c2076616c75655c5d2842616c616e63655365740c244163636f756e7449641c42616c616e63651c42616c616e636504cc20412062616c616e6365207761732073657420627920726f6f742e205c5b77686f2c20667265652c2072657365727665645c5d1c4465706f73697408244163636f756e7449641c42616c616e636504210120536f6d6520616d6f756e7420776173206465706f73697465642028652e672e20666f72207472616e73616374696f6e2066656573292e205c5b77686f2c206465706f7369745c5d20526573657276656408244163636f756e7449641c42616c616e636504210120536f6d652062616c616e63652077617320726573657276656420286d6f7665642066726f6d206672656520746f207265736572766564292e205c5b77686f2c2076616c75655c5d28556e726573657276656408244163636f756e7449641c42616c616e636504290120536f6d652062616c616e63652077617320756e726573657276656420286d6f7665642066726f6d20726573657276656420746f2066726565292e205c5b77686f2c2076616c75655c5d4852657365727665526570617472696174656410244163636f756e744964244163636f756e7449641c42616c616e6365185374617475730c510120536f6d652062616c616e636520776173206d6f7665642066726f6d207468652072657365727665206f6620746865206669727374206163636f756e7420746f20746865207365636f6e64206163636f756e742edc2046696e616c20617267756d656e7420696e64696361746573207468652064657374696e6174696f6e2062616c616e636520747970652ea8205c5b66726f6d2c20746f2c2062616c616e63652c2064657374696e6174696f6e5f7374617475735c5d04484578697374656e7469616c4465706f73697428543a3a42616c616e63654000407a10f35a0000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f206b65657020616e206163636f756e74206f70656e2e203856657374696e6742616c616e6365049c2056657374696e672062616c616e636520746f6f206869676820746f2073656e642076616c7565544c69717569646974795265737472696374696f6e7304c8204163636f756e74206c6971756964697479207265737472696374696f6e732070726576656e74207769746864726177616c204f766572666c6f77047420476f7420616e206f766572666c6f7720616674657220616464696e674c496e73756666696369656e7442616c616e636504782042616c616e636520746f6f206c6f7720746f2073656e642076616c7565484578697374656e7469616c4465706f73697404ec2056616c756520746f6f206c6f7720746f20637265617465206163636f756e742064756520746f206578697374656e7469616c206465706f736974244b656570416c6976650490205472616e736665722f7061796d656e7420776f756c64206b696c6c206163636f756e745c4578697374696e6756657374696e675363686564756c6504cc20412076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e742c446561644163636f756e74048c2042656e6566696369617279206163636f756e74206d757374207072652d657869737406485472616e73616374696f6e5061796d656e7401485472616e73616374696f6e5061796d656e7408444e6578744665654d756c7469706c6965720100284d756c7469706c69657240000064a7b3b6e00d0000000000000000003853746f7261676556657273696f6e01002052656c6561736573040000000008485472616e73616374696f6e427974654665653042616c616e63654f663c543e4000e40b54020000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e2c576569676874546f466565a45665633c576569676874546f466565436f656666696369656e743c42616c616e63654f663c543e3e3e5c0401000000000000000000000000000000000000000001040d012054686520706f6c796e6f6d69616c2074686174206973206170706c69656420696e206f7264657220746f20646572697665206665652066726f6d207765696768742e00071c5374616b696e67011c5374616b696e678c30486973746f7279446570746801000c75333210540000001c8c204e756d626572206f66206572617320746f206b65657020696e20686973746f72792e00390120496e666f726d6174696f6e206973206b65707420666f72206572617320696e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e006101204d757374206265206d6f7265207468616e20746865206e756d626572206f6620657261732064656c617965642062792073657373696f6e206f74686572776973652e20492e652e2061637469766520657261206d757374390120616c7761797320626520696e20686973746f72792e20492e652e20606163746976655f657261203e2063757272656e745f657261202d20686973746f72795f646570746860206d757374206265302067756172616e746565642e3856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321000000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e34496e76756c6e657261626c65730100445665633c543a3a4163636f756e7449643e04000c590120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c79206b69636b65642e20497427732061205665632073696e636520746865792772654d01206561737920746f20696e697469616c697a6520616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f7572ac20696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e18426f6e64656400010530543a3a4163636f756e74496430543a3a4163636f756e744964000400040101204d61702066726f6d20616c6c206c6f636b65642022737461736822206163636f756e747320746f2074686520636f6e74726f6c6c6572206163636f756e742e184c656467657200010230543a3a4163636f756e744964a45374616b696e674c65646765723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400044501204d61702066726f6d20616c6c2028756e6c6f636b6564292022636f6e74726f6c6c657222206163636f756e747320746f2074686520696e666f20726567617264696e6720746865207374616b696e672e14506179656501010530543a3a4163636f756e7449647c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e00040004e42057686572652074686520726577617264207061796d656e742073686f756c64206265206d6164652e204b657965642062792073746173682e2856616c696461746f727301010530543a3a4163636f756e7449643856616c696461746f72507265667300040004450120546865206d61702066726f6d202877616e6e616265292076616c696461746f72207374617368206b657920746f2074686520707265666572656e636573206f6620746861742076616c696461746f722e284e6f6d696e61746f727300010530543a3a4163636f756e744964644e6f6d696e6174696f6e733c543a3a4163636f756e7449643e00040004650120546865206d61702066726f6d206e6f6d696e61746f72207374617368206b657920746f2074686520736574206f66207374617368206b657973206f6620616c6c2076616c696461746f727320746f206e6f6d696e6174652e2843757272656e74457261000020457261496e6465780400105c205468652063757272656e742065726120696e6465782e006501205468697320697320746865206c617465737420706c616e6e6564206572612c20646570656e64696e67206f6e20686f77207468652053657373696f6e2070616c6c657420717565756573207468652076616c696461746f7280207365742c206974206d6967687420626520616374697665206f72206e6f742e24416374697665457261000034416374697665457261496e666f040010d820546865206163746976652065726120696e666f726d6174696f6e2c20697420686f6c647320696e64657820616e642073746172742e00b820546865206163746976652065726120697320746865206572612063757272656e746c792072657761726465642e2d012056616c696461746f7220736574206f66207468697320657261206d75737420626520657175616c20746f206053657373696f6e496e746572666163653a3a76616c696461746f7273602e5445726173537461727453657373696f6e496e64657800010520457261496e6465783053657373696f6e496e646578000400043101205468652073657373696f6e20696e646578206174207768696368207468652065726120737461727420666f7220746865206c6173742060484953544f52595f44455054486020657261732e2c457261735374616b65727301020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000001878204578706f73757265206f662076616c696461746f72206174206572612e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e48457261735374616b657273436c697070656401020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000002c9820436c6970706564204578706f73757265206f662076616c696461746f72206174206572612e00590120546869732069732073696d696c617220746f205b60457261735374616b657273605d20627574206e756d626572206f66206e6f6d696e61746f7273206578706f736564206973207265647563656420746f20746865dc2060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732e1d0120284e6f74653a20746865206669656c642060746f74616c6020616e6420606f776e60206f6620746865206578706f737572652072656d61696e7320756e6368616e676564292ef42054686973206973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e005d012054686973206973206b657965642066697374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e484572617356616c696461746f72507265667301020520457261496e64657830543a3a4163636f756e7449643856616c696461746f7250726566730504001411012053696d696c617220746f2060457261735374616b657273602c207468697320686f6c64732074686520707265666572656e636573206f662076616c696461746f72732e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4c4572617356616c696461746f7252657761726400010520457261496e6465783042616c616e63654f663c543e0004000c09012054686520746f74616c2076616c696461746f7220657261207061796f757420666f7220746865206c6173742060484953544f52595f44455054486020657261732e0021012045726173207468617420686176656e27742066696e697368656420796574206f7220686173206265656e2072656d6f76656420646f65736e27742068617665207265776172642e4045726173526577617264506f696e747301010520457261496e64657874457261526577617264506f696e74733c543a3a4163636f756e7449643e0014000000000008ac205265776172647320666f7220746865206c6173742060484953544f52595f44455054486020657261732e250120496620726577617264206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207265776172642069732072657475726e65642e3845726173546f74616c5374616b6501010520457261496e6465783042616c616e63654f663c543e00400000000000000000000000000000000008ec2054686520746f74616c20616d6f756e74207374616b656420666f7220746865206c6173742060484953544f52595f44455054486020657261732e1d0120496620746f74616c206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207374616b652069732072657475726e65642e20466f72636545726101001c466f7263696e6704000454204d6f6465206f662065726120666f7263696e672e4c536c6173685265776172644672616374696f6e01001c50657262696c6c10000000000cf8205468652070657263656e74616765206f662074686520736c617368207468617420697320646973747269627574656420746f207265706f72746572732e00e4205468652072657374206f662074686520736c61736865642076616c75652069732068616e646c6564206279207468652060536c617368602e4c43616e63656c6564536c6173685061796f757401003042616c616e63654f663c543e40000000000000000000000000000000000815012054686520616d6f756e74206f662063757272656e637920676976656e20746f207265706f7274657273206f66206120736c617368206576656e7420776869636820776173ec2063616e63656c65642062792065787472616f7264696e6172792063697263756d7374616e6365732028652e672e20676f7665726e616e6365292e40556e6170706c696564536c617368657301010520457261496e646578bc5665633c556e6170706c696564536c6173683c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e00040004c420416c6c20756e6170706c69656420736c61736865732074686174206172652071756575656420666f72206c617465722e28426f6e646564457261730100745665633c28457261496e6465782c2053657373696f6e496e646578293e04001025012041206d617070696e672066726f6d207374696c6c2d626f6e646564206572617320746f207468652066697273742073657373696f6e20696e646578206f662074686174206572612e00c8204d75737420636f6e7461696e7320696e666f726d6174696f6e20666f72206572617320666f72207468652072616e67653abc20605b6163746976655f657261202d20626f756e64696e675f6475726174696f6e3b206163746976655f6572615d604c56616c696461746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449645c2850657262696c6c2c2042616c616e63654f663c543e2905040008450120416c6c20736c617368696e67206576656e7473206f6e2076616c696461746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682070726f706f7274696f6e7020616e6420736c6173682076616c7565206f6620746865206572612e4c4e6f6d696e61746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449643042616c616e63654f663c543e05040004610120416c6c20736c617368696e67206576656e7473206f6e206e6f6d696e61746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682076616c7565206f6620746865206572612e34536c617368696e675370616e7300010530543a3a4163636f756e7449645c736c617368696e673a3a536c617368696e675370616e73000400048c20536c617368696e67207370616e7320666f72207374617368206163636f756e74732e245370616e536c6173680101058c28543a3a4163636f756e7449642c20736c617368696e673a3a5370616e496e6465782988736c617368696e673a3a5370616e5265636f72643c42616c616e63654f663c543e3e00800000000000000000000000000000000000000000000000000000000000000000083d01205265636f72647320696e666f726d6174696f6e2061626f757420746865206d6178696d756d20736c617368206f6620612073746173682077697468696e206120736c617368696e67207370616e2cb82061732077656c6c20617320686f77206d7563682072657761726420686173206265656e2070616964206f75742e584561726c69657374556e6170706c696564536c617368000020457261496e646578040004fc20546865206561726c696573742065726120666f72207768696368207765206861766520612070656e64696e672c20756e6170706c69656420736c6173682e48536e617073686f7456616c696461746f72730000445665633c543a3a4163636f756e7449643e040008650120536e617073686f74206f662076616c696461746f72732061742074686520626567696e6e696e67206f66207468652063757272656e7420656c656374696f6e2077696e646f772e20546869732073686f756c64206f6e6c791901206861766520612076616c7565207768656e205b60457261456c656374696f6e537461747573605d203d3d2060456c656374696f6e5374617475733a3a4f70656e285f29602e48536e617073686f744e6f6d696e61746f72730000445665633c543a3a4163636f756e7449643e040008650120536e617073686f74206f66206e6f6d696e61746f72732061742074686520626567696e6e696e67206f66207468652063757272656e7420656c656374696f6e2077696e646f772e20546869732073686f756c64206f6e6c791901206861766520612076616c7565207768656e205b60457261456c656374696f6e537461747573605d203d3d2060456c656374696f6e5374617475733a3a4f70656e285f29602e34517565756564456c65637465640000a8456c656374696f6e526573756c743c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e04000c650120546865206e6578742076616c696461746f72207365742e2041742074686520656e64206f6620616e206572612c206966207468697320697320617661696c61626c652028706f74656e7469616c6c792066726f6d20746865610120726573756c74206f6620616e206f6666636861696e20776f726b6572292c20697420697320696d6d6564696174656c7920757365642e204f74686572776973652c20746865206f6e2d636861696e20656c656374696f6e342069732065786563757465642e2c51756575656453636f7265000034456c656374696f6e53636f7265040004b0205468652073636f7265206f66207468652063757272656e74205b60517565756564456c6563746564605d2e44457261456c656374696f6e537461747573010078456c656374696f6e5374617475733c543a3a426c6f636b4e756d6265723e040008490120466c616720746f20636f6e74726f6c2074686520657865637574696f6e206f6620746865206f6666636861696e20656c656374696f6e2e205768656e20604f70656e285f29602c207765206163636570746c20736f6c7574696f6e7320746f206265207375626d69747465642e54497343757272656e7453657373696f6e46696e616c010010626f6f6c0400084d012054727565206966207468652063757272656e74202a2a706c616e6e65642a2a2073657373696f6e2069732066696e616c2e204e6f74652074686174207468697320646f6573206e6f742074616b65206572615820666f7263696e6720696e746f206163636f756e742e3853746f7261676556657273696f6e01002052656c6561736573040310cc2054727565206966206e6574776f726b20686173206265656e20757067726164656420746f20746869732076657273696f6e2e7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076332e302e3020666f72206e6577206e6574776f726b732e016010626f6e640c28636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e1470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e5865012054616b6520746865206f726967696e206163636f756e74206173206120737461736820616e64206c6f636b207570206076616c756560206f66206974732062616c616e63652e2060636f6e74726f6c6c6572602077696c6c8420626520746865206163636f756e74207468617420636f6e74726f6c732069742e003101206076616c756560206d757374206265206d6f7265207468616e2074686520606d696e696d756d5f62616c616e636560207370656369666965642062792060543a3a43757272656e6379602e00250120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20627920746865207374617368206163636f756e742e004020456d6974732060426f6e646564602e002c2023203c7765696768743ed4202d20496e646570656e64656e74206f662074686520617267756d656e74732e204d6f64657261746520636f6d706c65786974792e20202d204f2831292e68202d20546872656520657874726120444220656e74726965732e005101204e4f54453a2054776f206f66207468652073746f726167652077726974657320286053656c663a3a626f6e646564602c206053656c663a3a7061796565602920617265205f6e657665725f20636c65616e6564410120756e6c6573732074686520606f726967696e602066616c6c732062656c6f77205f6578697374656e7469616c206465706f7369745f20616e6420676574732072656d6f76656420617320647573742e4c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a3101202d20526561643a20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c2043757272656e74204572612c20486973746f72792044657074682c204c6f636b73e0202d2057726974653a20426f6e6465642c2050617965652c205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e28626f6e645f657874726104386d61785f6164646974696f6e616c54436f6d706163743c42616c616e63654f663c543e3e5465012041646420736f6d6520657874726120616d6f756e742074686174206861766520617070656172656420696e207468652073746173682060667265655f62616c616e63656020696e746f207468652062616c616e63652075703420666f72207374616b696e672e00510120557365207468697320696620746865726520617265206164646974696f6e616c2066756e647320696e20796f7572207374617368206163636f756e74207468617420796f75207769736820746f20626f6e642e650120556e6c696b65205b60626f6e64605d206f72205b60756e626f6e64605d20746869732066756e6374696f6e20646f6573206e6f7420696d706f736520616e79206c696d69746174696f6e206f6e2074686520616d6f756e744c20746861742063616e2062652061646465642e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c657220616e64f82069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004020456d6974732060426f6e646564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e20202d204f2831292e40202d204f6e6520444220656e7472792e34202d2d2d2d2d2d2d2d2d2d2d2d2c204442205765696768743a1501202d20526561643a2045726120456c656374696f6e205374617475732c20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c204c6f636b73a4202d2057726974653a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e18756e626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e805501205363686564756c65206120706f7274696f6e206f662074686520737461736820746f20626520756e6c6f636b656420726561647920666f72207472616e73666572206f75742061667465722074686520626f6e64010120706572696f6420656e64732e2049662074686973206c656176657320616e20616d6f756e74206163746976656c7920626f6e646564206c657373207468616e250120543a3a43757272656e63793a3a6d696e696d756d5f62616c616e636528292c207468656e20697420697320696e6372656173656420746f207468652066756c6c20616d6f756e742e004901204f6e63652074686520756e6c6f636b20706572696f6420697320646f6e652c20796f752063616e2063616c6c206077697468647261775f756e626f6e6465646020746f2061637475616c6c79206d6f7665c0207468652066756e6473206f7574206f66206d616e6167656d656e7420726561647920666f72207472616e736665722e003d01204e6f206d6f7265207468616e2061206c696d69746564206e756d626572206f6620756e6c6f636b696e67206368756e6b73202873656520604d41585f554e4c4f434b494e475f4348554e4b5360293d012063616e20636f2d657869737473206174207468652073616d652074696d652e20496e207468617420636173652c205b6043616c6c3a3a77697468647261775f756e626f6e646564605d206e656564fc20746f2062652063616c6c656420666972737420746f2072656d6f766520736f6d65206f6620746865206368756e6b732028696620706f737369626c65292e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004820456d6974732060556e626f6e646564602e00982053656520616c736f205b6043616c6c3a3a77697468647261775f756e626f6e646564605d2e002c2023203c7765696768743e4101202d20496e646570656e64656e74206f662074686520617267756d656e74732e204c696d697465642062757420706f74656e7469616c6c79206578706c6f697461626c6520636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732e6501202d20456163682063616c6c20287265717569726573207468652072656d61696e646572206f662074686520626f6e6465642062616c616e636520746f2062652061626f766520606d696e696d756d5f62616c616e63656029710120202077696c6c2063617573652061206e657720656e74727920746f20626520696e73657274656420696e746f206120766563746f722028604c65646765722e756e6c6f636b696e676029206b65707420696e2073746f726167652e5101202020546865206f6e6c792077617920746f20636c65616e207468652061666f72656d656e74696f6e65642073746f72616765206974656d20697320616c736f20757365722d636f6e74726f6c6c6564207669615c2020206077697468647261775f756e626f6e646564602e40202d204f6e6520444220656e7472792e2c202d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a1d01202d20526561643a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e744572612c204c6f636b732c2042616c616e63654f662053746173682ca4202d2057726974653a204c6f636b732c204c65646765722c2042616c616e63654f662053746173682c28203c2f7765696768743e4477697468647261775f756e626f6e64656404486e756d5f736c617368696e675f7370616e730c7533327c2d012052656d6f766520616e7920756e6c6f636b6564206368756e6b732066726f6d207468652060756e6c6f636b696e67602071756575652066726f6d206f7572206d616e6167656d656e742e003501205468697320657373656e7469616c6c7920667265657320757020746861742062616c616e636520746f206265207573656420627920746865207374617368206163636f756e7420746f20646f4c2077686174657665722069742077616e74732e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004c20456d697473206057697468647261776e602e006c2053656520616c736f205b6043616c6c3a3a756e626f6e64605d2e002c2023203c7765696768743e5501202d20436f756c6420626520646570656e64656e74206f6e2074686520606f726967696e6020617267756d656e7420616e6420686f77206d7563682060756e6c6f636b696e6760206368756e6b732065786973742e45012020497420696d706c6965732060636f6e736f6c69646174655f756e6c6f636b656460207768696368206c6f6f7073206f76657220604c65646765722e756e6c6f636b696e67602c207768696368206973f42020696e6469726563746c7920757365722d636f6e74726f6c6c65642e20536565205b60756e626f6e64605d20666f72206d6f72652064657461696c2e7901202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732c20796574207468652073697a65206f6620776869636820636f756c64206265206c61726765206261736564206f6e20606c6564676572602ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d090120436f6d706c6578697479204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2072656d6f766520205570646174653a2501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c204c6f636b732c205b4f726967696e204163636f756e745da8202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c656467657218204b696c6c3a4501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c20426f6e6465642c20536c617368696e67205370616e732c205b4f726967696e8c2020204163636f756e745d2c204c6f636b732c2042616c616e63654f662073746173685101202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732cb02020205b4f726967696e204163636f756e745d2c204c6f636b732c2042616c616e63654f662073746173682e74202d2057726974657320456163683a205370616e536c617368202a20530d01204e4f54453a2057656967687420616e6e6f746174696f6e20697320746865206b696c6c207363656e6172696f2c20776520726566756e64206f74686572776973652e302023203c2f7765696768743e2076616c6964617465041470726566733856616c696461746f72507265667344e8204465636c617265207468652064657369726520746f2076616c696461746520666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e30202d2d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a90202d20526561643a2045726120456c656374696f6e205374617475732c204c656467657280202d2057726974653a204e6f6d696e61746f72732c2056616c696461746f7273302023203c2f7765696768743e206e6f6d696e617465041c74617267657473a05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e4c1101204465636c617265207468652064657369726520746f206e6f6d696e6174652060746172676574736020666f7220746865206f726967696e20636f6e74726f6c6c65722e00510120456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e20546869732063616e206f6e6c792062652063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e3101202d20546865207472616e73616374696f6e277320636f6d706c65786974792069732070726f706f7274696f6e616c20746f207468652073697a65206f662060746172676574736020284e2901012077686963682069732063617070656420617420436f6d7061637441737369676e6d656e74733a3a4c494d495420284d41585f4e4f4d494e4154494f4e53292ed8202d20426f74682074686520726561647320616e642077726974657320666f6c6c6f7720612073696d696c6172207061747465726e2e28202d2d2d2d2d2d2d2d2d34205765696768743a204f284e2984207768657265204e20697320746865206e756d626572206f6620746172676574732c204442205765696768743ac8202d2052656164733a2045726120456c656374696f6e205374617475732c204c65646765722c2043757272656e742045726184202d205772697465733a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e146368696c6c0044c8204465636c617265206e6f2064657369726520746f206569746865722076616c6964617465206f72206e6f6d696e6174652e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e54202d20436f6e7461696e73206f6e6520726561642ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e24202d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a88202d20526561643a20457261456c656374696f6e5374617475732c204c656467657280202d2057726974653a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e247365745f7061796565041470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e40b8202852652d2973657420746865207061796d656e742074617267657420666f72206120636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e28202d2d2d2d2d2d2d2d2d3c202d205765696768743a204f28312934202d204442205765696768743a4c20202020202d20526561643a204c65646765724c20202020202d2057726974653a205061796565302023203c2f7765696768743e387365745f636f6e74726f6c6c65720428636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654090202852652d297365742074686520636f6e74726f6c6c6572206f6620612073746173682e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e2c202d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743af4202d20526561643a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572f8202d2057726974653a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572302023203c2f7765696768743e4c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e209420536574732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e34205765696768743a204f2831295c2057726974653a2056616c696461746f7220436f756e74302023203c2f7765696768743e60696e6372656173655f76616c696461746f725f636f756e7404286164646974696f6e616c30436f6d706163743c7533323e1cac20496e6372656d656e74732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e842053616d65206173205b607365745f76616c696461746f725f636f756e74605d2e302023203c2f7765696768743e547363616c655f76616c696461746f725f636f756e740418666163746f721c50657263656e741cd4205363616c652075702074686520696465616c206e756d626572206f662076616c696461746f7273206279206120666163746f722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e842053616d65206173205b607365745f76616c696461746f725f636f756e74605d2e302023203c2f7765696768743e34666f7263655f6e6f5f657261730024b020466f72636520746865726520746f206265206e6f206e6577206572617320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e3c202d205765696768743a204f28312948202d2057726974653a20466f726365457261302023203c2f7765696768743e34666f7263655f6e65775f65726100284d0120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f6620746865206e6578742073657373696f6e2e20416674657220746869732c2069742077696c6c206265a020726573657420746f206e6f726d616c20286e6f6e2d666f7263656429206265686176696f75722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e3c202d205765696768743a204f28312944202d20577269746520466f726365457261302023203c2f7765696768743e447365745f696e76756c6e657261626c65730434696e76756c6e657261626c6573445665633c543a3a4163636f756e7449643e20cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e1c202d204f2856295c202d2057726974653a20496e76756c6e657261626c6573302023203c2f7765696768743e34666f7263655f756e7374616b650814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c753332280d0120466f72636520612063757272656e74207374616b657220746f206265636f6d6520636f6d706c6574656c7920756e7374616b65642c20696d6d6564696174656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743eec204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2062652072656d6f766564b82052656164733a20426f6e6465642c20536c617368696e67205370616e732c204163636f756e742c204c6f636b738501205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c204163636f756e742c204c6f636b736c2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e50666f7263655f6e65775f6572615f616c776179730020050120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f662073657373696f6e7320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e3c202d205765696768743a204f28312948202d2057726974653a20466f726365457261302023203c2f7765696768743e5463616e63656c5f64656665727265645f736c617368080c65726120457261496e64657834736c6173685f696e6469636573205665633c7533323e34982043616e63656c20656e6163746d656e74206f66206120646566657272656420736c6173682e00b42043616e2062652063616c6c6564206279207468652060543a3a536c61736843616e63656c4f726967696e602e00050120506172616d65746572733a2065726120616e6420696e6469636573206f662074686520736c617368657320666f7220746861742065726120746f206b696c6c2e002c2023203c7765696768743e5420436f6d706c65786974793a204f2855202b205329b82077697468205520756e6170706c69656420736c6173686573207765696768746564207769746820553d31303030d420616e64205320697320746865206e756d626572206f6620736c61736820696e646963657320746f2062652063616e63656c65642e68202d20526561643a20556e6170706c69656420536c61736865736c202d2057726974653a20556e6170706c69656420536c6173686573302023203c2f7765696768743e387061796f75745f7374616b657273083c76616c696461746f725f737461736830543a3a4163636f756e7449640c65726120457261496e64657870110120506179206f757420616c6c20746865207374616b65727320626568696e6420612073696e676c652076616c696461746f7220666f7220612073696e676c65206572612e004d01202d206076616c696461746f725f73746173686020697320746865207374617368206163636f756e74206f66207468652076616c696461746f722e205468656972206e6f6d696e61746f72732c20757020746f290120202060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602c2077696c6c20616c736f207265636569766520746865697220726577617264732e3501202d206065726160206d617920626520616e7920657261206265747765656e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e00590120546865206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e20416e79206163636f756e742063616e2063616c6c20746869732066756e6374696f6e2c206576656e20696678206974206973206e6f74206f6e65206f6620746865207374616b6572732e00010120546869732063616e206f6e6c792062652063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e0101202d2054696d6520636f6d706c65786974793a206174206d6f7374204f284d61784e6f6d696e61746f72526577617264656450657256616c696461746f72292ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e30202d2d2d2d2d2d2d2d2d2d2d1d01204e20697320746865204e756d626572206f66207061796f75747320666f72207468652076616c696461746f722028696e636c7564696e67207468652076616c696461746f722920205765696768743a88202d205265776172642044657374696e6174696f6e205374616b65643a204f284e29c4202d205265776172642044657374696e6174696f6e20436f6e74726f6c6c657220284372656174696e67293a204f284e292c204442205765696768743a2901202d20526561643a20457261456c656374696f6e5374617475732c2043757272656e744572612c20486973746f727944657074682c204572617356616c696461746f725265776172642c2d01202020202020202020457261735374616b657273436c69707065642c2045726173526577617264506f696e74732c204572617356616c696461746f725072656673202838206974656d73291101202d205265616420456163683a20426f6e6465642c204c65646765722c2050617965652c204c6f636b732c2053797374656d204163636f756e74202835206974656d7329d8202d20577269746520456163683a2053797374656d204163636f756e742c204c6f636b732c204c6564676572202833206974656d73290051012020204e4f54453a20776569676874732061726520617373756d696e672074686174207061796f75747320617265206d61646520746f20616c697665207374617368206163636f756e7420285374616b6564292e5901202020506179696e67206576656e2061206465616420636f6e74726f6c6c65722069732063686561706572207765696768742d776973652e20576520646f6e277420646f20616e7920726566756e647320686572652e302023203c2f7765696768743e187265626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e38e0205265626f6e64206120706f7274696f6e206f6620746865207374617368207363686564756c656420746f20626520756e6c6f636b65642e00550120546865206469737061746368206f726967696e206d757374206265207369676e65642062792074686520636f6e74726f6c6c65722c20616e642069742063616e206265206f6e6c792063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ed4202d2054696d6520636f6d706c65786974793a204f284c292c207768657265204c20697320756e6c6f636b696e67206368756e6b7394202d20426f756e64656420627920604d41585f554e4c4f434b494e475f4348554e4b53602ef4202d2053746f72616765206368616e6765733a2043616e277420696e6372656173652073746f726167652c206f6e6c792064656372656173652069742e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a010120202020202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c204c6f636b732c205b4f726967696e204163636f756e745db820202020202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e447365745f686973746f72795f646570746808446e65775f686973746f72795f646570746844436f6d706163743c457261496e6465783e485f6572615f6974656d735f64656c6574656430436f6d706163743c7533323e543101205365742060486973746f72794465707468602076616c75652e20546869732066756e6374696f6e2077696c6c2064656c65746520616e7920686973746f727920696e666f726d6174696f6e80207768656e2060486973746f727944657074686020697320726564756365642e003020506172616d65746572733a1101202d20606e65775f686973746f72795f6465707468603a20546865206e657720686973746f727920646570746820796f7520776f756c64206c696b6520746f207365742e4901202d20606572615f6974656d735f64656c65746564603a20546865206e756d626572206f66206974656d7320746861742077696c6c2062652064656c6574656420627920746869732064697370617463682e450120202020546869732073686f756c64207265706f727420616c6c207468652073746f72616765206974656d7320746861742077696c6c2062652064656c6574656420627920636c656172696e67206f6c6445012020202065726120686973746f72792e204e656564656420746f207265706f727420616e2061636375726174652077656967687420666f72207468652064697370617463682e2054727573746564206279a02020202060526f6f746020746f207265706f727420616e206163637572617465206e756d6265722e0054204f726967696e206d75737420626520726f6f742e002c2023203c7765696768743ee0202d20453a204e756d626572206f6620686973746f7279206465707468732072656d6f7665642c20692e652e203130202d3e2037203d20333c202d205765696768743a204f28452934202d204442205765696768743aa020202020202d2052656164733a2043757272656e74204572612c20486973746f72792044657074687020202020202d205772697465733a20486973746f7279204465707468310120202020202d20436c6561722050726566697820456163683a20457261205374616b6572732c204572615374616b657273436c69707065642c204572617356616c696461746f725072656673810120202020202d2057726974657320456163683a204572617356616c696461746f725265776172642c2045726173526577617264506f696e74732c2045726173546f74616c5374616b652c2045726173537461727453657373696f6e496e646578302023203c2f7765696768743e28726561705f73746173680814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c7533323c39012052656d6f766520616c6c20646174612073747275637475726520636f6e6365726e696e672061207374616b65722f7374617368206f6e6365206974732062616c616e6365206973207a65726f2e6101205468697320697320657373656e7469616c6c79206571756976616c656e7420746f206077697468647261775f756e626f6e64656460206578636570742069742063616e2062652063616c6c656420627920616e796f6e65c020616e6420746865207461726765742060737461736860206d7573742068617665206e6f2066756e6473206c6566742e009020546869732063616e2062652063616c6c65642066726f6d20616e79206f726967696e2e000101202d20607374617368603a20546865207374617368206163636f756e7420746f20726561702e204974732062616c616e6365206d757374206265207a65726f2e002c2023203c7765696768743e250120436f6d706c65786974793a204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e73206f6e20746865206163636f756e742e2c204442205765696768743ad8202d2052656164733a205374617368204163636f756e742c20426f6e6465642c20536c617368696e67205370616e732c204c6f636b73a501202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c205374617368204163636f756e742c204c6f636b7374202d2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e607375626d69745f656c656374696f6e5f736f6c7574696f6e141c77696e6e6572734c5665633c56616c696461746f72496e6465783e1c636f6d7061637448436f6d7061637441737369676e6d656e74731473636f726534456c656374696f6e53636f72650c65726120457261496e6465781073697a6530456c656374696f6e53697a65c4e4205375626d697420616e20656c656374696f6e20726573756c7420746f2074686520636861696e2e2049662074686520736f6c7574696f6e3a003420312e2069732076616c69642e150120322e206861732061206265747465722073636f7265207468616e206120706f74656e7469616c6c79206578697374696e6720736f6c7574696f6e206f6e20636861696e2e0084207468656e2c2069742077696c6c206265205f7075745f206f6e20636861696e2e00ac204120736f6c7574696f6e20636f6e7369737473206f662074776f20706965636573206f6620646174613a00f420312e206077696e6e657273603a206120666c617420766563746f72206f6620616c6c207468652077696e6e657273206f662074686520726f756e642e510120322e206061737369676e6d656e7473603a2074686520636f6d706163742076657273696f6e206f6620616e2061737369676e6d656e7420766563746f72207468617420656e636f6465732074686520656467653020202020776569676874732e00210120426f7468206f66207768696368206d617920626520636f6d7075746564207573696e67205f70687261676d656e5f2c206f7220616e79206f7468657220616c676f726974686d2e00a8204164646974696f6e616c6c792c20746865207375626d6974746572206d7573742070726f766964653a00c8202d20546865206073636f7265602074686174207468657920636c61696d20746865697220736f6c7574696f6e206861732e004d0120426f74682076616c696461746f727320616e64206e6f6d696e61746f72732077696c6c20626520726570726573656e74656420627920696e646963657320696e2074686520736f6c7574696f6e2e205468651d0120696e64696365732073686f756c6420726573706563742074686520636f72726573706f6e64696e6720747970657320285b6056616c696461746f72496e646578605d20616e643101205b604e6f6d696e61746f72496e646578605d292e204d6f72656f7665722c20746865792073686f756c642062652076616c6964207768656e207573656420746f20696e64657820696e746f5101205b60536e617073686f7456616c696461746f7273605d20616e64205b60536e617073686f744e6f6d696e61746f7273605d2e20416e7920696e76616c696420696e6465782077696c6c20636175736520746865610120736f6c7574696f6e20746f2062652072656a65637465642e2054686573652074776f2073746f72616765206974656d73206172652073657420647572696e672074686520656c656374696f6e2077696e646f7720616e6498206d6179206265207573656420746f2064657465726d696e652074686520696e64696365732e0060204120736f6c7574696f6e2069732076616c69642069663a00e420302e204974206973207375626d6974746564207768656e205b60457261456c656374696f6e537461747573605d20697320604f70656e602ef820312e2049747320636c61696d65642073636f726520697320657175616c20746f207468652073636f726520636f6d7075746564206f6e2d636861696e2eac20322e2050726573656e74732074686520636f7272656374206e756d626572206f662077696e6e6572732e550120332e20416c6c20696e6465786573206d7573742062652076616c7565206163636f7264696e6720746f2074686520736e617073686f7420766563746f72732e20416c6c20656467652076616c756573206d7573745d0120202020616c736f20626520636f727265637420616e642073686f756c64206e6f74206f766572666c6f7720746865206772616e756c6172697479206f662074686520726174696f20747970652028692e652e2032353640202020206f722062696c6c696f6e292e0d0120342e20466f72206561636820656467652c20616c6c2074617267657473206172652061637475616c6c79206e6f6d696e617465642062792074686520766f7465722e6c20352e2048617320636f72726563742073656c662d766f7465732e00c0204120736f6c7574696f6e732073636f726520697320636f6e736973746564206f66203320706172616d65746572733a00650120312e20606d696e207b20737570706f72742e746f74616c207d6020666f72206561636820737570706f7274206f6620612077696e6e65722e20546869732076616c75652073686f756c64206265206d6178696d697a65642e650120322e206073756d207b20737570706f72742e746f74616c207d6020666f72206561636820737570706f7274206f6620612077696e6e65722e20546869732076616c75652073686f756c64206265206d696e696d697a65642e410120332e206073756d207b20737570706f72742e746f74616c5e32207d6020666f72206561636820737570706f7274206f6620612077696e6e65722e20546869732076616c75652073686f756c642062659c202020206d696e696d697a65642028746f20656e73757265206c6573732076617269616e636529002c2023203c7765696768743e190120546865207472616e73616374696f6e20697320617373756d656420746f20626520746865206c6f6e6765737420706174682c20612062657474657220736f6c7574696f6e2ea42020202d20496e697469616c20736f6c7574696f6e20697320616c6d6f7374207468652073616d652e45012020202d20576f72736520736f6c7574696f6e20697320726574726163656420696e207072652d64697370617463682d636865636b73207768696368207365747320697473206f776e207765696768742e302023203c2f7765696768743e847375626d69745f656c656374696f6e5f736f6c7574696f6e5f756e7369676e6564141c77696e6e6572734c5665633c56616c696461746f72496e6465783e1c636f6d7061637448436f6d7061637441737369676e6d656e74731473636f726534456c656374696f6e53636f72650c65726120457261496e6465781073697a6530456c656374696f6e53697a6524c020556e7369676e65642076657273696f6e206f6620607375626d69745f656c656374696f6e5f736f6c7574696f6e602e005d01204e6f746520746861742074686973206d757374207061737320746865205b6056616c6964617465556e7369676e6564605d20636865636b207768696368206f6e6c7920616c6c6f7773207472616e73616374696f6e7361012066726f6d20746865206c6f63616c206e6f646520746f20626520696e636c756465642e20496e206f7468657220776f7264732c206f6e6c792074686520626c6f636b20617574686f722063616e20696e636c756465206168207472616e73616374696f6e20696e2074686520626c6f636b2e002c2023203c7765696768743e8820536565205b607375626d69745f656c656374696f6e5f736f6c7574696f6e605d2e302023203c2f7765696768743e0124244572615061796f75740c20457261496e6465781c42616c616e63651c42616c616e63650c59012054686520657261207061796f757420686173206265656e207365743b207468652066697273742062616c616e6365206973207468652076616c696461746f722d7061796f75743b20746865207365636f6e64206973c4207468652072656d61696e6465722066726f6d20746865206d6178696d756d20616d6f756e74206f66207265776172642eac205c5b6572615f696e6465782c2076616c696461746f725f7061796f75742c2072656d61696e6465725c5d1852657761726408244163636f756e7449641c42616c616e636504fc20546865207374616b657220686173206265656e207265776172646564206279207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d14536c61736808244163636f756e7449641c42616c616e6365082501204f6e652076616c696461746f722028616e6420697473206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e58205c5b76616c696461746f722c20616d6f756e745c5d684f6c64536c617368696e675265706f7274446973636172646564043053657373696f6e496e646578081d0120416e206f6c6420736c617368696e67207265706f72742066726f6d2061207072696f72206572612077617320646973636172646564206265636175736520697420636f756c6490206e6f742062652070726f6365737365642e205c5b73657373696f6e5f696e6465785c5d3c5374616b696e67456c656374696f6e043c456c656374696f6e436f6d7075746504f42041206e657720736574206f66207374616b6572732077617320656c656374656420776974682074686520676976656e205c5b636f6d707574655c5d2e38536f6c7574696f6e53746f726564043c456c656374696f6e436f6d707574650419012041206e657720736f6c7574696f6e20666f7220746865207570636f6d696e6720656c656374696f6e20686173206265656e2073746f7265642e205c5b636f6d707574655c5d18426f6e64656408244163636f756e7449641c42616c616e636510d420416e206163636f756e742068617320626f6e646564207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d005101204e4f54453a2054686973206576656e74206973206f6e6c7920656d6974746564207768656e2066756e64732061726520626f6e64656420766961206120646973706174636861626c652e204e6f7461626c792c25012069742077696c6c206e6f7420626520656d697474656420666f72207374616b696e672072657761726473207768656e20746865792061726520616464656420746f207374616b652e20556e626f6e64656408244163636f756e7449641c42616c616e636504dc20416e206163636f756e742068617320756e626f6e646564207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d2457697468647261776e08244163636f756e7449641c42616c616e6365085d0120416e206163636f756e74206861732063616c6c6564206077697468647261775f756e626f6e6465646020616e642072656d6f76656420756e626f6e64696e67206368756e6b7320776f727468206042616c616e636560b02066726f6d2074686520756e6c6f636b696e672071756575652e205c5b73746173682c20616d6f756e745c5d1c3853657373696f6e735065724572613053657373696f6e496e64657810060000000470204e756d626572206f662073657373696f6e7320706572206572612e3c426f6e64696e674475726174696f6e20457261496e64657810a002000004e4204e756d626572206f6620657261732074686174207374616b65642066756e6473206d7573742072656d61696e20626f6e64656420666f722e48536c61736844656665724475726174696f6e20457261496e64657810a8000000140101204e756d626572206f662065726173207468617420736c6173686573206172652064656665727265642062792c20616674657220636f6d7075746174696f6e2e00bc20546869732073686f756c64206265206c657373207468616e2074686520626f6e64696e67206475726174696f6e2e2d012053657420746f203020696620736c61736865732073686f756c64206265206170706c69656420696d6d6564696174656c792c20776974686f7574206f70706f7274756e69747920666f723820696e74657276656e74696f6e2e44456c656374696f6e4c6f6f6b616865616438543a3a426c6f636b4e756d62657210320000001c710120546865206e756d626572206f6620626c6f636b73206265666f72652074686520656e64206f6620746865206572612066726f6d20776869636820656c656374696f6e207375626d697373696f6e732061726520616c6c6f7765642e006d012053657474696e67207468697320746f207a65726f2077696c6c2064697361626c6520746865206f6666636861696e20636f6d7075746520616e64206f6e6c79206f6e2d636861696e207365712d70687261676d656e2077696c6c2420626520757365642e007501205468697320697320626f756e646564206279206265696e672077697468696e20746865206c6173742073657373696f6e2e2048656e63652c2073657474696e6720697420746f20612076616c7565206d6f7265207468616e207468659c206c656e677468206f6620612073657373696f6e2077696c6c20626520706f696e746c6573732e344d6178497465726174696f6e730c753332100a0000000c2901204d6178696d756d206e756d626572206f662062616c616e63696e6720697465726174696f6e7320746f2072756e20696e20746865206f6666636861696e207375626d697373696f6e2e00ec2049662073657420746f20302c2062616c616e63655f736f6c7574696f6e2077696c6c206e6f7420626520657865637574656420617420616c6c2e504d696e536f6c7574696f6e53636f726542756d701c50657262696c6c1020a1070004610120546865207468726573686f6c64206f6620696d70726f76656d656e7420746861742073686f756c642062652070726f766964656420666f722061206e657720736f6c7574696f6e20746f2062652061636365707465642e804d61784e6f6d696e61746f72526577617264656450657256616c696461746f720c753332100001000010f820546865206d6178696d756d206e756d626572206f66206e6f6d696e61746f727320726577617264656420666f7220656163682076616c696461746f722e00690120466f7220656163682076616c696461746f72206f6e6c79207468652060244d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732063616e20636c61696d2101207468656972207265776172642e2054686973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e7c344e6f74436f6e74726f6c6c65720468204e6f74206120636f6e74726f6c6c6572206163636f756e742e204e6f7453746173680454204e6f742061207374617368206163636f756e742e34416c7265616479426f6e646564046420537461736820697320616c726561647920626f6e6465642e34416c7265616479506169726564047820436f6e74726f6c6c657220697320616c7265616479207061697265642e30456d70747954617267657473046420546172676574732063616e6e6f7420626520656d7074792e384475706c6963617465496e6465780444204475706c696361746520696e6465782e44496e76616c6964536c617368496e646578048820536c617368207265636f726420696e646578206f7574206f6620626f756e64732e44496e73756666696369656e7456616c756504cc2043616e206e6f7420626f6e6420776974682076616c7565206c657373207468616e206d696e696d756d2062616c616e63652e304e6f4d6f72654368756e6b7304942043616e206e6f74207363686564756c65206d6f726520756e6c6f636b206368756e6b732e344e6f556e6c6f636b4368756e6b04a42043616e206e6f74207265626f6e6420776974686f757420756e6c6f636b696e67206368756e6b732e3046756e64656454617267657404cc20417474656d7074696e6720746f2074617267657420612073746173682074686174207374696c6c206861732066756e64732e48496e76616c6964457261546f526577617264045c20496e76616c69642065726120746f207265776172642e68496e76616c69644e756d6265724f664e6f6d696e6174696f6e73047c20496e76616c6964206e756d626572206f66206e6f6d696e6174696f6e732e484e6f74536f72746564416e64556e697175650484204974656d7320617265206e6f7420736f7274656420616e6420756e697175652e38416c7265616479436c61696d6564040d01205265776172647320666f72207468697320657261206861766520616c7265616479206265656e20636c61696d656420666f7220746869732076616c696461746f722e7c4f6666636861696e456c656374696f6e4561726c795375626d697373696f6e04e420546865207375626d697474656420726573756c74206973207265636569766564206f7574206f6620746865206f70656e2077696e646f772e784f6666636861696e456c656374696f6e5765616b5375626d697373696f6e04010120546865207375626d697474656420726573756c74206973206e6f7420617320676f6f6420617320746865206f6e652073746f726564206f6e20636861696e2e4c536e617073686f74556e617661696c61626c6504d02054686520736e617073686f742064617461206f66207468652063757272656e742077696e646f77206973206d697373696e672e804f6666636861696e456c656374696f6e426f67757357696e6e6572436f756e7404b020496e636f7272656374206e756d626572206f662077696e6e65727320776572652070726573656e7465642e6c4f6666636861696e456c656374696f6e426f67757357696e6e6572086101204f6e65206f6620746865207375626d69747465642077696e6e657273206973206e6f7420616e206163746976652063616e646964617465206f6e20636861696e2028696e646578206973206f7574206f662072616e67653820696e20736e617073686f74292e704f6666636861696e456c656374696f6e426f677573436f6d70616374085d01204572726f72207768696c65206275696c64696e67207468652061737369676e6d656e7420747970652066726f6d2074686520636f6d706163742e20546869732063616e2068617070656e20696620616e20696e646578a820697320696e76616c69642c206f72206966207468652077656967687473205f6f766572666c6f775f2e784f6666636861696e456c656374696f6e426f6775734e6f6d696e61746f72041501204f6e65206f6620746865207375626d6974746564206e6f6d696e61746f7273206973206e6f7420616e20616374697665206e6f6d696e61746f72206f6e20636861696e2e7c4f6666636861696e456c656374696f6e426f6775734e6f6d696e6174696f6e044d01204f6e65206f6620746865207375626d6974746564206e6f6d696e61746f72732068617320616e206564676520746f20776869636820746865792068617665206e6f7420766f746564206f6e20636861696e2e844f6666636861696e456c656374696f6e536c61736865644e6f6d696e6174696f6e086101204f6e65206f6620746865207375626d6974746564206e6f6d696e61746f72732068617320616e2065646765207768696368206973207375626d6974746564206265666f726520746865206c617374206e6f6e2d7a65726f5420736c617368206f6620746865207461726765742e744f6666636861696e456c656374696f6e426f67757353656c66566f746504250120412073656c6620766f7465206d757374206f6e6c79206265206f726967696e617465642066726f6d20612076616c696461746f7220746f204f4e4c59207468656d73656c7665732e644f6666636861696e456c656374696f6e426f6775734564676504450120546865207375626d697474656420726573756c742068617320756e6b6e6f776e206564676573207468617420617265206e6f7420616d6f6e67207468652070726573656e7465642077696e6e6572732e684f6666636861696e456c656374696f6e426f67757353636f72650419012054686520636c61696d65642073636f726520646f6573206e6f74206d61746368207769746820746865206f6e6520636f6d70757465642066726f6d2074686520646174612e844f6666636861696e456c656374696f6e426f677573456c656374696f6e53697a6504782054686520656c656374696f6e2073697a6520697320696e76616c69642e3843616c6c4e6f74416c6c6f776564044901205468652063616c6c206973206e6f7420616c6c6f7765642061742074686520676976656e2074696d652064756520746f207265737472696374696f6e73206f6620656c656374696f6e20706572696f642e54496e636f7272656374486973746f7279446570746804c420496e636f72726563742070726576696f757320686973746f727920646570746820696e7075742070726f76696465642e58496e636f7272656374536c617368696e675370616e7304b420496e636f7272656374206e756d626572206f6620736c617368696e67207370616e732070726f76696465642e081c53657373696f6e011c53657373696f6e1c2856616c696461746f727301004c5665633c543a3a56616c696461746f7249643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3043757272656e74496e64657801003053657373696f6e496e646578100000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e345175657565644368616e676564010010626f6f6c040008390120547275652069662074686520756e6465726c79696e672065636f6e6f6d6963206964656e746974696573206f7220776569676874696e6720626568696e64207468652076616c696461746f7273a420686173206368616e67656420696e20746865207175657565642076616c696461746f72207365742e285175657565644b6579730100785665633c28543a3a56616c696461746f7249642c20543a3a4b657973293e0400083d012054686520717565756564206b65797320666f7220746865206e6578742073657373696f6e2e205768656e20746865206e6578742073657373696f6e20626567696e732c207468657365206b657973e02077696c6c206265207573656420746f2064657465726d696e65207468652076616c696461746f7227732073657373696f6e206b6579732e4844697361626c656456616c696461746f72730100205665633c7533323e04000c8020496e6469636573206f662064697361626c65642076616c696461746f72732e003501205468652073657420697320636c6561726564207768656e20606f6e5f73657373696f6e5f656e64696e67602072657475726e732061206e657720736574206f66206964656e7469746965732e204e6578744b65797300010538543a3a56616c696461746f7249641c543a3a4b657973000400049c20546865206e6578742073657373696f6e206b65797320666f7220612076616c696461746f722e204b65794f776e657200010550284b65795479706549642c205665633c75383e2938543a3a56616c696461746f72496400040004090120546865206f776e6572206f662061206b65792e20546865206b65792069732074686520604b657954797065496460202b2074686520656e636f646564206b65792e0108207365745f6b65797308106b6579731c543a3a4b6579731470726f6f661c5665633c75383e38e82053657473207468652073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c657220746f20606b657973602e210120416c6c6f777320616e206163636f756e7420746f20736574206974732073657373696f6e206b6579207072696f7220746f206265636f6d696e6720612076616c696461746f722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a20606f726967696e206163636f756e74602c2060543a3a56616c696461746f7249644f66602c20604e6578744b65797360a4202d2044625772697465733a20606f726967696e206163636f756e74602c20604e6578744b6579736084202d204462526561647320706572206b65792069643a20604b65794f776e65726088202d20446257726974657320706572206b65792069643a20604b65794f776e657260302023203c2f7765696768743e2870757267655f6b6579730030cc2052656d6f76657320616e792073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c65722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743eb4202d20436f6d706c65786974793a20604f2831296020696e206e756d626572206f66206b65792074797065732e590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a2060543a3a56616c696461746f7249644f66602c20604e6578744b657973602c20606f726967696e206163636f756e7460a4202d2044625772697465733a20604e6578744b657973602c20606f726967696e206163636f756e74608c202d20446257726974657320706572206b65792069643a20604b65794f776e64657260302023203c2f7765696768743e0104284e657753657373696f6e043053657373696f6e496e646578086501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e7420697320746865205c5b73657373696f6e5f696e6465785c5d2c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e001030496e76616c696450726f6f66046420496e76616c6964206f776e6572736869702070726f6f662e5c4e6f4173736f63696174656456616c696461746f72496404a0204e6f206173736f6369617465642076616c696461746f7220494420666f72206163636f756e742e344475706c6963617465644b657904682052656769737465726564206475706c6963617465206b65792e184e6f4b65797304a8204e6f206b65797320617265206173736f63696174656420776974682074686973206163636f756e742e092444656d6f6372616379012444656d6f6372616379383c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f707301009c5665633c2850726f70496e6465782c20543a3a486173682c20543a3a4163636f756e744964293e040004210120546865207075626c69632070726f706f73616c732e20556e736f727465642e20546865207365636f6e64206974656d206973207468652070726f706f73616c277320686173682e244465706f7369744f660001052450726f70496e64657884285665633c543a3a4163636f756e7449643e2c2042616c616e63654f663c543e290004000c842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e00d82054574f582d4e4f54453a20536166652c20617320696e6372656173696e6720696e7465676572206b6579732061726520736166652e24507265696d616765730001061c543a3a48617368e8507265696d6167655374617475733c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e000400086101204d6170206f662068617368657320746f207468652070726f706f73616c20707265696d6167652c20616c6f6e6720776974682077686f207265676973746572656420697420616e64207468656972206465706f7369742ee42054686520626c6f636b206e756d6265722069732074686520626c6f636b20617420776869636820697420776173206465706f73697465642e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e344c6f77657374556e62616b656401003c5265666572656e64756d496e646578100000000008250120546865206c6f77657374207265666572656e64756d20696e64657820726570726573656e74696e6720616e20756e62616b6564207265666572656e64756d2e20457175616c20746fdc20605265666572656e64756d436f756e74602069662074686572652069736e2774206120756e62616b6564207265666572656e64756d2e405265666572656e64756d496e666f4f660001053c5265666572656e64756d496e646578d45265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a486173682c2042616c616e63654f663c543e3e0004000cb420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e0009012054574f582d4e4f54453a205341464520617320696e646578657320617265206e6f7420756e64657220616e2061747461636b6572e280997320636f6e74726f6c2e20566f74696e674f6601010530543a3a4163636f756e744964c8566f74696e673c42616c616e63654f663c543e2c20543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00d8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105d0120416c6c20766f74657320666f72206120706172746963756c617220766f7465722e2057652073746f7265207468652062616c616e636520666f7220746865206e756d626572206f6620766f74657320746861742077655d012068617665207265636f726465642e20546865207365636f6e64206974656d2069732074686520746f74616c20616d6f756e74206f662064656c65676174696f6e732c20746861742077696c6c2062652061646465642e00e82054574f582d4e4f54453a205341464520617320604163636f756e7449646073206172652063727970746f2068617368657320616e797761792e144c6f636b7300010530543a3a4163636f756e74496438543a3a426c6f636b4e756d626572000400105d01204163636f756e747320666f7220776869636820746865726520617265206c6f636b7320696e20616374696f6e207768696368206d61792062652072656d6f76656420617420736f6d6520706f696e7420696e207468655101206675747572652e205468652076616c75652069732074686520626c6f636b206e756d62657220617420776869636820746865206c6f636b206578706972657320616e64206d61792062652072656d6f7665642e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e544c6173745461626c656457617345787465726e616c010010626f6f6c0400085901205472756520696620746865206c617374207265666572656e64756d207461626c656420776173207375626d69747465642065787465726e616c6c792e2046616c7365206966206974207761732061207075626c6963282070726f706f73616c2e304e65787445787465726e616c00006028543a3a486173682c20566f74655468726573686f6c6429040010590120546865207265666572656e64756d20746f206265207461626c6564207768656e6576657220697420776f756c642062652076616c696420746f207461626c6520616e2065787465726e616c2070726f706f73616c2e550120546869732068617070656e73207768656e2061207265666572656e64756d206e6565647320746f206265207461626c656420616e64206f6e65206f662074776f20636f6e646974696f6e7320617265206d65743aa4202d20604c6173745461626c656457617345787465726e616c60206973206066616c7365603b206f7268202d20605075626c696350726f70736020697320656d7074792e24426c61636b6c6973740001061c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290004000851012041207265636f7264206f662077686f207665746f656420776861742e204d6170732070726f706f73616c206861736820746f206120706f737369626c65206578697374656e7420626c6f636b206e756d626572e82028756e74696c207768656e206974206d6179206e6f742062652072657375626d69747465642920616e642077686f207665746f65642069742e3443616e63656c6c6174696f6e730101061c543a3a4861736810626f6f6c000400042901205265636f7264206f6620616c6c2070726f706f73616c7320746861742068617665206265656e207375626a65637420746f20656d657267656e63792063616e63656c6c6174696f6e2e3853746f7261676556657273696f6e00002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e01641c70726f706f7365083470726f706f73616c5f686173681c543a3a486173681476616c756554436f6d706163743c42616c616e63654f663c543e3e2ca02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e00190120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573748420686176652066756e647320746f20636f76657220746865206465706f7369742e00d8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20707265696d6167652e1901202d206076616c7565603a2054686520616d6f756e74206f66206465706f73697420286d757374206265206174206c6561737420604d696e696d756d4465706f73697460292e004820456d697473206050726f706f736564602e003c205765696768743a20604f28702960187365636f6e64082070726f706f73616c48436f6d706163743c50726f70496e6465783e4c7365636f6e64735f75707065725f626f756e6430436f6d706163743c7533323e28b8205369676e616c732061677265656d656e742077697468206120706172746963756c61722070726f706f73616c2e00050120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e6465721501206d75737420686176652066756e647320746f20636f76657220746865206465706f7369742c20657175616c20746f20746865206f726967696e616c206465706f7369742e00cc202d206070726f706f73616c603a2054686520696e646578206f66207468652070726f706f73616c20746f207365636f6e642e4501202d20607365636f6e64735f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e207468652063757272656e74206e756d626572206f66207365636f6e6473206f6e2074686973290120202070726f706f73616c2e2045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e002101205765696768743a20604f28532960207768657265205320697320746865206e756d626572206f66207365636f6e647320612070726f706f73616c20616c7265616479206861732e10766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f7465644163636f756e74566f74653c42616c616e63654f663c543e3e24350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00e0202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f20766f746520666f722e88202d2060766f7465603a2054686520766f746520636f6e66696775726174696f6e2e003101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722068617320766f746564206f6e2e40656d657267656e63795f63616e63656c04247265665f696e6465783c5265666572656e64756d496e646578205101205363686564756c6520616e20656d657267656e63792063616e63656c6c6174696f6e206f662061207265666572656e64756d2e2043616e6e6f742068617070656e20747769636520746f207468652073616d6530207265666572656e64756d2e00fc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206043616e63656c6c6174696f6e4f726967696e602e00d4202d607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e0040205765696768743a20604f283129602e4065787465726e616c5f70726f706f7365043470726f706f73616c5f686173681c543a3a48617368243101205363686564756c652061207265666572656e64756d20746f206265207461626c6564206f6e6365206974206973206c6567616c20746f207363686564756c6520616e2065787465726e616c30207265666572656e64756d2e00ec20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206045787465726e616c4f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e001901205765696768743a20604f2856296020776974682056206e756d626572206f66207665746f65727320696e2074686520626c61636b6c697374206f662070726f706f73616c2ebc2020204465636f64696e6720766563206f66206c656e67746820562e2043686172676564206173206d6178696d756d6465787465726e616c5f70726f706f73655f6d616a6f72697479043470726f706f73616c5f686173681c543a3a486173682c5901205363686564756c652061206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f207363686564756c656020616e2065787465726e616c207265666572656e64756d2e00f020546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c4d616a6f726974794f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e003c205765696768743a20604f283129606065787465726e616c5f70726f706f73655f64656661756c74043470726f706f73616c5f686173681c543a3a486173682c4901205363686564756c652061206e656761746976652d7475726e6f75742d62696173207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f84207363686564756c6520616e2065787465726e616c207265666572656e64756d2e00ec20546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c44656661756c744f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e003c205765696768743a20604f2831296028666173745f747261636b0c3470726f706f73616c5f686173681c543a3a4861736834766f74696e675f706572696f6438543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d6265723c5101205363686564756c65207468652063757272656e746c792065787465726e616c6c792d70726f706f736564206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564650120696d6d6564696174656c792e204966207468657265206973206e6f2065787465726e616c6c792d70726f706f736564207265666572656e64756d2063757272656e746c792c206f72206966207468657265206973206f6e65ec20627574206974206973206e6f742061206d616a6f726974792d63617272696573207265666572656e64756d207468656e206974206661696c732e00d420546865206469737061746368206f6620746869732063616c6c206d757374206265206046617374547261636b4f726967696e602e00f8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652063757272656e742065787465726e616c2070726f706f73616c2e6101202d2060766f74696e675f706572696f64603a2054686520706572696f64207468617420697320616c6c6f77656420666f7220766f74696e67206f6e20746869732070726f706f73616c2e20496e6372656173656420746f982020206046617374547261636b566f74696e67506572696f646020696620746f6f206c6f772e5501202d206064656c6179603a20546865206e756d626572206f6620626c6f636b20616674657220766f74696e672068617320656e64656420696e20617070726f76616c20616e6420746869732073686f756c64206265bc202020656e61637465642e205468697320646f65736e277420686176652061206d696e696d756d20616d6f756e742e004420456d697473206053746172746564602e003c205765696768743a20604f28312960347665746f5f65787465726e616c043470726f706f73616c5f686173681c543a3a4861736824bc205665746f20616e6420626c61636b6c697374207468652065787465726e616c2070726f706f73616c20686173682e00dc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d75737420626520605665746f4f726967696e602e003101202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c20746f207665746f20616e6420626c61636b6c6973742e004020456d69747320605665746f6564602e000101205765696768743a20604f2856202b206c6f6728562929602077686572652056206973206e756d626572206f6620606578697374696e67207665746f657273604463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e1c542052656d6f76652061207265666572656e64756d2e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00d8202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e00482023205765696768743a20604f283129602e3463616e63656c5f717565756564041477686963683c5265666572656e64756d496e6465781ca02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00c8202d20607768696368603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e004d01205765696768743a20604f284429602077686572652060446020697320746865206974656d7320696e207468652064697370617463682071756575652e205765696768746564206173206044203d203130602e2064656c65676174650c08746f30543a3a4163636f756e74496428636f6e76696374696f6e28436f6e76696374696f6e1c62616c616e63653042616c616e63654f663c543e503d012044656c65676174652074686520766f74696e6720706f77657220287769746820736f6d6520676976656e20636f6e76696374696f6e29206f66207468652073656e64696e67206163636f756e742e005901205468652062616c616e63652064656c656761746564206973206c6f636b656420666f72206173206c6f6e6720617320697427732064656c6567617465642c20616e64207468657265616674657220666f7220746865cc2074696d6520617070726f70726961746520666f722074686520636f6e76696374696f6e2773206c6f636b20706572696f642e00610120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e696e67206163636f756e74206d757374206569746865723a782020202d2062652064656c65676174696e6720616c72656164793b206f725d012020202d2068617665206e6f20766f74696e67206163746976697479202869662074686572652069732c207468656e2069742077696c6c206e65656420746f2062652072656d6f7665642f636f6e736f6c6964617465649820202020207468726f7567682060726561705f766f746560206f722060756e766f746560292e004901202d2060746f603a20546865206163636f756e742077686f736520766f74696e6720746865206074617267657460206163636f756e74277320766f74696e6720706f7765722077696c6c20666f6c6c6f772e5901202d2060636f6e76696374696f6e603a2054686520636f6e76696374696f6e20746861742077696c6c20626520617474616368656420746f207468652064656c65676174656420766f7465732e205768656e2074686545012020206163636f756e7420697320756e64656c6567617465642c207468652066756e64732077696c6c206265206c6f636b656420666f722074686520636f72726573706f6e64696e6720706572696f642e5501202d206062616c616e6365603a2054686520616d6f756e74206f6620746865206163636f756e7427732062616c616e636520746f206265207573656420696e2064656c65676174696e672e2054686973206d757374c82020206e6f74206265206d6f7265207468616e20746865206163636f756e7427732063757272656e742062616c616e63652e004c20456d697473206044656c656761746564602e004101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732e28756e64656c65676174650030d020556e64656c65676174652074686520766f74696e6720706f776572206f66207468652073656e64696e67206163636f756e742e00610120546f6b656e73206d617920626520756e6c6f636b656420666f6c6c6f77696e67206f6e636520616e20616d6f756e74206f662074696d6520636f6e73697374656e74207769746820746865206c6f636b20706572696f64e0206f662074686520636f6e76696374696f6e2077697468207768696368207468652064656c65676174696f6e20776173206973737565642e00490120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265582063757272656e746c792064656c65676174696e672e005420456d6974732060556e64656c656761746564602e004101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732e58636c6561725f7075626c69635f70726f706f73616c7300147420436c6561727320616c6c207075626c69632070726f706f73616c732e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e0040205765696768743a20604f283129602e346e6f74655f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e2861012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e205468697320646f65736e27742072657175697265207468652070726f706f73616c20746f206265250120696e207468652064697370617463682071756575652062757420646f657320726571756972652061206465706f7369742c2072657475726e6564206f6e636520656e61637465642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e005101205765696768743a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e646e6f74655f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e040d012053616d6520617320606e6f74655f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e586e6f74655f696d6d696e656e745f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e3045012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e2054686973207265717569726573207468652070726f706f73616c20746f206265410120696e207468652064697370617463682071756575652e204e6f206465706f736974206973206e65656465642e205768656e20746869732063616c6c206973207375636365737366756c2c20692e652e39012074686520707265696d61676520686173206e6f74206265656e2075706c6f61646564206265666f726520616e64206d61746368657320736f6d6520696d6d696e656e742070726f706f73616c2c40206e6f2066656520697320706169642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e005101205765696768743a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e886e6f74655f696d6d696e656e745f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e0431012053616d6520617320606e6f74655f696d6d696e656e745f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e34726561705f707265696d616765083470726f706f73616c5f686173681c543a3a486173686070726f706f73616c5f6c656e5f75707065725f626f756e6430436f6d706163743c7533323e3cf42052656d6f766520616e20657870697265642070726f706f73616c20707265696d61676520616e6420636f6c6c65637420746865206465706f7369742e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00d0202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f6620612070726f706f73616c2e2d01202d206070726f706f73616c5f6c656e6774685f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e206c656e677468206f66207468652070726f706f73616c2e010120202045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e00510120546869732077696c6c206f6e6c7920776f726b2061667465722060566f74696e67506572696f646020626c6f636b732066726f6d207468652074696d6520746861742074686520707265696d616765207761735d01206e6f7465642c2069662069742773207468652073616d65206163636f756e7420646f696e672069742e2049662069742773206120646966666572656e74206163636f756e742c207468656e206974276c6c206f6e6c79b020776f726b20616e206164646974696f6e616c2060456e6163746d656e74506572696f6460206c617465722e006020456d6974732060507265696d616765526561706564602e00b8205765696768743a20604f284429602077686572652044206973206c656e677468206f662070726f706f73616c2e18756e6c6f636b041874617267657430543a3a4163636f756e7449641ca420556e6c6f636b20746f6b656e732074686174206861766520616e2065787069726564206c6f636b2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00bc202d2060746172676574603a20546865206163636f756e7420746f2072656d6f766520746865206c6f636b206f6e2e00c0205765696768743a20604f2852296020776974682052206e756d626572206f6620766f7465206f66207461726765742e2c72656d6f76655f766f74650414696e6465783c5265666572656e64756d496e6465786c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e00102049663a8c202d20746865207265666572656e64756d207761732063616e63656c6c65642c206f7280202d20746865207265666572656e64756d206973206f6e676f696e672c206f7294202d20746865207265666572656e64756d2068617320656e6465642073756368207468617401012020202d2074686520766f7465206f6620746865206163636f756e742077617320696e206f70706f736974696f6e20746f2074686520726573756c743b206f72d82020202d20746865726520776173206e6f20636f6e76696374696f6e20746f20746865206163636f756e74277320766f74653b206f72882020202d20746865206163636f756e74206d61646520612073706c697420766f74656101202e2e2e7468656e2074686520766f74652069732072656d6f76656420636c65616e6c7920616e64206120666f6c6c6f77696e672063616c6c20746f2060756e6c6f636b60206d617920726573756c7420696e206d6f72655c2066756e6473206265696e6720617661696c61626c652e00ac2049662c20686f77657665722c20746865207265666572656e64756d2068617320656e64656420616e643af0202d2069742066696e697368656420636f72726573706f6e64696e6720746f2074686520766f7465206f6620746865206163636f756e742c20616e64e0202d20746865206163636f756e74206d6164652061207374616e6461726420766f7465207769746820636f6e76696374696f6e2c20616e64c0202d20746865206c6f636b20706572696f64206f662074686520636f6e76696374696f6e206973206e6f74206f7665725d01202e2e2e7468656e20746865206c6f636b2077696c6c206265206167677265676174656420696e746f20746865206f766572616c6c206163636f756e742773206c6f636b2c207768696368206d617920696e766f6c76655d01202a6f7665726c6f636b696e672a20287768657265207468652074776f206c6f636b732061726520636f6d62696e656420696e746f20612073696e676c65206c6f636b207468617420697320746865206d6178696d756de8206f6620626f74682074686520616d6f756e74206c6f636b656420616e64207468652074696d65206973206974206c6f636b656420666f72292e004d0120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e6572206d7573742068617665206120766f74658c207265676973746572656420666f72207265666572656e64756d2060696e646578602e00f8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e005901205765696768743a20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652e4472656d6f76655f6f746865725f766f7465081874617267657430543a3a4163636f756e74496414696e6465783c5265666572656e64756d496e6465783c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e0051012049662074686520607461726765746020697320657175616c20746f20746865207369676e65722c207468656e20746869732066756e6374696f6e2069732065786163746c79206571756976616c656e7420746f3101206072656d6f76655f766f7465602e204966206e6f7420657175616c20746f20746865207369676e65722c207468656e2074686520766f7465206d757374206861766520657870697265642c590120656974686572206265636175736520746865207265666572656e64756d207761732063616e63656c6c65642c20626563617573652074686520766f746572206c6f737420746865207265666572656e64756d206f729c20626563617573652074686520636f6e76696374696f6e20706572696f64206973206f7665722e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e005101202d2060746172676574603a20546865206163636f756e74206f662074686520766f746520746f2062652072656d6f7665643b2074686973206163636f756e74206d757374206861766520766f74656420666f72582020207265666572656e64756d2060696e646578602ef8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e005901205765696768743a20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652e38656e6163745f70726f706f73616c083470726f706f73616c5f686173681c543a3a4861736814696e6465783c5265666572656e64756d496e64657804510120456e61637420612070726f706f73616c2066726f6d2061207265666572656e64756d2e20466f72206e6f77207765206a757374206d616b65207468652077656967687420626520746865206d6178696d756d2e24626c61636b6c697374083470726f706f73616c5f686173681c543a3a486173683c6d617962655f7265665f696e6465785c4f7074696f6e3c5265666572656e64756d496e6465783e3c4901205065726d616e656e746c7920706c61636520612070726f706f73616c20696e746f2074686520626c61636b6c6973742e20546869732070726576656e74732069742066726f6d2065766572206265696e67402070726f706f73656420616761696e2e0055012049662063616c6c6564206f6e206120717565756564207075626c6963206f722065787465726e616c2070726f706f73616c2c207468656e20746869732077696c6c20726573756c7420696e206974206265696e6755012072656d6f7665642e2049662074686520607265665f696e6465786020737570706c69656420697320616e20616374697665207265666572656e64756d2077697468207468652070726f706f73616c20686173682c6c207468656e2069742077696c6c2062652063616e63656c6c65642e00f020546865206469737061746368206f726967696e206f6620746869732063616c6c206d7573742062652060426c61636b6c6973744f726967696e602e00fc202d206070726f706f73616c5f68617368603a205468652070726f706f73616c206861736820746f20626c61636b6c697374207065726d616e656e746c792e4901202d20607265665f696e646578603a20416e206f6e676f696e67207265666572656e64756d2077686f73652068617368206973206070726f706f73616c5f68617368602c2077686963682077696c6c2062652c2063616e63656c6c65642e004501205765696768743a20604f28702960202874686f756768206173207468697320697320616e20686967682d70726976696c6567652064697370617463682c20776520617373756d6520697420686173206154202020726561736f6e61626c652076616c7565292e3c63616e63656c5f70726f706f73616c042870726f705f696e64657848436f6d706163743c50726f70496e6465783e1c4c2052656d6f766520612070726f706f73616c2e00050120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206043616e63656c50726f706f73616c4f726967696e602e00d4202d206070726f705f696e646578603a2054686520696e646578206f66207468652070726f706f73616c20746f2063616e63656c2e00e8205765696768743a20604f28702960207768657265206070203d205075626c696350726f70733a3a3c543e3a3a6465636f64655f6c656e28296001482050726f706f736564082450726f70496e6465781c42616c616e63650431012041206d6f74696f6e20686173206265656e2070726f706f7365642062792061207075626c6963206163636f756e742e205c5b70726f706f73616c5f696e6465782c206465706f7369745c5d185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e047d012041207075626c69632070726f706f73616c20686173206265656e207461626c656420666f72207265666572656e64756d20766f74652e205c5b70726f706f73616c5f696e6465782c206465706f7369742c206465706f7369746f72735c5d3845787465726e616c5461626c656400049820416e2065787465726e616c2070726f706f73616c20686173206265656e207461626c65642e1c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c6404c42041207265666572656e64756d2068617320626567756e2e205c5b7265665f696e6465782c207468726573686f6c645c5d18506173736564043c5265666572656e64756d496e64657804e820412070726f706f73616c20686173206265656e20617070726f766564206279207265666572656e64756d2e205c5b7265665f696e6465785c5d244e6f74506173736564043c5265666572656e64756d496e64657804e820412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e205c5b7265665f696e6465785c5d2443616e63656c6c6564043c5265666572656e64756d496e64657804bc2041207265666572656e64756d20686173206265656e2063616e63656c6c65642e205c5b7265665f696e6465785c5d204578656375746564083c5265666572656e64756d496e64657810626f6f6c04c820412070726f706f73616c20686173206265656e20656e61637465642e205c5b7265665f696e6465782c2069735f6f6b5c5d2444656c65676174656408244163636f756e744964244163636f756e74496404210120416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e205c5b77686f2c207461726765745c5d2c556e64656c65676174656404244163636f756e74496404f820416e205c5b6163636f756e745c5d206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e185665746f65640c244163636f756e74496410486173682c426c6f636b4e756d62657204110120416e2065787465726e616c2070726f706f73616c20686173206265656e207665746f65642e205c5b77686f2c2070726f706f73616c5f686173682c20756e74696c5c5d34507265696d6167654e6f7465640c1048617368244163636f756e7449641c42616c616e636504610120412070726f706f73616c277320707265696d61676520776173206e6f7465642c20616e6420746865206465706f7369742074616b656e2e205c5b70726f706f73616c5f686173682c2077686f2c206465706f7369745c5d30507265696d616765557365640c1048617368244163636f756e7449641c42616c616e636508150120412070726f706f73616c20707265696d616765207761732072656d6f76656420616e6420757365642028746865206465706f736974207761732072657475726e6564292e94205c5b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369745c5d3c507265696d616765496e76616c69640810486173683c5265666572656e64756d496e646578080d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d6167652077617320696e76616c69642e74205c5b70726f706f73616c5f686173682c207265665f696e6465785c5d3c507265696d6167654d697373696e670810486173683c5265666572656e64756d496e646578080d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d61676520776173206d697373696e672e74205c5b70726f706f73616c5f686173682c207265665f696e6465785c5d38507265696d616765526561706564101048617368244163636f756e7449641c42616c616e6365244163636f756e744964082d012041207265676973746572656420707265696d616765207761732072656d6f76656420616e6420746865206465706f73697420636f6c6c656374656420627920746865207265617065722eb4205c5b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369742c207265617065725c5d20556e6c6f636b656404244163636f756e74496404bc20416e205c5b6163636f756e745c5d20686173206265656e20756e6c6f636b6564207375636365737366756c6c792e2c426c61636b6c697374656404104861736804d820412070726f706f73616c205c5b686173685c5d20686173206265656e20626c61636b6c6973746564207065726d616e656e746c792e203c456e6163746d656e74506572696f6438543a3a426c6f636b4e756d62657210002f0d0014710120546865206d696e696d756d20706572696f64206f66206c6f636b696e6720616e642074686520706572696f64206265747765656e20612070726f706f73616c206265696e6720617070726f76656420616e6420656e61637465642e0031012049742073686f756c642067656e6572616c6c792062652061206c6974746c65206d6f7265207468616e2074686520756e7374616b6520706572696f6420746f20656e737572652074686174690120766f74696e67207374616b657273206861766520616e206f70706f7274756e69747920746f2072656d6f7665207468656d73656c7665732066726f6d207468652073797374656d20696e2074686520636173652077686572659c207468657920617265206f6e20746865206c6f73696e672073696465206f66206120766f74652e304c61756e6368506572696f6438543a3a426c6f636b4e756d62657210004e0c0004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e30566f74696e67506572696f6438543a3a426c6f636b4e756d62657210004e0c0004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e384d696e696d756d4465706f7369743042616c616e63654f663c543e400000c16ff2862300000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e5446617374547261636b566f74696e67506572696f6438543a3a426c6f636b4e756d626572108051010004ec204d696e696d756d20766f74696e6720706572696f6420616c6c6f77656420666f7220616e20656d657267656e6379207265666572656e64756d2e34436f6f6c6f6666506572696f6438543a3a426c6f636b4e756d62657210004e0c0004610120506572696f6420696e20626c6f636b7320776865726520616e2065787465726e616c2070726f706f73616c206d6179206e6f742062652072652d7375626d6974746564206166746572206265696e67207665746f65642e4c507265696d616765427974654465706f7369743042616c616e63654f663c543e400010a5d4e800000000000000000000000429012054686520616d6f756e74206f662062616c616e63652074686174206d757374206265206465706f7369746564207065722062797465206f6620707265696d6167652073746f7265642e204d6178566f7465730c753332106400000004b020546865206d6178696d756d206e756d626572206f6620766f74657320666f7220616e206163636f756e742e8c2056616c75654c6f7704382056616c756520746f6f206c6f773c50726f706f73616c4d697373696e6704602050726f706f73616c20646f6573206e6f7420657869737420426164496e646578043820556e6b6e6f776e20696e6465783c416c726561647943616e63656c656404982043616e6e6f742063616e63656c207468652073616d652070726f706f73616c207477696365444475706c696361746550726f706f73616c04582050726f706f73616c20616c7265616479206d6164654c50726f706f73616c426c61636b6c6973746564046c2050726f706f73616c207374696c6c20626c61636b6c6973746564444e6f7453696d706c654d616a6f7269747904ac204e6578742065787465726e616c2070726f706f73616c206e6f742073696d706c65206d616a6f726974792c496e76616c696448617368043420496e76616c69642068617368284e6f50726f706f73616c0454204e6f2065787465726e616c2070726f706f73616c34416c72656164795665746f6564049c204964656e74697479206d6179206e6f74207665746f20612070726f706f73616c207477696365304e6f7444656c6567617465640438204e6f742064656c656761746564444475706c6963617465507265696d616765045c20507265696d61676520616c7265616479206e6f7465642c4e6f74496d6d696e656e740434204e6f7420696d6d696e656e7420546f6f4561726c79042820546f6f206561726c7920496d6d696e656e74042420496d6d696e656e743c507265696d6167654d697373696e67044c20507265696d616765206e6f7420666f756e64445265666572656e64756d496e76616c6964048820566f746520676976656e20666f7220696e76616c6964207265666572656e64756d3c507265696d616765496e76616c6964044420496e76616c696420707265696d6167652c4e6f6e6557616974696e670454204e6f2070726f706f73616c732077616974696e67244e6f744c6f636b656404a42054686520746172676574206163636f756e7420646f6573206e6f7420686176652061206c6f636b2e284e6f744578706972656404f020546865206c6f636b206f6e20746865206163636f756e7420746f20626520756e6c6f636b656420686173206e6f742079657420657870697265642e204e6f74566f74657204c82054686520676976656e206163636f756e7420646964206e6f7420766f7465206f6e20746865207265666572656e64756d2e304e6f5065726d697373696f6e04cc20546865206163746f7220686173206e6f207065726d697373696f6e20746f20636f6e647563742074686520616374696f6e2e44416c726561647944656c65676174696e67048c20546865206163636f756e7420697320616c72656164792064656c65676174696e672e204f766572666c6f7704a420416e20756e657870656374656420696e7465676572206f766572666c6f77206f636375727265642e24556e646572666c6f7704a820416e20756e657870656374656420696e746567657220756e646572666c6f77206f636375727265642e44496e73756666696369656e7446756e647304010120546f6f206869676820612062616c616e6365207761732070726f7669646564207468617420746865206163636f756e742063616e6e6f74206166666f72642e344e6f7444656c65676174696e6704a420546865206163636f756e74206973206e6f742063757272656e746c792064656c65676174696e672e28566f746573457869737408590120546865206163636f756e742063757272656e746c792068617320766f74657320617474616368656420746f20697420616e6420746865206f7065726174696f6e2063616e6e6f74207375636365656420756e74696cec207468657365206172652072656d6f7665642c20656974686572207468726f7567682060756e766f746560206f722060726561705f766f7465602e44496e7374616e744e6f74416c6c6f77656404dc2054686520696e7374616e74207265666572656e64756d206f726967696e2069732063757272656e746c7920646973616c6c6f7765642e204e6f6e73656e736504982044656c65676174696f6e20746f206f6e6573656c66206d616b6573206e6f2073656e73652e3c57726f6e675570706572426f756e64045420496e76616c696420757070657220626f756e642e3c4d6178566f746573526561636865640484204d6178696d756d206e756d626572206f6620766f74657320726561636865642e38496e76616c69645769746e6573730490205468652070726f7669646564207769746e65737320646174612069732077726f6e672e40546f6f4d616e7950726f706f73616c730494204d6178696d756d206e756d626572206f662070726f706f73616c7320726561636865642e0a1c436f756e63696c014c496e7374616e636531436f6c6c656374697665182450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368683c5420617320436f6e6669673c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e744964040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c38f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e004d01205472616e73616374696f6e20666565732077696c6c2062652077616976656420696620746865206d656d62657220697320766f74696e67206f6e20616e7920706172746963756c61722070726f706f73616c690120666f72207468652066697273742074696d6520616e64207468652063616c6c206973207375636365737366756c2e2053756273657175656e7420766f7465206368616e6765732077696c6c206368617267652061206665652e2c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e78510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e0065012049662074686520636c6f7365206f7065726174696f6e20636f6d706c65746573207375636365737366756c6c79207769746820646973617070726f76616c2c20746865207472616e73616374696f6e206665652077696c6c6101206265207761697665642e204f746865727769736520657865637574696f6e206f662074686520617070726f766564206f7065726174696f6e2077696c6c206265206368617267656420746f207468652063616c6c65722e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed8205c5b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645c5d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292eac205c5b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5c5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e6c205c5b70726f706f73616c5f686173682c207965732c206e6f5c5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e0b48546563686e6963616c436f6d6d6974746565014c496e7374616e636532436f6c6c656374697665182450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368683c5420617320436f6e6669673c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e744964040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c38f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e004d01205472616e73616374696f6e20666565732077696c6c2062652077616976656420696620746865206d656d62657220697320766f74696e67206f6e20616e7920706172746963756c61722070726f706f73616c690120666f72207468652066697273742074696d6520616e64207468652063616c6c206973207375636365737366756c2e2053756273657175656e7420766f7465206368616e6765732077696c6c206368617267652061206665652e2c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e78510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e0065012049662074686520636c6f7365206f7065726174696f6e20636f6d706c65746573207375636365737366756c6c79207769746820646973617070726f76616c2c20746865207472616e73616374696f6e206665652077696c6c6101206265207761697665642e204f746865727769736520657865637574696f6e206f662074686520617070726f766564206f7065726174696f6e2077696c6c206265206368617267656420746f207468652063616c6c65722e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed8205c5b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645c5d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292eac205c5b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5c5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e6c205c5b70726f706f73616c5f686173682c207965732c206e6f5c5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e0c24456c656374696f6e73014050687261676d656e456c656374696f6e141c4d656d626572730100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e040004f0205468652063757272656e7420656c6563746564206d656d626572736869702e20536f72746564206261736564206f6e206163636f756e742069642e2452756e6e65727355700100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e0400042d01205468652063757272656e742072756e6e6572735f75702e20536f72746564206261736564206f6e206c6f7720746f2068696768206d657269742028776f72736520746f2062657374292e38456c656374696f6e526f756e647301000c75333210000000000441012054686520746f74616c206e756d626572206f6620766f746520726f756e6473207468617420686176652068617070656e65642c206578636c7564696e6720746865207570636f6d696e67206f6e652e18566f74696e6701010530543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e29004400000000000000000000000000000000000cb820566f74657320616e64206c6f636b6564207374616b65206f66206120706172746963756c617220766f7465722e00c02054574f582d4e4f54453a205341464520617320604163636f756e7449646020697320612063727970746f20686173682843616e646964617465730100445665633c543a3a4163636f756e7449643e0400085901205468652070726573656e742063616e646964617465206c6973742e20536f72746564206261736564206f6e206163636f756e742d69642e20412063757272656e74206d656d626572206f722072756e6e65722d757041012063616e206e6576657220656e746572207468697320766563746f7220616e6420697320616c7761797320696d706c696369746c7920617373756d656420746f20626520612063616e6469646174652e011810766f74650814766f746573445665633c543a3a4163636f756e7449643e1476616c756554436f6d706163743c42616c616e63654f663c543e3e685d0120566f746520666f72206120736574206f662063616e6469646174657320666f7220746865207570636f6d696e6720726f756e64206f6620656c656374696f6e2e20546869732063616e2062652063616c6c656420746fe4207365742074686520696e697469616c20766f7465732c206f722075706461746520616c7265616479206578697374696e6720766f7465732e0055012055706f6e20696e697469616c20766f74696e672c206076616c75656020756e697473206f66206077686f6027732062616c616e6365206973206c6f636b656420616e64206120626f6e6420616d6f756e74206973282072657365727665642e0050205468652060766f746573602073686f756c643a482020202d206e6f7420626520656d7074792e59012020202d206265206c657373207468616e20746865206e756d626572206f6620706f737369626c652063616e646964617465732e204e6f7465207468617420616c6c2063757272656e74206d656d6265727320616e641501202020202072756e6e6572732d75702061726520616c736f206175746f6d61746963616c6c792063616e6469646174657320666f7220746865206e65787420726f756e642e005d012049742069732074686520726573706f6e736962696c697479206f66207468652063616c6c657220746f206e6f7420706c61636520616c6c206f662074686569722062616c616e636520696e746f20746865206c6f636ba020616e64206b65657020736f6d6520666f722066757274686572207472616e73616374696f6e732e002c2023203c7765696768743e5c2042617365207765696768743a2034372e393320c2b573342053746174652072656164733ad820092d2043616e646964617465732e6c656e2829202b204d656d626572732e6c656e2829202b2052756e6e65727355702e6c656e28295420092d20566f74696e67202869735f766f746572292020092d204c6f636bd420092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665202b20746f74616c5f62616c616e6365295d38205374617465207772697465733a2820092d20566f74696e672020092d204c6f636b1d0120092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665202d2d206f6e6c79207768656e206372656174696e672061206e657720766f746572295d302023203c2f7765696768743e3072656d6f76655f766f746572003421012052656d6f766520606f726967696e60206173206120766f7465722e20546869732072656d6f76657320746865206c6f636b20616e642072657475726e732074686520626f6e642e002c2023203c7765696768743e582042617365207765696768743a2033362e3820c2b573a820416c6c207374617465206163636573732069732066726f6d20646f5f72656d6f76655f766f7465722e342053746174652072656164733a2820092d20566f74696e675820092d205b4163636f756e74446174612877686f295d38205374617465207772697465733a2820092d20566f74696e672420092d204c6f636b735820092d205b4163636f756e74446174612877686f295d302023203c2f7765696768743e507265706f72745f646566756e63745f766f746572041c646566756e6374c4446566756e6374566f7465723c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e6c5d01205265706f727420607461726765746020666f72206265696e6720616e20646566756e637420766f7465722e20496e2063617365206f6620612076616c6964207265706f72742c20746865207265706f727465722069735d012072657761726465642062792074686520626f6e6420616d6f756e74206f662060746172676574602e204f74686572776973652c20746865207265706f7274657220697473656c662069732072656d6f76656420616e645c20746865697220626f6e6420697320736c61736865642e0088204120646566756e637420766f74657220697320646566696e656420746f2062653a4d012020202d206120766f7465722077686f73652063757272656e74207375626d697474656420766f7465732061726520616c6c20696e76616c69642e20692e652e20616c6c206f66207468656d20617265206e6ff020202020206c6f6e67657220612063616e646964617465206e6f7220616e20616374697665206d656d626572206f7220612072756e6e65722d75702e0000690120546865206f726967696e206d7573742070726f7669646520746865206e756d626572206f662063757272656e742063616e6469646174657320616e6420766f746573206f6620746865207265706f7274656420746172676574c020666f722074686520707572706f7365206f66206163637572617465207765696768742063616c63756c6174696f6e2e002c2023203c7765696768743eb4204e6f204261736520776569676874206261736564206f6e206d696e2073717561726520616e616c797369732ea420436f6d706c6578697479206f662063616e6469646174655f636f756e743a20312e37353520c2b5739020436f6d706c6578697479206f6620766f74655f636f756e743a2031382e353120c2b573342053746174652072656164733a542020092d20566f74696e67287265706f7274657229502020092d2043616e6469646174652e6c656e28294c2020092d20566f74696e672854617267657429d82020092d2043616e646964617465732c204d656d626572732c2052756e6e6572735570202869735f646566756e63745f766f7465722938205374617465207772697465733a7020092d204c6f636b287265706f72746572207c7c2074617267657429dc20092d205b4163636f756e7442616c616e6365287265706f72746572295d202b204163636f756e7442616c616e636528746172676574297820092d20566f74696e67287265706f72746572207c7c20746172676574295901204e6f74653a207468652064622061636365737320697320776f7273652077697468207265737065637420746f2064622c207768696368206973207768656e20746865207265706f727420697320636f72726563742e302023203c2f7765696768743e407375626d69745f63616e646964616379043c63616e6469646174655f636f756e7430436f6d706163743c7533323e5078205375626d6974206f6e6573656c6620666f722063616e6469646163792e006420412063616e6469646174652077696c6c206569746865723aec2020202d204c6f73652061742074686520656e64206f6620746865207465726d20616e6420666f7266656974207468656972206465706f7369742e2d012020202d2057696e20616e64206265636f6d652061206d656d6265722e204d656d626572732077696c6c206576656e7475616c6c7920676574207468656972207374617368206261636b2e55012020202d204265636f6d6520612072756e6e65722d75702e2052756e6e6572732d75707320617265207265736572766564206d656d6265727320696e2063617365206f6e65206765747320666f72636566756c6c7934202020202072656d6f7665642e002c2023203c7765696768743e60204261736520776569676874203d2033332e333320c2b573a420436f6d706c6578697479206f662063616e6469646174655f636f756e743a20302e33373520c2b573342053746174652072656164733a3820092d2043616e646964617465732c20092d204d656d626572733420092d2052756e6e65727355706420092d205b4163636f756e7442616c616e63652877686f295d38205374617465207772697465733a6420092d205b4163636f756e7442616c616e63652877686f295d3820092d2043616e64696461746573302023203c2f7765696768743e4872656e6f756e63655f63616e646964616379042872656e6f756e63696e672852656e6f756e63696e679051012052656e6f756e6365206f6e65277320696e74656e74696f6e20746f20626520612063616e64696461746520666f7220746865206e65787420656c656374696f6e20726f756e642e203320706f74656e7469616c40206f7574636f6d65732065786973743a4101202d20606f726967696e6020697320612063616e64696461746520616e64206e6f7420656c656374656420696e20616e79207365742e20496e207468697320636173652c2074686520626f6e64206973f4202020756e72657365727665642c2072657475726e656420616e64206f726967696e2069732072656d6f76656420617320612063616e6469646174652e5901202d20606f726967696e6020697320612063757272656e742072756e6e65722d75702e20496e207468697320636173652c2074686520626f6e6420697320756e72657365727665642c2072657475726e656420616e64902020206f726967696e2069732072656d6f76656420617320612072756e6e65722d75702e4d01202d20606f726967696e6020697320612063757272656e74206d656d6265722e20496e207468697320636173652c2074686520626f6e6420697320756e726573657276656420616e64206f726967696e206973590120202072656d6f7665642061732061206d656d6265722c20636f6e73657175656e746c79206e6f74206265696e6720612063616e64696461746520666f7220746865206e65787420726f756e6420616e796d6f72652e650120202053696d696c617220746f205b6072656d6f76655f766f746572605d2c206966207265706c6163656d656e742072756e6e657273206578697374732c20746865792061726520696d6d6564696174656c7920757365642e24203c7765696768743e7820496620612063616e6469646174652069732072656e6f756e63696e673a60200942617365207765696768743a2031372e323820c2b573a82009436f6d706c6578697479206f662063616e6469646174655f636f756e743a20302e32333520c2b57338200953746174652072656164733a3c2009092d2043616e64696461746573982009092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665295d3c20095374617465207772697465733a3c2009092d2043616e64696461746573982009092d205b4163636f756e7442616c616e63652877686f292028756e72657365727665295d64204966206d656d6265722069732072656e6f756e63696e673a60200942617365207765696768743a2034362e323520c2b57338200953746174652072656164733ad02009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d3c20095374617465207772697465733ad02009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d642049662072756e6e65722069732072656e6f756e63696e673a60200942617365207765696768743a2034362e323520c2b57338200953746174652072656164733aac2009092d2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d3c20095374617465207772697465733aac2009092d2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572292c8c2009092d205b4163636f756e74446174612877686f292028756e72657365727665295d28203c2f7765696768743e3472656d6f76655f6d656d626572080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653c6861735f7265706c6163656d656e7410626f6f6c485d012052656d6f7665206120706172746963756c6172206d656d6265722066726f6d20746865207365742e20546869732069732065666665637469766520696d6d6564696174656c7920616e642074686520626f6e64206f668020746865206f7574676f696e67206d656d62657220697320736c61736865642e00590120496620612072756e6e65722d757020697320617661696c61626c652c207468656e2074686520626573742072756e6e65722d75702077696c6c2062652072656d6f76656420616e64207265706c61636573207468650101206f7574676f696e67206d656d6265722e204f74686572776973652c2061206e65772070687261676d656e20656c656374696f6e20697320737461727465642e004501204e6f74652074686174207468697320646f6573206e6f7420616666656374207468652064657369676e6174656420626c6f636b206e756d626572206f6620746865206e65787420656c656374696f6e2e002c2023203c7765696768743e6820496620776520686176652061207265706c6163656d656e743a6820092d2042617365207765696768743a2035302e393320c2b5734020092d2053746174652072656164733a502009092d2052756e6e65727355702e6c656e2829cc2009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d626572294420092d205374617465207772697465733acc2009092d204d656d626572732c2052756e6e6572735570202872656d6f76655f616e645f7265706c6163655f6d656d62657229650120456c73652c2073696e63652074686973206973206120726f6f742063616c6c20616e642077696c6c20676f20696e746f2070687261676d656e2c20776520617373756d652066756c6c20626c6f636b20666f72206e6f772e302023203c2f7765696768743e01201c4e65775465726d04645665633c284163636f756e7449642c2042616c616e6365293e1069012041206e6577207465726d2077697468205c5b6e65775f6d656d626572735c5d2e205468697320696e64696361746573207468617420656e6f7567682063616e64696461746573206578697374656420746f2072756e20746865590120656c656374696f6e2c206e6f74207468617420656e6f756768206861766520686173206265656e20656c65637465642e2054686520696e6e65722076616c7565206d757374206265206578616d696e656420666f726901207468697320707572706f73652e204120604e65775465726d285c5b5c5d296020696e64696361746573207468617420736f6d652063616e6469646174657320676f7420746865697220626f6e6420736c617368656420616e645901206e6f6e65207765726520656c65637465642c207768696c73742060456d7074795465726d60206d65616e732074686174206e6f2063616e64696461746573206578697374656420746f20626567696e20776974682e24456d7074795465726d00083501204e6f20286f72206e6f7420656e6f756768292063616e64696461746573206578697374656420666f72207468697320726f756e642e205468697320697320646966666572656e742066726f6dcc20604e65775465726d285c5b5c5d29602e2053656520746865206465736372697074696f6e206f6620604e65775465726d602e34456c656374696f6e4572726f720004e820496e7465726e616c206572726f722068617070656e6564207768696c6520747279696e6720746f20706572666f726d20656c656374696f6e2e304d656d6265724b69636b656404244163636f756e7449640855012041205c5b6d656d6265725c5d20686173206265656e2072656d6f7665642e20546869732073686f756c6420616c7761797320626520666f6c6c6f7765642062792065697468657220604e65775465726d60206f72342060456d7074795465726d602e4043616e646964617465536c617368656408244163636f756e7449641c42616c616e6365043d0120412063616e6469646174652077617320736c61736865642064756520746f206661696c696e6720746f206f627461696e20612073656174206173206d656d626572206f722072756e6e65722d75704453656174486f6c646572536c617368656408244163636f756e7449641c42616c616e63650471012041207365617420686f6c64657220286d656d626572206f722072756e6e65722d7570292077617320736c61736865642064756520746f206661696c696e6720746f2072657461696e696e6720746865697220706f736974696f6e2e3c4d656d62657252656e6f756e63656404244163636f756e74496404b02041205c5b6d656d6265725c5d206861732072656e6f756e6365642074686569722063616e6469646163792e34566f7465725265706f727465640c244163636f756e744964244163636f756e74496410626f6f6c080901204120766f74657220776173207265706f7274656420776974682074686520746865207265706f7274206265696e67207375636365737366756c206f72206e6f742e74205c5b766f7465722c207265706f727465722c20737563636573735c5d183443616e646964616379426f6e643042616c616e63654f663c543e400080c6a47e8d030000000000000000000028566f74696e67426f6e643042616c616e63654f663c543e4000407a10f35a000000000000000000000038446573697265644d656d626572730c753332100d00000000404465736972656452756e6e65727355700c753332100700000000305465726d4475726174696f6e38543a3a426c6f636b4e756d626572108013030000204d6f64756c654964384c6f636b4964656e74696669657220706872656c656374004430556e61626c65546f566f746504c42043616e6e6f7420766f7465207768656e206e6f2063616e64696461746573206f72206d656d626572732065786973742e1c4e6f566f7465730498204d75737420766f746520666f72206174206c65617374206f6e652063616e6469646174652e30546f6f4d616e79566f74657304882043616e6e6f7420766f7465206d6f7265207468616e2063616e646964617465732e504d6178696d756d566f7465734578636565646564049c2043616e6e6f7420766f7465206d6f7265207468616e206d6178696d756d20616c6c6f7765642e284c6f7742616c616e636504c82043616e6e6f7420766f74652077697468207374616b65206c657373207468616e206d696e696d756d2062616c616e63652e3c556e61626c65546f506179426f6e64047c20566f7465722063616e206e6f742070617920766f74696e6720626f6e642e2c4d7573744265566f7465720444204d757374206265206120766f7465722e285265706f727453656c6604502043616e6e6f74207265706f72742073656c662e4c4475706c69636174656443616e6469646174650484204475706c6963617465642063616e646964617465207375626d697373696f6e2e304d656d6265725375626d6974048c204d656d6265722063616e6e6f742072652d7375626d69742063616e6469646163792e3052756e6e65725375626d6974048c2052756e6e65722063616e6e6f742072652d7375626d69742063616e6469646163792e68496e73756666696369656e7443616e64696461746546756e647304982043616e64696461746520646f6573206e6f74206861766520656e6f7567682066756e64732e244e6f744d656d6265720438204e6f742061206d656d6265722e54496e76616c696443616e646964617465436f756e7404e4205468652070726f766964656420636f756e74206f66206e756d626572206f662063616e6469646174657320697320696e636f72726563742e40496e76616c6964566f7465436f756e7404d0205468652070726f766964656420636f756e74206f66206e756d626572206f6620766f74657320697320696e636f72726563742e44496e76616c696452656e6f756e63696e67040101205468652072656e6f756e63696e67206f726967696e2070726573656e74656420612077726f6e67206052656e6f756e63696e676020706172616d657465722e48496e76616c69645265706c6163656d656e740401012050726564696374696f6e20726567617264696e67207265706c6163656d656e74206166746572206d656d6265722072656d6f76616c2069732077726f6e672e0d4c546563686e6963616c4d656d62657273686970014c496e7374616e6365314d656d62657273686970081c4d656d626572730100445665633c543a3a4163636f756e7449643e040004c8205468652063757272656e74206d656d626572736869702c2073746f72656420617320616e206f726465726564205665632e145072696d65000030543a3a4163636f756e744964040004a4205468652063757272656e74207072696d65206d656d6265722c206966206f6e65206578697374732e011c286164645f6d656d626572040c77686f30543a3a4163636f756e7449640c7c204164642061206d656d626572206077686f6020746f20746865207365742e00a0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a4164644f726967696e602e3472656d6f76655f6d656d626572040c77686f30543a3a4163636f756e7449640c902052656d6f76652061206d656d626572206077686f602066726f6d20746865207365742e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656d6f76654f726967696e602e2c737761705f6d656d626572081872656d6f766530543a3a4163636f756e7449640c61646430543a3a4163636f756e74496414c02053776170206f7574206f6e65206d656d626572206072656d6f76656020666f7220616e6f746865722060616464602e00a4204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a537761704f726967696e602e001101205072696d65206d656d62657273686970206973202a6e6f742a207061737365642066726f6d206072656d6f76656020746f2060616464602c20696620657874616e742e3472657365745f6d656d62657273041c6d656d62657273445665633c543a3a4163636f756e7449643e105901204368616e676520746865206d656d6265727368697020746f2061206e6577207365742c20646973726567617264696e6720746865206578697374696e67206d656d626572736869702e204265206e69636520616e646c207061737320606d656d6265727360207072652d736f727465642e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52657365744f726967696e602e286368616e67655f6b6579040c6e657730543a3a4163636f756e74496414d82053776170206f7574207468652073656e64696e67206d656d62657220666f7220736f6d65206f74686572206b657920606e6577602e00f4204d6179206f6e6c792062652063616c6c65642066726f6d20605369676e656460206f726967696e206f6620612063757272656e74206d656d6265722e002101205072696d65206d656d62657273686970206973207061737365642066726f6d20746865206f726967696e206163636f756e7420746f20606e6577602c20696620657874616e742e247365745f7072696d65040c77686f30543a3a4163636f756e7449640cc02053657420746865207072696d65206d656d6265722e204d75737420626520612063757272656e74206d656d6265722e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e2c636c6561725f7072696d65000c982052656d6f766520746865207072696d65206d656d626572206966206974206578697374732e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e01182c4d656d62657241646465640004e42054686520676976656e206d656d626572207761732061646465643b2073656520746865207472616e73616374696f6e20666f722077686f2e344d656d62657252656d6f7665640004ec2054686520676976656e206d656d626572207761732072656d6f7665643b2073656520746865207472616e73616374696f6e20666f722077686f2e384d656d62657273537761707065640004dc2054776f206d656d62657273207765726520737761707065643b2073656520746865207472616e73616374696f6e20666f722077686f2e304d656d6265727352657365740004190120546865206d656d62657273686970207761732072657365743b2073656520746865207472616e73616374696f6e20666f722077686f20746865206e6577207365742069732e284b65794368616e676564000488204f6e65206f6620746865206d656d6265727327206b657973206368616e6765642e1444756d6d7904bc73705f7374643a3a6d61726b65723a3a5068616e746f6d446174613c284163636f756e7449642c204576656e74293e0470205068616e746f6d206d656d6265722c206e6576657220757365642e00000e1c4772616e647061013c4772616e64706146696e616c6974791814537461746501006c53746f72656453746174653c543a3a426c6f636b4e756d6265723e04000490205374617465206f66207468652063757272656e7420617574686f72697479207365742e3450656e64696e674368616e676500008c53746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265723e040004c42050656e64696e67206368616e67653a20287369676e616c65642061742c207363686564756c6564206368616e6765292e284e657874466f72636564000038543a3a426c6f636b4e756d626572040004bc206e65787420626c6f636b206e756d6265722077686572652077652063616e20666f7263652061206368616e67652e1c5374616c6c656400008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d626572290400049020607472756560206966207765206172652063757272656e746c79207374616c6c65642e3043757272656e7453657449640100145365744964200000000000000000085d0120546865206e756d626572206f66206368616e6765732028626f746820696e207465726d73206f66206b65797320616e6420756e6465726c79696e672065636f6e6f6d696320726573706f6e736962696c697469657329c420696e20746865202273657422206f66204772616e6470612076616c696461746f72732066726f6d2067656e657369732e30536574496453657373696f6e0001051453657449643053657373696f6e496e6465780004001059012041206d617070696e672066726f6d206772616e6470612073657420494420746f2074686520696e646578206f6620746865202a6d6f737420726563656e742a2073657373696f6e20666f722077686963682069747368206d656d62657273207765726520726573706f6e7369626c652e00b82054574f582d4e4f54453a2060536574496460206973206e6f7420756e646572207573657220636f6e74726f6c2e010c4c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66240d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e00110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e306e6f74655f7374616c6c6564081464656c617938543a3a426c6f636b4e756d6265726c626573745f66696e616c697a65645f626c6f636b5f6e756d62657238543a3a426c6f636b4e756d6265721c1d01204e6f74652074686174207468652063757272656e7420617574686f7269747920736574206f6620746865204752414e4450412066696e616c69747920676164676574206861732901207374616c6c65642e20546869732077696c6c2074726967676572206120666f7263656420617574686f7269747920736574206368616e67652061742074686520626567696e6e696e672101206f6620746865206e6578742073657373696f6e2c20746f20626520656e6163746564206064656c61796020626c6f636b7320616674657220746861742e205468652064656c617915012073686f756c64206265206869676820656e6f75676820746f20736166656c7920617373756d6520746861742074686520626c6f636b207369676e616c6c696e6720746865290120666f72636564206368616e67652077696c6c206e6f742062652072652d6f726765642028652e672e203130303020626c6f636b73292e20546865204752414e44504120766f7465727329012077696c6c20737461727420746865206e657720617574686f7269747920736574207573696e672074686520676976656e2066696e616c697a656420626c6f636b20617320626173652e5c204f6e6c792063616c6c61626c6520627920726f6f742e010c384e6577417574686f7269746965730434417574686f726974794c69737404d8204e657720617574686f726974792073657420686173206265656e206170706c6965642e205c5b617574686f726974795f7365745c5d1850617573656400049c2043757272656e7420617574686f726974792073657420686173206265656e207061757365642e1c526573756d65640004a02043757272656e7420617574686f726974792073657420686173206265656e20726573756d65642e001c2c50617573654661696c656408090120417474656d707420746f207369676e616c204752414e445041207061757365207768656e2074686520617574686f72697479207365742069736e2774206c697665a8202865697468657220706175736564206f7220616c72656164792070656e64696e67207061757365292e30526573756d654661696c656408150120417474656d707420746f207369676e616c204752414e44504120726573756d65207768656e2074686520617574686f72697479207365742069736e277420706175736564a42028656974686572206c697665206f7220616c72656164792070656e64696e6720726573756d65292e344368616e676550656e64696e6704ec20417474656d707420746f207369676e616c204752414e445041206368616e67652077697468206f6e6520616c72656164792070656e64696e672e1c546f6f536f6f6e04c02043616e6e6f74207369676e616c20666f72636564206368616e676520736f20736f6f6e206166746572206c6173742e60496e76616c69644b65794f776e65727368697050726f6f660435012041206b6579206f776e6572736869702070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e60496e76616c696445717569766f636174696f6e50726f6f6604350120416e2065717569766f636174696f6e2070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e584475706c69636174654f6666656e63655265706f7274041901204120676976656e2065717569766f636174696f6e207265706f72742069732076616c69642062757420616c72656164792070726576696f75736c79207265706f727465642e0f205472656173757279012054726561737572790c3450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c730001053450726f706f73616c496e6465789c50726f706f73616c3c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e000400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100485665633c50726f706f73616c496e6465783e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e010c3470726f706f73655f7370656e64081476616c756560436f6d706163743c42616c616e63654f663c542c20493e3e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365242d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129b4202d20446252656164733a206050726f706f73616c436f756e74602c20606f726967696e206163636f756e7460ec202d2044625772697465733a206050726f706f73616c436f756e74602c206050726f706f73616c73602c20606f726967696e206163636f756e7460302023203c2f7765696768743e3c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e24fc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656a6563744f726967696e602e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129d0202d20446252656164733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460d4202d2044625772697465733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460302023203c2f7765696768743e40617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e285d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e50202d20436f6d706c65786974793a204f2831292e90202d20446252656164733a206050726f706f73616c73602c2060417070726f76616c73605c202d20446257726974653a2060417070726f76616c7360302023203c2f7765696768743e011c2050726f706f736564043450726f706f73616c496e6465780484204e65772070726f706f73616c2e205c5b70726f706f73616c5f696e6465785c5d205370656e64696e67041c42616c616e6365043d01205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e205c5b6275646765745f72656d61696e696e675c5d1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964041d0120536f6d652066756e64732068617665206265656e20616c6c6f63617465642e205c5b70726f706f73616c5f696e6465782c2061776172642c2062656e65666963696172795c5d2052656a6563746564083450726f706f73616c496e6465781c42616c616e636504250120412070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e205c5b70726f706f73616c5f696e6465782c20736c61736865645c5d144275726e74041c42616c616e636504b020536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e205c5b6275726e5c5d20526f6c6c6f766572041c42616c616e6365083101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e54205c5b6275646765745f72656d61696e696e675c5d1c4465706f736974041c42616c616e636504b020536f6d652066756e64732068617665206265656e206465706f73697465642e205c5b6465706f7369745c5d143050726f706f73616c426f6e641c5065726d696c6c1050c30000085501204672616374696f6e206f6620612070726f706f73616c27732076616c756520746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c616365207468652070726f706f73616c2e110120416e2061636365707465642070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f6573206e6f742e4c50726f706f73616c426f6e644d696e696d756d3c42616c616e63654f663c542c20493e4000407a10f35a00000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f6438543a3a426c6f636b4e756d6265721080700000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e1c5065726d696c6c1020a107000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e204d6f64756c654964204d6f64756c6549642070792f7472737279041901205468652074726561737572792773206d6f64756c652069642c207573656420666f72206465726976696e672069747320736f7665726569676e206163636f756e742049442e0870496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e30496e76616c6964496e6465780494204e6f2070726f706f73616c206f7220626f756e7479206174207468617420696e6465782e1024436f6e7472616374730124436f6e747261637473143c43757272656e745363686564756c6501002c5363686564756c653c543e950900000000000400000000020000000100008000000010000000001000000001000020000000000008002a0600001d620200846b03008b180000671d0000610a00001d180000cc2a00005c000000a17001003e020300f307000046070000e807000001080000f4190000db280000a908000013249208f8080000d0080000060b000007090000ad080000520800009c0800006f0a0000e7090000020a0000f30900002b0a0000f8090000d10900001b0a0000390a0000270a0000560f0000dc070000260a000036200000381c0000ec1f0000d51c0000780a0000bc0a00005f0a0000e40900003e0a0000330a0000470a0000270a00006cf1380000000000a0f938000000000040ff3800000000008ca77b00000000001a6c3800000000008876380000000000b481380000000000d4f981000000000028543800000000008a4c380000000000c87d5f00000000008a9f1c0000000000c8e57400000000000b01000000000000983c530000000000a90200000000000050de382a0000000038476124000000006467b209000000002418910000000000b2dfd100000000001a6fe7070000000039090000000000004e86990000000000dad35a1000000000cd07000000000000eaaf830a00000000a01f2a0200000000ae0500000000000008f7270b000000003675e30700000000f4753c09000000000102000000000000d20200000000000008efb81d000000000802000000000000e602000000000000b90a000000000000c25731000000000026100000000000007a8e330000000000d80c00000000000040c22f0000000000d305000000000000067f2f0000000000d70500000000000004942043757272656e7420636f7374207363686564756c6520666f7220636f6e7472616374732e305072697374696e65436f64650001062c436f6465486173683c543e1c5665633c75383e0004000465012041206d617070696e672066726f6d20616e206f726967696e616c20636f6465206861736820746f20746865206f726967696e616c20636f64652c20756e746f756368656420627920696e737472756d656e746174696f6e2e2c436f646553746f726167650001062c436f6465486173683c543e587761736d3a3a5072656661625761736d4d6f64756c650004000465012041206d617070696e67206265747765656e20616e206f726967696e616c20636f6465206861736820616e6420696e737472756d656e746564207761736d20636f64652c20726561647920666f7220657865637574696f6e2e384163636f756e74436f756e74657201000c753634200000000000000000045420546865207375627472696520636f756e7465722e38436f6e7472616374496e666f4f6600010530543a3a4163636f756e7449643c436f6e7472616374496e666f3c543e0004000ca82054686520636f6465206173736f6369617465642077697468206120676976656e206163636f756e742e00d02054574f582d4e4f54453a20534146452073696e636520604163636f756e7449646020697320612073656375726520686173682e01143c7570646174655f7363686564756c6504207363686564756c652c5363686564756c653c543e0cb4205570646174657320746865207363686564756c6520666f72206d65746572696e6720636f6e7472616374732e000d0120546865207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652073746f726564207363686564756c652e207075745f636f64650410636f64651c5665633c75383e085d012053746f7265732074686520676976656e2062696e617279205761736d20636f646520696e746f2074686520636861696e27732073746f7261676520616e642072657475726e73206974732060636f646568617368602ed420596f752063616e20696e7374616e746961746520636f6e747261637473206f6e6c7920776974682073746f72656420636f64652e1063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e10646174611c5665633c75383e1c0901204d616b657320612063616c6c20746f20616e206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e002901202a20496620746865206163636f756e74206973206120736d6172742d636f6e7472616374206163636f756e742c20746865206173736f63696174656420636f64652077696c6c206265b020657865637574656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e1901202a20496620746865206163636f756e74206973206120726567756c6172206163636f756e742c20616e792076616c75652077696c6c206265207472616e736665727265642e4901202a204966206e6f206163636f756e742065786973747320616e64207468652063616c6c2076616c7565206973206e6f74206c657373207468616e20606578697374656e7469616c5f6465706f736974602c1501206120726567756c6172206163636f756e742077696c6c206265206372656174656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e2c696e7374616e74696174651424656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e24636f64655f686173682c436f6465486173683c543e10646174611c5665633c75383e1073616c741c5665633c75383e34290120496e7374616e7469617465732061206e657720636f6e74726163742066726f6d207468652060636f64655f68617368602067656e65726174656420627920607075745f636f6465602c98206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e0065012054686520737570706c696564206073616c7460206973207573656420666f7220636f6e74726163742061646472657373206465726976696174696f6e2e205365652060666e20636f6e74726163745f61646472657373602e009820496e7374616e74696174696f6e20697320657865637574656420617320666f6c6c6f77733a004d01202d205468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e6465722c20636f64655f6861736820616e64207468652073616c742e0501202d2054686520736d6172742d636f6e7472616374206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732e6d01202d20546865206063746f725f636f64656020697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792d63726561746564206163636f756e742e204275666665722072657475726e65645d0120202061667465722074686520657865637574696f6e206973207361766564206173207468652060636f646560206f6620746865206163636f756e742e205468617420636f64652077696c6c20626520696e766f6b6564a820202075706f6e20616e792063616c6c2072656365697665642062792074686973206163636f756e742e7c202d2054686520636f6e747261637420697320696e697469616c697a65642e3c636c61696d5f73757263686172676508106465737430543a3a4163636f756e744964286175785f73656e646572504f7074696f6e3c543a3a4163636f756e7449643e14710120416c6c6f777320626c6f636b2070726f64756365727320746f20636c61696d206120736d616c6c2072657761726420666f72206576696374696e67206120636f6e74726163742e204966206120626c6f636b2070726f64756365721501206661696c7320746f20646f20736f2c206120726567756c61722075736572732077696c6c20626520616c6c6f77656420746f20636c61696d20746865207265776172642e00390120496620636f6e7472616374206973206e6f742065766963746564206173206120726573756c74206f6620746869732063616c6c2c206e6f20616374696f6e73206172652074616b656e20616e64ac207468652073656e646572206973206e6f7420656c696769626c6520666f7220746865207265776172642e011830496e7374616e74696174656408244163636f756e744964244163636f756e744964042d0120436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e205c5b6f776e65722c20636f6e74726163745c5d1c4576696374656408244163636f756e74496410626f6f6c1ce420436f6e747261637420686173206265656e206576696374656420616e64206973206e6f7720696e20746f6d6273746f6e652073746174652e60205c5b636f6e74726163742c20746f6d6273746f6e655c5d0024202320506172616d73000d01202d2060636f6e7472616374603a20604163636f756e744964603a20546865206163636f756e74204944206f6620746865206576696374656420636f6e74726163742e3501202d2060746f6d6273746f6e65603a2060626f6f6c603a205472756520696620746865206576696374656420636f6e7472616374206c65667420626568696e64206120746f6d6273746f6e652e20526573746f72656410244163636f756e744964244163636f756e74496410486173681c42616c616e636524c020526573746f726174696f6e20666f72206120636f6e747261637420686173206265656e207375636365737366756c2eac205c5b646f6e6f722c20646573742c20636f64655f686173682c2072656e745f616c6c6f77616e63655c5d0024202320506172616d7300f4202d2060646f6e6f72603a20604163636f756e744964603a204163636f756e74204944206f662074686520726573746f72696e6720636f6e7472616374ec202d206064657374603a20604163636f756e744964603a204163636f756e74204944206f662074686520726573746f72656420636f6e7472616374e8202d2060636f64655f68617368603a206048617368603a20436f64652068617368206f662074686520726573746f72656420636f6e74726163741901202d206072656e745f616c6c6f77616e63653a206042616c616e6365603a2052656e7420616c6c6f77616e6365206f662074686520726573746f72656420636f6e747261637428436f646553746f72656404104861736808b820436f646520776974682074686520737065636966696564206861736820686173206265656e2073746f7265642e38205c5b636f64655f686173685c5d3c5363686564756c6555706461746564040c75333204d020547269676765726564207768656e207468652063757272656e74205c5b7363686564756c655c5d20697320757064617465642e44436f6e7472616374457865637574696f6e08244163636f756e7449641c5665633c75383e08090120416e206576656e74206465706f73697465642075706f6e20657865637574696f6e206f66206120636f6e74726163742066726f6d20746865206163636f756e742e48205c5b6163636f756e742c20646174615c5d204c5369676e6564436c61696d48616e646963617038543a3a426c6f636b4e756d626572100200000010e0204e756d626572206f6620626c6f636b2064656c617920616e2065787472696e73696320636c61696d20737572636861726765206861732e000d01205768656e20636c61696d207375726368617267652069732063616c6c656420627920616e2065787472696e736963207468652072656e7420697320636865636b65646820666f722063757272656e745f626c6f636b202d2064656c617940546f6d6273746f6e654465706f7369743042616c616e63654f663c543e4000a0acb903000000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f2067656e6572617465206120746f6d6273746f6e652e4453746f7261676553697a654f66667365740c753332100800000018710120412073697a65206f666673657420666f7220616e20636f6e74726163742e2041206a7573742063726561746564206163636f756e74207769746820756e746f75636865642073746f726167652077696c6c20686176652074686174e0206d756368206f662073746f726167652066726f6d20746865207065727370656374697665206f66207468652073746174652072656e742e006101205468697320697320612073696d706c652077617920746f20656e73757265207468617420636f6e747261637473207769746820656d7074792073746f72616765206576656e7475616c6c79206765742064656c657465646501206279206d616b696e67207468656d207061792072656e742e2054686973206372656174657320616e20696e63656e7469766520746f2072656d6f7665207468656d206561726c7920696e206f7264657220746f2073617665182072656e742e2c52656e74427974654665653042616c616e63654f663c543e4000286bee000000000000000000000000043501205072696365206f6620612062797465206f662073746f7261676520706572206f6e6520626c6f636b20696e74657276616c2e2053686f756c642062652067726561746572207468616e20302e4452656e744465706f7369744f66667365743042616c616e63654f663c543e400010a5d4e800000000000000000000001c05012054686520616d6f756e74206f662066756e6473206120636f6e74726163742073686f756c64206465706f73697420696e206f7264657220746f206f6666736574582074686520636f7374206f66206f6e6520627974652e006901204c6574277320737570706f736520746865206465706f73697420697320312c303030204255202862616c616e636520756e697473292f6279746520616e64207468652072656e7420697320312042552f627974652f6461792c5901207468656e206120636f6e7472616374207769746820312c3030302c3030302042552074686174207573657320312c303030206279746573206f662073746f7261676520776f756c6420706179206e6f2072656e742e4d0120427574206966207468652062616c616e6365207265647563656420746f203530302c30303020425520616e64207468652073746f7261676520737461796564207468652073616d6520617420312c3030302c78207468656e20697420776f756c6420706179203530302042552f6461792e3c5375726368617267655265776172643042616c616e63654f663c543e40005cb2ec22000000000000000000000008e4205265776172642074686174206973207265636569766564206279207468652070617274792077686f736520746f75636820686173206c65646820746f2072656d6f76616c206f66206120636f6e74726163742e204d617844657074680c753332102000000008310120546865206d6178696d756d206e657374696e67206c6576656c206f6620612063616c6c2f696e7374616e746961746520737461636b2e204120726561736f6e61626c652064656661756c74382076616c7565206973203130302e304d617856616c756553697a650c753332100040000004390120546865206d6178696d756d2073697a65206f6620612073746f726167652076616c756520696e2062797465732e204120726561736f6e61626c652064656661756c74206973203136204b69422e5058496e76616c69645363686564756c6556657273696f6e0405012041206e6577207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652063757272656e74206f6e652e54496e76616c6964537572636861726765436c61696d04550120416e206f726967696e206d757374206265207369676e6564206f7220696e686572656e7420616e6420617578696c696172792073656e646572206f6e6c792070726f7669646564206f6e20696e686572656e742e54496e76616c6964536f75726365436f6e747261637404dc2043616e6e6f7420726573746f72652066726f6d206e6f6e6578697374696e67206f7220746f6d6273746f6e6520636f6e74726163742e68496e76616c696444657374696e6174696f6e436f6e747261637404c42043616e6e6f7420726573746f726520746f206e6f6e6578697374696e67206f7220616c69766520636f6e74726163742e40496e76616c6964546f6d6273746f6e65046020546f6d6273746f6e657320646f6e2774206d617463682e54496e76616c6964436f6e74726163744f726967696e04bc20416e206f726967696e20547269654964207772697474656e20696e207468652063757272656e7420626c6f636b2e204f75744f6647617304bc2054686520657865637574656420636f6e7472616374206578686175737465642069747320676173206c696d69742e504f7574707574427566666572546f6f536d616c6c04050120546865206f75747075742062756666657220737570706c69656420746f206120636f6e7472616374204150492063616c6c2077617320746f6f20736d616c6c2e6442656c6f7753756273697374656e63655468726573686f6c6410210120506572666f726d696e672074686520726571756573746564207472616e7366657220776f756c6420686176652062726f756768742074686520636f6e74726163742062656c6f773d01207468652073756273697374656e6365207468726573686f6c642e204e6f207472616e7366657220697320616c6c6f77656420746f20646f207468697320696e206f7264657220746f20616c6c6f77450120666f72206120746f6d6273746f6e6520746f20626520637265617465642e2055736520607365616c5f7465726d696e6174656020746f2072656d6f7665206120636f6e747261637420776974686f757470206c656176696e67206120746f6d6273746f6e6520626568696e642e504e6577436f6e74726163744e6f7446756e64656408390120546865206e65776c79206372656174656420636f6e74726163742069732062656c6f77207468652073756273697374656e6365207468726573686f6c6420616674657220657865637574696e6721012069747320636f6e74727563746f722e204e6f20636f6e7472616374732061726520616c6c6f77656420746f2065786973742062656c6f772074686174207468726573686f6c642e385472616e736665724661696c65640c250120506572666f726d696e672074686520726571756573746564207472616e73666572206661696c656420666f72206120726561736f6e206f726967696e6174696e6720696e2074686531012063686f73656e2063757272656e637920696d706c656d656e746174696f6e206f66207468652072756e74696d652e204d6f73742070726f6261626c79207468652062616c616e63652069738c20746f6f206c6f77206f72206c6f636b732061726520706c61636564206f6e2069742e4c4d617843616c6c44657074685265616368656408250120506572666f726d696e6720612063616c6c207761732064656e6965642062656361757365207468652063616c6c696e67206465707468207265616368656420746865206c696d697498206f6620776861742069732073706563696669656420696e20746865207363686564756c652e2c4e6f7443616c6c61626c650831012054686520636f6e74726163742074686174207761732063616c6c656420697320656974686572206e6f20636f6e747261637420617420616c6c20286120706c61696e206163636f756e74294c206f72206973206120746f6d6273746f6e652e30436f6465546f6f4c617267650455012054686520636f646520737570706c69656420746f20607075745f636f646560206578636565647320746865206c696d69742073706563696669656420696e207468652063757272656e74207363686564756c652e30436f64654e6f74466f756e6404c8204e6f20636f646520636f756c6420626520666f756e642061742074686520737570706c69656420636f646520686173682e2c4f75744f66426f756e6473042901204120627566666572206f757473696465206f662073616e64626f78206d656d6f7279207761732070617373656420746f206120636f6e7472616374204150492066756e6374696f6e2e384465636f64696e674661696c6564042d0120496e7075742070617373656420746f206120636f6e7472616374204150492066756e6374696f6e206661696c656420746f206465636f646520617320657870656374656420747970652e3c436f6e747261637454726170706564048c20436f6e7472616374207472617070656420647572696e6720657865637574696f6e2e3456616c7565546f6f4c6172676504d0205468652073697a6520646566696e656420696e2060543a3a4d617856616c756553697a6560207761732065786365656465642e405265656e7472616e636544656e6965640c41012054686520616374696f6e20706572666f726d6564206973206e6f7420616c6c6f776564207768696c652074686520636f6e747261637420706572666f726d696e6720697420697320616c72656164793d01206f6e207468652063616c6c20737461636b2e2054686f736520616374696f6e732061726520636f6e74726163742073656c66206465737472756374696f6e20616e6420726573746f726174696f6e40206f66206120746f6d6273746f6e652e11105375646f01105375646f040c4b6579010030543a3a4163636f756e74496480000000000000000000000000000000000000000000000000000000000000000004842054686520604163636f756e74496460206f6620746865207375646f206b65792e0110107375646f041063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e547375646f5f756e636865636b65645f776569676874081063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e1c5f776569676874185765696768742839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e310120546869732066756e6374696f6e20646f6573206e6f7420636865636b2074686520776569676874206f66207468652063616c6c2c20616e6420696e737465616420616c6c6f777320746865b4205375646f207573657220746f20737065636966792074686520776569676874206f66207468652063616c6c2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292ed0202d2054686520776569676874206f6620746869732063616c6c20697320646566696e6564206279207468652063616c6c65722e302023203c2f7765696768743e1c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652475012041757468656e74696361746573207468652063757272656e74207375646f206b657920616e6420736574732074686520676976656e204163636f756e7449642028606e6577602920617320746865206e6577207375646f206b65792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e1c7375646f5f6173080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2c51012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c207769746820605369676e656460206f726967696e2066726f6d44206120676976656e206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e010c14537564696404384469737061746368526573756c74048c2041207375646f206a75737420746f6f6b20706c6163652e205c5b726573756c745c5d284b65794368616e67656404244163636f756e74496404010120546865205c5b7375646f65725c5d206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e285375646f4173446f6e6504384469737061746368526573756c74048c2041207375646f206a75737420746f6f6b20706c6163652e205c5b726573756c745c5d00042c526571756972655375646f04802053656e646572206d75737420626520746865205375646f206163636f756e741220496d4f6e6c696e650120496d4f6e6c696e6510384865617274626561744166746572010038543a3a426c6f636b4e756d62657210000000001831012054686520626c6f636b206e756d6265722061667465722077686963682069742773206f6b20746f2073656e64206865617274626561747320696e2063757272656e742073657373696f6e2e0011012041742074686520626567696e6e696e67206f6620656163682073657373696f6e20776520736574207468697320746f20612076616c756520746861742073686f756c64d02066616c6c20726f7567686c7920696e20746865206d6964646c65206f66207468652073657373696f6e206475726174696f6e2e010120546865206964656120697320746f206669727374207761697420666f72207468652076616c696461746f727320746f2070726f64756365206120626c6f636b390120696e207468652063757272656e742073657373696f6e2c20736f20746861742074686520686561727462656174206c61746572206f6e2077696c6c206e6f74206265206e65636573736172792e104b65797301004c5665633c543a3a417574686f7269747949643e040004d0205468652063757272656e7420736574206f66206b6579732074686174206d61792069737375652061206865617274626561742e485265636569766564486561727462656174730002053053657373696f6e496e6465782441757468496e6465781c5665633c75383e05040008f020466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206041757468496e6465786020746f8020606f6666636861696e3a3a4f70617175654e6574776f726b5374617465602e38417574686f726564426c6f636b730102053053657373696f6e496e64657838543a3a56616c696461746f7249640c75333205100000000008150120466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f662060543a3a56616c696461746f7249646020746f20746865c8206e756d626572206f6620626c6f636b7320617574686f7265642062792074686520676976656e20617574686f726974792e0104246865617274626561740824686561727462656174644865617274626561743c543a3a426c6f636b4e756d6265723e285f7369676e6174757265bc3c543a3a417574686f7269747949642061732052756e74696d654170705075626c69633e3a3a5369676e6174757265242c2023203c7765696768743e4101202d20436f6d706c65786974793a20604f284b202b20452960207768657265204b206973206c656e677468206f6620604b6579736020286865617274626561742e76616c696461746f72735f6c656e290101202020616e642045206973206c656e677468206f6620606865617274626561742e6e6574776f726b5f73746174652e65787465726e616c5f61646472657373608c2020202d20604f284b29603a206465636f64696e67206f66206c656e67746820604b60b02020202d20604f284529603a206465636f64696e672f656e636f64696e67206f66206c656e677468206045603d01202d20446252656164733a2070616c6c65745f73657373696f6e206056616c696461746f7273602c2070616c6c65745f73657373696f6e206043757272656e74496e646578602c20604b657973602c5c202020605265636569766564486561727462656174736084202d2044625772697465733a206052656365697665644865617274626561747360302023203c2f7765696768743e010c444865617274626561745265636569766564042c417574686f7269747949640405012041206e657720686561727462656174207761732072656365697665642066726f6d2060417574686f72697479496460205c5b617574686f726974795f69645c5d1c416c6c476f6f640004d42041742074686520656e64206f66207468652073657373696f6e2c206e6f206f6666656e63652077617320636f6d6d69747465642e2c536f6d654f66666c696e6504605665633c4964656e74696669636174696f6e5475706c653e043d012041742074686520656e64206f66207468652073657373696f6e2c206174206c65617374206f6e652076616c696461746f722077617320666f756e6420746f206265205c5b6f66666c696e655c5d2e000828496e76616c69644b65790464204e6f6e206578697374656e74207075626c6963206b65792e4c4475706c6963617465644865617274626561740458204475706c696361746564206865617274626561742e1348417574686f72697479446973636f7665727900010000000014204f6666656e63657301204f6666656e636573101c5265706f727473000105345265706f727449644f663c543ed04f6666656e636544657461696c733c543a3a4163636f756e7449642c20543a3a4964656e74696669636174696f6e5475706c653e00040004490120546865207072696d61727920737472756374757265207468617420686f6c647320616c6c206f6666656e6365207265636f726473206b65796564206279207265706f7274206964656e746966696572732e4044656665727265644f6666656e6365730100645665633c44656665727265644f6666656e63654f663c543e3e0400086501204465666572726564207265706f72747320746861742068617665206265656e2072656a656374656420627920746865206f6666656e63652068616e646c657220616e64206e65656420746f206265207375626d6974746564442061742061206c617465722074696d652e58436f6e63757272656e745265706f727473496e646578010205104b696e64384f706171756554696d65536c6f74485665633c5265706f727449644f663c543e3e050400042901204120766563746f72206f66207265706f727473206f66207468652073616d65206b696e6420746861742068617070656e6564206174207468652073616d652074696d6520736c6f742e485265706f72747342794b696e64496e646578010105104b696e641c5665633c75383e00040018110120456e756d65726174657320616c6c207265706f727473206f662061206b696e6420616c6f6e672077697468207468652074696d6520746865792068617070656e65642e00bc20416c6c207265706f7274732061726520736f72746564206279207468652074696d65206f66206f6666656e63652e004901204e6f74652074686174207468652061637475616c2074797065206f662074686973206d617070696e6720697320605665633c75383e602c207468697320697320626563617573652076616c756573206f66690120646966666572656e7420747970657320617265206e6f7420737570706f7274656420617420746865206d6f6d656e7420736f2077652061726520646f696e6720746865206d616e75616c2073657269616c697a6174696f6e2e010001041c4f6666656e63650c104b696e64384f706171756554696d65536c6f7410626f6f6c10550120546865726520697320616e206f6666656e6365207265706f72746564206f662074686520676976656e20606b696e64602068617070656e656420617420746865206073657373696f6e5f696e6465786020616e644d0120286b696e642d7370656369666963292074696d6520736c6f742e2054686973206576656e74206973206e6f74206465706f736974656420666f72206475706c696361746520736c61736865732e206c617374190120656c656d656e7420696e64696361746573206f6620746865206f6666656e636520776173206170706c69656420287472756529206f7220717565756564202866616c73652974205c5b6b696e642c2074696d65736c6f742c206170706c6965645c5d2e00001528486973746f726963616c0000000000166052616e646f6d6e657373436f6c6c656374697665466c6970016052616e646f6d6e657373436f6c6c656374697665466c6970043852616e646f6d4d6174657269616c0100305665633c543a3a486173683e04000c610120536572696573206f6620626c6f636b20686561646572732066726f6d20746865206c61737420383120626c6f636b73207468617420616374732061732072616e646f6d2073656564206d6174657269616c2e2054686973610120697320617272616e67656420617320612072696e672062756666657220776974682060626c6f636b5f6e756d626572202520383160206265696e672074686520696e64657820696e746f20746865206056656360206f664420746865206f6c6465737420686173682e010000000017204964656e7469747901204964656e7469747910284964656e746974794f6600010530543a3a4163636f756e74496468526567697374726174696f6e3c42616c616e63654f663c543e3e0004000c210120496e666f726d6174696f6e20746861742069732070657274696e656e7420746f206964656e746966792074686520656e7469747920626568696e6420616e206163636f756e742e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e1c53757065724f6600010230543a3a4163636f756e7449645028543a3a4163636f756e7449642c204461746129000400086101205468652073757065722d6964656e74697479206f6620616e20616c7465726e6174697665202273756222206964656e7469747920746f676574686572207769746820697473206e616d652c2077697468696e2074686174510120636f6e746578742e20496620746865206163636f756e74206973206e6f7420736f6d65206f74686572206163636f756e742773207375622d6964656e746974792c207468656e206a75737420604e6f6e65602e18537562734f6601010530543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e290044000000000000000000000000000000000014b820416c7465726e6174697665202273756222206964656e746974696573206f662074686973206163636f756e742e001d0120546865206669727374206974656d20697320746865206465706f7369742c20746865207365636f6e64206973206120766563746f72206f6620746865206163636f756e74732e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e28526567697374726172730100d85665633c4f7074696f6e3c526567697374726172496e666f3c42616c616e63654f663c543e2c20543a3a4163636f756e7449643e3e3e0400104d012054686520736574206f6620726567697374726172732e204e6f7420657870656374656420746f206765742076657279206269672061732063616e206f6e6c79206265206164646564207468726f7567682061a8207370656369616c206f726967696e20286c696b656c79206120636f756e63696c206d6f74696f6e292e0029012054686520696e64657820696e746f20746869732063616e206265206361737420746f2060526567697374726172496e6465786020746f2067657420612076616c69642076616c75652e013c346164645f726567697374726172041c6163636f756e7430543a3a4163636f756e744964347c2041646420612072656769737472617220746f207468652073797374656d2e00010120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060543a3a5265676973747261724f726967696e602e00ac202d20606163636f756e74603a20746865206163636f756e74206f6620746865207265676973747261722e009820456d6974732060526567697374726172416464656460206966207375636365737366756c2e002c2023203c7765696768743e2901202d20604f2852296020776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e64656420616e6420636f64652d626f756e646564292e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e307365745f6964656e746974790410696e666f304964656e74697479496e666f4c2d012053657420616e206163636f756e742773206964656e7469747920696e666f726d6174696f6e20616e6420726573657276652074686520617070726f707269617465206465706f7369742e00590120496620746865206163636f756e7420616c726561647920686173206964656e7469747920696e666f726d6174696f6e2c20746865206465706f7369742069732074616b656e2061732070617274207061796d656e745420666f7220746865206e6577206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0090202d2060696e666f603a20546865206964656e7469747920696e666f726d6174696f6e2e008c20456d69747320604964656e7469747953657460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2858202b205827202b2052296021012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e64656429e42020202d20776865726520605260206a756467656d656e74732d636f756e7420287265676973747261722d636f756e742d626f756e6465642984202d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e2501202d204f6e652073746f72616765206d75746174696f6e2028636f6465632d7265616420604f285827202b205229602c20636f6465632d777269746520604f2858202b20522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e207365745f73756273041073756273645665633c28543a3a4163636f756e7449642c2044617461293e54902053657420746865207375622d6163636f756e7473206f66207468652073656e6465722e005901205061796d656e743a20416e79206167677265676174652062616c616e63652072657365727665642062792070726576696f757320607365745f73756273602063616c6c732077696c6c2062652072657475726e6564310120616e6420616e20616d6f756e7420605375624163636f756e744465706f736974602077696c6c20626520726573657276656420666f722065616368206974656d20696e206073756273602e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e00b4202d206073756273603a20546865206964656e74697479277320286e657729207375622d6163636f756e74732e002c2023203c7765696768743e34202d20604f2850202b20532960e82020202d20776865726520605060206f6c642d737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e88202d204174206d6f7374206f6e652062616c616e6365206f7065726174696f6e732e18202d2044423ae02020202d206050202b2053602073746f72616765206d75746174696f6e732028636f64656320636f6d706c657869747920604f2831296029c02020202d204f6e652073746f7261676520726561642028636f64656320636f6d706c657869747920604f28502960292ec42020202d204f6e652073746f726167652077726974652028636f64656320636f6d706c657869747920604f28532960292ed42020202d204f6e652073746f726167652d6578697374732028604964656e746974794f663a3a636f6e7461696e735f6b657960292e302023203c2f7765696768743e38636c6561725f6964656e7469747900483d0120436c65617220616e206163636f756e742773206964656e7469747920696e666f20616e6420616c6c207375622d6163636f756e747320616e642072657475726e20616c6c206465706f736974732e00f0205061796d656e743a20416c6c2072657365727665642062616c616e636573206f6e20746865206163636f756e74206172652072657475726e65642e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e009c20456d69747320604964656e74697479436c656172656460206966207375636365737366756c2e002c2023203c7765696768743e44202d20604f2852202b2053202b20582960d02020202d20776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e25012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e646564292e8c202d204f6e652062616c616e63652d756e72657365727665206f7065726174696f6e2ecc202d206032602073746f7261676520726561647320616e64206053202b2032602073746f726167652064656c6574696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e44726571756573745f6a756467656d656e7408247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e1c6d61785f66656554436f6d706163743c42616c616e63654f663c543e3e5c9820526571756573742061206a756467656d656e742066726f6d2061207265676973747261722e005901205061796d656e743a204174206d6f737420606d61785f666565602077696c6c20626520726573657276656420666f72207061796d656e7420746f2074686520726567697374726172206966206a756467656d656e741c20676976656e2e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e002101202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973207265717565737465642e5901202d20606d61785f666565603a20546865206d6178696d756d206665652074686174206d617920626520706169642e20546869732073686f756c64206a757374206265206175746f2d706f70756c617465642061733a0034206060606e6f636f6d70696c65bc2053656c663a3a7265676973747261727328292e676574287265675f696e646578292e756e7772617028292e666565102060606000a820456d69747320604a756467656d656e7452657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2858202b205229602e34202d204f6e65206576656e742e302023203c2f7765696768743e3863616e63656c5f7265717565737404247265675f696e64657838526567697374726172496e646578446c2043616e63656c20612070726576696f757320726571756573742e00fc205061796d656e743a20412070726576696f75736c79207265736572766564206465706f7369742069732072657475726e6564206f6e20737563636573732e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e004901202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206e6f206c6f6e676572207265717565737465642e00b020456d69747320604a756467656d656e74556e72657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e8c202d204f6e652073746f72616765206d75746174696f6e20604f2852202b205829602e30202d204f6e65206576656e74302023203c2f7765696768743e1c7365745f6665650814696e6465785c436f6d706163743c526567697374726172496e6465783e0c66656554436f6d706163743c42616c616e63654f663c543e3e341d0120536574207468652066656520726571756972656420666f722061206a756467656d656e7420746f206265207265717565737465642066726f6d2061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e58202d2060666565603a20746865206e6577206665652e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e333135202b2052202a20302e33323920c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e387365745f6163636f756e745f69640814696e6465785c436f6d706163743c526567697374726172496e6465783e0c6e657730543a3a4163636f756e74496434c0204368616e676520746865206163636f756e74206173736f63696174656420776974682061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e74202d20606e6577603a20746865206e6577206163636f756e742049442e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee4202d2042656e63686d61726b3a20382e383233202b2052202a20302e333220c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e287365745f6669656c64730814696e6465785c436f6d706163743c526567697374726172496e6465783e186669656c6473384964656e746974794669656c647334ac2053657420746865206669656c6420696e666f726d6174696f6e20666f722061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e1101202d20606669656c6473603a20746865206669656c64732074686174207468652072656769737472617220636f6e6365726e73207468656d73656c76657320776974682e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e343634202b2052202a20302e33323520c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e4470726f766964655f6a756467656d656e740c247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365246a756467656d656e745c4a756467656d656e743c42616c616e63654f663c543e3e4cbc2050726f766964652061206a756467656d656e7420666f7220616e206163636f756e742773206964656e746974792e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74b4206f6620746865207265676973747261722077686f736520696e64657820697320607265675f696e646578602e002501202d20607265675f696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206265696e67206d6164652e5901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e4d01202d20606a756467656d656e74603a20746865206a756467656d656e74206f662074686520726567697374726172206f6620696e64657820607265675f696e646578602061626f75742060746172676574602e009820456d69747320604a756467656d656e74476976656e60206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e88202d204f6e652062616c616e63652d7472616e73666572206f7065726174696f6e2e98202d20557020746f206f6e65206163636f756e742d6c6f6f6b7570206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2852202b205829602e34202d204f6e65206576656e742e302023203c2f7765696768743e346b696c6c5f6964656e7469747904187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654c45012052656d6f766520616e206163636f756e742773206964656e7469747920616e64207375622d6163636f756e7420696e666f726d6174696f6e20616e6420736c61736820746865206465706f736974732e006501205061796d656e743a2052657365727665642062616c616e6365732066726f6d20607365745f737562736020616e6420607365745f6964656e74697479602061726520736c617368656420616e642068616e646c656420627949012060536c617368602e20566572696669636174696f6e2072657175657374206465706f7369747320617265206e6f742072657475726e65643b20746865792073686f756c642062652063616e63656c6c656484206d616e75616c6c79207573696e67206063616e63656c5f72657175657374602e00fc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206d617463682060543a3a466f7263654f726967696e602e005901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e009820456d69747320604964656e746974794b696c6c656460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2852202b2053202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e74202d206053202b2032602073746f72616765206d75746174696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e1c6164645f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365106461746110446174611cb0204164642074686520676976656e206163636f756e7420746f207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656e616d655f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651064617461104461746110d020416c74657220746865206173736f636961746564206e616d65206f662074686520676976656e207375622d6163636f756e742e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656d6f76655f737562040c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651cc42052656d6f76652074686520676976656e206163636f756e742066726f6d207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e20717569745f7375620028902052656d6f7665207468652073656e6465722061732061207375622d6163636f756e742e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c206265207265706174726961746564b820746f207468652073656e64657220282a6e6f742a20746865206f726967696e616c206465706f7369746f72292e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206861766520612072656769737465726564402073757065722d6964656e746974792e004901204e4f54453a20546869732073686f756c64206e6f74206e6f726d616c6c7920626520757365642c206275742069732070726f766964656420696e207468652063617365207468617420746865206e6f6e2d150120636f6e74726f6c6c6572206f6620616e206163636f756e74206973206d616c6963696f75736c7920726567697374657265642061732061207375622d6163636f756e742e01282c4964656e7469747953657404244163636f756e7449640411012041206e616d652077617320736574206f72207265736574202877686963682077696c6c2072656d6f766520616c6c206a756467656d656e7473292e205c5b77686f5c5d3c4964656e74697479436c656172656408244163636f756e7449641c42616c616e63650415012041206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e205c5b77686f2c206465706f7369745c5d384964656e746974794b696c6c656408244163636f756e7449641c42616c616e6365040d012041206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e205c5b77686f2c206465706f7369745c5d484a756467656d656e7452657175657374656408244163636f756e74496438526567697374726172496e6465780405012041206a756467656d656e74207761732061736b65642066726f6d2061207265676973747261722e205c5b77686f2c207265676973747261725f696e6465785c5d504a756467656d656e74556e72657175657374656408244163636f756e74496438526567697374726172496e64657804f02041206a756467656d656e74207265717565737420776173207265747261637465642e205c5b77686f2c207265676973747261725f696e6465785c5d384a756467656d656e74476976656e08244163636f756e74496438526567697374726172496e6465780409012041206a756467656d656e742077617320676976656e2062792061207265676973747261722e205c5b7461726765742c207265676973747261725f696e6465785c5d3852656769737472617241646465640438526567697374726172496e64657804ac204120726567697374726172207761732061646465642e205c5b7265676973747261725f696e6465785c5d405375624964656e7469747941646465640c244163636f756e744964244163636f756e7449641c42616c616e63650455012041207375622d6964656e746974792077617320616464656420746f20616e206964656e7469747920616e6420746865206465706f73697420706169642e205c5b7375622c206d61696e2c206465706f7369745c5d485375624964656e7469747952656d6f7665640c244163636f756e744964244163636f756e7449641c42616c616e6365080d012041207375622d6964656e74697479207761732072656d6f7665642066726f6d20616e206964656e7469747920616e6420746865206465706f7369742066726565642e5c205c5b7375622c206d61696e2c206465706f7369745c5d485375624964656e746974795265766f6b65640c244163636f756e744964244163636f756e7449641c42616c616e6365081d012041207375622d6964656e746974792077617320636c65617265642c20616e642074686520676976656e206465706f7369742072657061747269617465642066726f6d207468652901206d61696e206964656e74697479206163636f756e7420746f20746865207375622d6964656e74697479206163636f756e742e205c5b7375622c206d61696e2c206465706f7369745c5d183042617369634465706f7369743042616c616e63654f663c543e400080c6a47e8d0300000000000000000004d82054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564206964656e746974792e304669656c644465706f7369743042616c616e63654f663c543e4000a031a95fe300000000000000000000042d012054686520616d6f756e742068656c64206f6e206465706f73697420706572206164646974696f6e616c206669656c6420666f7220612072656769737465726564206964656e746974792e445375624163636f756e744465706f7369743042616c616e63654f663c543e400080f420e6b5000000000000000000000c65012054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564207375626163636f756e742e20546869732073686f756c64206163636f756e7420666f7220746865206661637471012074686174206f6e652073746f72616765206974656d27732076616c75652077696c6c20696e637265617365206279207468652073697a65206f6620616e206163636f756e742049442c20616e642074686572652077696c6c206265290120616e6f746865722074726965206974656d2077686f73652076616c7565206973207468652073697a65206f6620616e206163636f756e7420494420706c75732033322062797465732e384d61785375624163636f756e74730c7533321064000000040d0120546865206d6178696d756d206e756d626572206f66207375622d6163636f756e747320616c6c6f77656420706572206964656e746966696564206163636f756e742e4c4d61784164646974696f6e616c4669656c64730c7533321064000000086501204d6178696d756d206e756d626572206f66206164646974696f6e616c206669656c64732074686174206d61792062652073746f72656420696e20616e2049442e204e656564656420746f20626f756e642074686520492f4fe020726571756972656420746f2061636365737320616e206964656e746974792c206275742063616e2062652070726574747920686967682e344d6178526567697374726172730c7533321014000000085101204d61786d696d756d206e756d626572206f66207265676973747261727320616c6c6f77656420696e207468652073797374656d2e204e656564656420746f20626f756e642074686520636f6d706c65786974797c206f662c20652e672e2c207570646174696e67206a756467656d656e74732e4048546f6f4d616e795375624163636f756e7473046020546f6f206d616e7920737562732d6163636f756e74732e204e6f74466f756e640454204163636f756e742069736e277420666f756e642e204e6f744e616d65640454204163636f756e742069736e2774206e616d65642e28456d707479496e646578043420456d70747920696e6465782e284665654368616e676564044020466565206973206368616e6765642e284e6f4964656e74697479044c204e6f206964656e7469747920666f756e642e3c537469636b794a756467656d656e74044820537469636b79206a756467656d656e742e384a756467656d656e74476976656e0444204a756467656d656e7420676976656e2e40496e76616c69644a756467656d656e74044c20496e76616c6964206a756467656d656e742e30496e76616c6964496e64657804582054686520696e64657820697320696e76616c69642e34496e76616c6964546172676574045c205468652074617267657420697320696e76616c69642e34546f6f4d616e794669656c6473047020546f6f206d616e79206164646974696f6e616c206669656c64732e44546f6f4d616e795265676973747261727304ec204d6178696d756d20616d6f756e74206f66207265676973747261727320726561636865642e2043616e6e6f742061646420616e79206d6f72652e38416c7265616479436c61696d65640474204163636f756e7420494420697320616c7265616479206e616d65642e184e6f7453756204742053656e646572206973206e6f742061207375622d6163636f756e742e204e6f744f776e6564048c205375622d6163636f756e742069736e2774206f776e65642062792073656e6465722e181c536f6369657479011c536f6369657479401c466f756e646572000030543a3a4163636f756e7449640400044820546865206669727374206d656d6265722e1452756c657300001c543a3a48617368040008510120412068617368206f66207468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e2043616e206f6e6c7920626520736574206f6e636520616e6454206f6e6c792062792074686520666f756e6465722e2843616e6469646174657301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e0400043901205468652063757272656e7420736574206f662063616e646964617465733b206269646465727320746861742061726520617474656d7074696e6720746f206265636f6d65206d656d626572732e4c53757370656e64656443616e6469646174657300010530543a3a4163636f756e744964e42842616c616e63654f663c542c20493e2c204269644b696e643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e2900040004842054686520736574206f662073757370656e6465642063616e646964617465732e0c506f7401003c42616c616e63654f663c542c20493e400000000000000000000000000000000004410120416d6f756e74206f66206f7572206163636f756e742062616c616e63652074686174206973207370656369666963616c6c7920666f7220746865206e65787420726f756e642773206269642873292e1048656164000030543a3a4163636f756e744964040004e820546865206d6f7374207072696d6172792066726f6d20746865206d6f737420726563656e746c7920617070726f766564206d656d626572732e1c4d656d626572730100445665633c543a3a4163636f756e7449643e04000494205468652063757272656e7420736574206f66206d656d626572732c206f7264657265642e4053757370656e6465644d656d6265727301010530543a3a4163636f756e74496410626f6f6c00040004782054686520736574206f662073757370656e646564206d656d626572732e104269647301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e040004e8205468652063757272656e7420626964732c2073746f726564206f726465726564206279207468652076616c7565206f6620746865206269642e20566f756368696e6700010530543a3a4163636f756e74496438566f756368696e6753746174757300040004e4204d656d626572732063757272656e746c7920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e1c5061796f75747301010530543a3a4163636f756e744964985665633c28543a3a426c6f636b4e756d6265722c2042616c616e63654f663c542c20493e293e000400044d012050656e64696e67207061796f7574733b206f72646572656420627920626c6f636b206e756d6265722c20776974682074686520616d6f756e7420746861742073686f756c642062652070616964206f75742e1c537472696b657301010530543a3a4163636f756e7449642c537472696b65436f756e7400100000000004dc20546865206f6e676f696e67206e756d626572206f66206c6f73696e6720766f746573206361737420627920746865206d656d6265722e14566f74657300020530543a3a4163636f756e74496430543a3a4163636f756e74496410566f746505040004d020446f75626c65206d61702066726f6d2043616e646964617465202d3e20566f746572202d3e20284d617962652920566f74652e20446566656e646572000030543a3a4163636f756e744964040004c42054686520646566656e64696e67206d656d6265722063757272656e746c79206265696e67206368616c6c656e6765642e34446566656e646572566f74657300010530543a3a4163636f756e74496410566f7465000400046020566f74657320666f722074686520646566656e6465722e284d61784d656d6265727301000c753332100000000004dc20546865206d6178206e756d626572206f66206d656d6265727320666f722074686520736f6369657479206174206f6e652074696d652e01300c626964041476616c75653c42616c616e63654f663c542c20493e84e020412075736572206f757473696465206f662074686520736f63696574792063616e206d616b6520612062696420666f7220656e7472792e003901205061796d656e743a206043616e6469646174654465706f736974602077696c6c20626520726573657276656420666f72206d616b696e672061206269642e2049742069732072657475726e6564f0207768656e2074686520626964206265636f6d65732061206d656d6265722c206f7220696620746865206269642063616c6c732060756e626964602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a5901202d206076616c7565603a2041206f6e652074696d65207061796d656e74207468652062696420776f756c64206c696b6520746f2072656365697665207768656e206a6f696e696e672074686520736f63696574792e002c2023203c7765696768743e5501204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520726573657276652944202d2053746f726167652052656164733aec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f284329c820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d2948202d2053746f72616765205772697465733a810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3a2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6820092d204f6e65206576656e7420666f72206e6577206269642efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e14756e626964040c706f730c7533324cd82041206269646465722063616e2072656d6f76652074686569722062696420666f7220656e74727920696e746f20736f63696574792e010120427920646f696e6720736f2c20746865792077696c6c20686176652074686569722063616e646964617465206465706f7369742072657475726e6564206f728420746865792077696c6c20756e766f75636820746865697220766f75636865722e00fc205061796d656e743a2054686520626964206465706f73697420697320756e7265736572766564206966207468652075736572206d6164652061206269642e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206269646465722e003020506172616d65746572733a1901202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2077616e747320746f20756e6269642e002c2023203c7765696768743eb0204b65793a204220286c656e206f662062696473292c2058202862616c616e636520756e72657365727665290d01202d204f6e652073746f72616765207265616420616e6420777269746520746f20726574726965766520616e64207570646174652074686520626964732e204f2842294501202d20456974686572206f6e6520756e726573657276652062616c616e636520616374696f6e204f285829206f72206f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2842202b205829302023203c2f7765696768743e14766f7563680c0c77686f30543a3a4163636f756e7449641476616c75653c42616c616e63654f663c542c20493e0c7469703c42616c616e63654f663c542c20493eb045012041732061206d656d6265722c20766f75636820666f7220736f6d656f6e6520746f206a6f696e20736f636965747920627920706c6163696e67206120626964206f6e20746865697220626568616c662e005501205468657265206973206e6f206465706f73697420726571756972656420746f20766f75636820666f722061206e6577206269642c206275742061206d656d6265722063616e206f6e6c7920766f75636820666f725d01206f6e652062696420617420612074696d652e2049662074686520626964206265636f6d657320612073757370656e6465642063616e64696461746520616e6420756c74696d6174656c792072656a65637465642062794101207468652073757370656e73696f6e206a756467656d656e74206f726967696e2c20746865206d656d6265722077696c6c2062652062616e6e65642066726f6d20766f756368696e6720616761696e2e005901204173206120766f756368696e67206d656d6265722c20796f752063616e20636c61696d206120746970206966207468652063616e6469646174652069732061636365707465642e2054686973207469702077696c6c51012062652070616964206173206120706f7274696f6e206f66207468652072657761726420746865206d656d6265722077696c6c207265636569766520666f72206a6f696e696e672074686520736f63696574792e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733acc202d206077686f603a2054686520757365722077686f20796f7520776f756c64206c696b6520746f20766f75636820666f722e5101202d206076616c7565603a2054686520746f74616c2072657761726420746f2062652070616964206265747765656e20796f7520616e64207468652063616e6469646174652069662074686579206265636f6d65642061206d656d62657220696e2074686520736f63696574792e4901202d2060746970603a20596f757220637574206f662074686520746f74616c206076616c756560207061796f7574207768656e207468652063616e64696461746520697320696e64756374656420696e746f15012074686520736f63696574792e2054697073206c6172676572207468616e206076616c7565602077696c6c206265207361747572617465642075706f6e207061796f75742e002c2023203c7765696768743e0101204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d626572732944202d2053746f726167652052656164733ac820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d29090120092d204f6e652073746f72616765207265616420746f20636865636b206d656d626572206973206e6f7420616c726561647920766f756368696e672e204f283129ec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f28432948202d2053746f72616765205772697465733a0d0120092d204f6e652073746f7261676520777269746520746f20696e7365727420766f756368696e672073746174757320746f20746865206d656d6265722e204f283129810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3ac020092d204f286c6f67204d292073656172636820746f20636865636b2073656e6465722069732061206d656d6265722e2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6020092d204f6e65206576656e7420666f7220766f7563682efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e1c756e766f756368040c706f730c753332442d01204173206120766f756368696e67206d656d6265722c20756e766f7563682061206269642e2054686973206f6e6c7920776f726b73207768696c6520766f7563686564207573657220697394206f6e6c792061206269646465722028616e64206e6f7420612063616e646964617465292e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206120766f756368696e67206d656d6265722e003020506172616d65746572733a2d01202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2073686f756c6420626520756e766f75636865642e002c2023203c7765696768743e54204b65793a204220286c656e206f662062696473290901202d204f6e652073746f726167652072656164204f28312920746f20636865636b20746865207369676e6572206973206120766f756368696e67206d656d6265722eec202d204f6e652073746f72616765206d757461746520746f20726574726965766520616e64207570646174652074686520626964732e204f28422994202d204f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f284229302023203c2f7765696768743e10766f7465082463616e6469646174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c617070726f766510626f6f6c4c882041732061206d656d6265722c20766f7465206f6e20612063616e6469646174652e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733a0d01202d206063616e646964617465603a205468652063616e646964617465207468617420746865206d656d62657220776f756c64206c696b6520746f20626964206f6e2ef4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265d82020202020202020202020202020617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743ebc204b65793a204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722e58202d204f6e65206163636f756e74206c6f6f6b75702e2d01202d204f6e652073746f726167652072656164204f28432920616e64204f2843292073656172636820746f20636865636b2074686174207573657220697320612063616e6469646174652ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204329302023203c2f7765696768743e34646566656e6465725f766f7465041c617070726f766510626f6f6c408c2041732061206d656d6265722c20766f7465206f6e2074686520646566656e6465722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733af4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265a420617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743e68202d204b65793a204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e007820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d29302023203c2f7765696768743e187061796f757400504501205472616e7366657220746865206669727374206d617475726564207061796f757420666f72207468652073656e64657220616e642072656d6f76652069742066726f6d20746865207265636f7264732e006901204e4f54453a20546869732065787472696e736963206e6565647320746f2062652063616c6c6564206d756c7469706c652074696d657320746f20636c61696d206d756c7469706c65206d617475726564207061796f7574732e002101205061796d656e743a20546865206d656d6265722077696c6c20726563656976652061207061796d656e7420657175616c20746f207468656972206669727374206d61747572656478207061796f757420746f20746865697220667265652062616c616e63652e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d62657220776974684c207061796f7574732072656d61696e696e672e002c2023203c7765696768743e1d01204b65793a204d20286c656e206f66206d656d62657273292c205020286e756d626572206f66207061796f75747320666f72206120706172746963756c6172206d656d626572292501202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b207369676e65722069732061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28502920746f2067657420616c6c207061796f75747320666f722061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28312920746f20676574207468652063757272656e7420626c6f636b206e756d6265722e8c202d204f6e652063757272656e6379207472616e736665722063616c6c2e204f2858291101202d204f6e652073746f72616765207772697465206f722072656d6f76616c20746f2075706461746520746865206d656d6265722773207061796f7574732e204f285029009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2050202b205829302023203c2f7765696768743e14666f756e640c1c666f756e64657230543a3a4163636f756e7449642c6d61785f6d656d626572730c7533321472756c65731c5665633c75383e4c4c20466f756e642074686520736f63696574792e00f0205468697320697320646f6e65206173206120646973637265746520616374696f6e20696e206f7264657220746f20616c6c6f7720666f72207468651901206d6f64756c6520746f20626520696e636c7564656420696e746f20612072756e6e696e6720636861696e20616e642063616e206f6e6c7920626520646f6e65206f6e63652e001d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f466f756e6465725365744f726967696e5f2e003020506172616d65746572733a1901202d2060666f756e64657260202d20546865206669727374206d656d62657220616e642068656164206f6620746865206e65776c7920666f756e64656420736f63696574792e1501202d20606d61785f6d656d6265727360202d2054686520696e697469616c206d6178206e756d626572206f66206d656d6265727320666f722074686520736f63696574792ef4202d206072756c657360202d205468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e002c2023203c7765696768743ee0202d2054776f2073746f72616765206d75746174657320746f207365742060486561646020616e642060466f756e646572602e204f283129f4202d204f6e652073746f7261676520777269746520746f2061646420746865206669727374206d656d62657220746f20736f63696574792e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e1c756e666f756e6400348c20416e6e756c2074686520666f756e64696e67206f662074686520736f63696574792e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205369676e65642c20616e6420746865207369676e696e67206163636f756e74206d75737420626520626f74685901207468652060466f756e6465726020616e6420746865206048656164602e205468697320696d706c6965732074686174206974206d6179206f6e6c7920626520646f6e65207768656e207468657265206973206f6e6520206d656d6265722e002c2023203c7765696768743e68202d2054776f2073746f72616765207265616473204f2831292e78202d20466f75722073746f726167652072656d6f76616c73204f2831292e34202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e586a756467655f73757370656e6465645f6d656d626572080c77686f30543a3a4163636f756e7449641c666f726769766510626f6f6c6c2d0120416c6c6f772073757370656e73696f6e206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e646564206d656d6265722e00590120496620612073757370656e646564206d656d62657220697320666f72676976656e2c2077652073696d706c7920616464207468656d206261636b2061732061206d656d6265722c206e6f7420616666656374696e67cc20616e79206f6620746865206578697374696e672073746f72616765206974656d7320666f722074686174206d656d6265722e00490120496620612073757370656e646564206d656d6265722069732072656a65637465642c2072656d6f766520616c6c206173736f6369617465642073746f72616765206974656d732c20696e636c7564696e670101207468656972207061796f7574732c20616e642072656d6f766520616e7920766f7563686564206269647320746865792063757272656e746c7920686176652e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ab4202d206077686f60202d205468652073757370656e646564206d656d62657220746f206265206a75646765642e3501202d2060666f726769766560202d204120626f6f6c65616e20726570726573656e74696e672077686574686572207468652073757370656e73696f6e206a756467656d656e74206f726967696e2501202020202020202020202020202020666f726769766573202860747275656029206f722072656a6563747320286066616c7365602920612073757370656e646564206d656d6265722e002c2023203c7765696768743ea4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d6265727329f8202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e646564206d656d6265722e204f2831297101202d20557020746f206f6e652073746f72616765207772697465204f284d292077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d626572206261636b20746f20736f63696574792ef8202d20557020746f20332073746f726167652072656d6f76616c73204f28312920746f20636c65616e20757020612072656d6f766564206d656d6265722e4501202d20557020746f206f6e652073746f72616765207772697465204f2842292077697468204f2842292073656172636820746f2072656d6f766520766f7563686564206269642066726f6d20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e70202d204f6e652073746f726167652072656d6f76616c2e204f2831297c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204229302023203c2f7765696768743e646a756467655f73757370656e6465645f63616e646964617465080c77686f30543a3a4163636f756e744964246a756467656d656e74244a756467656d656e74a0350120416c6c6f772073757370656e646564206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e6465642063616e6469646174652e005d0120496620746865206a756467656d656e742069732060417070726f7665602c20776520616464207468656d20746f20736f63696574792061732061206d656d62657220776974682074686520617070726f70726961746574207061796d656e7420666f72206a6f696e696e6720736f63696574792e00550120496620746865206a756467656d656e74206973206052656a656374602c2077652065697468657220736c61736820746865206465706f736974206f6620746865206269642c20676976696e67206974206261636b110120746f2074686520736f63696574792074726561737572792c206f722077652062616e2074686520766f75636865722066726f6d20766f756368696e6720616761696e2e005d0120496620746865206a756467656d656e7420697320605265626964602c20776520707574207468652063616e646964617465206261636b20696e207468652062696420706f6f6c20616e64206c6574207468656d20676f94207468726f7567682074686520696e64756374696f6e2070726f6365737320616761696e2e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ac0202d206077686f60202d205468652073757370656e6465642063616e64696461746520746f206265206a75646765642ec4202d20606a756467656d656e7460202d2060417070726f7665602c206052656a656374602c206f7220605265626964602e002c2023203c7765696768743ef4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520616374696f6e29f0202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e6465642063616e6469646174652ec8202d204f6e652073746f726167652072656d6f76616c206f66207468652073757370656e6465642063616e6469646174652e40202d20417070726f7665204c6f676963150120092d204f6e652073746f72616765207265616420746f206765742074686520617661696c61626c6520706f7420746f2070617920757365727320776974682e204f283129dc20092d204f6e652073746f7261676520777269746520746f207570646174652074686520617661696c61626c6520706f742e204f283129e820092d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f283129b420092d204f6e652073746f72616765207265616420746f2067657420616c6c206d656d626572732e204f284d29a020092d20557020746f206f6e6520756e726573657276652063757272656e637920616374696f6e2eb020092d20557020746f2074776f206e65772073746f726167652077726974657320746f207061796f7574732e4d0120092d20557020746f206f6e652073746f726167652077726974652077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d62657220746f20736f63696574792e3c202d2052656a656374204c6f676963dc20092d20557020746f206f6e6520726570617472696174652072657365727665642063757272656e637920616374696f6e2e204f2858292d0120092d20557020746f206f6e652073746f7261676520777269746520746f2062616e2074686520766f756368696e67206d656d6265722066726f6d20766f756368696e6720616761696e2e38202d205265626964204c6f676963410120092d2053746f72616765206d75746174652077697468204f286c6f672042292062696e6172792073656172636820746f20706c616365207468652075736572206261636b20696e746f20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e5c202d204f6e652073746f726167652072656d6f76616c2e7c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2042202b205829302023203c2f7765696768743e3c7365745f6d61785f6d656d62657273040c6d61780c753332381d0120416c6c6f777320726f6f74206f726967696e20746f206368616e676520746865206d6178696d756d206e756d626572206f66206d656d6265727320696e20736f63696574792eb4204d6178206d656d6265727368697020636f756e74206d7573742062652067726561746572207468616e20312e00dc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d205f524f4f545f2e003020506172616d65746572733ae4202d20606d617860202d20546865206d6178696d756d206e756d626572206f66206d656d6265727320666f722074686520736f63696574792e002c2023203c7765696768743eb0202d204f6e652073746f7261676520777269746520746f2075706461746520746865206d61782e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e01401c466f756e64656404244163636f756e74496404e82054686520736f636965747920697320666f756e6465642062792074686520676976656e206964656e746974792e205c5b666f756e6465725c5d0c42696408244163636f756e7449641c42616c616e63650861012041206d656d6265727368697020626964206a7573742068617070656e65642e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e64207468656972206f666665729c20697320746865207365636f6e642e205c5b63616e6469646174655f69642c206f666665725c5d14566f7563680c244163636f756e7449641c42616c616e6365244163636f756e7449640861012041206d656d6265727368697020626964206a7573742068617070656e656420627920766f756368696e672e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e647901207468656972206f6666657220697320746865207365636f6e642e2054686520766f756368696e67207061727479206973207468652074686972642e205c5b63616e6469646174655f69642c206f666665722c20766f756368696e675c5d244175746f556e62696404244163636f756e7449640419012041205c5b63616e6469646174655c5d207761732064726f70706564202864756520746f20616e20657863657373206f66206269647320696e207468652073797374656d292e14556e62696404244163636f756e74496404c02041205c5b63616e6469646174655c5d207761732064726f70706564202862792074686569722072657175657374292e1c556e766f75636804244163636f756e7449640409012041205c5b63616e6469646174655c5d207761732064726f70706564202862792072657175657374206f662077686f20766f756368656420666f72207468656d292e20496e64756374656408244163636f756e744964385665633c4163636f756e7449643e08590120412067726f7570206f662063616e646964617465732068617665206265656e20696e6475637465642e205468652062617463682773207072696d617279206973207468652066697273742076616c75652c20746865d420626174636820696e2066756c6c20697320746865207365636f6e642e205c5b7072696d6172792c2063616e646964617465735c5d6053757370656e6465644d656d6265724a756467656d656e7408244163636f756e74496410626f6f6c04d020412073757370656e646564206d656d62657220686173206265656e206a75646765642e205c5b77686f2c206a75646765645c5d4843616e64696461746553757370656e64656404244163636f756e744964048c2041205c5b63616e6469646174655c5d20686173206265656e2073757370656e6465643c4d656d62657253757370656e64656404244163636f756e74496404802041205c5b6d656d6265725c5d20686173206265656e2073757370656e646564284368616c6c656e67656404244163636f756e74496404842041205c5b6d656d6265725c5d20686173206265656e206368616c6c656e67656410566f74650c244163636f756e744964244163636f756e74496410626f6f6c04c8204120766f746520686173206265656e20706c61636564205c5b63616e6469646174652c20766f7465722c20766f74655c5d30446566656e646572566f746508244163636f756e74496410626f6f6c04f8204120766f746520686173206265656e20706c6163656420666f72206120646566656e64696e67206d656d626572205c5b766f7465722c20766f74655c5d344e65774d61784d656d62657273040c75333204a02041206e6577205c5b6d61785c5d206d656d62657220636f756e7420686173206265656e2073657424556e666f756e64656404244163636f756e744964048820536f636965747920697320756e666f756e6465642e205c5b666f756e6465725c5d1c4465706f736974041c42616c616e636504f820536f6d652066756e64732077657265206465706f736974656420696e746f2074686520736f6369657479206163636f756e742e205c5b76616c75655c5d1c4043616e6469646174654465706f7369743c42616c616e63654f663c542c20493e400080c6a47e8d0300000000000000000004fc20546865206d696e696d756d20616d6f756e74206f662061206465706f73697420726571756972656420666f7220612062696420746f206265206d6164652e4857726f6e6753696465446564756374696f6e3c42616c616e63654f663c542c20493e400080f420e6b5000000000000000000000855012054686520616d6f756e74206f662074686520756e70616964207265776172642074686174206765747320646564756374656420696e207468652063617365207468617420656974686572206120736b6570746963c020646f65736e277420766f7465206f7220736f6d656f6e6520766f74657320696e207468652077726f6e67207761792e284d6178537472696b65730c753332100a00000008750120546865206e756d626572206f662074696d65732061206d656d626572206d617920766f7465207468652077726f6e672077617920286f72206e6f7420617420616c6c2c207768656e207468657920617265206120736b65707469632978206265666f72652074686579206265636f6d652073757370656e6465642e2c506572696f645370656e643c42616c616e63654f663c542c20493e400000c52ebca2b1000000000000000000042d012054686520616d6f756e74206f6620696e63656e7469766520706169642077697468696e206561636820706572696f642e20446f65736e277420696e636c75646520566f7465725469702e38526f746174696f6e506572696f6438543a3a426c6f636b4e756d626572100077010004110120546865206e756d626572206f6620626c6f636b73206265747765656e2063616e6469646174652f6d656d6265727368697020726f746174696f6e20706572696f64732e3c4368616c6c656e6765506572696f6438543a3a426c6f636b4e756d626572108013030004d020546865206e756d626572206f6620626c6f636b73206265747765656e206d656d62657273686970206368616c6c656e6765732e204d6f64756c654964204d6f64756c6549642070792f736f63696504682054686520736f636965746965732773206d6f64756c65206964482c426164506f736974696f6e049020416e20696e636f727265637420706f736974696f6e207761732070726f76696465642e244e6f744d656d62657204582055736572206973206e6f742061206d656d6265722e34416c72656164794d656d6265720468205573657220697320616c72656164792061206d656d6265722e2453757370656e646564044c20557365722069732073757370656e6465642e304e6f7453757370656e646564045c2055736572206973206e6f742073757370656e6465642e204e6f5061796f7574044c204e6f7468696e6720746f207061796f75742e38416c7265616479466f756e646564046420536f636965747920616c726561647920666f756e6465642e3c496e73756666696369656e74506f74049c204e6f7420656e6f75676820696e20706f7420746f206163636570742063616e6469646174652e3c416c7265616479566f756368696e6704e8204d656d62657220697320616c726561647920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e2e2c4e6f74566f756368696e670460204d656d626572206973206e6f7420766f756368696e672e104865616404942043616e6e6f742072656d6f7665207468652068656164206f662074686520636861696e2e1c466f756e646572046c2043616e6e6f742072656d6f76652074686520666f756e6465722e28416c7265616479426964047420557365722068617320616c7265616479206d6164652061206269642e40416c726561647943616e6469646174650474205573657220697320616c726561647920612063616e6469646174652e304e6f7443616e64696461746504642055736572206973206e6f7420612063616e6469646174652e284d61784d656d62657273048420546f6f206d616e79206d656d6265727320696e2074686520736f63696574792e284e6f74466f756e646572047c205468652063616c6c6572206973206e6f742074686520666f756e6465722e1c4e6f74486561640470205468652063616c6c6572206973206e6f742074686520686561642e19205265636f7665727901205265636f766572790c2c5265636f76657261626c6500010530543a3a4163636f756e744964e85265636f76657279436f6e6669673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e0004000409012054686520736574206f66207265636f76657261626c65206163636f756e747320616e64207468656972207265636f7665727920636f6e66696775726174696f6e2e404163746976655265636f76657269657300020530543a3a4163636f756e74496430543a3a4163636f756e744964e84163746976655265636f766572793c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e050400106820416374697665207265636f7665727920617474656d7074732e001501204669727374206163636f756e7420697320746865206163636f756e7420746f206265207265636f76657265642c20616e6420746865207365636f6e64206163636f756e74ac20697320746865207573657220747279696e6720746f207265636f76657220746865206163636f756e742e1450726f787900010230543a3a4163636f756e74496430543a3a4163636f756e7449640004000c9020546865206c697374206f6620616c6c6f7765642070726f7879206163636f756e74732e00f8204d61702066726f6d2074686520757365722077686f2063616e2061636365737320697420746f20746865207265636f7665726564206163636f756e742e01243061735f7265636f7665726564081c6163636f756e7430543a3a4163636f756e7449641063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e34a42053656e6420612063616c6c207468726f7567682061207265636f7665726564206163636f756e742e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a2501202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f752077616e7420746f206d616b6520612063616c6c206f6e2d626568616c662d6f662e0101202d206063616c6c603a205468652063616c6c20796f752077616e7420746f206d616b65207769746820746865207265636f7665726564206163636f756e742e002c2023203c7765696768743e94202d2054686520776569676874206f6620746865206063616c6c60202b2031302c3030302e0901202d204f6e652073746f72616765206c6f6f6b757020746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e347365745f7265636f766572656408106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e744964341d0120416c6c6f7720524f4f5420746f2062797061737320746865207265636f766572792070726f6365737320616e642073657420616e20612072657363756572206163636f756e747420666f722061206c6f7374206163636f756e74206469726563746c792e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f524f4f545f2e003020506172616d65746572733ab8202d20606c6f7374603a2054686520226c6f7374206163636f756e742220746f206265207265636f76657265642e1d01202d206072657363756572603a20546865202272657363756572206163636f756e74222077686963682063616e2063616c6c20617320746865206c6f7374206163636f756e742e002c2023203c7765696768743e64202d204f6e652073746f72616765207772697465204f28312930202d204f6e65206576656e74302023203c2f7765696768743e3c6372656174655f7265636f766572790c1c667269656e6473445665633c543a3a4163636f756e7449643e247468726573686f6c640c7531363064656c61795f706572696f6438543a3a426c6f636b4e756d6265726c5d01204372656174652061207265636f7665727920636f6e66696775726174696f6e20666f7220796f7572206163636f756e742e2054686973206d616b657320796f7572206163636f756e74207265636f76657261626c652e003101205061796d656e743a2060436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732062616c616e636549012077696c6c20626520726573657276656420666f722073746f72696e6720746865207265636f7665727920636f6e66696775726174696f6e2e2054686973206465706f7369742069732072657475726e6564bc20696e2066756c6c207768656e2074686520757365722063616c6c73206072656d6f76655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2501202d2060667269656e6473603a2041206c697374206f6620667269656e647320796f7520747275737420746f20766f75636820666f72207265636f7665727920617474656d7074732ed420202053686f756c64206265206f72646572656420616e6420636f6e7461696e206e6f206475706c69636174652076616c7565732e3101202d20607468726573686f6c64603a20546865206e756d626572206f6620667269656e64732074686174206d75737420766f75636820666f722061207265636f7665727920617474656d70741d012020206265666f726520746865206163636f756e742063616e206265207265636f76657265642e2053686f756c64206265206c657373207468616e206f7220657175616c20746f94202020746865206c656e677468206f6620746865206c697374206f6620667269656e64732e3d01202d206064656c61795f706572696f64603a20546865206e756d626572206f6620626c6f636b732061667465722061207265636f7665727920617474656d707420697320696e697469616c697a6564e820202074686174206e6565647320746f2070617373206265666f726520746865206163636f756e742063616e206265207265636f76657265642e002c2023203c7765696768743e68202d204b65793a204620286c656e206f6620667269656e6473292d01202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973206e6f7420616c7265616479207265636f76657261626c652e204f2831292eec202d204120636865636b20746861742074686520667269656e6473206c69737420697320736f7274656420616e6420756e697175652e204f2846299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f2858299c202d204f6e652073746f726167652077726974652e204f2831292e20436f646563204f2846292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e44696e6974696174655f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496458ec20496e697469617465207468652070726f6365737320666f72207265636f766572696e672061207265636f76657261626c65206163636f756e742e001d01205061796d656e743a20605265636f766572794465706f736974602062616c616e63652077696c6c20626520726573657276656420666f7220696e6974696174696e67207468652501207265636f766572792070726f636573732e2054686973206465706f7369742077696c6c20616c7761797320626520726570617472696174656420746f20746865206163636f756e74b820747279696e6720746f206265207265636f76657265642e205365652060636c6f73655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e2054686973206163636f756e7401012020206e6565647320746f206265207265636f76657261626c652028692e652e20686176652061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743ef8202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973207265636f76657261626c652e204f2846295101202d204f6e652073746f72616765207265616420746f20636865636b20746861742074686973207265636f766572792070726f63657373206861736e277420616c726561647920737461727465642e204f2831299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f285829e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831296c202d204f6e652073746f726167652077726974652e204f2831292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e38766f7563685f7265636f7665727908106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e74496464290120416c6c6f7720612022667269656e6422206f662061207265636f76657261626c65206163636f756e7420746f20766f75636820666f7220616e20616374697665207265636f76657279682070726f6365737320666f722074686174206163636f756e742e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d75737420626520612022667269656e64227420666f7220746865207265636f76657261626c65206163636f756e742e003020506172616d65746572733ad4202d20606c6f7374603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f2072657363756520746865206c6f7374206163636f756e74207468617420796f755420202077616e7420746f20766f75636820666f722e0025012054686520636f6d62696e6174696f6e206f662074686573652074776f20706172616d6574657273206d75737420706f696e7420746f20616e20616374697665207265636f76657279242070726f636573732e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629ec202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c6572206973206120667269656e642e204f286c6f6746291d01202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c657220686173206e6f7420616c726561647920766f75636865642e204f286c6f6756299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e00a420546f74616c20436f6d706c65786974793a204f2846202b206c6f6746202b2056202b206c6f675629302023203c2f7765696768743e38636c61696d5f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496450f420416c6c6f772061207375636365737366756c207265736375657220746f20636c61696d207468656972207265636f7665726564206163636f756e742e002d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061202272657363756572221d012077686f20686173207375636365737366756c6c7920636f6d706c6574656420746865206163636f756e74207265636f766572792070726f636573733a20636f6c6c6563746564310120607468726573686f6c6460206f72206d6f726520766f75636865732c20776169746564206064656c61795f706572696f646020626c6f636b732073696e636520696e6974696174696f6e2e003020506172616d65746572733a2d01202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f20636c61696d20686173206265656e207375636365737366756c6c79502020207265636f766572656420627920796f752e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205629302023203c2f7765696768743e38636c6f73655f7265636f76657279041c7265736375657230543a3a4163636f756e7449645015012041732074686520636f6e74726f6c6c6572206f662061207265636f76657261626c65206163636f756e742c20636c6f736520616e20616374697665207265636f76657279682070726f6365737320666f7220796f7572206163636f756e742e002101205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e2c20746865207265636f76657261626c65206163636f756e742077696c6c2072656365697665f820746865207265636f76657279206465706f73697420605265636f766572794465706f7369746020706c616365642062792074686520726573637565722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061f0207265636f76657261626c65206163636f756e74207769746820616e20616374697665207265636f766572792070726f6365737320666f722069742e003020506172616d65746572733a1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f207265736375652074686973207265636f76657261626c65206163636f756e742e002c2023203c7765696768743e84204b65793a205620286c656e206f6620766f756368696e6720667269656e6473293d01202d204f6e652073746f7261676520726561642f72656d6f766520746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629c0202d204f6e652062616c616e63652063616c6c20746f20726570617472696174652072657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2856202b205829302023203c2f7765696768743e3c72656d6f76655f7265636f7665727900545d012052656d6f766520746865207265636f766572792070726f6365737320666f7220796f7572206163636f756e742e205265636f7665726564206163636f756e747320617265207374696c6c2061636365737369626c652e001501204e4f54453a205468652075736572206d757374206d616b65207375726520746f2063616c6c2060636c6f73655f7265636f7665727960206f6e20616c6c206163746976650901207265636f7665727920617474656d707473206265666f72652063616c6c696e6720746869732066756e6374696f6e20656c73652069742077696c6c206661696c2e002501205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e20746865207265636f76657261626c65206163636f756e742077696c6c20756e7265736572766598207468656972207265636f7665727920636f6e66696775726174696f6e206465706f7369742ef4202860436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732900050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061e4207265636f76657261626c65206163636f756e742028692e652e206861732061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743e60204b65793a204620286c656e206f6620667269656e6473292901202d204f6e652073746f72616765207265616420746f206765742074686520707265666978206974657261746f7220666f7220616374697665207265636f7665726965732e204f2831293901202d204f6e652073746f7261676520726561642f72656d6f766520746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846299c202d204f6e652062616c616e63652063616c6c20746f20756e72657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e4063616e63656c5f7265636f7665726564041c6163636f756e7430543a3a4163636f756e7449642ce02043616e63656c20746865206162696c69747920746f20757365206061735f7265636f76657265646020666f7220606163636f756e74602e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a1901202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f75206172652061626c6520746f2063616c6c206f6e2d626568616c662d6f662e002c2023203c7765696768743e1101202d204f6e652073746f72616765206d75746174696f6e20746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e01183c5265636f766572794372656174656404244163636f756e74496404dc2041207265636f766572792070726f6365737320686173206265656e2073657420757020666f7220616e205c5b6163636f756e745c5d2e445265636f76657279496e6974696174656408244163636f756e744964244163636f756e744964082d012041207265636f766572792070726f6365737320686173206265656e20696e6974696174656420666f72206c6f7374206163636f756e742062792072657363756572206163636f756e742e48205c5b6c6f73742c20726573637565725c5d3c5265636f76657279566f75636865640c244163636f756e744964244163636f756e744964244163636f756e744964085d012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20766f756368656420666f722062792073656e6465722e68205c5b6c6f73742c20726573637565722c2073656e6465725c5d385265636f76657279436c6f73656408244163636f756e744964244163636f756e7449640821012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20636c6f7365642e48205c5b6c6f73742c20726573637565725c5d404163636f756e745265636f766572656408244163636f756e744964244163636f756e744964080501204c6f7374206163636f756e7420686173206265656e207375636365737366756c6c79207265636f76657265642062792072657363756572206163636f756e742e48205c5b6c6f73742c20726573637565725c5d3c5265636f7665727952656d6f76656404244163636f756e74496404e02041207265636f766572792070726f6365737320686173206265656e2072656d6f76656420666f7220616e205c5b6163636f756e745c5d2e1044436f6e6669674465706f736974426173653042616c616e63654f663c543e4000406352bfc60100000000000000000004550120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e4c467269656e644465706f736974466163746f723042616c616e63654f663c543e4000203d88792d000000000000000000000469012054686520616d6f756e74206f662063757272656e6379206e656564656420706572206164646974696f6e616c2075736572207768656e206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e284d6178467269656e64730c753136080900040d0120546865206d6178696d756d20616d6f756e74206f6620667269656e647320616c6c6f77656420696e2061207265636f7665727920636f6e66696775726174696f6e2e3c5265636f766572794465706f7369743042616c616e63654f663c543e4000406352bfc601000000000000000000041d0120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72207374617274696e672061207265636f766572792e40284e6f74416c6c6f77656404f42055736572206973206e6f7420616c6c6f77656420746f206d616b6520612063616c6c206f6e20626568616c66206f662074686973206163636f756e74345a65726f5468726573686f6c640490205468726573686f6c64206d7573742062652067726561746572207468616e207a65726f404e6f74456e6f756768467269656e647304d420467269656e6473206c697374206d7573742062652067726561746572207468616e207a65726f20616e64207468726573686f6c64284d6178467269656e647304ac20467269656e6473206c697374206d757374206265206c657373207468616e206d617820667269656e6473244e6f74536f7274656404cc20467269656e6473206c697374206d75737420626520736f7274656420616e642066726565206f66206475706c696361746573384e6f745265636f76657261626c6504a02054686973206163636f756e74206973206e6f742073657420757020666f72207265636f7665727948416c72656164795265636f76657261626c6504b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f7665727938416c72656164795374617274656404e02041207265636f766572792070726f636573732068617320616c7265616479207374617274656420666f722074686973206163636f756e74284e6f745374617274656404d02041207265636f766572792070726f6365737320686173206e6f74207374617274656420666f7220746869732072657363756572244e6f74467269656e6404ac2054686973206163636f756e74206973206e6f74206120667269656e642077686f2063616e20766f7563682c44656c6179506572696f64041d012054686520667269656e64206d757374207761697420756e74696c207468652064656c617920706572696f6420746f20766f75636820666f722074686973207265636f7665727938416c7265616479566f756368656404c0205468697320757365722068617320616c726561647920766f756368656420666f722074686973207265636f76657279245468726573686f6c6404ec20546865207468726573686f6c6420666f72207265636f766572696e672074686973206163636f756e7420686173206e6f74206265656e206d65742c5374696c6c41637469766504010120546865726520617265207374696c6c20616374697665207265636f7665727920617474656d7074732074686174206e65656420746f20626520636c6f736564204f766572666c6f77049c2054686572652077617320616e206f766572666c6f7720696e20612063616c63756c6174696f6e30416c726561647950726f787904b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f766572791a1c56657374696e67011c56657374696e67041c56657374696e6700010230543a3a4163636f756e744964a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e00040004d820496e666f726d6174696f6e20726567617264696e67207468652076657374696e67206f66206120676976656e206163636f756e742e011010766573740034bc20556e6c6f636b20616e79207665737465642066756e6473206f66207468652073656e646572206163636f756e742e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652066756e6473207374696c6c68206c6f636b656420756e6465722074686973206d6f64756c652e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20322052656164732c203220577269746573fc20202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d010120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d302023203c2f7765696768743e28766573745f6f7468657204187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653cbc20556e6c6f636b20616e79207665737465642066756e6473206f662061206074617267657460206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501202d2060746172676574603a20546865206163636f756e742077686f7365207665737465642066756e64732073686f756c6420626520756e6c6f636b65642e204d75737420686176652066756e6473207374696c6c68206c6f636b656420756e6465722074686973206d6f64756c652e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c203320577269746573f420202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e74f820202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e74302023203c2f7765696768743e3c7665737465645f7472616e7366657208187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e406820437265617465206120766573746564207472616e736665722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e001501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c2033205772697465733d0120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745d410120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745d302023203c2f7765696768743e54666f7263655f7665737465645f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e446420466f726365206120766573746564207472616e736665722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00ec202d2060736f75726365603a20546865206163636f756e742077686f73652066756e64732073686f756c64206265207472616e736665727265642e1501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20342052656164732c203420577269746573350120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74390120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74302023203c2f7765696768743e01083856657374696e675570646174656408244163636f756e7449641c42616c616e63650c59012054686520616d6f756e742076657374656420686173206265656e20757064617465642e205468697320636f756c6420696e646963617465206d6f72652066756e64732061726520617661696c61626c652e2054686519012062616c616e636520676976656e2069732074686520616d6f756e74207768696368206973206c65667420756e7665737465642028616e642074687573206c6f636b6564292e58205c5b6163636f756e742c20756e7665737465645c5d4056657374696e67436f6d706c6574656404244163636f756e744964041d0120416e205c5b6163636f756e745c5d20686173206265636f6d652066756c6c79207665737465642e204e6f20667572746865722076657374696e672063616e2068617070656e2e04444d696e5665737465645472616e736665723042616c616e63654f663c543e400000c16ff28623000000000000000000041d0120546865206d696e696d756d20616d6f756e7420746f206265207472616e7366657272656420746f206372656174652061206e65772076657374696e67207363686564756c652e0c284e6f7456657374696e67048820546865206163636f756e7420676976656e206973206e6f742076657374696e672e5c4578697374696e6756657374696e675363686564756c65045d0120416e206578697374696e672076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e7420746861742063616e6e6f7420626520636c6f6262657265642e24416d6f756e744c6f7704090120416d6f756e74206265696e67207472616e7366657272656420697320746f6f206c6f7720746f2063726561746520612076657374696e67207363686564756c652e1b245363686564756c657201245363686564756c65720c184167656e646101010538543a3a426c6f636b4e756d62657271015665633c4f7074696f6e3c5363686564756c65643c3c5420617320436f6e6669673e3a3a43616c6c2c20543a3a426c6f636b4e756d6265722c20543a3a0a50616c6c6574734f726967696e2c20543a3a4163636f756e7449643e3e3e000400044d01204974656d7320746f2062652065786563757465642c20696e64657865642062792074686520626c6f636b206e756d626572207468617420746865792073686f756c64206265206578656375746564206f6e2e184c6f6f6b75700001051c5665633c75383e6c5461736b416464726573733c543a3a426c6f636b4e756d6265723e000400040101204c6f6f6b75702066726f6d206964656e7469747920746f2074686520626c6f636b206e756d62657220616e6420696e646578206f6620746865207461736b2e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e0118207363686564756c6510107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e287420416e6f6e796d6f75736c79207363686564756c652061207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7390202d2042617365205765696768743a2032322e3239202b202e313236202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64615020202020202d2057726974653a204167656e64613d01202d2057696c6c20757365206261736520776569676874206f662032352077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e1863616e63656c08107768656e38543a3a426c6f636b4e756d62657214696e6465780c75333228982043616e63656c20616e20616e6f6e796d6f75736c79207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032322e3135202b20322e383639202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64617020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f6e616d6564140869641c5665633c75383e107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e285c205363686564756c652061206e616d6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c738c202d2042617365205765696768743a2032392e36202b202e313539202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704d01202d2057696c6c20757365206261736520776569676874206f662033352077686963682073686f756c6420626520676f6f6420666f72206d6f7265207468616e203330207363686564756c65642063616c6c73302023203c2f7765696768743e3063616e63656c5f6e616d6564040869641c5665633c75383e287c2043616e63656c2061206e616d6564207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032342e3931202b20322e393037202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f61667465721014616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e14ac20416e6f6e796d6f75736c79207363686564756c652061207461736b20616674657220612064656c61792e002c2023203c7765696768743e582053616d65206173205b607363686564756c65605d2e302023203c2f7765696768743e507363686564756c655f6e616d65645f6166746572140869641c5665633c75383e14616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e1494205363686564756c652061206e616d6564207461736b20616674657220612064656c61792e002c2023203c7765696768743e702053616d65206173205b607363686564756c655f6e616d6564605d2e302023203c2f7765696768743e010c245363686564756c6564082c426c6f636b4e756d6265720c7533320494205363686564756c656420736f6d65207461736b2e205c5b7768656e2c20696e6465785c5d2043616e63656c6564082c426c6f636b4e756d6265720c75333204902043616e63656c656420736f6d65207461736b2e205c5b7768656e2c20696e6465785c5d28446973706174636865640c605461736b416464726573733c426c6f636b4e756d6265723e3c4f7074696f6e3c5665633c75383e3e384469737061746368526573756c7404ac204469737061746368656420736f6d65207461736b2e205c5b7461736b2c2069642c20726573756c745c5d0010404661696c6564546f5363686564756c650468204661696c656420746f207363686564756c6520612063616c6c204e6f74466f756e6404802043616e6e6f742066696e6420746865207363686564756c65642063616c6c2e5c546172676574426c6f636b4e756d626572496e5061737404a820476976656e2074617267657420626c6f636b206e756d62657220697320696e2074686520706173742e4852657363686564756c654e6f4368616e676504f42052657363686564756c65206661696c6564206265636175736520697420646f6573206e6f74206368616e6765207363686564756c65642074696d652e1c1450726f7879011450726f7879081c50726f7869657301010530543a3a4163636f756e7449644501285665633c50726f7879446566696e6974696f6e3c543a3a4163636f756e7449642c20543a3a50726f7879547970652c20543a3a426c6f636b4e756d6265723e3e2c0a2042616c616e63654f663c543e29004400000000000000000000000000000000000845012054686520736574206f66206163636f756e742070726f786965732e204d61707320746865206163636f756e74207768696368206861732064656c65676174656420746f20746865206163636f756e7473210120776869636820617265206265696e672064656c65676174656420746f2c20746f67657468657220776974682074686520616d6f756e742068656c64206f6e206465706f7369742e34416e6e6f756e63656d656e747301010530543a3a4163636f756e7449643d01285665633c416e6e6f756e63656d656e743c543a3a4163636f756e7449642c2043616c6c486173684f663c543e2c20543a3a426c6f636b4e756d6265723e3e2c0a2042616c616e63654f663c543e290044000000000000000000000000000000000004ac2054686520616e6e6f756e63656d656e7473206d616465206279207468652070726f787920286b6579292e01281470726f78790c107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e3c51012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f726973656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e246164645f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d62657234490120526567697374657220612070726f7879206163636f756e7420666f72207468652073656e64657220746861742069732061626c6520746f206d616b652063616c6c73206f6e2069747320626568616c662e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f206d616b6520612070726f78792e0101202d206070726f78795f74797065603a20546865207065726d697373696f6e7320616c6c6f77656420666f7220746869732070726f7879206163636f756e742e5101202d206064656c6179603a2054686520616e6e6f756e63656d656e7420706572696f64207265717569726564206f662074686520696e697469616c2070726f78792e2057696c6c2067656e6572616c6c7920626518207a65726f2e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3072656d6f76655f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d6265722cac20556e726567697374657220612070726f7879206163636f756e7420666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2901202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f2072656d6f766520617320612070726f78792e4501202d206070726f78795f74797065603a20546865207065726d697373696f6e732063757272656e746c7920656e61626c656420666f72207468652072656d6f7665642070726f7879206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3872656d6f76655f70726f786965730028b820556e726567697374657220616c6c2070726f7879206163636f756e747320666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901205741524e494e473a2054686973206d61792062652063616c6c6564206f6e206163636f756e747320637265617465642062792060616e6f6e796d6f7573602c20686f776576657220696620646f6e652c207468656e5d012074686520756e726573657276656420666565732077696c6c20626520696e61636365737369626c652e202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e24616e6f6e796d6f75730c2870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d62657214696e6465780c7531365c3d0120537061776e2061206672657368206e6577206163636f756e7420746861742069732067756172616e7465656420746f206265206f746865727769736520696e61636365737369626c652c20616e64010120696e697469616c697a65206974207769746820612070726f7879206f66206070726f78795f747970656020666f7220606f726967696e602073656e6465722e0070205265717569726573206120605369676e656460206f726967696e2e005501202d206070726f78795f74797065603a205468652074797065206f66207468652070726f78792074686174207468652073656e6465722077696c6c2062652072656769737465726564206173206f766572207468655101206e6577206163636f756e742e20546869732077696c6c20616c6d6f737420616c7761797320626520746865206d6f7374207065726d697373697665206050726f7879547970656020706f737369626c6520746f7c20616c6c6f7720666f72206d6178696d756d20666c65786962696c6974792e5501202d2060696e646578603a204120646973616d626967756174696f6e20696e6465782c20696e206361736520746869732069732063616c6c6564206d756c7469706c652074696d657320696e207468652073616d656101207472616e73616374696f6e2028652e672e207769746820607574696c6974793a3a626174636860292e20556e6c65737320796f75277265207573696e67206062617463686020796f752070726f6261626c79206a757374442077616e7420746f20757365206030602e5101202d206064656c6179603a2054686520616e6e6f756e63656d656e7420706572696f64207265717569726564206f662074686520696e697469616c2070726f78792e2057696c6c2067656e6572616c6c7920626518207a65726f2e005501204661696c73207769746820604475706c69636174656020696620746869732068617320616c7265616479206265656e2063616c6c656420696e2074686973207472616e73616374696f6e2c2066726f6d207468659c2073616d652073656e6465722c2077697468207468652073616d6520706172616d65746572732e00e8204661696c732069662074686572652061726520696e73756666696369656e742066756e647320746f2070617920666f72206465706f7369742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e9020544f444f3a204d69676874206265206f76657220636f756e74696e6720312072656164386b696c6c5f616e6f6e796d6f7573141c737061776e657230543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f78795479706514696e6465780c753136186865696768745c436f6d706163743c543a3a426c6f636b4e756d6265723e246578745f696e64657830436f6d706163743c7533323e50b82052656d6f76657320612070726576696f75736c7920737061776e656420616e6f6e796d6f75732070726f78792e004d01205741524e494e473a202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a20416e792066756e64732068656c6420696e2069742077696c6c2062653820696e61636365737369626c652e005d01205265717569726573206120605369676e656460206f726967696e2c20616e64207468652073656e646572206163636f756e74206d7573742068617665206265656e206372656174656420627920612063616c6c20746fac2060616e6f6e796d6f757360207769746820636f72726573706f6e64696e6720706172616d65746572732e005101202d2060737061776e6572603a20546865206163636f756e742074686174206f726967696e616c6c792063616c6c65642060616e6f6e796d6f75736020746f206372656174652074686973206163636f756e742e5101202d2060696e646578603a2054686520646973616d626967756174696f6e20696e646578206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e2050726f6261626c79206030602e0501202d206070726f78795f74797065603a205468652070726f78792074797065206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e4101202d2060686569676874603a2054686520686569676874206f662074686520636861696e207768656e207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e4d01202d20606578745f696e646578603a205468652065787472696e73696320696e64657820696e207768696368207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e004d01204661696c73207769746820604e6f5065726d697373696f6e6020696e2063617365207468652063616c6c6572206973206e6f7420612070726576696f75736c79206372656174656420616e6f6e796d6f7573f4206163636f756e742077686f73652060616e6f6e796d6f7573602063616c6c2068617320636f72726573706f6e64696e6720706172616d65746572732e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e20616e6e6f756e636508107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e540901205075626c697368207468652068617368206f6620612070726f78792d63616c6c20746861742077696c6c206265206d61646520696e20746865206675747572652e0061012054686973206d7573742062652063616c6c656420736f6d65206e756d626572206f6620626c6f636b73206265666f72652074686520636f72726573706f6e64696e67206070726f78796020697320617474656d707465642901206966207468652064656c6179206173736f6369617465642077697468207468652070726f78792072656c6174696f6e736869702069732067726561746572207468616e207a65726f2e001501204e6f206d6f7265207468616e20604d617850656e64696e676020616e6e6f756e63656d656e7473206d6179206265206d61646520617420616e79206f6e652074696d652e000d0120546869732077696c6c2074616b652061206465706f736974206f662060416e6e6f756e63656d656e744465706f736974466163746f72602061732077656c6c2061731d012060416e6e6f756e63656d656e744465706f736974426173656020696620746865726520617265206e6f206f746865722070656e64696e6720616e6e6f756e63656d656e74732e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420612070726f7879206f6620607265616c602e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656d6f76655f616e6e6f756e63656d656e7408107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40742052656d6f7665206120676976656e20616e6e6f756e63656d656e742e005d01204d61792062652063616c6c656420627920612070726f7879206163636f756e7420746f2072656d6f766520612063616c6c20746865792070726576696f75736c7920616e6e6f756e63656420616e642072657475726e3420746865206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656a6563745f616e6e6f756e63656d656e74082064656c656761746530543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40b42052656d6f76652074686520676976656e20616e6e6f756e63656d656e74206f6620612064656c65676174652e006501204d61792062652063616c6c6564206279206120746172676574202870726f7869656429206163636f756e7420746f2072656d6f766520612063616c6c2074686174206f6e65206f662074686569722064656c656761746573290120286064656c656761746560292068617320616e6e6f756e63656420746865792077616e7420746f20657865637574652e20546865206465706f7369742069732072657475726e65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733af8202d206064656c6567617465603a20546865206163636f756e7420746861742070726576696f75736c7920616e6e6f756e636564207468652063616c6c2ec0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e3c70726f78795f616e6e6f756e636564102064656c656761746530543a3a4163636f756e744964107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e4451012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f726973656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e010c3450726f7879457865637574656404384469737061746368526573756c7404ec20412070726f78792077617320657865637574656420636f72726563746c792c20776974682074686520676976656e205c5b726573756c745c5d2e40416e6f6e796d6f75734372656174656410244163636f756e744964244163636f756e7449642450726f7879547970650c75313608ec20416e6f6e796d6f7573206163636f756e7420686173206265656e2063726561746564206279206e65772070726f7879207769746820676976656e690120646973616d626967756174696f6e20696e64657820616e642070726f787920747970652e205c5b616e6f6e796d6f75732c2077686f2c2070726f78795f747970652c20646973616d626967756174696f6e5f696e6465785c5d24416e6e6f756e6365640c244163636f756e744964244163636f756e744964104861736804510120416e20616e6e6f756e63656d656e742077617320706c6163656420746f206d616b6520612063616c6c20696e20746865206675747572652e205c5b7265616c2c2070726f78792c2063616c6c5f686173685c5d184050726f78794465706f736974426173653042616c616e63654f663c543e4000f09e544c390000000000000000000004110120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e6720612070726f78792e4850726f78794465706f736974466163746f723042616c616e63654f663c543e400060aa7714b40000000000000000000004bc2054686520616d6f756e74206f662063757272656e6379206e6565646564207065722070726f78792061646465642e284d617850726f786965730c75313608200004f020546865206d6178696d756d20616d6f756e74206f662070726f7869657320616c6c6f77656420666f7220612073696e676c65206163636f756e742e284d617850656e64696e670c7533321020000000047820604d617850656e64696e6760206d6574616461746120736861646f772e5c416e6e6f756e63656d656e744465706f736974426173653042616c616e63654f663c543e4000f09e544c390000000000000000000004ac2060416e6e6f756e63656d656e744465706f7369744261736560206d6574616461746120736861646f772e64416e6e6f756e63656d656e744465706f736974466163746f723042616c616e63654f663c543e4000c054ef28680100000000000000000004b42060416e6e6f756e63656d656e744465706f736974466163746f7260206d6574616461746120736861646f772e1c1c546f6f4d616e790425012054686572652061726520746f6f206d616e792070726f786965732072656769737465726564206f7220746f6f206d616e7920616e6e6f756e63656d656e74732070656e64696e672e204e6f74466f756e6404782050726f787920726567697374726174696f6e206e6f7420666f756e642e204e6f7450726f787904d02053656e646572206973206e6f7420612070726f7879206f6620746865206163636f756e7420746f2062652070726f786965642e2c556e70726f787961626c6504250120412063616c6c20776869636820697320696e636f6d70617469626c652077697468207468652070726f7879207479706527732066696c7465722077617320617474656d707465642e244475706c69636174650470204163636f756e7420697320616c726561647920612070726f78792e304e6f5065726d697373696f6e0419012043616c6c206d6179206e6f74206265206d6164652062792070726f78792062656361757365206974206d617920657363616c617465206974732070726976696c656765732e2c556e616e6e6f756e63656404d420416e6e6f756e63656d656e742c206966206d61646520617420616c6c2c20776173206d61646520746f6f20726563656e746c792e1d204d756c746973696701204d756c746973696708244d756c74697369677300020530543a3a4163636f756e744964205b75383b2033325dd04d756c74697369673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e02040004942054686520736574206f66206f70656e206d756c7469736967206f7065726174696f6e732e1443616c6c73000106205b75383b2033325da0284f706171756543616c6c2c20543a3a4163636f756e7449642c2042616c616e63654f663c543e290004000001105061735f6d756c74695f7468726573686f6c645f3108446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e40550120496d6d6564696174656c792064697370617463682061206d756c74692d7369676e61747572652063616c6c207573696e6720612073696e676c6520617070726f76616c2066726f6d207468652063616c6c65722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e004101202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f206172652070617274206f66207468650501206d756c74692d7369676e61747572652c2062757420646f206e6f7420706172746963697061746520696e2074686520617070726f76616c2070726f636573732e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e00bc20526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c742e002c2023203c7765696768743e1d01204f285a202b204329207768657265205a20697320746865206c656e677468206f66207468652063616c6c20616e6420432069747320657865637574696f6e207765696768742e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d48202d204442205765696768743a204e6f6e654c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e2061735f6d756c746918247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e1063616c6c284f706171756543616c6c2873746f72655f63616c6c10626f6f6c286d61785f77656967687418576569676874b8590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e00b42049662074686572652061726520656e6f7567682c207468656e206469737061746368207468652063616c6c2e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e002101204e4f54453a20556e6c6573732074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2067656e6572616c6c792077616e7420746f207573651d012060617070726f76655f61735f6d756c74696020696e73746561642c2073696e6365206974206f6e6c7920726571756972657320612068617368206f66207468652063616c6c2e005d0120526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c7420696620607468726573686f6c64602069732065786163746c79206031602e204f74686572776973655901206f6e20737563636573732c20726573756c7420697320604f6b6020616e642074686520726573756c742066726f6d2074686520696e746572696f722063616c6c2c206966206974207761732065786563757465642ce0206d617920626520666f756e6420696e20746865206465706f736974656420604d756c7469736967457865637574656460206576656e742e002c2023203c7765696768743e54202d20604f2853202b205a202b2043616c6c29602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2e2501202d204f6e652063616c6c20656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285a296020776865726520605a602069732074782d6c656e2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e70202d2054686520776569676874206f6620746865206063616c6c602e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a250120202020202d2052656164733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c6029290120202020202d205772697465733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c60294c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e40617070726f76655f61735f6d756c746914247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e2463616c6c5f68617368205b75383b2033325d286d61785f7765696768741857656967687490590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e003901204e4f54453a2049662074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2077616e7420746f20757365206061735f6d756c74696020696e73746561642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743abc20202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745dc020202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d302023203c2f7765696768743e3c63616e63656c5f61735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e2474696d65706f696e746454696d65706f696e743c543a3a426c6f636b4e756d6265723e2463616c6c5f68617368205b75383b2033325d6859012043616e63656c2061207072652d6578697374696e672c206f6e2d676f696e67206d756c7469736967207472616e73616374696f6e2e20416e79206465706f7369742072657365727665642070726576696f75736c79c820666f722074686973206f7065726174696f6e2077696c6c20626520756e7265736572766564206f6e20737563636573732e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e6101202d206074696d65706f696e74603a205468652074696d65706f696e742028626c6f636b206e756d62657220616e64207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c7c207472616e73616374696f6e20666f7220746869732064697370617463682ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602e34202d204f6e65206576656e742e88202d20492f4f3a2031207265616420604f285329602c206f6e652072656d6f76652e74202d2053746f726167653a2072656d6f766573206f6e65206974656d2e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a190120202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c731d0120202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c73302023203c2f7765696768743e01102c4e65774d756c74697369670c244163636f756e744964244163636f756e7449642043616c6c48617368041d012041206e6577206d756c7469736967206f7065726174696f6e2068617320626567756e2e205c5b617070726f76696e672c206d756c74697369672c2063616c6c5f686173685c5d404d756c7469736967417070726f76616c10244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c4861736808cc2041206d756c7469736967206f7065726174696f6e20686173206265656e20617070726f76656420627920736f6d656f6e652eb8205c5b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d404d756c7469736967457865637574656414244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c48617368384469737061746368526573756c740459012041206d756c7469736967206f7065726174696f6e20686173206265656e2065786563757465642e205c5b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d444d756c746973696743616e63656c6c656410244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c486173680461012041206d756c7469736967206f7065726174696f6e20686173206265656e2063616e63656c6c65642e205c5b63616e63656c6c696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d0c2c4465706f736974426173653042616c616e63654f663c543e4000f01c0adbed0100000000000000000008710120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061206d756c746973696720657865637574696f6e206f7220746f2073746f72656c20612064697370617463682063616c6c20666f72206c617465722e344465706f736974466163746f723042616c616e63654f663c543e400000cc7b9fae000000000000000000000455012054686520616d6f756e74206f662063757272656e6379206e65656465642070657220756e6974207468726573686f6c64207768656e206372656174696e672061206d756c746973696720657865637574696f6e2e384d61785369676e61746f726965730c75313608640004010120546865206d6178696d756d20616d6f756e74206f66207369676e61746f7269657320616c6c6f77656420666f72206120676976656e206d756c74697369672e38404d696e696d756d5468726573686f6c640480205468726573686f6c64206d7573742062652032206f7220677265617465722e3c416c7265616479417070726f76656404b02043616c6c20697320616c726561647920617070726f7665642062792074686973207369676e61746f72792e444e6f417070726f76616c734e656564656404a02043616c6c20646f65736e2774206e65656420616e7920286d6f72652920617070726f76616c732e44546f6f4665775369676e61746f7269657304ac2054686572652061726520746f6f20666577207369676e61746f7269657320696e20746865206c6973742e48546f6f4d616e795369676e61746f7269657304b02054686572652061726520746f6f206d616e79207369676e61746f7269657320696e20746865206c6973742e545369676e61746f726965734f75744f664f7264657204110120546865207369676e61746f7269657320776572652070726f7669646564206f7574206f66206f726465723b20746865792073686f756c64206265206f7264657265642e4c53656e646572496e5369676e61746f72696573041101205468652073656e6465722077617320636f6e7461696e656420696e20746865206f74686572207369676e61746f726965733b2069742073686f756c646e27742062652e204e6f74466f756e6404e0204d756c7469736967206f7065726174696f6e206e6f7420666f756e64207768656e20617474656d7074696e6720746f2063616e63656c2e204e6f744f776e6572043101204f6e6c7920746865206163636f756e742074686174206f726967696e616c6c79206372656174656420746865206d756c74697369672069732061626c6520746f2063616e63656c2069742e2c4e6f54696d65706f696e74042101204e6f2074696d65706f696e742077617320676976656e2c2079657420746865206d756c7469736967206f7065726174696f6e20697320616c726561647920756e6465727761792e3857726f6e6754696d65706f696e74043101204120646966666572656e742074696d65706f696e742077617320676976656e20746f20746865206d756c7469736967206f7065726174696f6e207468617420697320756e6465727761792e4c556e657870656374656454696d65706f696e7404f820412074696d65706f696e742077617320676976656e2c20796574206e6f206d756c7469736967206f7065726174696f6e20697320756e6465727761792e30576569676874546f6f4c6f7704d420546865206d6178696d756d2077656967687420696e666f726d6174696f6e2070726f76696465642077617320746f6f206c6f772e34416c726561647953746f72656404a420546865206461746120746f2062652073746f72656420697320616c72656164792073746f7265642e1e20426f756e7469657301205472656173757279102c426f756e7479436f756e7401002c426f756e7479496e646578100000000004c0204e756d626572206f6620626f756e74792070726f706f73616c7320746861742068617665206265656e206d6164652e20426f756e746965730001052c426f756e7479496e646578c8426f756e74793c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e000400047820426f756e7469657320746861742068617665206265656e206d6164652e48426f756e74794465736372697074696f6e730001052c426f756e7479496e6465781c5665633c75383e000400048020546865206465736372697074696f6e206f66206561636820626f756e74792e3c426f756e7479417070726f76616c730100405665633c426f756e7479496e6465783e040004ec20426f756e747920696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f74207965742066756e6465642e01243870726f706f73655f626f756e7479081476616c756554436f6d706163743c42616c616e63654f663c543e3e2c6465736372697074696f6e1c5665633c75383e30582050726f706f73652061206e657720626f756e74792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c20617355012060446174614465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e2049742077696c6c20626520756e72657365727665642075706f6e20617070726f76616c2c68206f7220736c6173686564207768656e2072656a65637465642e00fc202d206063757261746f72603a205468652063757261746f72206163636f756e742077686f6d2077696c6c206d616e616765207468697320626f756e74792e68202d2060666565603a205468652063757261746f72206665652e2901202d206076616c7565603a2054686520746f74616c207061796d656e7420616d6f756e74206f66207468697320626f756e74792c2063757261746f722066656520696e636c756465642ec4202d20606465736372697074696f6e603a20546865206465736372697074696f6e206f66207468697320626f756e74792e38617070726f76655f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e20610120417070726f7665206120626f756e74792070726f706f73616c2e2041742061206c617465722074696d652c2074686520626f756e74792077696c6c2062652066756e64656420616e64206265636f6d6520616374697665ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e3c70726f706f73655f63757261746f720c24626f756e74795f696450436f6d706163743c426f756e7479496e6465783e1c63757261746f728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c66656554436f6d706163743c42616c616e63654f663c543e3e1c942041737369676e20612063757261746f7220746f20612066756e64656420626f756e74792e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e40756e61737369676e5f63757261746f720424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e488020556e61737369676e2063757261746f722066726f6d206120626f756e74792e00210120546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206052656a6563744f726967696e602061207369676e6564206f726967696e2e00690120496620746869732066756e6374696f6e2069732063616c6c656420627920746865206052656a6563744f726967696e602c20776520617373756d652074686174207468652063757261746f72206973206d616c6963696f75730d01206f7220696e6163746976652e204173206120726573756c742c2077652077696c6c20736c617368207468652063757261746f72207768656e20706f737369626c652e00650120496620746865206f726967696e206973207468652063757261746f722c2077652074616b6520746869732061732061207369676e20746865792061726520756e61626c6520746f20646f207468656972206a6f6220616e64610120746865792077696c6c696e676c7920676976652075702e20576520636f756c6420736c617368207468656d2c2062757420666f72206e6f7720776520616c6c6f77207468656d20746f207265636f7665722074686569723901206465706f73697420616e64206578697420776974686f75742069737375652e20285765206d61792077616e7420746f206368616e67652074686973206966206974206973206162757365642e290061012046696e616c6c792c20746865206f726967696e2063616e20626520616e796f6e6520696620616e64206f6e6c79206966207468652063757261746f722069732022696e616374697665222e205468697320616c6c6f7773650120616e796f6e6520696e2074686520636f6d6d756e69747920746f2063616c6c206f7574207468617420612063757261746f72206973206e6f7420646f696e67207468656972206475652064696c6967656e63652c20616e643d012077652073686f756c64207069636b2061206e65772063757261746f722e20496e20746869732063617365207468652063757261746f722073686f756c6420616c736f20626520736c61736865642e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e386163636570745f63757261746f720424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e209820416363657074207468652063757261746f7220726f6c6520666f72206120626f756e74792e2d012041206465706f7369742077696c6c2062652072657365727665642066726f6d2063757261746f7220616e6420726566756e642075706f6e207375636365737366756c207061796f75742e0094204d6179206f6e6c792062652063616c6c65642066726f6d207468652063757261746f722e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e3061776172645f626f756e74790824626f756e74795f696450436f6d706163743c426f756e7479496e6465783e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528990120417761726420626f756e747920746f20612062656e6566696369617279206163636f756e742e205468652062656e65666963696172792077696c6c2062652061626c6520746f20636c61696d207468652066756e647320616674657220612064656c61792e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652063757261746f72206f66207468697320626f756e74792e008c202d2060626f756e74795f6964603a20426f756e747920494420746f2061776172642e1d01202d206062656e6566696369617279603a205468652062656e6566696369617279206163636f756e742077686f6d2077696c6c207265636569766520746865207061796f75742e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e30636c61696d5f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e24f020436c61696d20746865207061796f75742066726f6d20616e206177617264656420626f756e7479206166746572207061796f75742064656c61792e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652062656e6566696369617279206f66207468697320626f756e74792e008c202d2060626f756e74795f6964603a20426f756e747920494420746f20636c61696d2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e30636c6f73655f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e283d012043616e63656c20612070726f706f736564206f722061637469766520626f756e74792e20416c6c207468652066756e64732077696c6c2062652073656e7420746f20747265617375727920616e64d0207468652063757261746f72206465706f7369742077696c6c20626520756e726573657276656420696620706f737369626c652e00cc204f6e6c792060543a3a52656a6563744f726967696e602069732061626c6520746f2063616e63656c206120626f756e74792e0090202d2060626f756e74795f6964603a20426f756e747920494420746f2063616e63656c2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e50657874656e645f626f756e74795f6578706972790824626f756e74795f696450436f6d706163743c426f756e7479496e6465783e1c5f72656d61726b1c5665633c75383e28b020457874656e6420746865206578706972792074696d65206f6620616e2061637469766520626f756e74792e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652063757261746f72206f66207468697320626f756e74792e0090202d2060626f756e74795f6964603a20426f756e747920494420746f20657874656e642e90202d206072656d61726b603a206164646974696f6e616c20696e666f726d6174696f6e2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e011c38426f756e747950726f706f736564042c426f756e7479496e646578047c204e657720626f756e74792070726f706f73616c2e205c5b696e6465785c5d38426f756e747952656a6563746564082c426f756e7479496e6465781c42616c616e6365041101204120626f756e74792070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e205c5b696e6465782c20626f6e645c5d48426f756e7479426563616d65416374697665042c426f756e7479496e64657804e4204120626f756e74792070726f706f73616c2069732066756e64656420616e6420626563616d65206163746976652e205c5b696e6465785c5d34426f756e747941776172646564082c426f756e7479496e646578244163636f756e74496404f4204120626f756e7479206973206177617264656420746f20612062656e65666963696172792e205c5b696e6465782c2062656e65666963696172795c5d34426f756e7479436c61696d65640c2c426f756e7479496e6465781c42616c616e6365244163636f756e744964040d01204120626f756e747920697320636c61696d65642062792062656e65666963696172792e205c5b696e6465782c207061796f75742c2062656e65666963696172795c5d38426f756e747943616e63656c6564042c426f756e7479496e6465780484204120626f756e74792069732063616e63656c6c65642e205c5b696e6465785c5d38426f756e7479457874656e646564042c426f756e7479496e646578049c204120626f756e74792065787069727920697320657874656e6465642e205c5b696e6465785c5d1848446174614465706f736974506572427974653042616c616e63654f663c543e400010a5d4e8000000000000000000000004fc2054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e20626f756e7479206465736372697074696f6e2e44426f756e74794465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004e82054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120626f756e74792070726f706f73616c2e60426f756e74794465706f7369745061796f757444656c617938543a3a426c6f636b4e756d6265721080700000045901205468652064656c617920706572696f6420666f72207768696368206120626f756e74792062656e6566696369617279206e65656420746f2077616974206265666f726520636c61696d20746865207061796f75742e50426f756e747943757261746f724465706f7369741c5065726d696c6c1020a10700046d012050657263656e74616765206f66207468652063757261746f722066656520746861742077696c6c20626520726573657276656420757066726f6e74206173206465706f73697420666f7220626f756e74792063757261746f722e48426f756e747956616c75654d696e696d756d3042616c616e63654f663c543e4000406352bfc6010000000000000000000470204d696e696d756d2076616c756520666f72206120626f756e74792e4c4d6178696d756d526561736f6e4c656e6774680c75333210004000000488204d6178696d756d2061636365707461626c6520726561736f6e206c656e6774682e2470496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e30496e76616c6964496e6465780494204e6f2070726f706f73616c206f7220626f756e7479206174207468617420696e6465782e30526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e40556e657870656374656453746174757304842054686520626f756e74792073746174757320697320756e65787065637465642e385265717569726543757261746f720460205265717569726520626f756e74792063757261746f722e30496e76616c696456616c7565045820496e76616c696420626f756e74792076616c75652e28496e76616c6964466565045020496e76616c696420626f756e7479206665652e3450656e64696e675061796f75740870204120626f756e7479207061796f75742069732070656e64696e672efc20546f2063616e63656c2074686520626f756e74792c20796f75206d75737420756e61737369676e20616e6420736c617368207468652063757261746f722e245072656d61747572650449012054686520626f756e746965732063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e1f1054697073012054726561737572790810546970730001051c543a3a48617368f04f70656e5469703c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265722c20543a3a486173683e0004000c650120546970734d6170207468617420617265206e6f742079657420636f6d706c657465642e204b65796564206279207468652068617368206f66206028726561736f6e2c2077686f29602066726f6d207468652076616c75652e3d012054686973206861732074686520696e73656375726520656e756d657261626c6520686173682066756e6374696f6e2073696e636520746865206b657920697473656c6620697320616c7265616479802067756172616e7465656420746f20626520612073656375726520686173682e1c526561736f6e730001061c543a3a486173681c5665633c75383e0004000849012053696d706c6520707265696d616765206c6f6f6b75702066726f6d2074686520726561736f6e2773206861736820746f20746865206f726967696e616c20646174612e20416761696e2c2068617320616e610120696e73656375726520656e756d657261626c6520686173682073696e636520746865206b65792069732067756172616e7465656420746f2062652074686520726573756c74206f6620612073656375726520686173682e0114387265706f72745f617765736f6d650818726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e7449644c5d01205265706f727420736f6d657468696e672060726561736f6e60207468617420646573657276657320612074697020616e6420636c61696d20616e79206576656e7475616c207468652066696e6465722773206665652e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c206173c02060446174614465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743ecc202d20436f6d706c65786974793a20604f2852296020776865726520605260206c656e677468206f662060726561736f6e602e942020202d20656e636f64696e6720616e642068617368696e67206f662027726561736f6e2774202d20446252656164733a2060526561736f6e73602c2060546970736078202d2044625772697465733a2060526561736f6e73602c20605469707360302023203c2f7765696768743e2c726574726163745f7469700410686173681c543a3a486173684c550120526574726163742061207072696f72207469702d7265706f72742066726f6d20607265706f72745f617765736f6d65602c20616e642063616e63656c207468652070726f63657373206f662074697070696e672e00e0204966207375636365737366756c2c20746865206f726967696e616c206465706f7369742077696c6c20626520756e72657365727665642e00510120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642074686520746970206964656e746966696564206279206068617368604501206d7573742068617665206265656e207265706f7274656420627920746865207369676e696e67206163636f756e74207468726f75676820607265706f72745f617765736f6d65602028616e64206e6f7450207468726f75676820607469705f6e657760292e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e009020456d697473206054697052657472616374656460206966207375636365737366756c2e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960dc2020202d20446570656e6473206f6e20746865206c656e677468206f662060543a3a48617368602077686963682069732066697865642e90202d20446252656164733a206054697073602c20606f726967696e206163636f756e7460c0202d2044625772697465733a2060526561736f6e73602c206054697073602c20606f726967696e206163636f756e7460302023203c2f7765696768743e1c7469705f6e65770c18726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e744964247469705f76616c756554436f6d706163743c42616c616e63654f663c543e3e58f4204769766520612074697020666f7220736f6d657468696e67206e65773b206e6f2066696e6465722773206665652077696c6c2062652074616b656e2e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743e5501202d20436f6d706c65786974793a20604f2852202b2054296020776865726520605260206c656e677468206f662060726561736f6e602c2060546020697320746865206e756d626572206f6620746970706572732ec02020202d20604f285429603a206465636f64696e6720605469707065726020766563206f66206c656e6774682060546009012020202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e0d0120202020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602ee42020202d20604f285229603a2068617368696e6720616e6420656e636f64696e67206f6620726561736f6e206f66206c656e6774682060526080202d20446252656164733a206054697070657273602c2060526561736f6e736078202d2044625772697465733a2060526561736f6e73602c20605469707360302023203c2f7765696768743e0c7469700810686173681c543a3a48617368247469705f76616c756554436f6d706163743c42616c616e63654f663c543e3e64b4204465636c6172652061207469702076616c756520666f7220616e20616c72656164792d6f70656e207469702e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f66207468652068617368206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279382020206163636f756e742049442e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e00650120456d6974732060546970436c6f73696e676020696620746865207468726573686f6c64206f66207469707065727320686173206265656e207265616368656420616e642074686520636f756e74646f776e20706572696f64342068617320737461727465642e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e15012020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602c20696e736572742074697020616e6420636865636b20636c6f73696e672c0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602e00610120202041637475616c6c792077656967687420636f756c64206265206c6f77657220617320697420646570656e6473206f6e20686f77206d616e7920746970732061726520696e20604f70656e5469706020627574206974d4202020697320776569676874656420617320696620616c6d6f73742066756c6c20692e65206f66206c656e6774682060542d31602e74202d20446252656164733a206054697070657273602c206054697073604c202d2044625772697465733a20605469707360302023203c2f7765696768743e24636c6f73655f7469700410686173681c543a3a48617368446020436c6f736520616e64207061796f75742061207469702e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0019012054686520746970206964656e74696669656420627920606861736860206d75737420686176652066696e69736865642069747320636f756e74646f776e20706572696f642e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e9c2020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602e0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602eac202d20446252656164733a206054697073602c206054697070657273602c20607469702066696e64657260dc202d2044625772697465733a2060526561736f6e73602c206054697073602c206054697070657273602c20607469702066696e64657260302023203c2f7765696768743e0110184e657754697004104861736804cc2041206e6577207469702073756767657374696f6e20686173206265656e206f70656e65642e205c5b7469705f686173685c5d28546970436c6f73696e670410486173680411012041207469702073756767657374696f6e206861732072656163686564207468726573686f6c6420616e6420697320636c6f73696e672e205c5b7469705f686173685c5d24546970436c6f7365640c1048617368244163636f756e7449641c42616c616e636504f02041207469702073756767657374696f6e20686173206265656e20636c6f7365642e205c5b7469705f686173682c2077686f2c207061796f75745c5d3054697052657472616374656404104861736804c82041207469702073756767657374696f6e20686173206265656e207265747261637465642e205c5b7469705f686173685c5d1430546970436f756e74646f776e38543a3a426c6f636b4e756d62657210807000000445012054686520706572696f6420666f722077686963682061207469702072656d61696e73206f70656e20616674657220697320686173206163686965766564207468726573686f6c6420746970706572732e3454697046696e646572734665651c50657263656e7404140431012054686520616d6f756e74206f66207468652066696e616c2074697020776869636820676f657320746f20746865206f726967696e616c207265706f72746572206f6620746865207469702e505469705265706f72744465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004d42054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120746970207265706f72742e48446174614465706f736974506572427974653042616c616e63654f663c543e400010a5d4e800000000000000000000000409012054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e2074686520746970207265706f727420726561736f6e2e4c4d6178696d756d526561736f6e4c656e6774680c75333210004000000488204d6178696d756d2061636365707461626c6520726561736f6e206c656e6774682e1830526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e30416c72656164794b6e6f776e048c20546865207469702077617320616c726561647920666f756e642f737461727465642e28556e6b6e6f776e54697004642054686520746970206861736820697320756e6b6e6f776e2e244e6f7446696e64657204210120546865206163636f756e7420617474656d7074696e6720746f20726574726163742074686520746970206973206e6f74207468652066696e646572206f6620746865207469702e245374696c6c4f70656e042d0120546865207469702063616e6e6f7420626520636c61696d65642f636c6f736564206265636175736520746865726520617265206e6f7420656e6f7567682074697070657273207965742e245072656d617475726504350120546865207469702063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e201841737365747301184173736574730814417373657400010228543a3a41737365744964d4417373657444657461696c733c543a3a42616c616e63652c20543a3a4163636f756e7449642c2042616c616e63654f663c543e2c3e00040004542044657461696c73206f6620616e2061737365742e1c4163636f756e7401020228543a3a4173736574496430543a3a4163636f756e74496460417373657442616c616e63653c543a3a42616c616e63653e02280000000000000000000004e420546865206e756d626572206f6620756e697473206f66206173736574732068656c6420627920616e7920676976656e206163636f756e742e013418637265617465100869644c436f6d706163743c543a3a417373657449643e1461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c6d61785f7a6f6d626965730c7533322c6d696e5f62616c616e636528543a3a42616c616e63655cec2049737375652061206e657720636c617373206f662066756e6769626c65206173736574732066726f6d2061207075626c6963206f726967696e2e00b82054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c792e00290120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d75737420686176652073756666696369656e742066756e647320667265652e00dc2046756e6473206f662073656e64657220617265207265736572766564206163636f7264696e6720746f2074686520666f726d756c613ae8206041737365744465706f73697442617365202b2041737365744465706f7369745065725a6f6d626965202a206d61785f7a6f6d62696573602e003020506172616d65746572733a5d01202d20606964603a20546865206964656e746966696572206f6620746865206e65772061737365742e2054686973206d757374206e6f742062652063757272656e746c7920696e2075736520746f206964656e746966794c20616e206578697374696e672061737365742e5d01202d20606f776e6572603a20546865206f776e6572206f66207468697320636c617373206f66206173736574732e20546865206f776e6572206861732066756c6c20737570657275736572207065726d697373696f6e737d01206f76657220746869732061737365742c20627574206d6179206c61746572206368616e676520616e6420636f6e66696775726520746865207065726d697373696f6e73207573696e6720607472616e736665725f6f776e657273686970604020616e6420607365745f7465616d602e5901202d20606d61785f7a6f6d62696573603a2054686520746f74616c206e756d626572206f66206163636f756e7473207768696368206d617920686f6c642061737365747320696e207468697320636c61737320796574742068617665206e6f206578697374656e7469616c206465706f7369742e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e009c20456d69747320604372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f2831296030666f7263655f637265617465100869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c6d61785f7a6f6d6269657330436f6d706163743c7533323e2c6d696e5f62616c616e63654c436f6d706163743c543a3a42616c616e63653e54fc2049737375652061206e657720636c617373206f662066756e6769626c65206173736574732066726f6d20612070726976696c65676564206f726967696e2e00b82054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c792e00a820546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e602e00a020556e6c696b652060637265617465602c206e6f2066756e6473206172652072657365727665642e005d01202d20606964603a20546865206964656e746966696572206f6620746865206e65772061737365742e2054686973206d757374206e6f742062652063757272656e746c7920696e2075736520746f206964656e746966794c20616e206578697374696e672061737365742e5d01202d20606f776e6572603a20546865206f776e6572206f66207468697320636c617373206f66206173736574732e20546865206f776e6572206861732066756c6c20737570657275736572207065726d697373696f6e737d01206f76657220746869732061737365742c20627574206d6179206c61746572206368616e676520616e6420636f6e66696775726520746865207065726d697373696f6e73207573696e6720607472616e736665725f6f776e657273686970604020616e6420607365745f7465616d602e5901202d20606d61785f7a6f6d62696573603a2054686520746f74616c206e756d626572206f66206163636f756e7473207768696368206d617920686f6c642061737365747320696e207468697320636c61737320796574742068617665206e6f206578697374656e7469616c206465706f7369742e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e00b020456d6974732060466f7263654372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f283129601c64657374726f79080869644c436f6d706163743c543a3a417373657449643e3c7a6f6d626965735f7769746e65737330436f6d706163743c7533323e28e02044657374726f79206120636c617373206f662066756e6769626c6520617373657473206f776e6564206279207468652073656e6465722e00390120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d75737420626520746865206f776e6572206f662074686520617373657420606964602e005101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652064657374726f7965642e2054686973206d757374206964656e7469667920616e206578697374696e671c2061737365742e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e00ec205765696768743a20604f287a296020776865726520607a6020697320746865206e756d626572206f66207a6f6d626965206163636f756e74732e34666f7263655f64657374726f79080869644c436f6d706163743c543a3a417373657449643e3c7a6f6d626965735f7769746e65737330436f6d706163743c7533323e28902044657374726f79206120636c617373206f662066756e6769626c65206173736574732e00a820546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e602e005101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652064657374726f7965642e2054686973206d757374206964656e7469667920616e206578697374696e671c2061737365742e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f28312960106d696e740c0869644c436f6d706163743c543a3a417373657449643e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e308c204d696e7420617373657473206f66206120706172746963756c617220636c6173732e003d0120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d7573742062652074686520497373756572206f662074686520617373657420606964602e000101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74206d696e7465642e1101202d206062656e6566696369617279603a20546865206163636f756e7420746f206265206372656469746564207769746820746865206d696e746564206173736574732ec8202d2060616d6f756e74603a2054686520616d6f756e74206f662074686520617373657420746f206265206d696e7465642e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f283129605901204d6f6465733a205072652d6578697374696e672062616c616e6365206f66206062656e6566696369617279603b204163636f756e74207072652d6578697374656e6365206f66206062656e6566696369617279602e106275726e0c0869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e3c490120526564756365207468652062616c616e6365206f66206077686f60206279206173206d75636820617320706f737369626c6520757020746f2060616d6f756e746020617373657473206f6620606964602e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204d616e61676572206f662074686520617373657420606964602e00dc204261696c732077697468206042616c616e63655a65726f6020696620746865206077686f6020697320616c726561647920646561642e000101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74206275726e65642ea4202d206077686f603a20546865206163636f756e7420746f20626520646562697465642066726f6d2e2d01202d2060616d6f756e74603a20546865206d6178696d756d20616d6f756e74206279207768696368206077686f6027732062616c616e63652073686f756c6420626520726564756365642e00550120456d69747320604275726e6564602077697468207468652061637475616c20616d6f756e74206275726e65642e20496620746869732074616b6573207468652062616c616e636520746f2062656c6f77207468653d01206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74206275726e656420697320696e6372656173656420746f2074616b6520697420746f207a65726f2e003c205765696768743a20604f283129600d01204d6f6465733a20506f73742d6578697374656e6365206f66206077686f603b20507265202620706f7374205a6f6d6269652d737461747573206f66206077686f602e207472616e736665720c0869644c436f6d706163743c543a3a417373657449643e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e48d4204d6f766520736f6d65206173736574732066726f6d207468652073656e646572206163636f756e7420746f20616e6f746865722e005c204f726967696e206d757374206265205369676e65642e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642ea0202d2060746172676574603a20546865206163636f756e7420746f2062652063726564697465642e5501202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652073656e64657227732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e64650120607461726765746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e6101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652073656e6465722062616c616e63652061626f7665207a65726f206275742062656c6f77c020746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605d01204d6f6465733a205072652d6578697374656e6365206f662060746172676574603b20506f73742d6578697374656e6365206f662073656e6465723b205072696f72202620706f7374207a6f6d6269652d737461747573b8206f662073656e6465723b204163636f756e74207072652d6578697374656e6365206f662060746172676574602e38666f7263655f7472616e73666572100869644c436f6d706163743c543a3a417373657449643e18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e4cb8204d6f766520736f6d65206173736574732066726f6d206f6e65206163636f756e7420746f20616e6f746865722e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642e9c202d2060736f75726365603a20546865206163636f756e7420746f20626520646562697465642e98202d206064657374603a20546865206163636f756e7420746f2062652063726564697465642e5d01202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652060736f757263656027732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e645d012060646573746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e5101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652060736f75726365602062616c616e63652061626f7665207a65726f20627574d82062656c6f7720746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605d01204d6f6465733a205072652d6578697374656e6365206f66206064657374603b20506f73742d6578697374656e6365206f662060736f75726365603b205072696f72202620706f7374207a6f6d6269652d737461747573b8206f662060736f75726365603b204163636f756e74207072652d6578697374656e6365206f66206064657374602e18667265657a65080869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528e420446973616c6c6f77206675727468657220756e70726976696c65676564207472616e73666572732066726f6d20616e206163636f756e742e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c642062652074686520467265657a6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e8c202d206077686f603a20546865206163636f756e7420746f2062652066726f7a656e2e004020456d697473206046726f7a656e602e003c205765696768743a20604f283129601074686177080869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528d020416c6c6f7720756e70726976696c65676564207472616e73666572732066726f6d20616e206163636f756e7420616761696e2e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e94202d206077686f603a20546865206163636f756e7420746f20626520756e66726f7a656e2e004020456d6974732060546861776564602e003c205765696768743a20604f28312960487472616e736665725f6f776e657273686970080869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652878204368616e676520746865204f776e6572206f6620616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2ea0202d20606f776e6572603a20546865206e6577204f776e6572206f6620746869732061737365742e005820456d69747320604f776e65724368616e676564602e003c205765696768743a20604f28312960207365745f7465616d100869644c436f6d706163743c543a3a417373657449643e186973737565728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c667265657a65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636530c8204368616e676520746865204973737565722c2041646d696e20616e6420467265657a6572206f6620616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2ea8202d2060697373756572603a20546865206e657720497373756572206f6620746869732061737365742ea0202d206061646d696e603a20546865206e65772041646d696e206f6620746869732061737365742eb0202d2060667265657a6572603a20546865206e657720467265657a6572206f6620746869732061737365742e005420456d69747320605465616d4368616e676564602e003c205765696768743a20604f283129603c7365745f6d61785f7a6f6d62696573080869644c436f6d706163743c543a3a417373657449643e2c6d61785f7a6f6d6269657330436f6d706163743c7533323e0001301c437265617465640c1c41737365744964244163636f756e744964244163636f756e74496404ec20536f6d6520617373657420636c6173732077617320637265617465642e205c5b61737365745f69642c2063726561746f722c206f776e65725c5d184973737565640c1c41737365744964244163636f756e7449641c42616c616e636504ec20536f6d65206173736574732077657265206973737565642e205c5b61737365745f69642c206f776e65722c20746f74616c5f737570706c795c5d2c5472616e73666572726564101c41737365744964244163636f756e744964244163636f756e7449641c42616c616e636504f420536f6d65206173736574732077657265207472616e736665727265642e205c5b61737365745f69642c2066726f6d2c20746f2c20616d6f756e745c5d184275726e65640c1c41737365744964244163636f756e7449641c42616c616e636504e420536f6d652061737365747320776572652064657374726f7965642e205c5b61737365745f69642c206f776e65722c2062616c616e63655c5d2c5465616d4368616e676564101c41737365744964244163636f756e744964244163636f756e744964244163636f756e74496404050120546865206d616e6167656d656e74207465616d206368616e676564205c5b61737365745f69642c206973737565722c2061646d696e2c20667265657a65725c5d304f776e65724368616e676564081c41737365744964244163636f756e744964049820546865206f776e6572206368616e676564205c5b61737365745f69642c206f776e65725c5d40466f7263655472616e73666572726564101c41737365744964244163636f756e744964244163636f756e7449641c42616c616e636504210120536f6d652061737365747320776173207472616e7366657272656420627920616e2061646d696e2e205c5b61737365745f69642c2066726f6d2c20746f2c20616d6f756e745c5d1846726f7a656e081c41737365744964244163636f756e74496404c420536f6d65206163636f756e74206077686f60207761732066726f7a656e2e205c5b61737365745f69642c2077686f5c5d18546861776564081c41737365744964244163636f756e74496404c420536f6d65206163636f756e74206077686f6020776173207468617765642e205c5b61737365745f69642c2077686f5c5d2444657374726f796564041c41737365744964047820416e20617373657420636c617373207761732064657374726f7965642e30466f72636543726561746564081c41737365744964244163636f756e74496404e020536f6d6520617373657420636c6173732077617320666f7263652d637265617465642e205c5b61737365745f69642c206f776e65725c5d444d61785a6f6d626965734368616e676564081c417373657449640c75333204350120546865206d6178696d756d20616d6f756e74206f66207a6f6d6269657320616c6c6f77656420686173206368616e6765642e205c5b61737365745f69642c206d61785f7a6f6d626965735c5d003028416d6f756e745a65726f0490205472616e7366657220616d6f756e742073686f756c64206265206e6f6e2d7a65726f2e2842616c616e63654c6f77041901204163636f756e742062616c616e6365206d7573742062652067726561746572207468616e206f7220657175616c20746f20746865207472616e7366657220616d6f756e742e2c42616c616e63655a65726f04702042616c616e63652073686f756c64206265206e6f6e2d7a65726f2e304e6f5065726d697373696f6e04ec20546865207369676e696e67206163636f756e7420686173206e6f207065726d697373696f6e20746f20646f20746865206f7065726174696f6e2e1c556e6b6e6f776e047c2054686520676976656e20617373657420494420697320756e6b6e6f776e2e1846726f7a656e047820546865206f726967696e206163636f756e742069732066726f7a656e2e14496e557365047c2054686520617373657420494420697320616c72656164792074616b656e2e38546f6f4d616e795a6f6d62696573048420546f6f206d616e79207a6f6d626965206163636f756e747320696e207573652e20526566734c65667404550120417474656d707420746f2064657374726f7920616e20617373657420636c617373207768656e206e6f6e2d7a6f6d6269652c207265666572656e63652d62656172696e67206163636f756e74732065786973742e284261645769746e657373047020496e76616c6964207769746e657373206461746120676976656e2e384d696e42616c616e63655a65726f0490204d696e696d756d2062616c616e63652073686f756c64206265206e6f6e2d7a65726f2e204f766572666c6f7704982041206d696e74206f7065726174696f6e206c65616420746f20616e206f766572666c6f772e210c4d6d72014c4d65726b6c654d6f756e7461696e52616e67650c20526f6f74486173680100583c5420617320436f6e6669673c493e3e3a3a486173688000000000000000000000000000000000000000000000000000000000000000000458204c6174657374204d4d5220526f6f7420686173682e384e756d6265724f664c656176657301000c75363420000000000000000004b02043757272656e742073697a65206f6620746865204d4d5220286e756d626572206f66206c6561766573292e144e6f6465730001060c753634583c5420617320436f6e6669673c493e3e3a3a48617368000400108020486173686573206f6620746865206e6f64657320696e20746865204d4d522e002d01204e6f7465207468697320636f6c6c656374696f6e206f6e6c7920636f6e7461696e73204d4d52207065616b732c2074686520696e6e6572206e6f6465732028616e64206c656176657329bc20617265207072756e656420616e64206f6e6c792073746f72656420696e20746865204f6666636861696e2044422e0000000022041c40436865636b5370656356657273696f6e38436865636b547856657273696f6e30436865636b47656e6573697338436865636b4d6f7274616c69747928436865636b4e6f6e63652c436865636b576569676874604368617267655472616e73616374696f6e5061796d656e74 \ No newline at end of file +0x6d6574610c981853797374656d011853797374656d401c4163636f756e7401010230543a3a4163636f756e744964944163636f756e74496e666f3c543a3a496e6465782c20543a3a4163636f756e74446174613e004101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004e8205468652066756c6c206163636f756e7420696e666f726d6174696f6e20666f72206120706172746963756c6172206163636f756e742049442e3845787472696e736963436f756e7400000c753332040004b820546f74616c2065787472696e7369637320636f756e7420666f72207468652063757272656e7420626c6f636b2e2c426c6f636b576569676874010038436f6e73756d6564576569676874600000000000000000000000000000000000000000000000000488205468652063757272656e742077656967687420666f722074686520626c6f636b2e40416c6c45787472696e736963734c656e00000c753332040004410120546f74616c206c656e6774682028696e2062797465732920666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e24426c6f636b4861736801010538543a3a426c6f636b4e756d6265721c543a3a48617368008000000000000000000000000000000000000000000000000000000000000000000498204d6170206f6620626c6f636b206e756d6265727320746f20626c6f636b206861736865732e3445787472696e736963446174610101050c7533321c5665633c75383e000400043d012045787472696e73696373206461746120666f72207468652063757272656e7420626c6f636b20286d61707320616e2065787472696e736963277320696e64657820746f206974732064617461292e184e756d626572010038543a3a426c6f636b4e756d6265721000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000004702048617368206f66207468652070726576696f757320626c6f636b2e1844696765737401002c4469676573744f663c543e040004f020446967657374206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e184576656e747301008c5665633c4576656e745265636f72643c543a3a4576656e742c20543a3a486173683e3e040004a0204576656e7473206465706f736974656420666f72207468652063757272656e7420626c6f636b2e284576656e74436f756e740100284576656e74496e646578100000000004b820546865206e756d626572206f66206576656e747320696e2074686520604576656e74733c543e60206c6973742e2c4576656e74546f706963730101021c543a3a48617368845665633c28543a3a426c6f636b4e756d6265722c204576656e74496e646578293e000400282501204d617070696e67206265747765656e206120746f7069632028726570726573656e74656420627920543a3a486173682920616e64206120766563746f72206f6620696e646578657394206f66206576656e747320696e2074686520603c4576656e74733c543e3e60206c6973742e00510120416c6c20746f70696320766563746f727320686176652064657465726d696e69737469632073746f72616765206c6f636174696f6e7320646570656e64696e67206f6e2074686520746f7069632e2054686973450120616c6c6f7773206c696768742d636c69656e747320746f206c6576657261676520746865206368616e67657320747269652073746f7261676520747261636b696e67206d656368616e69736d20616e64e420696e2063617365206f66206368616e67657320666574636820746865206c697374206f66206576656e7473206f6620696e7465726573742e004d01205468652076616c756520686173207468652074797065206028543a3a426c6f636b4e756d6265722c204576656e74496e646578296020626563617573652069662077652075736564206f6e6c79206a7573744d012074686520604576656e74496e64657860207468656e20696e20636173652069662074686520746f70696320686173207468652073616d6520636f6e74656e7473206f6e20746865206e65787420626c6f636b0101206e6f206e6f74696669636174696f6e2077696c6c20626520747269676765726564207468757320746865206576656e74206d69676874206265206c6f73742e484c61737452756e74696d65557067726164650000584c61737452756e74696d6555706772616465496e666f04000455012053746f726573207468652060737065635f76657273696f6e6020616e642060737065635f6e616d6560206f66207768656e20746865206c6173742072756e74696d6520757067726164652068617070656e65642e545570677261646564546f553332526566436f756e74010010626f6f6c0400044d012054727565206966207765206861766520757067726164656420736f207468617420607479706520526566436f756e74602069732060753332602e2046616c7365202864656661756c7429206966206e6f742e605570677261646564546f547269706c65526566436f756e74010010626f6f6c0400085d012054727565206966207765206861766520757067726164656420736f2074686174204163636f756e74496e666f20636f6e7461696e73207468726565207479706573206f662060526566436f756e74602e2046616c736548202864656661756c7429206966206e6f742e38457865637574696f6e50686173650000145068617365040004882054686520657865637574696f6e207068617365206f662074686520626c6f636b2e01282866696c6c5f626c6f636b04185f726174696f1c50657262696c6c040901204120646973706174636820746861742077696c6c2066696c6c2074686520626c6f636b2077656967687420757020746f2074686520676976656e20726174696f2e1872656d61726b041c5f72656d61726b1c5665633c75383e146c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e002c2023203c7765696768743e24202d20604f28312960302023203c2f7765696768743e387365745f686561705f7061676573041470616765730c75363420fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e002c2023203c7765696768743e24202d20604f283129604c202d20312073746f726167652077726974652e64202d2042617365205765696768743a20312e34303520c2b57360202d203120777269746520746f20484541505f5041474553302023203c2f7765696768743e207365745f636f64650410636f64651c5665633c75383e28682053657420746865206e65772072756e74696d6520636f64652e002c2023203c7765696768743e3501202d20604f2843202b2053296020776865726520604360206c656e677468206f662060636f64656020616e642060536020636f6d706c6578697479206f66206063616e5f7365745f636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e7901202d20312063616c6c20746f206063616e5f7365745f636f6465603a20604f28532960202863616c6c73206073705f696f3a3a6d6973633a3a72756e74696d655f76657273696f6e6020776869636820697320657870656e73697665292e2c202d2031206576656e742e7d012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652c206275742067656e6572616c6c792074686973206973207665727920657870656e736976652e902057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f636f64655f776974686f75745f636865636b730410636f64651c5665633c75383e201d012053657420746865206e65772072756e74696d6520636f646520776974686f757420646f696e6720616e7920636865636b73206f662074686520676976656e2060636f6465602e002c2023203c7765696768743e90202d20604f2843296020776865726520604360206c656e677468206f662060636f64656088202d20312073746f726167652077726974652028636f64656320604f28432960292e2c202d2031206576656e742e75012054686520776569676874206f6620746869732066756e6374696f6e20697320646570656e64656e74206f6e207468652072756e74696d652e2057652077696c6c207472656174207468697320617320612066756c6c20626c6f636b2e302023203c2f7765696768743e5c7365745f6368616e6765735f747269655f636f6e666967044c6368616e6765735f747269655f636f6e666967804f7074696f6e3c4368616e67657354726965436f6e66696775726174696f6e3e28a02053657420746865206e6577206368616e676573207472696520636f6e66696775726174696f6e2e002c2023203c7765696768743e24202d20604f28312960b0202d20312073746f72616765207772697465206f722064656c6574652028636f64656320604f28312960292ed8202d20312063616c6c20746f20606465706f7369745f6c6f67603a20557365732060617070656e6460204150492c20736f204f28312964202d2042617365205765696768743a20372e32313820c2b57334202d204442205765696768743aa820202020202d205772697465733a204368616e67657320547269652c2053797374656d20446967657374302023203c2f7765696768743e2c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e206c2053657420736f6d65206974656d73206f662073746f726167652e002c2023203c7765696768743e94202d20604f2849296020776865726520604960206c656e677468206f6620606974656d73607c202d206049602073746f72616765207772697465732028604f28312960292e74202d2042617365205765696768743a20302e353638202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e306b696c6c5f73746f7261676504106b657973205665633c4b65793e2078204b696c6c20736f6d65206974656d732066726f6d2073746f726167652e002c2023203c7765696768743efc202d20604f28494b296020776865726520604960206c656e677468206f6620606b6579736020616e6420604b60206c656e677468206f66206f6e65206b657964202d206049602073746f726167652064656c6574696f6e732e70202d2042617365205765696768743a202e333738202a206920c2b57368202d205772697465733a204e756d626572206f66206974656d73302023203c2f7765696768743e2c6b696c6c5f70726566697808187072656669780c4b6579205f7375626b6579730c7533322c1501204b696c6c20616c6c2073746f72616765206974656d7320776974682061206b657920746861742073746172747320776974682074686520676976656e207072656669782e003d01202a2a4e4f54453a2a2a2057652072656c79206f6e2074686520526f6f74206f726967696e20746f2070726f7669646520757320746865206e756d626572206f66207375626b65797320756e64657241012074686520707265666978207765206172652072656d6f76696e6720746f2061636375726174656c792063616c63756c6174652074686520776569676874206f6620746869732066756e6374696f6e2e002c2023203c7765696768743edc202d20604f285029602077686572652060506020616d6f756e74206f66206b65797320776974682070726566697820607072656669786064202d206050602073746f726167652064656c6574696f6e732e74202d2042617365205765696768743a20302e383334202a205020c2b57380202d205772697465733a204e756d626572206f66207375626b657973202b2031302023203c2f7765696768743e4472656d61726b5f776974685f6576656e74041872656d61726b1c5665633c75383e18a8204d616b6520736f6d65206f6e2d636861696e2072656d61726b20616e6420656d6974206576656e742e002c2023203c7765696768743eb8202d20604f28622960207768657265206220697320746865206c656e677468206f66207468652072656d61726b2e2c202d2031206576656e742e302023203c2f7765696768743e01184045787472696e7369635375636365737304304469737061746368496e666f04b820416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e205c5b696e666f5c5d3c45787472696e7369634661696c6564083444697370617463684572726f72304469737061746368496e666f049420416e2065787472696e736963206661696c65642e205c5b6572726f722c20696e666f5c5d2c436f64655570646174656400045420603a636f6465602077617320757064617465642e284e65774163636f756e7404244163636f756e744964047c2041206e6577205c5b6163636f756e745c5d2077617320637265617465642e344b696c6c65644163636f756e7404244163636f756e744964046c20416e205c5b6163636f756e745c5d20776173207265617065642e2052656d61726b656408244163636f756e744964104861736804d4204f6e206f6e2d636861696e2072656d61726b2068617070656e65642e205c5b6f726967696e2c2072656d61726b5f686173685c5d1830426c6f636b57656967687473506c696d6974733a3a426c6f636b57656967687473850100f2052a0100000000204aa9d1010000405973070000000001c06e96a62e010000010098f73e5d010000010000000000000000405973070000000001c0f6e810a30100000100204aa9d1010000010088526a74000000405973070000000000000004d020426c6f636b20262065787472696e7369637320776569676874733a20626173652076616c75657320616e64206c696d6974732e2c426c6f636b4c656e6774684c6c696d6974733a3a426c6f636b4c656e6774683000003c00000050000000500004a820546865206d6178696d756d206c656e677468206f66206120626c6f636b2028696e206279746573292e38426c6f636b48617368436f756e7438543a3a426c6f636b4e756d6265721060090000045501204d6178696d756d206e756d626572206f6620626c6f636b206e756d62657220746f20626c6f636b2068617368206d617070696e677320746f206b65657020286f6c64657374207072756e6564206669727374292e2044625765696768743c52756e74696d6544625765696768744040787d010000000000e1f505000000000409012054686520776569676874206f662072756e74696d65206461746162617365206f7065726174696f6e73207468652072756e74696d652063616e20696e766f6b652e1c56657273696f6e3852756e74696d6556657273696f6e0503106e6f6465387375627374726174652d6e6f64650a000000090100000100000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a04000000d2bc9897eed08f1502000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b01000000020000000484204765742074686520636861696e27732063757272656e742076657273696f6e2e2853533538507265666978087538042a14a8205468652064657369676e61746564205353383520707265666978206f66207468697320636861696e2e0039012054686973207265706c6163657320746865202273733538466f726d6174222070726f7065727479206465636c6172656420696e2074686520636861696e20737065632e20526561736f6e20697331012074686174207468652072756e74696d652073686f756c64206b6e6f772061626f7574207468652070726566697820696e206f7264657220746f206d616b6520757365206f662069742061737020616e206964656e746966696572206f662074686520636861696e2e143c496e76616c6964537065634e616d6508150120546865206e616d65206f662073706563696669636174696f6e20646f6573206e6f74206d61746368206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e685370656356657273696f6e4e65656473546f496e637265617365084501205468652073706563696669636174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e744661696c6564546f4578747261637452756e74696d6556657273696f6e0cf0204661696c656420746f2065787472616374207468652072756e74696d652076657273696f6e2066726f6d20746865206e65772072756e74696d652e000d01204569746865722063616c6c696e672060436f72655f76657273696f6e60206f72206465636f64696e67206052756e74696d6556657273696f6e60206661696c65642e4c4e6f6e44656661756c74436f6d706f7369746504010120537569636964652063616c6c6564207768656e20746865206163636f756e7420686173206e6f6e2d64656661756c7420636f6d706f7369746520646174612e3c4e6f6e5a65726f526566436f756e740439012054686572652069732061206e6f6e2d7a65726f207265666572656e636520636f756e742070726576656e74696e6720746865206163636f756e742066726f6d206265696e67207075726765642e001c5574696c69747900010c146261746368041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e48802053656e642061206261746368206f662064697370617463682063616c6c732e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e006101204966206f726967696e20697320726f6f74207468656e2063616c6c2061726520646973706174636820776974686f757420636865636b696e67206f726967696e2066696c7465722e20285468697320696e636c75646573cc20627970617373696e6720606672616d655f73797374656d3a3a436f6e6669673a3a4261736543616c6c46696c74657260292e002c2023203c7765696768743e0501202d20436f6d706c65786974793a204f284329207768657265204320697320746865206e756d626572206f662063616c6c7320746f20626520626174636865642e302023203c2f7765696768743e00590120546869732077696c6c2072657475726e20604f6b6020696e20616c6c2063697263756d7374616e6365732e20546f2064657465726d696e65207468652073756363657373206f66207468652062617463682c20616e3501206576656e74206973206465706f73697465642e20496620612063616c6c206661696c656420616e64207468652062617463682077617320696e7465727275707465642c207468656e20746865590120604261746368496e74657272757074656460206576656e74206973206465706f73697465642c20616c6f6e67207769746820746865206e756d626572206f66207375636365737366756c2063616c6c73206d616465510120616e6420746865206572726f72206f6620746865206661696c65642063616c6c2e20496620616c6c2077657265207375636365737366756c2c207468656e2074686520604261746368436f6d706c657465646050206576656e74206973206465706f73697465642e3461735f646572697661746976650814696e6465780c7531361063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e34e02053656e6420612063616c6c207468726f75676820616e20696e64657865642070736575646f6e796d206f66207468652073656e6465722e0059012046696c7465722066726f6d206f726967696e206172652070617373656420616c6f6e672e205468652063616c6c2077696c6c2062652064697370617463686564207769746820616e206f726967696e207768696368c020757365207468652073616d652066696c74657220617320746865206f726967696e206f6620746869732063616c6c2e004901204e4f54453a20496620796f75206e65656420746f20656e73757265207468617420616e79206163636f756e742d62617365642066696c746572696e67206973206e6f7420686f6e6f7265642028692e652e6501206265636175736520796f7520657870656374206070726f78796020746f2068617665206265656e2075736564207072696f7220696e207468652063616c6c20737461636b20616e6420796f7520646f206e6f742077616e745501207468652063616c6c207265737472696374696f6e7320746f206170706c7920746f20616e79207375622d6163636f756e7473292c207468656e20757365206061735f6d756c74695f7468726573686f6c645f31608020696e20746865204d756c74697369672070616c6c657420696e73746561642e00f8204e4f54453a205072696f7220746f2076657273696f6e202a31322c2074686973207761732063616c6c6564206061735f6c696d697465645f737562602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e2462617463685f616c6c041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e34f02053656e642061206261746368206f662064697370617463682063616c6c7320616e642061746f6d6963616c6c792065786563757465207468656d2e2501205468652077686f6c65207472616e73616374696f6e2077696c6c20726f6c6c6261636b20616e64206661696c20696620616e79206f66207468652063616c6c73206661696c65642e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e006101204966206f726967696e20697320726f6f74207468656e2063616c6c2061726520646973706174636820776974686f757420636865636b696e67206f726967696e2066696c7465722e20285468697320696e636c75646573cc20627970617373696e6720606672616d655f73797374656d3a3a436f6e6669673a3a4261736543616c6c46696c74657260292e002c2023203c7765696768743e0501202d20436f6d706c65786974793a204f284329207768657265204320697320746865206e756d626572206f662063616c6c7320746f20626520626174636865642e302023203c2f7765696768743e0108404261746368496e746572727570746564080c7533323444697370617463684572726f72085901204261746368206f66206469737061746368657320646964206e6f7420636f6d706c6574652066756c6c792e20496e646578206f66206669727374206661696c696e6720646973706174636820676976656e2c206173902077656c6c20617320746865206572726f722e205c5b696e6465782c206572726f725c5d384261746368436f6d706c657465640004cc204261746368206f66206469737061746368657320636f6d706c657465642066756c6c792077697468206e6f206572726f722e0000011042616265011042616265402845706f6368496e64657801000c75363420000000000000000004542043757272656e742065706f636820696e6465782e2c417574686f72697469657301009c5665633c28417574686f7269747949642c2042616265417574686f72697479576569676874293e0400046c2043757272656e742065706f636820617574686f7269746965732e2c47656e65736973536c6f74010010536c6f7420000000000000000008f82054686520736c6f74206174207768696368207468652066697273742065706f63682061637475616c6c7920737461727465642e205468697320697320309020756e74696c2074686520666972737420626c6f636b206f662074686520636861696e2e2c43757272656e74536c6f74010010536c6f7420000000000000000004542043757272656e7420736c6f74206e756d6265722e2852616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e65737380000000000000000000000000000000000000000000000000000000000000000028b8205468652065706f63682072616e646f6d6e65737320666f7220746865202a63757272656e742a2065706f63682e002c20232053656375726974790005012054686973204d555354204e4f54206265207573656420666f722067616d626c696e672c2061732069742063616e20626520696e666c75656e6365642062792061f8206d616c6963696f75732076616c696461746f7220696e207468652073686f7274207465726d2e204974204d4159206265207573656420696e206d616e7915012063727970746f677261706869632070726f746f636f6c732c20686f77657665722c20736f206c6f6e67206173206f6e652072656d656d6265727320746861742074686973150120286c696b652065766572797468696e6720656c7365206f6e2d636861696e29206974206973207075626c69632e20466f72206578616d706c652c2069742063616e206265050120757365642077686572652061206e756d626572206973206e656564656420746861742063616e6e6f742068617665206265656e2063686f73656e20627920616e0d01206164766572736172792c20666f7220707572706f7365732073756368206173207075626c69632d636f696e207a65726f2d6b6e6f776c656467652070726f6f66732e6050656e64696e6745706f6368436f6e6669674368616e67650000504e657874436f6e66696744657363726970746f7204000461012050656e64696e672065706f636820636f6e66696775726174696f6e206368616e676520746861742077696c6c206265206170706c696564207768656e20746865206e6578742065706f636820697320656e61637465642e384e65787452616e646f6d6e6573730100587363686e6f72726b656c3a3a52616e646f6d6e657373800000000000000000000000000000000000000000000000000000000000000000045c204e6578742065706f63682072616e646f6d6e6573732e3c4e657874417574686f72697469657301009c5665633c28417574686f7269747949642c2042616265417574686f72697479576569676874293e04000460204e6578742065706f636820617574686f7269746965732e305365676d656e74496e64657801000c7533321000000000247c2052616e646f6d6e65737320756e64657220636f6e737472756374696f6e2e00f4205765206d616b6520612074726164656f6666206265747765656e2073746f7261676520616363657373657320616e64206c697374206c656e6774682e01012057652073746f72652074686520756e6465722d636f6e737472756374696f6e2072616e646f6d6e65737320696e207365676d656e7473206f6620757020746f942060554e4445525f434f4e535452554354494f4e5f5345474d454e545f4c454e475448602e00ec204f6e63652061207365676d656e7420726561636865732074686973206c656e6774682c20776520626567696e20746865206e657874206f6e652e090120576520726573657420616c6c207365676d656e747320616e642072657475726e20746f206030602061742074686520626567696e6e696e67206f662065766572791c2065706f63682e44556e646572436f6e737472756374696f6e0101050c7533326c5665633c7363686e6f72726b656c3a3a52616e646f6d6e6573733e0004000415012054574f582d4e4f54453a20605365676d656e74496e6465786020697320616e20696e6372656173696e6720696e74656765722c20736f2074686973206973206f6b61792e2c496e697469616c697a656400003c4d6179626552616e646f6d6e65737304000801012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e292077686963682069732060536f6d65601d01206966207065722d626c6f636b20696e697469616c697a6174696f6e2068617320616c7265616479206265656e2063616c6c656420666f722063757272656e7420626c6f636b2e4c417574686f7256726652616e646f6d6e65737301003c4d6179626552616e646f6d6e65737304000c5d012054656d706f726172792076616c75652028636c656172656420617420626c6f636b2066696e616c697a6174696f6e29207468617420696e636c756465732074686520565246206f75747075742067656e6572617465645101206174207468697320626c6f636b2e2054686973206669656c642073686f756c6420616c7761797320626520706f70756c6174656420647572696e6720626c6f636b2070726f63657373696e6720756e6c6573731901207365636f6e6461727920706c61696e20736c6f74732061726520656e61626c65642028776869636820646f6e277420636f6e7461696e206120565246206f7574707574292e2845706f6368537461727401008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d62657229200000000000000000145d012054686520626c6f636b206e756d62657273207768656e20746865206c61737420616e642063757272656e742065706f6368206861766520737461727465642c20726573706563746976656c7920604e2d316020616e641420604e602e4901204e4f54453a20576520747261636b207468697320697320696e206f7264657220746f20616e6e6f746174652074686520626c6f636b206e756d626572207768656e206120676976656e20706f6f6c206f66590120656e74726f7079207761732066697865642028692e652e20697420776173206b6e6f776e20746f20636861696e206f6273657276657273292e2053696e63652065706f6368732061726520646566696e656420696e590120736c6f74732c207768696368206d617920626520736b69707065642c2074686520626c6f636b206e756d62657273206d6179206e6f74206c696e6520757020776974682074686520736c6f74206e756d626572732e204c6174656e657373010038543a3a426c6f636b4e756d626572100000000014d820486f77206c617465207468652063757272656e7420626c6f636b20697320636f6d706172656420746f2069747320706172656e742e001501205468697320656e74727920697320706f70756c617465642061732070617274206f6620626c6f636b20657865637574696f6e20616e6420697320636c65616e65642075701101206f6e20626c6f636b2066696e616c697a6174696f6e2e205175657279696e6720746869732073746f7261676520656e747279206f757473696465206f6620626c6f636bb020657865637574696f6e20636f6e746578742073686f756c6420616c77617973207969656c64207a65726f2e2c45706f6368436f6e6669670000584261626545706f6368436f6e66696775726174696f6e04000485012054686520636f6e66696775726174696f6e20666f72207468652063757272656e742065706f63682e2053686f756c64206e6576657220626520604e6f6e656020617320697420697320696e697469616c697a656420696e2067656e657369732e3c4e65787445706f6368436f6e6669670000584261626545706f6368436f6e66696775726174696f6e0400082d012054686520636f6e66696775726174696f6e20666f7220746865206e6578742065706f63682c20604e6f6e65602069662074686520636f6e6669672077696c6c206e6f74206368616e6765e82028796f752063616e2066616c6c6261636b20746f206045706f6368436f6e6669676020696e737465616420696e20746861742063617365292e010c4c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f667045717569766f636174696f6e50726f6f663c543a3a4865616465723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66200d01205265706f727420617574686f726974792065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c207665726966790901207468652065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66110120616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e63652077696c6c34206265207265706f727465642e110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e48706c616e5f636f6e6669675f6368616e67650418636f6e666967504e657874436f6e66696744657363726970746f7210610120506c616e20616e2065706f636820636f6e666967206368616e67652e205468652065706f636820636f6e666967206368616e6765206973207265636f7264656420616e642077696c6c20626520656e6163746564206f6e550120746865206e6578742063616c6c20746f2060656e6163745f65706f63685f6368616e6765602e2054686520636f6e6669672077696c6c20626520616374697661746564206f6e652065706f63682061667465722e5d01204d756c7469706c652063616c6c7320746f2074686973206d6574686f642077696c6c207265706c61636520616e79206578697374696e6720706c616e6e656420636f6e666967206368616e676520746861742068616458206e6f74206265656e20656e6163746564207965742e00083445706f63684475726174696f6e0c75363420c8000000000000000cec2054686520616d6f756e74206f662074696d652c20696e20736c6f74732c207468617420656163682065706f63682073686f756c64206c6173742e1901204e4f54453a2043757272656e746c79206974206973206e6f7420706f737369626c6520746f206368616e6765207468652065706f6368206475726174696f6e20616674657221012074686520636861696e2068617320737461727465642e20417474656d7074696e6720746f20646f20736f2077696c6c20627269636b20626c6f636b2070726f64756374696f6e2e444578706563746564426c6f636b54696d6524543a3a4d6f6d656e7420b80b00000000000014050120546865206578706563746564206176657261676520626c6f636b2074696d6520617420776869636820424142452073686f756c64206265206372656174696e67110120626c6f636b732e2053696e636520424142452069732070726f626162696c6973746963206974206973206e6f74207472697669616c20746f20666967757265206f75740501207768617420746865206578706563746564206176657261676520626c6f636b2074696d652073686f756c64206265206261736564206f6e2074686520736c6f740901206475726174696f6e20616e642074686520736563757269747920706172616d657465722060636020287768657265206031202d20636020726570726573656e7473a0207468652070726f626162696c697479206f66206120736c6f74206265696e6720656d707479292e0c60496e76616c696445717569766f636174696f6e50726f6f6604350120416e2065717569766f636174696f6e2070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e60496e76616c69644b65794f776e65727368697050726f6f660435012041206b6579206f776e6572736869702070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e584475706c69636174654f6666656e63655265706f7274041901204120676976656e2065717569766f636174696f6e207265706f72742069732076616c69642062757420616c72656164792070726576696f75736c79207265706f727465642e022454696d657374616d70012454696d657374616d70080c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f01040c736574040c6e6f7748436f6d706163743c543a3a4d6f6d656e743e3c5820536574207468652063757272656e742074696d652e00590120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6ed82070686173652c20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e004501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062794420604d696e696d756d506572696f64602e00d820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060496e686572656e74602e002c2023203c7765696768743e3501202d20604f2831296020284e6f7465207468617420696d706c656d656e746174696f6e73206f6620604f6e54696d657374616d7053657460206d75737420616c736f20626520604f2831296029a101202d20312073746f72616765207265616420616e6420312073746f72616765206d75746174696f6e2028636f64656320604f28312960292e202862656361757365206f6620604469645570646174653a3a74616b656020696e20606f6e5f66696e616c697a656029d8202d2031206576656e742068616e646c657220606f6e5f74696d657374616d705f736574602e204d75737420626520604f283129602e302023203c2f7765696768743e0004344d696e696d756d506572696f6424543a3a4d6f6d656e7420dc0500000000000010690120546865206d696e696d756d20706572696f64206265747765656e20626c6f636b732e204265776172652074686174207468697320697320646966666572656e7420746f20746865202a65787065637465642a20706572696f64690120746861742074686520626c6f636b2070726f64756374696f6e206170706172617475732070726f76696465732e20596f75722063686f73656e20636f6e73656e7375732073797374656d2077696c6c2067656e6572616c6c79650120776f726b2077697468207468697320746f2064657465726d696e6520612073656e7369626c6520626c6f636b2074696d652e20652e672e20466f7220417572612c2069742077696c6c20626520646f75626c6520746869737020706572696f64206f6e2064656661756c742073657474696e67732e000328417574686f72736869700128417574686f72736869700c18556e636c65730100e85665633c556e636c65456e7472794974656d3c543a3a426c6f636b4e756d6265722c20543a3a486173682c20543a3a4163636f756e7449643e3e0400041c20556e636c657318417574686f72000030543a3a4163636f756e7449640400046420417574686f72206f662063757272656e7420626c6f636b2e30446964536574556e636c6573010010626f6f6c040004bc205768657468657220756e636c6573207765726520616c72656164792073657420696e207468697320626c6f636b2e0104287365745f756e636c657304286e65775f756e636c6573385665633c543a3a4865616465723e04642050726f76696465206120736574206f6620756e636c65732e00001c48496e76616c6964556e636c65506172656e74048c2054686520756e636c6520706172656e74206e6f7420696e2074686520636861696e2e40556e636c6573416c7265616479536574048420556e636c657320616c72656164792073657420696e2074686520626c6f636b2e34546f6f4d616e79556e636c6573044420546f6f206d616e7920756e636c65732e3047656e65736973556e636c6504582054686520756e636c652069732067656e657369732e30546f6f48696768556e636c6504802054686520756e636c6520697320746f6f206869676820696e20636861696e2e50556e636c65416c7265616479496e636c75646564047c2054686520756e636c6520697320616c726561647920696e636c756465642e204f6c64556e636c6504b82054686520756e636c652069736e277420726563656e7420656e6f75676820746f20626520696e636c756465642e041c496e6469636573011c496e646963657304204163636f756e74730001023c543a3a4163636f756e74496e6465788828543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20626f6f6c29000400048820546865206c6f6f6b75702066726f6d20696e64657820746f206163636f756e742e011414636c61696d0414696e6465783c543a3a4163636f756e74496e646578489c2041737369676e20616e2070726576696f75736c7920756e61737369676e656420696e6465782e00e0205061796d656e743a20604465706f736974602069732072657365727665642066726f6d207468652073656e646572206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e00f4202d2060696e646578603a2074686520696e64657820746f20626520636c61696d65642e2054686973206d757374206e6f7420626520696e207573652e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e207472616e73666572080c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e6465785061012041737369676e20616e20696e64657820616c7265616479206f776e6564206279207468652073656e64657220746f20616e6f74686572206163636f756e742e205468652062616c616e6365207265736572766174696f6ebc206973206566666563746976656c79207472616e7366657272656420746f20746865206e6577206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002901202d2060696e646578603a2074686520696e64657820746f2062652072652d61737369676e65642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e68202d204f6e65207472616e73666572206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743ae4202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429e8202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e742028726563697069656e7429302023203c2f7765696768743e10667265650414696e6465783c543a3a4163636f756e74496e6465784898204672656520757020616e20696e646578206f776e6564206279207468652073656e6465722e006101205061796d656e743a20416e792070726576696f7573206465706f73697420706c6163656420666f722074686520696e64657820697320756e726573657276656420696e207468652073656e646572206163636f756e742e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206f776e2074686520696e6465782e001101202d2060696e646578603a2074686520696e64657820746f2062652066726565642e2054686973206d757374206265206f776e6564206279207468652073656e6465722e008820456d6974732060496e646578467265656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e64202d204f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e38666f7263655f7472616e736665720c0c6e657730543a3a4163636f756e74496414696e6465783c543a3a4163636f756e74496e64657818667265657a6510626f6f6c54590120466f72636520616e20696e64657820746f20616e206163636f756e742e205468697320646f65736e277420726571756972652061206465706f7369742e2049662074686520696e64657820697320616c7265616479ec2068656c642c207468656e20616e79206465706f736974206973207265696d62757273656420746f206974732063757272656e74206f776e65722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00a8202d2060696e646578603a2074686520696e64657820746f206265202872652d2961737369676e65642e6101202d20606e6577603a20746865206e6577206f776e6572206f662074686520696e6465782e20546869732066756e6374696f6e2069732061206e6f2d6f7020696620697420697320657175616c20746f2073656e6465722e4501202d2060667265657a65603a2069662073657420746f206074727565602c2077696c6c20667265657a652074686520696e64657820736f2069742063616e6e6f74206265207472616e736665727265642e009420456d6974732060496e64657841737369676e656460206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e7c202d20557020746f206f6e652072657365727665206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743af8202020202d2052656164733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229fc202020202d205772697465733a20496e6469636573204163636f756e74732c2053797374656d204163636f756e7420286f726967696e616c206f776e657229302023203c2f7765696768743e18667265657a650414696e6465783c543a3a4163636f756e74496e64657844690120467265657a6520616e20696e64657820736f2069742077696c6c20616c7761797320706f696e7420746f207468652073656e646572206163636f756e742e205468697320636f6e73756d657320746865206465706f7369742e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d7573742068617665206170206e6f6e2d66726f7a656e206163636f756e742060696e646578602e00b0202d2060696e646578603a2074686520696e64657820746f2062652066726f7a656e20696e20706c6163652e008c20456d6974732060496e64657846726f7a656e60206966207375636365737366756c2e002c2023203c7765696768743e28202d20604f283129602e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28312960292e74202d20557020746f206f6e6520736c617368206f7065726174696f6e2e34202d204f6e65206576656e742e50202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d94202d204442205765696768743a203120526561642f577269746520284163636f756e747329302023203c2f7765696768743e010c34496e64657841737369676e656408244163636f756e744964304163636f756e74496e64657804b42041206163636f756e7420696e646578207761732061737369676e65642e205c5b696e6465782c2077686f5c5d28496e646578467265656404304163636f756e74496e64657804e82041206163636f756e7420696e64657820686173206265656e2066726565642075702028756e61737369676e6564292e205c5b696e6465785c5d2c496e64657846726f7a656e08304163636f756e74496e646578244163636f756e7449640429012041206163636f756e7420696e64657820686173206265656e2066726f7a656e20746f206974732063757272656e74206163636f756e742049442e205c5b696e6465782c2077686f5c5d041c4465706f7369743042616c616e63654f663c543e4000407a10f35a0000000000000000000004ac20546865206465706f736974206e656564656420666f7220726573657276696e6720616e20696e6465782e142c4e6f7441737369676e656404902054686520696e64657820776173206e6f7420616c72656164792061737369676e65642e204e6f744f776e657204a82054686520696e6465782069732061737369676e656420746f20616e6f74686572206163636f756e742e14496e55736504742054686520696e64657820776173206e6f7420617661696c61626c652e2c4e6f745472616e7366657204cc2054686520736f7572636520616e642064657374696e6174696f6e206163636f756e747320617265206964656e746963616c2e245065726d616e656e7404d42054686520696e646578206973207065726d616e656e7420616e64206d6179206e6f742062652066726565642f6368616e6765642e052042616c616e636573012042616c616e6365731034546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004982054686520746f74616c20756e6974732069737375656420696e207468652073797374656d2e1c4163636f756e7401010230543a3a4163636f756e7449645c4163636f756e74446174613c543a3a42616c616e63653e000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c6c205468652062616c616e6365206f6620616e206163636f756e742e004101204e4f54453a2054686973206973206f6e6c79207573656420696e207468652063617365207468617420746869732070616c6c6574206973207573656420746f2073746f72652062616c616e6365732e144c6f636b7301010230543a3a4163636f756e744964705665633c42616c616e63654c6f636b3c543a3a42616c616e63653e3e00040008b820416e79206c6971756964697479206c6f636b73206f6e20736f6d65206163636f756e742062616c616e6365732e2501204e4f54453a2053686f756c64206f6e6c79206265206163636573736564207768656e2073657474696e672c206368616e67696e6720616e642066726565696e672061206c6f636b2e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076322e302e3020666f72206e6577206e6574776f726b732e0110207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e6cd8205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572206163636f756e742e00090120607472616e73666572602077696c6c207365742074686520604672656542616c616e636560206f66207468652073656e64657220616e642072656365697665722e21012049742077696c6c2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d2062792074686520605472616e73666572466565602e1501204966207468652073656e6465722773206163636f756e742069732062656c6f7720746865206578697374656e7469616c206465706f736974206173206120726573756c74b4206f6620746865207472616e736665722c20746865206163636f756e742077696c6c206265207265617065642e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605369676e65646020627920746865207472616e736163746f722e002c2023203c7765696768743e3101202d20446570656e64656e74206f6e20617267756d656e747320627574206e6f7420637269746963616c2c20676976656e2070726f70657220696d706c656d656e746174696f6e7320666f72cc202020696e70757420636f6e6669672074797065732e205365652072656c617465642066756e6374696f6e732062656c6f772e6901202d20497420636f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e642077726974657320696e7465726e616c6c7920616e64206e6f20636f6d706c657820636f6d7075746174696f6e2e004c2052656c617465642066756e6374696f6e733a0051012020202d2060656e737572655f63616e5f77697468647261776020697320616c776179732063616c6c656420696e7465726e616c6c792062757420686173206120626f756e64656420636f6d706c65786974792e2d012020202d205472616e7366657272696e672062616c616e63657320746f206163636f756e7473207468617420646964206e6f74206578697374206265666f72652077696c6c206361757365d420202020202060543a3a4f6e4e65774163636f756e743a3a6f6e5f6e65775f6163636f756e746020746f2062652063616c6c65642e61012020202d2052656d6f76696e6720656e6f7567682066756e64732066726f6d20616e206163636f756e742077696c6c20747269676765722060543a3a4475737452656d6f76616c3a3a6f6e5f756e62616c616e636564602e49012020202d20607472616e736665725f6b6565705f616c6976656020776f726b73207468652073616d652077617920617320607472616e73666572602c206275742068617320616e206164646974696f6e616cf82020202020636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c20746865206f726967696e206163636f756e742e88202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d4501202d2042617365205765696768743a2037332e363420c2b5732c20776f7273742063617365207363656e6172696f20286163636f756e7420637265617465642c206163636f756e742072656d6f76656429dc202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374696e6174696f6e206163636f756e741501202d204f726967696e206163636f756e7420697320616c726561647920696e206d656d6f72792c20736f206e6f204442206f7065726174696f6e7320666f72207468656d2e302023203c2f7765696768743e2c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365206e65775f667265654c436f6d706163743c543a3a42616c616e63653e306e65775f72657365727665644c436f6d706163743c543a3a42616c616e63653e489420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e00210120546869732077696c6c20616c74657220604672656542616c616e63656020616e642060526573657276656442616c616e63656020696e2073746f726167652e2069742077696c6c090120616c736f2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d202860546f74616c49737375616e636560292e190120496620746865206e65772066726565206f722072657365727665642062616c616e63652069732062656c6f7720746865206578697374656e7469616c206465706f7369742c01012069742077696c6c20726573657420746865206163636f756e74206e6f6e63652028606672616d655f73797374656d3a3a4163636f756e744e6f6e636560292e00b420546865206469737061746368206f726967696e20666f7220746869732063616c6c2069732060726f6f74602e002c2023203c7765696768743e80202d20496e646570656e64656e74206f662074686520617267756d656e74732ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e58202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d3c202d2042617365205765696768743a6820202020202d204372656174696e673a2032372e353620c2b5736420202020202d204b696c6c696e673a2033352e313120c2b57398202d204442205765696768743a203120526561642c203120577269746520746f206077686f60302023203c2f7765696768743e38666f7263655f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e1851012045786163746c7920617320607472616e73666572602c2065786365707420746865206f726967696e206d75737420626520726f6f7420616e642074686520736f75726365206163636f756e74206d61792062652c207370656369666965642e2c2023203c7765696768743e4101202d2053616d65206173207472616e736665722c20627574206164646974696f6e616c207265616420616e6420777269746520626563617573652074686520736f75726365206163636f756e74206973902020206e6f7420617373756d656420746f20626520696e20746865206f7665726c61792e302023203c2f7765696768743e4c7472616e736665725f6b6565705f616c6976650810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e2c51012053616d6520617320746865205b607472616e73666572605d2063616c6c2c206275742077697468206120636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c2074686540206f726967696e206163636f756e742e00bc20393925206f66207468652074696d6520796f752077616e74205b607472616e73666572605d20696e73746561642e00c4205b607472616e73666572605d3a207374727563742e50616c6c65742e68746d6c236d6574686f642e7472616e736665722c2023203c7765696768743ee8202d2043686561706572207468616e207472616e736665722062656361757365206163636f756e742063616e6e6f74206265206b696c6c65642e60202d2042617365205765696768743a2035312e3420c2b5731d01202d204442205765696768743a2031205265616420616e64203120577269746520746f2064657374202873656e64657220697320696e206f7665726c617920616c7265616479292c20233c2f7765696768743e01201c456e646f77656408244163636f756e7449641c42616c616e636504250120416e206163636f756e74207761732063726561746564207769746820736f6d6520667265652062616c616e63652e205c5b6163636f756e742c20667265655f62616c616e63655c5d20447573744c6f737408244163636f756e7449641c42616c616e636508410120416e206163636f756e74207761732072656d6f7665642077686f73652062616c616e636520776173206e6f6e2d7a65726f206275742062656c6f77204578697374656e7469616c4465706f7369742cd020726573756c74696e6720696e20616e206f75747269676874206c6f73732e205c5b6163636f756e742c2062616c616e63655c5d205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e636504a0205472616e73666572207375636365656465642e205c5b66726f6d2c20746f2c2076616c75655c5d2842616c616e63655365740c244163636f756e7449641c42616c616e63651c42616c616e636504cc20412062616c616e6365207761732073657420627920726f6f742e205c5b77686f2c20667265652c2072657365727665645c5d1c4465706f73697408244163636f756e7449641c42616c616e636504210120536f6d6520616d6f756e7420776173206465706f73697465642028652e672e20666f72207472616e73616374696f6e2066656573292e205c5b77686f2c206465706f7369745c5d20526573657276656408244163636f756e7449641c42616c616e636504210120536f6d652062616c616e63652077617320726573657276656420286d6f7665642066726f6d206672656520746f207265736572766564292e205c5b77686f2c2076616c75655c5d28556e726573657276656408244163636f756e7449641c42616c616e636504290120536f6d652062616c616e63652077617320756e726573657276656420286d6f7665642066726f6d20726573657276656420746f2066726565292e205c5b77686f2c2076616c75655c5d4852657365727665526570617472696174656410244163636f756e744964244163636f756e7449641c42616c616e6365185374617475730c510120536f6d652062616c616e636520776173206d6f7665642066726f6d207468652072657365727665206f6620746865206669727374206163636f756e7420746f20746865207365636f6e64206163636f756e742edc2046696e616c20617267756d656e7420696e64696361746573207468652064657374696e6174696f6e2062616c616e636520747970652ea8205c5b66726f6d2c20746f2c2062616c616e63652c2064657374696e6174696f6e5f7374617475735c5d04484578697374656e7469616c4465706f73697428543a3a42616c616e63654000407a10f35a0000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f206b65657020616e206163636f756e74206f70656e2e203856657374696e6742616c616e6365049c2056657374696e672062616c616e636520746f6f206869676820746f2073656e642076616c7565544c69717569646974795265737472696374696f6e7304c8204163636f756e74206c6971756964697479207265737472696374696f6e732070726576656e74207769746864726177616c204f766572666c6f77047420476f7420616e206f766572666c6f7720616674657220616464696e674c496e73756666696369656e7442616c616e636504782042616c616e636520746f6f206c6f7720746f2073656e642076616c7565484578697374656e7469616c4465706f73697404ec2056616c756520746f6f206c6f7720746f20637265617465206163636f756e742064756520746f206578697374656e7469616c206465706f736974244b656570416c6976650490205472616e736665722f7061796d656e7420776f756c64206b696c6c206163636f756e745c4578697374696e6756657374696e675363686564756c6504cc20412076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e742c446561644163636f756e74048c2042656e6566696369617279206163636f756e74206d757374207072652d657869737406485472616e73616374696f6e5061796d656e7401485472616e73616374696f6e5061796d656e7408444e6578744665654d756c7469706c6965720100284d756c7469706c69657240000064a7b3b6e00d0000000000000000003853746f7261676556657273696f6e01002052656c6561736573040000000008485472616e73616374696f6e427974654665653042616c616e63654f663c543e4000e40b54020000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e2c576569676874546f466565a45665633c576569676874546f466565436f656666696369656e743c42616c616e63654f663c543e3e3e5c0401000000000000000000000000000000000000000001040d012054686520706f6c796e6f6d69616c2074686174206973206170706c69656420696e206f7264657220746f20646572697665206665652066726f6d207765696768742e000768456c656374696f6e50726f76696465724d756c746950686173650168456c656374696f6e50726f76696465724d756c746950686173651814526f756e6401000c753332100100000018ac20496e7465726e616c20636f756e74657220666f7220746865206e756d626572206f6620726f756e64732e00550120546869732069732075736566756c20666f722064652d6475706c69636174696f6e206f66207472616e73616374696f6e73207375626d697474656420746f2074686520706f6f6c2c20616e642067656e6572616c6c20646961676e6f7374696373206f66207468652070616c6c65742e004d012054686973206973206d6572656c7920696e6372656d656e746564206f6e6365207065722065766572792074696d65207468617420616e20757073747265616d2060656c656374602069732063616c6c65642e3043757272656e74506861736501005450686173653c543a3a426c6f636b4e756d6265723e0400043c2043757272656e742070686173652e38517565756564536f6c7574696f6e00006c5265616479536f6c7574696f6e3c543a3a4163636f756e7449643e0400043d012043757272656e74206265737420736f6c7574696f6e2c207369676e6564206f7220756e7369676e65642c2071756575656420746f2062652072657475726e65642075706f6e2060656c656374602e20536e617073686f7400006c526f756e64536e617073686f743c543a3a4163636f756e7449643e04000c7020536e617073686f742064617461206f662074686520726f756e642e005d01205468697320697320637265617465642061742074686520626567696e6e696e67206f6620746865207369676e656420706861736520616e6420636c65617265642075706f6e2063616c6c696e672060656c656374602e38446573697265645461726765747300000c75333204000ccc2044657369726564206e756d626572206f66207461726765747320746f20656c65637420666f72207468697320726f756e642e00a8204f6e6c7920657869737473207768656e205b60536e617073686f74605d2069732070726573656e742e40536e617073686f744d65746164617461000058536f6c7574696f6e4f72536e617073686f7453697a6504000c9820546865206d65746164617461206f6620746865205b60526f756e64536e617073686f74605d00a8204f6e6c7920657869737473207768656e205b60536e617073686f74605d2069732070726573656e742e01043c7375626d69745f756e7369676e65640820736f6c7574696f6e64526177536f6c7574696f6e3c436f6d706163744f663c543e3e1c7769746e65737358536f6c7574696f6e4f72536e617073686f7453697a6538a8205375626d6974206120736f6c7574696f6e20666f722074686520756e7369676e65642070686173652e00cc20546865206469737061746368206f726967696e20666f20746869732063616c6c206d757374206265205f5f6e6f6e655f5f2e0041012054686973207375626d697373696f6e20697320636865636b6564206f6e2074686520666c792e204d6f72656f7665722c207468697320756e7369676e656420736f6c7574696f6e206973206f6e6c7959012076616c696461746564207768656e207375626d697474656420746f2074686520706f6f6c2066726f6d20746865202a2a6c6f63616c2a2a206e6f64652e204566666563746976656c792c2074686973206d65616e7361012074686174206f6e6c79206163746976652076616c696461746f72732063616e207375626d69742074686973207472616e73616374696f6e207768656e20617574686f72696e67206120626c6f636b202873696d696c61724420746f20616e20696e686572656e74292e005d0120546f2070726576656e7420616e7920696e636f727265637420736f6c7574696f6e2028616e642074687573207761737465642074696d652f776569676874292c2074686973207472616e73616374696f6e2077696c6c51012070616e69632069662074686520736f6c7574696f6e207375626d6974746564206279207468652076616c696461746f7220697320696e76616c696420696e20616e79207761792c206566666563746976656c79a02070757474696e6720746865697220617574686f72696e6720726577617264206174207269736b2e00e4204e6f206465706f736974206f7220726577617264206973206173736f63696174656420776974682074686973207375626d697373696f6e2e011838536f6c7574696f6e53746f726564043c456c656374696f6e436f6d7075746510b8204120736f6c7574696f6e207761732073746f72656420776974682074686520676976656e20636f6d707574652e0041012049662074686520736f6c7574696f6e206973207369676e65642c2074686973206d65616e732074686174206974206861736e277420796574206265656e2070726f6365737365642e20496620746865090120736f6c7574696f6e20697320756e7369676e65642c2074686973206d65616e7320746861742069742068617320616c736f206265656e2070726f6365737365642e44456c656374696f6e46696e616c697a6564045c4f7074696f6e3c456c656374696f6e436f6d707574653e0859012054686520656c656374696f6e20686173206265656e2066696e616c697a65642c20776974682060536f6d6560206f662074686520676976656e20636f6d7075746174696f6e2c206f7220656c7365206966207468656420656c656374696f6e206661696c65642c20604e6f6e65602e20526577617264656404244163636f756e74496404290120416e206163636f756e7420686173206265656e20726577617264656420666f72207468656972207369676e6564207375626d697373696f6e206265696e672066696e616c697a65642e1c536c617368656404244163636f756e74496404250120416e206163636f756e7420686173206265656e20736c617368656420666f72207375626d697474696e6720616e20696e76616c6964207369676e6564207375626d697373696f6e2e485369676e6564506861736553746172746564040c75333204c420546865207369676e6564207068617365206f662074686520676976656e20726f756e642068617320737461727465642e50556e7369676e6564506861736553746172746564040c75333204cc2054686520756e7369676e6564207068617365206f662074686520676976656e20726f756e642068617320737461727465642e0c34556e7369676e6564506861736538543a3a426c6f636b4e756d62657210320000000480204475726174696f6e206f662074686520756e7369676e65642070686173652e2c5369676e6564506861736538543a3a426c6f636b4e756d62657210320000000478204475726174696f6e206f6620746865207369676e65642070686173652e70536f6c7574696f6e496d70726f76656d656e745468726573686f6c641c50657262696c6c10a0860100084d0120546865206d696e696d756d20616d6f756e74206f6620696d70726f76656d656e7420746f2074686520736f6c7574696f6e2073636f7265207468617420646566696e6573206120736f6c7574696f6e206173642022626574746572222028696e20616e79207068617365292e0c6850726544697370617463684561726c795375626d697373696f6e0468205375626d697373696f6e2077617320746f6f206561726c792e6c507265446973706174636857726f6e6757696e6e6572436f756e74048c2057726f6e67206e756d626572206f662077696e6e6572732070726573656e7465642e6450726544697370617463685765616b5375626d697373696f6e0494205375626d697373696f6e2077617320746f6f207765616b2c2073636f72652d776973652e081c5374616b696e67011c5374616b696e677830486973746f7279446570746801000c75333210540000001c8c204e756d626572206f66206572617320746f206b65657020696e20686973746f72792e00390120496e666f726d6174696f6e206973206b65707420666f72206572617320696e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e006101204d757374206265206d6f7265207468616e20746865206e756d626572206f6620657261732064656c617965642062792073657373696f6e206f74686572776973652e20492e652e2061637469766520657261206d757374390120616c7761797320626520696e20686973746f72792e20492e652e20606163746976655f657261203e2063757272656e745f657261202d20686973746f72795f646570746860206d757374206265302067756172616e746565642e3856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321000000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e34496e76756c6e657261626c65730100445665633c543a3a4163636f756e7449643e04000c590120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c79206b69636b65642e20497427732061205665632073696e636520746865792772654d01206561737920746f20696e697469616c697a6520616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f7572ac20696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e18426f6e64656400010530543a3a4163636f756e74496430543a3a4163636f756e744964000400040101204d61702066726f6d20616c6c206c6f636b65642022737461736822206163636f756e747320746f2074686520636f6e74726f6c6c6572206163636f756e742e184c656467657200010230543a3a4163636f756e744964a45374616b696e674c65646765723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400044501204d61702066726f6d20616c6c2028756e6c6f636b6564292022636f6e74726f6c6c657222206163636f756e747320746f2074686520696e666f20726567617264696e6720746865207374616b696e672e14506179656501010530543a3a4163636f756e7449647c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e00040004e42057686572652074686520726577617264207061796d656e742073686f756c64206265206d6164652e204b657965642062792073746173682e2856616c696461746f727301010530543a3a4163636f756e7449643856616c696461746f7250726566730008000004450120546865206d61702066726f6d202877616e6e616265292076616c696461746f72207374617368206b657920746f2074686520707265666572656e636573206f6620746861742076616c696461746f722e284e6f6d696e61746f727300010530543a3a4163636f756e744964644e6f6d696e6174696f6e733c543a3a4163636f756e7449643e00040004650120546865206d61702066726f6d206e6f6d696e61746f72207374617368206b657920746f2074686520736574206f66207374617368206b657973206f6620616c6c2076616c696461746f727320746f206e6f6d696e6174652e2843757272656e74457261000020457261496e6465780400105c205468652063757272656e742065726120696e6465782e006501205468697320697320746865206c617465737420706c616e6e6564206572612c20646570656e64696e67206f6e20686f77207468652053657373696f6e2070616c6c657420717565756573207468652076616c696461746f7280207365742c206974206d6967687420626520616374697665206f72206e6f742e24416374697665457261000034416374697665457261496e666f040010d820546865206163746976652065726120696e666f726d6174696f6e2c20697420686f6c647320696e64657820616e642073746172742e0059012054686520616374697665206572612069732074686520657261206265696e672063757272656e746c792072657761726465642e2056616c696461746f7220736574206f66207468697320657261206d757374206265ac20657175616c20746f205b6053657373696f6e496e746572666163653a3a76616c696461746f7273605d2e5445726173537461727453657373696f6e496e64657800010520457261496e6465783053657373696f6e496e646578000400103101205468652073657373696f6e20696e646578206174207768696368207468652065726120737461727420666f7220746865206c6173742060484953544f52595f44455054486020657261732e006101204e6f74653a205468697320747261636b7320746865207374617274696e672073657373696f6e2028692e652e2073657373696f6e20696e646578207768656e20657261207374617274206265696e672061637469766529f020666f7220746865206572617320696e20605b43757272656e74457261202d20484953544f52595f44455054482c2043757272656e744572615d602e2c457261735374616b65727301020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000001878204578706f73757265206f662076616c696461746f72206174206572612e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e48457261735374616b657273436c697070656401020520457261496e64657830543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e050c0000002c9820436c6970706564204578706f73757265206f662076616c696461746f72206174206572612e00590120546869732069732073696d696c617220746f205b60457261735374616b657273605d20627574206e756d626572206f66206e6f6d696e61746f7273206578706f736564206973207265647563656420746f20746865dc2060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732e1d0120284e6f74653a20746865206669656c642060746f74616c6020616e6420606f776e60206f6620746865206578706f737572652072656d61696e7320756e6368616e676564292ef42054686973206973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e005d012054686973206973206b657965642066697374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4101204966207374616b657273206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e20656d707479206578706f737572652069732072657475726e65642e484572617356616c696461746f72507265667301020520457261496e64657830543a3a4163636f756e7449643856616c696461746f725072656673050800001411012053696d696c617220746f2060457261735374616b657273602c207468697320686f6c64732074686520707265666572656e636573206f662076616c696461746f72732e0061012054686973206973206b65796564206669727374206279207468652065726120696e64657820746f20616c6c6f772062756c6b2064656c6574696f6e20616e64207468656e20746865207374617368206163636f756e742e00a82049732069742072656d6f7665642061667465722060484953544f52595f44455054486020657261732e4c4572617356616c696461746f7252657761726400010520457261496e6465783042616c616e63654f663c543e0004000c09012054686520746f74616c2076616c696461746f7220657261207061796f757420666f7220746865206c6173742060484953544f52595f44455054486020657261732e0021012045726173207468617420686176656e27742066696e697368656420796574206f7220686173206265656e2072656d6f76656420646f65736e27742068617665207265776172642e4045726173526577617264506f696e747301010520457261496e64657874457261526577617264506f696e74733c543a3a4163636f756e7449643e0014000000000008ac205265776172647320666f7220746865206c6173742060484953544f52595f44455054486020657261732e250120496620726577617264206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207265776172642069732072657475726e65642e3845726173546f74616c5374616b6501010520457261496e6465783042616c616e63654f663c543e00400000000000000000000000000000000008ec2054686520746f74616c20616d6f756e74207374616b656420666f7220746865206c6173742060484953544f52595f44455054486020657261732e1d0120496620746f74616c206861736e2774206265656e20736574206f7220686173206265656e2072656d6f766564207468656e2030207374616b652069732072657475726e65642e20466f72636545726101001c466f7263696e6704000454204d6f6465206f662065726120666f7263696e672e4c536c6173685265776172644672616374696f6e01001c50657262696c6c10000000000cf8205468652070657263656e74616765206f662074686520736c617368207468617420697320646973747269627574656420746f207265706f72746572732e00e4205468652072657374206f662074686520736c61736865642076616c75652069732068616e646c6564206279207468652060536c617368602e4c43616e63656c6564536c6173685061796f757401003042616c616e63654f663c543e40000000000000000000000000000000000815012054686520616d6f756e74206f662063757272656e637920676976656e20746f207265706f7274657273206f66206120736c617368206576656e7420776869636820776173ec2063616e63656c65642062792065787472616f7264696e6172792063697263756d7374616e6365732028652e672e20676f7665726e616e6365292e40556e6170706c696564536c617368657301010520457261496e646578bc5665633c556e6170706c696564536c6173683c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e00040004c420416c6c20756e6170706c69656420736c61736865732074686174206172652071756575656420666f72206c617465722e28426f6e646564457261730100745665633c28457261496e6465782c2053657373696f6e496e646578293e04001025012041206d617070696e672066726f6d207374696c6c2d626f6e646564206572617320746f207468652066697273742073657373696f6e20696e646578206f662074686174206572612e00c8204d75737420636f6e7461696e7320696e666f726d6174696f6e20666f72206572617320666f72207468652072616e67653abc20605b6163746976655f657261202d20626f756e64696e675f6475726174696f6e3b206163746976655f6572615d604c56616c696461746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449645c2850657262696c6c2c2042616c616e63654f663c543e2905040008450120416c6c20736c617368696e67206576656e7473206f6e2076616c696461746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682070726f706f7274696f6e7020616e6420736c6173682076616c7565206f6620746865206572612e4c4e6f6d696e61746f72536c617368496e45726100020520457261496e64657830543a3a4163636f756e7449643042616c616e63654f663c543e05040004610120416c6c20736c617368696e67206576656e7473206f6e206e6f6d696e61746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682076616c7565206f6620746865206572612e34536c617368696e675370616e7300010530543a3a4163636f756e7449645c736c617368696e673a3a536c617368696e675370616e73000400048c20536c617368696e67207370616e7320666f72207374617368206163636f756e74732e245370616e536c6173680101058c28543a3a4163636f756e7449642c20736c617368696e673a3a5370616e496e6465782988736c617368696e673a3a5370616e5265636f72643c42616c616e63654f663c543e3e00800000000000000000000000000000000000000000000000000000000000000000083d01205265636f72647320696e666f726d6174696f6e2061626f757420746865206d6178696d756d20736c617368206f6620612073746173682077697468696e206120736c617368696e67207370616e2cb82061732077656c6c20617320686f77206d7563682072657761726420686173206265656e2070616964206f75742e584561726c69657374556e6170706c696564536c617368000020457261496e646578040004fc20546865206561726c696573742065726120666f72207768696368207765206861766520612070656e64696e672c20756e6170706c69656420736c6173682e5443757272656e74506c616e6e656453657373696f6e01003053657373696f6e496e64657810000000000ce820546865206c61737420706c616e6e65642073657373696f6e207363686564756c6564206279207468652073657373696f6e2070616c6c65742e0031012054686973206973206261736963616c6c7920696e2073796e632077697468207468652063616c6c20746f205b6053657373696f6e4d616e616765723a3a6e65775f73657373696f6e605d2e3853746f7261676556657273696f6e01002052656c6561736573040510cc2054727565206966206e6574776f726b20686173206265656e20757067726164656420746f20746869732076657273696f6e2e7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e00a020546869732069732073657420746f2076362e302e3020666f72206e6577206e6574776f726b732e015c10626f6e640c28636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e1470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e5865012054616b6520746865206f726967696e206163636f756e74206173206120737461736820616e64206c6f636b207570206076616c756560206f66206974732062616c616e63652e2060636f6e74726f6c6c6572602077696c6c8420626520746865206163636f756e74207468617420636f6e74726f6c732069742e003101206076616c756560206d757374206265206d6f7265207468616e2074686520606d696e696d756d5f62616c616e636560207370656369666965642062792060543a3a43757272656e6379602e00250120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20627920746865207374617368206163636f756e742e004020456d6974732060426f6e646564602e002c2023203c7765696768743ed4202d20496e646570656e64656e74206f662074686520617267756d656e74732e204d6f64657261746520636f6d706c65786974792e20202d204f2831292e68202d20546872656520657874726120444220656e74726965732e005101204e4f54453a2054776f206f66207468652073746f726167652077726974657320286053656c663a3a626f6e646564602c206053656c663a3a7061796565602920617265205f6e657665725f20636c65616e6564410120756e6c6573732074686520606f726967696e602066616c6c732062656c6f77205f6578697374656e7469616c206465706f7369745f20616e6420676574732072656d6f76656420617320647573742e4c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a3101202d20526561643a20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c2043757272656e74204572612c20486973746f72792044657074682c204c6f636b73e0202d2057726974653a20426f6e6465642c2050617965652c205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e28626f6e645f657874726104386d61785f6164646974696f6e616c54436f6d706163743c42616c616e63654f663c543e3e5465012041646420736f6d6520657874726120616d6f756e742074686174206861766520617070656172656420696e207468652073746173682060667265655f62616c616e63656020696e746f207468652062616c616e63652075703420666f72207374616b696e672e00510120557365207468697320696620746865726520617265206164646974696f6e616c2066756e647320696e20796f7572207374617368206163636f756e74207468617420796f75207769736820746f20626f6e642e650120556e6c696b65205b60626f6e64605d206f72205b60756e626f6e64605d20746869732066756e6374696f6e20646f6573206e6f7420696d706f736520616e79206c696d69746174696f6e206f6e2074686520616d6f756e744c20746861742063616e2062652061646465642e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c657220616e64f82069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004020456d6974732060426f6e646564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e20202d204f2831292e40202d204f6e6520444220656e7472792e34202d2d2d2d2d2d2d2d2d2d2d2d2c204442205765696768743a1501202d20526561643a2045726120456c656374696f6e205374617475732c20426f6e6465642c204c65646765722c205b4f726967696e204163636f756e745d2c204c6f636b73a4202d2057726974653a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e18756e626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e805501205363686564756c65206120706f7274696f6e206f662074686520737461736820746f20626520756e6c6f636b656420726561647920666f72207472616e73666572206f75742061667465722074686520626f6e64010120706572696f6420656e64732e2049662074686973206c656176657320616e20616d6f756e74206163746976656c7920626f6e646564206c657373207468616e250120543a3a43757272656e63793a3a6d696e696d756d5f62616c616e636528292c207468656e20697420697320696e6372656173656420746f207468652066756c6c20616d6f756e742e004901204f6e63652074686520756e6c6f636b20706572696f6420697320646f6e652c20796f752063616e2063616c6c206077697468647261775f756e626f6e6465646020746f2061637475616c6c79206d6f7665c0207468652066756e6473206f7574206f66206d616e6167656d656e7420726561647920666f72207472616e736665722e003d01204e6f206d6f7265207468616e2061206c696d69746564206e756d626572206f6620756e6c6f636b696e67206368756e6b73202873656520604d41585f554e4c4f434b494e475f4348554e4b5360293d012063616e20636f2d657869737473206174207468652073616d652074696d652e20496e207468617420636173652c205b6043616c6c3a3a77697468647261775f756e626f6e646564605d206e656564fc20746f2062652063616c6c656420666972737420746f2072656d6f766520736f6d65206f6620746865206368756e6b732028696620706f737369626c65292e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004820456d6974732060556e626f6e646564602e00982053656520616c736f205b6043616c6c3a3a77697468647261775f756e626f6e646564605d2e002c2023203c7765696768743e4101202d20496e646570656e64656e74206f662074686520617267756d656e74732e204c696d697465642062757420706f74656e7469616c6c79206578706c6f697461626c6520636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732e6501202d20456163682063616c6c20287265717569726573207468652072656d61696e646572206f662074686520626f6e6465642062616c616e636520746f2062652061626f766520606d696e696d756d5f62616c616e63656029710120202077696c6c2063617573652061206e657720656e74727920746f20626520696e73657274656420696e746f206120766563746f722028604c65646765722e756e6c6f636b696e676029206b65707420696e2073746f726167652e5101202020546865206f6e6c792077617920746f20636c65616e207468652061666f72656d656e74696f6e65642073746f72616765206974656d20697320616c736f20757365722d636f6e74726f6c6c6564207669615c2020206077697468647261775f756e626f6e646564602e40202d204f6e6520444220656e7472792e2c202d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a1d01202d20526561643a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e744572612c204c6f636b732c2042616c616e63654f662053746173682ca4202d2057726974653a204c6f636b732c204c65646765722c2042616c616e63654f662053746173682c28203c2f7765696768743e4477697468647261775f756e626f6e64656404486e756d5f736c617368696e675f7370616e730c7533327c2d012052656d6f766520616e7920756e6c6f636b6564206368756e6b732066726f6d207468652060756e6c6f636b696e67602071756575652066726f6d206f7572206d616e6167656d656e742e003501205468697320657373656e7469616c6c7920667265657320757020746861742062616c616e636520746f206265207573656420627920746865207374617368206163636f756e7420746f20646f4c2077686174657665722069742077616e74732e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e004c20456d697473206057697468647261776e602e006c2053656520616c736f205b6043616c6c3a3a756e626f6e64605d2e002c2023203c7765696768743e5501202d20436f756c6420626520646570656e64656e74206f6e2074686520606f726967696e6020617267756d656e7420616e6420686f77206d7563682060756e6c6f636b696e6760206368756e6b732065786973742e45012020497420696d706c6965732060636f6e736f6c69646174655f756e6c6f636b656460207768696368206c6f6f7073206f76657220604c65646765722e756e6c6f636b696e67602c207768696368206973f42020696e6469726563746c7920757365722d636f6e74726f6c6c65642e20536565205b60756e626f6e64605d20666f72206d6f72652064657461696c2e7901202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732c20796574207468652073697a65206f6620776869636820636f756c64206265206c61726765206261736564206f6e20606c6564676572602ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d090120436f6d706c6578697479204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2072656d6f766520205570646174653a2501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c204c6f636b732c205b4f726967696e204163636f756e745da8202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c656467657218204b696c6c3a4501202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c2043757272656e74204572612c20426f6e6465642c20536c617368696e67205370616e732c205b4f726967696e8c2020204163636f756e745d2c204c6f636b732c2042616c616e63654f662073746173685101202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732cb02020205b4f726967696e204163636f756e745d2c204c6f636b732c2042616c616e63654f662073746173682e74202d2057726974657320456163683a205370616e536c617368202a20530d01204e4f54453a2057656967687420616e6e6f746174696f6e20697320746865206b696c6c207363656e6172696f2c20776520726566756e64206f74686572776973652e302023203c2f7765696768743e2076616c6964617465041470726566733856616c696461746f72507265667344e8204465636c617265207468652064657369726520746f2076616c696461746520666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e30202d2d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a90202d20526561643a2045726120456c656374696f6e205374617475732c204c656467657280202d2057726974653a204e6f6d696e61746f72732c2056616c696461746f7273302023203c2f7765696768743e206e6f6d696e617465041c74617267657473a05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e4c1101204465636c617265207468652064657369726520746f206e6f6d696e6174652060746172676574736020666f7220746865206f726967696e20636f6e74726f6c6c65722e00510120456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e20546869732063616e206f6e6c792062652063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e3101202d20546865207472616e73616374696f6e277320636f6d706c65786974792069732070726f706f7274696f6e616c20746f207468652073697a65206f662060746172676574736020284e2901012077686963682069732063617070656420617420436f6d7061637441737369676e6d656e74733a3a4c494d495420284d41585f4e4f4d494e4154494f4e53292ed8202d20426f74682074686520726561647320616e642077726974657320666f6c6c6f7720612073696d696c6172207061747465726e2e28202d2d2d2d2d2d2d2d2d34205765696768743a204f284e2984207768657265204e20697320746865206e756d626572206f6620746172676574732c204442205765696768743ac8202d2052656164733a2045726120456c656374696f6e205374617475732c204c65646765722c2043757272656e742045726184202d205772697465733a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e146368696c6c0044c8204465636c617265206e6f2064657369726520746f206569746865722076616c6964617465206f72206e6f6d696e6174652e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e0d0120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e54202d20436f6e7461696e73206f6e6520726561642ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e24202d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743a88202d20526561643a20457261456c656374696f6e5374617475732c204c656467657280202d2057726974653a2056616c696461746f72732c204e6f6d696e61746f7273302023203c2f7765696768743e247365745f7061796565041470617965657c52657761726444657374696e6174696f6e3c543a3a4163636f756e7449643e40b8202852652d2973657420746865207061796d656e742074617267657420666f72206120636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e28202d2d2d2d2d2d2d2d2d3c202d205765696768743a204f28312934202d204442205765696768743a4c20202020202d20526561643a204c65646765724c20202020202d2057726974653a205061796565302023203c2f7765696768743e387365745f636f6e74726f6c6c65720428636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654090202852652d297365742074686520636f6e74726f6c6c6572206f6620612073746173682e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e2c202d2d2d2d2d2d2d2d2d2d34205765696768743a204f2831292c204442205765696768743af4202d20526561643a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572f8202d2057726974653a20426f6e6465642c204c6564676572204e657720436f6e74726f6c6c65722c204c6564676572204f6c6420436f6e74726f6c6c6572302023203c2f7765696768743e4c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e209420536574732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e34205765696768743a204f2831295c2057726974653a2056616c696461746f7220436f756e74302023203c2f7765696768743e60696e6372656173655f76616c696461746f725f636f756e7404286164646974696f6e616c30436f6d706163743c7533323e1cac20496e6372656d656e74732074686520696465616c206e756d626572206f662076616c696461746f72732e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e842053616d65206173205b607365745f76616c696461746f725f636f756e74605d2e302023203c2f7765696768743e547363616c655f76616c696461746f725f636f756e740418666163746f721c50657263656e741cd4205363616c652075702074686520696465616c206e756d626572206f662076616c696461746f7273206279206120666163746f722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e842053616d65206173205b607365745f76616c696461746f725f636f756e74605d2e302023203c2f7765696768743e34666f7263655f6e6f5f657261730024b020466f72636520746865726520746f206265206e6f206e6577206572617320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e3c202d205765696768743a204f28312948202d2057726974653a20466f726365457261302023203c2f7765696768743e34666f7263655f6e65775f65726100284d0120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f6620746865206e6578742073657373696f6e2e20416674657220746869732c2069742077696c6c206265a020726573657420746f206e6f726d616c20286e6f6e2d666f7263656429206265686176696f75722e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e3c202d205765696768743a204f28312944202d20577269746520466f726365457261302023203c2f7765696768743e447365745f696e76756c6e657261626c65730434696e76756c6e657261626c6573445665633c543a3a4163636f756e7449643e20cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e1c202d204f2856295c202d2057726974653a20496e76756c6e657261626c6573302023203c2f7765696768743e34666f7263655f756e7374616b650814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c753332280d0120466f72636520612063757272656e74207374616b657220746f206265636f6d6520636f6d706c6574656c7920756e7374616b65642c20696d6d6564696174656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743eec204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e7320746f2062652072656d6f766564b82052656164733a20426f6e6465642c20536c617368696e67205370616e732c204163636f756e742c204c6f636b738501205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c204163636f756e742c204c6f636b736c2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e50666f7263655f6e65775f6572615f616c776179730020050120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f662073657373696f6e7320696e646566696e6974656c792e008820546865206469737061746368206f726967696e206d75737420626520526f6f742e002c2023203c7765696768743e3c202d205765696768743a204f28312948202d2057726974653a20466f726365457261302023203c2f7765696768743e5463616e63656c5f64656665727265645f736c617368080c65726120457261496e64657834736c6173685f696e6469636573205665633c7533323e34982043616e63656c20656e6163746d656e74206f66206120646566657272656420736c6173682e00b42043616e2062652063616c6c6564206279207468652060543a3a536c61736843616e63656c4f726967696e602e00050120506172616d65746572733a2065726120616e6420696e6469636573206f662074686520736c617368657320666f7220746861742065726120746f206b696c6c2e002c2023203c7765696768743e5420436f6d706c65786974793a204f2855202b205329b82077697468205520756e6170706c69656420736c6173686573207765696768746564207769746820553d31303030d420616e64205320697320746865206e756d626572206f6620736c61736820696e646963657320746f2062652063616e63656c65642e68202d20526561643a20556e6170706c69656420536c61736865736c202d2057726974653a20556e6170706c69656420536c6173686573302023203c2f7765696768743e387061796f75745f7374616b657273083c76616c696461746f725f737461736830543a3a4163636f756e7449640c65726120457261496e64657870110120506179206f757420616c6c20746865207374616b65727320626568696e6420612073696e676c652076616c696461746f7220666f7220612073696e676c65206572612e004d01202d206076616c696461746f725f73746173686020697320746865207374617368206163636f756e74206f66207468652076616c696461746f722e205468656972206e6f6d696e61746f72732c20757020746f290120202060543a3a4d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602c2077696c6c20616c736f207265636569766520746865697220726577617264732e3501202d206065726160206d617920626520616e7920657261206265747765656e20605b63757272656e745f657261202d20686973746f72795f64657074683b2063757272656e745f6572615d602e00590120546865206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e20416e79206163636f756e742063616e2063616c6c20746869732066756e6374696f6e2c206576656e20696678206974206973206e6f74206f6e65206f6620746865207374616b6572732e00010120546869732063616e206f6e6c792062652063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743e0101202d2054696d6520636f6d706c65786974793a206174206d6f7374204f284d61784e6f6d696e61746f72526577617264656450657256616c696461746f72292ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e30202d2d2d2d2d2d2d2d2d2d2d1d01204e20697320746865204e756d626572206f66207061796f75747320666f72207468652076616c696461746f722028696e636c7564696e67207468652076616c696461746f722920205765696768743a88202d205265776172642044657374696e6174696f6e205374616b65643a204f284e29c4202d205265776172642044657374696e6174696f6e20436f6e74726f6c6c657220284372656174696e67293a204f284e292c204442205765696768743a2901202d20526561643a20457261456c656374696f6e5374617475732c2043757272656e744572612c20486973746f727944657074682c204572617356616c696461746f725265776172642c2d01202020202020202020457261735374616b657273436c69707065642c2045726173526577617264506f696e74732c204572617356616c696461746f725072656673202838206974656d73291101202d205265616420456163683a20426f6e6465642c204c65646765722c2050617965652c204c6f636b732c2053797374656d204163636f756e74202835206974656d7329d8202d20577269746520456163683a2053797374656d204163636f756e742c204c6f636b732c204c6564676572202833206974656d73290051012020204e4f54453a20776569676874732061726520617373756d696e672074686174207061796f75747320617265206d61646520746f20616c697665207374617368206163636f756e7420285374616b6564292e5901202020506179696e67206576656e2061206465616420636f6e74726f6c6c65722069732063686561706572207765696768742d776973652e20576520646f6e277420646f20616e7920726566756e647320686572652e302023203c2f7765696768743e187265626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e38e0205265626f6e64206120706f7274696f6e206f6620746865207374617368207363686564756c656420746f20626520756e6c6f636b65642e00550120546865206469737061746368206f726967696e206d757374206265207369676e65642062792074686520636f6e74726f6c6c65722c20616e642069742063616e206265206f6e6c792063616c6c6564207768656e8c205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e002c2023203c7765696768743ed4202d2054696d6520636f6d706c65786974793a204f284c292c207768657265204c20697320756e6c6f636b696e67206368756e6b7394202d20426f756e64656420627920604d41585f554e4c4f434b494e475f4348554e4b53602ef4202d2053746f72616765206368616e6765733a2043616e277420696e6372656173652073746f726167652c206f6e6c792064656372656173652069742e40202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a010120202020202d2052656164733a20457261456c656374696f6e5374617475732c204c65646765722c204c6f636b732c205b4f726967696e204163636f756e745db820202020202d205772697465733a205b4f726967696e204163636f756e745d2c204c6f636b732c204c6564676572302023203c2f7765696768743e447365745f686973746f72795f646570746808446e65775f686973746f72795f646570746844436f6d706163743c457261496e6465783e485f6572615f6974656d735f64656c6574656430436f6d706163743c7533323e543101205365742060486973746f72794465707468602076616c75652e20546869732066756e6374696f6e2077696c6c2064656c65746520616e7920686973746f727920696e666f726d6174696f6e80207768656e2060486973746f727944657074686020697320726564756365642e003020506172616d65746572733a1101202d20606e65775f686973746f72795f6465707468603a20546865206e657720686973746f727920646570746820796f7520776f756c64206c696b6520746f207365742e4901202d20606572615f6974656d735f64656c65746564603a20546865206e756d626572206f66206974656d7320746861742077696c6c2062652064656c6574656420627920746869732064697370617463682e450120202020546869732073686f756c64207265706f727420616c6c207468652073746f72616765206974656d7320746861742077696c6c2062652064656c6574656420627920636c656172696e67206f6c6445012020202065726120686973746f72792e204e656564656420746f207265706f727420616e2061636375726174652077656967687420666f72207468652064697370617463682e2054727573746564206279a02020202060526f6f746020746f207265706f727420616e206163637572617465206e756d6265722e0054204f726967696e206d75737420626520726f6f742e002c2023203c7765696768743ee0202d20453a204e756d626572206f6620686973746f7279206465707468732072656d6f7665642c20692e652e203130202d3e2037203d20333c202d205765696768743a204f28452934202d204442205765696768743aa020202020202d2052656164733a2043757272656e74204572612c20486973746f72792044657074687020202020202d205772697465733a20486973746f7279204465707468310120202020202d20436c6561722050726566697820456163683a20457261205374616b6572732c204572615374616b657273436c69707065642c204572617356616c696461746f725072656673810120202020202d2057726974657320456163683a204572617356616c696461746f725265776172642c2045726173526577617264506f696e74732c2045726173546f74616c5374616b652c2045726173537461727453657373696f6e496e646578302023203c2f7765696768743e28726561705f73746173680814737461736830543a3a4163636f756e744964486e756d5f736c617368696e675f7370616e730c7533323c61012052656d6f766520616c6c20646174612073747275637475726520636f6e6365726e696e672061207374616b65722f7374617368206f6e6365206974732062616c616e636520697320617420746865206d696e696d756d2e6101205468697320697320657373656e7469616c6c79206571756976616c656e7420746f206077697468647261775f756e626f6e64656460206578636570742069742063616e2062652063616c6c656420627920616e796f6e65f820616e6420746865207461726765742060737461736860206d7573742068617665206e6f2066756e6473206c656674206265796f6e64207468652045442e009020546869732063616e2062652063616c6c65642066726f6d20616e79206f726967696e2e000101202d20607374617368603a20546865207374617368206163636f756e7420746f20726561702e204974732062616c616e6365206d757374206265207a65726f2e002c2023203c7765696768743e250120436f6d706c65786974793a204f285329207768657265205320697320746865206e756d626572206f6620736c617368696e67207370616e73206f6e20746865206163636f756e742e2c204442205765696768743ad8202d2052656164733a205374617368204163636f756e742c20426f6e6465642c20536c617368696e67205370616e732c204c6f636b73a501202d205772697465733a20426f6e6465642c20536c617368696e67205370616e73202869662053203e2030292c204c65646765722c2050617965652c2056616c696461746f72732c204e6f6d696e61746f72732c205374617368204163636f756e742c204c6f636b7374202d2057726974657320456163683a205370616e536c617368202a2053302023203c2f7765696768743e106b69636b040c77686fa05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e34e42052656d6f76652074686520676976656e206e6f6d696e6174696f6e732066726f6d207468652063616c6c696e672076616c696461746f722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e490120416e642c2069742063616e206265206f6e6c792063616c6c6564207768656e205b60457261456c656374696f6e537461747573605d2069732060436c6f736564602e2054686520636f6e74726f6c6c657298206163636f756e742073686f756c6420726570726573656e7420612076616c696461746f722e005101202d206077686f603a2041206c697374206f66206e6f6d696e61746f72207374617368206163636f756e74732077686f20617265206e6f6d696e6174696e6720746869732076616c696461746f72207768696368c420202073686f756c64206e6f206c6f6e676572206265206e6f6d696e6174696e6720746869732076616c696461746f722e005901204e6f74653a204d616b696e6720746869732063616c6c206f6e6c79206d616b65732073656e736520696620796f7520666972737420736574207468652076616c696461746f7220707265666572656e63657320746f7c20626c6f636b20616e792066757274686572206e6f6d696e6174696f6e732e0124244572615061796f75740c20457261496e6465781c42616c616e63651c42616c616e63650c59012054686520657261207061796f757420686173206265656e207365743b207468652066697273742062616c616e6365206973207468652076616c696461746f722d7061796f75743b20746865207365636f6e64206973c4207468652072656d61696e6465722066726f6d20746865206d6178696d756d20616d6f756e74206f66207265776172642eac205c5b6572615f696e6465782c2076616c696461746f725f7061796f75742c2072656d61696e6465725c5d1852657761726408244163636f756e7449641c42616c616e636504fc20546865207374616b657220686173206265656e207265776172646564206279207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d14536c61736808244163636f756e7449641c42616c616e6365082501204f6e652076616c696461746f722028616e6420697473206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e58205c5b76616c696461746f722c20616d6f756e745c5d684f6c64536c617368696e675265706f7274446973636172646564043053657373696f6e496e646578081d0120416e206f6c6420736c617368696e67207265706f72742066726f6d2061207072696f72206572612077617320646973636172646564206265636175736520697420636f756c6490206e6f742062652070726f6365737365642e205c5b73657373696f6e5f696e6465785c5d3c5374616b696e67456c656374696f6e0004882041206e657720736574206f66207374616b6572732077617320656c65637465642e18426f6e64656408244163636f756e7449641c42616c616e636510d420416e206163636f756e742068617320626f6e646564207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d005101204e4f54453a2054686973206576656e74206973206f6e6c7920656d6974746564207768656e2066756e64732061726520626f6e64656420766961206120646973706174636861626c652e204e6f7461626c792c25012069742077696c6c206e6f7420626520656d697474656420666f72207374616b696e672072657761726473207768656e20746865792061726520616464656420746f207374616b652e20556e626f6e64656408244163636f756e7449641c42616c616e636504dc20416e206163636f756e742068617320756e626f6e646564207468697320616d6f756e742e205c5b73746173682c20616d6f756e745c5d2457697468647261776e08244163636f756e7449641c42616c616e6365085d0120416e206163636f756e74206861732063616c6c6564206077697468647261775f756e626f6e6465646020616e642072656d6f76656420756e626f6e64696e67206368756e6b7320776f727468206042616c616e636560b02066726f6d2074686520756e6c6f636b696e672071756575652e205c5b73746173682c20616d6f756e745c5d184b69636b656408244163636f756e744964244163636f756e744964040d012041206e6f6d696e61746f7220686173206265656e206b69636b65642066726f6d20612076616c696461746f722e205c5b6e6f6d696e61746f722c2073746173685c5d143853657373696f6e735065724572613053657373696f6e496e64657810060000000470204e756d626572206f662073657373696f6e7320706572206572612e3c426f6e64696e674475726174696f6e20457261496e64657810a002000004e4204e756d626572206f6620657261732074686174207374616b65642066756e6473206d7573742072656d61696e20626f6e64656420666f722e48536c61736844656665724475726174696f6e20457261496e64657810a8000000140101204e756d626572206f662065726173207468617420736c6173686573206172652064656665727265642062792c20616674657220636f6d7075746174696f6e2e00bc20546869732073686f756c64206265206c657373207468616e2074686520626f6e64696e67206475726174696f6e2e2d012053657420746f203020696620736c61736865732073686f756c64206265206170706c69656420696d6d6564696174656c792c20776974686f7574206f70706f7274756e69747920666f723820696e74657276656e74696f6e2e804d61784e6f6d696e61746f72526577617264656450657256616c696461746f720c753332100001000010f820546865206d6178696d756d206e756d626572206f66206e6f6d696e61746f727320726577617264656420666f7220656163682076616c696461746f722e00690120466f7220656163682076616c696461746f72206f6e6c79207468652060244d61784e6f6d696e61746f72526577617264656450657256616c696461746f72602062696767657374207374616b6572732063616e20636c61696d2101207468656972207265776172642e2054686973207573656420746f206c696d69742074686520692f6f20636f737420666f7220746865206e6f6d696e61746f72207061796f75742e384d61784e6f6d696e6174696f6e730c753332101000000004b4204d6178696d756d206e756d626572206f66206e6f6d696e6174696f6e7320706572206e6f6d696e61746f722e50344e6f74436f6e74726f6c6c65720468204e6f74206120636f6e74726f6c6c6572206163636f756e742e204e6f7453746173680454204e6f742061207374617368206163636f756e742e34416c7265616479426f6e646564046420537461736820697320616c726561647920626f6e6465642e34416c7265616479506169726564047820436f6e74726f6c6c657220697320616c7265616479207061697265642e30456d70747954617267657473046420546172676574732063616e6e6f7420626520656d7074792e384475706c6963617465496e6465780444204475706c696361746520696e6465782e44496e76616c6964536c617368496e646578048820536c617368207265636f726420696e646578206f7574206f6620626f756e64732e44496e73756666696369656e7456616c756504cc2043616e206e6f7420626f6e6420776974682076616c7565206c657373207468616e206d696e696d756d2062616c616e63652e304e6f4d6f72654368756e6b7304942043616e206e6f74207363686564756c65206d6f726520756e6c6f636b206368756e6b732e344e6f556e6c6f636b4368756e6b04a42043616e206e6f74207265626f6e6420776974686f757420756e6c6f636b696e67206368756e6b732e3046756e64656454617267657404cc20417474656d7074696e6720746f2074617267657420612073746173682074686174207374696c6c206861732066756e64732e48496e76616c6964457261546f526577617264045c20496e76616c69642065726120746f207265776172642e68496e76616c69644e756d6265724f664e6f6d696e6174696f6e73047c20496e76616c6964206e756d626572206f66206e6f6d696e6174696f6e732e484e6f74536f72746564416e64556e697175650484204974656d7320617265206e6f7420736f7274656420616e6420756e697175652e38416c7265616479436c61696d6564040d01205265776172647320666f72207468697320657261206861766520616c7265616479206265656e20636c61696d656420666f7220746869732076616c696461746f722e54496e636f7272656374486973746f7279446570746804c420496e636f72726563742070726576696f757320686973746f727920646570746820696e7075742070726f76696465642e58496e636f7272656374536c617368696e675370616e7304b420496e636f7272656374206e756d626572206f6620736c617368696e67207370616e732070726f76696465642e204261645374617465043d0120496e7465726e616c20737461746520686173206265636f6d6520736f6d65686f7720636f7272757074656420616e6420746865206f7065726174696f6e2063616e6e6f7420636f6e74696e75652e38546f6f4d616e7954617267657473049820546f6f206d616e79206e6f6d696e6174696f6e207461726765747320737570706c6965642e244261645461726765740441012041206e6f6d696e6174696f6e207461726765742077617320737570706c69656420746861742077617320626c6f636b6564206f72206f7468657277697365206e6f7420612076616c696461746f722e091c53657373696f6e011c53657373696f6e1c2856616c696461746f727301004c5665633c543a3a56616c696461746f7249643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3043757272656e74496e64657801003053657373696f6e496e646578100000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e345175657565644368616e676564010010626f6f6c040008390120547275652069662074686520756e6465726c79696e672065636f6e6f6d6963206964656e746974696573206f7220776569676874696e6720626568696e64207468652076616c696461746f7273a420686173206368616e67656420696e20746865207175657565642076616c696461746f72207365742e285175657565644b6579730100785665633c28543a3a56616c696461746f7249642c20543a3a4b657973293e0400083d012054686520717565756564206b65797320666f7220746865206e6578742073657373696f6e2e205768656e20746865206e6578742073657373696f6e20626567696e732c207468657365206b657973e02077696c6c206265207573656420746f2064657465726d696e65207468652076616c696461746f7227732073657373696f6e206b6579732e4844697361626c656456616c696461746f72730100205665633c7533323e04000c8020496e6469636573206f662064697361626c65642076616c696461746f72732e003501205468652073657420697320636c6561726564207768656e20606f6e5f73657373696f6e5f656e64696e67602072657475726e732061206e657720736574206f66206964656e7469746965732e204e6578744b65797300010538543a3a56616c696461746f7249641c543a3a4b657973000400049c20546865206e6578742073657373696f6e206b65797320666f7220612076616c696461746f722e204b65794f776e657200010550284b65795479706549642c205665633c75383e2938543a3a56616c696461746f72496400040004090120546865206f776e6572206f662061206b65792e20546865206b65792069732074686520604b657954797065496460202b2074686520656e636f646564206b65792e0108207365745f6b65797308106b6579731c543a3a4b6579731470726f6f661c5665633c75383e38e82053657473207468652073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c657220746f20606b657973602e210120416c6c6f777320616e206163636f756e7420746f20736574206974732073657373696f6e206b6579207072696f7220746f206265636f6d696e6720612076616c696461746f722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a20606f726967696e206163636f756e74602c2060543a3a56616c696461746f7249644f66602c20604e6578744b65797360a4202d2044625772697465733a20606f726967696e206163636f756e74602c20604e6578744b6579736084202d204462526561647320706572206b65792069643a20604b65794f776e65726088202d20446257726974657320706572206b65792069643a20604b65794f776e657260302023203c2f7765696768743e2870757267655f6b6579730030cc2052656d6f76657320616e792073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c65722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743eb4202d20436f6d706c65786974793a20604f2831296020696e206e756d626572206f66206b65792074797065732e590120202041637475616c20636f737420646570656e6473206f6e20746865206e756d626572206f66206c656e677468206f662060543a3a4b6579733a3a6b65795f6964732829602077686963682069732066697865642ef0202d20446252656164733a2060543a3a56616c696461746f7249644f66602c20604e6578744b657973602c20606f726967696e206163636f756e7460a4202d2044625772697465733a20604e6578744b657973602c20606f726967696e206163636f756e74608c202d20446257726974657320706572206b65792069643a20604b65794f776e64657260302023203c2f7765696768743e0104284e657753657373696f6e043053657373696f6e496e646578086501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e7420697320746865205c5b73657373696f6e5f696e6465785c5d2c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e001430496e76616c696450726f6f66046420496e76616c6964206f776e6572736869702070726f6f662e5c4e6f4173736f63696174656456616c696461746f72496404a0204e6f206173736f6369617465642076616c696461746f7220494420666f72206163636f756e742e344475706c6963617465644b657904682052656769737465726564206475706c6963617465206b65792e184e6f4b65797304a8204e6f206b65797320617265206173736f63696174656420776974682074686973206163636f756e742e244e6f4163636f756e74041d01204b65792073657474696e67206163636f756e74206973206e6f74206c6976652c20736f206974277320696d706f737369626c6520746f206173736f6369617465206b6579732e0a2444656d6f6372616379012444656d6f6372616379383c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f707301009c5665633c2850726f70496e6465782c20543a3a486173682c20543a3a4163636f756e744964293e040004210120546865207075626c69632070726f706f73616c732e20556e736f727465642e20546865207365636f6e64206974656d206973207468652070726f706f73616c277320686173682e244465706f7369744f660001052450726f70496e64657884285665633c543a3a4163636f756e7449643e2c2042616c616e63654f663c543e290004000c842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e00d82054574f582d4e4f54453a20536166652c20617320696e6372656173696e6720696e7465676572206b6579732061726520736166652e24507265696d616765730001061c543a3a48617368e8507265696d6167655374617475733c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e000400086101204d6170206f662068617368657320746f207468652070726f706f73616c20707265696d6167652c20616c6f6e6720776974682077686f207265676973746572656420697420616e64207468656972206465706f7369742ee42054686520626c6f636b206e756d6265722069732074686520626c6f636b20617420776869636820697420776173206465706f73697465642e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e344c6f77657374556e62616b656401003c5265666572656e64756d496e646578100000000008250120546865206c6f77657374207265666572656e64756d20696e64657820726570726573656e74696e6720616e20756e62616b6564207265666572656e64756d2e20457175616c20746fdc20605265666572656e64756d436f756e74602069662074686572652069736e2774206120756e62616b6564207265666572656e64756d2e405265666572656e64756d496e666f4f660001053c5265666572656e64756d496e646578d45265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a486173682c2042616c616e63654f663c543e3e0004000cb420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e0009012054574f582d4e4f54453a205341464520617320696e646578657320617265206e6f7420756e64657220616e2061747461636b6572e280997320636f6e74726f6c2e20566f74696e674f6601010530543a3a4163636f756e744964c8566f74696e673c42616c616e63654f663c543e2c20543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00d8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105d0120416c6c20766f74657320666f72206120706172746963756c617220766f7465722e2057652073746f7265207468652062616c616e636520666f7220746865206e756d626572206f6620766f74657320746861742077655d012068617665207265636f726465642e20546865207365636f6e64206974656d2069732074686520746f74616c20616d6f756e74206f662064656c65676174696f6e732c20746861742077696c6c2062652061646465642e00e82054574f582d4e4f54453a205341464520617320604163636f756e7449646073206172652063727970746f2068617368657320616e797761792e144c6f636b7300010530543a3a4163636f756e74496438543a3a426c6f636b4e756d626572000400105d01204163636f756e747320666f7220776869636820746865726520617265206c6f636b7320696e20616374696f6e207768696368206d61792062652072656d6f76656420617420736f6d6520706f696e7420696e207468655101206675747572652e205468652076616c75652069732074686520626c6f636b206e756d62657220617420776869636820746865206c6f636b206578706972657320616e64206d61792062652072656d6f7665642e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e544c6173745461626c656457617345787465726e616c010010626f6f6c0400085901205472756520696620746865206c617374207265666572656e64756d207461626c656420776173207375626d69747465642065787465726e616c6c792e2046616c7365206966206974207761732061207075626c6963282070726f706f73616c2e304e65787445787465726e616c00006028543a3a486173682c20566f74655468726573686f6c6429040010590120546865207265666572656e64756d20746f206265207461626c6564207768656e6576657220697420776f756c642062652076616c696420746f207461626c6520616e2065787465726e616c2070726f706f73616c2e550120546869732068617070656e73207768656e2061207265666572656e64756d206e6565647320746f206265207461626c656420616e64206f6e65206f662074776f20636f6e646974696f6e7320617265206d65743aa4202d20604c6173745461626c656457617345787465726e616c60206973206066616c7365603b206f7268202d20605075626c696350726f70736020697320656d7074792e24426c61636b6c6973740001061c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290004000851012041207265636f7264206f662077686f207665746f656420776861742e204d6170732070726f706f73616c206861736820746f206120706f737369626c65206578697374656e7420626c6f636b206e756d626572e82028756e74696c207768656e206974206d6179206e6f742062652072657375626d69747465642920616e642077686f207665746f65642069742e3443616e63656c6c6174696f6e730101061c543a3a4861736810626f6f6c000400042901205265636f7264206f6620616c6c2070726f706f73616c7320746861742068617665206265656e207375626a65637420746f20656d657267656e63792063616e63656c6c6174696f6e2e3853746f7261676556657273696f6e00002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e01641c70726f706f7365083470726f706f73616c5f686173681c543a3a486173681476616c756554436f6d706163743c42616c616e63654f663c543e3e2ca02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e00190120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573748420686176652066756e647320746f20636f76657220746865206465706f7369742e00d8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20707265696d6167652e1901202d206076616c7565603a2054686520616d6f756e74206f66206465706f73697420286d757374206265206174206c6561737420604d696e696d756d4465706f73697460292e004820456d697473206050726f706f736564602e003c205765696768743a20604f28702960187365636f6e64082070726f706f73616c48436f6d706163743c50726f70496e6465783e4c7365636f6e64735f75707065725f626f756e6430436f6d706163743c7533323e28b8205369676e616c732061677265656d656e742077697468206120706172746963756c61722070726f706f73616c2e00050120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e6465721501206d75737420686176652066756e647320746f20636f76657220746865206465706f7369742c20657175616c20746f20746865206f726967696e616c206465706f7369742e00cc202d206070726f706f73616c603a2054686520696e646578206f66207468652070726f706f73616c20746f207365636f6e642e4501202d20607365636f6e64735f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e207468652063757272656e74206e756d626572206f66207365636f6e6473206f6e2074686973290120202070726f706f73616c2e2045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e002101205765696768743a20604f28532960207768657265205320697320746865206e756d626572206f66207365636f6e647320612070726f706f73616c20616c7265616479206861732e10766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f7465644163636f756e74566f74653c42616c616e63654f663c543e3e24350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00e0202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f20766f746520666f722e88202d2060766f7465603a2054686520766f746520636f6e66696775726174696f6e2e003101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722068617320766f746564206f6e2e40656d657267656e63795f63616e63656c04247265665f696e6465783c5265666572656e64756d496e646578205101205363686564756c6520616e20656d657267656e63792063616e63656c6c6174696f6e206f662061207265666572656e64756d2e2043616e6e6f742068617070656e20747769636520746f207468652073616d6530207265666572656e64756d2e00fc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206043616e63656c6c6174696f6e4f726967696e602e00d4202d607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e0040205765696768743a20604f283129602e4065787465726e616c5f70726f706f7365043470726f706f73616c5f686173681c543a3a48617368243101205363686564756c652061207265666572656e64756d20746f206265207461626c6564206f6e6365206974206973206c6567616c20746f207363686564756c6520616e2065787465726e616c30207265666572656e64756d2e00ec20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206045787465726e616c4f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e001901205765696768743a20604f2856296020776974682056206e756d626572206f66207665746f65727320696e2074686520626c61636b6c697374206f662070726f706f73616c2ebc2020204465636f64696e6720766563206f66206c656e67746820562e2043686172676564206173206d6178696d756d6465787465726e616c5f70726f706f73655f6d616a6f72697479043470726f706f73616c5f686173681c543a3a486173682c5901205363686564756c652061206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f207363686564756c656020616e2065787465726e616c207265666572656e64756d2e00f020546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c4d616a6f726974794f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e003c205765696768743a20604f283129606065787465726e616c5f70726f706f73655f64656661756c74043470726f706f73616c5f686173681c543a3a486173682c4901205363686564756c652061206e656761746976652d7475726e6f75742d62696173207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f84207363686564756c6520616e2065787465726e616c207265666572656e64756d2e00ec20546865206469737061746368206f6620746869732063616c6c206d757374206265206045787465726e616c44656661756c744f726967696e602e00d8202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e003c205765696768743a20604f2831296028666173745f747261636b0c3470726f706f73616c5f686173681c543a3a4861736834766f74696e675f706572696f6438543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d6265723c5101205363686564756c65207468652063757272656e746c792065787465726e616c6c792d70726f706f736564206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564650120696d6d6564696174656c792e204966207468657265206973206e6f2065787465726e616c6c792d70726f706f736564207265666572656e64756d2063757272656e746c792c206f72206966207468657265206973206f6e65ec20627574206974206973206e6f742061206d616a6f726974792d63617272696573207265666572656e64756d207468656e206974206661696c732e00d420546865206469737061746368206f6620746869732063616c6c206d757374206265206046617374547261636b4f726967696e602e00f8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652063757272656e742065787465726e616c2070726f706f73616c2e6101202d2060766f74696e675f706572696f64603a2054686520706572696f64207468617420697320616c6c6f77656420666f7220766f74696e67206f6e20746869732070726f706f73616c2e20496e6372656173656420746f982020206046617374547261636b566f74696e67506572696f646020696620746f6f206c6f772e5501202d206064656c6179603a20546865206e756d626572206f6620626c6f636b20616674657220766f74696e672068617320656e64656420696e20617070726f76616c20616e6420746869732073686f756c64206265bc202020656e61637465642e205468697320646f65736e277420686176652061206d696e696d756d20616d6f756e742e004420456d697473206053746172746564602e003c205765696768743a20604f28312960347665746f5f65787465726e616c043470726f706f73616c5f686173681c543a3a4861736824bc205665746f20616e6420626c61636b6c697374207468652065787465726e616c2070726f706f73616c20686173682e00dc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d75737420626520605665746f4f726967696e602e003101202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f66207468652070726f706f73616c20746f207665746f20616e6420626c61636b6c6973742e004020456d69747320605665746f6564602e000101205765696768743a20604f2856202b206c6f6728562929602077686572652056206973206e756d626572206f6620606578697374696e67207665746f657273604463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e1c542052656d6f76652061207265666572656e64756d2e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00d8202d20607265665f696e646578603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e00482023205765696768743a20604f283129602e3463616e63656c5f717565756564041477686963683c5265666572656e64756d496e6465781ca02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e00c8202d20607768696368603a2054686520696e646578206f6620746865207265666572656e64756d20746f2063616e63656c2e004d01205765696768743a20604f284429602077686572652060446020697320746865206974656d7320696e207468652064697370617463682071756575652e205765696768746564206173206044203d203130602e2064656c65676174650c08746f30543a3a4163636f756e74496428636f6e76696374696f6e28436f6e76696374696f6e1c62616c616e63653042616c616e63654f663c543e503d012044656c65676174652074686520766f74696e6720706f77657220287769746820736f6d6520676976656e20636f6e76696374696f6e29206f66207468652073656e64696e67206163636f756e742e005901205468652062616c616e63652064656c656761746564206973206c6f636b656420666f72206173206c6f6e6720617320697427732064656c6567617465642c20616e64207468657265616674657220666f7220746865cc2074696d6520617070726f70726961746520666f722074686520636f6e76696374696f6e2773206c6f636b20706572696f642e00610120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e696e67206163636f756e74206d757374206569746865723a782020202d2062652064656c65676174696e6720616c72656164793b206f725d012020202d2068617665206e6f20766f74696e67206163746976697479202869662074686572652069732c207468656e2069742077696c6c206e65656420746f2062652072656d6f7665642f636f6e736f6c6964617465649820202020207468726f7567682060726561705f766f746560206f722060756e766f746560292e004901202d2060746f603a20546865206163636f756e742077686f736520766f74696e6720746865206074617267657460206163636f756e74277320766f74696e6720706f7765722077696c6c20666f6c6c6f772e5901202d2060636f6e76696374696f6e603a2054686520636f6e76696374696f6e20746861742077696c6c20626520617474616368656420746f207468652064656c65676174656420766f7465732e205768656e2074686545012020206163636f756e7420697320756e64656c6567617465642c207468652066756e64732077696c6c206265206c6f636b656420666f722074686520636f72726573706f6e64696e6720706572696f642e5501202d206062616c616e6365603a2054686520616d6f756e74206f6620746865206163636f756e7427732062616c616e636520746f206265207573656420696e2064656c65676174696e672e2054686973206d757374c82020206e6f74206265206d6f7265207468616e20746865206163636f756e7427732063757272656e742062616c616e63652e004c20456d697473206044656c656761746564602e004101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732e28756e64656c65676174650030d020556e64656c65676174652074686520766f74696e6720706f776572206f66207468652073656e64696e67206163636f756e742e00610120546f6b656e73206d617920626520756e6c6f636b656420666f6c6c6f77696e67206f6e636520616e20616d6f756e74206f662074696d6520636f6e73697374656e74207769746820746865206c6f636b20706572696f64e0206f662074686520636f6e76696374696f6e2077697468207768696368207468652064656c65676174696f6e20776173206973737565642e00490120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265582063757272656e746c792064656c65676174696e672e005420456d6974732060556e64656c656761746564602e004101205765696768743a20604f28522960207768657265205220697320746865206e756d626572206f66207265666572656e64756d732074686520766f7465722064656c65676174696e6720746f20686173cc202020766f746564206f6e2e205765696768742069732063686172676564206173206966206d6178696d756d20766f7465732e58636c6561725f7075626c69635f70726f706f73616c7300147420436c6561727320616c6c207075626c69632070726f706f73616c732e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f526f6f745f2e0040205765696768743a20604f283129602e346e6f74655f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e2861012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e205468697320646f65736e27742072657175697265207468652070726f706f73616c20746f206265250120696e207468652064697370617463682071756575652062757420646f657320726571756972652061206465706f7369742c2072657475726e6564206f6e636520656e61637465642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e005101205765696768743a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e646e6f74655f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e040d012053616d6520617320606e6f74655f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e586e6f74655f696d6d696e656e745f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e3045012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e2054686973207265717569726573207468652070726f706f73616c20746f206265410120696e207468652064697370617463682071756575652e204e6f206465706f736974206973206e65656465642e205768656e20746869732063616c6c206973207375636365737366756c2c20692e652e39012074686520707265696d61676520686173206e6f74206265656e2075706c6f61646564206265666f726520616e64206d61746368657320736f6d6520696d6d696e656e742070726f706f73616c2c40206e6f2066656520697320706169642e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00c8202d2060656e636f6465645f70726f706f73616c603a2054686520707265696d616765206f6620612070726f706f73616c2e005c20456d6974732060507265696d6167654e6f746564602e005101205765696768743a20604f28452960207769746820452073697a65206f662060656e636f6465645f70726f706f73616c60202870726f7465637465642062792061207265717569726564206465706f736974292e886e6f74655f696d6d696e656e745f707265696d6167655f6f7065726174696f6e616c0440656e636f6465645f70726f706f73616c1c5665633c75383e0431012053616d6520617320606e6f74655f696d6d696e656e745f707265696d6167656020627574206f726967696e20697320604f7065726174696f6e616c507265696d6167654f726967696e602e34726561705f707265696d616765083470726f706f73616c5f686173681c543a3a486173686070726f706f73616c5f6c656e5f75707065725f626f756e6430436f6d706163743c7533323e3cf42052656d6f766520616e20657870697265642070726f706f73616c20707265696d61676520616e6420636f6c6c65637420746865206465706f7369742e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00d0202d206070726f706f73616c5f68617368603a2054686520707265696d6167652068617368206f6620612070726f706f73616c2e2d01202d206070726f706f73616c5f6c656e6774685f75707065725f626f756e64603a20616e20757070657220626f756e64206f6e206c656e677468206f66207468652070726f706f73616c2e010120202045787472696e736963206973207765696768746564206163636f7264696e6720746f20746869732076616c75652077697468206e6f20726566756e642e00510120546869732077696c6c206f6e6c7920776f726b2061667465722060566f74696e67506572696f646020626c6f636b732066726f6d207468652074696d6520746861742074686520707265696d616765207761735d01206e6f7465642c2069662069742773207468652073616d65206163636f756e7420646f696e672069742e2049662069742773206120646966666572656e74206163636f756e742c207468656e206974276c6c206f6e6c79b020776f726b20616e206164646974696f6e616c2060456e6163746d656e74506572696f6460206c617465722e006020456d6974732060507265696d616765526561706564602e00b8205765696768743a20604f284429602077686572652044206973206c656e677468206f662070726f706f73616c2e18756e6c6f636b041874617267657430543a3a4163636f756e7449641ca420556e6c6f636b20746f6b656e732074686174206861766520616e2065787069726564206c6f636b2e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e00bc202d2060746172676574603a20546865206163636f756e7420746f2072656d6f766520746865206c6f636b206f6e2e00c0205765696768743a20604f2852296020776974682052206e756d626572206f6620766f7465206f66207461726765742e2c72656d6f76655f766f74650414696e6465783c5265666572656e64756d496e6465786c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e00102049663a8c202d20746865207265666572656e64756d207761732063616e63656c6c65642c206f7280202d20746865207265666572656e64756d206973206f6e676f696e672c206f7294202d20746865207265666572656e64756d2068617320656e6465642073756368207468617401012020202d2074686520766f7465206f6620746865206163636f756e742077617320696e206f70706f736974696f6e20746f2074686520726573756c743b206f72d82020202d20746865726520776173206e6f20636f6e76696374696f6e20746f20746865206163636f756e74277320766f74653b206f72882020202d20746865206163636f756e74206d61646520612073706c697420766f74656101202e2e2e7468656e2074686520766f74652069732072656d6f76656420636c65616e6c7920616e64206120666f6c6c6f77696e672063616c6c20746f2060756e6c6f636b60206d617920726573756c7420696e206d6f72655c2066756e6473206265696e6720617661696c61626c652e00ac2049662c20686f77657665722c20746865207265666572656e64756d2068617320656e64656420616e643af0202d2069742066696e697368656420636f72726573706f6e64696e6720746f2074686520766f7465206f6620746865206163636f756e742c20616e64e0202d20746865206163636f756e74206d6164652061207374616e6461726420766f7465207769746820636f6e76696374696f6e2c20616e64c0202d20746865206c6f636b20706572696f64206f662074686520636f6e76696374696f6e206973206e6f74206f7665725d01202e2e2e7468656e20746865206c6f636b2077696c6c206265206167677265676174656420696e746f20746865206f766572616c6c206163636f756e742773206c6f636b2c207768696368206d617920696e766f6c76655d01202a6f7665726c6f636b696e672a20287768657265207468652074776f206c6f636b732061726520636f6d62696e656420696e746f20612073696e676c65206c6f636b207468617420697320746865206d6178696d756de8206f6620626f74682074686520616d6f756e74206c6f636b656420616e64207468652074696d65206973206974206c6f636b656420666f72292e004d0120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2c20616e6420746865207369676e6572206d7573742068617665206120766f74658c207265676973746572656420666f72207265666572656e64756d2060696e646578602e00f8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e005901205765696768743a20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652e4472656d6f76655f6f746865725f766f7465081874617267657430543a3a4163636f756e74496414696e6465783c5265666572656e64756d496e6465783c802052656d6f7665206120766f746520666f722061207265666572656e64756d2e0051012049662074686520607461726765746020697320657175616c20746f20746865207369676e65722c207468656e20746869732066756e6374696f6e2069732065786163746c79206571756976616c656e7420746f3101206072656d6f76655f766f7465602e204966206e6f7420657175616c20746f20746865207369676e65722c207468656e2074686520766f7465206d757374206861766520657870697265642c590120656974686572206265636175736520746865207265666572656e64756d207761732063616e63656c6c65642c20626563617573652074686520766f746572206c6f737420746865207265666572656e64756d206f729c20626563617573652074686520636f6e76696374696f6e20706572696f64206973206f7665722e00cc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265205f5369676e65645f2e005101202d2060746172676574603a20546865206163636f756e74206f662074686520766f746520746f2062652072656d6f7665643b2074686973206163636f756e74206d757374206861766520766f74656420666f72582020207265666572656e64756d2060696e646578602ef8202d2060696e646578603a2054686520696e646578206f66207265666572656e64756d206f662074686520766f746520746f2062652072656d6f7665642e005901205765696768743a20604f2852202b206c6f6720522960207768657265205220697320746865206e756d626572206f66207265666572656e646120746861742060746172676574602068617320766f746564206f6e2edc2020205765696768742069732063616c63756c6174656420666f7220746865206d6178696d756d206e756d626572206f6620766f74652e38656e6163745f70726f706f73616c083470726f706f73616c5f686173681c543a3a4861736814696e6465783c5265666572656e64756d496e64657804510120456e61637420612070726f706f73616c2066726f6d2061207265666572656e64756d2e20466f72206e6f77207765206a757374206d616b65207468652077656967687420626520746865206d6178696d756d2e24626c61636b6c697374083470726f706f73616c5f686173681c543a3a486173683c6d617962655f7265665f696e6465785c4f7074696f6e3c5265666572656e64756d496e6465783e3c4901205065726d616e656e746c7920706c61636520612070726f706f73616c20696e746f2074686520626c61636b6c6973742e20546869732070726576656e74732069742066726f6d2065766572206265696e67402070726f706f73656420616761696e2e0055012049662063616c6c6564206f6e206120717565756564207075626c6963206f722065787465726e616c2070726f706f73616c2c207468656e20746869732077696c6c20726573756c7420696e206974206265696e6755012072656d6f7665642e2049662074686520607265665f696e6465786020737570706c69656420697320616e20616374697665207265666572656e64756d2077697468207468652070726f706f73616c20686173682c6c207468656e2069742077696c6c2062652063616e63656c6c65642e00f020546865206469737061746368206f726967696e206f6620746869732063616c6c206d7573742062652060426c61636b6c6973744f726967696e602e00fc202d206070726f706f73616c5f68617368603a205468652070726f706f73616c206861736820746f20626c61636b6c697374207065726d616e656e746c792e4901202d20607265665f696e646578603a20416e206f6e676f696e67207265666572656e64756d2077686f73652068617368206973206070726f706f73616c5f68617368602c2077686963682077696c6c2062652c2063616e63656c6c65642e004501205765696768743a20604f28702960202874686f756768206173207468697320697320616e20686967682d70726976696c6567652064697370617463682c20776520617373756d6520697420686173206154202020726561736f6e61626c652076616c7565292e3c63616e63656c5f70726f706f73616c042870726f705f696e64657848436f6d706163743c50726f70496e6465783e1c4c2052656d6f766520612070726f706f73616c2e00050120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265206043616e63656c50726f706f73616c4f726967696e602e00d4202d206070726f705f696e646578603a2054686520696e646578206f66207468652070726f706f73616c20746f2063616e63656c2e00e8205765696768743a20604f28702960207768657265206070203d205075626c696350726f70733a3a3c543e3a3a6465636f64655f6c656e28296001482050726f706f736564082450726f70496e6465781c42616c616e63650431012041206d6f74696f6e20686173206265656e2070726f706f7365642062792061207075626c6963206163636f756e742e205c5b70726f706f73616c5f696e6465782c206465706f7369745c5d185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e047d012041207075626c69632070726f706f73616c20686173206265656e207461626c656420666f72207265666572656e64756d20766f74652e205c5b70726f706f73616c5f696e6465782c206465706f7369742c206465706f7369746f72735c5d3845787465726e616c5461626c656400049820416e2065787465726e616c2070726f706f73616c20686173206265656e207461626c65642e1c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c6404c42041207265666572656e64756d2068617320626567756e2e205c5b7265665f696e6465782c207468726573686f6c645c5d18506173736564043c5265666572656e64756d496e64657804e820412070726f706f73616c20686173206265656e20617070726f766564206279207265666572656e64756d2e205c5b7265665f696e6465785c5d244e6f74506173736564043c5265666572656e64756d496e64657804e820412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e205c5b7265665f696e6465785c5d2443616e63656c6c6564043c5265666572656e64756d496e64657804bc2041207265666572656e64756d20686173206265656e2063616e63656c6c65642e205c5b7265665f696e6465785c5d204578656375746564083c5265666572656e64756d496e64657810626f6f6c04c820412070726f706f73616c20686173206265656e20656e61637465642e205c5b7265665f696e6465782c2069735f6f6b5c5d2444656c65676174656408244163636f756e744964244163636f756e74496404210120416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e205c5b77686f2c207461726765745c5d2c556e64656c65676174656404244163636f756e74496404f820416e205c5b6163636f756e745c5d206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e185665746f65640c244163636f756e74496410486173682c426c6f636b4e756d62657204110120416e2065787465726e616c2070726f706f73616c20686173206265656e207665746f65642e205c5b77686f2c2070726f706f73616c5f686173682c20756e74696c5c5d34507265696d6167654e6f7465640c1048617368244163636f756e7449641c42616c616e636504610120412070726f706f73616c277320707265696d61676520776173206e6f7465642c20616e6420746865206465706f7369742074616b656e2e205c5b70726f706f73616c5f686173682c2077686f2c206465706f7369745c5d30507265696d616765557365640c1048617368244163636f756e7449641c42616c616e636508150120412070726f706f73616c20707265696d616765207761732072656d6f76656420616e6420757365642028746865206465706f736974207761732072657475726e6564292e94205c5b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369745c5d3c507265696d616765496e76616c69640810486173683c5265666572656e64756d496e646578080d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d6167652077617320696e76616c69642e74205c5b70726f706f73616c5f686173682c207265665f696e6465785c5d3c507265696d6167654d697373696e670810486173683c5265666572656e64756d496e646578080d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d61676520776173206d697373696e672e74205c5b70726f706f73616c5f686173682c207265665f696e6465785c5d38507265696d616765526561706564101048617368244163636f756e7449641c42616c616e6365244163636f756e744964082d012041207265676973746572656420707265696d616765207761732072656d6f76656420616e6420746865206465706f73697420636f6c6c656374656420627920746865207265617065722eb4205c5b70726f706f73616c5f686173682c2070726f76696465722c206465706f7369742c207265617065725c5d20556e6c6f636b656404244163636f756e74496404bc20416e205c5b6163636f756e745c5d20686173206265656e20756e6c6f636b6564207375636365737366756c6c792e2c426c61636b6c697374656404104861736804d820412070726f706f73616c205c5b686173685c5d20686173206265656e20626c61636b6c6973746564207065726d616e656e746c792e203c456e6163746d656e74506572696f6438543a3a426c6f636b4e756d62657210002f0d0014710120546865206d696e696d756d20706572696f64206f66206c6f636b696e6720616e642074686520706572696f64206265747765656e20612070726f706f73616c206265696e6720617070726f76656420616e6420656e61637465642e0031012049742073686f756c642067656e6572616c6c792062652061206c6974746c65206d6f7265207468616e2074686520756e7374616b6520706572696f6420746f20656e737572652074686174690120766f74696e67207374616b657273206861766520616e206f70706f7274756e69747920746f2072656d6f7665207468656d73656c7665732066726f6d207468652073797374656d20696e2074686520636173652077686572659c207468657920617265206f6e20746865206c6f73696e672073696465206f66206120766f74652e304c61756e6368506572696f6438543a3a426c6f636b4e756d62657210004e0c0004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e30566f74696e67506572696f6438543a3a426c6f636b4e756d62657210004e0c0004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e384d696e696d756d4465706f7369743042616c616e63654f663c543e400000c16ff2862300000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e5446617374547261636b566f74696e67506572696f6438543a3a426c6f636b4e756d626572108051010004ec204d696e696d756d20766f74696e6720706572696f6420616c6c6f77656420666f7220616e20656d657267656e6379207265666572656e64756d2e34436f6f6c6f6666506572696f6438543a3a426c6f636b4e756d62657210004e0c0004610120506572696f6420696e20626c6f636b7320776865726520616e2065787465726e616c2070726f706f73616c206d6179206e6f742062652072652d7375626d6974746564206166746572206265696e67207665746f65642e4c507265696d616765427974654465706f7369743042616c616e63654f663c543e400010a5d4e800000000000000000000000429012054686520616d6f756e74206f662062616c616e63652074686174206d757374206265206465706f7369746564207065722062797465206f6620707265696d6167652073746f7265642e204d6178566f7465730c753332106400000004b020546865206d6178696d756d206e756d626572206f6620766f74657320666f7220616e206163636f756e742e8c2056616c75654c6f7704382056616c756520746f6f206c6f773c50726f706f73616c4d697373696e6704602050726f706f73616c20646f6573206e6f7420657869737420426164496e646578043820556e6b6e6f776e20696e6465783c416c726561647943616e63656c656404982043616e6e6f742063616e63656c207468652073616d652070726f706f73616c207477696365444475706c696361746550726f706f73616c04582050726f706f73616c20616c7265616479206d6164654c50726f706f73616c426c61636b6c6973746564046c2050726f706f73616c207374696c6c20626c61636b6c6973746564444e6f7453696d706c654d616a6f7269747904ac204e6578742065787465726e616c2070726f706f73616c206e6f742073696d706c65206d616a6f726974792c496e76616c696448617368043420496e76616c69642068617368284e6f50726f706f73616c0454204e6f2065787465726e616c2070726f706f73616c34416c72656164795665746f6564049c204964656e74697479206d6179206e6f74207665746f20612070726f706f73616c207477696365304e6f7444656c6567617465640438204e6f742064656c656761746564444475706c6963617465507265696d616765045c20507265696d61676520616c7265616479206e6f7465642c4e6f74496d6d696e656e740434204e6f7420696d6d696e656e7420546f6f4561726c79042820546f6f206561726c7920496d6d696e656e74042420496d6d696e656e743c507265696d6167654d697373696e67044c20507265696d616765206e6f7420666f756e64445265666572656e64756d496e76616c6964048820566f746520676976656e20666f7220696e76616c6964207265666572656e64756d3c507265696d616765496e76616c6964044420496e76616c696420707265696d6167652c4e6f6e6557616974696e670454204e6f2070726f706f73616c732077616974696e67244e6f744c6f636b656404a42054686520746172676574206163636f756e7420646f6573206e6f7420686176652061206c6f636b2e284e6f744578706972656404f020546865206c6f636b206f6e20746865206163636f756e7420746f20626520756e6c6f636b656420686173206e6f742079657420657870697265642e204e6f74566f74657204c82054686520676976656e206163636f756e7420646964206e6f7420766f7465206f6e20746865207265666572656e64756d2e304e6f5065726d697373696f6e04cc20546865206163746f7220686173206e6f207065726d697373696f6e20746f20636f6e647563742074686520616374696f6e2e44416c726561647944656c65676174696e67048c20546865206163636f756e7420697320616c72656164792064656c65676174696e672e204f766572666c6f7704a420416e20756e657870656374656420696e7465676572206f766572666c6f77206f636375727265642e24556e646572666c6f7704a820416e20756e657870656374656420696e746567657220756e646572666c6f77206f636375727265642e44496e73756666696369656e7446756e647304010120546f6f206869676820612062616c616e6365207761732070726f7669646564207468617420746865206163636f756e742063616e6e6f74206166666f72642e344e6f7444656c65676174696e6704a420546865206163636f756e74206973206e6f742063757272656e746c792064656c65676174696e672e28566f746573457869737408590120546865206163636f756e742063757272656e746c792068617320766f74657320617474616368656420746f20697420616e6420746865206f7065726174696f6e2063616e6e6f74207375636365656420756e74696cec207468657365206172652072656d6f7665642c20656974686572207468726f7567682060756e766f746560206f722060726561705f766f7465602e44496e7374616e744e6f74416c6c6f77656404dc2054686520696e7374616e74207265666572656e64756d206f726967696e2069732063757272656e746c7920646973616c6c6f7765642e204e6f6e73656e736504982044656c65676174696f6e20746f206f6e6573656c66206d616b6573206e6f2073656e73652e3c57726f6e675570706572426f756e64045420496e76616c696420757070657220626f756e642e3c4d6178566f746573526561636865640484204d6178696d756d206e756d626572206f6620766f74657320726561636865642e38496e76616c69645769746e6573730490205468652070726f7669646564207769746e65737320646174612069732077726f6e672e40546f6f4d616e7950726f706f73616c730494204d6178696d756d206e756d626572206f662070726f706f73616c7320726561636865642e0b1c436f756e63696c014c496e7374616e636531436f6c6c656374697665182450726f706f73616c73010090426f756e6465645665633c543a3a486173682c20543a3a4d617850726f706f73616c733e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368683c5420617320436f6e6669673c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e744964040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c38f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e004d01205472616e73616374696f6e20666565732077696c6c2062652077616976656420696620746865206d656d62657220697320766f74696e67206f6e20616e7920706172746963756c61722070726f706f73616c690120666f72207468652066697273742074696d6520616e64207468652063616c6c206973207375636365737366756c2e2053756273657175656e7420766f7465206368616e6765732077696c6c206368617267652061206665652e2c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e78510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e0065012049662074686520636c6f7365206f7065726174696f6e20636f6d706c65746573207375636365737366756c6c79207769746820646973617070726f76616c2c20746865207472616e73616374696f6e206665652077696c6c6101206265207761697665642e204f746865727769736520657865637574696f6e206f662074686520617070726f766564206f7065726174696f6e2077696c6c206265206368617267656420746f207468652063616c6c65722e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed8205c5b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645c5d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292eac205c5b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5c5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e6c205c5b70726f706f73616c5f686173682c207965732c206e6f5c5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e0c48546563686e6963616c436f6d6d6974746565014c496e7374616e636532436f6c6c656374697665182450726f706f73616c73010090426f756e6465645665633c543a3a486173682c20543a3a4d617850726f706f73616c733e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001061c543a3a48617368683c5420617320436f6e6669673c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001061c543a3a486173688c566f7465733c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000030543a3a4163636f756e744964040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e01182c7365745f6d656d626572730c2c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e147072696d65504f7074696f6e3c543a3a4163636f756e7449643e246f6c645f636f756e742c4d656d626572436f756e746084205365742074686520636f6c6c6563746976652773206d656d626572736869702e004901202d20606e65775f6d656d62657273603a20546865206e6577206d656d626572206c6973742e204265206e69636520746f2074686520636861696e20616e642070726f7669646520697420736f727465642ee4202d20607072696d65603a20546865207072696d65206d656d6265722077686f736520766f74652073657473207468652064656661756c742e3901202d20606f6c645f636f756e74603a2054686520757070657220626f756e6420666f72207468652070726576696f7573206e756d626572206f66206d656d6265727320696e2073746f726167652eac202020202020202020202020202020205573656420666f722077656967687420657374696d6174696f6e2e005820526571756972657320726f6f74206f726967696e2e005501204e4f54453a20446f6573206e6f7420656e666f7263652074686520657870656374656420604d61784d656d6265727360206c696d6974206f6e2074686520616d6f756e74206f66206d656d626572732c206275742501202020202020207468652077656967687420657374696d6174696f6e732072656c79206f6e20697420746f20657374696d61746520646973706174636861626c65207765696768742e002c2023203c7765696768743e282023232057656967687454202d20604f284d50202b204e29602077686572653ae42020202d20604d60206f6c642d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429e42020202d20604e60206e65772d6d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e646564299c2020202d206050602070726f706f73616c732d636f756e742028636f64652d626f756e6465642918202d2044423a75012020202d20312073746f72616765206d75746174696f6e2028636f64656320604f284d296020726561642c20604f284e29602077726974652920666f722072656164696e6720616e642077726974696e6720746865206d656d62657273f02020202d20312073746f7261676520726561642028636f64656320604f285029602920666f722072656164696e67207468652070726f706f73616c7349012020202d206050602073746f72616765206d75746174696f6e732028636f64656320604f284d29602920666f72207570646174696e672074686520766f74657320666f7220656163682070726f706f73616c61012020202d20312073746f726167652077726974652028636f64656320604f283129602920666f722064656c6574696e6720746865206f6c6420607072696d656020616e642073657474696e6720746865206e6577206f6e65302023203c2f7765696768743e1c65786563757465082070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e28f420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e002c2023203c7765696768743e28202323205765696768748501202d20604f284d202b2050296020776865726520604d60206d656d626572732d636f756e742028636f64652d626f756e6465642920616e642060506020636f6d706c6578697479206f66206469737061746368696e67206070726f706f73616c60d8202d2044423a203120726561642028636f64656320604f284d296029202b20444220616363657373206f66206070726f706f73616c6028202d2031206576656e74302023203c2f7765696768743e1c70726f706f73650c247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c7c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e306c656e6774685f626f756e6430436f6d706163743c7533323e6cfc204164642061206e65772070726f706f73616c20746f2065697468657220626520766f746564206f6e206f72206578656375746564206469726563746c792e0088205265717569726573207468652073656e64657220746f206265206d656d6265722e00450120607468726573686f6c64602064657465726d696e65732077686574686572206070726f706f73616c60206973206578656375746564206469726563746c792028607468726573686f6c64203c2032602958206f722070757420757020666f7220766f74696e672e002c2023203c7765696768743e2820232320576569676874b0202d20604f2842202b204d202b2050312960206f7220604f2842202b204d202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429c82020202d206272616e6368696e6720697320696e666c75656e63656420627920607468726573686f6c64602077686572653af820202020202d20605031602069732070726f706f73616c20657865637574696f6e20636f6d706c65786974792028607468726573686f6c64203c20326029010120202020202d20605032602069732070726f706f73616c732d636f756e742028636f64652d626f756e646564292028607468726573686f6c64203e3d2032602918202d2044423ab82020202d20312073746f726167652072656164206069735f6d656d626572602028636f64656320604f284d296029f42020202d20312073746f726167652072656164206050726f706f73616c4f663a3a636f6e7461696e735f6b6579602028636f64656320604f2831296029ac2020202d20444220616363657373657320696e666c75656e63656420627920607468726573686f6c64603a0d0120202020202d204549544845522073746f7261676520616363657373657320646f6e65206279206070726f706f73616c602028607468726573686f6c64203c20326029bc20202020202d204f522070726f706f73616c20696e73657274696f6e2028607468726573686f6c64203c3d20326029dc202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c73602028636f64656320604f285032296029e8202020202020202d20312073746f72616765206d75746174696f6e206050726f706f73616c436f756e74602028636f64656320604f2831296029d0202020202020202d20312073746f72616765207772697465206050726f706f73616c4f66602028636f64656320604f2842296029c0202020202020202d20312073746f726167652077726974652060566f74696e67602028636f64656320604f284d296029302020202d2031206576656e74302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c38f42041646420616e20617965206f72206e617920766f746520666f72207468652073656e64657220746f2074686520676976656e2070726f706f73616c2e0090205265717569726573207468652073656e64657220746f2062652061206d656d6265722e004d01205472616e73616374696f6e20666565732077696c6c2062652077616976656420696620746865206d656d62657220697320766f74696e67206f6e20616e7920706172746963756c61722070726f706f73616c690120666f72207468652066697273742074696d6520616e64207468652063616c6c206973207375636365737366756c2e2053756273657175656e7420766f7465206368616e6765732077696c6c206368617267652061206665652e2c2023203c7765696768743e28202323205765696768740d01202d20604f284d296020776865726520604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e6465642918202d2044423ab02020202d20312073746f72616765207265616420604d656d62657273602028636f64656320604f284d296029bc2020202d20312073746f72616765206d75746174696f6e2060566f74696e67602028636f64656320604f284d29602928202d2031206576656e74302023203c2f7765696768743e14636c6f7365103470726f706f73616c5f686173681c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e5470726f706f73616c5f7765696768745f626f756e643c436f6d706163743c5765696768743e306c656e6774685f626f756e6430436f6d706163743c7533323e78510120436c6f7365206120766f746520746861742069732065697468657220617070726f7665642c20646973617070726f766564206f722077686f736520766f74696e6720706572696f642068617320656e6465642e005901204d61792062652063616c6c656420627920616e79207369676e6564206163636f756e7420696e206f7264657220746f2066696e69736820766f74696e6720616e6420636c6f7365207468652070726f706f73616c2e004d012049662063616c6c6564206265666f72652074686520656e64206f662074686520766f74696e6720706572696f642069742077696c6c206f6e6c7920636c6f73652074686520766f7465206966206974206973c02068617320656e6f75676820766f74657320746f20626520617070726f766564206f7220646973617070726f7665642e004d012049662063616c6c65642061667465722074686520656e64206f662074686520766f74696e6720706572696f642061627374656e74696f6e732061726520636f756e7465642061732072656a656374696f6e73290120756e6c6573732074686572652069732061207072696d65206d656d6265722073657420616e6420746865207072696d65206d656d626572206361737420616e20617070726f76616c2e0065012049662074686520636c6f7365206f7065726174696f6e20636f6d706c65746573207375636365737366756c6c79207769746820646973617070726f76616c2c20746865207472616e73616374696f6e206665652077696c6c6101206265207761697665642e204f746865727769736520657865637574696f6e206f662074686520617070726f766564206f7065726174696f6e2077696c6c206265206368617267656420746f207468652063616c6c65722e008d01202b206070726f706f73616c5f7765696768745f626f756e64603a20546865206d6178696d756d20616d6f756e74206f662077656967687420636f6e73756d656420627920657865637574696e672074686520636c6f7365642070726f706f73616c2e6501202b20606c656e6774685f626f756e64603a2054686520757070657220626f756e6420666f7220746865206c656e677468206f66207468652070726f706f73616c20696e2073746f726167652e20436865636b6564207669618101202020202020202020202020202020202020206073746f726167653a3a726561646020736f206974206973206073697a655f6f663a3a3c7533323e2829203d3d203460206c6172676572207468616e207468652070757265206c656e6774682e002c2023203c7765696768743e282023232057656967687478202d20604f2842202b204d202b205031202b20503229602077686572653ae42020202d20604260206973206070726f706f73616c602073697a6520696e20627974657320286c656e6774682d6665652d626f756e64656429e02020202d20604d60206973206d656d626572732d636f756e742028636f64652d20616e6420676f7665726e616e63652d626f756e64656429cc2020202d20605031602069732074686520636f6d706c6578697479206f66206070726f706f73616c6020707265696d6167652ea82020202d20605032602069732070726f706f73616c2d636f756e742028636f64652d626f756e6465642918202d2044423a110120202d20322073746f726167652072656164732028604d656d62657273603a20636f64656320604f284d29602c20605072696d65603a20636f64656320604f2831296029810120202d2033206d75746174696f6e73202860566f74696e67603a20636f64656320604f284d29602c206050726f706f73616c4f66603a20636f64656320604f284229602c206050726f706f73616c73603a20636f64656320604f285032296029e020202d20616e79206d75746174696f6e7320646f6e65207768696c6520657865637574696e67206070726f706f73616c602028605031602944202d20757020746f2033206576656e7473302023203c2f7765696768743e4c646973617070726f76655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736834790120446973617070726f766520612070726f706f73616c2c20636c6f73652c20616e642072656d6f76652069742066726f6d207468652073797374656d2c207265676172646c657373206f66206974732063757272656e742073746174652e008c204d7573742062652063616c6c65642062792074686520526f6f74206f726967696e2e003020506172616d65746572733a2101202a206070726f706f73616c5f68617368603a205468652068617368206f66207468652070726f706f73616c20746861742073686f756c6420626520646973617070726f7665642e002c2023203c7765696768743ee020436f6d706c65786974793a204f285029207768657265205020697320746865206e756d626572206f66206d61782070726f706f73616c732c204442205765696768743a4c202a2052656164733a2050726f706f73616c73a0202a205772697465733a20566f74696e672c2050726f706f73616c732c2050726f706f73616c4f66302023203c2f7765696768743e011c2050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e740c4d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292ed8205c5b6163636f756e742c2070726f706f73616c5f696e6465782c2070726f706f73616c5f686173682c207468726573686f6c645c5d14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740c09012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292eac205c5b6163636f756e742c2070726f706f73616c5f686173682c20766f7465642c207965732c206e6f5c5d20417070726f76656404104861736808c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d2c446973617070726f76656404104861736808d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e48205c5b70726f706f73616c5f686173685c5d204578656375746564081048617368384469737061746368526573756c740825012041206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d384d656d6265724578656375746564081048617368384469737061746368526573756c74084d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e68205c5b70726f706f73616c5f686173682c20726573756c745c5d18436c6f7365640c10486173682c4d656d626572436f756e742c4d656d626572436f756e7408590120412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e6c205c5b70726f706f73616c5f686173682c207965732c206e6f5c5d0028244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c790405012054686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c730401012054686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c57656967687404d42054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e67746804d42054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e0d24456c656374696f6e730124456c656374696f6e73141c4d656d626572730100ac5665633c53656174486f6c6465723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e04000c74205468652063757272656e7420656c6563746564206d656d626572732e00b820496e76617269616e743a20416c7761797320736f72746564206261736564206f6e206163636f756e742069642e2452756e6e65727355700100ac5665633c53656174486f6c6465723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e04001084205468652063757272656e742072657365727665642072756e6e6572732d75702e00590120496e76617269616e743a20416c7761797320736f72746564206261736564206f6e2072616e6b2028776f72736520746f2062657374292e2055706f6e2072656d6f76616c206f662061206d656d6265722c20746865bc206c6173742028692e652e205f626573745f292072756e6e65722d75702077696c6c206265207265706c616365642e2843616e646964617465730100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e0400185901205468652070726573656e742063616e646964617465206c6973742e20412063757272656e74206d656d626572206f722072756e6e65722d75702063616e206e6576657220656e746572207468697320766563746f72d020616e6420697320616c7761797320696d706c696369746c7920617373756d656420746f20626520612063616e6469646174652e007c205365636f6e6420656c656d656e7420697320746865206465706f7369742e00b820496e76617269616e743a20416c7761797320736f72746564206261736564206f6e206163636f756e742069642e38456c656374696f6e526f756e647301000c75333210000000000441012054686520746f74616c206e756d626572206f6620766f746520726f756e6473207468617420686176652068617070656e65642c206578636c7564696e6720746865207570636f6d696e67206f6e652e18566f74696e6701010530543a3a4163636f756e74496484566f7465723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e00840000000000000000000000000000000000000000000000000000000000000000000cb820566f74657320616e64206c6f636b6564207374616b65206f66206120706172746963756c617220766f7465722e00c42054574f582d4e4f54453a205341464520617320604163636f756e7449646020697320612063727970746f20686173682e011810766f74650814766f746573445665633c543a3a4163636f756e7449643e1476616c756554436f6d706163743c42616c616e63654f663c543e3e5c5d0120566f746520666f72206120736574206f662063616e6469646174657320666f7220746865207570636f6d696e6720726f756e64206f6620656c656374696f6e2e20546869732063616e2062652063616c6c656420746fe4207365742074686520696e697469616c20766f7465732c206f722075706461746520616c7265616479206578697374696e6720766f7465732e0061012055706f6e20696e697469616c20766f74696e672c206076616c75656020756e697473206f66206077686f6027732062616c616e6365206973206c6f636b656420616e642061206465706f73697420616d6f756e7420697351012072657365727665642e20546865206465706f736974206973206261736564206f6e20746865206e756d626572206f6620766f74657320616e642063616e2062652075706461746564206f7665722074696d652e0050205468652060766f746573602073686f756c643a482020202d206e6f7420626520656d7074792e59012020202d206265206c657373207468616e20746865206e756d626572206f6620706f737369626c652063616e646964617465732e204e6f7465207468617420616c6c2063757272656e74206d656d6265727320616e641501202020202072756e6e6572732d75702061726520616c736f206175746f6d61746963616c6c792063616e6469646174657320666f7220746865206e65787420726f756e642e005101204966206076616c756560206973206d6f7265207468616e206077686f60277320746f74616c2062616c616e63652c207468656e20746865206d6178696d756d206f66207468652074776f20697320757365642e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265207369676e65642e003020232323205761726e696e670059012049742069732074686520726573706f6e736962696c697479206f66207468652063616c6c657220746f202a2a4e4f542a2a20706c61636520616c6c206f662074686569722062616c616e636520696e746f20746865ac206c6f636b20616e64206b65657020736f6d6520666f722066757274686572206f7065726174696f6e732e002c2023203c7765696768743e550120576520617373756d6520746865206d6178696d756d2077656967687420616d6f6e6720616c6c20332063617365733a20766f74655f657175616c2c20766f74655f6d6f726520616e6420766f74655f6c6573732e302023203c2f7765696768743e3072656d6f76655f766f7465720014702052656d6f766520606f726967696e60206173206120766f7465722e00bc20546869732072656d6f76657320746865206c6f636b20616e642072657475726e7320746865206465706f7369742e00010120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265207369676e656420616e64206265206120766f7465722e407375626d69745f63616e646964616379043c63616e6469646174655f636f756e7430436f6d706163743c7533323e3c1501205375626d6974206f6e6573656c6620666f722063616e6469646163792e204120666978656420616d6f756e74206f66206465706f736974206973207265636f726465642e00610120416c6c2063616e64696461746573206172652077697065642061742074686520656e64206f6620746865207465726d2e205468657920656974686572206265636f6d652061206d656d6265722f72756e6e65722d75702cd0206f72206c65617665207468652073797374656d207768696c65207468656972206465706f73697420697320736c61736865642e00c420546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265207369676e65642e003020232323205761726e696e67006101204576656e20696620612063616e64696461746520656e6473207570206265696e672061206d656d6265722c2074686579206d7573742063616c6c205b6043616c6c3a3a72656e6f756e63655f63616e646964616379605d5d0120746f20676574207468656972206465706f736974206261636b2e204c6f73696e67207468652073706f7420696e20616e20656c656374696f6e2077696c6c20616c77617973206c65616420746f206120736c6173682e002c2023203c7765696768743e0d0120546865206e756d626572206f662063757272656e742063616e64696461746573206d7573742062652070726f7669646564206173207769746e65737320646174612e302023203c2f7765696768743e4872656e6f756e63655f63616e646964616379042872656e6f756e63696e672852656e6f756e63696e674451012052656e6f756e6365206f6e65277320696e74656e74696f6e20746f20626520612063616e64696461746520666f7220746865206e65787420656c656374696f6e20726f756e642e203320706f74656e7469616c40206f7574636f6d65732065786973743a004d01202d20606f726967696e6020697320612063616e64696461746520616e64206e6f7420656c656374656420696e20616e79207365742e20496e207468697320636173652c20746865206465706f736974206973f4202020756e72657365727665642c2072657475726e656420616e64206f726967696e2069732072656d6f76656420617320612063616e6469646174652e6501202d20606f726967696e6020697320612063757272656e742072756e6e65722d75702e20496e207468697320636173652c20746865206465706f73697420697320756e72657365727665642c2072657475726e656420616e64902020206f726967696e2069732072656d6f76656420617320612072756e6e65722d75702e5901202d20606f726967696e6020697320612063757272656e74206d656d6265722e20496e207468697320636173652c20746865206465706f73697420697320756e726573657276656420616e64206f726967696e206973590120202072656d6f7665642061732061206d656d6265722c20636f6e73657175656e746c79206e6f74206265696e6720612063616e64696461746520666f7220746865206e65787420726f756e6420616e796d6f72652e550120202053696d696c617220746f205b6072656d6f76655f6d656d62657273605d2c206966207265706c6163656d656e742072756e6e657273206578697374732c20746865792061726520696d6d6564696174656c794d01202020757365642e20496620746865207072696d652069732072656e6f756e63696e672c207468656e206e6f207072696d652077696c6c20657869737420756e74696c20746865206e65787420726f756e642e00490120546865206469737061746368206f726967696e206f6620746869732063616c6c206d757374206265207369676e65642c20616e642068617665206f6e65206f66207468652061626f766520726f6c65732e002c2023203c7765696768743ee4205468652074797065206f662072656e6f756e63696e67206d7573742062652070726f7669646564206173207769746e65737320646174612e302023203c2f7765696768743e3472656d6f76655f6d656d626572080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653c6861735f7265706c6163656d656e7410626f6f6c385d012052656d6f7665206120706172746963756c6172206d656d6265722066726f6d20746865207365742e20546869732069732065666665637469766520696d6d6564696174656c7920616e642074686520626f6e64206f668020746865206f7574676f696e67206d656d62657220697320736c61736865642e00590120496620612072756e6e65722d757020697320617661696c61626c652c207468656e2074686520626573742072756e6e65722d75702077696c6c2062652072656d6f76656420616e64207265706c61636573207468650101206f7574676f696e67206d656d6265722e204f74686572776973652c2061206e65772070687261676d656e20656c656374696f6e20697320737461727465642e00bc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d75737420626520726f6f742e004501204e6f74652074686174207468697320646f6573206e6f7420616666656374207468652064657369676e6174656420626c6f636b206e756d626572206f6620746865206e65787420656c656374696f6e2e002c2023203c7765696768743e550120496620776520686176652061207265706c6163656d656e742c20776520757365206120736d616c6c207765696768742e20456c73652c2073696e63652074686973206973206120726f6f742063616c6c20616e64d42077696c6c20676f20696e746f2070687261676d656e2c20776520617373756d652066756c6c20626c6f636b20666f72206e6f772e302023203c2f7765696768743e50636c65616e5f646566756e63745f766f74657273082c5f6e756d5f766f746572730c753332305f6e756d5f646566756e63740c75333228490120436c65616e20616c6c20766f746572732077686f2061726520646566756e63742028692e652e207468657920646f206e6f7420736572766520616e7920707572706f736520617420616c6c292e20546865b0206465706f736974206f66207468652072656d6f76656420766f74657273206172652072657475726e65642e000501205468697320697320616e20726f6f742066756e6374696f6e20746f2062652075736564206f6e6c7920666f7220636c65616e696e67207468652073746174652e00bc20546865206469737061746368206f726967696e206f6620746869732063616c6c206d75737420626520726f6f742e002c2023203c7765696768743e61012054686520746f74616c206e756d626572206f6620766f7465727320616e642074686f736520746861742061726520646566756e6374206d7573742062652070726f7669646564206173207769746e65737320646174612e302023203c2f7765696768743e011c1c4e65775465726d04645665633c284163636f756e7449642c2042616c616e6365293e1459012041206e6577207465726d2077697468205c5b6e65775f6d656d626572735c5d2e205468697320696e64696361746573207468617420656e6f7567682063616e64696461746573206578697374656420746f2072756e59012074686520656c656374696f6e2c206e6f74207468617420656e6f756768206861766520686173206265656e20656c65637465642e2054686520696e6e65722076616c7565206d757374206265206578616d696e6564490120666f72207468697320707572706f73652e204120604e65775465726d285c5b5c5d296020696e64696361746573207468617420736f6d652063616e6469646174657320676f7420746865697220626f6e64590120736c617368656420616e64206e6f6e65207765726520656c65637465642c207768696c73742060456d7074795465726d60206d65616e732074686174206e6f2063616e64696461746573206578697374656420746f3020626567696e20776974682e24456d7074795465726d00083501204e6f20286f72206e6f7420656e6f756768292063616e64696461746573206578697374656420666f72207468697320726f756e642e205468697320697320646966666572656e742066726f6dcc20604e65775465726d285c5b5c5d29602e2053656520746865206465736372697074696f6e206f6620604e65775465726d602e34456c656374696f6e4572726f720004e820496e7465726e616c206572726f722068617070656e6564207768696c6520747279696e6720746f20706572666f726d20656c656374696f6e2e304d656d6265724b69636b656404244163636f756e7449640855012041205c5b6d656d6265725c5d20686173206265656e2072656d6f7665642e20546869732073686f756c6420616c7761797320626520666f6c6c6f7765642062792065697468657220604e65775465726d60206f72342060456d7074795465726d602e2452656e6f756e63656404244163636f756e744964049c20536f6d656f6e65206861732072656e6f756e6365642074686569722063616e6469646163792e4043616e646964617465536c617368656408244163636f756e7449641c42616c616e6365105d012041205c5b63616e6469646174655c5d2077617320736c6173686564206279205c5b616d6f756e745c5d2064756520746f206661696c696e6720746f206f627461696e20612073656174206173206d656d626572206f722c2072756e6e65722d75702e00e8204e6f74652074686174206f6c64206d656d6265727320616e642072756e6e6572732d75702061726520616c736f2063616e646964617465732e4453656174486f6c646572536c617368656408244163636f756e7449641c42616c616e63650459012041205c5b7365617420686f6c6465725c5d2077617320736c6173686564206279205c5b616d6f756e745c5d206279206265696e6720666f72636566756c6c792072656d6f7665642066726f6d20746865207365742e1c2050616c6c65744964384c6f636b4964656e74696669657220706872656c65637404d0204964656e74696669657220666f722074686520656c656374696f6e732d70687261676d656e2070616c6c65742773206c6f636b3443616e646964616379426f6e643042616c616e63654f663c543e400080c6a47e8d0300000000000000000004050120486f77206d7563682073686f756c64206265206c6f636b656420757020696e206f7264657220746f207375626d6974206f6e6527732063616e6469646163792e38566f74696e67426f6e64426173653042616c616e63654f663c543e4000f0436de36a0100000000000000000010942042617365206465706f736974206173736f636961746564207769746820766f74696e672e00550120546869732073686f756c642062652073656e7369626c79206869676820746f2065636f6e6f6d6963616c6c7920656e73757265207468652070616c6c65742063616e6e6f742062652061747461636b656420627994206372656174696e67206120676967616e746963206e756d626572206f6620766f7465732e40566f74696e67426f6e64466163746f723042616c616e63654f663c543e400000cc7b9fae000000000000000000000411012054686520616d6f756e74206f6620626f6e642074686174206e65656420746f206265206c6f636b656420666f72206561636820766f746520283332206279746573292e38446573697265644d656d626572730c753332100d0000000470204e756d626572206f66206d656d6265727320746f20656c6563742e404465736972656452756e6e65727355700c75333210070000000478204e756d626572206f662072756e6e6572735f757020746f206b6565702e305465726d4475726174696f6e38543a3a426c6f636b4e756d62657210801303000c510120486f77206c6f6e6720656163682073656174206973206b6570742e205468697320646566696e657320746865206e65787420626c6f636b206e756d62657220617420776869636820616e20656c656374696f6e5d0120726f756e642077696c6c2068617070656e2e2049662073657420746f207a65726f2c206e6f20656c656374696f6e732061726520657665722074726967676572656420616e6420746865206d6f64756c652077696c6c5020626520696e2070617373697665206d6f64652e4430556e61626c65546f566f746504c42043616e6e6f7420766f7465207768656e206e6f2063616e64696461746573206f72206d656d626572732065786973742e1c4e6f566f7465730498204d75737420766f746520666f72206174206c65617374206f6e652063616e6469646174652e30546f6f4d616e79566f74657304882043616e6e6f7420766f7465206d6f7265207468616e2063616e646964617465732e504d6178696d756d566f7465734578636565646564049c2043616e6e6f7420766f7465206d6f7265207468616e206d6178696d756d20616c6c6f7765642e284c6f7742616c616e636504c82043616e6e6f7420766f74652077697468207374616b65206c657373207468616e206d696e696d756d2062616c616e63652e3c556e61626c65546f506179426f6e64047c20566f7465722063616e206e6f742070617920766f74696e6720626f6e642e2c4d7573744265566f7465720444204d757374206265206120766f7465722e285265706f727453656c6604502043616e6e6f74207265706f72742073656c662e4c4475706c69636174656443616e6469646174650484204475706c6963617465642063616e646964617465207375626d697373696f6e2e304d656d6265725375626d6974048c204d656d6265722063616e6e6f742072652d7375626d69742063616e6469646163792e3852756e6e657255705375626d6974048c2052756e6e65722063616e6e6f742072652d7375626d69742063616e6469646163792e68496e73756666696369656e7443616e64696461746546756e647304982043616e64696461746520646f6573206e6f74206861766520656e6f7567682066756e64732e244e6f744d656d6265720438204e6f742061206d656d6265722e48496e76616c69645769746e6573734461746104e4205468652070726f766964656420636f756e74206f66206e756d626572206f662063616e6469646174657320697320696e636f72726563742e40496e76616c6964566f7465436f756e7404d0205468652070726f766964656420636f756e74206f66206e756d626572206f6620766f74657320697320696e636f72726563742e44496e76616c696452656e6f756e63696e67040101205468652072656e6f756e63696e67206f726967696e2070726573656e74656420612077726f6e67206052656e6f756e63696e676020706172616d657465722e48496e76616c69645265706c6163656d656e740401012050726564696374696f6e20726567617264696e67207265706c6163656d656e74206166746572206d656d6265722072656d6f76616c2069732077726f6e672e0e4c546563686e6963616c4d656d62657273686970014c496e7374616e6365314d656d62657273686970081c4d656d626572730100445665633c543a3a4163636f756e7449643e040004c8205468652063757272656e74206d656d626572736869702c2073746f72656420617320616e206f726465726564205665632e145072696d65000030543a3a4163636f756e744964040004a4205468652063757272656e74207072696d65206d656d6265722c206966206f6e65206578697374732e011c286164645f6d656d626572040c77686f30543a3a4163636f756e7449640c7c204164642061206d656d626572206077686f6020746f20746865207365742e00a0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a4164644f726967696e602e3472656d6f76655f6d656d626572040c77686f30543a3a4163636f756e7449640c902052656d6f76652061206d656d626572206077686f602066726f6d20746865207365742e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656d6f76654f726967696e602e2c737761705f6d656d626572081872656d6f766530543a3a4163636f756e7449640c61646430543a3a4163636f756e74496414c02053776170206f7574206f6e65206d656d626572206072656d6f76656020666f7220616e6f746865722060616464602e00a4204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a537761704f726967696e602e001101205072696d65206d656d62657273686970206973202a6e6f742a207061737365642066726f6d206072656d6f76656020746f2060616464602c20696620657874616e742e3472657365745f6d656d62657273041c6d656d62657273445665633c543a3a4163636f756e7449643e105901204368616e676520746865206d656d6265727368697020746f2061206e6577207365742c20646973726567617264696e6720746865206578697374696e67206d656d626572736869702e204265206e69636520616e646c207061737320606d656d6265727360207072652d736f727465642e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52657365744f726967696e602e286368616e67655f6b6579040c6e657730543a3a4163636f756e74496414d82053776170206f7574207468652073656e64696e67206d656d62657220666f7220736f6d65206f74686572206b657920606e6577602e00f4204d6179206f6e6c792062652063616c6c65642066726f6d20605369676e656460206f726967696e206f6620612063757272656e74206d656d6265722e002101205072696d65206d656d62657273686970206973207061737365642066726f6d20746865206f726967696e206163636f756e7420746f20606e6577602c20696620657874616e742e247365745f7072696d65040c77686f30543a3a4163636f756e7449640cc02053657420746865207072696d65206d656d6265722e204d75737420626520612063757272656e74206d656d6265722e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e2c636c6561725f7072696d65000c982052656d6f766520746865207072696d65206d656d626572206966206974206578697374732e00a8204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a5072696d654f726967696e602e01182c4d656d62657241646465640004e42054686520676976656e206d656d626572207761732061646465643b2073656520746865207472616e73616374696f6e20666f722077686f2e344d656d62657252656d6f7665640004ec2054686520676976656e206d656d626572207761732072656d6f7665643b2073656520746865207472616e73616374696f6e20666f722077686f2e384d656d62657273537761707065640004dc2054776f206d656d62657273207765726520737761707065643b2073656520746865207472616e73616374696f6e20666f722077686f2e304d656d6265727352657365740004190120546865206d656d62657273686970207761732072657365743b2073656520746865207472616e73616374696f6e20666f722077686f20746865206e6577207365742069732e284b65794368616e676564000488204f6e65206f6620746865206d656d6265727327206b657973206368616e6765642e1444756d6d7904bc73705f7374643a3a6d61726b65723a3a5068616e746f6d446174613c284163636f756e7449642c204576656e74293e0470205068616e746f6d206d656d6265722c206e6576657220757365642e000834416c72656164794d656d626572044820416c72656164792061206d656d6265722e244e6f744d656d6265720438204e6f742061206d656d6265722e0f1c4772616e647061013c4772616e64706146696e616c6974791814537461746501006c53746f72656453746174653c543a3a426c6f636b4e756d6265723e04000490205374617465206f66207468652063757272656e7420617574686f72697479207365742e3450656e64696e674368616e676500008c53746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265723e040004c42050656e64696e67206368616e67653a20287369676e616c65642061742c207363686564756c6564206368616e6765292e284e657874466f72636564000038543a3a426c6f636b4e756d626572040004bc206e65787420626c6f636b206e756d6265722077686572652077652063616e20666f7263652061206368616e67652e1c5374616c6c656400008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d626572290400049020607472756560206966207765206172652063757272656e746c79207374616c6c65642e3043757272656e7453657449640100145365744964200000000000000000085d0120546865206e756d626572206f66206368616e6765732028626f746820696e207465726d73206f66206b65797320616e6420756e6465726c79696e672065636f6e6f6d696320726573706f6e736962696c697469657329c420696e20746865202273657422206f66204772616e6470612076616c696461746f72732066726f6d2067656e657369732e30536574496453657373696f6e0001051453657449643053657373696f6e496e6465780004001059012041206d617070696e672066726f6d206772616e6470612073657420494420746f2074686520696e646578206f6620746865202a6d6f737420726563656e742a2073657373696f6e20666f722077686963682069747368206d656d62657273207765726520726573706f6e7369626c652e00b82054574f582d4e4f54453a2060536574496460206973206e6f7420756e646572207573657220636f6e74726f6c2e010c4c7265706f72745f65717569766f636174696f6e084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66100d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e707265706f72745f65717569766f636174696f6e5f756e7369676e6564084865717569766f636174696f6e5f70726f6f66a845717569766f636174696f6e50726f6f663c543a3a486173682c20543a3a426c6f636b4e756d6265723e3c6b65795f6f776e65725f70726f6f6640543a3a4b65794f776e657250726f6f66240d01205265706f727420766f7465722065717569766f636174696f6e2f6d69736265686176696f722e2054686973206d6574686f642077696c6c2076657269667920746865f82065717569766f636174696f6e2070726f6f6620616e642076616c69646174652074686520676976656e206b6579206f776e6572736869702070726f6f66fc20616761696e73742074686520657874726163746564206f6666656e6465722e20496620626f7468206172652076616c69642c20746865206f6666656e6365482077696c6c206265207265706f727465642e00110120546869732065787472696e736963206d7573742062652063616c6c656420756e7369676e656420616e642069742069732065787065637465642074686174206f6e6c79190120626c6f636b20617574686f72732077696c6c2063616c6c206974202876616c69646174656420696e206056616c6964617465556e7369676e656460292c206173207375636819012069662074686520626c6f636b20617574686f7220697320646566696e65642069742077696c6c20626520646566696e6564206173207468652065717569766f636174696f6e28207265706f727465722e306e6f74655f7374616c6c6564081464656c617938543a3a426c6f636b4e756d6265726c626573745f66696e616c697a65645f626c6f636b5f6e756d62657238543a3a426c6f636b4e756d6265721c1d01204e6f74652074686174207468652063757272656e7420617574686f7269747920736574206f6620746865204752414e4450412066696e616c69747920676164676574206861732901207374616c6c65642e20546869732077696c6c2074726967676572206120666f7263656420617574686f7269747920736574206368616e67652061742074686520626567696e6e696e672101206f6620746865206e6578742073657373696f6e2c20746f20626520656e6163746564206064656c61796020626c6f636b7320616674657220746861742e205468652064656c617915012073686f756c64206265206869676820656e6f75676820746f20736166656c7920617373756d6520746861742074686520626c6f636b207369676e616c6c696e6720746865290120666f72636564206368616e67652077696c6c206e6f742062652072652d6f726765642028652e672e203130303020626c6f636b73292e20546865204752414e44504120766f7465727329012077696c6c20737461727420746865206e657720617574686f7269747920736574207573696e672074686520676976656e2066696e616c697a656420626c6f636b20617320626173652e5c204f6e6c792063616c6c61626c6520627920726f6f742e010c384e6577417574686f7269746965730434417574686f726974794c69737404d8204e657720617574686f726974792073657420686173206265656e206170706c6965642e205c5b617574686f726974795f7365745c5d1850617573656400049c2043757272656e7420617574686f726974792073657420686173206265656e207061757365642e1c526573756d65640004a02043757272656e7420617574686f726974792073657420686173206265656e20726573756d65642e001c2c50617573654661696c656408090120417474656d707420746f207369676e616c204752414e445041207061757365207768656e2074686520617574686f72697479207365742069736e2774206c697665a8202865697468657220706175736564206f7220616c72656164792070656e64696e67207061757365292e30526573756d654661696c656408150120417474656d707420746f207369676e616c204752414e44504120726573756d65207768656e2074686520617574686f72697479207365742069736e277420706175736564a42028656974686572206c697665206f7220616c72656164792070656e64696e6720726573756d65292e344368616e676550656e64696e6704ec20417474656d707420746f207369676e616c204752414e445041206368616e67652077697468206f6e6520616c72656164792070656e64696e672e1c546f6f536f6f6e04c02043616e6e6f74207369676e616c20666f72636564206368616e676520736f20736f6f6e206166746572206c6173742e60496e76616c69644b65794f776e65727368697050726f6f660435012041206b6579206f776e6572736869702070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e60496e76616c696445717569766f636174696f6e50726f6f6604350120416e2065717569766f636174696f6e2070726f6f662070726f76696465642061732070617274206f6620616e2065717569766f636174696f6e207265706f727420697320696e76616c69642e584475706c69636174654f6666656e63655265706f7274041901204120676976656e2065717569766f636174696f6e207265706f72742069732076616c69642062757420616c72656164792070726576696f75736c79207265706f727465642e10205472656173757279012054726561737572790c3450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c730001053450726f706f73616c496e6465789c50726f706f73616c3c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e000400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100a8426f756e6465645665633c50726f706f73616c496e6465782c20543a3a4d6178417070726f76616c733e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e010c3470726f706f73655f7370656e64081476616c756560436f6d706163743c42616c616e63654f663c542c20493e3e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365242d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129b4202d20446252656164733a206050726f706f73616c436f756e74602c20606f726967696e206163636f756e7460ec202d2044625772697465733a206050726f706f73616c436f756e74602c206050726f706f73616c73602c20606f726967696e206163636f756e7460302023203c2f7765696768743e3c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e24fc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656a6563744f726967696e602e002c2023203c7765696768743e4c202d20436f6d706c65786974793a204f283129d0202d20446252656164733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460d4202d2044625772697465733a206050726f706f73616c73602c206072656a65637465642070726f706f736572206163636f756e7460302023203c2f7765696768743e40617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e285d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e50202d20436f6d706c65786974793a204f2831292e90202d20446252656164733a206050726f706f73616c73602c2060417070726f76616c73605c202d20446257726974653a2060417070726f76616c7360302023203c2f7765696768743e011c2050726f706f736564043450726f706f73616c496e6465780484204e65772070726f706f73616c2e205c5b70726f706f73616c5f696e6465785c5d205370656e64696e67041c42616c616e6365043d01205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e205c5b6275646765745f72656d61696e696e675c5d1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964041d0120536f6d652066756e64732068617665206265656e20616c6c6f63617465642e205c5b70726f706f73616c5f696e6465782c2061776172642c2062656e65666963696172795c5d2052656a6563746564083450726f706f73616c496e6465781c42616c616e636504250120412070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e205c5b70726f706f73616c5f696e6465782c20736c61736865645c5d144275726e74041c42616c616e636504b020536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e205c5b6275726e5c5d20526f6c6c6f766572041c42616c616e6365083101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e54205c5b6275646765745f72656d61696e696e675c5d1c4465706f736974041c42616c616e636504b020536f6d652066756e64732068617665206265656e206465706f73697465642e205c5b6465706f7369745c5d143050726f706f73616c426f6e641c5065726d696c6c1050c30000085501204672616374696f6e206f6620612070726f706f73616c27732076616c756520746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c616365207468652070726f706f73616c2e110120416e2061636365707465642070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f6573206e6f742e4c50726f706f73616c426f6e644d696e696d756d3c42616c616e63654f663c542c20493e4000407a10f35a00000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f6438543a3a426c6f636b4e756d6265721080700000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e1c5065726d696c6c1020a107000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e2050616c6c657449642050616c6c657449642070792f7472737279041901205468652074726561737572792773206d6f64756c652069642c207573656420666f72206465726976696e672069747320736f7665726569676e206163636f756e742049442e0c70496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e30496e76616c6964496e6465780494204e6f2070726f706f73616c206f7220626f756e7479206174207468617420696e6465782e40546f6f4d616e79417070726f76616c73048420546f6f206d616e7920617070726f76616c7320696e207468652071756575652e1124436f6e7472616374730124436f6e747261637473183c43757272656e745363686564756c6501002c5363686564756c653c543e450a000000000004000000000200000001000080000000100000000010000000010000200000001f060000d66a0200dd84030026180000bd1c0000430b000003170000ae2800009c000000dd69010063e00200300700000706000065070000b10500006e180000002800006905000072deae08f0070000dc070000710a00006a080000a507000096070000d1070000770900003e09000075090000d809000082090000bc090000120900003c09000072090000dc090000f7080000e108000062090000162000006b1d00002e2000002c1b0000fe080000000900000f090000a7090000f1090000ba090000bb09000065090000d8b82800000000009e9828000000000016902700000000004c705700000000004cc8270000000000e4bc270000000000e8d1270000000000a0685b0000000000484f2700000000009e7627000000000000f45100000000004cab120000000000184a700000000000140100000000000000cd460000000000fc02000000000000d0b570270000000013200000000000007821da3100000000e0200000000000009a120000000000000482b10900000000e03463000000000038d7900000000000de67d00700000000840900000000000006186e000000000016935d1200000000da02000000000000eaced408000000003a240e0200000000e705000000000000fc41d50a00000000d48e9309000000002d0f0000000000003a4225090000000047020000000000002303000000000000ba7c962300000000a5210000000000006d020000000000005403000000000000e50b00000000000026922400000000006110000000000000a4122600000000001d0d000000000000520e2200000000001a0600000000000020222200000000001a0600000000000044b13c000000000004942043757272656e7420636f7374207363686564756c6520666f7220636f6e7472616374732e305072697374696e65436f64650001062c436f6465486173683c543e1c5665633c75383e0004000465012041206d617070696e672066726f6d20616e206f726967696e616c20636f6465206861736820746f20746865206f726967696e616c20636f64652c20756e746f756368656420627920696e737472756d656e746174696f6e2e2c436f646553746f726167650001062c436f6465486173683c543e4c5072656661625761736d4d6f64756c653c543e0004000465012041206d617070696e67206265747765656e20616e206f726967696e616c20636f6465206861736820616e6420696e737472756d656e746564207761736d20636f64652c20726561647920666f7220657865637574696f6e2e384163636f756e74436f756e74657201000c753634200000000000000000045420546865207375627472696520636f756e7465722e38436f6e7472616374496e666f4f6600010530543a3a4163636f756e7449643c436f6e7472616374496e666f3c543e0004000ca82054686520636f6465206173736f6369617465642077697468206120676976656e206163636f756e742e00d02054574f582d4e4f54453a20534146452073696e636520604163636f756e7449646020697320612073656375726520686173682e3444656c6574696f6e51756575650100505665633c44656c65746564436f6e74726163743e040010c8204576696374656420636f6e7472616374732074686174206177616974206368696c6420747269652064656c6574696f6e2e004901204368696c6420747269652064656c6574696f6e2069732061206865617679206f7065726174696f6e20646570656e64696e67206f6e2074686520616d6f756e74206f662073746f72616765206974656d7359012073746f72656420696e207361696420747269652e205468657265666f72652074686973206f7065726174696f6e20697320706572666f726d6564206c617a696c7920696e20606f6e5f696e697469616c697a65602e01143c7570646174655f7363686564756c6504207363686564756c652c5363686564756c653c543e18b4205570646174657320746865207363686564756c6520666f72206d65746572696e6720636f6e7472616374732e003d0120546865207363686564756c6527732076657273696f6e2063616e6e6f74206265206c657373207468616e207468652076657273696f6e206f66207468652073746f726564207363686564756c652e2d012049662061207363686564756c6520646f6573206e6f74206368616e67652074686520696e737472756374696f6e2077656967687473207468652076657273696f6e20646f6573206e6f743901206e65656420746f20626520696e637265617365642e205468657265666f726520776520616c6c6f772073746f72696e672061207363686564756c65207468617420686173207468652073616d656c2076657273696f6e206173207468652073746f726564206f6e652e1063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d69743c436f6d706163743c5765696768743e10646174611c5665633c75383e1c0901204d616b657320612063616c6c20746f20616e206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e002901202a20496620746865206163636f756e74206973206120736d6172742d636f6e7472616374206163636f756e742c20746865206173736f63696174656420636f64652077696c6c206265b020657865637574656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e1901202a20496620746865206163636f756e74206973206120726567756c6172206163636f756e742c20616e792076616c75652077696c6c206265207472616e736665727265642e4901202a204966206e6f206163636f756e742065786973747320616e64207468652063616c6c2076616c7565206973206e6f74206c657373207468616e20606578697374656e7469616c5f6465706f736974602c1501206120726567756c6172206163636f756e742077696c6c206265206372656174656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e54696e7374616e74696174655f776974685f636f64651424656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d69743c436f6d706163743c5765696768743e10636f64651c5665633c75383e10646174611c5665633c75383e1073616c741c5665633c75383e54350120496e7374616e7469617465732061206e657720636f6e74726163742066726f6d2074686520737570706c6965642060636f646560206f7074696f6e616c6c79207472616e7366657272696e673820736f6d652062616c616e63652e000501205468697320697320746865206f6e6c792066756e6374696f6e20746861742063616e206465706c6f79206e657720636f646520746f2074686520636861696e2e0034202320506172616d6574657273006101202a2060656e646f776d656e74603a205468652062616c616e636520746f207472616e736665722066726f6d2074686520606f726967696e6020746f20746865206e65776c79206372656174656420636f6e74726163742e1901202a20606761735f6c696d6974603a2054686520676173206c696d697420656e666f72636564207768656e20657865637574696e672074686520636f6e7374727563746f722ed0202a2060636f6465603a2054686520636f6e747261637420636f646520746f206465706c6f7920696e207261772062797465732ef8202a206064617461603a2054686520696e707574206461746120746f207061737320746f2074686520636f6e747261637420636f6e7374727563746f722e3501202a206073616c74603a205573656420666f722074686520616464726573732064657269766174696f6e2e20536565205b6050616c6c65743a3a636f6e74726163745f61646472657373605d2e009820496e7374616e74696174696f6e20697320657865637574656420617320666f6c6c6f77733a007501202d2054686520737570706c6965642060636f64656020697320696e737472756d656e7465642c206465706c6f7965642c20616e6420612060636f64655f6861736860206973206372656174656420666f72207468617420636f64652e5d01202d204966207468652060636f64655f686173686020616c726561647920657869737473206f6e2074686520636861696e2074686520756e6465726c79696e672060636f6465602077696c6c206265207368617265642e4d01202d205468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e6465722c20636f64655f6861736820616e64207468652073616c742e0501202d2054686520736d6172742d636f6e7472616374206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732ed4202d205468652060656e646f776d656e7460206973207472616e7366657272656420746f20746865206e6577206163636f756e742e4501202d2054686520606465706c6f79602066756e6374696f6e20697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792d63726561746564206163636f756e742e2c696e7374616e74696174651424656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d69743c436f6d706163743c5765696768743e24636f64655f686173682c436f6465486173683c543e10646174611c5665633c75383e1073616c741c5665633c75383e14010120496e7374616e746961746573206120636f6e74726163742066726f6d20612070726576696f75736c79206465706c6f796564207761736d2062696e6172792e00390120546869732066756e6374696f6e206973206964656e746963616c20746f205b6053656c663a3a696e7374616e74696174655f776974685f636f6465605d2062757420776974686f7574207468654d0120636f6465206465706c6f796d656e7420737465702e20496e73746561642c207468652060636f64655f6861736860206f6620616e206f6e2d636861696e206465706c6f796564207761736d2062696e61727948206d75737420626520737570706c6965642e3c636c61696d5f73757263686172676508106465737430543a3a4163636f756e744964286175785f73656e646572504f7074696f6e3c543a3a4163636f756e7449643e244d0120416c6c6f777320626c6f636b2070726f64756365727320746f20636c61696d206120736d616c6c2072657761726420666f72206576696374696e67206120636f6e74726163742e204966206120626c6f636b39012070726f6475636572206661696c7320746f20646f20736f2c206120726567756c61722075736572732077696c6c20626520616c6c6f77656420746f20636c61696d20746865207265776172642e004d0120496e2063617365206f662061207375636365737366756c206576696374696f6e206e6f20666565732061726520636861726765642066726f6d207468652073656e6465722e20486f77657665722c20746865490120726577617264206973206361707065642062792074686520746f74616c20616d6f756e74206f662072656e742074686174207761732070617965642062792074686520636f6e7472616374207768696c65382069742077617320616c6976652e00550120496620636f6e7472616374206973206e6f742065766963746564206173206120726573756c74206f6620746869732063616c6c2c205b604572726f723a3a436f6e74726163744e6f74457669637461626c65605dec2069732072657475726e656420616e64207468652073656e646572206973206e6f7420656c696769626c6520666f7220746865207265776172642e012030496e7374616e74696174656408244163636f756e744964244163636f756e74496404390120436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e205c5b6465706c6f7965722c20636f6e74726163745c5d1c4576696374656404244163636f756e74496404190120436f6e747261637420686173206265656e206576696374656420616e64206973206e6f7720696e20746f6d6273746f6e652073746174652e205c5b636f6e74726163745c5d285465726d696e6174656408244163636f756e744964244163636f756e74496430e820436f6e747261637420686173206265656e207465726d696e6174656420776974686f7574206c656176696e67206120746f6d6273746f6e652e68205c5b636f6e74726163742c2062656e65666963696172795c5d0024202320506172616d7300c0202d2060636f6e7472616374603a2054686520636f6e7472616374207468617420776173207465726d696e617465642e3101202d206062656e6566696369617279603a20546865206163636f756e7420746861742072656365697665642074686520636f6e7472616374732072656d61696e696e672062616c616e63652e001c2023204e6f7465002d0120546865206f6e6c792077617920666f72206120636f6e747261637420746f2062652072656d6f76656420776974686f7574206120746f6d6273746f6e6520616e6420656d697474696e67ac2074686973206576656e742069732062792063616c6c696e6720607365616c5f7465726d696e617465602e20526573746f72656410244163636f756e744964244163636f756e74496410486173681c42616c616e636524bc20526573746f726174696f6e206f66206120636f6e747261637420686173206265656e207375636365737366756c2eb8205c5b726573746f7265722c20646573742c20636f64655f686173682c2072656e745f616c6c6f77616e63655c5d0024202320506172616d7300d0202d2060726573746f726572603a204163636f756e74204944206f662074686520726573746f72696e6720636f6e74726163742ebc202d206064657374603a204163636f756e74204944206f662074686520726573746f72656420636f6e74726163742ecc202d2060636f64655f68617368603a20436f64652068617368206f662074686520726573746f72656420636f6e74726163742ef4202d206072656e745f616c6c6f77616e6365603a2052656e7420616c6c6f77616e6365206f662074686520726573746f72656420636f6e74726163742e28436f646553746f72656404104861736804f020436f646520776974682074686520737065636966696564206861736820686173206265656e2073746f7265642e205c5b636f64655f686173685c5d3c5363686564756c6555706461746564040c75333218c020547269676765726564207768656e207468652063757272656e74207363686564756c6520697320757064617465642e30205c5b76657273696f6e5c5d0024202320506172616d7300d0202d206076657273696f6e603a205468652076657273696f6e206f6620746865206e65776c7920736574207363686564756c652e3c436f6e7472616374456d697474656408244163636f756e7449641c5665633c75383e20a0204120637573746f6d206576656e7420656d69747465642062792074686520636f6e74726163742e4c205c5b636f6e74726163742c20646174615c5d0024202320506172616d7300cc202d2060636f6e7472616374603a2054686520636f6e7472616374207468617420656d697474656420746865206576656e742e3101202d206064617461603a204461746120737570706c6965642062792074686520636f6e74726163742e204d657461646174612067656e65726174656420647572696e6720636f6e7472616374b82020202020202020202020636f6d70696c6174696f6e206973206e656564656420746f206465636f64652069742e2c436f646552656d6f76656404104861736810b0204120636f6465207769746820746865207370656369666965642068617368207761732072656d6f7665642e38205c5b636f64655f686173685c5d00550120546869732068617070656e73207768656e20746865206c61737420636f6e747261637420746861742075736573207468697320636f64652068617368207761732072656d6f766564206f7220657669637465642e304c5369676e6564436c61696d48616e646963617038543a3a426c6f636b4e756d626572100200000010e0204e756d626572206f6620626c6f636b2064656c617920616e2065787472696e73696320636c61696d20737572636861726765206861732e000d01205768656e20636c61696d207375726368617267652069732063616c6c656420627920616e2065787472696e736963207468652072656e7420697320636865636b65646820666f722063757272656e745f626c6f636b202d2064656c617940546f6d6273746f6e654465706f7369743042616c616e63654f663c543e4000f0e8857a9c0200000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f2067656e6572617465206120746f6d6273746f6e652e484465706f736974506572436f6e74726163743042616c616e63654f663c543e4000f0e8857a9c02000000000000000000202101205468652062616c616e636520657665727920636f6e7472616374206e6565647320746f206465706f73697420746f207374617920616c69766520696e646566696e6974656c792e005101205468697320697320646966666572656e742066726f6d20746865205b6053656c663a3a546f6d6273746f6e654465706f736974605d20626563617573652074686973206f6e6c79206e6565647320746f2062654501206465706f7369746564207768696c652074686520636f6e747261637420697320616c6976652e20436f73747320666f72206164646974696f6e616c2073746f726167652061726520616464656420746f402074686973206261736520636f73742e006d01205468697320697320612073696d706c652077617920746f20656e73757265207468617420636f6e747261637473207769746820656d7074792073746f72616765206576656e7475616c6c79206765742064656c657465642062797101206d616b696e67207468656d207061792072656e742e2054686973206372656174657320616e20696e63656e7469766520746f2072656d6f7665207468656d206561726c7920696e206f7264657220746f20736176652072656e742e544465706f73697450657253746f72616765427974653042616c616e63654f663c543e400060defb740500000000000000000000185501205468652062616c616e6365206120636f6e7472616374206e6565647320746f206465706f736974207065722073746f72616765206279746520746f207374617920616c69766520696e646566696e6974656c792e006901204c6574277320737570706f736520746865206465706f73697420697320312c303030204255202862616c616e636520756e697473292f6279746520616e64207468652072656e7420697320312042552f627974652f6461792c5901207468656e206120636f6e7472616374207769746820312c3030302c3030302042552074686174207573657320312c303030206279746573206f662073746f7261676520776f756c6420706179206e6f2072656e742e4d0120427574206966207468652062616c616e6365207265647563656420746f203530302c30303020425520616e64207468652073746f7261676520737461796564207468652073616d6520617420312c3030302c78207468656e20697420776f756c6420706179203530302042552f6461792e544465706f73697450657253746f726167654974656d3042616c616e63654f663c543e4000f0ab75a40d000000000000000000000c5501205468652062616c616e6365206120636f6e7472616374206e6565647320746f206465706f736974207065722073746f72616765206974656d20746f207374617920616c69766520696e646566696e6974656c792e00310120497420776f726b73207468652073616d65206173205b6053656c663a3a4465706f73697450657253746f7261676542797465605d2062757420666f722073746f72616765206974656d732e3052656e744672616374696f6e1c50657262696c6c1085040000140d0120546865206672616374696f6e206f6620746865206465706f73697420746861742073686f756c6420626520757365642061732072656e742070657220626c6f636b2e005101205768656e206120636f6e7472616374206861736e277420656e6f7567682062616c616e6365206465706f736974656420746f207374617920616c69766520696e646566696e6974656c79206974206e65656473450120746f207061792070657220626c6f636b20666f72207468652073746f7261676520697420636f6e73756d65732074686174206973206e6f7420636f766572656420627920746865206465706f7369742e590120546869732064657465726d696e657320686f77206869676820746869732072656e74207061796d656e742069732070657220626c6f636b2061732061206672616374696f6e206f6620746865206465706f7369742e3c5375726368617267655265776172643042616c616e63654f663c543e40005cb2ec22000000000000000000000008e4205265776172642074686174206973207265636569766564206279207468652070617274792077686f736520746f75636820686173206c65646820746f2072656d6f76616c206f66206120636f6e74726163742e204d617844657074680c753332102000000004dc20546865206d6178696d756d206e657374696e67206c6576656c206f6620612063616c6c2f696e7374616e746961746520737461636b2e304d617856616c756553697a650c753332100040000004010120546865206d6178696d756d2073697a65206f6620612073746f726167652076616c756520616e64206576656e74207061796c6f616420696e2062797465732e4844656c6574696f6e517565756544657074680c75333210f000000004f420546865206d6178696d756d206e756d626572206f6620747269657320746861742063616e2062652071756575656420666f722064656c6574696f6e2e4c44656c6574696f6e5765696768744c696d6974185765696768742000d0ed902e000000044d0120546865206d6178696d756d20616d6f756e74206f662077656967687420746861742063616e20626520636f6e73756d65642070657220626c6f636b20666f72206c617a7920747269652072656d6f76616c2e2c4d6178436f646553697a650c75333210000002000c5d0120546865206d6178696d756d206c656e677468206f66206120636f6e747261637420636f646520696e2062797465732e2054686973206c696d6974206170706c69657320746f2074686520696e737472756d656e74656451012076657273696f6e206f662074686520636f64652e205468657265666f72652060696e7374616e74696174655f776974685f636f6465602063616e206661696c206576656e207768656e20737570706c79696e679c2061207761736d2062696e6172792062656c6f772074686973206d6178696d756d2073697a652e7458496e76616c69645363686564756c6556657273696f6e0405012041206e6577207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652063757272656e74206f6e652e54496e76616c6964537572636861726765436c61696d04550120416e206f726967696e206d757374206265207369676e6564206f7220696e686572656e7420616e6420617578696c696172792073656e646572206f6e6c792070726f7669646564206f6e20696e686572656e742e54496e76616c6964536f75726365436f6e747261637404dc2043616e6e6f7420726573746f72652066726f6d206e6f6e6578697374696e67206f7220746f6d6273746f6e6520636f6e74726163742e68496e76616c696444657374696e6174696f6e436f6e747261637404c42043616e6e6f7420726573746f726520746f206e6f6e6578697374696e67206f7220616c69766520636f6e74726163742e40496e76616c6964546f6d6273746f6e65046020546f6d6273746f6e657320646f6e2774206d617463682e54496e76616c6964436f6e74726163744f726967696e04bc20416e206f726967696e20547269654964207772697474656e20696e207468652063757272656e7420626c6f636b2e204f75744f6647617304bc2054686520657865637574656420636f6e7472616374206578686175737465642069747320676173206c696d69742e504f7574707574427566666572546f6f536d616c6c04050120546865206f75747075742062756666657220737570706c69656420746f206120636f6e7472616374204150492063616c6c2077617320746f6f20736d616c6c2e6442656c6f7753756273697374656e63655468726573686f6c6410210120506572666f726d696e672074686520726571756573746564207472616e7366657220776f756c6420686176652062726f756768742074686520636f6e74726163742062656c6f773d01207468652073756273697374656e6365207468726573686f6c642e204e6f207472616e7366657220697320616c6c6f77656420746f20646f207468697320696e206f7264657220746f20616c6c6f77450120666f72206120746f6d6273746f6e6520746f20626520637265617465642e2055736520607365616c5f7465726d696e6174656020746f2072656d6f7665206120636f6e747261637420776974686f757470206c656176696e67206120746f6d6273746f6e6520626568696e642e504e6577436f6e74726163744e6f7446756e64656408390120546865206e65776c79206372656174656420636f6e74726163742069732062656c6f77207468652073756273697374656e6365207468726573686f6c6420616674657220657865637574696e6721012069747320636f6e74727563746f722e204e6f20636f6e7472616374732061726520616c6c6f77656420746f2065786973742062656c6f772074686174207468726573686f6c642e385472616e736665724661696c65640c250120506572666f726d696e672074686520726571756573746564207472616e73666572206661696c656420666f72206120726561736f6e206f726967696e6174696e6720696e2074686531012063686f73656e2063757272656e637920696d706c656d656e746174696f6e206f66207468652072756e74696d652e204d6f73742070726f6261626c79207468652062616c616e63652069738c20746f6f206c6f77206f72206c6f636b732061726520706c61636564206f6e2069742e4c4d617843616c6c44657074685265616368656408250120506572666f726d696e6720612063616c6c207761732064656e6965642062656361757365207468652063616c6c696e67206465707468207265616368656420746865206c696d697498206f6620776861742069732073706563696669656420696e20746865207363686564756c652e2c4e6f7443616c6c61626c650831012054686520636f6e74726163742074686174207761732063616c6c656420697320656974686572206e6f20636f6e747261637420617420616c6c20286120706c61696e206163636f756e74294c206f72206973206120746f6d6273746f6e652e30436f6465546f6f4c617267650841012054686520636f646520737570706c69656420746f2060696e7374616e74696174655f776974685f636f646560206578636565647320746865206c696d69742073706563696669656420696e20746865482063757272656e74207363686564756c652e30436f64654e6f74466f756e6404c8204e6f20636f646520636f756c6420626520666f756e642061742074686520737570706c69656420636f646520686173682e2c4f75744f66426f756e6473042901204120627566666572206f757473696465206f662073616e64626f78206d656d6f7279207761732070617373656420746f206120636f6e7472616374204150492066756e6374696f6e2e384465636f64696e674661696c6564042d0120496e7075742070617373656420746f206120636f6e7472616374204150492066756e6374696f6e206661696c656420746f206465636f646520617320657870656374656420747970652e3c436f6e747261637454726170706564048c20436f6e7472616374207472617070656420647572696e6720657865637574696f6e2e3456616c7565546f6f4c6172676504d0205468652073697a6520646566696e656420696e2060543a3a4d617856616c756553697a6560207761732065786365656465642e405265656e7472616e636544656e6965640c41012054686520616374696f6e20706572666f726d6564206973206e6f7420616c6c6f776564207768696c652074686520636f6e747261637420706572666f726d696e6720697420697320616c72656164793d01206f6e207468652063616c6c20737461636b2e2054686f736520616374696f6e732061726520636f6e74726163742073656c66206465737472756374696f6e20616e6420726573746f726174696f6e40206f66206120746f6d6273746f6e652e40496e707574416c72656164795265616404210120607365616c5f696e70757460207761732063616c6c65642074776963652066726f6d207468652073616d6520636f6e747261637420657865637574696f6e20636f6e746578742e5052616e646f6d5375626a656374546f6f4c6f6e6704dc20546865207375626a6563742070617373656420746f20607365616c5f72616e646f6d60206578636565647320746865206c696d69742e34546f6f4d616e79546f706963730421012054686520616d6f756e74206f6620746f706963732070617373656420746f20607365616c5f6465706f7369745f6576656e747360206578636565647320746865206c696d69742e3c4475706c6963617465546f706963730431012054686520746f706963732070617373656420746f20607365616c5f6465706f7369745f6576656e74736020636f6e7461696e73206174206c65617374206f6e65206475706c69636174652e404e6f436861696e457874656e73696f6e0c49012054686520636861696e20646f6573206e6f742070726f76696465206120636861696e20657874656e73696f6e2e2043616c6c696e672074686520636861696e20657874656e73696f6e20726573756c7473510120696e2074686973206572726f722e204e6f74652074686174207468697320757375616c6c79202073686f756c646e27742068617070656e206173206465706c6f79696e67207375636820636f6e747261637473342069732072656a65637465642e4444656c6574696f6e517565756546756c6c1405012052656d6f76616c206f66206120636f6e7472616374206661696c65642062656361757365207468652064656c6574696f6e2071756575652069732066756c6c2e00550120546869732063616e2068617070656e207768656e206569746865722063616c6c696e67205b6050616c6c65743a3a636c61696d5f737572636861726765605d206f7220607365616c5f7465726d696e617465602e5101205468652071756575652069732066696c6c65642062792064656c6574696e6720636f6e74726163747320616e6420656d7074696564206279206120666978656420616d6f756e74206561636820626c6f636b2e250120547279696e6720616761696e20647572696e6720616e6f7468657220626c6f636b20697320746865206f6e6c792077617920746f207265736f6c766520746869732069737375652e50436f6e74726163744e6f74457669637461626c65102d01204120636f6e747261637420636f756c64206e6f74206265206576696374656420626563617573652069742068617320656e6f7567682062616c616e636520746f207061792072656e742e00250120546869732063616e2062652072657475726e65642066726f6d205b6050616c6c65743a3a636c61696d5f737572636861726765605d20626563617573652074686520746172676574c420636f6e74726163742068617320656e6f7567682062616c616e636520746f2070617920666f72206974732072656e742e4053746f7261676545786861757374656410350120412073746f72616765206d6f64696669636174696f6e20657868617573746564207468652033326269742074797065207468617420686f6c6473207468652073746f726167652073697a652e00350120546869732063616e206569746865722068617070656e207768656e2074686520616363756d756c617465642073746f7261676520696e20627974657320697320746f6f206c61726765206f72ac207768656e206e756d626572206f662073746f72616765206974656d7320697320746f6f206c617267652e444475706c6963617465436f6e747261637404cc204120636f6e74726163742077697468207468652073616d65204163636f756e74496420616c7265616479206578697374732e12105375646f01105375646f040c4b6579010030543a3a4163636f756e74496480000000000000000000000000000000000000000000000000000000000000000004842054686520604163636f756e74496460206f6620746865207375646f206b65792e0110107375646f041063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e547375646f5f756e636865636b65645f776569676874081063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e1c5f776569676874185765696768742839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e310120546869732066756e6374696f6e20646f6573206e6f7420636865636b2074686520776569676874206f66207468652063616c6c2c20616e6420696e737465616420616c6c6f777320746865b4205375646f207573657220746f20737065636966792074686520776569676874206f66207468652063616c6c2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292ed0202d2054686520776569676874206f6620746869732063616c6c20697320646566696e6564206279207468652063616c6c65722e302023203c2f7765696768743e1c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652475012041757468656e74696361746573207468652063757272656e74207375646f206b657920616e6420736574732074686520676976656e204163636f756e7449642028606e6577602920617320746865206e6577207375646f206b65792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e1c7375646f5f6173080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2c51012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c207769746820605369676e656460206f726967696e2066726f6d44206120676976656e206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ec8202d20576569676874206f662064657269766174697665206063616c6c6020657865637574696f6e202b2031302c3030302e302023203c2f7765696768743e010c14537564696404384469737061746368526573756c74048c2041207375646f206a75737420746f6f6b20706c6163652e205c5b726573756c745c5d284b65794368616e67656404244163636f756e74496404010120546865205c5b7375646f65725c5d206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e285375646f4173446f6e6504384469737061746368526573756c74048c2041207375646f206a75737420746f6f6b20706c6163652e205c5b726573756c745c5d00042c526571756972655375646f04802053656e646572206d75737420626520746865205375646f206163636f756e741320496d4f6e6c696e650120496d4f6e6c696e6510384865617274626561744166746572010038543a3a426c6f636b4e756d62657210000000002c1d012054686520626c6f636b206e756d6265722061667465722077686963682069742773206f6b20746f2073656e64206865617274626561747320696e207468652063757272656e74242073657373696f6e2e0025012041742074686520626567696e6e696e67206f6620656163682073657373696f6e20776520736574207468697320746f20612076616c756520746861742073686f756c642066616c6c350120726f7567686c7920696e20746865206d6964646c65206f66207468652073657373696f6e206475726174696f6e2e20546865206964656120697320746f206669727374207761697420666f721901207468652076616c696461746f727320746f2070726f64756365206120626c6f636b20696e207468652063757272656e742073657373696f6e2c20736f207468617420746865a820686561727462656174206c61746572206f6e2077696c6c206e6f74206265206e65636573736172792e00390120546869732076616c75652077696c6c206f6e6c79206265207573656420617320612066616c6c6261636b206966207765206661696c20746f2067657420612070726f7065722073657373696f6e2d012070726f677265737320657374696d6174652066726f6d20604e65787453657373696f6e526f746174696f6e602c2061732074686f736520657374696d617465732073686f756c642062650101206d6f7265206163637572617465207468656e207468652076616c75652077652063616c63756c61746520666f7220604865617274626561744166746572602e104b65797301004c5665633c543a3a417574686f7269747949643e040004d0205468652063757272656e7420736574206f66206b6579732074686174206d61792069737375652061206865617274626561742e485265636569766564486561727462656174730002053053657373696f6e496e6465782441757468496e6465781c5665633c75383e05040008f020466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206041757468496e6465786020746f8020606f6666636861696e3a3a4f70617175654e6574776f726b5374617465602e38417574686f726564426c6f636b730102053053657373696f6e496e6465783856616c696461746f7249643c543e0c75333205100000000008150120466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206056616c696461746f7249643c543e6020746f20746865c8206e756d626572206f6620626c6f636b7320617574686f7265642062792074686520676976656e20617574686f726974792e0104246865617274626561740824686561727462656174644865617274626561743c543a3a426c6f636b4e756d6265723e285f7369676e6174757265bc3c543a3a417574686f7269747949642061732052756e74696d654170705075626c69633e3a3a5369676e6174757265242c2023203c7765696768743e4101202d20436f6d706c65786974793a20604f284b202b20452960207768657265204b206973206c656e677468206f6620604b6579736020286865617274626561742e76616c696461746f72735f6c656e290101202020616e642045206973206c656e677468206f6620606865617274626561742e6e6574776f726b5f73746174652e65787465726e616c5f61646472657373608c2020202d20604f284b29603a206465636f64696e67206f66206c656e67746820604b60b02020202d20604f284529603a206465636f64696e672f656e636f64696e67206f66206c656e677468206045603d01202d20446252656164733a2070616c6c65745f73657373696f6e206056616c696461746f7273602c2070616c6c65745f73657373696f6e206043757272656e74496e646578602c20604b657973602c5c202020605265636569766564486561727462656174736084202d2044625772697465733a206052656365697665644865617274626561747360302023203c2f7765696768743e010c444865617274626561745265636569766564042c417574686f7269747949640405012041206e657720686561727462656174207761732072656365697665642066726f6d2060417574686f72697479496460205c5b617574686f726974795f69645c5d1c416c6c476f6f640004d42041742074686520656e64206f66207468652073657373696f6e2c206e6f206f6666656e63652077617320636f6d6d69747465642e2c536f6d654f66666c696e6504605665633c4964656e74696669636174696f6e5475706c653e043d012041742074686520656e64206f66207468652073657373696f6e2c206174206c65617374206f6e652076616c696461746f722077617320666f756e6420746f206265205c5b6f66666c696e655c5d2e000828496e76616c69644b65790464204e6f6e206578697374656e74207075626c6963206b65792e4c4475706c6963617465644865617274626561740458204475706c696361746564206865617274626561742e1448417574686f72697479446973636f7665727900010000000015204f6666656e63657301204f6666656e636573101c5265706f727473000105345265706f727449644f663c543ed04f6666656e636544657461696c733c543a3a4163636f756e7449642c20543a3a4964656e74696669636174696f6e5475706c653e00040004490120546865207072696d61727920737472756374757265207468617420686f6c647320616c6c206f6666656e6365207265636f726473206b65796564206279207265706f7274206964656e746966696572732e4044656665727265644f6666656e6365730100645665633c44656665727265644f6666656e63654f663c543e3e0400086501204465666572726564207265706f72747320746861742068617665206265656e2072656a656374656420627920746865206f6666656e63652068616e646c657220616e64206e65656420746f206265207375626d6974746564442061742061206c617465722074696d652e58436f6e63757272656e745265706f727473496e646578010205104b696e64384f706171756554696d65536c6f74485665633c5265706f727449644f663c543e3e050400042901204120766563746f72206f66207265706f727473206f66207468652073616d65206b696e6420746861742068617070656e6564206174207468652073616d652074696d6520736c6f742e485265706f72747342794b696e64496e646578010105104b696e641c5665633c75383e00040018110120456e756d65726174657320616c6c207265706f727473206f662061206b696e6420616c6f6e672077697468207468652074696d6520746865792068617070656e65642e00bc20416c6c207265706f7274732061726520736f72746564206279207468652074696d65206f66206f6666656e63652e004901204e6f74652074686174207468652061637475616c2074797065206f662074686973206d617070696e6720697320605665633c75383e602c207468697320697320626563617573652076616c756573206f66690120646966666572656e7420747970657320617265206e6f7420737570706f7274656420617420746865206d6f6d656e7420736f2077652061726520646f696e6720746865206d616e75616c2073657269616c697a6174696f6e2e010001041c4f6666656e63650c104b696e64384f706171756554696d65536c6f7410626f6f6c10550120546865726520697320616e206f6666656e6365207265706f72746564206f662074686520676976656e20606b696e64602068617070656e656420617420746865206073657373696f6e5f696e6465786020616e644d0120286b696e642d7370656369666963292074696d6520736c6f742e2054686973206576656e74206973206e6f74206465706f736974656420666f72206475706c696361746520736c61736865732e206c617374190120656c656d656e7420696e64696361746573206f6620746865206f6666656e636520776173206170706c69656420287472756529206f7220717565756564202866616c73652974205c5b6b696e642c2074696d65736c6f742c206170706c6965645c5d2e00001628486973746f726963616c0000000000176052616e646f6d6e657373436f6c6c656374697665466c6970016052616e646f6d6e657373436f6c6c656374697665466c6970043852616e646f6d4d6174657269616c0100305665633c543a3a486173683e04000c610120536572696573206f6620626c6f636b20686561646572732066726f6d20746865206c61737420383120626c6f636b73207468617420616374732061732072616e646f6d2073656564206d6174657269616c2e2054686973610120697320617272616e67656420617320612072696e672062756666657220776974682060626c6f636b5f6e756d626572202520383160206265696e672074686520696e64657820696e746f20746865206056656360206f664420746865206f6c6465737420686173682e010000000018204964656e7469747901204964656e7469747910284964656e746974794f6600010530543a3a4163636f756e74496468526567697374726174696f6e3c42616c616e63654f663c543e3e0004000c210120496e666f726d6174696f6e20746861742069732070657274696e656e7420746f206964656e746966792074686520656e7469747920626568696e6420616e206163636f756e742e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e1c53757065724f6600010230543a3a4163636f756e7449645028543a3a4163636f756e7449642c204461746129000400086101205468652073757065722d6964656e74697479206f6620616e20616c7465726e6174697665202273756222206964656e7469747920746f676574686572207769746820697473206e616d652c2077697468696e2074686174510120636f6e746578742e20496620746865206163636f756e74206973206e6f7420736f6d65206f74686572206163636f756e742773207375622d6964656e746974792c207468656e206a75737420604e6f6e65602e18537562734f6601010530543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e290044000000000000000000000000000000000014b820416c7465726e6174697665202273756222206964656e746974696573206f662074686973206163636f756e742e001d0120546865206669727374206974656d20697320746865206465706f7369742c20746865207365636f6e64206973206120766563746f72206f6620746865206163636f756e74732e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e28526567697374726172730100d85665633c4f7074696f6e3c526567697374726172496e666f3c42616c616e63654f663c543e2c20543a3a4163636f756e7449643e3e3e0400104d012054686520736574206f6620726567697374726172732e204e6f7420657870656374656420746f206765742076657279206269672061732063616e206f6e6c79206265206164646564207468726f7567682061a8207370656369616c206f726967696e20286c696b656c79206120636f756e63696c206d6f74696f6e292e0029012054686520696e64657820696e746f20746869732063616e206265206361737420746f2060526567697374726172496e6465786020746f2067657420612076616c69642076616c75652e013c346164645f726567697374726172041c6163636f756e7430543a3a4163636f756e744964347c2041646420612072656769737472617220746f207468652073797374656d2e00010120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060543a3a5265676973747261724f726967696e602e00ac202d20606163636f756e74603a20746865206163636f756e74206f6620746865207265676973747261722e009820456d6974732060526567697374726172416464656460206966207375636365737366756c2e002c2023203c7765696768743e2901202d20604f2852296020776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e64656420616e6420636f64652d626f756e646564292e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e307365745f6964656e746974790410696e666f304964656e74697479496e666f4c2d012053657420616e206163636f756e742773206964656e7469747920696e666f726d6174696f6e20616e6420726573657276652074686520617070726f707269617465206465706f7369742e00590120496620746865206163636f756e7420616c726561647920686173206964656e7469747920696e666f726d6174696f6e2c20746865206465706f7369742069732074616b656e2061732070617274207061796d656e745420666f7220746865206e6577206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0090202d2060696e666f603a20546865206964656e7469747920696e666f726d6174696f6e2e008c20456d69747320604964656e7469747953657460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2858202b205827202b2052296021012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e64656429e42020202d20776865726520605260206a756467656d656e74732d636f756e7420287265676973747261722d636f756e742d626f756e6465642984202d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e2501202d204f6e652073746f72616765206d75746174696f6e2028636f6465632d7265616420604f285827202b205229602c20636f6465632d777269746520604f2858202b20522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e207365745f73756273041073756273645665633c28543a3a4163636f756e7449642c2044617461293e54902053657420746865207375622d6163636f756e7473206f66207468652073656e6465722e005901205061796d656e743a20416e79206167677265676174652062616c616e63652072657365727665642062792070726576696f757320607365745f73756273602063616c6c732077696c6c2062652072657475726e6564310120616e6420616e20616d6f756e7420605375624163636f756e744465706f736974602077696c6c20626520726573657276656420666f722065616368206974656d20696e206073756273602e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e00b4202d206073756273603a20546865206964656e74697479277320286e657729207375622d6163636f756e74732e002c2023203c7765696768743e34202d20604f2850202b20532960e82020202d20776865726520605060206f6c642d737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e88202d204174206d6f7374206f6e652062616c616e6365206f7065726174696f6e732e18202d2044423ae02020202d206050202b2053602073746f72616765206d75746174696f6e732028636f64656320636f6d706c657869747920604f2831296029c02020202d204f6e652073746f7261676520726561642028636f64656320636f6d706c657869747920604f28502960292ec42020202d204f6e652073746f726167652077726974652028636f64656320636f6d706c657869747920604f28532960292ed42020202d204f6e652073746f726167652d6578697374732028604964656e746974794f663a3a636f6e7461696e735f6b657960292e302023203c2f7765696768743e38636c6561725f6964656e7469747900483d0120436c65617220616e206163636f756e742773206964656e7469747920696e666f20616e6420616c6c207375622d6163636f756e747320616e642072657475726e20616c6c206465706f736974732e00f0205061796d656e743a20416c6c2072657365727665642062616c616e636573206f6e20746865206163636f756e74206172652072657475726e65642e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e009c20456d69747320604964656e74697479436c656172656460206966207375636365737366756c2e002c2023203c7765696768743e44202d20604f2852202b2053202b20582960d02020202d20776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e646564292ed82020202d2077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e25012020202d20776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e646564292e8c202d204f6e652062616c616e63652d756e72657365727665206f7065726174696f6e2ecc202d206032602073746f7261676520726561647320616e64206053202b2032602073746f726167652064656c6574696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e44726571756573745f6a756467656d656e7408247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e1c6d61785f66656554436f6d706163743c42616c616e63654f663c543e3e5c9820526571756573742061206a756467656d656e742066726f6d2061207265676973747261722e005901205061796d656e743a204174206d6f737420606d61785f666565602077696c6c20626520726573657276656420666f72207061796d656e7420746f2074686520726567697374726172206966206a756467656d656e741c20676976656e2e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e002101202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973207265717565737465642e5901202d20606d61785f666565603a20546865206d6178696d756d206665652074686174206d617920626520706169642e20546869732073686f756c64206a757374206265206175746f2d706f70756c617465642061733a0034206060606e6f636f6d70696c65bc2053656c663a3a7265676973747261727328292e676574287265675f696e646578292e756e7772617028292e666565102060606000a820456d69747320604a756467656d656e7452657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2858202b205229602e34202d204f6e65206576656e742e302023203c2f7765696768743e3863616e63656c5f7265717565737404247265675f696e64657838526567697374726172496e646578446c2043616e63656c20612070726576696f757320726571756573742e00fc205061796d656e743a20412070726576696f75736c79207265736572766564206465706f7369742069732072657475726e6564206f6e20737563636573732e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e004901202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206e6f206c6f6e676572207265717565737465642e00b020456d69747320604a756467656d656e74556e72657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e8c202d204f6e652073746f72616765206d75746174696f6e20604f2852202b205829602e30202d204f6e65206576656e74302023203c2f7765696768743e1c7365745f6665650814696e6465785c436f6d706163743c526567697374726172496e6465783e0c66656554436f6d706163743c42616c616e63654f663c543e3e341d0120536574207468652066656520726571756972656420666f722061206a756467656d656e7420746f206265207265717565737465642066726f6d2061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e58202d2060666565603a20746865206e6577206665652e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e333135202b2052202a20302e33323920c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e387365745f6163636f756e745f69640814696e6465785c436f6d706163743c526567697374726172496e6465783e0c6e657730543a3a4163636f756e74496434c0204368616e676520746865206163636f756e74206173736f63696174656420776974682061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e74202d20606e6577603a20746865206e6577206163636f756e742049442e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee4202d2042656e63686d61726b3a20382e383233202b2052202a20302e333220c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e287365745f6669656c64730814696e6465785c436f6d706163743c526567697374726172496e6465783e186669656c6473384964656e746974794669656c647334ac2053657420746865206669656c6420696e666f726d6174696f6e20666f722061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e1101202d20606669656c6473603a20746865206669656c64732074686174207468652072656769737472617220636f6e6365726e73207468656d73656c76657320776974682e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602ee8202d2042656e63686d61726b3a20372e343634202b2052202a20302e33323520c2b57320286d696e207371756172657320616e616c7973697329302023203c2f7765696768743e4470726f766964655f6a756467656d656e740c247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365246a756467656d656e745c4a756467656d656e743c42616c616e63654f663c543e3e4cbc2050726f766964652061206a756467656d656e7420666f7220616e206163636f756e742773206964656e746974792e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74b4206f6620746865207265676973747261722077686f736520696e64657820697320607265675f696e646578602e002501202d20607265675f696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206265696e67206d6164652e5901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e4d01202d20606a756467656d656e74603a20746865206a756467656d656e74206f662074686520726567697374726172206f6620696e64657820607265675f696e646578602061626f75742060746172676574602e009820456d69747320604a756467656d656e74476976656e60206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e88202d204f6e652062616c616e63652d7472616e73666572206f7065726174696f6e2e98202d20557020746f206f6e65206163636f756e742d6c6f6f6b7570206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2852202b205829602e34202d204f6e65206576656e742e302023203c2f7765696768743e346b696c6c5f6964656e7469747904187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654c45012052656d6f766520616e206163636f756e742773206964656e7469747920616e64207375622d6163636f756e7420696e666f726d6174696f6e20616e6420736c61736820746865206465706f736974732e006501205061796d656e743a2052657365727665642062616c616e6365732066726f6d20607365745f737562736020616e6420607365745f6964656e74697479602061726520736c617368656420616e642068616e646c656420627949012060536c617368602e20566572696669636174696f6e2072657175657374206465706f7369747320617265206e6f742072657475726e65643b20746865792073686f756c642062652063616e63656c6c656484206d616e75616c6c79207573696e67206063616e63656c5f72657175657374602e00fc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206d617463682060543a3a466f7263654f726967696e602e005901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e009820456d69747320604964656e746974794b696c6c656460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2852202b2053202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e74202d206053202b2032602073746f72616765206d75746174696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e1c6164645f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365106461746110446174611cb0204164642074686520676976656e206163636f756e7420746f207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656e616d655f737562080c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651064617461104461746110d020416c74657220746865206173736f636961746564206e616d65206f662074686520676976656e207375622d6163636f756e742e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e2872656d6f76655f737562040c7375628c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651cc42052656d6f76652074686520676976656e206163636f756e742066726f6d207468652073656e646572277320737562732e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c2062652072657061747269617465643c20746f207468652073656e6465722e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d7573742068617665206120726567697374657265645c20737562206964656e74697479206f662060737562602e20717569745f7375620028902052656d6f7665207468652073656e6465722061732061207375622d6163636f756e742e006101205061796d656e743a2042616c616e636520726573657276656420627920612070726576696f757320607365745f73756273602063616c6c20666f72206f6e65207375622077696c6c206265207265706174726961746564b820746f207468652073656e64657220282a6e6f742a20746865206f726967696e616c206465706f7369746f72292e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d757374206861766520612072656769737465726564402073757065722d6964656e746974792e004901204e4f54453a20546869732073686f756c64206e6f74206e6f726d616c6c7920626520757365642c206275742069732070726f766964656420696e207468652063617365207468617420746865206e6f6e2d150120636f6e74726f6c6c6572206f6620616e206163636f756e74206973206d616c6963696f75736c7920726567697374657265642061732061207375622d6163636f756e742e01282c4964656e7469747953657404244163636f756e7449640411012041206e616d652077617320736574206f72207265736574202877686963682077696c6c2072656d6f766520616c6c206a756467656d656e7473292e205c5b77686f5c5d3c4964656e74697479436c656172656408244163636f756e7449641c42616c616e63650415012041206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e205c5b77686f2c206465706f7369745c5d384964656e746974794b696c6c656408244163636f756e7449641c42616c616e6365040d012041206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e205c5b77686f2c206465706f7369745c5d484a756467656d656e7452657175657374656408244163636f756e74496438526567697374726172496e6465780405012041206a756467656d656e74207761732061736b65642066726f6d2061207265676973747261722e205c5b77686f2c207265676973747261725f696e6465785c5d504a756467656d656e74556e72657175657374656408244163636f756e74496438526567697374726172496e64657804f02041206a756467656d656e74207265717565737420776173207265747261637465642e205c5b77686f2c207265676973747261725f696e6465785c5d384a756467656d656e74476976656e08244163636f756e74496438526567697374726172496e6465780409012041206a756467656d656e742077617320676976656e2062792061207265676973747261722e205c5b7461726765742c207265676973747261725f696e6465785c5d3852656769737472617241646465640438526567697374726172496e64657804ac204120726567697374726172207761732061646465642e205c5b7265676973747261725f696e6465785c5d405375624964656e7469747941646465640c244163636f756e744964244163636f756e7449641c42616c616e63650455012041207375622d6964656e746974792077617320616464656420746f20616e206964656e7469747920616e6420746865206465706f73697420706169642e205c5b7375622c206d61696e2c206465706f7369745c5d485375624964656e7469747952656d6f7665640c244163636f756e744964244163636f756e7449641c42616c616e6365080d012041207375622d6964656e74697479207761732072656d6f7665642066726f6d20616e206964656e7469747920616e6420746865206465706f7369742066726565642e5c205c5b7375622c206d61696e2c206465706f7369745c5d485375624964656e746974795265766f6b65640c244163636f756e744964244163636f756e7449641c42616c616e6365081d012041207375622d6964656e746974792077617320636c65617265642c20616e642074686520676976656e206465706f7369742072657061747269617465642066726f6d207468652901206d61696e206964656e74697479206163636f756e7420746f20746865207375622d6964656e74697479206163636f756e742e205c5b7375622c206d61696e2c206465706f7369745c5d183042617369634465706f7369743042616c616e63654f663c543e400080c6a47e8d0300000000000000000004d82054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564206964656e746974792e304669656c644465706f7369743042616c616e63654f663c543e4000a031a95fe300000000000000000000042d012054686520616d6f756e742068656c64206f6e206465706f73697420706572206164646974696f6e616c206669656c6420666f7220612072656769737465726564206964656e746974792e445375624163636f756e744465706f7369743042616c616e63654f663c543e400080f420e6b5000000000000000000000c65012054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564207375626163636f756e742e20546869732073686f756c64206163636f756e7420666f7220746865206661637471012074686174206f6e652073746f72616765206974656d27732076616c75652077696c6c20696e637265617365206279207468652073697a65206f6620616e206163636f756e742049442c20616e642074686572652077696c6c206265290120616e6f746865722074726965206974656d2077686f73652076616c7565206973207468652073697a65206f6620616e206163636f756e7420494420706c75732033322062797465732e384d61785375624163636f756e74730c7533321064000000040d0120546865206d6178696d756d206e756d626572206f66207375622d6163636f756e747320616c6c6f77656420706572206964656e746966696564206163636f756e742e4c4d61784164646974696f6e616c4669656c64730c7533321064000000086501204d6178696d756d206e756d626572206f66206164646974696f6e616c206669656c64732074686174206d61792062652073746f72656420696e20616e2049442e204e656564656420746f20626f756e642074686520492f4fe020726571756972656420746f2061636365737320616e206964656e746974792c206275742063616e2062652070726574747920686967682e344d6178526567697374726172730c7533321014000000085101204d61786d696d756d206e756d626572206f66207265676973747261727320616c6c6f77656420696e207468652073797374656d2e204e656564656420746f20626f756e642074686520636f6d706c65786974797c206f662c20652e672e2c207570646174696e67206a756467656d656e74732e4048546f6f4d616e795375624163636f756e7473046020546f6f206d616e7920737562732d6163636f756e74732e204e6f74466f756e640454204163636f756e742069736e277420666f756e642e204e6f744e616d65640454204163636f756e742069736e2774206e616d65642e28456d707479496e646578043420456d70747920696e6465782e284665654368616e676564044020466565206973206368616e6765642e284e6f4964656e74697479044c204e6f206964656e7469747920666f756e642e3c537469636b794a756467656d656e74044820537469636b79206a756467656d656e742e384a756467656d656e74476976656e0444204a756467656d656e7420676976656e2e40496e76616c69644a756467656d656e74044c20496e76616c6964206a756467656d656e742e30496e76616c6964496e64657804582054686520696e64657820697320696e76616c69642e34496e76616c6964546172676574045c205468652074617267657420697320696e76616c69642e34546f6f4d616e794669656c6473047020546f6f206d616e79206164646974696f6e616c206669656c64732e44546f6f4d616e795265676973747261727304ec204d6178696d756d20616d6f756e74206f66207265676973747261727320726561636865642e2043616e6e6f742061646420616e79206d6f72652e38416c7265616479436c61696d65640474204163636f756e7420494420697320616c7265616479206e616d65642e184e6f7453756204742053656e646572206973206e6f742061207375622d6163636f756e742e204e6f744f776e6564048c205375622d6163636f756e742069736e2774206f776e65642062792073656e6465722e191c536f6369657479011c536f6369657479401c466f756e646572000030543a3a4163636f756e7449640400044820546865206669727374206d656d6265722e1452756c657300001c543a3a48617368040008510120412068617368206f66207468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e2043616e206f6e6c7920626520736574206f6e636520616e6454206f6e6c792062792074686520666f756e6465722e2843616e6469646174657301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e0400043901205468652063757272656e7420736574206f662063616e646964617465733b206269646465727320746861742061726520617474656d7074696e6720746f206265636f6d65206d656d626572732e4c53757370656e64656443616e6469646174657300010530543a3a4163636f756e744964e42842616c616e63654f663c542c20493e2c204269644b696e643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e2900040004842054686520736574206f662073757370656e6465642063616e646964617465732e0c506f7401003c42616c616e63654f663c542c20493e400000000000000000000000000000000004410120416d6f756e74206f66206f7572206163636f756e742062616c616e63652074686174206973207370656369666963616c6c7920666f7220746865206e65787420726f756e642773206269642873292e1048656164000030543a3a4163636f756e744964040004e820546865206d6f7374207072696d6172792066726f6d20746865206d6f737420726563656e746c7920617070726f766564206d656d626572732e1c4d656d626572730100445665633c543a3a4163636f756e7449643e04000494205468652063757272656e7420736574206f66206d656d626572732c206f7264657265642e4053757370656e6465644d656d6265727301010530543a3a4163636f756e74496410626f6f6c00040004782054686520736574206f662073757370656e646564206d656d626572732e104269647301009c5665633c4269643c543a3a4163636f756e7449642c2042616c616e63654f663c542c20493e3e3e040004e8205468652063757272656e7420626964732c2073746f726564206f726465726564206279207468652076616c7565206f6620746865206269642e20566f756368696e6700010530543a3a4163636f756e74496438566f756368696e6753746174757300040004e4204d656d626572732063757272656e746c7920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e1c5061796f75747301010530543a3a4163636f756e744964985665633c28543a3a426c6f636b4e756d6265722c2042616c616e63654f663c542c20493e293e000400044d012050656e64696e67207061796f7574733b206f72646572656420627920626c6f636b206e756d6265722c20776974682074686520616d6f756e7420746861742073686f756c642062652070616964206f75742e1c537472696b657301010530543a3a4163636f756e7449642c537472696b65436f756e7400100000000004dc20546865206f6e676f696e67206e756d626572206f66206c6f73696e6720766f746573206361737420627920746865206d656d6265722e14566f74657300020530543a3a4163636f756e74496430543a3a4163636f756e74496410566f746505040004d020446f75626c65206d61702066726f6d2043616e646964617465202d3e20566f746572202d3e20284d617962652920566f74652e20446566656e646572000030543a3a4163636f756e744964040004c42054686520646566656e64696e67206d656d6265722063757272656e746c79206265696e67206368616c6c656e6765642e34446566656e646572566f74657300010530543a3a4163636f756e74496410566f7465000400046020566f74657320666f722074686520646566656e6465722e284d61784d656d6265727301000c753332100000000004dc20546865206d6178206e756d626572206f66206d656d6265727320666f722074686520736f6369657479206174206f6e652074696d652e01300c626964041476616c75653c42616c616e63654f663c542c20493e84e020412075736572206f757473696465206f662074686520736f63696574792063616e206d616b6520612062696420666f7220656e7472792e003901205061796d656e743a206043616e6469646174654465706f736974602077696c6c20626520726573657276656420666f72206d616b696e672061206269642e2049742069732072657475726e6564f0207768656e2074686520626964206265636f6d65732061206d656d6265722c206f7220696620746865206269642063616c6c732060756e626964602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a5901202d206076616c7565603a2041206f6e652074696d65207061796d656e74207468652062696420776f756c64206c696b6520746f2072656365697665207768656e206a6f696e696e672074686520736f63696574792e002c2023203c7765696768743e5501204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520726573657276652944202d2053746f726167652052656164733aec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f284329c820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d2948202d2053746f72616765205772697465733a810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3a2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6820092d204f6e65206576656e7420666f72206e6577206269642efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e14756e626964040c706f730c7533324cd82041206269646465722063616e2072656d6f76652074686569722062696420666f7220656e74727920696e746f20736f63696574792e010120427920646f696e6720736f2c20746865792077696c6c20686176652074686569722063616e646964617465206465706f7369742072657475726e6564206f728420746865792077696c6c20756e766f75636820746865697220766f75636865722e00fc205061796d656e743a2054686520626964206465706f73697420697320756e7265736572766564206966207468652075736572206d6164652061206269642e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206269646465722e003020506172616d65746572733a1901202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2077616e747320746f20756e6269642e002c2023203c7765696768743eb0204b65793a204220286c656e206f662062696473292c2058202862616c616e636520756e72657365727665290d01202d204f6e652073746f72616765207265616420616e6420777269746520746f20726574726965766520616e64207570646174652074686520626964732e204f2842294501202d20456974686572206f6e6520756e726573657276652062616c616e636520616374696f6e204f285829206f72206f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2842202b205829302023203c2f7765696768743e14766f7563680c0c77686f30543a3a4163636f756e7449641476616c75653c42616c616e63654f663c542c20493e0c7469703c42616c616e63654f663c542c20493eb045012041732061206d656d6265722c20766f75636820666f7220736f6d656f6e6520746f206a6f696e20736f636965747920627920706c6163696e67206120626964206f6e20746865697220626568616c662e005501205468657265206973206e6f206465706f73697420726571756972656420746f20766f75636820666f722061206e6577206269642c206275742061206d656d6265722063616e206f6e6c7920766f75636820666f725d01206f6e652062696420617420612074696d652e2049662074686520626964206265636f6d657320612073757370656e6465642063616e64696461746520616e6420756c74696d6174656c792072656a65637465642062794101207468652073757370656e73696f6e206a756467656d656e74206f726967696e2c20746865206d656d6265722077696c6c2062652062616e6e65642066726f6d20766f756368696e6720616761696e2e005901204173206120766f756368696e67206d656d6265722c20796f752063616e20636c61696d206120746970206966207468652063616e6469646174652069732061636365707465642e2054686973207469702077696c6c51012062652070616964206173206120706f7274696f6e206f66207468652072657761726420746865206d656d6265722077696c6c207265636569766520666f72206a6f696e696e672074686520736f63696574792e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733acc202d206077686f603a2054686520757365722077686f20796f7520776f756c64206c696b6520746f20766f75636820666f722e5101202d206076616c7565603a2054686520746f74616c2072657761726420746f2062652070616964206265747765656e20796f7520616e64207468652063616e6469646174652069662074686579206265636f6d65642061206d656d62657220696e2074686520736f63696574792e4901202d2060746970603a20596f757220637574206f662074686520746f74616c206076616c756560207061796f7574207768656e207468652063616e64696461746520697320696e64756374656420696e746f15012074686520736f63696574792e2054697073206c6172676572207468616e206076616c7565602077696c6c206265207361747572617465642075706f6e207061796f75742e002c2023203c7765696768743e0101204b65793a204220286c656e206f662062696473292c204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d626572732944202d2053746f726167652052656164733ac820092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c206d656d626572732e204f284d29090120092d204f6e652073746f72616765207265616420746f20636865636b206d656d626572206973206e6f7420616c726561647920766f756368696e672e204f283129ec20092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e6465642063616e6469646174652e204f283129e020092d204f6e652073746f72616765207265616420746f20636865636b20666f722073757370656e646564206d656d6265722e204f283129dc20092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e7420626964732e204f284229f420092d204f6e652073746f72616765207265616420746f20726574726965766520616c6c2063757272656e742063616e646964617465732e204f28432948202d2053746f72616765205772697465733a0d0120092d204f6e652073746f7261676520777269746520746f20696e7365727420766f756368696e672073746174757320746f20746865206d656d6265722e204f283129810120092d204f6e652073746f72616765206d757461746520746f206164642061206e65772062696420746f2074686520766563746f72204f2842292028544f444f3a20706f737369626c65206f7074696d697a6174696f6e20772f207265616429010120092d20557020746f206f6e652073746f726167652072656d6f76616c206966206269642e6c656e2829203e204d41585f4249445f434f554e542e204f2831295c202d204e6f7461626c6520436f6d7075746174696f6e3ac020092d204f286c6f67204d292073656172636820746f20636865636b2073656e6465722069732061206d656d6265722e2d0120092d204f2842202b2043202b206c6f67204d292073656172636820746f20636865636b2075736572206973206e6f7420616c726561647920612070617274206f6620736f63696574792ec420092d204f286c6f672042292073656172636820746f20696e7365727420746865206e65772062696420736f727465642e78202d2045787465726e616c204d6f64756c65204f7065726174696f6e733a9c20092d204f6e652062616c616e63652072657365727665206f7065726174696f6e2e204f285829210120092d20557020746f206f6e652062616c616e636520756e72657365727665206f7065726174696f6e20696620626964732e6c656e2829203e204d41585f4249445f434f554e542e28202d204576656e74733a6020092d204f6e65206576656e7420666f7220766f7563682efc20092d20557020746f206f6e65206576656e7420666f72204175746f556e626964206966206269642e6c656e2829203e204d41585f4249445f434f554e542e00c420546f74616c20436f6d706c65786974793a204f284d202b2042202b2043202b206c6f674d202b206c6f6742202b205829302023203c2f7765696768743e1c756e766f756368040c706f730c753332442d01204173206120766f756368696e67206d656d6265722c20756e766f7563682061206269642e2054686973206f6e6c7920776f726b73207768696c6520766f7563686564207573657220697394206f6e6c792061206269646465722028616e64206e6f7420612063616e646964617465292e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206120766f756368696e67206d656d6265722e003020506172616d65746572733a2d01202d2060706f73603a20506f736974696f6e20696e207468652060426964736020766563746f72206f6620746865206269642077686f2073686f756c6420626520756e766f75636865642e002c2023203c7765696768743e54204b65793a204220286c656e206f662062696473290901202d204f6e652073746f726167652072656164204f28312920746f20636865636b20746865207369676e6572206973206120766f756368696e67206d656d6265722eec202d204f6e652073746f72616765206d757461746520746f20726574726965766520616e64207570646174652074686520626964732e204f28422994202d204f6e6520766f756368696e672073746f726167652072656d6f76616c2e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f284229302023203c2f7765696768743e10766f7465082463616e6469646174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c617070726f766510626f6f6c4c882041732061206d656d6265722c20766f7465206f6e20612063616e6469646174652e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733a0d01202d206063616e646964617465603a205468652063616e646964617465207468617420746865206d656d62657220776f756c64206c696b6520746f20626964206f6e2ef4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265d82020202020202020202020202020617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743ebc204b65793a204320286c656e206f662063616e64696461746573292c204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722e58202d204f6e65206163636f756e74206c6f6f6b75702e2d01202d204f6e652073746f726167652072656164204f28432920616e64204f2843292073656172636820746f20636865636b2074686174207573657220697320612063616e6469646174652ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204329302023203c2f7765696768743e34646566656e6465725f766f7465041c617070726f766510626f6f6c408c2041732061206d656d6265722c20766f7465206f6e2074686520646566656e6465722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d6265722e003020506172616d65746572733af4202d2060617070726f7665603a204120626f6f6c65616e2077686963682073617973206966207468652063616e6469646174652073686f756c64206265a420617070726f766564202860747275656029206f722072656a656374656420286066616c736560292e002c2023203c7765696768743e68202d204b65793a204d20286c656e206f66206d656d62657273291d01202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b20757365722069732061206d656d6265722ebc202d204f6e652073746f7261676520777269746520746f2061646420766f746520746f20766f7465732e204f28312934202d204f6e65206576656e742e007820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d29302023203c2f7765696768743e187061796f757400504501205472616e7366657220746865206669727374206d617475726564207061796f757420666f72207468652073656e64657220616e642072656d6f76652069742066726f6d20746865207265636f7264732e006901204e4f54453a20546869732065787472696e736963206e6565647320746f2062652063616c6c6564206d756c7469706c652074696d657320746f20636c61696d206d756c7469706c65206d617475726564207061796f7574732e002101205061796d656e743a20546865206d656d6265722077696c6c20726563656976652061207061796d656e7420657175616c20746f207468656972206669727374206d61747572656478207061796f757420746f20746865697220667265652062616c616e63652e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642061206d656d62657220776974684c207061796f7574732072656d61696e696e672e002c2023203c7765696768743e1d01204b65793a204d20286c656e206f66206d656d62657273292c205020286e756d626572206f66207061796f75747320666f72206120706172746963756c6172206d656d626572292501202d204f6e652073746f726167652072656164204f284d2920616e64204f286c6f67204d292073656172636820746f20636865636b207369676e65722069732061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28502920746f2067657420616c6c207061796f75747320666f722061206d656d6265722ee4202d204f6e652073746f726167652072656164204f28312920746f20676574207468652063757272656e7420626c6f636b206e756d6265722e8c202d204f6e652063757272656e6379207472616e736665722063616c6c2e204f2858291101202d204f6e652073746f72616765207772697465206f722072656d6f76616c20746f2075706461746520746865206d656d6265722773207061796f7574732e204f285029009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2050202b205829302023203c2f7765696768743e14666f756e640c1c666f756e64657230543a3a4163636f756e7449642c6d61785f6d656d626572730c7533321472756c65731c5665633c75383e4c4c20466f756e642074686520736f63696574792e00f0205468697320697320646f6e65206173206120646973637265746520616374696f6e20696e206f7264657220746f20616c6c6f7720666f72207468651901206d6f64756c6520746f20626520696e636c7564656420696e746f20612072756e6e696e6720636861696e20616e642063616e206f6e6c7920626520646f6e65206f6e63652e001d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f466f756e6465725365744f726967696e5f2e003020506172616d65746572733a1901202d2060666f756e64657260202d20546865206669727374206d656d62657220616e642068656164206f6620746865206e65776c7920666f756e64656420736f63696574792e1501202d20606d61785f6d656d6265727360202d2054686520696e697469616c206d6178206e756d626572206f66206d656d6265727320666f722074686520736f63696574792ef4202d206072756c657360202d205468652072756c6573206f66207468697320736f636965747920636f6e6365726e696e67206d656d626572736869702e002c2023203c7765696768743ee0202d2054776f2073746f72616765206d75746174657320746f207365742060486561646020616e642060466f756e646572602e204f283129f4202d204f6e652073746f7261676520777269746520746f2061646420746865206669727374206d656d62657220746f20736f63696574792e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e1c756e666f756e6400348c20416e6e756c2074686520666f756e64696e67206f662074686520736f63696574792e005d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205369676e65642c20616e6420746865207369676e696e67206163636f756e74206d75737420626520626f74685901207468652060466f756e6465726020616e6420746865206048656164602e205468697320696d706c6965732074686174206974206d6179206f6e6c7920626520646f6e65207768656e207468657265206973206f6e6520206d656d6265722e002c2023203c7765696768743e68202d2054776f2073746f72616765207265616473204f2831292e78202d20466f75722073746f726167652072656d6f76616c73204f2831292e34202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e586a756467655f73757370656e6465645f6d656d626572080c77686f30543a3a4163636f756e7449641c666f726769766510626f6f6c6c2d0120416c6c6f772073757370656e73696f6e206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e646564206d656d6265722e00590120496620612073757370656e646564206d656d62657220697320666f72676976656e2c2077652073696d706c7920616464207468656d206261636b2061732061206d656d6265722c206e6f7420616666656374696e67cc20616e79206f6620746865206578697374696e672073746f72616765206974656d7320666f722074686174206d656d6265722e00490120496620612073757370656e646564206d656d6265722069732072656a65637465642c2072656d6f766520616c6c206173736f6369617465642073746f72616765206974656d732c20696e636c7564696e670101207468656972207061796f7574732c20616e642072656d6f766520616e7920766f7563686564206269647320746865792063757272656e746c7920686176652e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ab4202d206077686f60202d205468652073757370656e646564206d656d62657220746f206265206a75646765642e3501202d2060666f726769766560202d204120626f6f6c65616e20726570726573656e74696e672077686574686572207468652073757370656e73696f6e206a756467656d656e74206f726967696e2501202020202020202020202020202020666f726769766573202860747275656029206f722072656a6563747320286066616c7365602920612073757370656e646564206d656d6265722e002c2023203c7765696768743ea4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d6265727329f8202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e646564206d656d6265722e204f2831297101202d20557020746f206f6e652073746f72616765207772697465204f284d292077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d626572206261636b20746f20736f63696574792ef8202d20557020746f20332073746f726167652072656d6f76616c73204f28312920746f20636c65616e20757020612072656d6f766564206d656d6265722e4501202d20557020746f206f6e652073746f72616765207772697465204f2842292077697468204f2842292073656172636820746f2072656d6f766520766f7563686564206269642066726f6d20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e70202d204f6e652073746f726167652072656d6f76616c2e204f2831297c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e008820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b204229302023203c2f7765696768743e646a756467655f73757370656e6465645f63616e646964617465080c77686f30543a3a4163636f756e744964246a756467656d656e74244a756467656d656e74a0350120416c6c6f772073757370656e646564206a756467656d656e74206f726967696e20746f206d616b65206a756467656d656e74206f6e20612073757370656e6465642063616e6469646174652e005d0120496620746865206a756467656d656e742069732060417070726f7665602c20776520616464207468656d20746f20736f63696574792061732061206d656d62657220776974682074686520617070726f70726961746574207061796d656e7420666f72206a6f696e696e6720736f63696574792e00550120496620746865206a756467656d656e74206973206052656a656374602c2077652065697468657220736c61736820746865206465706f736974206f6620746865206269642c20676976696e67206974206261636b110120746f2074686520736f63696574792074726561737572792c206f722077652062616e2074686520766f75636865722066726f6d20766f756368696e6720616761696e2e005d0120496620746865206a756467656d656e7420697320605265626964602c20776520707574207468652063616e646964617465206261636b20696e207468652062696420706f6f6c20616e64206c6574207468656d20676f94207468726f7567682074686520696e64756374696f6e2070726f6365737320616761696e2e00410120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d20746865205f53757370656e73696f6e4a756467656d656e744f726967696e5f2e003020506172616d65746572733ac0202d206077686f60202d205468652073757370656e6465642063616e64696461746520746f206265206a75646765642ec4202d20606a756467656d656e7460202d2060417070726f7665602c206052656a656374602c206f7220605265626964602e002c2023203c7765696768743ef4204b65793a204220286c656e206f662062696473292c204d20286c656e206f66206d656d62657273292c2058202862616c616e636520616374696f6e29f0202d204f6e652073746f72616765207265616420746f20636865636b206077686f6020697320612073757370656e6465642063616e6469646174652ec8202d204f6e652073746f726167652072656d6f76616c206f66207468652073757370656e6465642063616e6469646174652e40202d20417070726f7665204c6f676963150120092d204f6e652073746f72616765207265616420746f206765742074686520617661696c61626c6520706f7420746f2070617920757365727320776974682e204f283129dc20092d204f6e652073746f7261676520777269746520746f207570646174652074686520617661696c61626c6520706f742e204f283129e820092d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f283129b420092d204f6e652073746f72616765207265616420746f2067657420616c6c206d656d626572732e204f284d29a020092d20557020746f206f6e6520756e726573657276652063757272656e637920616374696f6e2eb020092d20557020746f2074776f206e65772073746f726167652077726974657320746f207061796f7574732e4d0120092d20557020746f206f6e652073746f726167652077726974652077697468204f286c6f67204d292062696e6172792073656172636820746f206164642061206d656d62657220746f20736f63696574792e3c202d2052656a656374204c6f676963dc20092d20557020746f206f6e6520726570617472696174652072657365727665642063757272656e637920616374696f6e2e204f2858292d0120092d20557020746f206f6e652073746f7261676520777269746520746f2062616e2074686520766f756368696e67206d656d6265722066726f6d20766f756368696e6720616761696e2e38202d205265626964204c6f676963410120092d2053746f72616765206d75746174652077697468204f286c6f672042292062696e6172792073656172636820746f20706c616365207468652075736572206261636b20696e746f20626964732ed4202d20557020746f206f6e65206164646974696f6e616c206576656e7420696620756e766f7563682074616b657320706c6163652e5c202d204f6e652073746f726167652072656d6f76616c2e7c202d204f6e65206576656e7420666f7220746865206a756467656d656e742e009820546f74616c20436f6d706c65786974793a204f284d202b206c6f674d202b2042202b205829302023203c2f7765696768743e3c7365745f6d61785f6d656d62657273040c6d61780c753332381d0120416c6c6f777320726f6f74206f726967696e20746f206368616e676520746865206d6178696d756d206e756d626572206f66206d656d6265727320696e20736f63696574792eb4204d6178206d656d6265727368697020636f756e74206d7573742062652067726561746572207468616e20312e00dc20546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652066726f6d205f524f4f545f2e003020506172616d65746572733ae4202d20606d617860202d20546865206d6178696d756d206e756d626572206f66206d656d6265727320666f722074686520736f63696574792e002c2023203c7765696768743eb0202d204f6e652073746f7261676520777269746520746f2075706461746520746865206d61782e204f28312934202d204f6e65206576656e742e005c20546f74616c20436f6d706c65786974793a204f283129302023203c2f7765696768743e01401c466f756e64656404244163636f756e74496404e82054686520736f636965747920697320666f756e6465642062792074686520676976656e206964656e746974792e205c5b666f756e6465725c5d0c42696408244163636f756e7449641c42616c616e63650861012041206d656d6265727368697020626964206a7573742068617070656e65642e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e64207468656972206f666665729c20697320746865207365636f6e642e205c5b63616e6469646174655f69642c206f666665725c5d14566f7563680c244163636f756e7449641c42616c616e6365244163636f756e7449640861012041206d656d6265727368697020626964206a7573742068617070656e656420627920766f756368696e672e2054686520676976656e206163636f756e74206973207468652063616e646964617465277320494420616e647901207468656972206f6666657220697320746865207365636f6e642e2054686520766f756368696e67207061727479206973207468652074686972642e205c5b63616e6469646174655f69642c206f666665722c20766f756368696e675c5d244175746f556e62696404244163636f756e7449640419012041205c5b63616e6469646174655c5d207761732064726f70706564202864756520746f20616e20657863657373206f66206269647320696e207468652073797374656d292e14556e62696404244163636f756e74496404c02041205c5b63616e6469646174655c5d207761732064726f70706564202862792074686569722072657175657374292e1c556e766f75636804244163636f756e7449640409012041205c5b63616e6469646174655c5d207761732064726f70706564202862792072657175657374206f662077686f20766f756368656420666f72207468656d292e20496e64756374656408244163636f756e744964385665633c4163636f756e7449643e08590120412067726f7570206f662063616e646964617465732068617665206265656e20696e6475637465642e205468652062617463682773207072696d617279206973207468652066697273742076616c75652c20746865d420626174636820696e2066756c6c20697320746865207365636f6e642e205c5b7072696d6172792c2063616e646964617465735c5d6053757370656e6465644d656d6265724a756467656d656e7408244163636f756e74496410626f6f6c04d020412073757370656e646564206d656d62657220686173206265656e206a75646765642e205c5b77686f2c206a75646765645c5d4843616e64696461746553757370656e64656404244163636f756e744964048c2041205c5b63616e6469646174655c5d20686173206265656e2073757370656e6465643c4d656d62657253757370656e64656404244163636f756e74496404802041205c5b6d656d6265725c5d20686173206265656e2073757370656e646564284368616c6c656e67656404244163636f756e74496404842041205c5b6d656d6265725c5d20686173206265656e206368616c6c656e67656410566f74650c244163636f756e744964244163636f756e74496410626f6f6c04c8204120766f746520686173206265656e20706c61636564205c5b63616e6469646174652c20766f7465722c20766f74655c5d30446566656e646572566f746508244163636f756e74496410626f6f6c04f8204120766f746520686173206265656e20706c6163656420666f72206120646566656e64696e67206d656d626572205c5b766f7465722c20766f74655c5d344e65774d61784d656d62657273040c75333204a02041206e6577205c5b6d61785c5d206d656d62657220636f756e7420686173206265656e2073657424556e666f756e64656404244163636f756e744964048820536f636965747920697320756e666f756e6465642e205c5b666f756e6465725c5d1c4465706f736974041c42616c616e636504f820536f6d652066756e64732077657265206465706f736974656420696e746f2074686520736f6369657479206163636f756e742e205c5b76616c75655c5d204043616e6469646174654465706f7369743c42616c616e63654f663c542c20493e400080c6a47e8d0300000000000000000004fc20546865206d696e696d756d20616d6f756e74206f662061206465706f73697420726571756972656420666f7220612062696420746f206265206d6164652e4857726f6e6753696465446564756374696f6e3c42616c616e63654f663c542c20493e400080f420e6b5000000000000000000000855012054686520616d6f756e74206f662074686520756e70616964207265776172642074686174206765747320646564756374656420696e207468652063617365207468617420656974686572206120736b6570746963c020646f65736e277420766f7465206f7220736f6d656f6e6520766f74657320696e207468652077726f6e67207761792e284d6178537472696b65730c753332100a00000008750120546865206e756d626572206f662074696d65732061206d656d626572206d617920766f7465207468652077726f6e672077617920286f72206e6f7420617420616c6c2c207768656e207468657920617265206120736b65707469632978206265666f72652074686579206265636f6d652073757370656e6465642e2c506572696f645370656e643c42616c616e63654f663c542c20493e400000c52ebca2b1000000000000000000042d012054686520616d6f756e74206f6620696e63656e7469766520706169642077697468696e206561636820706572696f642e20446f65736e277420696e636c75646520566f7465725469702e38526f746174696f6e506572696f6438543a3a426c6f636b4e756d626572100077010004110120546865206e756d626572206f6620626c6f636b73206265747765656e2063616e6469646174652f6d656d6265727368697020726f746174696f6e20706572696f64732e3c4368616c6c656e6765506572696f6438543a3a426c6f636b4e756d626572108013030004d020546865206e756d626572206f6620626c6f636b73206265747765656e206d656d62657273686970206368616c6c656e6765732e2050616c6c657449642050616c6c657449642070792f736f63696504682054686520736f636965746965732773206d6f64756c65206964484d617843616e646964617465496e74616b650c753332100a0000000490204d6178696d756d2063616e64696461746520696e74616b652070657220726f756e642e482c426164506f736974696f6e049020416e20696e636f727265637420706f736974696f6e207761732070726f76696465642e244e6f744d656d62657204582055736572206973206e6f742061206d656d6265722e34416c72656164794d656d6265720468205573657220697320616c72656164792061206d656d6265722e2453757370656e646564044c20557365722069732073757370656e6465642e304e6f7453757370656e646564045c2055736572206973206e6f742073757370656e6465642e204e6f5061796f7574044c204e6f7468696e6720746f207061796f75742e38416c7265616479466f756e646564046420536f636965747920616c726561647920666f756e6465642e3c496e73756666696369656e74506f74049c204e6f7420656e6f75676820696e20706f7420746f206163636570742063616e6469646174652e3c416c7265616479566f756368696e6704e8204d656d62657220697320616c726561647920766f756368696e67206f722062616e6e65642066726f6d20766f756368696e6720616761696e2e2c4e6f74566f756368696e670460204d656d626572206973206e6f7420766f756368696e672e104865616404942043616e6e6f742072656d6f7665207468652068656164206f662074686520636861696e2e1c466f756e646572046c2043616e6e6f742072656d6f76652074686520666f756e6465722e28416c7265616479426964047420557365722068617320616c7265616479206d6164652061206269642e40416c726561647943616e6469646174650474205573657220697320616c726561647920612063616e6469646174652e304e6f7443616e64696461746504642055736572206973206e6f7420612063616e6469646174652e284d61784d656d62657273048420546f6f206d616e79206d656d6265727320696e2074686520736f63696574792e284e6f74466f756e646572047c205468652063616c6c6572206973206e6f742074686520666f756e6465722e1c4e6f74486561640470205468652063616c6c6572206973206e6f742074686520686561642e1a205265636f7665727901205265636f766572790c2c5265636f76657261626c6500010530543a3a4163636f756e744964e85265636f76657279436f6e6669673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e0004000409012054686520736574206f66207265636f76657261626c65206163636f756e747320616e64207468656972207265636f7665727920636f6e66696775726174696f6e2e404163746976655265636f76657269657300020530543a3a4163636f756e74496430543a3a4163636f756e744964e84163746976655265636f766572793c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e050400106820416374697665207265636f7665727920617474656d7074732e001501204669727374206163636f756e7420697320746865206163636f756e7420746f206265207265636f76657265642c20616e6420746865207365636f6e64206163636f756e74ac20697320746865207573657220747279696e6720746f207265636f76657220746865206163636f756e742e1450726f787900010230543a3a4163636f756e74496430543a3a4163636f756e7449640004000c9020546865206c697374206f6620616c6c6f7765642070726f7879206163636f756e74732e00f8204d61702066726f6d2074686520757365722077686f2063616e2061636365737320697420746f20746865207265636f7665726564206163636f756e742e01243061735f7265636f7665726564081c6163636f756e7430543a3a4163636f756e7449641063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e34a42053656e6420612063616c6c207468726f7567682061207265636f7665726564206163636f756e742e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a2501202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f752077616e7420746f206d616b6520612063616c6c206f6e2d626568616c662d6f662e0101202d206063616c6c603a205468652063616c6c20796f752077616e7420746f206d616b65207769746820746865207265636f7665726564206163636f756e742e002c2023203c7765696768743e94202d2054686520776569676874206f6620746865206063616c6c60202b2031302c3030302e0901202d204f6e652073746f72616765206c6f6f6b757020746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e347365745f7265636f766572656408106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e744964341d0120416c6c6f7720524f4f5420746f2062797061737320746865207265636f766572792070726f6365737320616e642073657420616e20612072657363756572206163636f756e747420666f722061206c6f7374206163636f756e74206469726563746c792e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f524f4f545f2e003020506172616d65746572733ab8202d20606c6f7374603a2054686520226c6f7374206163636f756e742220746f206265207265636f76657265642e1d01202d206072657363756572603a20546865202272657363756572206163636f756e74222077686963682063616e2063616c6c20617320746865206c6f7374206163636f756e742e002c2023203c7765696768743e64202d204f6e652073746f72616765207772697465204f28312930202d204f6e65206576656e74302023203c2f7765696768743e3c6372656174655f7265636f766572790c1c667269656e6473445665633c543a3a4163636f756e7449643e247468726573686f6c640c7531363064656c61795f706572696f6438543a3a426c6f636b4e756d6265726c5d01204372656174652061207265636f7665727920636f6e66696775726174696f6e20666f7220796f7572206163636f756e742e2054686973206d616b657320796f7572206163636f756e74207265636f76657261626c652e003101205061796d656e743a2060436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732062616c616e636549012077696c6c20626520726573657276656420666f722073746f72696e6720746865207265636f7665727920636f6e66696775726174696f6e2e2054686973206465706f7369742069732072657475726e6564bc20696e2066756c6c207768656e2074686520757365722063616c6c73206072656d6f76655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2501202d2060667269656e6473603a2041206c697374206f6620667269656e647320796f7520747275737420746f20766f75636820666f72207265636f7665727920617474656d7074732ed420202053686f756c64206265206f72646572656420616e6420636f6e7461696e206e6f206475706c69636174652076616c7565732e3101202d20607468726573686f6c64603a20546865206e756d626572206f6620667269656e64732074686174206d75737420766f75636820666f722061207265636f7665727920617474656d70741d012020206265666f726520746865206163636f756e742063616e206265207265636f76657265642e2053686f756c64206265206c657373207468616e206f7220657175616c20746f94202020746865206c656e677468206f6620746865206c697374206f6620667269656e64732e3d01202d206064656c61795f706572696f64603a20546865206e756d626572206f6620626c6f636b732061667465722061207265636f7665727920617474656d707420697320696e697469616c697a6564e820202074686174206e6565647320746f2070617373206265666f726520746865206163636f756e742063616e206265207265636f76657265642e002c2023203c7765696768743e68202d204b65793a204620286c656e206f6620667269656e6473292d01202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973206e6f7420616c7265616479207265636f76657261626c652e204f2831292eec202d204120636865636b20746861742074686520667269656e6473206c69737420697320736f7274656420616e6420756e697175652e204f2846299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f2858299c202d204f6e652073746f726167652077726974652e204f2831292e20436f646563204f2846292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e44696e6974696174655f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496458ec20496e697469617465207468652070726f6365737320666f72207265636f766572696e672061207265636f76657261626c65206163636f756e742e001d01205061796d656e743a20605265636f766572794465706f736974602062616c616e63652077696c6c20626520726573657276656420666f7220696e6974696174696e67207468652501207265636f766572792070726f636573732e2054686973206465706f7369742077696c6c20616c7761797320626520726570617472696174656420746f20746865206163636f756e74b820747279696e6720746f206265207265636f76657265642e205365652060636c6f73655f7265636f76657279602e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e2054686973206163636f756e7401012020206e6565647320746f206265207265636f76657261626c652028692e652e20686176652061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743ef8202d204f6e652073746f72616765207265616420746f20636865636b2074686174206163636f756e74206973207265636f76657261626c652e204f2846295101202d204f6e652073746f72616765207265616420746f20636865636b20746861742074686973207265636f766572792070726f63657373206861736e277420616c726561647920737461727465642e204f2831299c202d204f6e652063757272656e63792072657365727665206f7065726174696f6e2e204f285829e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831296c202d204f6e652073746f726167652077726974652e204f2831292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e38766f7563685f7265636f7665727908106c6f737430543a3a4163636f756e7449641c7265736375657230543a3a4163636f756e74496464290120416c6c6f7720612022667269656e6422206f662061207265636f76657261626c65206163636f756e7420746f20766f75636820666f7220616e20616374697665207265636f76657279682070726f6365737320666f722074686174206163636f756e742e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d75737420626520612022667269656e64227420666f7220746865207265636f76657261626c65206163636f756e742e003020506172616d65746572733ad4202d20606c6f7374603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f207265636f7665722e1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f2072657363756520746865206c6f7374206163636f756e74207468617420796f755420202077616e7420746f20766f75636820666f722e0025012054686520636f6d62696e6174696f6e206f662074686573652074776f20706172616d6574657273206d75737420706f696e7420746f20616e20616374697665207265636f76657279242070726f636573732e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629ec202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c6572206973206120667269656e642e204f286c6f6746291d01202d204f6e652062696e6172792073656172636820746f20636f6e6669726d2063616c6c657220686173206e6f7420616c726561647920766f75636865642e204f286c6f6756299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e00a420546f74616c20436f6d706c65786974793a204f2846202b206c6f6746202b2056202b206c6f675629302023203c2f7765696768743e38636c61696d5f7265636f76657279041c6163636f756e7430543a3a4163636f756e74496450f420416c6c6f772061207375636365737366756c207265736375657220746f20636c61696d207468656972207265636f7665726564206163636f756e742e002d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061202272657363756572221d012077686f20686173207375636365737366756c6c7920636f6d706c6574656420746865206163636f756e74207265636f766572792070726f636573733a20636f6c6c6563746564310120607468726573686f6c6460206f72206d6f726520766f75636865732c20776169746564206064656c61795f706572696f646020626c6f636b732073696e636520696e6974696174696f6e2e003020506172616d65746572733a2d01202d20606163636f756e74603a20546865206c6f7374206163636f756e74207468617420796f752077616e7420746f20636c61696d20686173206265656e207375636365737366756c6c79502020207265636f766572656420627920796f752e002c2023203c7765696768743efc204b65793a204620286c656e206f6620667269656e647320696e20636f6e666967292c205620286c656e206f6620766f756368696e6720667269656e6473291d01202d204f6e652073746f72616765207265616420746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846292101202d204f6e652073746f72616765207265616420746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629e4202d204f6e652073746f72616765207265616420746f20676574207468652063757272656e7420626c6f636b206e756d6265722e204f2831299c202d204f6e652073746f726167652077726974652e204f2831292c20436f646563204f2856292e34202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205629302023203c2f7765696768743e38636c6f73655f7265636f76657279041c7265736375657230543a3a4163636f756e7449645015012041732074686520636f6e74726f6c6c6572206f662061207265636f76657261626c65206163636f756e742c20636c6f736520616e20616374697665207265636f76657279682070726f6365737320666f7220796f7572206163636f756e742e002101205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e2c20746865207265636f76657261626c65206163636f756e742077696c6c2072656365697665f820746865207265636f76657279206465706f73697420605265636f766572794465706f7369746020706c616365642062792074686520726573637565722e00050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061f0207265636f76657261626c65206163636f756e74207769746820616e20616374697665207265636f766572792070726f6365737320666f722069742e003020506172616d65746572733a1101202d206072657363756572603a20546865206163636f756e7420747279696e6720746f207265736375652074686973207265636f76657261626c65206163636f756e742e002c2023203c7765696768743e84204b65793a205620286c656e206f6620766f756368696e6720667269656e6473293d01202d204f6e652073746f7261676520726561642f72656d6f766520746f206765742074686520616374697665207265636f766572792070726f636573732e204f2831292c20436f646563204f285629c0202d204f6e652062616c616e63652063616c6c20746f20726570617472696174652072657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2856202b205829302023203c2f7765696768743e3c72656d6f76655f7265636f7665727900545d012052656d6f766520746865207265636f766572792070726f6365737320666f7220796f7572206163636f756e742e205265636f7665726564206163636f756e747320617265207374696c6c2061636365737369626c652e001501204e4f54453a205468652075736572206d757374206d616b65207375726520746f2063616c6c2060636c6f73655f7265636f7665727960206f6e20616c6c206163746976650901207265636f7665727920617474656d707473206265666f72652063616c6c696e6720746869732066756e6374696f6e20656c73652069742077696c6c206661696c2e002501205061796d656e743a2042792063616c6c696e6720746869732066756e6374696f6e20746865207265636f76657261626c65206163636f756e742077696c6c20756e7265736572766598207468656972207265636f7665727920636f6e66696775726174696f6e206465706f7369742ef4202860436f6e6669674465706f7369744261736560202b2060467269656e644465706f736974466163746f7260202a20235f6f665f667269656e64732900050120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64206d7573742062652061e4207265636f76657261626c65206163636f756e742028692e652e206861732061207265636f7665727920636f6e66696775726174696f6e292e002c2023203c7765696768743e60204b65793a204620286c656e206f6620667269656e6473292901202d204f6e652073746f72616765207265616420746f206765742074686520707265666978206974657261746f7220666f7220616374697665207265636f7665726965732e204f2831293901202d204f6e652073746f7261676520726561642f72656d6f766520746f2067657420746865207265636f7665727920636f6e66696775726174696f6e2e204f2831292c20436f646563204f2846299c202d204f6e652062616c616e63652063616c6c20746f20756e72657365727665642e204f28582934202d204f6e65206576656e742e006c20546f74616c20436f6d706c65786974793a204f2846202b205829302023203c2f7765696768743e4063616e63656c5f7265636f7665726564041c6163636f756e7430543a3a4163636f756e7449642ce02043616e63656c20746865206162696c69747920746f20757365206061735f7265636f76657265646020666f7220606163636f756e74602e00150120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207265676973746572656420746fe82062652061626c6520746f206d616b652063616c6c73206f6e20626568616c66206f6620746865207265636f7665726564206163636f756e742e003020506172616d65746572733a1901202d20606163636f756e74603a20546865207265636f7665726564206163636f756e7420796f75206172652061626c6520746f2063616c6c206f6e2d626568616c662d6f662e002c2023203c7765696768743e1101202d204f6e652073746f72616765206d75746174696f6e20746f20636865636b206163636f756e74206973207265636f7665726564206279206077686f602e204f283129302023203c2f7765696768743e01183c5265636f766572794372656174656404244163636f756e74496404dc2041207265636f766572792070726f6365737320686173206265656e2073657420757020666f7220616e205c5b6163636f756e745c5d2e445265636f76657279496e6974696174656408244163636f756e744964244163636f756e744964082d012041207265636f766572792070726f6365737320686173206265656e20696e6974696174656420666f72206c6f7374206163636f756e742062792072657363756572206163636f756e742e48205c5b6c6f73742c20726573637565725c5d3c5265636f76657279566f75636865640c244163636f756e744964244163636f756e744964244163636f756e744964085d012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20766f756368656420666f722062792073656e6465722e68205c5b6c6f73742c20726573637565722c2073656e6465725c5d385265636f76657279436c6f73656408244163636f756e744964244163636f756e7449640821012041207265636f766572792070726f6365737320666f72206c6f7374206163636f756e742062792072657363756572206163636f756e7420686173206265656e20636c6f7365642e48205c5b6c6f73742c20726573637565725c5d404163636f756e745265636f766572656408244163636f756e744964244163636f756e744964080501204c6f7374206163636f756e7420686173206265656e207375636365737366756c6c79207265636f76657265642062792072657363756572206163636f756e742e48205c5b6c6f73742c20726573637565725c5d3c5265636f7665727952656d6f76656404244163636f756e74496404e02041207265636f766572792070726f6365737320686173206265656e2072656d6f76656420666f7220616e205c5b6163636f756e745c5d2e1044436f6e6669674465706f736974426173653042616c616e63654f663c543e4000406352bfc60100000000000000000004550120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e4c467269656e644465706f736974466163746f723042616c616e63654f663c543e4000203d88792d000000000000000000000469012054686520616d6f756e74206f662063757272656e6379206e656564656420706572206164646974696f6e616c2075736572207768656e206372656174696e672061207265636f7665727920636f6e66696775726174696f6e2e284d6178467269656e64730c753136080900040d0120546865206d6178696d756d20616d6f756e74206f6620667269656e647320616c6c6f77656420696e2061207265636f7665727920636f6e66696775726174696f6e2e3c5265636f766572794465706f7369743042616c616e63654f663c543e4000406352bfc601000000000000000000041d0120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72207374617274696e672061207265636f766572792e44284e6f74416c6c6f77656404f42055736572206973206e6f7420616c6c6f77656420746f206d616b6520612063616c6c206f6e20626568616c66206f662074686973206163636f756e74345a65726f5468726573686f6c640490205468726573686f6c64206d7573742062652067726561746572207468616e207a65726f404e6f74456e6f756768467269656e647304d420467269656e6473206c697374206d7573742062652067726561746572207468616e207a65726f20616e64207468726573686f6c64284d6178467269656e647304ac20467269656e6473206c697374206d757374206265206c657373207468616e206d617820667269656e6473244e6f74536f7274656404cc20467269656e6473206c697374206d75737420626520736f7274656420616e642066726565206f66206475706c696361746573384e6f745265636f76657261626c6504a02054686973206163636f756e74206973206e6f742073657420757020666f72207265636f7665727948416c72656164795265636f76657261626c6504b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f7665727938416c72656164795374617274656404e02041207265636f766572792070726f636573732068617320616c7265616479207374617274656420666f722074686973206163636f756e74284e6f745374617274656404d02041207265636f766572792070726f6365737320686173206e6f74207374617274656420666f7220746869732072657363756572244e6f74467269656e6404ac2054686973206163636f756e74206973206e6f74206120667269656e642077686f2063616e20766f7563682c44656c6179506572696f64041d012054686520667269656e64206d757374207761697420756e74696c207468652064656c617920706572696f6420746f20766f75636820666f722074686973207265636f7665727938416c7265616479566f756368656404c0205468697320757365722068617320616c726561647920766f756368656420666f722074686973207265636f76657279245468726573686f6c6404ec20546865207468726573686f6c6420666f72207265636f766572696e672074686973206163636f756e7420686173206e6f74206265656e206d65742c5374696c6c41637469766504010120546865726520617265207374696c6c20616374697665207265636f7665727920617474656d7074732074686174206e65656420746f20626520636c6f736564204f766572666c6f77049c2054686572652077617320616e206f766572666c6f7720696e20612063616c63756c6174696f6e30416c726561647950726f787904b02054686973206163636f756e7420697320616c72656164792073657420757020666f72207265636f76657279204261645374617465047c20536f6d6520696e7465726e616c2073746174652069732062726f6b656e2e1b1c56657374696e67011c56657374696e67041c56657374696e6700010230543a3a4163636f756e744964a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e00040004d820496e666f726d6174696f6e20726567617264696e67207468652076657374696e67206f66206120676976656e206163636f756e742e011010766573740034bc20556e6c6f636b20616e79207665737465642066756e6473206f66207468652073656e646572206163636f756e742e00610120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652066756e6473207374696c6c68206c6f636b656420756e64657220746869732070616c6c65742e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20322052656164732c203220577269746573fc20202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d010120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c205b53656e646572204163636f756e745d302023203c2f7765696768743e28766573745f6f7468657204187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653cbc20556e6c6f636b20616e79207665737465642066756e6473206f662061206074617267657460206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501202d2060746172676574603a20546865206163636f756e742077686f7365207665737465642066756e64732073686f756c6420626520756e6c6f636b65642e204d75737420686176652066756e6473207374696c6c68206c6f636b656420756e64657220746869732070616c6c65742e00d420456d69747320656974686572206056657374696e67436f6d706c6574656460206f72206056657374696e6755706461746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c203320577269746573f420202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e74f820202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e74302023203c2f7765696768743e3c7665737465645f7472616e7366657208187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e406820437265617465206120766573746564207472616e736665722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e001501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20332052656164732c2033205772697465733d0120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745d410120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c205b53656e646572204163636f756e745d302023203c2f7765696768743e54666f7263655f7665737465645f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365207363686564756c65a456657374696e67496e666f3c42616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e446420466f726365206120766573746564207472616e736665722e00c820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f2e00ec202d2060736f75726365603a20546865206163636f756e742077686f73652066756e64732073686f756c64206265207472616e736665727265642e1501202d2060746172676574603a20546865206163636f756e7420746861742073686f756c64206265207472616e7366657272656420746865207665737465642066756e64732e0101202d2060616d6f756e74603a2054686520616d6f756e74206f662066756e647320746f207472616e7366657220616e642077696c6c206265207665737465642ef4202d20607363686564756c65603a205468652076657374696e67207363686564756c6520617474616368656420746f20746865207472616e736665722e006020456d697473206056657374696e6743726561746564602e002c2023203c7765696768743e28202d20604f283129602e78202d2044625765696768743a20342052656164732c203420577269746573350120202020202d2052656164733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74390120202020202d205772697465733a2056657374696e672053746f726167652c2042616c616e636573204c6f636b732c20546172676574204163636f756e742c20536f75726365204163636f756e74302023203c2f7765696768743e01083856657374696e675570646174656408244163636f756e7449641c42616c616e63650c59012054686520616d6f756e742076657374656420686173206265656e20757064617465642e205468697320636f756c6420696e646963617465206d6f72652066756e64732061726520617661696c61626c652e2054686519012062616c616e636520676976656e2069732074686520616d6f756e74207768696368206973206c65667420756e7665737465642028616e642074687573206c6f636b6564292e58205c5b6163636f756e742c20756e7665737465645c5d4056657374696e67436f6d706c6574656404244163636f756e744964041d0120416e205c5b6163636f756e745c5d20686173206265636f6d652066756c6c79207665737465642e204e6f20667572746865722076657374696e672063616e2068617070656e2e04444d696e5665737465645472616e736665723042616c616e63654f663c543e400000c16ff2862300000000000000000004e820546865206d696e696d756d20616d6f756e74207472616e7366657272656420746f2063616c6c20607665737465645f7472616e73666572602e0c284e6f7456657374696e67048820546865206163636f756e7420676976656e206973206e6f742076657374696e672e5c4578697374696e6756657374696e675363686564756c65045d0120416e206578697374696e672076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e7420746861742063616e6e6f7420626520636c6f6262657265642e24416d6f756e744c6f7704090120416d6f756e74206265696e67207472616e7366657272656420697320746f6f206c6f7720746f2063726561746520612076657374696e67207363686564756c652e1c245363686564756c657201245363686564756c65720c184167656e646101010538543a3a426c6f636b4e756d62657271015665633c4f7074696f6e3c5363686564756c65643c3c5420617320436f6e6669673e3a3a43616c6c2c20543a3a426c6f636b4e756d6265722c20543a3a0a50616c6c6574734f726967696e2c20543a3a4163636f756e7449643e3e3e000400044d01204974656d7320746f2062652065786563757465642c20696e64657865642062792074686520626c6f636b206e756d626572207468617420746865792073686f756c64206265206578656375746564206f6e2e184c6f6f6b75700001051c5665633c75383e6c5461736b416464726573733c543a3a426c6f636b4e756d6265723e000400040101204c6f6f6b75702066726f6d206964656e7469747920746f2074686520626c6f636b206e756d62657220616e6420696e646578206f6620746865207461736b2e3853746f7261676556657273696f6e01002052656c656173657304000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e0098204e6577206e6574776f726b732073746172742077697468206c6173742076657273696f6e2e0118207363686564756c6510107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e287420416e6f6e796d6f75736c79207363686564756c652061207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7390202d2042617365205765696768743a2032322e3239202b202e313236202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64615020202020202d2057726974653a204167656e64613d01202d2057696c6c20757365206261736520776569676874206f662032352077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e1863616e63656c08107768656e38543a3a426c6f636b4e756d62657214696e6465780c75333228982043616e63656c20616e20616e6f6e796d6f75736c79207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032322e3135202b20322e383639202a205320c2b57334202d204442205765696768743a4c20202020202d20526561643a204167656e64617020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f6e616d6564140869641c5665633c75383e107768656e38543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e285c205363686564756c652061206e616d6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c738c202d2042617365205765696768743a2032392e36202b202e313539202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704d01202d2057696c6c20757365206261736520776569676874206f662033352077686963682073686f756c6420626520676f6f6420666f72206d6f7265207468616e203330207363686564756c65642063616c6c73302023203c2f7765696768743e3063616e63656c5f6e616d6564040869641c5665633c75383e287c2043616e63656c2061206e616d6564207363686564756c6564207461736b2e002c2023203c7765696768743ea0202d2053203d204e756d626572206f6620616c7265616479207363686564756c65642063616c6c7394202d2042617365205765696768743a2032342e3931202b20322e393037202a205320c2b57334202d204442205765696768743a6c20202020202d20526561643a204167656e64612c204c6f6f6b75707020202020202d2057726974653a204167656e64612c204c6f6f6b75704101202d2057696c6c20757365206261736520776569676874206f66203130302077686963682073686f756c6420626520676f6f6420666f7220757020746f203330207363686564756c65642063616c6c73302023203c2f7765696768743e387363686564756c655f61667465721014616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e14ac20416e6f6e796d6f75736c79207363686564756c652061207461736b20616674657220612064656c61792e002c2023203c7765696768743e582053616d65206173205b607363686564756c65605d2e302023203c2f7765696768743e507363686564756c655f6e616d65645f6166746572140869641c5665633c75383e14616674657238543a3a426c6f636b4e756d626572386d617962655f706572696f646963a04f7074696f6e3c7363686564756c653a3a506572696f643c543a3a426c6f636b4e756d6265723e3e207072696f72697479487363686564756c653a3a5072696f726974791063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e1494205363686564756c652061206e616d6564207461736b20616674657220612064656c61792e002c2023203c7765696768743e702053616d65206173205b607363686564756c655f6e616d6564605d2e302023203c2f7765696768743e010c245363686564756c6564082c426c6f636b4e756d6265720c7533320494205363686564756c656420736f6d65207461736b2e205c5b7768656e2c20696e6465785c5d2043616e63656c6564082c426c6f636b4e756d6265720c75333204902043616e63656c656420736f6d65207461736b2e205c5b7768656e2c20696e6465785c5d28446973706174636865640c605461736b416464726573733c426c6f636b4e756d6265723e3c4f7074696f6e3c5665633c75383e3e384469737061746368526573756c7404ac204469737061746368656420736f6d65207461736b2e205c5b7461736b2c2069642c20726573756c745c5d0010404661696c6564546f5363686564756c650468204661696c656420746f207363686564756c6520612063616c6c204e6f74466f756e6404802043616e6e6f742066696e6420746865207363686564756c65642063616c6c2e5c546172676574426c6f636b4e756d626572496e5061737404a820476976656e2074617267657420626c6f636b206e756d62657220697320696e2074686520706173742e4852657363686564756c654e6f4368616e676504f42052657363686564756c65206661696c6564206265636175736520697420646f6573206e6f74206368616e6765207363686564756c65642074696d652e1d1450726f7879011450726f7879081c50726f7869657301010530543a3a4163636f756e7449644501285665633c50726f7879446566696e6974696f6e3c543a3a4163636f756e7449642c20543a3a50726f7879547970652c20543a3a426c6f636b4e756d6265723e3e2c0a2042616c616e63654f663c543e29004400000000000000000000000000000000000845012054686520736574206f66206163636f756e742070726f786965732e204d61707320746865206163636f756e74207768696368206861732064656c65676174656420746f20746865206163636f756e7473210120776869636820617265206265696e672064656c65676174656420746f2c20746f67657468657220776974682074686520616d6f756e742068656c64206f6e206465706f7369742e34416e6e6f756e63656d656e747301010530543a3a4163636f756e7449643d01285665633c416e6e6f756e63656d656e743c543a3a4163636f756e7449642c2043616c6c486173684f663c543e2c20543a3a426c6f636b4e756d6265723e3e2c0a2042616c616e63654f663c543e290044000000000000000000000000000000000004ac2054686520616e6e6f756e63656d656e7473206d616465206279207468652070726f787920286b6579292e01281470726f78790c107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e3c51012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f726973656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e246164645f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d62657234490120526567697374657220612070726f7879206163636f756e7420666f72207468652073656e64657220746861742069732061626c6520746f206d616b652063616c6c73206f6e2069747320626568616c662e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1501202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f206d616b6520612070726f78792e0101202d206070726f78795f74797065603a20546865207065726d697373696f6e7320616c6c6f77656420666f7220746869732070726f7879206163636f756e742e5101202d206064656c6179603a2054686520616e6e6f756e63656d656e7420706572696f64207265717569726564206f662074686520696e697469616c2070726f78792e2057696c6c2067656e6572616c6c7920626518207a65726f2e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3072656d6f76655f70726f78790c2064656c656761746530543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d6265722cac20556e726567697374657220612070726f7879206163636f756e7420666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a2901202d206070726f7879603a20546865206163636f756e74207468617420746865206063616c6c65726020776f756c64206c696b6520746f2072656d6f766520617320612070726f78792e4501202d206070726f78795f74797065603a20546865207065726d697373696f6e732063757272656e746c7920656e61626c656420666f72207468652072656d6f7665642070726f7879206163636f756e742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e3872656d6f76655f70726f786965730028b820556e726567697374657220616c6c2070726f7879206163636f756e747320666f72207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901205741524e494e473a2054686973206d61792062652063616c6c6564206f6e206163636f756e747320637265617465642062792060616e6f6e796d6f7573602c20686f776576657220696620646f6e652c207468656e5d012074686520756e726573657276656420666565732077696c6c20626520696e61636365737369626c652e202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e24616e6f6e796d6f75730c2870726f78795f7479706530543a3a50726f7879547970651464656c617938543a3a426c6f636b4e756d62657214696e6465780c7531365c3d0120537061776e2061206672657368206e6577206163636f756e7420746861742069732067756172616e7465656420746f206265206f746865727769736520696e61636365737369626c652c20616e64010120696e697469616c697a65206974207769746820612070726f7879206f66206070726f78795f747970656020666f7220606f726967696e602073656e6465722e0070205265717569726573206120605369676e656460206f726967696e2e005501202d206070726f78795f74797065603a205468652074797065206f66207468652070726f78792074686174207468652073656e6465722077696c6c2062652072656769737465726564206173206f766572207468655101206e6577206163636f756e742e20546869732077696c6c20616c6d6f737420616c7761797320626520746865206d6f7374207065726d697373697665206050726f7879547970656020706f737369626c6520746f7c20616c6c6f7720666f72206d6178696d756d20666c65786962696c6974792e5501202d2060696e646578603a204120646973616d626967756174696f6e20696e6465782c20696e206361736520746869732069732063616c6c6564206d756c7469706c652074696d657320696e207468652073616d656101207472616e73616374696f6e2028652e672e207769746820607574696c6974793a3a626174636860292e20556e6c65737320796f75277265207573696e67206062617463686020796f752070726f6261626c79206a757374442077616e7420746f20757365206030602e5101202d206064656c6179603a2054686520616e6e6f756e63656d656e7420706572696f64207265717569726564206f662074686520696e697469616c2070726f78792e2057696c6c2067656e6572616c6c7920626518207a65726f2e005501204661696c73207769746820604475706c69636174656020696620746869732068617320616c7265616479206265656e2063616c6c656420696e2074686973207472616e73616374696f6e2c2066726f6d207468659c2073616d652073656e6465722c2077697468207468652073616d6520706172616d65746572732e00e8204661696c732069662074686572652061726520696e73756666696369656e742066756e647320746f2070617920666f72206465706f7369742e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e9020544f444f3a204d69676874206265206f76657220636f756e74696e6720312072656164386b696c6c5f616e6f6e796d6f7573141c737061776e657230543a3a4163636f756e7449642870726f78795f7479706530543a3a50726f78795479706514696e6465780c753136186865696768745c436f6d706163743c543a3a426c6f636b4e756d6265723e246578745f696e64657830436f6d706163743c7533323e50b82052656d6f76657320612070726576696f75736c7920737061776e656420616e6f6e796d6f75732070726f78792e004d01205741524e494e473a202a2a416c6c2061636365737320746f2074686973206163636f756e742077696c6c206265206c6f73742e2a2a20416e792066756e64732068656c6420696e2069742077696c6c2062653820696e61636365737369626c652e005d01205265717569726573206120605369676e656460206f726967696e2c20616e64207468652073656e646572206163636f756e74206d7573742068617665206265656e206372656174656420627920612063616c6c20746fac2060616e6f6e796d6f757360207769746820636f72726573706f6e64696e6720706172616d65746572732e005101202d2060737061776e6572603a20546865206163636f756e742074686174206f726967696e616c6c792063616c6c65642060616e6f6e796d6f75736020746f206372656174652074686973206163636f756e742e5101202d2060696e646578603a2054686520646973616d626967756174696f6e20696e646578206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e2050726f6261626c79206030602e0501202d206070726f78795f74797065603a205468652070726f78792074797065206f726967696e616c6c792070617373656420746f2060616e6f6e796d6f7573602e4101202d2060686569676874603a2054686520686569676874206f662074686520636861696e207768656e207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e4d01202d20606578745f696e646578603a205468652065787472696e73696320696e64657820696e207768696368207468652063616c6c20746f2060616e6f6e796d6f757360207761732070726f6365737365642e004d01204661696c73207769746820604e6f5065726d697373696f6e6020696e2063617365207468652063616c6c6572206973206e6f7420612070726576696f75736c79206372656174656420616e6f6e796d6f7573f4206163636f756e742077686f73652060616e6f6e796d6f7573602063616c6c2068617320636f72726573706f6e64696e6720706172616d65746572732e002c2023203c7765696768743e01012057656967687420697320612066756e6374696f6e206f6620746865206e756d626572206f662070726f7869657320746865207573657220686173202850292e302023203c2f7765696768743e20616e6e6f756e636508107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e540901205075626c697368207468652068617368206f6620612070726f78792d63616c6c20746861742077696c6c206265206d61646520696e20746865206675747572652e0061012054686973206d7573742062652063616c6c656420736f6d65206e756d626572206f6620626c6f636b73206265666f72652074686520636f72726573706f6e64696e67206070726f78796020697320617474656d707465642901206966207468652064656c6179206173736f6369617465642077697468207468652070726f78792072656c6174696f6e736869702069732067726561746572207468616e207a65726f2e001501204e6f206d6f7265207468616e20604d617850656e64696e676020616e6e6f756e63656d656e7473206d6179206265206d61646520617420616e79206f6e652074696d652e000d0120546869732077696c6c2074616b652061206465706f736974206f662060416e6e6f756e63656d656e744465706f736974466163746f72602061732077656c6c2061731d012060416e6e6f756e63656d656e744465706f736974426173656020696620746865726520617265206e6f206f746865722070656e64696e6720616e6e6f756e63656d656e74732e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420612070726f7879206f6620607265616c602e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656d6f76655f616e6e6f756e63656d656e7408107265616c30543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40742052656d6f7665206120676976656e20616e6e6f756e63656d656e742e005d01204d61792062652063616c6c656420627920612070726f7879206163636f756e7420746f2072656d6f766520612063616c6c20746865792070726576696f75736c7920616e6e6f756e63656420616e642072657475726e3420746865206465706f7369742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e1901202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e4c72656a6563745f616e6e6f756e63656d656e74082064656c656761746530543a3a4163636f756e7449642463616c6c5f686173683443616c6c486173684f663c543e40b42052656d6f76652074686520676976656e20616e6e6f756e63656d656e74206f6620612064656c65676174652e006501204d61792062652063616c6c6564206279206120746172676574202870726f7869656429206163636f756e7420746f2072656d6f766520612063616c6c2074686174206f6e65206f662074686569722064656c656761746573290120286064656c656761746560292068617320616e6e6f756e63656420746865792077616e7420746f20657865637574652e20546865206465706f7369742069732072657475726e65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733af8202d206064656c6567617465603a20546865206163636f756e7420746861742070726576696f75736c7920616e6e6f756e636564207468652063616c6c2ec0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f206265206d6164652e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e3c70726f78795f616e6e6f756e636564102064656c656761746530543a3a4163636f756e744964107265616c30543a3a4163636f756e74496440666f7263655f70726f78795f74797065504f7074696f6e3c543a3a50726f7879547970653e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e4451012044697370617463682074686520676976656e206063616c6c602066726f6d20616e206163636f756e742074686174207468652073656e64657220697320617574686f72697a656420666f72207468726f7567683420606164645f70726f7879602e00ac2052656d6f76657320616e7920636f72726573706f6e64696e6720616e6e6f756e63656d656e742873292e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e003020506172616d65746572733a1101202d20607265616c603a20546865206163636f756e742074686174207468652070726f78792077696c6c206d616b6520612063616c6c206f6e20626568616c66206f662e6501202d2060666f7263655f70726f78795f74797065603a2053706563696679207468652065786163742070726f7879207479706520746f206265207573656420616e6420636865636b656420666f7220746869732063616c6c2ed4202d206063616c6c603a205468652063616c6c20746f206265206d6164652062792074686520607265616c60206163636f756e742e002c2023203c7765696768743e642057656967687420697320612066756e6374696f6e206f663a9c202d20413a20746865206e756d626572206f6620616e6e6f756e63656d656e7473206d6164652ea4202d20503a20746865206e756d626572206f662070726f78696573207468652075736572206861732e302023203c2f7765696768743e010c3450726f7879457865637574656404384469737061746368526573756c7404ec20412070726f78792077617320657865637574656420636f72726563746c792c20776974682074686520676976656e205c5b726573756c745c5d2e40416e6f6e796d6f75734372656174656410244163636f756e744964244163636f756e7449642450726f7879547970650c75313608ec20416e6f6e796d6f7573206163636f756e7420686173206265656e2063726561746564206279206e65772070726f7879207769746820676976656e690120646973616d626967756174696f6e20696e64657820616e642070726f787920747970652e205c5b616e6f6e796d6f75732c2077686f2c2070726f78795f747970652c20646973616d626967756174696f6e5f696e6465785c5d24416e6e6f756e6365640c244163636f756e744964244163636f756e744964104861736804510120416e20616e6e6f756e63656d656e742077617320706c6163656420746f206d616b6520612063616c6c20696e20746865206675747572652e205c5b7265616c2c2070726f78792c2063616c6c5f686173685c5d184050726f78794465706f736974426173653042616c616e63654f663c543e4000f09e544c390000000000000000000010110120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e6720612070726f78792e00010120546869732069732068656c6420666f7220616e206164646974696f6e616c2073746f72616765206974656d2077686f73652076616c75652073697a652069732501206073697a656f662842616c616e6365296020627974657320616e642077686f7365206b65792073697a65206973206073697a656f66284163636f756e74496429602062797465732e4850726f78794465706f736974466163746f723042616c616e63654f663c543e400060aa7714b40000000000000000000014bc2054686520616d6f756e74206f662063757272656e6379206e6565646564207065722070726f78792061646465642e00690120546869732069732068656c6420666f7220616464696e6720333220627974657320706c757320616e20696e7374616e6365206f66206050726f78795479706560206d6f726520696e746f2061207072652d6578697374696e6761012073746f726167652076616c75652e20546875732c207768656e20636f6e6669677572696e67206050726f78794465706f736974466163746f7260206f6e652073686f756c642074616b6520696e746f206163636f756e74c020603332202b2070726f78795f747970652e656e636f646528292e6c656e282960206279746573206f6620646174612e284d617850726f786965730c75313608200004f020546865206d6178696d756d20616d6f756e74206f662070726f7869657320616c6c6f77656420666f7220612073696e676c65206163636f756e742e284d617850656e64696e670c753332102000000004450120546865206d6178696d756d20616d6f756e74206f662074696d652d64656c6179656420616e6e6f756e63656d656e747320746861742061726520616c6c6f77656420746f2062652070656e64696e672e5c416e6e6f756e63656d656e744465706f736974426173653042616c616e63654f663c543e4000f09e544c39000000000000000000000c310120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e6720616e20616e6e6f756e63656d656e742e00690120546869732069732068656c64207768656e2061206e65772073746f72616765206974656d20686f6c64696e672061206042616c616e636560206973206372656174656420287479706963616c6c79203136206279746573292e64416e6e6f756e63656d656e744465706f736974466163746f723042616c616e63654f663c543e4000c054ef28680100000000000000000010d42054686520616d6f756e74206f662063757272656e6379206e65656465642070657220616e6e6f756e63656d656e74206d6164652e00590120546869732069732068656c6420666f7220616464696e6720616e20604163636f756e744964602c2060486173686020616e642060426c6f636b4e756d6265726020287479706963616c6c79203638206279746573298c20696e746f2061207072652d6578697374696e672073746f726167652076616c75652e201c546f6f4d616e790425012054686572652061726520746f6f206d616e792070726f786965732072656769737465726564206f7220746f6f206d616e7920616e6e6f756e63656d656e74732070656e64696e672e204e6f74466f756e6404782050726f787920726567697374726174696f6e206e6f7420666f756e642e204e6f7450726f787904d02053656e646572206973206e6f7420612070726f7879206f6620746865206163636f756e7420746f2062652070726f786965642e2c556e70726f787961626c6504250120412063616c6c20776869636820697320696e636f6d70617469626c652077697468207468652070726f7879207479706527732066696c7465722077617320617474656d707465642e244475706c69636174650470204163636f756e7420697320616c726561647920612070726f78792e304e6f5065726d697373696f6e0419012043616c6c206d6179206e6f74206265206d6164652062792070726f78792062656361757365206974206d617920657363616c617465206974732070726976696c656765732e2c556e616e6e6f756e63656404d420416e6e6f756e63656d656e742c206966206d61646520617420616c6c2c20776173206d61646520746f6f20726563656e746c792e2c4e6f53656c6650726f787904682043616e6e6f74206164642073656c662061732070726f78792e1e204d756c746973696701204d756c746973696708244d756c74697369677300020530543a3a4163636f756e744964205b75383b2033325dd04d756c74697369673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e02040004942054686520736574206f66206f70656e206d756c7469736967206f7065726174696f6e732e1443616c6c73000106205b75383b2033325da0284f706171756543616c6c2c20543a3a4163636f756e7449642c2042616c616e63654f663c543e290004000001105061735f6d756c74695f7468726573686f6c645f3108446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e1063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e40550120496d6d6564696174656c792064697370617463682061206d756c74692d7369676e61747572652063616c6c207573696e6720612073696e676c6520617070726f76616c2066726f6d207468652063616c6c65722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e004101202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f206172652070617274206f66207468650501206d756c74692d7369676e61747572652c2062757420646f206e6f7420706172746963697061746520696e2074686520617070726f76616c2070726f636573732e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e00bc20526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c742e002c2023203c7765696768743e1d01204f285a202b204329207768657265205a20697320746865206c656e677468206f66207468652063616c6c20616e6420432069747320657865637574696f6e207765696768742e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d48202d204442205765696768743a204e6f6e654c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e2061735f6d756c746918247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e1063616c6c284f706171756543616c6c2873746f72655f63616c6c10626f6f6c286d61785f77656967687418576569676874b8590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e00b42049662074686572652061726520656e6f7567682c207468656e206469737061746368207468652063616c6c2e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e002101204e4f54453a20556e6c6573732074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2067656e6572616c6c792077616e7420746f207573651d012060617070726f76655f61735f6d756c74696020696e73746561642c2073696e6365206974206f6e6c7920726571756972657320612068617368206f66207468652063616c6c2e005d0120526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c7420696620607468726573686f6c64602069732065786163746c79206031602e204f74686572776973655901206f6e20737563636573732c20726573756c7420697320604f6b6020616e642074686520726573756c742066726f6d2074686520696e746572696f722063616c6c2c206966206974207761732065786563757465642ce0206d617920626520666f756e6420696e20746865206465706f736974656420604d756c7469736967457865637574656460206576656e742e002c2023203c7765696768743e54202d20604f2853202b205a202b2043616c6c29602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2e2501202d204f6e652063616c6c20656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285a296020776865726520605a602069732074782d6c656e2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e70202d2054686520776569676874206f6620746865206063616c6c602e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e80202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a250120202020202d2052656164733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c6029290120202020202d205772697465733a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c2043616c6c7320286966206073746f72655f63616c6c60294c202d20506c75732043616c6c20576569676874302023203c2f7765696768743e40617070726f76655f61735f6d756c746914247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e2463616c6c5f68617368205b75383b2033325d286d61785f7765696768741857656967687490590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e003101205061796d656e743a20604465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573410120607468726573686f6c64602074696d657320604465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e003901204e4f54453a2049662074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2077616e7420746f20757365206061735f6d756c74696020696e73746561642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66b4202020604465706f73697442617365202b207468726573686f6c64202a204465706f736974466163746f72602e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743abc20202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745dc020202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d302023203c2f7765696768743e3c63616e63656c5f61735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e2474696d65706f696e746454696d65706f696e743c543a3a426c6f636b4e756d6265723e2463616c6c5f68617368205b75383b2033325d6859012043616e63656c2061207072652d6578697374696e672c206f6e2d676f696e67206d756c7469736967207472616e73616374696f6e2e20416e79206465706f7369742072657365727665642070726576696f75736c79c820666f722074686973206f7065726174696f6e2077696c6c20626520756e7265736572766564206f6e20737563636573732e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e6101202d206074696d65706f696e74603a205468652074696d65706f696e742028626c6f636b206e756d62657220616e64207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c7c207472616e73616374696f6e20666f7220746869732064697370617463682ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602e34202d204f6e65206576656e742e88202d20492f4f3a2031207265616420604f285329602c206f6e652072656d6f76652e74202d2053746f726167653a2072656d6f766573206f6e65206974656d2e8c202d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d34202d204442205765696768743a190120202020202d20526561643a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c731d0120202020202d2057726974653a204d756c74697369672053746f726167652c205b43616c6c6572204163636f756e745d2c20526566756e64204163636f756e742c2043616c6c73302023203c2f7765696768743e01102c4e65774d756c74697369670c244163636f756e744964244163636f756e7449642043616c6c48617368041d012041206e6577206d756c7469736967206f7065726174696f6e2068617320626567756e2e205c5b617070726f76696e672c206d756c74697369672c2063616c6c5f686173685c5d404d756c7469736967417070726f76616c10244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c4861736808cc2041206d756c7469736967206f7065726174696f6e20686173206265656e20617070726f76656420627920736f6d656f6e652eb8205c5b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d404d756c7469736967457865637574656414244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c48617368384469737061746368526573756c740459012041206d756c7469736967206f7065726174696f6e20686173206265656e2065786563757465642e205c5b617070726f76696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d444d756c746973696743616e63656c6c656410244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449642043616c6c486173680461012041206d756c7469736967206f7065726174696f6e20686173206265656e2063616e63656c6c65642e205c5b63616e63656c6c696e672c2074696d65706f696e742c206d756c74697369672c2063616c6c5f686173685c5d0c2c4465706f736974426173653042616c616e63654f663c543e4000f01c0adbed0100000000000000000008710120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061206d756c746973696720657865637574696f6e206f7220746f2073746f72656c20612064697370617463682063616c6c20666f72206c617465722e344465706f736974466163746f723042616c616e63654f663c543e400000cc7b9fae000000000000000000000455012054686520616d6f756e74206f662063757272656e6379206e65656465642070657220756e6974207468726573686f6c64207768656e206372656174696e672061206d756c746973696720657865637574696f6e2e384d61785369676e61746f726965730c75313608640004010120546865206d6178696d756d20616d6f756e74206f66207369676e61746f7269657320616c6c6f77656420666f72206120676976656e206d756c74697369672e38404d696e696d756d5468726573686f6c640480205468726573686f6c64206d7573742062652032206f7220677265617465722e3c416c7265616479417070726f76656404b02043616c6c20697320616c726561647920617070726f7665642062792074686973207369676e61746f72792e444e6f417070726f76616c734e656564656404a02043616c6c20646f65736e2774206e65656420616e7920286d6f72652920617070726f76616c732e44546f6f4665775369676e61746f7269657304ac2054686572652061726520746f6f20666577207369676e61746f7269657320696e20746865206c6973742e48546f6f4d616e795369676e61746f7269657304b02054686572652061726520746f6f206d616e79207369676e61746f7269657320696e20746865206c6973742e545369676e61746f726965734f75744f664f7264657204110120546865207369676e61746f7269657320776572652070726f7669646564206f7574206f66206f726465723b20746865792073686f756c64206265206f7264657265642e4c53656e646572496e5369676e61746f72696573041101205468652073656e6465722077617320636f6e7461696e656420696e20746865206f74686572207369676e61746f726965733b2069742073686f756c646e27742062652e204e6f74466f756e6404e0204d756c7469736967206f7065726174696f6e206e6f7420666f756e64207768656e20617474656d7074696e6720746f2063616e63656c2e204e6f744f776e6572043101204f6e6c7920746865206163636f756e742074686174206f726967696e616c6c79206372656174656420746865206d756c74697369672069732061626c6520746f2063616e63656c2069742e2c4e6f54696d65706f696e74042101204e6f2074696d65706f696e742077617320676976656e2c2079657420746865206d756c7469736967206f7065726174696f6e20697320616c726561647920756e6465727761792e3857726f6e6754696d65706f696e74043101204120646966666572656e742074696d65706f696e742077617320676976656e20746f20746865206d756c7469736967206f7065726174696f6e207468617420697320756e6465727761792e4c556e657870656374656454696d65706f696e7404f820412074696d65706f696e742077617320676976656e2c20796574206e6f206d756c7469736967206f7065726174696f6e20697320756e6465727761792e3c4d6178576569676874546f6f4c6f7704d420546865206d6178696d756d2077656967687420696e666f726d6174696f6e2070726f76696465642077617320746f6f206c6f772e34416c726561647953746f72656404a420546865206461746120746f2062652073746f72656420697320616c72656164792073746f7265642e1f20426f756e7469657301205472656173757279102c426f756e7479436f756e7401002c426f756e7479496e646578100000000004c0204e756d626572206f6620626f756e74792070726f706f73616c7320746861742068617665206265656e206d6164652e20426f756e746965730001052c426f756e7479496e646578c8426f756e74793c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265723e000400047820426f756e7469657320746861742068617665206265656e206d6164652e48426f756e74794465736372697074696f6e730001052c426f756e7479496e6465781c5665633c75383e000400048020546865206465736372697074696f6e206f66206561636820626f756e74792e3c426f756e7479417070726f76616c730100405665633c426f756e7479496e6465783e040004ec20426f756e747920696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f74207965742066756e6465642e01243870726f706f73655f626f756e7479081476616c756554436f6d706163743c42616c616e63654f663c543e3e2c6465736372697074696f6e1c5665633c75383e30582050726f706f73652061206e657720626f756e74792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c20617355012060446174614465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e2049742077696c6c20626520756e72657365727665642075706f6e20617070726f76616c2c68206f7220736c6173686564207768656e2072656a65637465642e00fc202d206063757261746f72603a205468652063757261746f72206163636f756e742077686f6d2077696c6c206d616e616765207468697320626f756e74792e68202d2060666565603a205468652063757261746f72206665652e2901202d206076616c7565603a2054686520746f74616c207061796d656e7420616d6f756e74206f66207468697320626f756e74792c2063757261746f722066656520696e636c756465642ec4202d20606465736372697074696f6e603a20546865206465736372697074696f6e206f66207468697320626f756e74792e38617070726f76655f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e20610120417070726f7665206120626f756e74792070726f706f73616c2e2041742061206c617465722074696d652c2074686520626f756e74792077696c6c2062652066756e64656420616e64206265636f6d6520616374697665ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e3c70726f706f73655f63757261746f720c24626f756e74795f696450436f6d706163743c426f756e7479496e6465783e1c63757261746f728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c66656554436f6d706163743c42616c616e63654f663c543e3e1c942041737369676e20612063757261746f7220746f20612066756e64656420626f756e74792e00b0204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a417070726f76654f726967696e602e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e40756e61737369676e5f63757261746f720424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e488020556e61737369676e2063757261746f722066726f6d206120626f756e74792e00210120546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656420627920746865206052656a6563744f726967696e602061207369676e6564206f726967696e2e00690120496620746869732066756e6374696f6e2069732063616c6c656420627920746865206052656a6563744f726967696e602c20776520617373756d652074686174207468652063757261746f72206973206d616c6963696f75730d01206f7220696e6163746976652e204173206120726573756c742c2077652077696c6c20736c617368207468652063757261746f72207768656e20706f737369626c652e00650120496620746865206f726967696e206973207468652063757261746f722c2077652074616b6520746869732061732061207369676e20746865792061726520756e61626c6520746f20646f207468656972206a6f6220616e64610120746865792077696c6c696e676c7920676976652075702e20576520636f756c6420736c617368207468656d2c2062757420666f72206e6f7720776520616c6c6f77207468656d20746f207265636f7665722074686569723901206465706f73697420616e64206578697420776974686f75742069737375652e20285765206d61792077616e7420746f206368616e67652074686973206966206974206973206162757365642e290061012046696e616c6c792c20746865206f726967696e2063616e20626520616e796f6e6520696620616e64206f6e6c79206966207468652063757261746f722069732022696e616374697665222e205468697320616c6c6f7773650120616e796f6e6520696e2074686520636f6d6d756e69747920746f2063616c6c206f7574207468617420612063757261746f72206973206e6f7420646f696e67207468656972206475652064696c6967656e63652c20616e643d012077652073686f756c64207069636b2061206e65772063757261746f722e20496e20746869732063617365207468652063757261746f722073686f756c6420616c736f20626520736c61736865642e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e386163636570745f63757261746f720424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e209820416363657074207468652063757261746f7220726f6c6520666f72206120626f756e74792e2d012041206465706f7369742077696c6c2062652072657365727665642066726f6d2063757261746f7220616e6420726566756e642075706f6e207375636365737366756c207061796f75742e0094204d6179206f6e6c792062652063616c6c65642066726f6d207468652063757261746f722e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e3061776172645f626f756e74790824626f756e74795f696450436f6d706163743c426f756e7479496e6465783e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528990120417761726420626f756e747920746f20612062656e6566696369617279206163636f756e742e205468652062656e65666963696172792077696c6c2062652061626c6520746f20636c61696d207468652066756e647320616674657220612064656c61792e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652063757261746f72206f66207468697320626f756e74792e008c202d2060626f756e74795f6964603a20426f756e747920494420746f2061776172642e1d01202d206062656e6566696369617279603a205468652062656e6566696369617279206163636f756e742077686f6d2077696c6c207265636569766520746865207061796f75742e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e30636c61696d5f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e24f020436c61696d20746865207061796f75742066726f6d20616e206177617264656420626f756e7479206166746572207061796f75742064656c61792e00290120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652062656e6566696369617279206f66207468697320626f756e74792e008c202d2060626f756e74795f6964603a20426f756e747920494420746f20636c61696d2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e30636c6f73655f626f756e74790424626f756e74795f696450436f6d706163743c426f756e7479496e6465783e283d012043616e63656c20612070726f706f736564206f722061637469766520626f756e74792e20416c6c207468652066756e64732077696c6c2062652073656e7420746f20747265617375727920616e64d0207468652063757261746f72206465706f7369742077696c6c20626520756e726573657276656420696620706f737369626c652e00cc204f6e6c792060543a3a52656a6563744f726967696e602069732061626c6520746f2063616e63656c206120626f756e74792e0090202d2060626f756e74795f6964603a20426f756e747920494420746f2063616e63656c2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e50657874656e645f626f756e74795f6578706972790824626f756e74795f696450436f6d706163743c426f756e7479496e6465783e1c5f72656d61726b1c5665633c75383e28b020457874656e6420746865206578706972792074696d65206f6620616e2061637469766520626f756e74792e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265207468652063757261746f72206f66207468697320626f756e74792e0090202d2060626f756e74795f6964603a20426f756e747920494420746f20657874656e642e90202d206072656d61726b603a206164646974696f6e616c20696e666f726d6174696f6e2e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e011c38426f756e747950726f706f736564042c426f756e7479496e646578047c204e657720626f756e74792070726f706f73616c2e205c5b696e6465785c5d38426f756e747952656a6563746564082c426f756e7479496e6465781c42616c616e6365041101204120626f756e74792070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e205c5b696e6465782c20626f6e645c5d48426f756e7479426563616d65416374697665042c426f756e7479496e64657804e4204120626f756e74792070726f706f73616c2069732066756e64656420616e6420626563616d65206163746976652e205c5b696e6465785c5d34426f756e747941776172646564082c426f756e7479496e646578244163636f756e74496404f4204120626f756e7479206973206177617264656420746f20612062656e65666963696172792e205c5b696e6465782c2062656e65666963696172795c5d34426f756e7479436c61696d65640c2c426f756e7479496e6465781c42616c616e6365244163636f756e744964040d01204120626f756e747920697320636c61696d65642062792062656e65666963696172792e205c5b696e6465782c207061796f75742c2062656e65666963696172795c5d38426f756e747943616e63656c6564042c426f756e7479496e6465780484204120626f756e74792069732063616e63656c6c65642e205c5b696e6465785c5d38426f756e7479457874656e646564042c426f756e7479496e646578049c204120626f756e74792065787069727920697320657874656e6465642e205c5b696e6465785c5d1c48446174614465706f736974506572427974653042616c616e63654f663c543e400010a5d4e8000000000000000000000004fc2054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e20626f756e7479206465736372697074696f6e2e44426f756e74794465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004e82054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120626f756e74792070726f706f73616c2e60426f756e74794465706f7369745061796f757444656c617938543a3a426c6f636b4e756d6265721080700000045901205468652064656c617920706572696f6420666f72207768696368206120626f756e74792062656e6566696369617279206e65656420746f2077616974206265666f726520636c61696d20746865207061796f75742e48426f756e7479557064617465506572696f6438543a3a426c6f636b4e756d6265721000270600046c20426f756e7479206475726174696f6e20696e20626c6f636b732e50426f756e747943757261746f724465706f7369741c5065726d696c6c1020a10700046d012050657263656e74616765206f66207468652063757261746f722066656520746861742077696c6c20626520726573657276656420757066726f6e74206173206465706f73697420666f7220626f756e74792063757261746f722e48426f756e747956616c75654d696e696d756d3042616c616e63654f663c543e4000406352bfc6010000000000000000000470204d696e696d756d2076616c756520666f72206120626f756e74792e4c4d6178696d756d526561736f6e4c656e6774680c75333210004000000488204d6178696d756d2061636365707461626c6520726561736f6e206c656e6774682e2470496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e30496e76616c6964496e6465780494204e6f2070726f706f73616c206f7220626f756e7479206174207468617420696e6465782e30526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e40556e657870656374656453746174757304842054686520626f756e74792073746174757320697320756e65787065637465642e385265717569726543757261746f720460205265717569726520626f756e74792063757261746f722e30496e76616c696456616c7565045820496e76616c696420626f756e74792076616c75652e28496e76616c6964466565045020496e76616c696420626f756e7479206665652e3450656e64696e675061796f75740870204120626f756e7479207061796f75742069732070656e64696e672efc20546f2063616e63656c2074686520626f756e74792c20796f75206d75737420756e61737369676e20616e6420736c617368207468652063757261746f722e245072656d61747572650449012054686520626f756e746965732063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e201054697073012054726561737572790810546970730001051c543a3a48617368f04f70656e5469703c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265722c20543a3a486173683e0004000c650120546970734d6170207468617420617265206e6f742079657420636f6d706c657465642e204b65796564206279207468652068617368206f66206028726561736f6e2c2077686f29602066726f6d207468652076616c75652e3d012054686973206861732074686520696e73656375726520656e756d657261626c6520686173682066756e6374696f6e2073696e636520746865206b657920697473656c6620697320616c7265616479802067756172616e7465656420746f20626520612073656375726520686173682e1c526561736f6e730001061c543a3a486173681c5665633c75383e0004000849012053696d706c6520707265696d616765206c6f6f6b75702066726f6d2074686520726561736f6e2773206861736820746f20746865206f726967696e616c20646174612e20416761696e2c2068617320616e610120696e73656375726520656e756d657261626c6520686173682073696e636520746865206b65792069732067756172616e7465656420746f2062652074686520726573756c74206f6620612073656375726520686173682e0118387265706f72745f617765736f6d650818726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e7449644c5d01205265706f727420736f6d657468696e672060726561736f6e60207468617420646573657276657320612074697020616e6420636c61696d20616e79206576656e7475616c207468652066696e6465722773206665652e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c206173c02060446174614465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743ecc202d20436f6d706c65786974793a20604f2852296020776865726520605260206c656e677468206f662060726561736f6e602e942020202d20656e636f64696e6720616e642068617368696e67206f662027726561736f6e2774202d20446252656164733a2060526561736f6e73602c2060546970736078202d2044625772697465733a2060526561736f6e73602c20605469707360302023203c2f7765696768743e2c726574726163745f7469700410686173681c543a3a486173684c550120526574726163742061207072696f72207469702d7265706f72742066726f6d20607265706f72745f617765736f6d65602c20616e642063616e63656c207468652070726f63657373206f662074697070696e672e00e0204966207375636365737366756c2c20746865206f726967696e616c206465706f7369742077696c6c20626520756e72657365727665642e00510120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642074686520746970206964656e746966696564206279206068617368604501206d7573742068617665206265656e207265706f7274656420627920746865207369676e696e67206163636f756e74207468726f75676820607265706f72745f617765736f6d65602028616e64206e6f7450207468726f75676820607469705f6e657760292e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e009020456d697473206054697052657472616374656460206966207375636365737366756c2e002c2023203c7765696768743e54202d20436f6d706c65786974793a20604f28312960dc2020202d20446570656e6473206f6e20746865206c656e677468206f662060543a3a48617368602077686963682069732066697865642e90202d20446252656164733a206054697073602c20606f726967696e206163636f756e7460c0202d2044625772697465733a2060526561736f6e73602c206054697073602c20606f726967696e206163636f756e7460302023203c2f7765696768743e1c7469705f6e65770c18726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e744964247469705f76616c756554436f6d706163743c42616c616e63654f663c543e3e58f4204769766520612074697020666f7220736f6d657468696e67206e65773b206e6f2066696e6465722773206665652077696c6c2062652074616b656e2e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743e5501202d20436f6d706c65786974793a20604f2852202b2054296020776865726520605260206c656e677468206f662060726561736f6e602c2060546020697320746865206e756d626572206f6620746970706572732ec02020202d20604f285429603a206465636f64696e6720605469707065726020766563206f66206c656e6774682060546009012020202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e0d0120202020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602ee42020202d20604f285229603a2068617368696e6720616e6420656e636f64696e67206f6620726561736f6e206f66206c656e6774682060526080202d20446252656164733a206054697070657273602c2060526561736f6e736078202d2044625772697465733a2060526561736f6e73602c20605469707360302023203c2f7765696768743e0c7469700810686173681c543a3a48617368247469705f76616c756554436f6d706163743c42616c616e63654f663c543e3e64b4204465636c6172652061207469702076616c756520666f7220616e20616c72656164792d6f70656e207469702e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f66207468652068617368206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279382020206163636f756e742049442e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e00650120456d6974732060546970436c6f73696e676020696620746865207468726573686f6c64206f66207469707065727320686173206265656e207265616368656420616e642074686520636f756e74646f776e20706572696f64342068617320737461727465642e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e15012020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602c20696e736572742074697020616e6420636865636b20636c6f73696e672c0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602e00610120202041637475616c6c792077656967687420636f756c64206265206c6f77657220617320697420646570656e6473206f6e20686f77206d616e7920746970732061726520696e20604f70656e5469706020627574206974d4202020697320776569676874656420617320696620616c6d6f73742066756c6c20692e65206f66206c656e6774682060542d31602e74202d20446252656164733a206054697070657273602c206054697073604c202d2044625772697465733a20605469707360302023203c2f7765696768743e24636c6f73655f7469700410686173681c543a3a48617368446020436c6f736520616e64207061796f75742061207469702e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0019012054686520746970206964656e74696669656420627920606861736860206d75737420686176652066696e69736865642069747320636f756e74646f776e20706572696f642e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e002c2023203c7765696768743ee4202d20436f6d706c65786974793a20604f285429602077686572652060546020697320746865206e756d626572206f6620746970706572732e9c2020206465636f64696e6720605469707065726020766563206f66206c656e677468206054602e0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602eac202d20446252656164733a206054697073602c206054697070657273602c20607469702066696e64657260dc202d2044625772697465733a2060526561736f6e73602c206054697073602c206054697070657273602c20607469702066696e64657260302023203c2f7765696768743e24736c6173685f7469700410686173681c543a3a4861736830982052656d6f766520616e6420736c61736820616e20616c72656164792d6f70656e207469702e00ac204d6179206f6e6c792062652063616c6c65642066726f6d2060543a3a52656a6563744f726967696e602e00f8204173206120726573756c742c207468652066696e64657220697320736c617368656420616e6420746865206465706f7369747320617265206c6f73742e008820456d6974732060546970536c617368656460206966207375636365737366756c2e002c2023203c7765696768743e0101202020605460206973206368617267656420617320757070657220626f756e6420676976656e2062792060436f6e7461696e734c656e677468426f756e64602e05012020205468652061637475616c20636f737420646570656e6473206f6e2074686520696d706c656d656e746174696f6e206f662060543a3a54697070657273602e302023203c2f7765696768743e0114184e657754697004104861736804cc2041206e6577207469702073756767657374696f6e20686173206265656e206f70656e65642e205c5b7469705f686173685c5d28546970436c6f73696e670410486173680411012041207469702073756767657374696f6e206861732072656163686564207468726573686f6c6420616e6420697320636c6f73696e672e205c5b7469705f686173685c5d24546970436c6f7365640c1048617368244163636f756e7449641c42616c616e636504f02041207469702073756767657374696f6e20686173206265656e20636c6f7365642e205c5b7469705f686173682c2077686f2c207061796f75745c5d3054697052657472616374656404104861736804c82041207469702073756767657374696f6e20686173206265656e207265747261637465642e205c5b7469705f686173685c5d28546970536c61736865640c1048617368244163636f756e7449641c42616c616e63650405012041207469702073756767657374696f6e20686173206265656e20736c61736865642e205c5b7469705f686173682c2066696e6465722c206465706f7369745c5d1430546970436f756e74646f776e38543a3a426c6f636b4e756d62657210807000000445012054686520706572696f6420666f722077686963682061207469702072656d61696e73206f70656e20616674657220697320686173206163686965766564207468726573686f6c6420746970706572732e3454697046696e646572734665651c50657263656e7404140431012054686520616d6f756e74206f66207468652066696e616c2074697020776869636820676f657320746f20746865206f726967696e616c207265706f72746572206f6620746865207469702e505469705265706f72744465706f736974426173653042616c616e63654f663c543e4000407a10f35a0000000000000000000004d42054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120746970207265706f72742e48446174614465706f736974506572427974653042616c616e63654f663c543e400010a5d4e800000000000000000000000409012054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e2074686520746970207265706f727420726561736f6e2e4c4d6178696d756d526561736f6e4c656e6774680c75333210004000000488204d6178696d756d2061636365707461626c6520726561736f6e206c656e6774682e1830526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e30416c72656164794b6e6f776e048c20546865207469702077617320616c726561647920666f756e642f737461727465642e28556e6b6e6f776e54697004642054686520746970206861736820697320756e6b6e6f776e2e244e6f7446696e64657204210120546865206163636f756e7420617474656d7074696e6720746f20726574726163742074686520746970206973206e6f74207468652066696e646572206f6620746865207469702e245374696c6c4f70656e042d0120546865207469702063616e6e6f7420626520636c61696d65642f636c6f736564206265636175736520746865726520617265206e6f7420656e6f7567682074697070657273207965742e245072656d617475726504350120546865207469702063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e211841737365747301184173736574731014417373657400010228543a3a41737365744964f8417373657444657461696c733c543a3a42616c616e63652c20543a3a4163636f756e7449642c204465706f73697442616c616e63654f663c542c20493e3e00040004542044657461696c73206f6620616e2061737365742e1c4163636f756e7401020228543a3a4173736574496430543a3a4163636f756e74496488417373657442616c616e63653c543a3a42616c616e63652c20543a3a45787472613e02280000000000000000000004e420546865206e756d626572206f6620756e697473206f66206173736574732068656c6420627920616e7920676976656e206163636f756e742e24417070726f76616c7300020228543a3a4173736574496464417070726f76616c4b65793c543a3a4163636f756e7449643eb0417070726f76616c3c543a3a42616c616e63652c204465706f73697442616c616e63654f663c542c20493e3e02040008590120417070726f7665642062616c616e6365207472616e73666572732e2046697273742062616c616e63652069732074686520616d6f756e7420617070726f76656420666f72207472616e736665722e205365636f6e64e82069732074686520616d6f756e74206f662060543a3a43757272656e63796020726573657276656420666f722073746f72696e6720746869732e204d6574616461746101010228543a3a417373657449649441737365744d657461646174613c4465706f73697442616c616e63654f663c542c20493e3e005000000000000000000000000000000000000000000458204d65746164617461206f6620616e2061737365742e015c186372656174650c0869644c436f6d706163743c543a3a417373657449643e1461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c6d696e5f62616c616e636528543a3a42616c616e63654cec2049737375652061206e657720636c617373206f662066756e6769626c65206173736574732066726f6d2061207075626c6963206f726967696e2e0029012054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c7920616e6420697473206f776e657220697320746865206f726967696e2e00290120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d75737420686176652073756666696369656e742066756e647320667265652e00c02046756e6473206f662073656e64657220617265207265736572766564206279206041737365744465706f736974602e003020506172616d65746572733a5d01202d20606964603a20546865206964656e746966696572206f6620746865206e65772061737365742e2054686973206d757374206e6f742062652063757272656e746c7920696e2075736520746f206964656e746966794c20616e206578697374696e672061737365742e5d01202d206061646d696e603a205468652061646d696e206f66207468697320636c617373206f66206173736574732e205468652061646d696e2069732074686520696e697469616c2061646472657373206f662065616368a0206d656d626572206f662074686520617373657420636c61737327732061646d696e207465616d2e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e009c20456d69747320604372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f2831296030666f7263655f637265617465100869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653469735f73756666696369656e7410626f6f6c2c6d696e5f62616c616e63654c436f6d706163743c543a3a42616c616e63653e54fc2049737375652061206e657720636c617373206f662066756e6769626c65206173736574732066726f6d20612070726976696c65676564206f726967696e2e00b82054686973206e657720617373657420636c61737320686173206e6f2061737365747320696e697469616c6c792e00a820546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e602e00a020556e6c696b652060637265617465602c206e6f2066756e6473206172652072657365727665642e005d01202d20606964603a20546865206964656e746966696572206f6620746865206e65772061737365742e2054686973206d757374206e6f742062652063757272656e746c7920696e2075736520746f206964656e746966794c20616e206578697374696e672061737365742e5d01202d20606f776e6572603a20546865206f776e6572206f66207468697320636c617373206f66206173736574732e20546865206f776e6572206861732066756c6c20737570657275736572207065726d697373696f6e737d01206f76657220746869732061737365742c20627574206d6179206c61746572206368616e676520616e6420636f6e66696775726520746865207065726d697373696f6e73207573696e6720607472616e736665725f6f776e657273686970604020616e6420607365745f7465616d602e5901202d20606d61785f7a6f6d62696573603a2054686520746f74616c206e756d626572206f66206163636f756e7473207768696368206d617920686f6c642061737365747320696e207468697320636c61737320796574742068617665206e6f206578697374656e7469616c206465706f7369742e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e00b020456d6974732060466f7263654372656174656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f283129601c64657374726f79080869644c436f6d706163743c543a3a417373657449643e1c7769746e6573733844657374726f795769746e65737338902044657374726f79206120636c617373206f662066756e6769626c65206173736574732e00590120546865206f726967696e206d75737420636f6e666f726d20746f2060466f7263654f726967696e60206f72206d757374206265205369676e656420616e64207468652073656e646572206d7573742062652074686564206f776e6572206f662074686520617373657420606964602e005101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652064657374726f7965642e2054686973206d757374206964656e7469667920616e206578697374696e671c2061737365742e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e0078205765696768743a20604f2863202b2070202b206129602077686572653ac4202d206063203d20287769746e6573732e6163636f756e7473202d207769746e6573732e73756666696369656e7473296070202d206073203d207769746e6573732e73756666696369656e74736068202d206061203d207769746e6573732e617070726f76616c7360106d696e740c0869644c436f6d706163743c543a3a417373657449643e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e308c204d696e7420617373657473206f66206120706172746963756c617220636c6173732e003d0120546865206f726967696e206d757374206265205369676e656420616e64207468652073656e646572206d7573742062652074686520497373756572206f662074686520617373657420606964602e000101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74206d696e7465642e1101202d206062656e6566696369617279603a20546865206163636f756e7420746f206265206372656469746564207769746820746865206d696e746564206173736574732ec8202d2060616d6f756e74603a2054686520616d6f756e74206f662074686520617373657420746f206265206d696e7465642e00a420456d697473206044657374726f79656460206576656e74207768656e207375636365737366756c2e003c205765696768743a20604f283129605901204d6f6465733a205072652d6578697374696e672062616c616e6365206f66206062656e6566696369617279603b204163636f756e74207072652d6578697374656e6365206f66206062656e6566696369617279602e106275726e0c0869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e3c490120526564756365207468652062616c616e6365206f66206077686f60206279206173206d75636820617320706f737369626c6520757020746f2060616d6f756e746020617373657473206f6620606964602e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204d616e61676572206f662074686520617373657420606964602e00dc204261696c732077697468206042616c616e63655a65726f6020696620746865206077686f6020697320616c726561647920646561642e000101202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74206275726e65642ea4202d206077686f603a20546865206163636f756e7420746f20626520646562697465642066726f6d2e2d01202d2060616d6f756e74603a20546865206d6178696d756d20616d6f756e74206279207768696368206077686f6027732062616c616e63652073686f756c6420626520726564756365642e00550120456d69747320604275726e6564602077697468207468652061637475616c20616d6f756e74206275726e65642e20496620746869732074616b6573207468652062616c616e636520746f2062656c6f77207468653d01206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74206275726e656420697320696e6372656173656420746f2074616b6520697420746f207a65726f2e003c205765696768743a20604f283129600d01204d6f6465733a20506f73742d6578697374656e6365206f66206077686f603b20507265202620706f7374205a6f6d6269652d737461747573206f66206077686f602e207472616e736665720c0869644c436f6d706163743c543a3a417373657449643e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e48d4204d6f766520736f6d65206173736574732066726f6d207468652073656e646572206163636f756e7420746f20616e6f746865722e005c204f726967696e206d757374206265205369676e65642e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642ea0202d2060746172676574603a20546865206163636f756e7420746f2062652063726564697465642e5501202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652073656e64657227732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e64650120607461726765746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e6101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652073656e6465722062616c616e63652061626f7665207a65726f206275742062656c6f77c020746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605d01204d6f6465733a205072652d6578697374656e6365206f662060746172676574603b20506f73742d6578697374656e6365206f662073656e6465723b205072696f72202620706f7374207a6f6d6269652d737461747573b8206f662073656e6465723b204163636f756e74207072652d6578697374656e6365206f662060746172676574602e4c7472616e736665725f6b6565705f616c6976650c0869644c436f6d706163743c543a3a417373657449643e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e485d01204d6f766520736f6d65206173736574732066726f6d207468652073656e646572206163636f756e7420746f20616e6f746865722c206b656570696e67207468652073656e646572206163636f756e7420616c6976652e005c204f726967696e206d757374206265205369676e65642e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642ea0202d2060746172676574603a20546865206163636f756e7420746f2062652063726564697465642e5501202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652073656e64657227732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e64650120607461726765746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e6101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652073656e6465722062616c616e63652061626f7665207a65726f206275742062656c6f77c020746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605d01204d6f6465733a205072652d6578697374656e6365206f662060746172676574603b20506f73742d6578697374656e6365206f662073656e6465723b205072696f72202620706f7374207a6f6d6269652d737461747573b8206f662073656e6465723b204163636f756e74207072652d6578697374656e6365206f662060746172676574602e38666f7263655f7472616e73666572100869644c436f6d706163743c543a3a417373657449643e18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e4cb8204d6f766520736f6d65206173736574732066726f6d206f6e65206163636f756e7420746f20616e6f746865722e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e001501202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f206861766520736f6d6520616d6f756e74207472616e736665727265642e9c202d2060736f75726365603a20546865206163636f756e7420746f20626520646562697465642e98202d206064657374603a20546865206163636f756e7420746f2062652063726564697465642e5d01202d2060616d6f756e74603a2054686520616d6f756e74206279207768696368207468652060736f757263656027732062616c616e6365206f66206173736574732073686f756c64206265207265647563656420616e645d012060646573746027732062616c616e636520696e637265617365642e2054686520616d6f756e742061637475616c6c79207472616e73666572726564206d617920626520736c696768746c79206772656174657220696e5101207468652063617365207468617420746865207472616e7366657220776f756c64206f74686572776973652074616b65207468652060736f75726365602062616c616e63652061626f7665207a65726f20627574d82062656c6f7720746865206d696e696d756d2062616c616e63652e204d7573742062652067726561746572207468616e207a65726f2e00650120456d69747320605472616e73666572726564602077697468207468652061637475616c20616d6f756e74207472616e736665727265642e20496620746869732074616b65732074686520736f757263652062616c616e6365610120746f2062656c6f7720746865206d696e696d756d20666f72207468652061737365742c207468656e2074686520616d6f756e74207472616e7366657272656420697320696e6372656173656420746f2074616b652069742420746f207a65726f2e003c205765696768743a20604f283129605d01204d6f6465733a205072652d6578697374656e6365206f66206064657374603b20506f73742d6578697374656e6365206f662060736f75726365603b205072696f72202620706f7374207a6f6d6269652d737461747573b8206f662060736f75726365603b204163636f756e74207072652d6578697374656e6365206f66206064657374602e18667265657a65080869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528e420446973616c6c6f77206675727468657220756e70726976696c65676564207472616e73666572732066726f6d20616e206163636f756e742e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c642062652074686520467265657a6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e8c202d206077686f603a20546865206163636f756e7420746f2062652066726f7a656e2e004020456d697473206046726f7a656e602e003c205765696768743a20604f283129601074686177080869644c436f6d706163743c543a3a417373657449643e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636528d020416c6c6f7720756e70726976696c65676564207472616e73666572732066726f6d20616e206163636f756e7420616761696e2e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e94202d206077686f603a20546865206163636f756e7420746f20626520756e66726f7a656e2e004020456d6974732060546861776564602e003c205765696768743a20604f2831296030667265657a655f6173736574040869644c436f6d706163743c543a3a417373657449643e24f420446973616c6c6f77206675727468657220756e70726976696c65676564207472616e736665727320666f722074686520617373657420636c6173732e003901204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c642062652074686520467265657a6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e004020456d697473206046726f7a656e602e003c205765696768743a20604f2831296028746861775f6173736574040869644c436f6d706163743c543a3a417373657449643e24c820416c6c6f7720756e70726976696c65676564207472616e736665727320666f722074686520617373657420616761696e2e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c64206265207468652041646d696e206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2e004020456d6974732060546861776564602e003c205765696768743a20604f28312960487472616e736665725f6f776e657273686970080869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652878204368616e676520746865204f776e6572206f6620616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742ea0202d20606f776e6572603a20546865206e6577204f776e6572206f6620746869732061737365742e005820456d69747320604f776e65724368616e676564602e003c205765696768743a20604f28312960207365745f7465616d100869644c436f6d706163743c543a3a417373657449643e186973737565728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c667265657a65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636530c8204368616e676520746865204973737565722c2041646d696e20616e6420467265657a6572206f6620616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00c8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f2062652066726f7a656e2ea8202d2060697373756572603a20546865206e657720497373756572206f6620746869732061737365742ea0202d206061646d696e603a20546865206e65772041646d696e206f6620746869732061737365742eb0202d2060667265657a6572603a20546865206e657720467265657a6572206f6620746869732061737365742e005420456d69747320605465616d4368616e676564602e003c205765696768743a20604f28312960307365745f6d65746164617461100869644c436f6d706163743c543a3a417373657449643e106e616d651c5665633c75383e1873796d626f6c1c5665633c75383e20646563696d616c73087538407c2053657420746865206d6574616461746120666f7220616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00dc2046756e6473206f662073656e64657220617265207265736572766564206163636f7264696e6720746f2074686520666f726d756c613a550120604d657461646174614465706f73697442617365202b204d657461646174614465706f73697450657242797465202a20286e616d652e6c656e202b2073796d626f6c2e6c656e29602074616b696e6720696e746f90206163636f756e7420616e7920616c72656164792072657365727665642066756e64732e00bc202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f207570646174652e5101202d20606e616d65603a20546865207573657220667269656e646c79206e616d65206f6620746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e5101202d206073796d626f6c603a205468652065786368616e67652073796d626f6c20666f7220746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e3101202d2060646563696d616c73603a20546865206e756d626572206f6620646563696d616c732074686973206173736574207573657320746f20726570726573656e74206f6e6520756e69742e005420456d69747320604d65746164617461536574602e003c205765696768743a20604f2831296038636c6561725f6d65746164617461040869644c436f6d706163743c543a3a417373657449643e2c8420436c65617220746865206d6574616461746120666f7220616e2061737365742e003101204f726967696e206d757374206265205369676e656420616e64207468652073656e6465722073686f756c6420626520746865204f776e6572206f662074686520617373657420606964602e00a820416e79206465706f73697420697320667265656420666f7220746865206173736574206f776e65722e00b8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f20636c6561722e006420456d69747320604d65746164617461436c6561726564602e003c205765696768743a20604f2831296048666f7263655f7365745f6d65746164617461140869644c436f6d706163743c543a3a417373657449643e106e616d651c5665633c75383e1873796d626f6c1c5665633c75383e20646563696d616c730875382469735f66726f7a656e10626f6f6c38bc20466f72636520746865206d6574616461746120666f7220616e20617373657420746f20736f6d652076616c75652e0070204f726967696e206d75737420626520466f7263654f726967696e2e006c20416e79206465706f736974206973206c65667420616c6f6e652e00bc202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f207570646174652e5101202d20606e616d65603a20546865207573657220667269656e646c79206e616d65206f6620746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e5101202d206073796d626f6c603a205468652065786368616e67652073796d626f6c20666f7220746869732061737365742e204c696d6974656420696e206c656e6774682062792060537472696e674c696d6974602e3101202d2060646563696d616c73603a20546865206e756d626572206f6620646563696d616c732074686973206173736574207573657320746f20726570726573656e74206f6e6520756e69742e005420456d69747320604d65746164617461536574602e005501205765696768743a20604f284e202b20532960207768657265204e20616e6420532061726520746865206c656e677468206f6620746865206e616d6520616e642073796d626f6c20726573706563746976656c792e50666f7263655f636c6561725f6d65746164617461040869644c436f6d706163743c543a3a417373657449643e2c8420436c65617220746865206d6574616461746120666f7220616e2061737365742e0070204f726967696e206d75737420626520466f7263654f726967696e2e006420416e79206465706f7369742069732072657475726e65642e00b8202d20606964603a20546865206964656e746966696572206f662074686520617373657420746f20636c6561722e006420456d69747320604d65746164617461436c6561726564602e003c205765696768743a20604f2831296048666f7263655f61737365745f737461747573200869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365186973737565728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651461646d696e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651c667265657a65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c6d696e5f62616c616e63654c436f6d706163743c543a3a42616c616e63653e3469735f73756666696369656e7410626f6f6c2469735f66726f7a656e10626f6f6c589c20416c746572207468652061747472696275746573206f66206120676976656e2061737365742e0078204f726967696e206d7573742062652060466f7263654f726967696e602e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742ea0202d20606f776e6572603a20546865206e6577204f776e6572206f6620746869732061737365742ea8202d2060697373756572603a20546865206e657720497373756572206f6620746869732061737365742ea0202d206061646d696e603a20546865206e65772041646d696e206f6620746869732061737365742eb0202d2060667265657a6572603a20546865206e657720467265657a6572206f6620746869732061737365742e5101202d20606d696e5f62616c616e6365603a20546865206d696e696d756d2062616c616e6365206f662074686973206e6577206173736574207468617420616e792073696e676c65206163636f756e74206d757374410120686176652e20496620616e206163636f756e7427732062616c616e636520697320726564756365642062656c6f7720746869732c207468656e20697420636f6c6c617073657320746f207a65726f2e5501202d206069735f73756666696369656e74603a20576865746865722061206e6f6e2d7a65726f2062616c616e6365206f662074686973206173736574206973206465706f736974206f662073756666696369656e7451012076616c756520746f206163636f756e7420666f722074686520737461746520626c6f6174206173736f6369617465642077697468206974732062616c616e63652073746f726167652e2049662073657420746f5901206074727565602c207468656e206e6f6e2d7a65726f2062616c616e636573206d61792062652073746f72656420776974686f757420612060636f6e73756d657260207265666572656e63652028616e642074687573510120616e20454420696e207468652042616c616e6365732070616c6c6574206f7220776861746576657220656c7365206973207573656420746f20636f6e74726f6c20757365722d6163636f756e74207374617465242067726f777468292e4101202d206069735f66726f7a656e603a2057686574686572207468697320617373657420636c6173732069732066726f7a656e2065786365707420666f72207065726d697373696f6e65642f61646d696e3820696e737472756374696f6e732e00ec20456d697473206041737365745374617475734368616e67656460207769746820746865206964656e74697479206f66207468652061737365742e003c205765696768743a20604f2831296040617070726f76655f7472616e736665720c0869644c436f6d706163743c543a3a417373657449643e2064656c65676174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e50310120417070726f766520616e20616d6f756e74206f6620617373657420666f72207472616e7366657220627920612064656c6567617465642074686972642d7061727479206163636f756e742e005c204f726967696e206d757374206265205369676e65642e00510120456e737572657320746861742060417070726f76616c4465706f7369746020776f727468206f66206043757272656e6379602069732072657365727665642066726f6d207369676e696e67206163636f756e74590120666f722074686520707572706f7365206f6620686f6c64696e672074686520617070726f76616c2e20496620736f6d65206e6f6e2d7a65726f20616d6f756e74206f662061737365747320697320616c72656164794d0120617070726f7665642066726f6d207369676e696e67206163636f756e7420746f206064656c6567617465602c207468656e20697420697320746f70706564207570206f7220756e726573657276656420746f58206d656574207468652072696768742076616c75652e004901204e4f54453a20546865207369676e696e67206163636f756e7420646f6573206e6f74206e65656420746f206f776e2060616d6f756e7460206f66206173736574732061742074686520706f696e74206f6648206d616b696e6720746869732063616c6c2e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742e1101202d206064656c6567617465603a20546865206163636f756e7420746f2064656c6567617465207065726d697373696f6e20746f207472616e736665722061737365742e4d01202d2060616d6f756e74603a2054686520616d6f756e74206f662061737365742074686174206d6179206265207472616e73666572726564206279206064656c6567617465602e204966207468657265206973e420616c726561647920616e20617070726f76616c20696e20706c6163652c207468656e207468697320616374732061646469746976656c792e009420456d6974732060417070726f7665645472616e7366657260206f6e20737563636573732e003c205765696768743a20604f283129603c63616e63656c5f617070726f76616c080869644c436f6d706163743c543a3a417373657449643e2064656c65676174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365344d012043616e63656c20616c6c206f6620736f6d6520617373657420617070726f76656420666f722064656c656761746564207472616e7366657220627920612074686972642d7061727479206163636f756e742e004101204f726967696e206d757374206265205369676e656420616e64207468657265206d75737420626520616e20617070726f76616c20696e20706c616365206265747765656e207369676e657220616e6430206064656c6567617465602e004d0120556e726573657276657320616e79206465706f7369742070726576696f75736c792072657365727665642062792060617070726f76655f7472616e736665726020666f722074686520617070726f76616c2e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742e0901202d206064656c6567617465603a20546865206163636f756e742064656c656761746564207065726d697373696f6e20746f207472616e736665722061737365742e009820456d6974732060417070726f76616c43616e63656c6c656460206f6e20737563636573732e003c205765696768743a20604f2831296054666f7263655f63616e63656c5f617070726f76616c0c0869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652064656c65676174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365344d012043616e63656c20616c6c206f6620736f6d6520617373657420617070726f76656420666f722064656c656761746564207472616e7366657220627920612074686972642d7061727479206163636f756e742e004d01204f726967696e206d7573742062652065697468657220466f7263654f726967696e206f72205369676e6564206f726967696e207769746820746865207369676e6572206265696e67207468652041646d696e6c206163636f756e74206f662074686520617373657420606964602e004d0120556e726573657276657320616e79206465706f7369742070726576696f75736c792072657365727665642062792060617070726f76655f7472616e736665726020666f722074686520617070726f76616c2e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742e0901202d206064656c6567617465603a20546865206163636f756e742064656c656761746564207065726d697373696f6e20746f207472616e736665722061737365742e009820456d6974732060417070726f76616c43616e63656c6c656460206f6e20737563636573732e003c205765696768743a20604f28312960447472616e736665725f617070726f766564100869644c436f6d706163743c543a3a417373657449643e146f776e65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c64657374696e6174696f6e8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636518616d6f756e744c436f6d706163743c543a3a42616c616e63653e485101205472616e7366657220736f6d652061737365742062616c616e63652066726f6d20612070726576696f75736c792064656c656761746564206163636f756e7420746f20736f6d652074686972642d706172747924206163636f756e742e004d01204f726967696e206d757374206265205369676e656420616e64207468657265206d75737420626520616e20617070726f76616c20696e20706c6163652062792074686520606f776e65726020746f2074686520207369676e65722e005d012049662074686520656e7469726520616d6f756e7420617070726f76656420666f72207472616e73666572206973207472616e736665727265642c207468656e20616e79206465706f7369742070726576696f75736c79b82072657365727665642062792060617070726f76655f7472616e736665726020697320756e72657365727665642e0094202d20606964603a20546865206964656e746966696572206f66207468652061737365742e6501202d20606f776e6572603a20546865206163636f756e742077686963682070726576696f75736c7920617070726f76656420666f722061207472616e73666572206f66206174206c656173742060616d6f756e746020616e64c02066726f6d207768696368207468652061737365742062616c616e63652077696c6c2062652077697468647261776e2e6501202d206064657374696e6174696f6e603a20546865206163636f756e7420746f207768696368207468652061737365742062616c616e6365206f662060616d6f756e74602077696c6c206265207472616e736665727265642eb8202d2060616d6f756e74603a2054686520616d6f756e74206f662061737365747320746f207472616e736665722e00a020456d69747320605472616e73666572726564417070726f76656460206f6e20737563636573732e003c205765696768743a20604f2831296001481c437265617465640c1c41737365744964244163636f756e744964244163636f756e74496404ec20536f6d6520617373657420636c6173732077617320637265617465642e205c5b61737365745f69642c2063726561746f722c206f776e65725c5d184973737565640c1c41737365744964244163636f756e7449641c42616c616e636504ec20536f6d65206173736574732077657265206973737565642e205c5b61737365745f69642c206f776e65722c20746f74616c5f737570706c795c5d2c5472616e73666572726564101c41737365744964244163636f756e744964244163636f756e7449641c42616c616e636504f420536f6d65206173736574732077657265207472616e736665727265642e205c5b61737365745f69642c2066726f6d2c20746f2c20616d6f756e745c5d184275726e65640c1c41737365744964244163636f756e7449641c42616c616e636504e420536f6d652061737365747320776572652064657374726f7965642e205c5b61737365745f69642c206f776e65722c2062616c616e63655c5d2c5465616d4368616e676564101c41737365744964244163636f756e744964244163636f756e744964244163636f756e74496404050120546865206d616e6167656d656e74207465616d206368616e676564205c5b61737365745f69642c206973737565722c2061646d696e2c20667265657a65725c5d304f776e65724368616e676564081c41737365744964244163636f756e744964049820546865206f776e6572206368616e676564205c5b61737365745f69642c206f776e65725c5d1846726f7a656e081c41737365744964244163636f756e74496404c420536f6d65206163636f756e74206077686f60207761732066726f7a656e2e205c5b61737365745f69642c2077686f5c5d18546861776564081c41737365744964244163636f756e74496404c420536f6d65206163636f756e74206077686f6020776173207468617765642e205c5b61737365745f69642c2077686f5c5d2c417373657446726f7a656e041c4173736574496404bc20536f6d65206173736574206061737365745f696460207761732066726f7a656e2e205c5b61737365745f69645c5d2c4173736574546861776564041c4173736574496404bc20536f6d65206173736574206061737365745f69646020776173207468617765642e205c5b61737365745f69645c5d2444657374726f796564041c41737365744964047820416e20617373657420636c617373207761732064657374726f7965642e30466f72636543726561746564081c41737365744964244163636f756e74496404e020536f6d6520617373657420636c6173732077617320666f7263652d637265617465642e205c5b61737365745f69642c206f776e65725c5d2c4d65746164617461536574141c417373657449641c5665633c75383e1c5665633c75383e08753810626f6f6c046101204e6577206d6574616461746120686173206265656e2073657420666f7220616e2061737365742e205c5b61737365745f69642c206e616d652c2073796d626f6c2c20646563696d616c732c2069735f66726f7a656e5c5d3c4d65746164617461436c6561726564041c4173736574496404d4204d6574616461746120686173206265656e20636c656172656420666f7220616e2061737365742e205c5b61737365745f69645c5d40417070726f7665645472616e73666572101c41737365744964244163636f756e744964244163636f756e7449641c42616c616e636508350120284164646974696f6e616c292066756e64732068617665206265656e20617070726f76656420666f72207472616e7366657220746f20612064657374696e6174696f6e206163636f756e742e9c205c5b61737365745f69642c20736f757263652c2064656c65676174652c20616d6f756e745c5d44417070726f76616c43616e63656c6c65640c1c41737365744964244163636f756e744964244163636f756e74496408f420416e20617070726f76616c20666f72206163636f756e74206064656c656761746560207761732063616e63656c6c656420627920606f776e6572602e60205c5b69642c206f776e65722c2064656c65676174655c5d4c5472616e73666572726564417070726f766564141c41737365744964244163636f756e744964244163636f756e744964244163636f756e7449641c42616c616e63650c350120416e2060616d6f756e746020776173207472616e7366657272656420696e2069747320656e7469726574792066726f6d20606f776e65726020746f206064657374696e6174696f6e60206279642074686520617070726f766564206064656c6567617465602e94205c5b69642c206f776e65722c2064656c65676174652c2064657374696e6174696f6e5c5d4841737365745374617475734368616e676564041c4173736574496408fc20416e2061737365742068617320686164206974732061747472696275746573206368616e676564206279207468652060466f72636560206f726967696e2e1c205c5b69645c5d00342842616c616e63654c6f77041901204163636f756e742062616c616e6365206d7573742062652067726561746572207468616e206f7220657175616c20746f20746865207472616e7366657220616d6f756e742e2c42616c616e63655a65726f04702042616c616e63652073686f756c64206265206e6f6e2d7a65726f2e304e6f5065726d697373696f6e04ec20546865207369676e696e67206163636f756e7420686173206e6f207065726d697373696f6e20746f20646f20746865206f7065726174696f6e2e1c556e6b6e6f776e047c2054686520676976656e20617373657420494420697320756e6b6e6f776e2e1846726f7a656e047820546865206f726967696e206163636f756e742069732066726f7a656e2e14496e557365047c2054686520617373657420494420697320616c72656164792074616b656e2e284261645769746e657373047020496e76616c6964207769746e657373206461746120676976656e2e384d696e42616c616e63655a65726f0490204d696e696d756d2062616c616e63652073686f756c64206265206e6f6e2d7a65726f2e204f766572666c6f7704982041206d696e74206f7065726174696f6e206c65616420746f20616e206f766572666c6f772e284e6f50726f7669646572046501204e6f2070726f7669646572207265666572656e63652065786973747320746f20616c6c6f772061206e6f6e2d7a65726f2062616c616e6365206f662061206e6f6e2d73656c662d73756666696369656e742061737365742e2c4261644d65746164617461046020496e76616c6964206d6574616461746120676976656e2e28556e617070726f76656404c8204e6f20617070726f76616c20657869737473207468617420776f756c6420616c6c6f7720746865207472616e736665722e20576f756c644469650439012054686520736f75726365206163636f756e7420776f756c64206e6f74207375727669766520746865207472616e7366657220616e64206974206e6565647320746f207374617920616c6976652e220c4d6d72014c4d65726b6c654d6f756e7461696e52616e67650c20526f6f74486173680100583c5420617320436f6e6669673c493e3e3a3a486173688000000000000000000000000000000000000000000000000000000000000000000458204c6174657374204d4d5220526f6f7420686173682e384e756d6265724f664c656176657301000c75363420000000000000000004b02043757272656e742073697a65206f6620746865204d4d5220286e756d626572206f66206c6561766573292e144e6f6465730001060c753634583c5420617320436f6e6669673c493e3e3a3a48617368000400108020486173686573206f6620746865206e6f64657320696e20746865204d4d522e002d01204e6f7465207468697320636f6c6c656374696f6e206f6e6c7920636f6e7461696e73204d4d52207065616b732c2074686520696e6e6572206e6f6465732028616e64206c656176657329bc20617265207072756e656420616e64206f6e6c792073746f72656420696e20746865204f6666636861696e2044422e00000000231c4c6f7474657279011c4c6f747465727918304c6f7474657279496e64657801000c7533321000000000001c4c6f74746572790000ac4c6f7474657279436f6e6669673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e3e040004ac2054686520636f6e66696775726174696f6e20666f72207468652063757272656e74206c6f74746572792e305061727469636970616e747301010530543a3a4163636f756e74496454287533322c205665633c43616c6c496e6465783e29001400000000000419012055736572732077686f2068617665207075726368617365642061207469636b65742e20284c6f747465727920496e6465782c205469636b6574732050757263686173656429305469636b657473436f756e7401000c7533321000000000047820546f74616c206e756d626572206f66207469636b65747320736f6c642e1c5469636b6574730001050c75333230543a3a4163636f756e74496400040010542045616368207469636b65742773206f776e65722e006101204d6179206861766520726573696475616c2073746f726167652066726f6d2070726576696f7573206c6f747465726965732e2055736520605469636b657473436f756e746020746f20736565207768696368206f6e657390206172652061637475616c6c792076616c6964207469636b6574206d617070696e67732e2c43616c6c496e64696365730100385665633c43616c6c496e6465783e0400083901205468652063616c6c732073746f72656420696e20746869732070616c6c657420746f206265207573656420696e20616e20616374697665206c6f747465727920696620636f6e666967757265646c2062792060436f6e6669673a3a56616c696461746543616c6c602e0110286275795f7469636b6574041063616c6c60426f783c3c5420617320436f6e6669673e3a3a43616c6c3e2c8c204275792061207469636b657420746f20656e74657220746865206c6f74746572792e00050120546869732065787472696e7369632061637473206173206120706173737468726f7567682066756e6374696f6e20666f72206063616c6c602e20496e20616c6c0d0120736974756174696f6e73207768657265206063616c6c6020616c6f6e6520776f756c6420737563636565642c20746869732065787472696e7369632073686f756c642420737563636565642e001101204966206063616c6c60206973207375636365737366756c2c207468656e2077652077696c6c20617474656d707420746f2070757263686173652061207469636b65742c1501207768696368206d6179206661696c2073696c656e746c792e20546f206465746563742073756363657373206f662061207469636b65742070757263686173652c20796f75b02073686f756c64206c697374656e20666f722074686520605469636b6574426f7567687460206576656e742e00c820546869732065787472696e736963206d7573742062652063616c6c65642062792061207369676e6564206f726967696e2e247365745f63616c6c73041463616c6c73605665633c3c5420617320436f6e6669673e3a3a43616c6c3e181501205365742063616c6c7320696e2073746f726167652077686963682063616e206265207573656420746f2070757263686173652061206c6f7474657279207469636b65742e00210120546869732066756e6374696f6e206f6e6c79206d61747465727320696620796f752075736520746865206056616c696461746543616c6c6020696d706c656d656e746174696f6e29012070726f766964656420627920746869732070616c6c65742c20776869636820757365732073746f7261676520746f2064657465726d696e65207468652076616c69642063616c6c732e00d420546869732065787472696e736963206d7573742062652063616c6c656420627920746865204d616e61676572206f726967696e2e3473746172745f6c6f7474657279101470726963653042616c616e63654f663c543e186c656e67746838543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d6265721872657065617410626f6f6c28c82053746172742061206c6f7474657279207573696e67207468652070726f766964656420636f6e66696775726174696f6e2e00d820546869732065787472696e736963206d7573742062652063616c6c65642062792074686520604d616e616765724f726967696e602e003020506172616d65746572733a00a0202a20607072696365603a2054686520636f7374206f6620612073696e676c65207469636b65742e3d01202a20606c656e677468603a20486f77206c6f6e6720746865206c6f74746572792073686f756c642072756e20666f72207374617274696e67206174207468652063757272656e7420626c6f636b2e4901202a206064656c6179603a20486f77206c6f6e6720616674657220746865206c6f747465727920656e642077652073686f756c642077616974206265666f7265207069636b696e6720612077696e6e65722ee4202a2060726570656174603a20496620746865206c6f74746572792073686f756c6420726570656174207768656e20636f6d706c657465642e2c73746f705f726570656174001001012049662061206c6f747465727920697320726570656174696e672c20796f752063616e20757365207468697320746f2073746f7020746865207265706561742ec020546865206c6f74746572792077696c6c20636f6e74696e756520746f2072756e20746f20636f6d706c6574696f6e2e00d820546869732065787472696e736963206d7573742062652063616c6c65642062792074686520604d616e616765724f726967696e602e0110384c6f7474657279537461727465640004702041206c6f747465727920686173206265656e2073746172746564213043616c6c73557064617465640004882041206e657720736574206f662063616c6c732068617665206265656e20736574211857696e6e657208244163636f756e7449641c42616c616e6365046820412077696e6e657220686173206265656e2063686f73656e21305469636b6574426f7567687408244163636f756e7449642443616c6c496e64657804682041207469636b657420686173206265656e20626f7567687421082050616c6c657449642050616c6c657449642070792f6c6f74746f00204d617843616c6c730c753332100a0000000020204f766572666c6f77046820416e206f766572666c6f7720686173206f636375727265642e344e6f74436f6e66696775726564048c2041206c6f747465727920686173206e6f74206265656e20636f6e666967757265642e28496e50726f677265737304882041206c6f747465727920697320616c726561647920696e2070726f67726573732e30416c7265616479456e64656404742041206c6f74746572792068617320616c726561647920656e6465642e2c496e76616c696443616c6c04ac205468652063616c6c206973206e6f742076616c696420666f7220616e206f70656e206c6f74746572792e50416c726561647950617274696369706174696e6704f420596f752061726520616c72656164792070617274696369706174696e6720696e20746865206c6f7474657279207769746820746869732063616c6c2e30546f6f4d616e7943616c6c73049420546f6f206d616e792063616c6c7320666f7220612073696e676c65206c6f74746572792e38456e636f64696e674661696c6564045c204661696c656420746f20656e636f64652063616c6c73241047696c74011047696c74102c5175657565546f74616c730100605665633c287533322c2042616c616e63654f663c543e293e04001461012054686520746f74616c73206f66206974656d7320616e642062616c616e6365732077697468696e20656163682071756575652e2053617665732061206c6f74206f662073746f7261676520726561647320696e20746865802063617365206f66207370617273656c79207061636b6564207175657565732e006d012054686520766563746f7220697320696e6465786564206279206475726174696f6e20696e2060506572696f6460732c206f6666736574206279206f6e652c20736f20696e666f726d6174696f6e206f6e20746865207175657565d42077686f7365206475726174696f6e206973206f6e652060506572696f646020776f756c642062652073746f72616765206030602e185175657565730101020c753332a05665633c47696c744269643c42616c616e63654f663c543e2c20543a3a4163636f756e7449643e3e0004000439012054686520717565756573206f66206269647320726561647920746f206265636f6d652067696c74732e20496e6465786564206279206475726174696f6e2028696e2060506572696f646073292e2c416374697665546f74616c01007841637469766547696c7473546f74616c3c42616c616e63654f663c543e3e9000000000000000000000000000000000000000000000000000000000000000000000000004d020496e666f726d6174696f6e2072656c6174696e6720746f207468652067696c74732063757272656e746c79206163746976652e184163746976650001022c416374697665496e646578a50141637469766547696c743c42616c616e63654f663c543e2c3c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a4163636f756e7449642c3c0a54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a426c6f636b4e756d6265723e000400042101205468652063757272656e746c79206163746976652067696c74732c20696e6465786564206163636f7264696e6720746f20746865206f72646572206f66206372656174696f6e2e011024706c6163655f6269640818616d6f756e7454436f6d706163743c42616c616e63654f663c543e3e206475726174696f6e0c753332349420506c61636520612062696420666f7220612067696c7420746f206265206973737565642e004101204f726967696e206d757374206265205369676e65642c20616e64206163636f756e74206d7573742068617665206174206c656173742060616d6f756e746020696e20667265652062616c616e63652e003d01202d2060616d6f756e74603a2054686520616d6f756e74206f6620746865206269643b2074686573652066756e64732077696c6c2062652072657365727665642e20496620746865206269642069734101207375636365737366756c6c7920656c65766174656420696e746f20616e206973737565642067696c742c207468656e2074686573652066756e64732077696c6c20636f6e74696e756520746f206265fc20726573657276656420756e74696c207468652067696c7420657870697265732e204d757374206265206174206c6561737420604d696e467265657a65602e5901202d20606475726174696f6e603a20546865206e756d626572206f6620706572696f647320666f72207768696368207468652066756e64732077696c6c206265206c6f636b6564206966207468652067696c742069735d01206973737565642e2049742077696c6c20657870697265206f6e6c79206166746572207468697320706572696f642068617320656c61707365642061667465722074686520706f696e74206f662069737375616e63652ed8204d7573742062652067726561746572207468616e203120616e64206e6f206d6f7265207468616e20605175657565436f756e74602e003820436f6d706c657869746965733ab0202d20605175657565735b6475726174696f6e5d2e6c656e28296020286a7573742074616b65206d6178292e2c726574726163745f6269640818616d6f756e7454436f6d706163743c42616c616e63654f663c543e3e206475726174696f6e0c7533321c84205265747261637420612070726576696f75736c7920706c61636564206269642e006101204f726967696e206d757374206265205369676e65642c20616e6420746865206163636f756e742073686f756c6420686176652070726576696f75736c79206973737565642061207374696c6c2d6163746976652062696470206f662060616d6f756e746020666f7220606475726174696f6e602e00b0202d2060616d6f756e74603a2054686520616d6f756e74206f66207468652070726576696f7573206269642ec0202d20606475726174696f6e603a20546865206475726174696f6e206f66207468652070726576696f7573206269642e287365745f746172676574041874617267657450436f6d706163743c5065727175696e74696c6c3e189420536574207461726765742070726f706f7274696f6e206f662067696c742d66756e64732e0078204f726967696e206d757374206265206041646d696e4f726967696e602e005d01202d2060746172676574603a20546865207461726765742070726f706f7274696f6e206f6620656666656374697665206973737565642066756e647320746861742073686f756c6420626520756e6465722067696c74734420617420616e79206f6e652074696d652e10746861770414696e64657850436f6d706163743c416374697665496e6465783e1c59012052656d6f766520616e206163746976652062757420657870697265642067696c742e2052657365727665642066756e647320756e6465722067696c742061726520667265656420616e642062616c616e63652069735d012061646a757374656420746f20656e737572652074686174207468652066756e64732067726f77206f7220736872696e6b20746f206d61696e7461696e20746865206571756976616c656e742070726f706f7274696f6e84206f662065666665637469766520746f74616c206973737565642066756e64732e006101204f726967696e206d757374206265205369676e656420616e6420746865206163636f756e74206d75737420626520746865206f776e6572206f66207468652067696c74206f662074686520676976656e20696e6465782e00bc202d2060696e646578603a2054686520696e646578206f66207468652067696c7420746f206265207468617765642e011024426964506c616365640c244163636f756e7449643042616c616e63654f663c543e0c753332087c20412062696420776173207375636365737366756c6c7920706c616365642e70205c5b2077686f2c20616d6f756e742c206475726174696f6e205c5d304269645265747261637465640c244163636f756e7449643042616c616e63654f663c543e0c75333208090120412062696420776173207375636365737366756c6c792072656d6f76656420286265666f7265206265696e6720616363657074656420617320612067696c74292e70205c5b2077686f2c20616d6f756e742c206475726174696f6e205c5d2847696c74497373756564102c416374697665496e64657838543a3a426c6f636b4e756d626572244163636f756e7449643042616c616e63654f663c543e0831012041206269642077617320616363657074656420617320612067696c742e205468652062616c616e6365206d6179206e6f742062652072656c656173656420756e74696c206578706972792e84205c5b20696e6465782c206578706972792c2077686f2c20616d6f756e74205c5d2847696c74546861776564102c416374697665496e646578244163636f756e7449643042616c616e63654f663c543e3042616c616e63654f663c543e088420416e20657870697265642067696c7420686173206265656e207468617765642ed4205c5b20696e6465782c2077686f2c206f726967696e616c5f616d6f756e742c206164646974696f6e616c5f616d6f756e74205c5d1c285175657565436f756e740c753332102c010000085d01204e756d626572206f66206475726174696f6e2071756575657320696e20746f74616c2e2054686973207365747320746865206d6178696d756d206475726174696f6e20737570706f727465642c2077686963682069738c20746869732076616c7565206d756c7469706c6965642062792060506572696f64602e2c4d617851756575654c656e0c75333210e803000004f0204d6178696d756d206e756d626572206f66206974656d732074686174206d617920626520696e2065616368206475726174696f6e2071756575652e304669666f51756575654c656e0c75333210f40100000c090120506f7274696f6e206f662074686520717565756520776869636820697320667265652066726f6d206f72646572696e6720616e64206a7573742061204649464f2e009c204d757374206265206e6f2067726561746572207468616e20604d617851756575654c656e602e18506572696f6438543a3a426c6f636b4e756d62657210002f0d0008410120546865206261736520706572696f6420666f7220746865206475726174696f6e207175657565732e20546869732069732074686520636f6d6d6f6e206d756c7469706c65206163726f737320616c6ccc20737570706f7274656420667265657a696e67206475726174696f6e7320746861742063616e206265206269642075706f6e2e244d696e467265657a653042616c616e63654f663c543e400000c16ff2862300000000000000000018550120546865206d696e696d756d20616d6f756e74206f662066756e64732074686174206d6179206265206f66666572656420746f20667265657a6520666f7220612067696c742e204e6f746520746861742074686973510120646f6573206e6f742061637475616c6c79206c696d69742074686520616d6f756e74207768696368206d61792062652066726f7a656e20696e20612067696c742073696e63652067696c7473206d617920626519012073706c697420757020696e206f7264657220746f207361746973667920746865206465736972656420616d6f756e74206f662066756e647320756e6465722067696c74732e0065012049742073686f756c64206265206174206c656173742062696720656e6f75676820746f20656e737572652074686174207468657265206973206e6f20706f737369626c652073746f72616765207370616d2061747461636b64206f722071756575652d66696c6c696e672061747461636b2e30496e74616b65506572696f6438543a3a426c6f636b4e756d626572100a00000014590120546865206e756d626572206f6620626c6f636b73206265747765656e20636f6e736563757469766520617474656d70747320746f206973737565206d6f72652067696c747320696e20616e206566666f727420746f9c2067657420746f207468652074617267657420616d6f756e7420746f2062652066726f7a656e2e005d012041206c61726765722076616c756520726573756c747320696e2066657765722073746f726167652068697473206561636820626c6f636b2c20627574206120736c6f77657220706572696f6420746f2067657420746f3020746865207461726765742e344d6178496e74616b65426964730c753332100a0000000c550120546865206d6178696d756d20616d6f756e74206f66206269647320746861742063616e206265207475726e656420696e746f206973737565642067696c7473206561636820626c6f636b2e2041206c617267657261012076616c75652068657265206d65616e73206c657373206f662074686520626c6f636b20617661696c61626c6520666f72207472616e73616374696f6e732073686f756c64207468657265206265206120676c7574206f66b4206269647320746f206d616b6520696e746f2067696c747320746f20726561636820746865207461726765742e20404475726174696f6e546f6f536d616c6c04a820546865206475726174696f6e206f662074686520626964206973206c657373207468616e206f6e652e384475726174696f6e546f6f42696704f820546865206475726174696f6e20697320746865206269642069732067726561746572207468616e20746865206e756d626572206f66207175657565732e38416d6f756e74546f6f536d616c6c04e02054686520616d6f756e74206f662074686520626964206973206c657373207468616e20746865206d696e696d756d20616c6c6f7765642e24426964546f6f4c6f770865012054686520717565756520666f7220746865206269642773206475726174696f6e2069732066756c6c20616e642074686520616d6f756e742062696420697320746f6f206c6f7720746f2067657420696e207468726f7567686c207265706c6163696e6720616e206578697374696e67206269642e1c556e6b6e6f776e045c2047696c7420696e64657820697320756e6b6e6f776e2e204e6f744f776e6572046c204e6f7420746865206f776e6572206f66207468652067696c742e284e6f744578706972656404742047696c74206e6f74207965742061742065787069727920646174652e204e6f74466f756e6404ac2054686520676976656e2062696420666f722072657472616374696f6e206973206e6f7420666f756e642e25041c40436865636b5370656356657273696f6e38436865636b547856657273696f6e30436865636b47656e6573697338436865636b4d6f7274616c69747928436865636b4e6f6e63652c436865636b576569676874604368617267655472616e73616374696f6e5061796d656e74 \ No newline at end of file diff --git a/packages/polkadot/tests/meta/v12.json b/packages/polkadot/tests/meta/v12.json index c5ab1b48..05e5482e 100644 --- a/packages/polkadot/tests/meta/v12.json +++ b/packages/polkadot/tests/meta/v12.json @@ -1,7 +1,7 @@ { "magicNumber": 1635018093, "metadata": { - "V12": { + "v12": { "modules": [ { "name": "System", @@ -12,15 +12,15 @@ "name": "Account", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "AccountInfo", "linked": false } }, - "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "docs": [ " The full account information for a particular account ID." ] }, @@ -28,10 +28,10 @@ "name": "ExtrinsicCount", "modifier": "Optional", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total extrinsics count for the current block." ] }, @@ -39,10 +39,10 @@ "name": "BlockWeight", "modifier": "Default", "type": { - "Plain": "ConsumedWeight" + "plain": "ConsumedWeight" }, "fallback": "0x000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The current weight for the block." ] }, @@ -50,10 +50,10 @@ "name": "AllExtrinsicsLen", "modifier": "Optional", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total length (in bytes) for all extrinsics put together, for the current block." ] }, @@ -61,7 +61,7 @@ "name": "BlockHash", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "BlockNumber", "value": "Hash", @@ -69,7 +69,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Map of block numbers to block hashes." ] }, @@ -77,7 +77,7 @@ "name": "ExtrinsicData", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "u32", "value": "Bytes", @@ -85,7 +85,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Extrinsics data for the current block (maps an extrinsic's index to its data)." ] }, @@ -93,10 +93,10 @@ "name": "Number", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The current block number being processed. Set by `execute_block`." ] }, @@ -104,32 +104,21 @@ "name": "ParentHash", "modifier": "Default", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Hash of the previous block." ] }, - { - "name": "ExtrinsicsRoot", - "modifier": "Default", - "type": { - "Plain": "Hash" - }, - "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ - " Extrinsics root of the current block, also part of the block header." - ] - }, { "name": "Digest", "modifier": "Default", "type": { - "Plain": "DigestOf" + "plain": "DigestOf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Digest of the current block, also part of the block header." ] }, @@ -137,10 +126,10 @@ "name": "Events", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Events deposited for the current block." ] }, @@ -148,10 +137,10 @@ "name": "EventCount", "modifier": "Default", "type": { - "Plain": "EventIndex" + "plain": "EventIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of events in the `Events` list." ] }, @@ -159,7 +148,7 @@ "name": "EventTopics", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "Hash", "value": "Vec<(BlockNumber,EventIndex)>", @@ -167,7 +156,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Mapping between a topic (represented by T::Hash) and a vector of indexes", " of events in the `>` list.", "", @@ -184,10 +173,10 @@ "name": "LastRuntimeUpgrade", "modifier": "Optional", "type": { - "Plain": "LastRuntimeUpgradeInfo" + "plain": "LastRuntimeUpgradeInfo" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened." ] }, @@ -195,21 +184,33 @@ "name": "UpgradedToU32RefCount", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not." ] }, + { + "name": "UpgradedToTripleRefCount", + "modifier": "Default", + "type": { + "plain": "bool" + }, + "fallback": "0x00", + "docs": [ + " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False", + " (default) if not." + ] + }, { "name": "ExecutionPhase", "modifier": "Optional", "type": { - "Plain": "Phase" + "plain": "Phase" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The execution phase of the block." ] } @@ -224,7 +225,7 @@ "type": "Perbill" } ], - "documentation": [ + "docs": [ " A dispatch that will fill the block weight up to the given ratio." ] }, @@ -236,13 +237,11 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Make some on-chain remark.", "", " # ", " - `O(1)`", - " - Base Weight: 0.665 µs, independent of remark length.", - " - No DB operations.", " # " ] }, @@ -254,7 +253,7 @@ "type": "u64" } ], - "documentation": [ + "docs": [ " Set the number of pages in the WebAssembly environment's heap.", "", " # ", @@ -273,7 +272,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set the new runtime code.", "", " # ", @@ -294,7 +293,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set the new runtime code without doing any checks of the given `code`.", "", " # ", @@ -313,7 +312,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Set the new changes trie configuration.", "", " # ", @@ -334,7 +333,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set some items of storage.", "", " # ", @@ -353,7 +352,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Kill some items from storage.", "", " # ", @@ -376,7 +375,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Kill all storage items with a key that starts with the given prefix.", "", " **NOTE:** We rely on the Root origin to provide us the number of subkeys under", @@ -391,18 +390,19 @@ ] }, { - "name": "suicide", - "args": [], - "documentation": [ - " Kill the sending account, assuming there are no references outstanding and the composite", - " data is equal to its default value.", + "name": "remark_with_event", + "args": [ + { + "name": "remark", + "type": "Bytes" + } + ], + "docs": [ + " Make some on-chain remark and emit event.", "", " # ", - " - `O(1)`", - " - 1 storage read and deletion.", - " --------------------", - " Base Weight: 8.626 µs", - " No DB Read or Write operations because caller is already in overlay", + " - `O(b)` where b is the length of the remark.", + " - 1 event.", " # " ] } @@ -413,7 +413,7 @@ "args": [ "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic completed successfully. \\[info\\]" ] }, @@ -423,14 +423,14 @@ "DispatchError", "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic failed. \\[error, info\\]" ] }, { "name": "CodeUpdated", "args": [], - "documentation": [ + "docs": [ " `:code` was updated." ] }, @@ -439,7 +439,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A new \\[account\\] was created." ] }, @@ -448,55 +448,93 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An \\[account\\] was reaped." ] + }, + { + "name": "Remarked", + "args": [ + "AccountId", + "Hash" + ], + "docs": [ + " On on-chain remark happened. \\[origin, remark_hash\\]" + ] } ], "constants": [ + { + "name": "BlockWeights", + "type": "BlockWeights", + "value": "0x00f2052a0100000000204aa9d1010000405973070000000001c06e96a62e010000010098f73e5d010000010000000000000000405973070000000001c0f6e810a30100000100204aa9d1010000010088526a740000004059730700000000000000", + "docs": [ + " Block & extrinsics weights: base values and limits." + ] + }, + { + "name": "BlockLength", + "type": "BlockLength", + "value": "0x00003c000000500000005000", + "docs": [ + " The maximum length of a block (in bytes)." + ] + }, { "name": "BlockHashCount", "type": "BlockNumber", "value": "0x60090000", - "documentation": [ - " The maximum number of blocks to allow in mortal eras." + "docs": [ + " Maximum number of block number to block hash mappings to keep (oldest pruned first)." ] }, { "name": "DbWeight", "type": "RuntimeDbWeight", "value": "0x40787d010000000000e1f50500000000", - "documentation": [ + "docs": [ " The weight of runtime database operations the runtime can invoke." ] }, { - "name": "BlockWeights", - "type": "BlockWeights", - "value": "0x00f2052a0100000000204aa9d1010000405973070000000001c06e96a62e010000010098f73e5d010000010000000000000000405973070000000001c0f6e810a30100000100204aa9d1010000010088526a740000004059730700000000000000", - "documentation": [ - " The weight configuration (limits & base values) for each class of extrinsics and block." + "name": "Version", + "type": "RuntimeVersion", + "value": "0x106e6f6465387375627374726174652d6e6f64650a000000090100000100000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a04000000d2bc9897eed08f1502000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000", + "docs": [ + " Get the chain's current version." + ] + }, + { + "name": "SS58Prefix", + "type": "u8", + "value": "0x2a", + "docs": [ + " The designated SS85 prefix of this chain.", + "", + " This replaces the \"ss58Format\" property declared in the chain spec. Reason is", + " that the runtime should know about the prefix in order to make use of it as", + " an identifier of the chain." ] } ], "errors": [ { "name": "InvalidSpecName", - "documentation": [ + "docs": [ " The name of specification does not match between the current runtime", " and the new runtime." ] }, { "name": "SpecVersionNeedsToIncrease", - "documentation": [ + "docs": [ " The specification version is not allowed to decrease between the current runtime", " and the new runtime." ] }, { "name": "FailedToExtractRuntimeVersion", - "documentation": [ + "docs": [ " Failed to extract the runtime version from the new runtime.", "", " Either calling `Core_version` or decoding `RuntimeVersion` failed." @@ -504,13 +542,13 @@ }, { "name": "NonDefaultComposite", - "documentation": [ + "docs": [ " Suicide called when the account has non-default composite data." ] }, { "name": "NonZeroRefCount", - "documentation": [ + "docs": [ " There is a non-zero reference count preventing the account from being purged." ] } @@ -529,7 +567,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Send a batch of dispatch calls.", "", " May be called from any origin.", @@ -562,7 +600,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Send a call through an indexed pseudonym of the sender.", "", " Filter from origin are passed along. The call will be dispatched with an origin which", @@ -586,7 +624,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Send a batch of dispatch calls and atomically execute them.", " The whole transaction will rollback and fail if any of the calls failed.", "", @@ -610,7 +648,7 @@ "u32", "DispatchError" ], - "documentation": [ + "docs": [ " Batch of dispatches did not complete fully. Index of first failing dispatch given, as", " well as the error. \\[index, error\\]" ] @@ -618,7 +656,7 @@ { "name": "BatchCompleted", "args": [], - "documentation": [ + "docs": [ " Batch of dispatches completed fully with no error." ] } @@ -636,10 +674,10 @@ "name": "EpochIndex", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current epoch index." ] }, @@ -647,10 +685,10 @@ "name": "Authorities", "modifier": "Default", "type": { - "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + "plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Current epoch authorities." ] }, @@ -658,10 +696,10 @@ "name": "GenesisSlot", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "Slot" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The slot at which the first epoch actually started. This is 0", " until the first block of the chain." ] @@ -670,10 +708,10 @@ "name": "CurrentSlot", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "Slot" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current slot number." ] }, @@ -681,10 +719,10 @@ "name": "Randomness", "modifier": "Default", "type": { - "Plain": "Randomness" + "plain": "Randomness" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The epoch randomness for the *current* epoch.", "", " # Security", @@ -698,35 +736,46 @@ ] }, { - "name": "NextEpochConfig", + "name": "PendingEpochConfigChange", "modifier": "Optional", "type": { - "Plain": "NextConfigDescriptor" + "plain": "NextConfigDescriptor" }, "fallback": "0x00", - "documentation": [ - " Next epoch configuration, if changed." + "docs": [ + " Pending epoch configuration change that will be applied when the next epoch is enacted." ] }, { "name": "NextRandomness", "modifier": "Default", "type": { - "Plain": "Randomness" + "plain": "Randomness" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Next epoch randomness." ] }, + { + "name": "NextAuthorities", + "modifier": "Default", + "type": { + "plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + }, + "fallback": "0x00", + "docs": [ + " Next epoch authorities." + ] + }, { "name": "SegmentIndex", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Randomness under construction.", "", " We make a tradeoff between storage accesses and list length.", @@ -742,7 +791,7 @@ "name": "UnderConstruction", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "u32", "value": "Vec", @@ -750,7 +799,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay." ] }, @@ -758,10 +807,10 @@ "name": "Initialized", "modifier": "Optional", "type": { - "Plain": "MaybeRandomness" + "plain": "MaybeRandomness" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Temporary value (cleared at block finalization) which is `Some`", " if per-block initialization has already been called for current block." ] @@ -770,29 +819,67 @@ "name": "AuthorVrfRandomness", "modifier": "Default", "type": { - "Plain": "MaybeRandomness" + "plain": "MaybeRandomness" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Temporary value (cleared at block finalization) that includes the VRF output generated", " at this block. This field should always be populated during block processing unless", " secondary plain slots are enabled (which don't contain a VRF output)." ] }, + { + "name": "EpochStart", + "modifier": "Default", + "type": { + "plain": "(BlockNumber,BlockNumber)" + }, + "fallback": "0x0000000000000000", + "docs": [ + " The block numbers when the last and current epoch have started, respectively `N-1` and", + " `N`.", + " NOTE: We track this is in order to annotate the block number when a given pool of", + " entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in", + " slots, which may be skipped, the block numbers may not line up with the slot numbers." + ] + }, { "name": "Lateness", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " How late the current block is compared to its parent.", "", " This entry is populated as part of block execution and is cleaned up", " on block finalization. Querying this storage entry outside of block", " execution context should always yield zero." ] + }, + { + "name": "EpochConfig", + "modifier": "Optional", + "type": { + "plain": "BabeEpochConfiguration" + }, + "fallback": "0x00", + "docs": [ + " The configuration for the current epoch. Should never be `None` as it is initialized in genesis." + ] + }, + { + "name": "NextEpochConfig", + "modifier": "Optional", + "type": { + "plain": "BabeEpochConfiguration" + }, + "fallback": "0x00", + "docs": [ + " The configuration for the next epoch, `None` if the config will not change", + " (you can fallback to `EpochConfig` instead in that case)." + ] } ] }, @@ -809,7 +896,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report authority equivocation/misbehavior. This method will verify", " the equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence will", @@ -828,7 +915,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report authority equivocation/misbehavior. This method will verify", " the equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence will", @@ -838,6 +925,21 @@ " if the block author is defined it will be defined as the equivocation", " reporter." ] + }, + { + "name": "plan_config_change", + "args": [ + { + "name": "config", + "type": "NextConfigDescriptor" + } + ], + "docs": [ + " Plan an epoch config change. The epoch config change is recorded and will be enacted on", + " the next call to `enact_epoch_change`. The config will be activated one epoch after.", + " Multiple calls to this method will replace any existing planned config change that had", + " not been enacted yet." + ] } ], "events": null, @@ -846,16 +948,17 @@ "name": "EpochDuration", "type": "u64", "value": "0xc800000000000000", - "documentation": [ - " The number of **slots** that an epoch takes. We couple sessions to", - " epochs, i.e. we start a new session once the new epoch begins." + "docs": [ + " The amount of time, in slots, that each epoch should last.", + " NOTE: Currently it is not possible to change the epoch duration after", + " the chain has started. Attempting to do so will brick block production." ] }, { "name": "ExpectedBlockTime", "type": "Moment", "value": "0xb80b000000000000", - "documentation": [ + "docs": [ " The expected average block time at which BABE should be creating", " blocks. Since BABE is probabilistic it is not trivial to figure out", " what the expected average block time should be based on the slot", @@ -864,7 +967,26 @@ ] } ], - "errors": [], + "errors": [ + { + "name": "InvalidEquivocationProof", + "docs": [ + " An equivocation proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "InvalidKeyOwnershipProof", + "docs": [ + " A key ownership proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "DuplicateOffenceReport", + "docs": [ + " A given equivocation report is valid but already previously reported." + ] + } + ], "index": 2 }, { @@ -876,10 +998,10 @@ "name": "Now", "modifier": "Default", "type": { - "Plain": "Moment" + "plain": "Moment" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current time for the current block." ] }, @@ -887,10 +1009,10 @@ "name": "DidUpdate", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Did the timestamp get updated in this block?" ] } @@ -905,7 +1027,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the current time.", "", " This call should be invoked exactly once per block. It will panic at the finalization", @@ -930,7 +1052,7 @@ "name": "MinimumPeriod", "type": "Moment", "value": "0xdc05000000000000", - "documentation": [ + "docs": [ " The minimum period between blocks. Beware that this is different to the *expected* period", " that the block production apparatus provides. Your chosen consensus system will generally", " work with this to determine a sensible block time. e.g. For Aura, it will be double this", @@ -950,10 +1072,10 @@ "name": "Uncles", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Uncles" ] }, @@ -961,10 +1083,10 @@ "name": "Author", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Author of current block." ] }, @@ -972,10 +1094,10 @@ "name": "DidSetUncles", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Whether uncles were already set in this block." ] } @@ -990,7 +1112,7 @@ "type": "Vec
" } ], - "documentation": [ + "docs": [ " Provide a set of uncles." ] } @@ -1000,43 +1122,43 @@ "errors": [ { "name": "InvalidUncleParent", - "documentation": [ + "docs": [ " The uncle parent not in the chain." ] }, { "name": "UnclesAlreadySet", - "documentation": [ + "docs": [ " Uncles already set in the block." ] }, { "name": "TooManyUncles", - "documentation": [ + "docs": [ " Too many uncles." ] }, { "name": "GenesisUncle", - "documentation": [ + "docs": [ " The uncle is genesis." ] }, { "name": "TooHighUncle", - "documentation": [ + "docs": [ " The uncle is too high in chain." ] }, { "name": "UncleAlreadyIncluded", - "documentation": [ + "docs": [ " The uncle is already included." ] }, { "name": "OldUncle", - "documentation": [ + "docs": [ " The uncle isn't recent enough to be included." ] } @@ -1052,7 +1174,7 @@ "name": "Accounts", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountIndex", "value": "(AccountId,BalanceOf,bool)", @@ -1060,7 +1182,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The lookup from index to account." ] } @@ -1075,7 +1197,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Assign an previously unassigned index.", "", " Payment: `Deposit` is reserved from the sender account.", @@ -1108,7 +1230,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Assign an index already owned by the sender to another account. The balance reservation", " is effectively transferred to the new account.", "", @@ -1139,7 +1261,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Free up an index owned by the sender.", "", " Payment: Any previous deposit placed for the index is unreserved in the sender account.", @@ -1176,7 +1298,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Force an index to an account. This doesn't require a deposit. If the index is already", " held, then any deposit is reimbursed to its current owner.", "", @@ -1208,7 +1330,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Freeze an index so it will always point to the sender account. This consumes the deposit.", "", " The dispatch origin for this call must be _Signed_ and the signing account must have a", @@ -1236,7 +1358,7 @@ "AccountId", "AccountIndex" ], - "documentation": [ + "docs": [ " A account index was assigned. \\[index, who\\]" ] }, @@ -1245,7 +1367,7 @@ "args": [ "AccountIndex" ], - "documentation": [ + "docs": [ " A account index has been freed up (unassigned). \\[index\\]" ] }, @@ -1255,7 +1377,7 @@ "AccountIndex", "AccountId" ], - "documentation": [ + "docs": [ " A account index has been frozen to its current account ID. \\[index, who\\]" ] } @@ -1265,12 +1387,43 @@ "name": "Deposit", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The deposit needed for reserving an index." ] } ], - "errors": [], + "errors": [ + { + "name": "NotAssigned", + "docs": [ + " The index was not already assigned." + ] + }, + { + "name": "NotOwner", + "docs": [ + " The index is assigned to another account." + ] + }, + { + "name": "InUse", + "docs": [ + " The index was not available." + ] + }, + { + "name": "NotTransfer", + "docs": [ + " The source and destination accounts are identical." + ] + }, + { + "name": "Permanent", + "docs": [ + " The index is permanent and may not be freed/changed." + ] + } + ], "index": 5 }, { @@ -1282,10 +1435,10 @@ "name": "TotalIssuance", "modifier": "Default", "type": { - "Plain": "Balance" + "plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The total units issued in the system." ] }, @@ -1293,7 +1446,7 @@ "name": "Account", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "AccountData", @@ -1301,17 +1454,17 @@ } }, "fallback": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The balance of an account.", "", - " NOTE: This is only used in the case that this module is used to store balances." + " NOTE: This is only used in the case that this pallet is used to store balances." ] }, { "name": "Locks", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "Vec", @@ -1319,7 +1472,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any liquidity locks on some account balances.", " NOTE: Should only be accessed when setting, changing and freeing a lock." ] @@ -1328,10 +1481,10 @@ "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "Releases" + "plain": "Releases" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage version of the pallet.", "", " This is set to v2.0.0 for new networks." @@ -1352,7 +1505,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Transfer some liquid free balance to another account.", "", " `transfer` will set the `FreeBalance` of the sender and receiver.", @@ -1398,7 +1551,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the balances of a given account.", "", " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", @@ -1435,7 +1588,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Exactly as `transfer`, except the origin must be root and the source account may be", " specified.", " # ", @@ -1456,13 +1609,13 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Same as the [`transfer`] call, but with a check that the transfer will not kill the", " origin account.", "", " 99% of the time you want [`transfer`] instead.", "", - " [`transfer`]: struct.Module.html#method.transfer", + " [`transfer`]: struct.Pallet.html#method.transfer", " # ", " - Cheaper than transfer because account cannot be killed.", " - Base Weight: 51.4 µs", @@ -1478,7 +1631,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account was created with some free balance. \\[account, free_balance\\]" ] }, @@ -1488,7 +1641,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account was removed whose balance was non-zero but below ExistentialDeposit,", " resulting in an outright loss. \\[account, balance\\]" ] @@ -1500,7 +1653,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Transfer succeeded. \\[from, to, value\\]" ] }, @@ -1511,7 +1664,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " A balance was set by root. \\[who, free, reserved\\]" ] }, @@ -1521,7 +1674,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some amount was deposited (e.g. for transaction fees). \\[who, deposit\\]" ] }, @@ -1531,7 +1684,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some balance was reserved (moved from free to reserved). \\[who, value\\]" ] }, @@ -1541,7 +1694,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some balance was unreserved (moved from reserved to free). \\[who, value\\]" ] }, @@ -1553,7 +1706,7 @@ "Balance", "BalanceStatus" ], - "documentation": [ + "docs": [ " Some balance was moved from the reserve of the first account to the second account.", " Final argument indicates the destination balance type.", " \\[from, to, balance, destination_status\\]" @@ -1565,7 +1718,7 @@ "name": "ExistentialDeposit", "type": "Balance", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The minimum amount required to keep an account open." ] } @@ -1573,49 +1726,49 @@ "errors": [ { "name": "VestingBalance", - "documentation": [ + "docs": [ " Vesting balance too high to send value" ] }, { "name": "LiquidityRestrictions", - "documentation": [ + "docs": [ " Account liquidity restrictions prevent withdrawal" ] }, { "name": "Overflow", - "documentation": [ + "docs": [ " Got an overflow after adding" ] }, { "name": "InsufficientBalance", - "documentation": [ + "docs": [ " Balance too low to send value" ] }, { "name": "ExistentialDeposit", - "documentation": [ + "docs": [ " Value too low to create account due to existential deposit" ] }, { "name": "KeepAlive", - "documentation": [ + "docs": [ " Transfer/payment would kill account" ] }, { "name": "ExistingVestingSchedule", - "documentation": [ + "docs": [ " A vesting schedule already exists for this account" ] }, { "name": "DeadAccount", - "documentation": [ + "docs": [ " Beneficiary account must pre-exist" ] } @@ -1631,19 +1784,19 @@ "name": "NextFeeMultiplier", "modifier": "Default", "type": { - "Plain": "Multiplier" + "plain": "Multiplier" }, "fallback": "0x000064a7b3b6e00d0000000000000000", - "documentation": [] + "docs": [] }, { "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "Releases" + "plain": "Releases" }, "fallback": "0x00", - "documentation": [] + "docs": [] } ] }, @@ -1654,7 +1807,7 @@ "name": "TransactionByteFee", "type": "BalanceOf", "value": "0x00e40b54020000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the per-byte portion." ] }, @@ -1662,7 +1815,7 @@ "name": "WeightToFee", "type": "Vec", "value": "0x0401000000000000000000000000000000000000000001", - "documentation": [ + "docs": [ " The polynomial that is applied in order to derive fee from weight." ] } @@ -1670,6 +1823,230 @@ "errors": [], "index": 7 }, + { + "name": "ElectionProviderMultiPhase", + "storage": { + "prefix": "ElectionProviderMultiPhase", + "items": [ + { + "name": "Round", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x01000000", + "docs": [ + " Internal counter for the number of rounds.", + "", + " This is useful for de-duplication of transactions submitted to the pool, and general", + " diagnostics of the pallet.", + "", + " This is merely incremented once per every time that an upstream `elect` is called." + ] + }, + { + "name": "CurrentPhase", + "modifier": "Default", + "type": { + "plain": "ElectionPhase" + }, + "fallback": "0x00", + "docs": [ + " Current phase." + ] + }, + { + "name": "QueuedSolution", + "modifier": "Optional", + "type": { + "plain": "ReadySolution" + }, + "fallback": "0x00", + "docs": [ + " Current best solution, signed or unsigned, queued to be returned upon `elect`." + ] + }, + { + "name": "Snapshot", + "modifier": "Optional", + "type": { + "plain": "RoundSnapshot" + }, + "fallback": "0x00", + "docs": [ + " Snapshot data of the round.", + "", + " This is created at the beginning of the signed phase and cleared upon calling `elect`." + ] + }, + { + "name": "DesiredTargets", + "modifier": "Optional", + "type": { + "plain": "u32" + }, + "fallback": "0x00", + "docs": [ + " Desired number of targets to elect for this round.", + "", + " Only exists when [`Snapshot`] is present." + ] + }, + { + "name": "SnapshotMetadata", + "modifier": "Optional", + "type": { + "plain": "SolutionOrSnapshotSize" + }, + "fallback": "0x00", + "docs": [ + " The metadata of the [`RoundSnapshot`]", + "", + " Only exists when [`Snapshot`] is present." + ] + } + ] + }, + "calls": [ + { + "name": "submit_unsigned", + "args": [ + { + "name": "solution", + "type": "RawSolution" + }, + { + "name": "witness", + "type": "SolutionOrSnapshotSize" + } + ], + "docs": [ + " Submit a solution for the unsigned phase.", + "", + " The dispatch origin fo this call must be __none__.", + "", + " This submission is checked on the fly. Moreover, this unsigned solution is only", + " validated when submitted to the pool from the **local** node. Effectively, this means", + " that only active validators can submit this transaction when authoring a block (similar", + " to an inherent).", + "", + " To prevent any incorrect solution (and thus wasted time/weight), this transaction will", + " panic if the solution submitted by the validator is invalid in any way, effectively", + " putting their authoring reward at risk.", + "", + " No deposit or reward is associated with this submission." + ] + } + ], + "events": [ + { + "name": "SolutionStored", + "args": [ + "ElectionCompute" + ], + "docs": [ + " A solution was stored with the given compute.", + "", + " If the solution is signed, this means that it hasn't yet been processed. If the", + " solution is unsigned, this means that it has also been processed." + ] + }, + { + "name": "ElectionFinalized", + "args": [ + "Option" + ], + "docs": [ + " The election has been finalized, with `Some` of the given computation, or else if the", + " election failed, `None`." + ] + }, + { + "name": "Rewarded", + "args": [ + "AccountId" + ], + "docs": [ + " An account has been rewarded for their signed submission being finalized." + ] + }, + { + "name": "Slashed", + "args": [ + "AccountId" + ], + "docs": [ + " An account has been slashed for submitting an invalid signed submission." + ] + }, + { + "name": "SignedPhaseStarted", + "args": [ + "u32" + ], + "docs": [ + " The signed phase of the given round has started." + ] + }, + { + "name": "UnsignedPhaseStarted", + "args": [ + "u32" + ], + "docs": [ + " The unsigned phase of the given round has started." + ] + } + ], + "constants": [ + { + "name": "UnsignedPhase", + "type": "BlockNumber", + "value": "0x32000000", + "docs": [ + " Duration of the unsigned phase." + ] + }, + { + "name": "SignedPhase", + "type": "BlockNumber", + "value": "0x32000000", + "docs": [ + " Duration of the signed phase." + ] + }, + { + "name": "SolutionImprovementThreshold", + "type": "Perbill", + "value": "0xa0860100", + "docs": [ + " The minimum amount of improvement to the solution score that defines a solution as", + " \"better\" (in any phase)." + ] + } + ], + "errors": [ + { + "name": "PreDispatchEarlySubmission", + "docs": [ + " Submission was too early." + ] + }, + { + "name": "PreDispatchWrongWinnerCount", + "docs": [ + " Wrong number of winners presented." + ] + }, + { + "name": "PreDispatchWeakSubmission", + "docs": [ + " Submission was too weak, score-wise." + ] + } + ], + "index": 8 + }, { "name": "Staking", "storage": { @@ -1679,10 +2056,10 @@ "name": "HistoryDepth", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x54000000", - "documentation": [ + "docs": [ " Number of eras to keep in history.", "", " Information is kept for eras in `[current_era - history_depth; current_era]`.", @@ -1696,10 +2073,10 @@ "name": "ValidatorCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The ideal number of staking participants." ] }, @@ -1707,10 +2084,10 @@ "name": "MinimumValidatorCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Minimum number of staking participants before emergency conditions are imposed." ] }, @@ -1718,10 +2095,10 @@ "name": "Invulnerables", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", " easy to initialize and the performance hit is minimal (we expect no more than four", " invulnerables) and restricted to testnets." @@ -1731,7 +2108,7 @@ "name": "Bonded", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "AccountId", @@ -1739,7 +2116,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all locked \"stash\" accounts to the controller account." ] }, @@ -1747,7 +2124,7 @@ "name": "Ledger", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "StakingLedger", @@ -1755,7 +2132,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." ] }, @@ -1763,7 +2140,7 @@ "name": "Payee", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "RewardDestination", @@ -1771,7 +2148,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Where the reward payment should be made. Keyed by stash." ] }, @@ -1779,15 +2156,15 @@ "name": "Validators", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "ValidatorPrefs", "linked": false } }, - "fallback": "0x00", - "documentation": [ + "fallback": "0x0000", + "docs": [ " The map from (wannabe) validator stash key to the preferences of that validator." ] }, @@ -1795,7 +2172,7 @@ "name": "Nominators", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "Nominations", @@ -1803,7 +2180,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The map from nominator stash key to the set of stash keys of all validators to nominate." ] }, @@ -1811,10 +2188,10 @@ "name": "CurrentEra", "modifier": "Optional", "type": { - "Plain": "EraIndex" + "plain": "EraIndex" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current era index.", "", " This is the latest planned era, depending on how the Session pallet queues the validator", @@ -1825,21 +2202,21 @@ "name": "ActiveEra", "modifier": "Optional", "type": { - "Plain": "ActiveEraInfo" + "plain": "ActiveEraInfo" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The active era information, it holds index and start.", "", - " The active era is the era currently rewarded.", - " Validator set of this era must be equal to `SessionInterface::validators`." + " The active era is the era being currently rewarded. Validator set of this era must be", + " equal to [`SessionInterface::validators`]." ] }, { "name": "ErasStartSessionIndex", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "SessionIndex", @@ -1847,15 +2224,18 @@ } }, "fallback": "0x00", - "documentation": [ - " The session index at which the era start for the last `HISTORY_DEPTH` eras." + "docs": [ + " The session index at which the era start for the last `HISTORY_DEPTH` eras.", + "", + " Note: This tracks the starting session (i.e. session index when era start being active)", + " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`." ] }, { "name": "ErasStakers", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -1864,7 +2244,7 @@ } }, "fallback": "0x000000", - "documentation": [ + "docs": [ " Exposure of validator at era.", "", " This is keyed first by the era index to allow bulk deletion and then the stash account.", @@ -1877,7 +2257,7 @@ "name": "ErasStakersClipped", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -1886,7 +2266,7 @@ } }, "fallback": "0x000000", - "documentation": [ + "docs": [ " Clipped Exposure of validator at era.", "", " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the", @@ -1904,7 +2284,7 @@ "name": "ErasValidatorPrefs", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -1912,8 +2292,8 @@ "key2Hasher": "Twox64Concat" } }, - "fallback": "0x00", - "documentation": [ + "fallback": "0x0000", + "docs": [ " Similar to `ErasStakers`, this holds the preferences of validators.", "", " This is keyed first by the era index to allow bulk deletion and then the stash account.", @@ -1925,7 +2305,7 @@ "name": "ErasValidatorReward", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "BalanceOf", @@ -1933,7 +2313,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The total validator era payout for the last `HISTORY_DEPTH` eras.", "", " Eras that haven't finished yet or has been removed doesn't have reward." @@ -1943,7 +2323,7 @@ "name": "ErasRewardPoints", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "EraRewardPoints", @@ -1951,7 +2331,7 @@ } }, "fallback": "0x0000000000", - "documentation": [ + "docs": [ " Rewards for the last `HISTORY_DEPTH` eras.", " If reward hasn't been set or has been removed then 0 reward is returned." ] @@ -1960,7 +2340,7 @@ "name": "ErasTotalStake", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "BalanceOf", @@ -1968,7 +2348,7 @@ } }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The total amount staked for the last `HISTORY_DEPTH` eras.", " If total hasn't been set or has been removed then 0 stake is returned." ] @@ -1977,10 +2357,10 @@ "name": "ForceEra", "modifier": "Default", "type": { - "Plain": "Forcing" + "plain": "Forcing" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Mode of era forcing." ] }, @@ -1988,10 +2368,10 @@ "name": "SlashRewardFraction", "modifier": "Default", "type": { - "Plain": "Perbill" + "plain": "Perbill" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The percentage of the slash that is distributed to reporters.", "", " The rest of the slashed value is handled by the `Slash`." @@ -2001,10 +2381,10 @@ "name": "CanceledSlashPayout", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The amount of currency given to reporters of a slash event which was", " canceled by extraordinary circumstances (e.g. governance)." ] @@ -2013,7 +2393,7 @@ "name": "UnappliedSlashes", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "EraIndex", "value": "Vec", @@ -2021,7 +2401,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All unapplied slashes that are queued for later." ] }, @@ -2029,10 +2409,10 @@ "name": "BondedEras", "modifier": "Default", "type": { - "Plain": "Vec<(EraIndex,SessionIndex)>" + "plain": "Vec<(EraIndex,SessionIndex)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from still-bonded eras to the first session index of that era.", "", " Must contains information for eras for the range:", @@ -2043,7 +2423,7 @@ "name": "ValidatorSlashInEra", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -2052,7 +2432,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on validators, mapped by era to the highest slash proportion", " and slash value of the era." ] @@ -2061,7 +2441,7 @@ "name": "NominatorSlashInEra", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "EraIndex", "key2": "AccountId", @@ -2070,7 +2450,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on nominators, mapped by era to the highest slash value of the era." ] }, @@ -2078,7 +2458,7 @@ "name": "SlashingSpans", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "SlashingSpans", @@ -2086,7 +2466,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Slashing spans for stash accounts." ] }, @@ -2094,7 +2474,7 @@ "name": "SpanSlash", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "(AccountId,SpanIndex)", "value": "SpanRecord", @@ -2102,7 +2482,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Records information about the maximum slash of a stash within a slashing span,", " as well as how much reward has been paid out." ] @@ -2111,97 +2491,38 @@ "name": "EarliestUnappliedSlash", "modifier": "Optional", "type": { - "Plain": "EraIndex" + "plain": "EraIndex" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The earliest era for which we have a pending, unapplied slash." ] }, { - "name": "SnapshotValidators", - "modifier": "Optional", - "type": { - "Plain": "Vec" - }, - "fallback": "0x00", - "documentation": [ - " Snapshot of validators at the beginning of the current election window. This should only", - " have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`." - ] - }, - { - "name": "SnapshotNominators", - "modifier": "Optional", - "type": { - "Plain": "Vec" - }, - "fallback": "0x00", - "documentation": [ - " Snapshot of nominators at the beginning of the current election window. This should only", - " have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`." - ] - }, - { - "name": "QueuedElected", - "modifier": "Optional", - "type": { - "Plain": "ElectionResult" - }, - "fallback": "0x00", - "documentation": [ - " The next validator set. At the end of an era, if this is available (potentially from the", - " result of an offchain worker), it is immediately used. Otherwise, the on-chain election", - " is executed." - ] - }, - { - "name": "QueuedScore", - "modifier": "Optional", - "type": { - "Plain": "ElectionScore" - }, - "fallback": "0x00", - "documentation": [ - " The score of the current [`QueuedElected`]." - ] - }, - { - "name": "EraElectionStatus", - "modifier": "Default", - "type": { - "Plain": "ElectionStatus" - }, - "fallback": "0x00", - "documentation": [ - " Flag to control the execution of the offchain election. When `Open(_)`, we accept", - " solutions to be submitted." - ] - }, - { - "name": "IsCurrentSessionFinal", + "name": "CurrentPlannedSession", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "SessionIndex" }, - "fallback": "0x00", - "documentation": [ - " True if the current **planned** session is final. Note that this does not take era", - " forcing into account." + "fallback": "0x00000000", + "docs": [ + " The last planned session scheduled by the session pallet.", + "", + " This is basically in sync with the call to [`SessionManager::new_session`]." ] }, { "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "Releases" + "plain": "Releases" }, - "fallback": "0x03", - "documentation": [ + "fallback": "0x05", + "docs": [ " True if network has been upgraded to this version.", " Storage version of the pallet.", "", - " This is set to v3.0.0 for new networks." + " This is set to v6.0.0 for new networks." ] } ] @@ -2223,7 +2544,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " Take the origin account as a stash and lock up `value` of its balance. `controller` will", " be the account that controls it.", "", @@ -2256,7 +2577,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add some extra amount that have appeared in the stash `free_balance` into the balance up", " for staking.", "", @@ -2288,7 +2609,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", " period ends. If this leaves an amount actively bonded less than", " T::Currency::minimum_balance(), then it is increased to the full amount.", @@ -2331,7 +2652,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Remove any unlocked chunks from the `unlocking` queue from our management.", "", " This essentially frees up that balance to be used by the stash account to do", @@ -2373,7 +2694,7 @@ "type": "ValidatorPrefs" } ], - "documentation": [ + "docs": [ " Declare the desire to validate for the origin controller.", "", " Effects will be felt at the beginning of the next era.", @@ -2401,7 +2722,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Declare the desire to nominate `targets` for the origin controller.", "", " Effects will be felt at the beginning of the next era. This can only be called when", @@ -2426,7 +2747,7 @@ { "name": "chill", "args": [], - "documentation": [ + "docs": [ " Declare no desire to either validate or nominate.", "", " Effects will be felt at the beginning of the next era.", @@ -2454,7 +2775,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " (Re-)set the payment target for a controller.", "", " Effects will be felt at the beginning of the next era.", @@ -2481,7 +2802,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " (Re-)set the controller of a stash.", "", " Effects will be felt at the beginning of the next era.", @@ -2508,7 +2829,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Sets the ideal number of validators.", "", " The dispatch origin must be Root.", @@ -2527,7 +2848,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Increments the ideal number of validators.", "", " The dispatch origin must be Root.", @@ -2545,7 +2866,7 @@ "type": "Percent" } ], - "documentation": [ + "docs": [ " Scale up the ideal number of validators by a factor.", "", " The dispatch origin must be Root.", @@ -2558,7 +2879,7 @@ { "name": "force_no_eras", "args": [], - "documentation": [ + "docs": [ " Force there to be no new eras indefinitely.", "", " The dispatch origin must be Root.", @@ -2573,7 +2894,7 @@ { "name": "force_new_era", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of the next session. After this, it will be", " reset to normal (non-forced) behaviour.", "", @@ -2594,7 +2915,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set the validators who cannot be slashed (if any).", "", " The dispatch origin must be Root.", @@ -2617,7 +2938,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Force a current staker to become completely unstaked, immediately.", "", " The dispatch origin must be Root.", @@ -2633,7 +2954,7 @@ { "name": "force_new_era_always", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of sessions indefinitely.", "", " The dispatch origin must be Root.", @@ -2656,7 +2977,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Cancel enactment of a deferred slash.", "", " Can be called by the `T::SlashCancelOrigin`.", @@ -2684,7 +3005,7 @@ "type": "EraIndex" } ], - "documentation": [ + "docs": [ " Pay out all the stakers behind a single validator for a single era.", "", " - `validator_stash` is the stash account of the validator. Their nominators, up to", @@ -2723,7 +3044,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Rebond a portion of the stash scheduled to be unlocked.", "", " The dispatch origin must be signed by the controller, and it can be only called when", @@ -2752,7 +3073,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set `HistoryDepth` value. This function will delete any history information", " when `HistoryDepth` is reduced.", "", @@ -2788,10 +3109,10 @@ "type": "u32" } ], - "documentation": [ - " Remove all data structure concerning a staker/stash once its balance is zero.", + "docs": [ + " Remove all data structure concerning a staker/stash once its balance is at the minimum.", " This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone", - " and the target `stash` must have no funds left.", + " and the target `stash` must have no funds left beyond the ED.", "", " This can be called from any origin.", "", @@ -2807,115 +3128,27 @@ ] }, { - "name": "submit_election_solution", + "name": "kick", "args": [ { - "name": "winners", - "type": "Vec" - }, - { - "name": "compact", - "type": "CompactAssignments" - }, - { - "name": "score", - "type": "ElectionScore" - }, - { - "name": "era", - "type": "EraIndex" - }, - { - "name": "size", - "type": "ElectionSize" + "name": "who", + "type": "Vec" } ], - "documentation": [ - " Submit an election result to the chain. If the solution:", - "", - " 1. is valid.", - " 2. has a better score than a potentially existing solution on chain.", - "", - " then, it will be _put_ on chain.", - "", - " A solution consists of two pieces of data:", - "", - " 1. `winners`: a flat vector of all the winners of the round.", - " 2. `assignments`: the compact version of an assignment vector that encodes the edge", - " weights.", - "", - " Both of which may be computed using _phragmen_, or any other algorithm.", + "docs": [ + " Remove the given nominations from the calling validator.", "", - " Additionally, the submitter must provide:", - "", - " - The `score` that they claim their solution has.", - "", - " Both validators and nominators will be represented by indices in the solution. The", - " indices should respect the corresponding types ([`ValidatorIndex`] and", - " [`NominatorIndex`]). Moreover, they should be valid when used to index into", - " [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the", - " solution to be rejected. These two storage items are set during the election window and", - " may be used to determine the indices.", - "", - " A solution is valid if:", - "", - " 0. It is submitted when [`EraElectionStatus`] is `Open`.", - " 1. Its claimed score is equal to the score computed on-chain.", - " 2. Presents the correct number of winners.", - " 3. All indexes must be value according to the snapshot vectors. All edge values must", - " also be correct and should not overflow the granularity of the ratio type (i.e. 256", - " or billion).", - " 4. For each edge, all targets are actually nominated by the voter.", - " 5. Has correct self-votes.", - "", - " A solutions score is consisted of 3 parameters:", - "", - " 1. `min { support.total }` for each support of a winner. This value should be maximized.", - " 2. `sum { support.total }` for each support of a winner. This value should be minimized.", - " 3. `sum { support.total^2 }` for each support of a winner. This value should be", - " minimized (to ensure less variance)", + " Effects will be felt at the beginning of the next era.", "", - " # ", - " The transaction is assumed to be the longest path, a better solution.", - " - Initial solution is almost the same.", - " - Worse solution is retraced in pre-dispatch-checks which sets its own weight.", - " # " - ] - }, - { - "name": "submit_election_solution_unsigned", - "args": [ - { - "name": "winners", - "type": "Vec" - }, - { - "name": "compact", - "type": "CompactAssignments" - }, - { - "name": "score", - "type": "ElectionScore" - }, - { - "name": "era", - "type": "EraIndex" - }, - { - "name": "size", - "type": "ElectionSize" - } - ], - "documentation": [ - " Unsigned version of `submit_election_solution`.", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + " And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller", + " account should represent a validator.", "", - " Note that this must pass the [`ValidateUnsigned`] check which only allows transactions", - " from the local node to be included. In other words, only the block author can include a", - " transaction in the block.", + " - `who`: A list of nominator stash accounts who are nominating this validator which", + " should no longer be nominating this validator.", "", - " # ", - " See [`submit_election_solution`].", - " # " + " Note: Making this call only makes sense if you first set the validator preferences to", + " block any further nominations." ] } ], @@ -2927,7 +3160,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " The era payout has been set; the first balance is the validator-payout; the second is", " the remainder from the maximum amount of reward.", " \\[era_index, validator_payout, remainder\\]" @@ -2939,7 +3172,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " The staker has been rewarded by this amount. \\[stash, amount\\]" ] }, @@ -2949,7 +3182,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " One validator (and its nominators) has been slashed by the given amount.", " \\[validator, amount\\]" ] @@ -2959,27 +3192,16 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " An old slashing report from a prior era was discarded because it could", " not be processed. \\[session_index\\]" ] }, { "name": "StakingElection", - "args": [ - "ElectionCompute" - ], - "documentation": [ - " A new set of stakers was elected with the given \\[compute\\]." - ] - }, - { - "name": "SolutionStored", - "args": [ - "ElectionCompute" - ], - "documentation": [ - " A new solution for the upcoming election has been stored. \\[compute\\]" + "args": [], + "docs": [ + " A new set of stakers was elected." ] }, { @@ -2988,7 +3210,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has bonded this amount. \\[stash, amount\\]", "", " NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,", @@ -3001,7 +3223,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has unbonded this amount. \\[stash, amount\\]" ] }, @@ -3011,10 +3233,20 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`", " from the unlocking queue. \\[stash, amount\\]" ] + }, + { + "name": "Kicked", + "args": [ + "AccountId", + "AccountId" + ], + "docs": [ + " A nominator has been kicked from a validator. \\[nominator, stash\\]" + ] } ], "constants": [ @@ -3022,7 +3254,7 @@ "name": "SessionsPerEra", "type": "SessionIndex", "value": "0x06000000", - "documentation": [ + "docs": [ " Number of sessions per era." ] }, @@ -3030,7 +3262,7 @@ "name": "BondingDuration", "type": "EraIndex", "value": "0xa0020000", - "documentation": [ + "docs": [ " Number of eras that staked funds must remain bonded for." ] }, @@ -3038,7 +3270,7 @@ "name": "SlashDeferDuration", "type": "EraIndex", "value": "0xa8000000", - "documentation": [ + "docs": [ " Number of eras that slashes are deferred by, after computation.", "", " This should be less than the bonding duration.", @@ -3046,242 +3278,149 @@ " intervention." ] }, - { - "name": "ElectionLookahead", - "type": "BlockNumber", - "value": "0x32000000", - "documentation": [ - " The number of blocks before the end of the era from which election submissions are allowed.", - "", - " Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will", - " be used.", - "", - " This is bounded by being within the last session. Hence, setting it to a value more than the", - " length of a session will be pointless." - ] - }, - { - "name": "MaxIterations", - "type": "u32", - "value": "0x0a000000", - "documentation": [ - " Maximum number of balancing iterations to run in the offchain submission.", - "", - " If set to 0, balance_solution will not be executed at all." - ] - }, - { - "name": "MinSolutionScoreBump", - "type": "Perbill", - "value": "0x20a10700", - "documentation": [ - " The threshold of improvement that should be provided for a new solution to be accepted." - ] - }, { "name": "MaxNominatorRewardedPerValidator", "type": "u32", "value": "0x00010000", - "documentation": [ + "docs": [ " The maximum number of nominators rewarded for each validator.", "", " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim", " their reward. This used to limit the i/o cost for the nominator payout." ] + }, + { + "name": "MaxNominations", + "type": "u32", + "value": "0x10000000", + "docs": [ + " Maximum number of nominations per nominator." + ] } ], "errors": [ { "name": "NotController", - "documentation": [ + "docs": [ " Not a controller account." ] }, { "name": "NotStash", - "documentation": [ + "docs": [ " Not a stash account." ] }, { "name": "AlreadyBonded", - "documentation": [ + "docs": [ " Stash is already bonded." ] }, { "name": "AlreadyPaired", - "documentation": [ + "docs": [ " Controller is already paired." ] }, { "name": "EmptyTargets", - "documentation": [ + "docs": [ " Targets cannot be empty." ] }, { "name": "DuplicateIndex", - "documentation": [ + "docs": [ " Duplicate index." ] }, { "name": "InvalidSlashIndex", - "documentation": [ + "docs": [ " Slash record index out of bounds." ] }, { "name": "InsufficientValue", - "documentation": [ + "docs": [ " Can not bond with value less than minimum balance." ] }, { "name": "NoMoreChunks", - "documentation": [ + "docs": [ " Can not schedule more unlock chunks." ] }, { "name": "NoUnlockChunk", - "documentation": [ + "docs": [ " Can not rebond without unlocking chunks." ] }, { "name": "FundedTarget", - "documentation": [ + "docs": [ " Attempting to target a stash that still has funds." ] }, { "name": "InvalidEraToReward", - "documentation": [ + "docs": [ " Invalid era to reward." ] }, { "name": "InvalidNumberOfNominations", - "documentation": [ + "docs": [ " Invalid number of nominations." ] }, { "name": "NotSortedAndUnique", - "documentation": [ + "docs": [ " Items are not sorted and unique." ] }, { "name": "AlreadyClaimed", - "documentation": [ + "docs": [ " Rewards for this era have already been claimed for this validator." ] }, { - "name": "OffchainElectionEarlySubmission", - "documentation": [ - " The submitted result is received out of the open window." - ] - }, - { - "name": "OffchainElectionWeakSubmission", - "documentation": [ - " The submitted result is not as good as the one stored on chain." - ] - }, - { - "name": "SnapshotUnavailable", - "documentation": [ - " The snapshot data of the current window is missing." - ] - }, - { - "name": "OffchainElectionBogusWinnerCount", - "documentation": [ - " Incorrect number of winners were presented." - ] - }, - { - "name": "OffchainElectionBogusWinner", - "documentation": [ - " One of the submitted winners is not an active candidate on chain (index is out of range", - " in snapshot)." - ] - }, - { - "name": "OffchainElectionBogusCompact", - "documentation": [ - " Error while building the assignment type from the compact. This can happen if an index", - " is invalid, or if the weights _overflow_." - ] - }, - { - "name": "OffchainElectionBogusNominator", - "documentation": [ - " One of the submitted nominators is not an active nominator on chain." - ] - }, - { - "name": "OffchainElectionBogusNomination", - "documentation": [ - " One of the submitted nominators has an edge to which they have not voted on chain." - ] - }, - { - "name": "OffchainElectionSlashedNomination", - "documentation": [ - " One of the submitted nominators has an edge which is submitted before the last non-zero", - " slash of the target." - ] - }, - { - "name": "OffchainElectionBogusSelfVote", - "documentation": [ - " A self vote must only be originated from a validator to ONLY themselves." - ] - }, - { - "name": "OffchainElectionBogusEdge", - "documentation": [ - " The submitted result has unknown edges that are not among the presented winners." - ] - }, - { - "name": "OffchainElectionBogusScore", - "documentation": [ - " The claimed score does not match with the one computed from the data." + "name": "IncorrectHistoryDepth", + "docs": [ + " Incorrect previous history depth input provided." ] }, { - "name": "OffchainElectionBogusElectionSize", - "documentation": [ - " The election size is invalid." + "name": "IncorrectSlashingSpans", + "docs": [ + " Incorrect number of slashing spans provided." ] }, { - "name": "CallNotAllowed", - "documentation": [ - " The call is not allowed at the given time due to restrictions of election period." + "name": "BadState", + "docs": [ + " Internal state has become somehow corrupted and the operation cannot continue." ] }, { - "name": "IncorrectHistoryDepth", - "documentation": [ - " Incorrect previous history depth input provided." + "name": "TooManyTargets", + "docs": [ + " Too many nomination targets supplied." ] }, { - "name": "IncorrectSlashingSpans", - "documentation": [ - " Incorrect number of slashing spans provided." + "name": "BadTarget", + "docs": [ + " A nomination target was supplied that was blocked or otherwise not a validator." ] } ], - "index": 8 + "index": 9 }, { "name": "Session", @@ -3292,10 +3431,10 @@ "name": "Validators", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of validators." ] }, @@ -3303,10 +3442,10 @@ "name": "CurrentIndex", "modifier": "Default", "type": { - "Plain": "SessionIndex" + "plain": "SessionIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Current index of the session." ] }, @@ -3314,10 +3453,10 @@ "name": "QueuedChanged", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the underlying economic identities or weighting behind the validators", " has changed in the queued validator set." ] @@ -3326,10 +3465,10 @@ "name": "QueuedKeys", "modifier": "Default", "type": { - "Plain": "Vec<(ValidatorId,Keys)>" + "plain": "Vec<(ValidatorId,Keys)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The queued keys for the next session. When the next session begins, these keys", " will be used to determine the validator's session keys." ] @@ -3338,10 +3477,10 @@ "name": "DisabledValidators", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Indices of disabled validators.", "", " The set is cleared when `on_session_ending` returns a new set of identities." @@ -3351,7 +3490,7 @@ "name": "NextKeys", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "ValidatorId", "value": "Keys", @@ -3359,7 +3498,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The next session keys for a validator." ] }, @@ -3367,7 +3506,7 @@ "name": "KeyOwner", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "(KeyTypeId,Bytes)", "value": "ValidatorId", @@ -3375,7 +3514,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The owner of a key. The key is the `KeyTypeId` + the encoded key." ] } @@ -3394,7 +3533,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Sets the session key(s) of the function caller to `keys`.", " Allows an account to set its session key prior to becoming a validator.", " This doesn't take effect until the next session.", @@ -3414,7 +3553,7 @@ { "name": "purge_keys", "args": [], - "documentation": [ + "docs": [ " Removes any session key(s) of the function caller.", " This doesn't take effect until the next session.", "", @@ -3436,7 +3575,7 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " New session has happened. Note that the argument is the \\[session_index\\], not the block", " number as the type might suggest." ] @@ -3446,30 +3585,36 @@ "errors": [ { "name": "InvalidProof", - "documentation": [ + "docs": [ " Invalid ownership proof." ] }, { "name": "NoAssociatedValidatorId", - "documentation": [ + "docs": [ " No associated validator ID for account." ] }, { "name": "DuplicatedKey", - "documentation": [ + "docs": [ " Registered duplicate key." ] }, { "name": "NoKeys", - "documentation": [ + "docs": [ " No keys are associated with this account." ] + }, + { + "name": "NoAccount", + "docs": [ + " Key setting account is not live, so it's impossible to associate keys." + ] } ], - "index": 9 + "index": 10 }, { "name": "Democracy", @@ -3480,10 +3625,10 @@ "name": "PublicPropCount", "modifier": "Default", "type": { - "Plain": "PropIndex" + "plain": "PropIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of (public) proposals that have been made so far." ] }, @@ -3491,10 +3636,10 @@ "name": "PublicProps", "modifier": "Default", "type": { - "Plain": "Vec<(PropIndex,Hash,AccountId)>" + "plain": "Vec<(PropIndex,Hash,AccountId)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The public proposals. Unsorted. The second item is the proposal's hash." ] }, @@ -3502,7 +3647,7 @@ "name": "DepositOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "PropIndex", "value": "(Vec,BalanceOf)", @@ -3510,7 +3655,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Those who have locked a deposit.", "", " TWOX-NOTE: Safe, as increasing integer keys are safe." @@ -3520,7 +3665,7 @@ "name": "Preimages", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "PreimageStatus", @@ -3528,7 +3673,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map of hashes to the proposal preimage, along with who registered it and their deposit.", " The block number is the block at which it was deposited." ] @@ -3537,10 +3682,10 @@ "name": "ReferendumCount", "modifier": "Default", "type": { - "Plain": "ReferendumIndex" + "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The next free referendum index, aka the number of referenda started so far." ] }, @@ -3548,10 +3693,10 @@ "name": "LowestUnbaked", "modifier": "Default", "type": { - "Plain": "ReferendumIndex" + "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The lowest referendum index representing an unbaked referendum. Equal to", " `ReferendumCount` if there isn't a unbaked referendum." ] @@ -3560,7 +3705,7 @@ "name": "ReferendumInfoOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "ReferendumIndex", "value": "ReferendumInfo", @@ -3568,7 +3713,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information concerning any given referendum.", "", " TWOX-NOTE: SAFE as indexes are not under an attacker’s control." @@ -3578,7 +3723,7 @@ "name": "VotingOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "Voting", @@ -3586,7 +3731,7 @@ } }, "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " All votes for a particular voter. We store the balance for the number of votes that we", " have recorded. The second item is the total amount of delegations, that will be added.", "", @@ -3597,7 +3742,7 @@ "name": "Locks", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "BlockNumber", @@ -3605,7 +3750,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Accounts for which there are locks in action which may be removed at some point in the", " future. The value is the block number at which the lock expires and may be removed.", "", @@ -3616,10 +3761,10 @@ "name": "LastTabledWasExternal", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the last referendum tabled was submitted externally. False if it was a public", " proposal." ] @@ -3628,10 +3773,10 @@ "name": "NextExternal", "modifier": "Optional", "type": { - "Plain": "(Hash,VoteThreshold)" + "plain": "(Hash,VoteThreshold)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The referendum to be tabled whenever it would be valid to table an external proposal.", " This happens when a referendum needs to be tabled and one of two conditions are met:", " - `LastTabledWasExternal` is `false`; or", @@ -3642,7 +3787,7 @@ "name": "Blacklist", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "(BlockNumber,Vec)", @@ -3650,7 +3795,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A record of who vetoed what. Maps proposal hash to a possible existent block number", " (until when it may not be resubmitted) and who vetoed it." ] @@ -3659,7 +3804,7 @@ "name": "Cancellations", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "bool", @@ -3667,7 +3812,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Record of all proposals that have been subject to emergency cancellation." ] }, @@ -3675,10 +3820,10 @@ "name": "StorageVersion", "modifier": "Optional", "type": { - "Plain": "Releases" + "plain": "Releases" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage version of the pallet.", "", " New networks start with last version." @@ -3699,7 +3844,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Propose a sensitive action to be taken.", "", " The dispatch origin of this call must be _Signed_ and the sender must", @@ -3725,7 +3870,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Signals agreement with a particular proposal.", "", " The dispatch origin of this call must be _Signed_ and the sender", @@ -3750,7 +3895,7 @@ "type": "AccountVote" } ], - "documentation": [ + "docs": [ " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", " otherwise it is a vote to keep the status quo.", "", @@ -3770,7 +3915,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", " referendum.", "", @@ -3789,7 +3934,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a referendum to be tabled once it is legal to schedule an external", " referendum.", "", @@ -3809,7 +3954,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", " an external referendum.", "", @@ -3831,7 +3976,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", " schedule an external referendum.", "", @@ -3861,7 +4006,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Schedule the currently externally-proposed majority-carries referendum to be tabled", " immediately. If there is no externally-proposed referendum currently, or if there is one", " but it is not a majority-carries referendum then it fails.", @@ -3887,7 +4032,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Veto and blacklist the external proposal hash.", "", " The dispatch origin of this call must be `VetoOrigin`.", @@ -3907,7 +4052,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove a referendum.", "", " The dispatch origin of this call must be _Root_.", @@ -3925,7 +4070,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Cancel a proposal queued for enactment.", "", " The dispatch origin of this call must be _Root_.", @@ -3951,7 +4096,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " Delegate the voting power (with some given conviction) of the sending account.", "", " The balance delegated is locked for as long as it's delegated, and thereafter for the", @@ -3977,7 +4122,7 @@ { "name": "undelegate", "args": [], - "documentation": [ + "docs": [ " Undelegate the voting power of the sending account.", "", " Tokens may be unlocked following once an amount of time consistent with the lock period", @@ -3995,7 +4140,7 @@ { "name": "clear_public_proposals", "args": [], - "documentation": [ + "docs": [ " Clears all public proposals.", "", " The dispatch origin of this call must be _Root_.", @@ -4011,7 +4156,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", " in the dispatch queue but does require a deposit, returned once enacted.", "", @@ -4032,7 +4177,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Same as `note_preimage` but origin is `OperationalPreimageOrigin`." ] }, @@ -4044,7 +4189,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This requires the proposal to be", " in the dispatch queue. No deposit is needed. When this call is successful, i.e.", " the preimage has not been uploaded before and matches some imminent proposal,", @@ -4067,7 +4212,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`." ] }, @@ -4083,7 +4228,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove an expired proposal preimage and collect the deposit.", "", " The dispatch origin of this call must be _Signed_.", @@ -4109,7 +4254,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Unlock tokens that have an expired lock.", "", " The dispatch origin of this call must be _Signed_.", @@ -4127,7 +4272,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Remove a vote for a referendum.", "", " If:", @@ -4169,7 +4314,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Remove a vote for a referendum.", "", " If the `target` is equal to the signer, then this function is exactly equivalent to", @@ -4199,7 +4344,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Enact a proposal from a referendum. For now we just make the weight be the maximum." ] }, @@ -4215,7 +4360,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Permanently place a proposal into the blacklist. This prevents it from ever being", " proposed again.", "", @@ -4241,7 +4386,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove a proposal.", "", " The dispatch origin of this call must be `CancelProposalOrigin`.", @@ -4259,7 +4404,7 @@ "PropIndex", "Balance" ], - "documentation": [ + "docs": [ " A motion has been proposed by a public account. \\[proposal_index, deposit\\]" ] }, @@ -4270,14 +4415,14 @@ "Balance", "Vec" ], - "documentation": [ + "docs": [ " A public proposal has been tabled for referendum vote. \\[proposal_index, deposit, depositors\\]" ] }, { "name": "ExternalTabled", "args": [], - "documentation": [ + "docs": [ " An external proposal has been tabled." ] }, @@ -4287,7 +4432,7 @@ "ReferendumIndex", "VoteThreshold" ], - "documentation": [ + "docs": [ " A referendum has begun. \\[ref_index, threshold\\]" ] }, @@ -4296,7 +4441,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been approved by referendum. \\[ref_index\\]" ] }, @@ -4305,7 +4450,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been rejected by referendum. \\[ref_index\\]" ] }, @@ -4314,7 +4459,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A referendum has been cancelled. \\[ref_index\\]" ] }, @@ -4324,7 +4469,7 @@ "ReferendumIndex", "bool" ], - "documentation": [ + "docs": [ " A proposal has been enacted. \\[ref_index, is_ok\\]" ] }, @@ -4334,7 +4479,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An account has delegated their vote to another account. \\[who, target\\]" ] }, @@ -4343,7 +4488,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An \\[account\\] has cancelled a previous delegation operation." ] }, @@ -4354,7 +4499,7 @@ "Hash", "BlockNumber" ], - "documentation": [ + "docs": [ " An external proposal has been vetoed. \\[who, proposal_hash, until\\]" ] }, @@ -4365,7 +4510,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal's preimage was noted, and the deposit taken. \\[proposal_hash, who, deposit\\]" ] }, @@ -4376,7 +4521,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal preimage was removed and used (the deposit was returned).", " \\[proposal_hash, provider, deposit\\]" ] @@ -4387,7 +4532,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was invalid.", " \\[proposal_hash, ref_index\\]" ] @@ -4398,7 +4543,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was missing.", " \\[proposal_hash, ref_index\\]" ] @@ -4411,7 +4556,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A registered preimage was removed and the deposit collected by the reaper.", " \\[proposal_hash, provider, deposit, reaper\\]" ] @@ -4421,7 +4566,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An \\[account\\] has been unlocked successfully." ] }, @@ -4430,7 +4575,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A proposal \\[hash\\] has been blacklisted permanently." ] } @@ -4440,7 +4585,7 @@ "name": "EnactmentPeriod", "type": "BlockNumber", "value": "0x002f0d00", - "documentation": [ + "docs": [ " The minimum period of locking and the period between a proposal being approved and enacted.", "", " It should generally be a little more than the unstake period to ensure that", @@ -4452,7 +4597,7 @@ "name": "LaunchPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) new public referenda are launched." ] }, @@ -4460,7 +4605,7 @@ "name": "VotingPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) to check for new votes." ] }, @@ -4468,7 +4613,7 @@ "name": "MinimumDeposit", "type": "BalanceOf", "value": "0x0000c16ff28623000000000000000000", - "documentation": [ + "docs": [ " The minimum amount to be used as a deposit for a public referendum proposal." ] }, @@ -4476,7 +4621,7 @@ "name": "FastTrackVotingPeriod", "type": "BlockNumber", "value": "0x80510100", - "documentation": [ + "docs": [ " Minimum voting period allowed for an emergency referendum." ] }, @@ -4484,7 +4629,7 @@ "name": "CooloffPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " Period in blocks where an external proposal may not be re-submitted after being vetoed." ] }, @@ -4492,7 +4637,7 @@ "name": "PreimageByteDeposit", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount of balance that must be deposited per byte of preimage stored." ] }, @@ -4500,7 +4645,7 @@ "name": "MaxVotes", "type": "u32", "value": "0x64000000", - "documentation": [ + "docs": [ " The maximum number of votes for an account." ] } @@ -4508,217 +4653,217 @@ "errors": [ { "name": "ValueLow", - "documentation": [ + "docs": [ " Value too low" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal does not exist" ] }, { "name": "BadIndex", - "documentation": [ + "docs": [ " Unknown index" ] }, { "name": "AlreadyCanceled", - "documentation": [ + "docs": [ " Cannot cancel the same proposal twice" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Proposal already made" ] }, { "name": "ProposalBlacklisted", - "documentation": [ + "docs": [ " Proposal still blacklisted" ] }, { "name": "NotSimpleMajority", - "documentation": [ + "docs": [ " Next external proposal not simple majority" ] }, { "name": "InvalidHash", - "documentation": [ + "docs": [ " Invalid hash" ] }, { "name": "NoProposal", - "documentation": [ + "docs": [ " No external proposal" ] }, { "name": "AlreadyVetoed", - "documentation": [ + "docs": [ " Identity may not veto a proposal twice" ] }, { "name": "NotDelegated", - "documentation": [ + "docs": [ " Not delegated" ] }, { "name": "DuplicatePreimage", - "documentation": [ + "docs": [ " Preimage already noted" ] }, { "name": "NotImminent", - "documentation": [ + "docs": [ " Not imminent" ] }, { "name": "TooEarly", - "documentation": [ + "docs": [ " Too early" ] }, { "name": "Imminent", - "documentation": [ + "docs": [ " Imminent" ] }, { "name": "PreimageMissing", - "documentation": [ + "docs": [ " Preimage not found" ] }, { "name": "ReferendumInvalid", - "documentation": [ + "docs": [ " Vote given for invalid referendum" ] }, { "name": "PreimageInvalid", - "documentation": [ + "docs": [ " Invalid preimage" ] }, { "name": "NoneWaiting", - "documentation": [ + "docs": [ " No proposals waiting" ] }, { "name": "NotLocked", - "documentation": [ + "docs": [ " The target account does not have a lock." ] }, { "name": "NotExpired", - "documentation": [ + "docs": [ " The lock on the account to be unlocked has not yet expired." ] }, { "name": "NotVoter", - "documentation": [ + "docs": [ " The given account did not vote on the referendum." ] }, { "name": "NoPermission", - "documentation": [ + "docs": [ " The actor has no permission to conduct the action." ] }, { "name": "AlreadyDelegating", - "documentation": [ + "docs": [ " The account is already delegating." ] }, { "name": "Overflow", - "documentation": [ + "docs": [ " An unexpected integer overflow occurred." ] }, { "name": "Underflow", - "documentation": [ + "docs": [ " An unexpected integer underflow occurred." ] }, { "name": "InsufficientFunds", - "documentation": [ + "docs": [ " Too high a balance was provided that the account cannot afford." ] }, { "name": "NotDelegating", - "documentation": [ + "docs": [ " The account is not currently delegating." ] }, { "name": "VotesExist", - "documentation": [ + "docs": [ " The account currently has votes attached to it and the operation cannot succeed until", " these are removed, either through `unvote` or `reap_vote`." ] }, { "name": "InstantNotAllowed", - "documentation": [ + "docs": [ " The instant referendum origin is currently disallowed." ] }, { "name": "Nonsense", - "documentation": [ + "docs": [ " Delegation to oneself makes no sense." ] }, { "name": "WrongUpperBound", - "documentation": [ + "docs": [ " Invalid upper bound." ] }, { "name": "MaxVotesReached", - "documentation": [ + "docs": [ " Maximum number of votes reached." ] }, { "name": "InvalidWitness", - "documentation": [ + "docs": [ " The provided witness data is wrong." ] }, { "name": "TooManyProposals", - "documentation": [ + "docs": [ " Maximum number of proposals reached." ] } ], - "index": 10 + "index": 11 }, { "name": "Council", @@ -4729,10 +4874,10 @@ "name": "Proposals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -4740,7 +4885,7 @@ "name": "ProposalOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Proposal", @@ -4748,7 +4893,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -4756,7 +4901,7 @@ "name": "Voting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Votes", @@ -4764,7 +4909,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -4772,10 +4917,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -4783,10 +4928,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] }, @@ -4794,10 +4939,10 @@ "name": "Prime", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The prime member that helps determine the default vote behavior in case of absentations." ] } @@ -4820,7 +4965,7 @@ "type": "MemberCount" } ], - "documentation": [ + "docs": [ " Set the collective's membership.", "", " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", @@ -4859,7 +5004,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective.", @@ -4888,7 +5033,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add a new proposal to either be voted on or executed directly.", "", " Requires the sender to be member.", @@ -4934,7 +5079,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Add an aye or nay vote for the sender to the given proposal.", "", " Requires the sender to be a member.", @@ -4971,7 +5116,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Close a vote that is either approved, disapproved or whose voting period has ended.", "", " May be called by any signed account in order to finish voting and close the proposal.", @@ -5012,7 +5157,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", "", " Must be called by the Root origin.", @@ -5038,7 +5183,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`).", " \\[account, proposal_index, proposal_hash, threshold\\]" @@ -5053,7 +5198,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`).", " \\[account, proposal_hash, voted, yes, no\\]" @@ -5064,7 +5209,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold.", " \\[proposal_hash\\]" ] @@ -5074,7 +5219,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold.", " \\[proposal_hash\\]" ] @@ -5085,7 +5230,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A motion was executed; result will be `Ok` if it returned without error.", " \\[proposal_hash, result\\]" ] @@ -5096,7 +5241,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A single member did some action; result will be `Ok` if it returned without error.", " \\[proposal_hash, result\\]" ] @@ -5108,7 +5253,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A proposal was closed because its threshold was reached or after its duration was up.", " \\[proposal_hash, yes, no\\]" ] @@ -5118,66 +5263,66 @@ "errors": [ { "name": "NotMember", - "documentation": [ + "docs": [ " Account is not a member" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Duplicate proposals not allowed" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal must exist" ] }, { "name": "WrongIndex", - "documentation": [ + "docs": [ " Mismatched index" ] }, { "name": "DuplicateVote", - "documentation": [ + "docs": [ " Duplicate vote ignored" ] }, { "name": "AlreadyInitialized", - "documentation": [ + "docs": [ " Members are already initialized!" ] }, { "name": "TooEarly", - "documentation": [ + "docs": [ " The close call was made too early, before the end of the voting." ] }, { "name": "TooManyProposals", - "documentation": [ + "docs": [ " There can only be a maximum of `MaxProposals` active proposals." ] }, { "name": "WrongProposalWeight", - "documentation": [ + "docs": [ " The given weight bound for the proposal was too low." ] }, { "name": "WrongProposalLength", - "documentation": [ + "docs": [ " The given length bound for the proposal was too low." ] } ], - "index": 11 + "index": 12 }, { "name": "TechnicalCommittee", @@ -5188,10 +5333,10 @@ "name": "Proposals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -5199,7 +5344,7 @@ "name": "ProposalOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Proposal", @@ -5207,7 +5352,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -5215,7 +5360,7 @@ "name": "Voting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Votes", @@ -5223,7 +5368,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -5231,10 +5376,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -5242,10 +5387,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] }, @@ -5253,10 +5398,10 @@ "name": "Prime", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The prime member that helps determine the default vote behavior in case of absentations." ] } @@ -5279,7 +5424,7 @@ "type": "MemberCount" } ], - "documentation": [ + "docs": [ " Set the collective's membership.", "", " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", @@ -5318,7 +5463,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective.", @@ -5347,7 +5492,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add a new proposal to either be voted on or executed directly.", "", " Requires the sender to be member.", @@ -5393,7 +5538,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Add an aye or nay vote for the sender to the given proposal.", "", " Requires the sender to be a member.", @@ -5430,7 +5575,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Close a vote that is either approved, disapproved or whose voting period has ended.", "", " May be called by any signed account in order to finish voting and close the proposal.", @@ -5471,7 +5616,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", "", " Must be called by the Root origin.", @@ -5497,7 +5642,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`).", " \\[account, proposal_index, proposal_hash, threshold\\]" @@ -5512,7 +5657,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`).", " \\[account, proposal_hash, voted, yes, no\\]" @@ -5523,7 +5668,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold.", " \\[proposal_hash\\]" ] @@ -5533,7 +5678,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold.", " \\[proposal_hash\\]" ] @@ -5544,7 +5689,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A motion was executed; result will be `Ok` if it returned without error.", " \\[proposal_hash, result\\]" ] @@ -5555,7 +5700,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A single member did some action; result will be `Ok` if it returned without error.", " \\[proposal_hash, result\\]" ] @@ -5567,7 +5712,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A proposal was closed because its threshold was reached or after its duration was up.", " \\[proposal_hash, yes, no\\]" ] @@ -5577,102 +5722,123 @@ "errors": [ { "name": "NotMember", - "documentation": [ + "docs": [ " Account is not a member" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Duplicate proposals not allowed" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal must exist" ] }, { "name": "WrongIndex", - "documentation": [ + "docs": [ " Mismatched index" ] }, { "name": "DuplicateVote", - "documentation": [ + "docs": [ " Duplicate vote ignored" ] }, { "name": "AlreadyInitialized", - "documentation": [ + "docs": [ " Members are already initialized!" ] }, { "name": "TooEarly", - "documentation": [ + "docs": [ " The close call was made too early, before the end of the voting." ] }, { "name": "TooManyProposals", - "documentation": [ + "docs": [ " There can only be a maximum of `MaxProposals` active proposals." ] }, { "name": "WrongProposalWeight", - "documentation": [ + "docs": [ " The given weight bound for the proposal was too low." ] }, { "name": "WrongProposalLength", - "documentation": [ + "docs": [ " The given length bound for the proposal was too low." ] } ], - "index": 12 + "index": 13 }, { "name": "Elections", "storage": { - "prefix": "PhragmenElection", + "prefix": "Elections", "items": [ { "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec<(AccountId,BalanceOf)>" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ - " The current elected membership. Sorted based on account id." + "docs": [ + " The current elected members.", + "", + " Invariant: Always sorted based on account id." ] }, { "name": "RunnersUp", "modifier": "Default", "type": { - "Plain": "Vec<(AccountId,BalanceOf)>" + "plain": "Vec" + }, + "fallback": "0x00", + "docs": [ + " The current reserved runners-up.", + "", + " Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the", + " last (i.e. _best_) runner-up will be replaced." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "type": { + "plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", - "documentation": [ - " The current runners_up. Sorted based on low to high merit (worse to best)." + "docs": [ + " The present candidate list. A current member or runner-up can never enter this vector", + " and is always implicitly assumed to be a candidate.", + "", + " Second element is the deposit.", + "", + " Invariant: Always sorted based on account id." ] }, { "name": "ElectionRounds", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The total number of vote rounds that have happened, excluding the upcoming one." ] }, @@ -5680,30 +5846,18 @@ "name": "Voting", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", - "value": "(BalanceOf,Vec)", + "value": "Voter", "linked": false } }, - "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000", + "docs": [ " Votes and locked stake of a particular voter.", "", - " TWOX-NOTE: SAFE as `AccountId` is a crypto hash" - ] - }, - { - "name": "Candidates", - "modifier": "Default", - "type": { - "Plain": "Vec" - }, - "fallback": "0x00", - "documentation": [ - " The present candidate list. Sorted based on account-id. A current member or runner-up", - " can never enter this vector and is always implicitly assumed to be a candidate." + " TWOX-NOTE: SAFE as `AccountId` is a crypto hash." ] } ] @@ -5721,90 +5875,41 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Vote for a set of candidates for the upcoming round of election. This can be called to", " set the initial votes, or update already existing votes.", "", - " Upon initial voting, `value` units of `who`'s balance is locked and a bond amount is", - " reserved.", + " Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is", + " reserved. The deposit is based on the number of votes and can be updated over time.", "", " The `votes` should:", " - not be empty.", " - be less than the number of possible candidates. Note that all current members and", " runners-up are also automatically candidates for the next round.", "", - " It is the responsibility of the caller to not place all of their balance into the lock", - " and keep some for further transactions.", + " If `value` is more than `who`'s total balance, then the maximum of the two is used.", + "", + " The dispatch origin of this call must be signed.", + "", + " ### Warning", + "", + " It is the responsibility of the caller to **NOT** place all of their balance into the", + " lock and keep some for further operations.", "", " # ", - " Base weight: 47.93 µs", - " State reads:", - " \t- Candidates.len() + Members.len() + RunnersUp.len()", - " \t- Voting (is_voter)", - " \t- Lock", - " \t- [AccountBalance(who) (unreserve + total_balance)]", - " State writes:", - " \t- Voting", - " \t- Lock", - " \t- [AccountBalance(who) (unreserve -- only when creating a new voter)]", + " We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less.", " # " ] }, { "name": "remove_voter", "args": [], - "documentation": [ - " Remove `origin` as a voter. This removes the lock and returns the bond.", - "", - " # ", - " Base weight: 36.8 µs", - " All state access is from do_remove_voter.", - " State reads:", - " \t- Voting", - " \t- [AccountData(who)]", - " State writes:", - " \t- Voting", - " \t- Locks", - " \t- [AccountData(who)]", - " # " - ] - }, - { - "name": "report_defunct_voter", - "args": [ - { - "name": "defunct", - "type": "DefunctVoter" - } - ], - "documentation": [ - " Report `target` for being an defunct voter. In case of a valid report, the reporter is", - " rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and", - " their bond is slashed.", - "", - " A defunct voter is defined to be:", - " - a voter whose current submitted votes are all invalid. i.e. all of them are no", - " longer a candidate nor an active member or a runner-up.", - "", + "docs": [ + " Remove `origin` as a voter.", "", - " The origin must provide the number of current candidates and votes of the reported target", - " for the purpose of accurate weight calculation.", + " This removes the lock and returns the deposit.", "", - " # ", - " No Base weight based on min square analysis.", - " Complexity of candidate_count: 1.755 µs", - " Complexity of vote_count: 18.51 µs", - " State reads:", - " \t- Voting(reporter)", - " \t- Candidate.len()", - " \t- Voting(Target)", - " \t- Candidates, Members, RunnersUp (is_defunct_voter)", - " State writes:", - " \t- Lock(reporter || target)", - " \t- [AccountBalance(reporter)] + AccountBalance(target)", - " \t- Voting(reporter || target)", - " Note: the db access is worse with respect to db, which is when the report is correct.", - " # " + " The dispatch origin of this call must be signed and be a voter." ] }, { @@ -5815,26 +5920,21 @@ "type": "Compact" } ], - "documentation": [ - " Submit oneself for candidacy.", + "docs": [ + " Submit oneself for candidacy. A fixed amount of deposit is recorded.", + "", + " All candidates are wiped at the end of the term. They either become a member/runner-up,", + " or leave the system while their deposit is slashed.", + "", + " The dispatch origin of this call must be signed.", "", - " A candidate will either:", - " - Lose at the end of the term and forfeit their deposit.", - " - Win and become a member. Members will eventually get their stash back.", - " - Become a runner-up. Runners-ups are reserved members in case one gets forcefully", - " removed.", + " ### Warning", + "", + " Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]", + " to get their deposit back. Losing the spot in an election will always lead to a slash.", "", " # ", - " Base weight = 33.33 µs", - " Complexity of candidate_count: 0.375 µs", - " State reads:", - " \t- Candidates", - " \t- Members", - " \t- RunnersUp", - " \t- [AccountBalance(who)]", - " State writes:", - " \t- [AccountBalance(who)]", - " \t- Candidates", + " The number of current candidates must be provided as witness data.", " # " ] }, @@ -5846,43 +5946,24 @@ "type": "Renouncing" } ], - "documentation": [ + "docs": [ " Renounce one's intention to be a candidate for the next election round. 3 potential", " outcomes exist:", - " - `origin` is a candidate and not elected in any set. In this case, the bond is", + "", + " - `origin` is a candidate and not elected in any set. In this case, the deposit is", " unreserved, returned and origin is removed as a candidate.", - " - `origin` is a current runner-up. In this case, the bond is unreserved, returned and", + " - `origin` is a current runner-up. In this case, the deposit is unreserved, returned and", " origin is removed as a runner-up.", - " - `origin` is a current member. In this case, the bond is unreserved and origin is", + " - `origin` is a current member. In this case, the deposit is unreserved and origin is", " removed as a member, consequently not being a candidate for the next round anymore.", - " Similar to [`remove_voter`], if replacement runners exists, they are immediately used.", - " ", - " If a candidate is renouncing:", - " \tBase weight: 17.28 µs", - " \tComplexity of candidate_count: 0.235 µs", - " \tState reads:", - " \t\t- Candidates", - " \t\t- [AccountBalance(who) (unreserve)]", - " \tState writes:", - " \t\t- Candidates", - " \t\t- [AccountBalance(who) (unreserve)]", - " If member is renouncing:", - " \tBase weight: 46.25 µs", - " \tState reads:", - " \t\t- Members, RunnersUp (remove_and_replace_member),", - " \t\t- [AccountData(who) (unreserve)]", - " \tState writes:", - " \t\t- Members, RunnersUp (remove_and_replace_member),", - " \t\t- [AccountData(who) (unreserve)]", - " If runner is renouncing:", - " \tBase weight: 46.25 µs", - " \tState reads:", - " \t\t- RunnersUp (remove_and_replace_member),", - " \t\t- [AccountData(who) (unreserve)]", - " \tState writes:", - " \t\t- RunnersUp (remove_and_replace_member),", - " \t\t- [AccountData(who) (unreserve)]", - " " + " Similar to [`remove_members`], if replacement runners exists, they are immediately", + " used. If the prime is renouncing, then no prime will exist until the next round.", + "", + " The dispatch origin of this call must be signed, and have one of the above roles.", + "", + " # ", + " The type of renouncing must be provided as witness data.", + " # " ] }, { @@ -5897,24 +5978,45 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Remove a particular member from the set. This is effective immediately and the bond of", " the outgoing member is slashed.", "", " If a runner-up is available, then the best runner-up will be removed and replaces the", " outgoing member. Otherwise, a new phragmen election is started.", "", + " The dispatch origin of this call must be root.", + "", " Note that this does not affect the designated block number of the next election.", "", " # ", - " If we have a replacement:", - " \t- Base weight: 50.93 µs", - " \t- State reads:", - " \t\t- RunnersUp.len()", - " \t\t- Members, RunnersUp (remove_and_replace_member)", - " \t- State writes:", - " \t\t- Members, RunnersUp (remove_and_replace_member)", - " Else, since this is a root call and will go into phragmen, we assume full block for now.", + " If we have a replacement, we use a small weight. Else, since this is a root call and", + " will go into phragmen, we assume full block for now.", + " # " + ] + }, + { + "name": "clean_defunct_voters", + "args": [ + { + "name": "_num_voters", + "type": "u32" + }, + { + "name": "_num_defunct", + "type": "u32" + } + ], + "docs": [ + " Clean all voters who are defunct (i.e. they do not serve any purpose at all). The", + " deposit of the removed voters are returned.", + "", + " This is an root function to be used only for cleaning the state.", + "", + " The dispatch origin of this call must be root.", + "", + " # ", + " The total number of voters and those that are defunct must be provided as witness data.", " # " ] } @@ -5925,17 +6027,18 @@ "args": [ "Vec<(AccountId,Balance)>" ], - "documentation": [ - " A new term with \\[new_members\\]. This indicates that enough candidates existed to run the", - " election, not that enough have has been elected. The inner value must be examined for", - " this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond slashed and", - " none were elected, whilst `EmptyTerm` means that no candidates existed to begin with." + "docs": [ + " A new term with \\[new_members\\]. This indicates that enough candidates existed to run", + " the election, not that enough have has been elected. The inner value must be examined", + " for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond", + " slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to", + " begin with." ] }, { "name": "EmptyTerm", "args": [], - "documentation": [ + "docs": [ " No (or not enough) candidates existed for this round. This is different from", " `NewTerm(\\[\\])`. See the description of `NewTerm`." ] @@ -5943,7 +6046,7 @@ { "name": "ElectionError", "args": [], - "documentation": [ + "docs": [ " Internal error happened while trying to perform election." ] }, @@ -5952,196 +6055,212 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[member\\] has been removed. This should always be followed by either `NewTerm` or", " `EmptyTerm`." ] }, { - "name": "CandidateSlashed", + "name": "Renounced", "args": [ - "AccountId", - "Balance" + "AccountId" ], - "documentation": [ - " A candidate was slashed due to failing to obtain a seat as member or runner-up" + "docs": [ + " Someone has renounced their candidacy." ] }, { - "name": "SeatHolderSlashed", + "name": "CandidateSlashed", "args": [ "AccountId", "Balance" ], - "documentation": [ - " A seat holder (member or runner-up) was slashed due to failing to retaining their position." + "docs": [ + " A \\[candidate\\] was slashed by \\[amount\\] due to failing to obtain a seat as member or", + " runner-up.", + "", + " Note that old members and runners-up are also candidates." ] }, { - "name": "MemberRenounced", + "name": "SeatHolderSlashed", "args": [ - "AccountId" + "AccountId", + "Balance" ], - "documentation": [ - " A \\[member\\] has renounced their candidacy." - ] - }, - { - "name": "VoterReported", - "args": [ - "AccountId", - "AccountId", - "bool" - ], - "documentation": [ - " A voter was reported with the the report being successful or not.", - " \\[voter, reporter, success\\]" + "docs": [ + " A \\[seat holder\\] was slashed by \\[amount\\] by being forcefully removed from the set." ] } ], "constants": [ + { + "name": "PalletId", + "type": "LockIdentifier", + "value": "0x706872656c656374", + "docs": [ + " Identifier for the elections-phragmen pallet's lock" + ] + }, { "name": "CandidacyBond", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [] + "docs": [ + " How much should be locked up in order to submit one's candidacy." + ] }, { - "name": "VotingBond", + "name": "VotingBondBase", "type": "BalanceOf", - "value": "0x00407a10f35a00000000000000000000", - "documentation": [] + "value": "0x00f0436de36a01000000000000000000", + "docs": [ + " Base deposit associated with voting.", + "", + " This should be sensibly high to economically ensure the pallet cannot be attacked by", + " creating a gigantic number of votes." + ] + }, + { + "name": "VotingBondFactor", + "type": "BalanceOf", + "value": "0x0000cc7b9fae00000000000000000000", + "docs": [ + " The amount of bond that need to be locked for each vote (32 bytes)." + ] }, { "name": "DesiredMembers", "type": "u32", "value": "0x0d000000", - "documentation": [] + "docs": [ + " Number of members to elect." + ] }, { "name": "DesiredRunnersUp", "type": "u32", "value": "0x07000000", - "documentation": [] + "docs": [ + " Number of runners_up to keep." + ] }, { "name": "TermDuration", "type": "BlockNumber", "value": "0x80130300", - "documentation": [] - }, - { - "name": "ModuleId", - "type": "LockIdentifier", - "value": "0x706872656c656374", - "documentation": [] + "docs": [ + " How long each seat is kept. This defines the next block number at which an election", + " round will happen. If set to zero, no elections are ever triggered and the module will", + " be in passive mode." + ] } ], "errors": [ { "name": "UnableToVote", - "documentation": [ + "docs": [ " Cannot vote when no candidates or members exist." ] }, { "name": "NoVotes", - "documentation": [ + "docs": [ " Must vote for at least one candidate." ] }, { "name": "TooManyVotes", - "documentation": [ + "docs": [ " Cannot vote more than candidates." ] }, { "name": "MaximumVotesExceeded", - "documentation": [ + "docs": [ " Cannot vote more than maximum allowed." ] }, { "name": "LowBalance", - "documentation": [ + "docs": [ " Cannot vote with stake less than minimum balance." ] }, { "name": "UnableToPayBond", - "documentation": [ + "docs": [ " Voter can not pay voting bond." ] }, { "name": "MustBeVoter", - "documentation": [ + "docs": [ " Must be a voter." ] }, { "name": "ReportSelf", - "documentation": [ + "docs": [ " Cannot report self." ] }, { "name": "DuplicatedCandidate", - "documentation": [ + "docs": [ " Duplicated candidate submission." ] }, { "name": "MemberSubmit", - "documentation": [ + "docs": [ " Member cannot re-submit candidacy." ] }, { - "name": "RunnerSubmit", - "documentation": [ + "name": "RunnerUpSubmit", + "docs": [ " Runner cannot re-submit candidacy." ] }, { "name": "InsufficientCandidateFunds", - "documentation": [ + "docs": [ " Candidate does not have enough funds." ] }, { "name": "NotMember", - "documentation": [ + "docs": [ " Not a member." ] }, { - "name": "InvalidCandidateCount", - "documentation": [ + "name": "InvalidWitnessData", + "docs": [ " The provided count of number of candidates is incorrect." ] }, { "name": "InvalidVoteCount", - "documentation": [ + "docs": [ " The provided count of number of votes is incorrect." ] }, { "name": "InvalidRenouncing", - "documentation": [ + "docs": [ " The renouncing origin presented a wrong `Renouncing` parameter." ] }, { "name": "InvalidReplacement", - "documentation": [ + "docs": [ " Prediction regarding replacement after member removal is wrong." ] } ], - "index": 13 + "index": 14 }, { "name": "TechnicalMembership", @@ -6152,10 +6271,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current membership, stored as an ordered Vec." ] }, @@ -6163,10 +6282,10 @@ "name": "Prime", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current prime member, if one exists." ] } @@ -6181,7 +6300,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Add a member `who` to the set.", "", " May only be called from `T::AddOrigin`." @@ -6195,7 +6314,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Remove a member `who` from the set.", "", " May only be called from `T::RemoveOrigin`." @@ -6213,7 +6332,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out one member `remove` for another `add`.", "", " May only be called from `T::SwapOrigin`.", @@ -6229,7 +6348,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Change the membership to a new set, disregarding the existing membership. Be nice and", " pass `members` pre-sorted.", "", @@ -6244,7 +6363,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out the sending member for some other key `new`.", "", " May only be called from `Signed` origin of a current member.", @@ -6260,7 +6379,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Set the prime member. Must be a current member.", "", " May only be called from `T::PrimeOrigin`." @@ -6269,7 +6388,7 @@ { "name": "clear_prime", "args": [], - "documentation": [ + "docs": [ " Remove the prime member if it exists.", "", " May only be called from `T::PrimeOrigin`." @@ -6280,35 +6399,35 @@ { "name": "MemberAdded", "args": [], - "documentation": [ + "docs": [ " The given member was added; see the transaction for who." ] }, { "name": "MemberRemoved", "args": [], - "documentation": [ + "docs": [ " The given member was removed; see the transaction for who." ] }, { "name": "MembersSwapped", "args": [], - "documentation": [ + "docs": [ " Two members were swapped; see the transaction for who." ] }, { "name": "MembersReset", "args": [], - "documentation": [ + "docs": [ " The membership was reset; see the transaction for who the new set is." ] }, { "name": "KeyChanged", "args": [], - "documentation": [ + "docs": [ " One of the members' keys changed." ] }, @@ -6317,14 +6436,27 @@ "args": [ "PhantomData" ], - "documentation": [ + "docs": [ " Phantom member, never used." ] } ], "constants": [], - "errors": [], - "index": 14 + "errors": [ + { + "name": "AlreadyMember", + "docs": [ + " Already a member." + ] + }, + { + "name": "NotMember", + "docs": [ + " Not a member." + ] + } + ], + "index": 15 }, { "name": "Grandpa", @@ -6335,10 +6467,10 @@ "name": "State", "modifier": "Default", "type": { - "Plain": "StoredState" + "plain": "StoredState" }, "fallback": "0x00", - "documentation": [ + "docs": [ " State of the current authority set." ] }, @@ -6346,10 +6478,10 @@ "name": "PendingChange", "modifier": "Optional", "type": { - "Plain": "StoredPendingChange" + "plain": "StoredPendingChange" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending change: (signaled at, scheduled change)." ] }, @@ -6357,10 +6489,10 @@ "name": "NextForced", "modifier": "Optional", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00", - "documentation": [ + "docs": [ " next block number where we can force a change." ] }, @@ -6368,10 +6500,10 @@ "name": "Stalled", "modifier": "Optional", "type": { - "Plain": "(BlockNumber,BlockNumber)" + "plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " `true` if we are currently stalled." ] }, @@ -6379,10 +6511,10 @@ "name": "CurrentSetId", "modifier": "Default", "type": { - "Plain": "SetId" + "plain": "SetId" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The number of changes (both in terms of keys and underlying economic responsibilities)", " in the \"set\" of Grandpa validators from genesis." ] @@ -6391,7 +6523,7 @@ "name": "SetIdSession", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "SetId", "value": "SessionIndex", @@ -6399,7 +6531,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from grandpa set ID to the index of the *most recent* session for which its", " members were responsible.", "", @@ -6421,7 +6553,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report voter equivocation/misbehavior. This method will verify the", " equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence", @@ -6440,7 +6572,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report voter equivocation/misbehavior. This method will verify the", " equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence", @@ -6464,7 +6596,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Note that the current authority set of the GRANDPA finality gadget has", " stalled. This will trigger a forced authority set change at the beginning", " of the next session, to be enacted `delay` blocks after that. The delay", @@ -6481,21 +6613,21 @@ "args": [ "AuthorityList" ], - "documentation": [ + "docs": [ " New authority set has been applied. \\[authority_set\\]" ] }, { "name": "Paused", "args": [], - "documentation": [ + "docs": [ " Current authority set has been paused." ] }, { "name": "Resumed", "args": [], - "documentation": [ + "docs": [ " Current authority set has been resumed." ] } @@ -6504,50 +6636,50 @@ "errors": [ { "name": "PauseFailed", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA pause when the authority set isn't live", " (either paused or already pending pause)." ] }, { "name": "ResumeFailed", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA resume when the authority set isn't paused", " (either live or already pending resume)." ] }, { "name": "ChangePending", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA change with one already pending." ] }, { "name": "TooSoon", - "documentation": [ + "docs": [ " Cannot signal forced change so soon after last." ] }, { "name": "InvalidKeyOwnershipProof", - "documentation": [ + "docs": [ " A key ownership proof provided as part of an equivocation report is invalid." ] }, { "name": "InvalidEquivocationProof", - "documentation": [ + "docs": [ " An equivocation proof provided as part of an equivocation report is invalid." ] }, { "name": "DuplicateOffenceReport", - "documentation": [ + "docs": [ " A given equivocation report is valid but already previously reported." ] } ], - "index": 15 + "index": 16 }, { "name": "Treasury", @@ -6558,10 +6690,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "ProposalIndex" + "plain": "ProposalIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Number of proposals that have been made." ] }, @@ -6569,7 +6701,7 @@ "name": "Proposals", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "ProposalIndex", "value": "TreasuryProposal", @@ -6577,7 +6709,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposals that have been made." ] }, @@ -6585,10 +6717,10 @@ "name": "Approvals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposal indices that have been approved but not yet awarded." ] } @@ -6607,7 +6739,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Put forward a suggestion for spending. A deposit proportional to the value", " is reserved and slashed if the proposal is rejected. It is returned once the", " proposal is awarded.", @@ -6627,7 +6759,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Reject a proposed spend. The original deposit will be slashed.", "", " May only be called from `T::RejectOrigin`.", @@ -6647,7 +6779,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", " and the original deposit will be returned.", "", @@ -6667,7 +6799,7 @@ "args": [ "ProposalIndex" ], - "documentation": [ + "docs": [ " New proposal. \\[proposal_index\\]" ] }, @@ -6676,7 +6808,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " We have ended a spend period and will now allocate funds. \\[budget_remaining\\]" ] }, @@ -6687,7 +6819,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " Some funds have been allocated. \\[proposal_index, award, beneficiary\\]" ] }, @@ -6697,7 +6829,7 @@ "ProposalIndex", "Balance" ], - "documentation": [ + "docs": [ " A proposal was rejected; funds were slashed. \\[proposal_index, slashed\\]" ] }, @@ -6706,7 +6838,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some of our funds have been burnt. \\[burn\\]" ] }, @@ -6715,7 +6847,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Spending has finished; this is the amount that rolls over until next spend.", " \\[budget_remaining\\]" ] @@ -6725,7 +6857,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some funds have been deposited. \\[deposit\\]" ] } @@ -6735,7 +6867,7 @@ "name": "ProposalBond", "type": "Permill", "value": "0x50c30000", - "documentation": [ + "docs": [ " Fraction of a proposal's value that should be bonded in order to place the proposal.", " An accepted proposal gets these back. A rejected proposal does not." ] @@ -6744,7 +6876,7 @@ "name": "ProposalBondMinimum", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Minimum amount of funds that should be placed in a deposit for making a proposal." ] }, @@ -6752,7 +6884,7 @@ "name": "SpendPeriod", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " Period between successive spends." ] }, @@ -6760,15 +6892,15 @@ "name": "Burn", "type": "Permill", "value": "0x20a10700", - "documentation": [ + "docs": [ " Percentage of spare funds (if any) that are burnt per spend period." ] }, { - "name": "ModuleId", - "type": "ModuleId", + "name": "PalletId", + "type": "PalletId", "value": "0x70792f7472737279", - "documentation": [ + "docs": [ " The treasury's module id, used for deriving its sovereign account ID." ] } @@ -6776,18 +6908,24 @@ "errors": [ { "name": "InsufficientProposersBalance", - "documentation": [ + "docs": [ " Proposer's balance is too low." ] }, { "name": "InvalidIndex", - "documentation": [ + "docs": [ " No proposal or bounty at that index." ] + }, + { + "name": "TooManyApprovals", + "docs": [ + " Too many approvals in the queue." + ] } ], - "index": 16 + "index": 17 }, { "name": "Contracts", @@ -6798,10 +6936,10 @@ "name": "CurrentSchedule", "modifier": "Default", "type": { - "Plain": "Schedule" + "plain": "Schedule" }, - "fallback": "0x00000000000400000000020000000100008000000010000000001000000001000020000000000008002a0600001d620200846b03008b180000671d0000610a00001d180000cc2a00005c000000a17001003e020300f307000046070000e807000001080000f4190000db280000a908000013249208f8080000d0080000060b000007090000ad080000520800009c0800006f0a0000e7090000020a0000f30900002b0a0000f8090000d10900001b0a0000390a0000270a0000560f0000dc070000260a000036200000381c0000ec1f0000d51c0000780a0000bc0a00005f0a0000e40900003e0a0000330a0000470a0000270a00006cf1380000000000a0f938000000000040ff3800000000008ca77b00000000001a6c3800000000008876380000000000b481380000000000d4f981000000000028543800000000008a4c380000000000c87d5f00000000008a9f1c0000000000c8e57400000000000b01000000000000983c530000000000a90200000000000050de382a0000000038476124000000006467b209000000002418910000000000b2dfd100000000001a6fe7070000000039090000000000004e86990000000000dad35a1000000000cd07000000000000eaaf830a00000000a01f2a0200000000ae0500000000000008f7270b000000003675e30700000000f4753c09000000000102000000000000d20200000000000008efb81d000000000802000000000000e602000000000000b90a000000000000c25731000000000026100000000000007a8e330000000000d80c00000000000040c22f0000000000d305000000000000067f2f0000000000d705000000000000", - "documentation": [ + "fallback": "0x000000000004000000000200000001000080000000100000000010000000010000200000001f060000d66a0200dd84030026180000bd1c0000430b000003170000ae2800009c000000dd69010063e00200300700000706000065070000b10500006e180000002800006905000072deae08f0070000dc070000710a00006a080000a507000096070000d1070000770900003e09000075090000d809000082090000bc090000120900003c09000072090000dc090000f7080000e108000062090000162000006b1d00002e2000002c1b0000fe080000000900000f090000a7090000f1090000ba090000bb09000065090000d8b82800000000009e9828000000000016902700000000004c705700000000004cc8270000000000e4bc270000000000e8d1270000000000a0685b0000000000484f2700000000009e7627000000000000f45100000000004cab120000000000184a700000000000140100000000000000cd460000000000fc02000000000000d0b570270000000013200000000000007821da3100000000e0200000000000009a120000000000000482b10900000000e03463000000000038d7900000000000de67d00700000000840900000000000006186e000000000016935d1200000000da02000000000000eaced408000000003a240e0200000000e705000000000000fc41d50a00000000d48e9309000000002d0f0000000000003a4225090000000047020000000000002303000000000000ba7c962300000000a5210000000000006d020000000000005403000000000000e50b00000000000026922400000000006110000000000000a4122600000000001d0d000000000000520e2200000000001a0600000000000020222200000000001a0600000000000044b13c0000000000", + "docs": [ " Current cost schedule for contracts." ] }, @@ -6809,7 +6947,7 @@ "name": "PristineCode", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "CodeHash", "value": "Bytes", @@ -6817,7 +6955,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from an original code hash to the original code, untouched by instrumentation." ] }, @@ -6825,7 +6963,7 @@ "name": "CodeStorage", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "CodeHash", "value": "PrefabWasmModule", @@ -6833,7 +6971,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping between an original code hash and instrumented wasm code, ready for execution." ] }, @@ -6841,10 +6979,10 @@ "name": "AccountCounter", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The subtrie counter." ] }, @@ -6852,7 +6990,7 @@ "name": "ContractInfoOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "ContractInfo", @@ -6860,11 +6998,25 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The code associated with a given account.", "", " TWOX-NOTE: SAFE since `AccountId` is a secure hash." ] + }, + { + "name": "DeletionQueue", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "docs": [ + " Evicted contracts that await child trie deletion.", + "", + " Child trie deletion is a heavy operation depending on the amount of storage items", + " stored in said trie. Therefore this operation is performed lazily in `on_initialize`." + ] } ] }, @@ -6877,23 +7029,13 @@ "type": "Schedule" } ], - "documentation": [ + "docs": [ " Updates the schedule for metering contracts.", "", - " The schedule must have a greater version than the stored schedule." - ] - }, - { - "name": "put_code", - "args": [ - { - "name": "code", - "type": "Bytes" - } - ], - "documentation": [ - " Stores the given binary Wasm code into the chain's storage and returns its `codehash`.", - " You can instantiate contracts only with stored code." + " The schedule's version cannot be less than the version of the stored schedule.", + " If a schedule does not change the instruction weights the version does not", + " need to be increased. Therefore we allow storing a schedule that has the same", + " version as the stored one." ] }, { @@ -6909,14 +7051,14 @@ }, { "name": "gas_limit", - "type": "Compact" + "type": "Compact" }, { "name": "data", "type": "Bytes" } ], - "documentation": [ + "docs": [ " Makes a call to an account, optionally transferring some balance.", "", " * If the account is a smart-contract account, the associated code will be", @@ -6927,7 +7069,7 @@ ] }, { - "name": "instantiate", + "name": "instantiate_with_code", "args": [ { "name": "endowment", @@ -6935,11 +7077,11 @@ }, { "name": "gas_limit", - "type": "Compact" + "type": "Compact" }, { - "name": "code_hash", - "type": "CodeHash" + "name": "code", + "type": "Bytes" }, { "name": "data", @@ -6950,20 +7092,60 @@ "type": "Bytes" } ], - "documentation": [ - " Instantiates a new contract from the `code_hash` generated by `put_code`,", - " optionally transferring some balance.", + "docs": [ + " Instantiates a new contract from the supplied `code` optionally transferring", + " some balance.", + "", + " This is the only function that can deploy new code to the chain.", "", - " The supplied `salt` is used for contract address deriviation. See `fn contract_address`.", + " # Parameters", + "", + " * `endowment`: The balance to transfer from the `origin` to the newly created contract.", + " * `gas_limit`: The gas limit enforced when executing the constructor.", + " * `code`: The contract code to deploy in raw bytes.", + " * `data`: The input data to pass to the contract constructor.", + " * `salt`: Used for the address derivation. See [`Pallet::contract_address`].", "", " Instantiation is executed as follows:", "", + " - The supplied `code` is instrumented, deployed, and a `code_hash` is created for that code.", + " - If the `code_hash` already exists on the chain the underlying `code` will be shared.", " - The destination address is computed based on the sender, code_hash and the salt.", " - The smart-contract account is created at the computed address.", - " - The `ctor_code` is executed in the context of the newly-created account. Buffer returned", - " after the execution is saved as the `code` of the account. That code will be invoked", - " upon any call received by this account.", - " - The contract is initialized." + " - The `endowment` is transferred to the new account.", + " - The `deploy` function is executed in the context of the newly-created account." + ] + }, + { + "name": "instantiate", + "args": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code_hash", + "type": "CodeHash" + }, + { + "name": "data", + "type": "Bytes" + }, + { + "name": "salt", + "type": "Bytes" + } + ], + "docs": [ + " Instantiates a contract from a previously deployed wasm binary.", + "", + " This function is identical to [`Self::instantiate_with_code`] but without the", + " code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary", + " must be supplied." ] }, { @@ -6978,12 +7160,16 @@ "type": "Option" } ], - "documentation": [ - " Allows block producers to claim a small reward for evicting a contract. If a block producer", - " fails to do so, a regular users will be allowed to claim the reward.", + "docs": [ + " Allows block producers to claim a small reward for evicting a contract. If a block", + " producer fails to do so, a regular users will be allowed to claim the reward.", "", - " If contract is not evicted as a result of this call, no actions are taken and", - " the sender is not eligible for the reward." + " In case of a successful eviction no fees are charged from the sender. However, the", + " reward is capped by the total amount of rent that was payed by the contract while", + " it was alive.", + "", + " If contract is not evicted as a result of this call, [`Error::ContractNotEvictable`]", + " is returned and the sender is not eligible for the reward." ] } ], @@ -6994,24 +7180,38 @@ "AccountId", "AccountId" ], - "documentation": [ - " Contract deployed by address at the specified address. \\[owner, contract\\]" + "docs": [ + " Contract deployed by address at the specified address. \\[deployer, contract\\]" ] }, { "name": "Evicted", + "args": [ + "AccountId" + ], + "docs": [ + " Contract has been evicted and is now in tombstone state. \\[contract\\]" + ] + }, + { + "name": "Terminated", "args": [ "AccountId", - "bool" + "AccountId" ], - "documentation": [ - " Contract has been evicted and is now in tombstone state.", - " \\[contract, tombstone\\]", + "docs": [ + " Contract has been terminated without leaving a tombstone.", + " \\[contract, beneficiary\\]", "", " # Params", "", - " - `contract`: `AccountId`: The account ID of the evicted contract.", - " - `tombstone`: `bool`: True if the evicted contract left behind a tombstone." + " - `contract`: The contract that was terminated.", + " - `beneficiary`: The account that received the contracts remaining balance.", + "", + " # Note", + "", + " The only way for a contract to be removed without a tombstone and emitting", + " this event is by calling `seal_terminate`." ] }, { @@ -7022,16 +7222,16 @@ "Hash", "Balance" ], - "documentation": [ - " Restoration for a contract has been successful.", - " \\[donor, dest, code_hash, rent_allowance\\]", + "docs": [ + " Restoration of a contract has been successful.", + " \\[restorer, dest, code_hash, rent_allowance\\]", "", " # Params", "", - " - `donor`: `AccountId`: Account ID of the restoring contract", - " - `dest`: `AccountId`: Account ID of the restored contract", - " - `code_hash`: `Hash`: Code hash of the restored contract", - " - `rent_allowance: `Balance`: Rent allowance of the restored contract" + " - `restorer`: Account ID of the restoring contract.", + " - `dest`: Account ID of the restored contract.", + " - `code_hash`: Code hash of the restored contract.", + " - `rent_allowance`: Rent allowance of the restored contract." ] }, { @@ -7039,9 +7239,8 @@ "args": [ "Hash" ], - "documentation": [ - " Code with the specified hash has been stored.", - " \\[code_hash\\]" + "docs": [ + " Code with the specified hash has been stored. \\[code_hash\\]" ] }, { @@ -7049,19 +7248,42 @@ "args": [ "u32" ], - "documentation": [ - " Triggered when the current \\[schedule\\] is updated." + "docs": [ + " Triggered when the current schedule is updated.", + " \\[version\\]", + "", + " # Params", + "", + " - `version`: The version of the newly set schedule." ] }, { - "name": "ContractExecution", + "name": "ContractEmitted", "args": [ "AccountId", "Bytes" ], - "documentation": [ - " An event deposited upon execution of a contract from the account.", - " \\[account, data\\]" + "docs": [ + " A custom event emitted by the contract.", + " \\[contract, data\\]", + "", + " # Params", + "", + " - `contract`: The contract that emitted the event.", + " - `data`: Data supplied by the contract. Metadata generated during contract", + " compilation is needed to decode it." + ] + }, + { + "name": "CodeRemoved", + "args": [ + "Hash" + ], + "docs": [ + " A code with the specified hash was removed.", + " \\[code_hash\\]", + "", + " This happens when the last contract that uses this code hash was removed or evicted." ] } ], @@ -7070,7 +7292,7 @@ "name": "SignedClaimHandicap", "type": "BlockNumber", "value": "0x02000000", - "documentation": [ + "docs": [ " Number of block delay an extrinsic claim surcharge has.", "", " When claim surcharge is called by an extrinsic the rent is checked", @@ -7080,39 +7302,32 @@ { "name": "TombstoneDeposit", "type": "BalanceOf", - "value": "0x00a0acb9030000000000000000000000", - "documentation": [ + "value": "0x00f0e8857a9c02000000000000000000", + "docs": [ " The minimum amount required to generate a tombstone." ] }, { - "name": "StorageSizeOffset", - "type": "u32", - "value": "0x08000000", - "documentation": [ - " A size offset for an contract. A just created account with untouched storage will have that", - " much of storage from the perspective of the state rent.", - "", - " This is a simple way to ensure that contracts with empty storage eventually get deleted", - " by making them pay rent. This creates an incentive to remove them early in order to save", - " rent." - ] - }, - { - "name": "RentByteFee", + "name": "DepositPerContract", "type": "BalanceOf", - "value": "0x00286bee000000000000000000000000", - "documentation": [ - " Price of a byte of storage per one block interval. Should be greater than 0." + "value": "0x00f0e8857a9c02000000000000000000", + "docs": [ + " The balance every contract needs to deposit to stay alive indefinitely.", + "", + " This is different from the [`Self::TombstoneDeposit`] because this only needs to be", + " deposited while the contract is alive. Costs for additional storage are added to", + " this base cost.", + "", + " This is a simple way to ensure that contracts with empty storage eventually get deleted by", + " making them pay rent. This creates an incentive to remove them early in order to save rent." ] }, { - "name": "RentDepositOffset", + "name": "DepositPerStorageByte", "type": "BalanceOf", - "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ - " The amount of funds a contract should deposit in order to offset", - " the cost of one byte.", + "value": "0x0060defb740500000000000000000000", + "docs": [ + " The balance a contract needs to deposit per storage byte to stay alive indefinitely.", "", " Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,", " then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent.", @@ -7120,11 +7335,33 @@ " then it would pay 500 BU/day." ] }, + { + "name": "DepositPerStorageItem", + "type": "BalanceOf", + "value": "0x00f0ab75a40d00000000000000000000", + "docs": [ + " The balance a contract needs to deposit per storage item to stay alive indefinitely.", + "", + " It works the same as [`Self::DepositPerStorageByte`] but for storage items." + ] + }, + { + "name": "RentFraction", + "type": "Perbill", + "value": "0x85040000", + "docs": [ + " The fraction of the deposit that should be used as rent per block.", + "", + " When a contract hasn't enough balance deposited to stay alive indefinitely it needs", + " to pay per block for the storage it consumes that is not covered by the deposit.", + " This determines how high this rent payment is per block as a fraction of the deposit." + ] + }, { "name": "SurchargeReward", "type": "BalanceOf", "value": "0x005cb2ec220000000000000000000000", - "documentation": [ + "docs": [ " Reward that is received by the party whose touch has led", " to removal of a contract." ] @@ -7133,72 +7370,97 @@ "name": "MaxDepth", "type": "u32", "value": "0x20000000", - "documentation": [ - " The maximum nesting level of a call/instantiate stack. A reasonable default", - " value is 100." + "docs": [ + " The maximum nesting level of a call/instantiate stack." ] }, { "name": "MaxValueSize", "type": "u32", "value": "0x00400000", - "documentation": [ - " The maximum size of a storage value in bytes. A reasonable default is 16 KiB." + "docs": [ + " The maximum size of a storage value and event payload in bytes." + ] + }, + { + "name": "DeletionQueueDepth", + "type": "u32", + "value": "0xf0000000", + "docs": [ + " The maximum number of tries that can be queued for deletion." + ] + }, + { + "name": "DeletionWeightLimit", + "type": "Weight", + "value": "0x00d0ed902e000000", + "docs": [ + " The maximum amount of weight that can be consumed per block for lazy trie removal." + ] + }, + { + "name": "MaxCodeSize", + "type": "u32", + "value": "0x00000200", + "docs": [ + " The maximum length of a contract code in bytes. This limit applies to the instrumented", + " version of the code. Therefore `instantiate_with_code` can fail even when supplying", + " a wasm binary below this maximum size." ] } ], "errors": [ { "name": "InvalidScheduleVersion", - "documentation": [ + "docs": [ " A new schedule must have a greater version than the current one." ] }, { "name": "InvalidSurchargeClaim", - "documentation": [ + "docs": [ " An origin must be signed or inherent and auxiliary sender only provided on inherent." ] }, { "name": "InvalidSourceContract", - "documentation": [ + "docs": [ " Cannot restore from nonexisting or tombstone contract." ] }, { "name": "InvalidDestinationContract", - "documentation": [ + "docs": [ " Cannot restore to nonexisting or alive contract." ] }, { "name": "InvalidTombstone", - "documentation": [ + "docs": [ " Tombstones don't match." ] }, { "name": "InvalidContractOrigin", - "documentation": [ + "docs": [ " An origin TrieId written in the current block." ] }, { "name": "OutOfGas", - "documentation": [ + "docs": [ " The executed contract exhausted its gas limit." ] }, { "name": "OutputBufferTooSmall", - "documentation": [ + "docs": [ " The output buffer supplied to a contract API call was too small." ] }, { "name": "BelowSubsistenceThreshold", - "documentation": [ + "docs": [ " Performing the requested transfer would have brought the contract below", " the subsistence threshold. No transfer is allowed to do this in order to allow", " for a tombstone to be created. Use `seal_terminate` to remove a contract without", @@ -7207,14 +7469,14 @@ }, { "name": "NewContractNotFunded", - "documentation": [ + "docs": [ " The newly created contract is below the subsistence threshold after executing", " its contructor. No contracts are allowed to exist below that threshold." ] }, { "name": "TransferFailed", - "documentation": [ + "docs": [ " Performing the requested transfer failed for a reason originating in the", " chosen currency implementation of the runtime. Most probably the balance is", " too low or locks are placed on it." @@ -7222,64 +7484,131 @@ }, { "name": "MaxCallDepthReached", - "documentation": [ + "docs": [ " Performing a call was denied because the calling depth reached the limit", " of what is specified in the schedule." ] }, { "name": "NotCallable", - "documentation": [ + "docs": [ " The contract that was called is either no contract at all (a plain account)", " or is a tombstone." ] }, { "name": "CodeTooLarge", - "documentation": [ - " The code supplied to `put_code` exceeds the limit specified in the current schedule." + "docs": [ + " The code supplied to `instantiate_with_code` exceeds the limit specified in the", + " current schedule." ] }, { "name": "CodeNotFound", - "documentation": [ + "docs": [ " No code could be found at the supplied code hash." ] }, { "name": "OutOfBounds", - "documentation": [ + "docs": [ " A buffer outside of sandbox memory was passed to a contract API function." ] }, { "name": "DecodingFailed", - "documentation": [ + "docs": [ " Input passed to a contract API function failed to decode as expected type." ] }, { "name": "ContractTrapped", - "documentation": [ + "docs": [ " Contract trapped during execution." ] }, { "name": "ValueTooLarge", - "documentation": [ + "docs": [ " The size defined in `T::MaxValueSize` was exceeded." ] }, { "name": "ReentranceDenied", - "documentation": [ + "docs": [ " The action performed is not allowed while the contract performing it is already", " on the call stack. Those actions are contract self destruction and restoration", " of a tombstone." ] + }, + { + "name": "InputAlreadyRead", + "docs": [ + " `seal_input` was called twice from the same contract execution context." + ] + }, + { + "name": "RandomSubjectTooLong", + "docs": [ + " The subject passed to `seal_random` exceeds the limit." + ] + }, + { + "name": "TooManyTopics", + "docs": [ + " The amount of topics passed to `seal_deposit_events` exceeds the limit." + ] + }, + { + "name": "DuplicateTopics", + "docs": [ + " The topics passed to `seal_deposit_events` contains at least one duplicate." + ] + }, + { + "name": "NoChainExtension", + "docs": [ + " The chain does not provide a chain extension. Calling the chain extension results", + " in this error. Note that this usually shouldn't happen as deploying such contracts", + " is rejected." + ] + }, + { + "name": "DeletionQueueFull", + "docs": [ + " Removal of a contract failed because the deletion queue is full.", + "", + " This can happen when either calling [`Pallet::claim_surcharge`] or `seal_terminate`.", + " The queue is filled by deleting contracts and emptied by a fixed amount each block.", + " Trying again during another block is the only way to resolve this issue." + ] + }, + { + "name": "ContractNotEvictable", + "docs": [ + " A contract could not be evicted because it has enough balance to pay rent.", + "", + " This can be returned from [`Pallet::claim_surcharge`] because the target", + " contract has enough balance to pay for its rent." + ] + }, + { + "name": "StorageExhausted", + "docs": [ + " A storage modification exhausted the 32bit type that holds the storage size.", + "", + " This can either happen when the accumulated storage in bytes is too large or", + " when number of storage items is too large." + ] + }, + { + "name": "DuplicateContract", + "docs": [ + " A contract with the same AccountId already exists." + ] } ], - "index": 17 + "index": 18 }, { "name": "Sudo", @@ -7290,10 +7619,10 @@ "name": "Key", "modifier": "Default", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The `AccountId` of the sudo key." ] } @@ -7308,7 +7637,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Root` origin.", "", " The dispatch origin for this call must be _Signed_.", @@ -7333,7 +7662,7 @@ "type": "Weight" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Root` origin.", " This function does not check the weight of the call, and instead allows the", " Sudo user to specify the weight of the call.", @@ -7354,7 +7683,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", "", " The dispatch origin for this call must be _Signed_.", @@ -7378,7 +7707,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Signed` origin from", " a given account.", "", @@ -7399,7 +7728,7 @@ "args": [ "DispatchResult" ], - "documentation": [ + "docs": [ " A sudo just took place. \\[result\\]" ] }, @@ -7408,7 +7737,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " The \\[sudoer\\] just switched identity; the old key is supplied." ] }, @@ -7417,7 +7746,7 @@ "args": [ "DispatchResult" ], - "documentation": [ + "docs": [ " A sudo just took place. \\[result\\]" ] } @@ -7426,12 +7755,12 @@ "errors": [ { "name": "RequireSudo", - "documentation": [ + "docs": [ " Sender must be the Sudo account" ] } ], - "index": 18 + "index": 19 }, { "name": "ImOnline", @@ -7442,26 +7771,31 @@ "name": "HeartbeatAfter", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ - " The block number after which it's ok to send heartbeats in current session.", + "docs": [ + " The block number after which it's ok to send heartbeats in the current", + " session.", + "", + " At the beginning of each session we set this to a value that should fall", + " roughly in the middle of the session duration. The idea is to first wait for", + " the validators to produce a block in the current session, so that the", + " heartbeat later on will not be necessary.", "", - " At the beginning of each session we set this to a value that should", - " fall roughly in the middle of the session duration.", - " The idea is to first wait for the validators to produce a block", - " in the current session, so that the heartbeat later on will not be necessary." + " This value will only be used as a fallback if we fail to get a proper session", + " progress estimate from `NextSessionRotation`, as those estimates should be", + " more accurate then the value we calculate for `HeartbeatAfter`." ] }, { "name": "Keys", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of keys that may issue a heartbeat." ] }, @@ -7469,7 +7803,7 @@ "name": "ReceivedHeartbeats", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "SessionIndex", "key2": "AuthIndex", @@ -7478,7 +7812,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " For each session index, we keep a mapping of `AuthIndex` to", " `offchain::OpaqueNetworkState`." ] @@ -7487,7 +7821,7 @@ "name": "AuthoredBlocks", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "SessionIndex", "key2": "ValidatorId", @@ -7496,8 +7830,8 @@ } }, "fallback": "0x00000000", - "documentation": [ - " For each session index, we keep a mapping of `T::ValidatorId` to the", + "docs": [ + " For each session index, we keep a mapping of `ValidatorId` to the", " number of blocks authored by the given authority." ] } @@ -7516,7 +7850,7 @@ "type": "Signature" } ], - "documentation": [ + "docs": [ " # ", " - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len)", " and E is length of `heartbeat.network_state.external_address`", @@ -7535,14 +7869,14 @@ "args": [ "AuthorityId" ], - "documentation": [ + "docs": [ " A new heartbeat was received from `AuthorityId` \\[authority_id\\]" ] }, { "name": "AllGood", "args": [], - "documentation": [ + "docs": [ " At the end of the session, no offence was committed." ] }, @@ -7551,7 +7885,7 @@ "args": [ "Vec" ], - "documentation": [ + "docs": [ " At the end of the session, at least one validator was found to be \\[offline\\]." ] } @@ -7560,18 +7894,18 @@ "errors": [ { "name": "InvalidKey", - "documentation": [ + "docs": [ " Non existent public key." ] }, { "name": "DuplicatedHeartbeat", - "documentation": [ + "docs": [ " Duplicated heartbeat." ] } ], - "index": 19 + "index": 20 }, { "name": "AuthorityDiscovery", @@ -7580,7 +7914,7 @@ "events": null, "constants": [], "errors": [], - "index": 20 + "index": 21 }, { "name": "Offences", @@ -7591,7 +7925,7 @@ "name": "Reports", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "ReportIdOf", "value": "OffenceDetails", @@ -7599,7 +7933,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The primary structure that holds all offence records keyed by report identifiers." ] }, @@ -7607,10 +7941,10 @@ "name": "DeferredOffences", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Deferred reports that have been rejected by the offence handler and need to be submitted", " at a later time." ] @@ -7619,7 +7953,7 @@ "name": "ConcurrentReportsIndex", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "Kind", "key2": "OpaqueTimeSlot", @@ -7628,7 +7962,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A vector of reports of the same kind that happened at the same time slot." ] }, @@ -7636,7 +7970,7 @@ "name": "ReportsByKindIndex", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "Kind", "value": "Bytes", @@ -7644,7 +7978,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Enumerates all reports of a kind along with the time they happened.", "", " All reports are sorted by the time of offence.", @@ -7664,7 +7998,7 @@ "OpaqueTimeSlot", "bool" ], - "documentation": [ + "docs": [ " There is an offence reported of the given `kind` happened at the `session_index` and", " (kind-specific) time slot. This event is not deposited for duplicate slashes. last", " element indicates of the offence was applied (true) or queued (false)", @@ -7674,7 +8008,7 @@ ], "constants": [], "errors": [], - "index": 21 + "index": 22 }, { "name": "Historical", @@ -7683,7 +8017,7 @@ "events": null, "constants": [], "errors": [], - "index": 22 + "index": 23 }, { "name": "RandomnessCollectiveFlip", @@ -7694,10 +8028,10 @@ "name": "RandomMaterial", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Series of block headers from the last 81 blocks that acts as random seed material. This", " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", " the oldest hash." @@ -7709,7 +8043,7 @@ "events": null, "constants": [], "errors": [], - "index": 23 + "index": 24 }, { "name": "Identity", @@ -7720,7 +8054,7 @@ "name": "IdentityOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "Registration", @@ -7728,7 +8062,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information that is pertinent to identify the entity behind an account.", "", " TWOX-NOTE: OK ― `AccountId` is a secure hash." @@ -7738,7 +8072,7 @@ "name": "SuperOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "(AccountId,Data)", @@ -7746,7 +8080,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The super-identity of an alternative \"sub\" identity together with its name, within that", " context. If the account is not some other account's sub-identity, then just `None`." ] @@ -7755,7 +8089,7 @@ "name": "SubsOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "(BalanceOf,Vec)", @@ -7763,7 +8097,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " Alternative \"sub\" identities of this account.", "", " The first item is the deposit, the second is a vector of the accounts.", @@ -7775,10 +8109,10 @@ "name": "Registrars", "modifier": "Default", "type": { - "Plain": "Vec>" + "plain": "Vec>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of registrars. Not expected to get very big as can only be added through a", " special origin (likely a council motion).", "", @@ -7796,7 +8130,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Add a registrar to the system.", "", " The dispatch origin for this call must be `T::RegistrarOrigin`.", @@ -7820,7 +8154,7 @@ "type": "IdentityInfo" } ], - "documentation": [ + "docs": [ " Set an account's identity information and reserve the appropriate deposit.", "", " If the account already has identity information, the deposit is taken as part payment", @@ -7850,7 +8184,7 @@ "type": "Vec<(AccountId,Data)>" } ], - "documentation": [ + "docs": [ " Set the sub-accounts of the sender.", "", " Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", @@ -7877,7 +8211,7 @@ { "name": "clear_identity", "args": [], - "documentation": [ + "docs": [ " Clear an account's identity info and all sub-accounts and return all deposits.", "", " Payment: All reserved balances on the account are returned.", @@ -7910,7 +8244,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Request a judgement from a registrar.", "", " Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", @@ -7944,7 +8278,7 @@ "type": "RegistrarIndex" } ], - "documentation": [ + "docs": [ " Cancel a previous request.", "", " Payment: A previously reserved deposit is returned on success.", @@ -7976,7 +8310,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the fee required for a judgement to be requested from a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8004,7 +8338,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Change the account associated with a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8032,7 +8366,7 @@ "type": "IdentityFields" } ], - "documentation": [ + "docs": [ " Set the field information for a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8064,7 +8398,7 @@ "type": "IdentityJudgement" } ], - "documentation": [ + "docs": [ " Provide a judgement for an account's identity.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8094,7 +8428,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove an account's identity and sub-account information and slash the deposits.", "", " Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", @@ -8128,7 +8462,7 @@ "type": "Data" } ], - "documentation": [ + "docs": [ " Add the given account to the sender's subs.", "", " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", @@ -8150,7 +8484,7 @@ "type": "Data" } ], - "documentation": [ + "docs": [ " Alter the associated name of the given sub-account.", "", " The dispatch origin for this call must be _Signed_ and the sender must have a registered", @@ -8165,7 +8499,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove the given account from the sender's subs.", "", " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", @@ -8178,7 +8512,7 @@ { "name": "quit_sub", "args": [], - "documentation": [ + "docs": [ " Remove the sender as a sub-account.", "", " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", @@ -8198,7 +8532,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A name was set or reset (which will remove all judgements). \\[who\\]" ] }, @@ -8208,7 +8542,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was cleared, and the given balance returned. \\[who, deposit\\]" ] }, @@ -8218,7 +8552,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was removed and the given balance slashed. \\[who, deposit\\]" ] }, @@ -8228,7 +8562,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement was asked from a registrar. \\[who, registrar_index\\]" ] }, @@ -8238,7 +8572,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement request was retracted. \\[who, registrar_index\\]" ] }, @@ -8248,7 +8582,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement was given by a registrar. \\[target, registrar_index\\]" ] }, @@ -8257,7 +8591,7 @@ "args": [ "RegistrarIndex" ], - "documentation": [ + "docs": [ " A registrar was added. \\[registrar_index\\]" ] }, @@ -8268,7 +8602,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A sub-identity was added to an identity and the deposit paid. \\[sub, main, deposit\\]" ] }, @@ -8279,7 +8613,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A sub-identity was removed from an identity and the deposit freed.", " \\[sub, main, deposit\\]" ] @@ -8291,7 +8625,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A sub-identity was cleared, and the given deposit repatriated from the", " main identity account to the sub-identity account. \\[sub, main, deposit\\]" ] @@ -8302,7 +8636,7 @@ "name": "BasicDeposit", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for a registered identity." ] }, @@ -8310,7 +8644,7 @@ "name": "FieldDeposit", "type": "BalanceOf", "value": "0x00a031a95fe300000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit per additional field for a registered identity." ] }, @@ -8318,7 +8652,7 @@ "name": "SubAccountDeposit", "type": "BalanceOf", "value": "0x0080f420e6b500000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for a registered subaccount. This should account for the fact", " that one storage item's value will increase by the size of an account ID, and there will be", " another trie item whose value is the size of an account ID plus 32 bytes." @@ -8328,7 +8662,7 @@ "name": "MaxSubAccounts", "type": "u32", "value": "0x64000000", - "documentation": [ + "docs": [ " The maximum number of sub-accounts allowed per identified account." ] }, @@ -8336,7 +8670,7 @@ "name": "MaxAdditionalFields", "type": "u32", "value": "0x64000000", - "documentation": [ + "docs": [ " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O", " required to access an identity, but can be pretty high." ] @@ -8345,7 +8679,7 @@ "name": "MaxRegistrars", "type": "u32", "value": "0x14000000", - "documentation": [ + "docs": [ " Maxmimum number of registrars allowed in the system. Needed to bound the complexity", " of, e.g., updating judgements." ] @@ -8354,102 +8688,102 @@ "errors": [ { "name": "TooManySubAccounts", - "documentation": [ + "docs": [ " Too many subs-accounts." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Account isn't found." ] }, { "name": "NotNamed", - "documentation": [ + "docs": [ " Account isn't named." ] }, { "name": "EmptyIndex", - "documentation": [ + "docs": [ " Empty index." ] }, { "name": "FeeChanged", - "documentation": [ + "docs": [ " Fee is changed." ] }, { "name": "NoIdentity", - "documentation": [ + "docs": [ " No identity found." ] }, { "name": "StickyJudgement", - "documentation": [ + "docs": [ " Sticky judgement." ] }, { "name": "JudgementGiven", - "documentation": [ + "docs": [ " Judgement given." ] }, { "name": "InvalidJudgement", - "documentation": [ + "docs": [ " Invalid judgement." ] }, { "name": "InvalidIndex", - "documentation": [ + "docs": [ " The index is invalid." ] }, { "name": "InvalidTarget", - "documentation": [ + "docs": [ " The target is invalid." ] }, { "name": "TooManyFields", - "documentation": [ + "docs": [ " Too many additional fields." ] }, { "name": "TooManyRegistrars", - "documentation": [ + "docs": [ " Maximum amount of registrars reached. Cannot add any more." ] }, { "name": "AlreadyClaimed", - "documentation": [ + "docs": [ " Account ID is already named." ] }, { "name": "NotSub", - "documentation": [ + "docs": [ " Sender is not a sub-account." ] }, { "name": "NotOwned", - "documentation": [ + "docs": [ " Sub-account isn't owned by sender." ] } ], - "index": 24 + "index": 25 }, { "name": "Society", @@ -8460,10 +8794,10 @@ "name": "Founder", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The first member." ] }, @@ -8471,10 +8805,10 @@ "name": "Rules", "modifier": "Optional", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A hash of the rules of this society concerning membership. Can only be set once and", " only by the founder." ] @@ -8483,10 +8817,10 @@ "name": "Candidates", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of candidates; bidders that are attempting to become members." ] }, @@ -8494,7 +8828,7 @@ "name": "SuspendedCandidates", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "(BalanceOf,BidKind)", @@ -8502,7 +8836,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of suspended candidates." ] }, @@ -8510,10 +8844,10 @@ "name": "Pot", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " Amount of our account balance that is specifically for the next round's bid(s)." ] }, @@ -8521,10 +8855,10 @@ "name": "Head", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The most primary from the most recently approved members." ] }, @@ -8532,10 +8866,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of members, ordered." ] }, @@ -8543,7 +8877,7 @@ "name": "SuspendedMembers", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "bool", @@ -8551,7 +8885,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of suspended members." ] }, @@ -8559,10 +8893,10 @@ "name": "Bids", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current bids, stored ordered by the value of the bid." ] }, @@ -8570,7 +8904,7 @@ "name": "Vouching", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "VouchingStatus", @@ -8578,7 +8912,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Members currently vouching or banned from vouching again" ] }, @@ -8586,7 +8920,7 @@ "name": "Payouts", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "Vec<(BlockNumber,BalanceOf)>", @@ -8594,7 +8928,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending payouts; ordered by block number, with the amount that should be paid out." ] }, @@ -8602,7 +8936,7 @@ "name": "Strikes", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "StrikeCount", @@ -8610,7 +8944,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The ongoing number of losing votes cast by the member." ] }, @@ -8618,7 +8952,7 @@ "name": "Votes", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "AccountId", "key2": "AccountId", @@ -8627,7 +8961,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Double map from Candidate -> Voter -> (Maybe) Vote." ] }, @@ -8635,10 +8969,10 @@ "name": "Defender", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The defending member currently being challenged." ] }, @@ -8646,7 +8980,7 @@ "name": "DefenderVotes", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "SocietyVote", @@ -8654,7 +8988,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes for the defender." ] }, @@ -8662,10 +8996,10 @@ "name": "MaxMembers", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The max number of members for the society at one time." ] } @@ -8680,7 +9014,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " A user outside of the society can make a bid for entry.", "", " Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", @@ -8724,7 +9058,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " A bidder can remove their bid for entry into society.", " By doing so, they will have their candidate deposit returned or", " they will unvouch their voucher.", @@ -8762,7 +9096,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " As a member, vouch for someone to join society by placing a bid on their behalf.", "", " There is no deposit required to vouch for a new bid, but a member can only vouch for", @@ -8817,7 +9151,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " As a vouching member, unvouch a bid. This only works while vouched user is", " only a bidder (and not a candidate).", "", @@ -8849,7 +9183,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " As a member, vote on a candidate.", "", " The dispatch origin for this call must be _Signed_ and a member.", @@ -8879,7 +9213,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " As a member, vote on the defender.", "", " The dispatch origin for this call must be _Signed_ and a member.", @@ -8901,7 +9235,7 @@ { "name": "payout", "args": [], - "documentation": [ + "docs": [ " Transfer the first matured payout for the sender and remove it from the records.", "", " NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts.", @@ -8940,7 +9274,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Found the society.", "", " This is done as a discrete action in order to allow for the", @@ -8965,7 +9299,7 @@ { "name": "unfound", "args": [], - "documentation": [ + "docs": [ " Annul the founding of the society.", "", " The dispatch origin for this call must be Signed, and the signing account must be both", @@ -8993,7 +9327,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Allow suspension judgement origin to make judgement on a suspended member.", "", " If a suspended member is forgiven, we simply add them back as a member, not affecting", @@ -9035,7 +9369,7 @@ "type": "SocietyJudgement" } ], - "documentation": [ + "docs": [ " Allow suspended judgement origin to make judgement on a suspended candidate.", "", " If the judgement is `Approve`, we add them to society as a member with the appropriate", @@ -9086,7 +9420,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Allows root origin to change the maximum number of members in society.", " Max membership count must be greater than 1.", "", @@ -9110,7 +9444,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " The society is founded by the given identity. \\[founder\\]" ] }, @@ -9120,7 +9454,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A membership bid just happened. The given account is the candidate's ID and their offer", " is the second. \\[candidate_id, offer\\]" ] @@ -9132,7 +9466,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A membership bid just happened by vouching. The given account is the candidate's ID and", " their offer is the second. The vouching party is the third. \\[candidate_id, offer, vouching\\]" ] @@ -9142,7 +9476,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[candidate\\] was dropped (due to an excess of bids in the system)." ] }, @@ -9151,7 +9485,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[candidate\\] was dropped (by their request)." ] }, @@ -9160,7 +9494,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[candidate\\] was dropped (by request of who vouched for them)." ] }, @@ -9170,7 +9504,7 @@ "AccountId", "Vec" ], - "documentation": [ + "docs": [ " A group of candidates have been inducted. The batch's primary is the first value, the", " batch in full is the second. \\[primary, candidates\\]" ] @@ -9181,7 +9515,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A suspended member has been judged. \\[who, judged\\]" ] }, @@ -9190,7 +9524,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[candidate\\] has been suspended" ] }, @@ -9199,7 +9533,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[member\\] has been suspended" ] }, @@ -9208,7 +9542,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[member\\] has been challenged" ] }, @@ -9219,7 +9553,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A vote has been placed \\[candidate, voter, vote\\]" ] }, @@ -9229,7 +9563,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A vote has been placed for a defending member \\[voter, vote\\]" ] }, @@ -9238,7 +9572,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " A new \\[max\\] member count has been set" ] }, @@ -9247,7 +9581,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " Society is unfounded. \\[founder\\]" ] }, @@ -9256,7 +9590,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some funds were deposited into the society account. \\[value\\]" ] } @@ -9266,7 +9600,7 @@ "name": "CandidateDeposit", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [ + "docs": [ " The minimum amount of a deposit required for a bid to be made." ] }, @@ -9274,7 +9608,7 @@ "name": "WrongSideDeduction", "type": "BalanceOf", "value": "0x0080f420e6b500000000000000000000", - "documentation": [ + "docs": [ " The amount of the unpaid reward that gets deducted in the case that either a skeptic", " doesn't vote or someone votes in the wrong way." ] @@ -9283,7 +9617,7 @@ "name": "MaxStrikes", "type": "u32", "value": "0x0a000000", - "documentation": [ + "docs": [ " The number of times a member may vote the wrong way (or not at all, when they are a skeptic)", " before they become suspended." ] @@ -9292,7 +9626,7 @@ "name": "PeriodSpend", "type": "BalanceOf", "value": "0x0000c52ebca2b1000000000000000000", - "documentation": [ + "docs": [ " The amount of incentive paid within each period. Doesn't include VoterTip." ] }, @@ -9300,7 +9634,7 @@ "name": "RotationPeriod", "type": "BlockNumber", "value": "0x00770100", - "documentation": [ + "docs": [ " The number of blocks between candidate/membership rotation periods." ] }, @@ -9308,130 +9642,138 @@ "name": "ChallengePeriod", "type": "BlockNumber", "value": "0x80130300", - "documentation": [ + "docs": [ " The number of blocks between membership challenges." ] }, { - "name": "ModuleId", - "type": "ModuleId", + "name": "PalletId", + "type": "PalletId", "value": "0x70792f736f636965", - "documentation": [ + "docs": [ " The societies's module id" ] + }, + { + "name": "MaxCandidateIntake", + "type": "u32", + "value": "0x0a000000", + "docs": [ + " Maximum candidate intake per round." + ] } ], "errors": [ { "name": "BadPosition", - "documentation": [ + "docs": [ " An incorrect position was provided." ] }, { "name": "NotMember", - "documentation": [ + "docs": [ " User is not a member." ] }, { "name": "AlreadyMember", - "documentation": [ + "docs": [ " User is already a member." ] }, { "name": "Suspended", - "documentation": [ + "docs": [ " User is suspended." ] }, { "name": "NotSuspended", - "documentation": [ + "docs": [ " User is not suspended." ] }, { "name": "NoPayout", - "documentation": [ + "docs": [ " Nothing to payout." ] }, { "name": "AlreadyFounded", - "documentation": [ + "docs": [ " Society already founded." ] }, { "name": "InsufficientPot", - "documentation": [ + "docs": [ " Not enough in pot to accept candidate." ] }, { "name": "AlreadyVouching", - "documentation": [ + "docs": [ " Member is already vouching or banned from vouching again." ] }, { "name": "NotVouching", - "documentation": [ + "docs": [ " Member is not vouching." ] }, { "name": "Head", - "documentation": [ + "docs": [ " Cannot remove the head of the chain." ] }, { "name": "Founder", - "documentation": [ + "docs": [ " Cannot remove the founder." ] }, { "name": "AlreadyBid", - "documentation": [ + "docs": [ " User has already made a bid." ] }, { "name": "AlreadyCandidate", - "documentation": [ + "docs": [ " User is already a candidate." ] }, { "name": "NotCandidate", - "documentation": [ + "docs": [ " User is not a candidate." ] }, { "name": "MaxMembers", - "documentation": [ + "docs": [ " Too many members in the society." ] }, { "name": "NotFounder", - "documentation": [ + "docs": [ " The caller is not the founder." ] }, { "name": "NotHead", - "documentation": [ + "docs": [ " The caller is not the head." ] } ], - "index": 25 + "index": 26 }, { "name": "Recovery", @@ -9442,7 +9784,7 @@ "name": "Recoverable", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "RecoveryConfig", @@ -9450,7 +9792,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of recoverable accounts and their recovery configuration." ] }, @@ -9458,7 +9800,7 @@ "name": "ActiveRecoveries", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "AccountId", "key2": "AccountId", @@ -9467,7 +9809,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Active recovery attempts.", "", " First account is the account to be recovered, and the second account", @@ -9478,7 +9820,7 @@ "name": "Proxy", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "AccountId", @@ -9486,7 +9828,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The list of allowed proxy accounts.", "", " Map from the user who can access it to the recovered account." @@ -9507,7 +9849,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Send a call through a recovered account.", "", " The dispatch origin for this call must be _Signed_ and registered to", @@ -9535,7 +9877,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow ROOT to bypass the recovery process and set an a rescuer account", " for a lost account directly.", "", @@ -9567,7 +9909,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Create a recovery configuration for your account. This makes your account recoverable.", "", " Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", @@ -9605,7 +9947,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Initiate the process for recovering a recoverable account.", "", " Payment: `RecoveryDeposit` balance will be reserved for initiating the", @@ -9642,7 +9984,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow a \"friend\" of a recoverable account to vouch for an active recovery", " process for that account.", "", @@ -9678,7 +10020,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow a successful rescuer to claim their recovered account.", "", " The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", @@ -9709,7 +10051,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " As the controller of a recoverable account, close an active recovery", " process for your account.", "", @@ -9735,7 +10077,7 @@ { "name": "remove_recovery", "args": [], - "documentation": [ + "docs": [ " Remove the recovery process for your account. Recovered accounts are still accessible.", "", " NOTE: The user must make sure to call `close_recovery` on all active", @@ -9767,7 +10109,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Cancel the ability to use `as_recovered` for `account`.", "", " The dispatch origin for this call must be _Signed_ and registered to", @@ -9788,7 +10130,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been set up for an \\[account\\]." ] }, @@ -9798,7 +10140,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been initiated for lost account by rescuer account.", " \\[lost, rescuer\\]" ] @@ -9810,7 +10152,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process for lost account by rescuer account has been vouched for by sender.", " \\[lost, rescuer, sender\\]" ] @@ -9821,7 +10163,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process for lost account by rescuer account has been closed.", " \\[lost, rescuer\\]" ] @@ -9832,7 +10174,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Lost account has been successfully recovered by rescuer account.", " \\[lost, rescuer\\]" ] @@ -9842,7 +10184,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been removed for an \\[account\\]." ] } @@ -9852,7 +10194,7 @@ "name": "ConfigDepositBase", "type": "BalanceOf", "value": "0x00406352bfc601000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for creating a recovery configuration." ] }, @@ -9860,7 +10202,7 @@ "name": "FriendDepositFactor", "type": "BalanceOf", "value": "0x00203d88792d00000000000000000000", - "documentation": [ + "docs": [ " The amount of currency needed per additional user when creating a recovery configuration." ] }, @@ -9868,7 +10210,7 @@ "name": "MaxFriends", "type": "u16", "value": "0x0900", - "documentation": [ + "docs": [ " The maximum amount of friends allowed in a recovery configuration." ] }, @@ -9876,7 +10218,7 @@ "name": "RecoveryDeposit", "type": "BalanceOf", "value": "0x00406352bfc601000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for starting a recovery." ] } @@ -9884,102 +10226,108 @@ "errors": [ { "name": "NotAllowed", - "documentation": [ + "docs": [ " User is not allowed to make a call on behalf of this account" ] }, { "name": "ZeroThreshold", - "documentation": [ + "docs": [ " Threshold must be greater than zero" ] }, { "name": "NotEnoughFriends", - "documentation": [ + "docs": [ " Friends list must be greater than zero and threshold" ] }, { "name": "MaxFriends", - "documentation": [ + "docs": [ " Friends list must be less than max friends" ] }, { "name": "NotSorted", - "documentation": [ + "docs": [ " Friends list must be sorted and free of duplicates" ] }, { "name": "NotRecoverable", - "documentation": [ + "docs": [ " This account is not set up for recovery" ] }, { "name": "AlreadyRecoverable", - "documentation": [ + "docs": [ " This account is already set up for recovery" ] }, { "name": "AlreadyStarted", - "documentation": [ + "docs": [ " A recovery process has already started for this account" ] }, { "name": "NotStarted", - "documentation": [ + "docs": [ " A recovery process has not started for this rescuer" ] }, { "name": "NotFriend", - "documentation": [ + "docs": [ " This account is not a friend who can vouch" ] }, { "name": "DelayPeriod", - "documentation": [ + "docs": [ " The friend must wait until the delay period to vouch for this recovery" ] }, { "name": "AlreadyVouched", - "documentation": [ + "docs": [ " This user has already vouched for this recovery" ] }, { "name": "Threshold", - "documentation": [ + "docs": [ " The threshold for recovering this account has not been met" ] }, { "name": "StillActive", - "documentation": [ + "docs": [ " There are still active recovery attempts that need to be closed" ] }, { "name": "Overflow", - "documentation": [ + "docs": [ " There was an overflow in a calculation" ] }, { "name": "AlreadyProxy", - "documentation": [ + "docs": [ " This account is already set up for recovery" ] + }, + { + "name": "BadState", + "docs": [ + " Some internal state is broken." + ] } ], - "index": 26 + "index": 27 }, { "name": "Vesting", @@ -9990,7 +10338,7 @@ "name": "Vesting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AccountId", "value": "VestingInfo", @@ -9998,7 +10346,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information regarding the vesting of a given account." ] } @@ -10008,11 +10356,11 @@ { "name": "vest", "args": [], - "documentation": [ + "docs": [ " Unlock any vested funds of the sender account.", "", " The dispatch origin for this call must be _Signed_ and the sender must have funds still", - " locked under this module.", + " locked under this pallet.", "", " Emits either `VestingCompleted` or `VestingUpdated`.", "", @@ -10032,13 +10380,13 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Unlock any vested funds of a `target` account.", "", " The dispatch origin for this call must be _Signed_.", "", " - `target`: The account whose vested funds should be unlocked. Must have funds still", - " locked under this module.", + " locked under this pallet.", "", " Emits either `VestingCompleted` or `VestingUpdated`.", "", @@ -10062,7 +10410,7 @@ "type": "VestingInfo" } ], - "documentation": [ + "docs": [ " Create a vested transfer.", "", " The dispatch origin for this call must be _Signed_.", @@ -10097,7 +10445,7 @@ "type": "VestingInfo" } ], - "documentation": [ + "docs": [ " Force a vested transfer.", "", " The dispatch origin for this call must be _Root_.", @@ -10125,7 +10473,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " The amount vested has been updated. This could indicate more funds are available. The", " balance given is the amount which is left unvested (and thus locked).", " \\[account, unvested\\]" @@ -10136,7 +10484,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An \\[account\\] has become fully vested. No further vesting can happen." ] } @@ -10146,32 +10494,32 @@ "name": "MinVestedTransfer", "type": "BalanceOf", "value": "0x0000c16ff28623000000000000000000", - "documentation": [ - " The minimum amount to be transferred to create a new vesting schedule." + "docs": [ + " The minimum amount transferred to call `vested_transfer`." ] } ], "errors": [ { "name": "NotVesting", - "documentation": [ + "docs": [ " The account given is not vesting." ] }, { "name": "ExistingVestingSchedule", - "documentation": [ + "docs": [ " An existing vesting schedule already exists for this account that cannot be clobbered." ] }, { "name": "AmountLow", - "documentation": [ + "docs": [ " Amount being transferred is too low to create a vesting schedule." ] } ], - "index": 27 + "index": 28 }, { "name": "Scheduler", @@ -10182,7 +10530,7 @@ "name": "Agenda", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "BlockNumber", "value": "Vec>", @@ -10190,7 +10538,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Items to be executed, indexed by the block number that they should be executed on." ] }, @@ -10198,7 +10546,7 @@ "name": "Lookup", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "Bytes", "value": "TaskAddress", @@ -10206,7 +10554,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Lookup from identity to the block number and index of the task." ] }, @@ -10214,10 +10562,10 @@ "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "Releases" + "plain": "Releases" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage version of the pallet.", "", " New networks start with last version." @@ -10246,7 +10594,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Anonymously schedule a task.", "", " # ", @@ -10271,7 +10619,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Cancel an anonymously scheduled task.", "", " # ", @@ -10308,7 +10656,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Schedule a named task.", "", " # ", @@ -10329,7 +10677,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Cancel a named scheduled task.", "", " # ", @@ -10362,7 +10710,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Anonymously schedule a task after a delay.", "", " # ", @@ -10394,7 +10742,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Schedule a named task after a delay.", "", " # ", @@ -10410,7 +10758,7 @@ "BlockNumber", "u32" ], - "documentation": [ + "docs": [ " Scheduled some task. \\[when, index\\]" ] }, @@ -10420,7 +10768,7 @@ "BlockNumber", "u32" ], - "documentation": [ + "docs": [ " Canceled some task. \\[when, index\\]" ] }, @@ -10431,7 +10779,7 @@ "Option", "DispatchResult" ], - "documentation": [ + "docs": [ " Dispatched some task. \\[task, id, result\\]" ] } @@ -10440,30 +10788,30 @@ "errors": [ { "name": "FailedToSchedule", - "documentation": [ + "docs": [ " Failed to schedule a call" ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Cannot find the scheduled call." ] }, { "name": "TargetBlockNumberInPast", - "documentation": [ + "docs": [ " Given target block number is in the past." ] }, { "name": "RescheduleNoChange", - "documentation": [ + "docs": [ " Reschedule failed because it does not change scheduled time." ] } ], - "index": 28 + "index": 29 }, { "name": "Proxy", @@ -10474,7 +10822,7 @@ "name": "Proxies", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "(Vec,BalanceOf)", @@ -10482,7 +10830,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " The set of account proxies. Maps the account which has delegated to the accounts", " which are being delegated to, together with the amount held on deposit." ] @@ -10491,7 +10839,7 @@ "name": "Announcements", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "AccountId", "value": "(Vec,BalanceOf)", @@ -10499,7 +10847,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " The announcements made by the proxy (key)." ] } @@ -10522,7 +10870,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Dispatch the given `call` from an account that the sender is authorised for through", " `add_proxy`.", "", @@ -10556,7 +10904,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Register a proxy account for the sender that is able to make calls on its behalf.", "", " The dispatch origin for this call must be _Signed_.", @@ -10588,7 +10936,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Unregister a proxy account for the sender.", "", " The dispatch origin for this call must be _Signed_.", @@ -10605,7 +10953,7 @@ { "name": "remove_proxies", "args": [], - "documentation": [ + "docs": [ " Unregister all proxy accounts for the sender.", "", " The dispatch origin for this call must be _Signed_.", @@ -10634,7 +10982,7 @@ "type": "u16" } ], - "documentation": [ + "docs": [ " Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and", " initialize it with a proxy of `proxy_type` for `origin` sender.", "", @@ -10684,7 +11032,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Removes a previously spawned anonymous proxy.", "", " WARNING: **All access to this account will be lost.** Any funds held in it will be", @@ -10719,7 +11067,7 @@ "type": "CallHashOf" } ], - "documentation": [ + "docs": [ " Publish the hash of a proxy-call that will be made in the future.", "", " This must be called some number of blocks before the corresponding `proxy` is attempted", @@ -10755,7 +11103,7 @@ "type": "CallHashOf" } ], - "documentation": [ + "docs": [ " Remove a given announcement.", "", " May be called by a proxy account to remove a call they previously announced and return", @@ -10786,7 +11134,7 @@ "type": "CallHashOf" } ], - "documentation": [ + "docs": [ " Remove the given announcement of a delegate.", "", " May be called by a target (proxied) account to remove a call that one of their delegates", @@ -10825,8 +11173,8 @@ "type": "Call" } ], - "documentation": [ - " Dispatch the given `call` from an account that the sender is authorised for through", + "docs": [ + " Dispatch the given `call` from an account that the sender is authorized for through", " `add_proxy`.", "", " Removes any corresponding announcement(s).", @@ -10852,7 +11200,7 @@ "args": [ "DispatchResult" ], - "documentation": [ + "docs": [ " A proxy was executed correctly, with the given \\[result\\]." ] }, @@ -10864,7 +11212,7 @@ "ProxyType", "u16" ], - "documentation": [ + "docs": [ " Anonymous account has been created by new proxy with given", " disambiguation index and proxy type. \\[anonymous, who, proxy_type, disambiguation_index\\]" ] @@ -10876,7 +11224,7 @@ "AccountId", "Hash" ], - "documentation": [ + "docs": [ " An announcement was placed to make a call in the future. \\[real, proxy, call_hash\\]" ] } @@ -10886,23 +11234,30 @@ "name": "ProxyDepositBase", "type": "BalanceOf", "value": "0x00f09e544c3900000000000000000000", - "documentation": [ - " The base amount of currency needed to reserve for creating a proxy." + "docs": [ + " The base amount of currency needed to reserve for creating a proxy.", + "", + " This is held for an additional storage item whose value size is", + " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes." ] }, { "name": "ProxyDepositFactor", "type": "BalanceOf", "value": "0x0060aa7714b400000000000000000000", - "documentation": [ - " The amount of currency needed per proxy added." + "docs": [ + " The amount of currency needed per proxy added.", + "", + " This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing", + " storage value. Thus, when configuring `ProxyDepositFactor` one should take into account", + " `32 + proxy_type.encode().len()` bytes of data." ] }, { "name": "MaxProxies", "type": "u16", "value": "0x2000", - "documentation": [ + "docs": [ " The maximum amount of proxies allowed for a single account." ] }, @@ -10910,72 +11265,83 @@ "name": "MaxPending", "type": "u32", "value": "0x20000000", - "documentation": [ - " `MaxPending` metadata shadow." + "docs": [ + " The maximum amount of time-delayed announcements that are allowed to be pending." ] }, { "name": "AnnouncementDepositBase", "type": "BalanceOf", "value": "0x00f09e544c3900000000000000000000", - "documentation": [ - " `AnnouncementDepositBase` metadata shadow." + "docs": [ + " The base amount of currency needed to reserve for creating an announcement.", + "", + " This is held when a new storage item holding a `Balance` is created (typically 16 bytes)." ] }, { "name": "AnnouncementDepositFactor", "type": "BalanceOf", "value": "0x00c054ef286801000000000000000000", - "documentation": [ - " `AnnouncementDepositFactor` metadata shadow." + "docs": [ + " The amount of currency needed per announcement made.", + "", + " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)", + " into a pre-existing storage value." ] } ], "errors": [ { "name": "TooMany", - "documentation": [ + "docs": [ " There are too many proxies registered or too many announcements pending." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Proxy registration not found." ] }, { "name": "NotProxy", - "documentation": [ + "docs": [ " Sender is not a proxy of the account to be proxied." ] }, { "name": "Unproxyable", - "documentation": [ + "docs": [ " A call which is incompatible with the proxy type's filter was attempted." ] }, { "name": "Duplicate", - "documentation": [ + "docs": [ " Account is already a proxy." ] }, { "name": "NoPermission", - "documentation": [ + "docs": [ " Call may not be made by proxy because it may escalate its privileges." ] }, { "name": "Unannounced", - "documentation": [ + "docs": [ " Announcement, if made at all, was made too recently." ] + }, + { + "name": "NoSelfProxy", + "docs": [ + " Cannot add self as proxy." + ] } ], - "index": 29 + "index": 30 }, { "name": "Multisig", @@ -10986,7 +11352,7 @@ "name": "Multisigs", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "AccountId", "key2": "[u8;32]", @@ -10995,7 +11361,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of open multisig operations." ] }, @@ -11003,7 +11369,7 @@ "name": "Calls", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "[u8;32]", "value": "(OpaqueCall,AccountId,BalanceOf)", @@ -11011,7 +11377,7 @@ } }, "fallback": "0x00", - "documentation": [] + "docs": [] } ] }, @@ -11028,7 +11394,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Immediately dispatch a multi-signature call using a single approval from the caller.", "", " The dispatch origin for this call must be _Signed_.", @@ -11075,7 +11441,7 @@ "type": "Weight" } ], - "documentation": [ + "docs": [ " Register approval for a dispatch to be made from a deterministic composite account if", " approved by a total of `threshold - 1` of `other_signatories`.", "", @@ -11148,7 +11514,7 @@ "type": "Weight" } ], - "documentation": [ + "docs": [ " Register approval for a dispatch to be made from a deterministic composite account if", " approved by a total of `threshold - 1` of `other_signatories`.", "", @@ -11207,7 +11573,7 @@ "type": "[u8;32]" } ], - "documentation": [ + "docs": [ " Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", " for this operation will be unreserved on success.", "", @@ -11245,7 +11611,7 @@ "AccountId", "CallHash" ], - "documentation": [ + "docs": [ " A new multisig operation has begun. \\[approving, multisig, call_hash\\]" ] }, @@ -11257,7 +11623,7 @@ "AccountId", "CallHash" ], - "documentation": [ + "docs": [ " A multisig operation has been approved by someone.", " \\[approving, timepoint, multisig, call_hash\\]" ] @@ -11271,7 +11637,7 @@ "CallHash", "DispatchResult" ], - "documentation": [ + "docs": [ " A multisig operation has been executed. \\[approving, timepoint, multisig, call_hash\\]" ] }, @@ -11283,7 +11649,7 @@ "AccountId", "CallHash" ], - "documentation": [ + "docs": [ " A multisig operation has been cancelled. \\[cancelling, timepoint, multisig, call_hash\\]" ] } @@ -11293,7 +11659,7 @@ "name": "DepositBase", "type": "BalanceOf", "value": "0x00f01c0adbed01000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for creating a multisig execution or to store", " a dispatch call for later." ] @@ -11302,7 +11668,7 @@ "name": "DepositFactor", "type": "BalanceOf", "value": "0x0000cc7b9fae00000000000000000000", - "documentation": [ + "docs": [ " The amount of currency needed per unit threshold when creating a multisig execution." ] }, @@ -11310,7 +11676,7 @@ "name": "MaxSignatories", "type": "u16", "value": "0x6400", - "documentation": [ + "docs": [ " The maximum amount of signatories allowed for a given multisig." ] } @@ -11318,90 +11684,90 @@ "errors": [ { "name": "MinimumThreshold", - "documentation": [ + "docs": [ " Threshold must be 2 or greater." ] }, { "name": "AlreadyApproved", - "documentation": [ + "docs": [ " Call is already approved by this signatory." ] }, { "name": "NoApprovalsNeeded", - "documentation": [ + "docs": [ " Call doesn't need any (more) approvals." ] }, { "name": "TooFewSignatories", - "documentation": [ + "docs": [ " There are too few signatories in the list." ] }, { "name": "TooManySignatories", - "documentation": [ + "docs": [ " There are too many signatories in the list." ] }, { "name": "SignatoriesOutOfOrder", - "documentation": [ + "docs": [ " The signatories were provided out of order; they should be ordered." ] }, { "name": "SenderInSignatories", - "documentation": [ + "docs": [ " The sender was contained in the other signatories; it shouldn't be." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Multisig operation not found when attempting to cancel." ] }, { "name": "NotOwner", - "documentation": [ + "docs": [ " Only the account that originally created the multisig is able to cancel it." ] }, { "name": "NoTimepoint", - "documentation": [ + "docs": [ " No timepoint was given, yet the multisig operation is already underway." ] }, { "name": "WrongTimepoint", - "documentation": [ + "docs": [ " A different timepoint was given to the multisig operation that is underway." ] }, { "name": "UnexpectedTimepoint", - "documentation": [ + "docs": [ " A timepoint was given, yet no multisig operation is underway." ] }, { - "name": "WeightTooLow", - "documentation": [ + "name": "MaxWeightTooLow", + "docs": [ " The maximum weight information provided was too low." ] }, { "name": "AlreadyStored", - "documentation": [ + "docs": [ " The data to be stored is already stored." ] } ], - "index": 30 + "index": 31 }, { "name": "Bounties", @@ -11412,10 +11778,10 @@ "name": "BountyCount", "modifier": "Default", "type": { - "Plain": "BountyIndex" + "plain": "BountyIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Number of bounty proposals that have been made." ] }, @@ -11423,7 +11789,7 @@ "name": "Bounties", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "BountyIndex", "value": "Bounty", @@ -11431,7 +11797,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Bounties that have been made." ] }, @@ -11439,7 +11805,7 @@ "name": "BountyDescriptions", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "BountyIndex", "value": "Bytes", @@ -11447,7 +11813,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The description of each bounty." ] }, @@ -11455,10 +11821,10 @@ "name": "BountyApprovals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Bounty indices that have been approved but not yet funded." ] } @@ -11477,7 +11843,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Propose a new bounty.", "", " The dispatch origin for this call must be _Signed_.", @@ -11500,7 +11866,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Approve a bounty proposal. At a later time, the bounty will be funded and become active", " and the original deposit will be returned.", "", @@ -11527,7 +11893,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Assign a curator to a funded bounty.", "", " May only be called from `T::ApproveOrigin`.", @@ -11545,7 +11911,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Unassign curator from a bounty.", "", " This function can only be called by the `RejectOrigin` a signed origin.", @@ -11574,7 +11940,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Accept the curator role for a bounty.", " A deposit will be reserved from curator and refund upon successful payout.", "", @@ -11597,7 +11963,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay.", "", " The dispatch origin for this call must be the curator of this bounty.", @@ -11618,7 +11984,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Claim the payout from an awarded bounty after payout delay.", "", " The dispatch origin for this call must be the beneficiary of this bounty.", @@ -11638,7 +12004,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Cancel a proposed or active bounty. All the funds will be sent to treasury and", " the curator deposit will be unreserved if possible.", "", @@ -11663,7 +12029,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Extend the expiry time of an active bounty.", "", " The dispatch origin for this call must be the curator of this bounty.", @@ -11683,7 +12049,7 @@ "args": [ "BountyIndex" ], - "documentation": [ + "docs": [ " New bounty proposal. \\[index\\]" ] }, @@ -11693,7 +12059,7 @@ "BountyIndex", "Balance" ], - "documentation": [ + "docs": [ " A bounty proposal was rejected; funds were slashed. \\[index, bond\\]" ] }, @@ -11702,7 +12068,7 @@ "args": [ "BountyIndex" ], - "documentation": [ + "docs": [ " A bounty proposal is funded and became active. \\[index\\]" ] }, @@ -11712,7 +12078,7 @@ "BountyIndex", "AccountId" ], - "documentation": [ + "docs": [ " A bounty is awarded to a beneficiary. \\[index, beneficiary\\]" ] }, @@ -11723,7 +12089,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A bounty is claimed by beneficiary. \\[index, payout, beneficiary\\]" ] }, @@ -11732,7 +12098,7 @@ "args": [ "BountyIndex" ], - "documentation": [ + "docs": [ " A bounty is cancelled. \\[index\\]" ] }, @@ -11741,7 +12107,7 @@ "args": [ "BountyIndex" ], - "documentation": [ + "docs": [ " A bounty expiry is extended. \\[index\\]" ] } @@ -11751,7 +12117,7 @@ "name": "DataDepositPerByte", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit per byte within bounty description." ] }, @@ -11759,7 +12125,7 @@ "name": "BountyDepositBase", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for placing a bounty proposal." ] }, @@ -11767,15 +12133,23 @@ "name": "BountyDepositPayoutDelay", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " The delay period for which a bounty beneficiary need to wait before claim the payout." ] }, + { + "name": "BountyUpdatePeriod", + "type": "BlockNumber", + "value": "0x00270600", + "docs": [ + " Bounty duration in blocks." + ] + }, { "name": "BountyCuratorDeposit", "type": "Permill", "value": "0x20a10700", - "documentation": [ + "docs": [ " Percentage of the curator fee that will be reserved upfront as deposit for bounty curator." ] }, @@ -11783,7 +12157,7 @@ "name": "BountyValueMinimum", "type": "BalanceOf", "value": "0x00406352bfc601000000000000000000", - "documentation": [ + "docs": [ " Minimum value for a bounty." ] }, @@ -11791,7 +12165,7 @@ "name": "MaximumReasonLength", "type": "u32", "value": "0x00400000", - "documentation": [ + "docs": [ " Maximum acceptable reason length." ] } @@ -11799,61 +12173,61 @@ "errors": [ { "name": "InsufficientProposersBalance", - "documentation": [ + "docs": [ " Proposer's balance is too low." ] }, { "name": "InvalidIndex", - "documentation": [ + "docs": [ " No proposal or bounty at that index." ] }, { "name": "ReasonTooBig", - "documentation": [ + "docs": [ " The reason given is just too big." ] }, { "name": "UnexpectedStatus", - "documentation": [ + "docs": [ " The bounty status is unexpected." ] }, { "name": "RequireCurator", - "documentation": [ + "docs": [ " Require bounty curator." ] }, { "name": "InvalidValue", - "documentation": [ + "docs": [ " Invalid bounty value." ] }, { "name": "InvalidFee", - "documentation": [ + "docs": [ " Invalid bounty fee." ] }, { "name": "PendingPayout", - "documentation": [ + "docs": [ " A bounty payout is pending.", " To cancel the bounty, you must unassign and slash the curator." ] }, { "name": "Premature", - "documentation": [ + "docs": [ " The bounties cannot be claimed/closed because it's still in the countdown period." ] } ], - "index": 31 + "index": 32 }, { "name": "Tips", @@ -11864,7 +12238,7 @@ "name": "Tips", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "Hash", "value": "OpenTip", @@ -11872,7 +12246,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", " This has the insecure enumerable hash function since the key itself is already", " guaranteed to be a secure hash." @@ -11882,7 +12256,7 @@ "name": "Reasons", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Identity", "key": "Hash", "value": "Bytes", @@ -11890,7 +12264,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Simple preimage lookup from the reason's hash to the original data. Again, has an", " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." ] @@ -11910,7 +12284,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Report something `reason` that deserves a tip and claim any eventual the finder's fee.", "", " The dispatch origin for this call must be _Signed_.", @@ -11940,7 +12314,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", "", " If successful, the original deposit will be unreserved.", @@ -11978,7 +12352,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Give a tip for something new; no finder's fee will be taken.", "", " The dispatch origin for this call must be _Signed_ and the signing account must be a", @@ -12015,7 +12389,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Declare a tip value for an already-open tip.", "", " The dispatch origin for this call must be _Signed_ and the signing account must be a", @@ -12051,7 +12425,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Close and payout a tip.", "", " The dispatch origin for this call must be _Signed_.", @@ -12070,6 +12444,29 @@ " - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`", " # " ] + }, + { + "name": "slash_tip", + "args": [ + { + "name": "hash", + "type": "Hash" + } + ], + "docs": [ + " Remove and slash an already-open tip.", + "", + " May only be called from `T::RejectOrigin`.", + "", + " As a result, the finder is slashed and the deposits are lost.", + "", + " Emits `TipSlashed` if successful.", + "", + " # ", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + " # " + ] } ], "events": [ @@ -12078,7 +12475,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A new tip suggestion has been opened. \\[tip_hash\\]" ] }, @@ -12087,7 +12484,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A tip suggestion has reached threshold and is closing. \\[tip_hash\\]" ] }, @@ -12098,7 +12495,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A tip suggestion has been closed. \\[tip_hash, who, payout\\]" ] }, @@ -12107,9 +12504,20 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A tip suggestion has been retracted. \\[tip_hash\\]" ] + }, + { + "name": "TipSlashed", + "args": [ + "Hash", + "AccountId", + "Balance" + ], + "docs": [ + " A tip suggestion has been slashed. \\[tip_hash, finder, deposit\\]" + ] } ], "constants": [ @@ -12117,7 +12525,7 @@ "name": "TipCountdown", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " The period for which a tip remains open after is has achieved threshold tippers." ] }, @@ -12125,7 +12533,7 @@ "name": "TipFindersFee", "type": "Percent", "value": "0x14", - "documentation": [ + "docs": [ " The amount of the final tip which goes to the original reporter of the tip." ] }, @@ -12133,7 +12541,7 @@ "name": "TipReportDepositBase", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for placing a tip report." ] }, @@ -12141,7 +12549,7 @@ "name": "DataDepositPerByte", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit per byte within the tip report reason." ] }, @@ -12149,7 +12557,7 @@ "name": "MaximumReasonLength", "type": "u32", "value": "0x00400000", - "documentation": [ + "docs": [ " Maximum acceptable reason length." ] } @@ -12157,42 +12565,42 @@ "errors": [ { "name": "ReasonTooBig", - "documentation": [ + "docs": [ " The reason given is just too big." ] }, { "name": "AlreadyKnown", - "documentation": [ + "docs": [ " The tip was already found/started." ] }, { "name": "UnknownTip", - "documentation": [ + "docs": [ " The tip hash is unknown." ] }, { "name": "NotFinder", - "documentation": [ + "docs": [ " The account attempting to retract the tip is not the finder of the tip." ] }, { "name": "StillOpen", - "documentation": [ + "docs": [ " The tip cannot be claimed/closed because there are not enough tippers yet." ] }, { "name": "Premature", - "documentation": [ + "docs": [ " The tip cannot be claimed/closed because it's still in the countdown period." ] } ], - "index": 32 + "index": 33 }, { "name": "Assets", @@ -12203,7 +12611,7 @@ "name": "Asset", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_128Concat", "key": "AssetId", "value": "AssetDetails", @@ -12211,7 +12619,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Details of an asset." ] }, @@ -12219,7 +12627,7 @@ "name": "Account", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_128Concat", "key1": "AssetId", "key2": "AccountId", @@ -12228,9 +12636,43 @@ } }, "fallback": "0x00000000000000000000", - "documentation": [ + "docs": [ " The number of units of assets held by any given account." ] + }, + { + "name": "Approvals", + "modifier": "Optional", + "type": { + "doubleMap": { + "hasher": "Blake2_128Concat", + "key1": "AssetId", + "key2": "AssetApprovalKey", + "value": "AssetApproval", + "key2Hasher": "Blake2_128Concat" + } + }, + "fallback": "0x00", + "docs": [ + " Approved balance transfers. First balance is the amount approved for transfer. Second", + " is the amount of `T::Currency` reserved for storing this." + ] + }, + { + "name": "Metadata", + "modifier": "Default", + "type": { + "map": { + "hasher": "Blake2_128Concat", + "key": "AssetId", + "value": "AssetMetadata", + "linked": false + } + }, + "fallback": "0x0000000000000000000000000000000000000000", + "docs": [ + " Metadata of an asset." + ] } ] }, @@ -12246,33 +12688,25 @@ "name": "admin", "type": "LookupSource" }, - { - "name": "max_zombies", - "type": "u32" - }, { "name": "min_balance", - "type": "Balance" + "type": "TAssetBalance" } ], - "documentation": [ + "docs": [ " Issue a new class of fungible assets from a public origin.", "", - " This new asset class has no assets initially.", + " This new asset class has no assets initially and its owner is the origin.", "", " The origin must be Signed and the sender must have sufficient funds free.", "", - " Funds of sender are reserved according to the formula:", - " `AssetDepositBase + AssetDepositPerZombie * max_zombies`.", + " Funds of sender are reserved by `AssetDeposit`.", "", " Parameters:", " - `id`: The identifier of the new asset. This must not be currently in use to identify", " an existing asset.", - " - `owner`: The owner of this class of assets. The owner has full superuser permissions", - " over this asset, but may later change and configure the permissions using `transfer_ownership`", - " and `set_team`.", - " - `max_zombies`: The total number of accounts which may hold assets in this class yet", - " have no existential deposit.", + " - `admin`: The admin of this class of assets. The admin is the initial address of each", + " member of the asset class's admin team.", " - `min_balance`: The minimum balance of this new asset that any single account must", " have. If an account's balance is reduced below this, then it collapses to zero.", "", @@ -12293,15 +12727,15 @@ "type": "LookupSource" }, { - "name": "max_zombies", - "type": "Compact" + "name": "is_sufficient", + "type": "bool" }, { "name": "min_balance", - "type": "Compact" + "type": "Compact" } ], - "documentation": [ + "docs": [ " Issue a new class of fungible assets from a privileged origin.", "", " This new asset class has no assets initially.", @@ -12333,46 +12767,25 @@ "type": "Compact" }, { - "name": "zombies_witness", - "type": "Compact" - } - ], - "documentation": [ - " Destroy a class of fungible assets owned by the sender.", - "", - " The origin must be Signed and the sender must be the owner of the asset `id`.", - "", - " - `id`: The identifier of the asset to be destroyed. This must identify an existing", - " asset.", - "", - " Emits `Destroyed` event when successful.", - "", - " Weight: `O(z)` where `z` is the number of zombie accounts." - ] - }, - { - "name": "force_destroy", - "args": [ - { - "name": "id", - "type": "Compact" - }, - { - "name": "zombies_witness", - "type": "Compact" + "name": "witness", + "type": "AssetDestroyWitness" } ], - "documentation": [ + "docs": [ " Destroy a class of fungible assets.", "", - " The origin must conform to `ForceOrigin`.", + " The origin must conform to `ForceOrigin` or must be Signed and the sender must be the", + " owner of the asset `id`.", "", " - `id`: The identifier of the asset to be destroyed. This must identify an existing", " asset.", "", " Emits `Destroyed` event when successful.", "", - " Weight: `O(1)`" + " Weight: `O(c + p + a)` where:", + " - `c = (witness.accounts - witness.sufficients)`", + " - `s = witness.sufficients`", + " - `a = witness.approvals`" ] }, { @@ -12388,10 +12801,10 @@ }, { "name": "amount", - "type": "Compact" + "type": "Compact" } ], - "documentation": [ + "docs": [ " Mint assets of a particular class.", "", " The origin must be Signed and the sender must be the Issuer of the asset `id`.", @@ -12419,10 +12832,10 @@ }, { "name": "amount", - "type": "Compact" + "type": "Compact" } ], - "documentation": [ + "docs": [ " Reduce the balance of `who` by as much as possible up to `amount` assets of `id`.", "", " Origin must be Signed and the sender should be the Manager of the asset `id`.", @@ -12453,10 +12866,10 @@ }, { "name": "amount", - "type": "Compact" + "type": "Compact" } ], - "documentation": [ + "docs": [ " Move some assets from the sender account to another.", "", " Origin must be Signed.", @@ -12477,6 +12890,43 @@ " of sender; Account pre-existence of `target`." ] }, + { + "name": "transfer_keep_alive", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "target", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "docs": [ + " Move some assets from the sender account to another, keeping the sender account alive.", + "", + " Origin must be Signed.", + "", + " - `id`: The identifier of the asset to have some amount transferred.", + " - `target`: The account to be credited.", + " - `amount`: The amount by which the sender's balance of assets should be reduced and", + " `target`'s balance increased. The amount actually transferred may be slightly greater in", + " the case that the transfer would otherwise take the sender balance above zero but below", + " the minimum balance. Must be greater than zero.", + "", + " Emits `Transferred` with the actual amount transferred. If this takes the source balance", + " to below the minimum for the asset, then the amount transferred is increased to take it", + " to zero.", + "", + " Weight: `O(1)`", + " Modes: Pre-existence of `target`; Post-existence of sender; Prior & post zombie-status", + " of sender; Account pre-existence of `target`." + ] + }, { "name": "force_transfer", "args": [ @@ -12494,10 +12944,10 @@ }, { "name": "amount", - "type": "Compact" + "type": "Compact" } ], - "documentation": [ + "docs": [ " Move some assets from one account to another.", "", " Origin must be Signed and the sender should be the Admin of the asset `id`.", @@ -12531,7 +12981,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Disallow further unprivileged transfers from an account.", "", " Origin must be Signed and the sender should be the Freezer of the asset `id`.", @@ -12556,7 +13006,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Allow unprivileged transfers from an account again.", "", " Origin must be Signed and the sender should be the Admin of the asset `id`.", @@ -12569,6 +13019,46 @@ " Weight: `O(1)`" ] }, + { + "name": "freeze_asset", + "args": [ + { + "name": "id", + "type": "Compact" + } + ], + "docs": [ + " Disallow further unprivileged transfers for the asset class.", + "", + " Origin must be Signed and the sender should be the Freezer of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + "", + " Emits `Frozen`.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "thaw_asset", + "args": [ + { + "name": "id", + "type": "Compact" + } + ], + "docs": [ + " Allow unprivileged transfers for the asset again.", + "", + " Origin must be Signed and the sender should be the Admin of the asset `id`.", + "", + " - `id`: The identifier of the asset to be frozen.", + "", + " Emits `Thawed`.", + "", + " Weight: `O(1)`" + ] + }, { "name": "transfer_ownership", "args": [ @@ -12581,12 +13071,12 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Change the Owner of an asset.", "", " Origin must be Signed and the sender should be the Owner of the asset `id`.", "", - " - `id`: The identifier of the asset to be frozen.", + " - `id`: The identifier of the asset.", " - `owner`: The new Owner of this asset.", "", " Emits `OwnerChanged`.", @@ -12614,7 +13104,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Change the Issuer, Admin and Freezer of an asset.", "", " Origin must be Signed and the sender should be the Owner of the asset `id`.", @@ -12630,107 +13120,406 @@ ] }, { - "name": "set_max_zombies", + "name": "set_metadata", "args": [ { "name": "id", "type": "Compact" }, { - "name": "max_zombies", - "type": "Compact" + "name": "name", + "type": "Bytes" + }, + { + "name": "symbol", + "type": "Bytes" + }, + { + "name": "decimals", + "type": "u8" } ], - "documentation": [] - } - ], - "events": [ - { - "name": "Created", - "args": [ - "AssetId", - "AccountId", - "AccountId" - ], - "documentation": [ - " Some asset class was created. \\[asset_id, creator, owner\\]" - ] - }, - { - "name": "Issued", - "args": [ - "AssetId", - "AccountId", - "Balance" - ], - "documentation": [ - " Some assets were issued. \\[asset_id, owner, total_supply\\]" - ] - }, - { - "name": "Transferred", - "args": [ - "AssetId", - "AccountId", - "AccountId", - "Balance" - ], - "documentation": [ - " Some assets were transferred. \\[asset_id, from, to, amount\\]" - ] - }, - { - "name": "Burned", - "args": [ - "AssetId", - "AccountId", - "Balance" - ], - "documentation": [ - " Some assets were destroyed. \\[asset_id, owner, balance\\]" + "docs": [ + " Set the metadata for an asset.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + " Funds of sender are reserved according to the formula:", + " `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into", + " account any already reserved funds.", + "", + " - `id`: The identifier of the asset to update.", + " - `name`: The user friendly name of this asset. Limited in length by `StringLimit`.", + " - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`.", + " - `decimals`: The number of decimals this asset uses to represent one unit.", + "", + " Emits `MetadataSet`.", + "", + " Weight: `O(1)`" ] }, { - "name": "TeamChanged", + "name": "clear_metadata", "args": [ - "AssetId", - "AccountId", - "AccountId", - "AccountId" + { + "name": "id", + "type": "Compact" + } ], - "documentation": [ - " The management team changed \\[asset_id, issuer, admin, freezer\\]" + "docs": [ + " Clear the metadata for an asset.", + "", + " Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + " Any deposit is freed for the asset owner.", + "", + " - `id`: The identifier of the asset to clear.", + "", + " Emits `MetadataCleared`.", + "", + " Weight: `O(1)`" ] }, { - "name": "OwnerChanged", + "name": "force_set_metadata", "args": [ - "AssetId", - "AccountId" + { + "name": "id", + "type": "Compact" + }, + { + "name": "name", + "type": "Bytes" + }, + { + "name": "symbol", + "type": "Bytes" + }, + { + "name": "decimals", + "type": "u8" + }, + { + "name": "is_frozen", + "type": "bool" + } ], - "documentation": [ - " The owner changed \\[asset_id, owner\\]" + "docs": [ + " Force the metadata for an asset to some value.", + "", + " Origin must be ForceOrigin.", + "", + " Any deposit is left alone.", + "", + " - `id`: The identifier of the asset to update.", + " - `name`: The user friendly name of this asset. Limited in length by `StringLimit`.", + " - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`.", + " - `decimals`: The number of decimals this asset uses to represent one unit.", + "", + " Emits `MetadataSet`.", + "", + " Weight: `O(N + S)` where N and S are the length of the name and symbol respectively." ] }, { - "name": "ForceTransferred", + "name": "force_clear_metadata", "args": [ - "AssetId", - "AccountId", - "AccountId", - "Balance" + { + "name": "id", + "type": "Compact" + } ], - "documentation": [ - " Some assets was transferred by an admin. \\[asset_id, from, to, amount\\]" + "docs": [ + " Clear the metadata for an asset.", + "", + " Origin must be ForceOrigin.", + "", + " Any deposit is returned.", + "", + " - `id`: The identifier of the asset to clear.", + "", + " Emits `MetadataCleared`.", + "", + " Weight: `O(1)`" ] }, { - "name": "Frozen", + "name": "force_asset_status", "args": [ - "AssetId", - "AccountId" - ], - "documentation": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "issuer", + "type": "LookupSource" + }, + { + "name": "admin", + "type": "LookupSource" + }, + { + "name": "freezer", + "type": "LookupSource" + }, + { + "name": "min_balance", + "type": "Compact" + }, + { + "name": "is_sufficient", + "type": "bool" + }, + { + "name": "is_frozen", + "type": "bool" + } + ], + "docs": [ + " Alter the attributes of a given asset.", + "", + " Origin must be `ForceOrigin`.", + "", + " - `id`: The identifier of the asset.", + " - `owner`: The new Owner of this asset.", + " - `issuer`: The new Issuer of this asset.", + " - `admin`: The new Admin of this asset.", + " - `freezer`: The new Freezer of this asset.", + " - `min_balance`: The minimum balance of this new asset that any single account must", + " have. If an account's balance is reduced below this, then it collapses to zero.", + " - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient", + " value to account for the state bloat associated with its balance storage. If set to", + " `true`, then non-zero balances may be stored without a `consumer` reference (and thus", + " an ED in the Balances pallet or whatever else is used to control user-account state", + " growth).", + " - `is_frozen`: Whether this asset class is frozen except for permissioned/admin", + " instructions.", + "", + " Emits `AssetStatusChanged` with the identity of the asset.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "approve_transfer", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "delegate", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "docs": [ + " Approve an amount of asset for transfer by a delegated third-party account.", + "", + " Origin must be Signed.", + "", + " Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account", + " for the purpose of holding the approval. If some non-zero amount of assets is already", + " approved from signing account to `delegate`, then it is topped up or unreserved to", + " meet the right value.", + "", + " NOTE: The signing account does not need to own `amount` of assets at the point of", + " making this call.", + "", + " - `id`: The identifier of the asset.", + " - `delegate`: The account to delegate permission to transfer asset.", + " - `amount`: The amount of asset that may be transferred by `delegate`. If there is", + " already an approval in place, then this acts additively.", + "", + " Emits `ApprovedTransfer` on success.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "cancel_approval", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "delegate", + "type": "LookupSource" + } + ], + "docs": [ + " Cancel all of some asset approved for delegated transfer by a third-party account.", + "", + " Origin must be Signed and there must be an approval in place between signer and", + " `delegate`.", + "", + " Unreserves any deposit previously reserved by `approve_transfer` for the approval.", + "", + " - `id`: The identifier of the asset.", + " - `delegate`: The account delegated permission to transfer asset.", + "", + " Emits `ApprovalCancelled` on success.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "force_cancel_approval", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "delegate", + "type": "LookupSource" + } + ], + "docs": [ + " Cancel all of some asset approved for delegated transfer by a third-party account.", + "", + " Origin must be either ForceOrigin or Signed origin with the signer being the Admin", + " account of the asset `id`.", + "", + " Unreserves any deposit previously reserved by `approve_transfer` for the approval.", + "", + " - `id`: The identifier of the asset.", + " - `delegate`: The account delegated permission to transfer asset.", + "", + " Emits `ApprovalCancelled` on success.", + "", + " Weight: `O(1)`" + ] + }, + { + "name": "transfer_approved", + "args": [ + { + "name": "id", + "type": "Compact" + }, + { + "name": "owner", + "type": "LookupSource" + }, + { + "name": "destination", + "type": "LookupSource" + }, + { + "name": "amount", + "type": "Compact" + } + ], + "docs": [ + " Transfer some asset balance from a previously delegated account to some third-party", + " account.", + "", + " Origin must be Signed and there must be an approval in place by the `owner` to the", + " signer.", + "", + " If the entire amount approved for transfer is transferred, then any deposit previously", + " reserved by `approve_transfer` is unreserved.", + "", + " - `id`: The identifier of the asset.", + " - `owner`: The account which previously approved for a transfer of at least `amount` and", + " from which the asset balance will be withdrawn.", + " - `destination`: The account to which the asset balance of `amount` will be transferred.", + " - `amount`: The amount of assets to transfer.", + "", + " Emits `TransferredApproved` on success.", + "", + " Weight: `O(1)`" + ] + } + ], + "events": [ + { + "name": "Created", + "args": [ + "AssetId", + "AccountId", + "AccountId" + ], + "docs": [ + " Some asset class was created. \\[asset_id, creator, owner\\]" + ] + }, + { + "name": "Issued", + "args": [ + "AssetId", + "AccountId", + "TAssetBalance" + ], + "docs": [ + " Some assets were issued. \\[asset_id, owner, total_supply\\]" + ] + }, + { + "name": "Transferred", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "TAssetBalance" + ], + "docs": [ + " Some assets were transferred. \\[asset_id, from, to, amount\\]" + ] + }, + { + "name": "Burned", + "args": [ + "AssetId", + "AccountId", + "TAssetBalance" + ], + "docs": [ + " Some assets were destroyed. \\[asset_id, owner, balance\\]" + ] + }, + { + "name": "TeamChanged", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "AccountId" + ], + "docs": [ + " The management team changed \\[asset_id, issuer, admin, freezer\\]" + ] + }, + { + "name": "OwnerChanged", + "args": [ + "AssetId", + "AccountId" + ], + "docs": [ + " The owner changed \\[asset_id, owner\\]" + ] + }, + { + "name": "Frozen", + "args": [ + "AssetId", + "AccountId" + ], + "docs": [ " Some account `who` was frozen. \\[asset_id, who\\]" ] }, @@ -12740,170 +13529,857 @@ "AssetId", "AccountId" ], - "documentation": [ + "docs": [ " Some account `who` was thawed. \\[asset_id, who\\]" ] }, + { + "name": "AssetFrozen", + "args": [ + "AssetId" + ], + "docs": [ + " Some asset `asset_id` was frozen. \\[asset_id\\]" + ] + }, + { + "name": "AssetThawed", + "args": [ + "AssetId" + ], + "docs": [ + " Some asset `asset_id` was thawed. \\[asset_id\\]" + ] + }, { "name": "Destroyed", "args": [ "AssetId" ], - "documentation": [ - " An asset class was destroyed." + "docs": [ + " An asset class was destroyed." + ] + }, + { + "name": "ForceCreated", + "args": [ + "AssetId", + "AccountId" + ], + "docs": [ + " Some asset class was force-created. \\[asset_id, owner\\]" + ] + }, + { + "name": "MetadataSet", + "args": [ + "AssetId", + "Bytes", + "Bytes", + "u8", + "bool" + ], + "docs": [ + " New metadata has been set for an asset. \\[asset_id, name, symbol, decimals, is_frozen\\]" + ] + }, + { + "name": "MetadataCleared", + "args": [ + "AssetId" + ], + "docs": [ + " Metadata has been cleared for an asset. \\[asset_id\\]" + ] + }, + { + "name": "ApprovedTransfer", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "TAssetBalance" + ], + "docs": [ + " (Additional) funds have been approved for transfer to a destination account.", + " \\[asset_id, source, delegate, amount\\]" + ] + }, + { + "name": "ApprovalCancelled", + "args": [ + "AssetId", + "AccountId", + "AccountId" + ], + "docs": [ + " An approval for account `delegate` was cancelled by `owner`.", + " \\[id, owner, delegate\\]" + ] + }, + { + "name": "TransferredApproved", + "args": [ + "AssetId", + "AccountId", + "AccountId", + "AccountId", + "TAssetBalance" + ], + "docs": [ + " An `amount` was transferred in its entirety from `owner` to `destination` by", + " the approved `delegate`.", + " \\[id, owner, delegate, destination\\]" + ] + }, + { + "name": "AssetStatusChanged", + "args": [ + "AssetId" + ], + "docs": [ + " An asset has had its attributes changed by the `Force` origin.", + " \\[id\\]" + ] + } + ], + "constants": [], + "errors": [ + { + "name": "BalanceLow", + "docs": [ + " Account balance must be greater than or equal to the transfer amount." + ] + }, + { + "name": "BalanceZero", + "docs": [ + " Balance should be non-zero." + ] + }, + { + "name": "NoPermission", + "docs": [ + " The signing account has no permission to do the operation." + ] + }, + { + "name": "Unknown", + "docs": [ + " The given asset ID is unknown." + ] + }, + { + "name": "Frozen", + "docs": [ + " The origin account is frozen." + ] + }, + { + "name": "InUse", + "docs": [ + " The asset ID is already taken." + ] + }, + { + "name": "BadWitness", + "docs": [ + " Invalid witness data given." + ] + }, + { + "name": "MinBalanceZero", + "docs": [ + " Minimum balance should be non-zero." + ] + }, + { + "name": "Overflow", + "docs": [ + " A mint operation lead to an overflow." + ] + }, + { + "name": "NoProvider", + "docs": [ + " No provider reference exists to allow a non-zero balance of a non-self-sufficient asset." + ] + }, + { + "name": "BadMetadata", + "docs": [ + " Invalid metadata given." + ] + }, + { + "name": "Unapproved", + "docs": [ + " No approval exists that would allow the transfer." + ] + }, + { + "name": "WouldDie", + "docs": [ + " The source account would not survive the transfer and it needs to stay alive." + ] + } + ], + "index": 34 + }, + { + "name": "Mmr", + "storage": { + "prefix": "MerkleMountainRange", + "items": [ + { + "name": "RootHash", + "modifier": "Default", + "type": { + "plain": "Hash" + }, + "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", + "docs": [ + " Latest MMR Root hash." + ] + }, + { + "name": "NumberOfLeaves", + "modifier": "Default", + "type": { + "plain": "u64" + }, + "fallback": "0x0000000000000000", + "docs": [ + " Current size of the MMR (number of leaves)." + ] + }, + { + "name": "Nodes", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Identity", + "key": "u64", + "value": "Hash", + "linked": false + } + }, + "fallback": "0x00", + "docs": [ + " Hashes of the nodes in the MMR.", + "", + " Note this collection only contains MMR peaks, the inner nodes (and leaves)", + " are pruned and only stored in the Offchain DB." + ] + } + ] + }, + "calls": null, + "events": null, + "constants": [], + "errors": [], + "index": 35 + }, + { + "name": "Lottery", + "storage": { + "prefix": "Lottery", + "items": [ + { + "name": "LotteryIndex", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "docs": [] + }, + { + "name": "Lottery", + "modifier": "Optional", + "type": { + "plain": "LotteryConfig" + }, + "fallback": "0x00", + "docs": [ + " The configuration for the current lottery." + ] + }, + { + "name": "Participants", + "modifier": "Default", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "AccountId", + "value": "(u32,Vec)", + "linked": false + } + }, + "fallback": "0x0000000000", + "docs": [ + " Users who have purchased a ticket. (Lottery Index, Tickets Purchased)" + ] + }, + { + "name": "TicketsCount", + "modifier": "Default", + "type": { + "plain": "u32" + }, + "fallback": "0x00000000", + "docs": [ + " Total number of tickets sold." + ] + }, + { + "name": "Tickets", + "modifier": "Optional", + "type": { + "map": { + "hasher": "Twox64Concat", + "key": "u32", + "value": "AccountId", + "linked": false + } + }, + "fallback": "0x00", + "docs": [ + " Each ticket's owner.", + "", + " May have residual storage from previous lotteries. Use `TicketsCount` to see which ones", + " are actually valid ticket mappings." + ] + }, + { + "name": "CallIndices", + "modifier": "Default", + "type": { + "plain": "Vec" + }, + "fallback": "0x00", + "docs": [ + " The calls stored in this pallet to be used in an active lottery if configured", + " by `Config::ValidateCall`." + ] + } + ] + }, + "calls": [ + { + "name": "buy_ticket", + "args": [ + { + "name": "call", + "type": "Call" + } + ], + "docs": [ + " Buy a ticket to enter the lottery.", + "", + " This extrinsic acts as a passthrough function for `call`. In all", + " situations where `call` alone would succeed, this extrinsic should", + " succeed.", + "", + " If `call` is successful, then we will attempt to purchase a ticket,", + " which may fail silently. To detect success of a ticket purchase, you", + " should listen for the `TicketBought` event.", + "", + " This extrinsic must be called by a signed origin." + ] + }, + { + "name": "set_calls", + "args": [ + { + "name": "calls", + "type": "Vec" + } + ], + "docs": [ + " Set calls in storage which can be used to purchase a lottery ticket.", + "", + " This function only matters if you use the `ValidateCall` implementation", + " provided by this pallet, which uses storage to determine the valid calls.", + "", + " This extrinsic must be called by the Manager origin." ] }, { - "name": "ForceCreated", + "name": "start_lottery", "args": [ - "AssetId", - "AccountId" + { + "name": "price", + "type": "BalanceOf" + }, + { + "name": "length", + "type": "BlockNumber" + }, + { + "name": "delay", + "type": "BlockNumber" + }, + { + "name": "repeat", + "type": "bool" + } ], - "documentation": [ - " Some asset class was force-created. \\[asset_id, owner\\]" + "docs": [ + " Start a lottery using the provided configuration.", + "", + " This extrinsic must be called by the `ManagerOrigin`.", + "", + " Parameters:", + "", + " * `price`: The cost of a single ticket.", + " * `length`: How long the lottery should run for starting at the current block.", + " * `delay`: How long after the lottery end we should wait before picking a winner.", + " * `repeat`: If the lottery should repeat when completed." ] }, { - "name": "MaxZombiesChanged", - "args": [ - "AssetId", - "u32" - ], - "documentation": [ - " The maximum amount of zombies allowed has changed. \\[asset_id, max_zombies\\]" + "name": "stop_repeat", + "args": [], + "docs": [ + " If a lottery is repeating, you can use this to stop the repeat.", + " The lottery will continue to run to completion.", + "", + " This extrinsic must be called by the `ManagerOrigin`." ] } ], - "constants": [], - "errors": [ + "events": [ { - "name": "AmountZero", - "documentation": [ - " Transfer amount should be non-zero." + "name": "LotteryStarted", + "args": [], + "docs": [ + " A lottery has been started!" ] }, { - "name": "BalanceLow", - "documentation": [ - " Account balance must be greater than or equal to the transfer amount." + "name": "CallsUpdated", + "args": [], + "docs": [ + " A new set of calls have been set!" ] }, { - "name": "BalanceZero", - "documentation": [ - " Balance should be non-zero." + "name": "Winner", + "args": [ + "AccountId", + "Balance" + ], + "docs": [ + " A winner has been chosen!" ] }, { - "name": "NoPermission", - "documentation": [ - " The signing account has no permission to do the operation." + "name": "TicketBought", + "args": [ + "AccountId", + "CallIndex" + ], + "docs": [ + " A ticket has been bought!" ] + } + ], + "constants": [ + { + "name": "PalletId", + "type": "PalletId", + "value": "0x70792f6c6f74746f", + "docs": [] }, { - "name": "Unknown", - "documentation": [ - " The given asset ID is unknown." + "name": "MaxCalls", + "type": "u32", + "value": "0x0a000000", + "docs": [] + } + ], + "errors": [ + { + "name": "Overflow", + "docs": [ + " An overflow has occurred." ] }, { - "name": "Frozen", - "documentation": [ - " The origin account is frozen." + "name": "NotConfigured", + "docs": [ + " A lottery has not been configured." ] }, { - "name": "InUse", - "documentation": [ - " The asset ID is already taken." + "name": "InProgress", + "docs": [ + " A lottery is already in progress." ] }, { - "name": "TooManyZombies", - "documentation": [ - " Too many zombie accounts in use." + "name": "AlreadyEnded", + "docs": [ + " A lottery has already ended." ] }, { - "name": "RefsLeft", - "documentation": [ - " Attempt to destroy an asset class when non-zombie, reference-bearing accounts exist." + "name": "InvalidCall", + "docs": [ + " The call is not valid for an open lottery." ] }, { - "name": "BadWitness", - "documentation": [ - " Invalid witness data given." + "name": "AlreadyParticipating", + "docs": [ + " You are already participating in the lottery with this call." ] }, { - "name": "MinBalanceZero", - "documentation": [ - " Minimum balance should be non-zero." + "name": "TooManyCalls", + "docs": [ + " Too many calls for a single lottery." ] }, { - "name": "Overflow", - "documentation": [ - " A mint operation lead to an overflow." + "name": "EncodingFailed", + "docs": [ + " Failed to encode calls" ] } ], - "index": 33 + "index": 36 }, { - "name": "Mmr", + "name": "Gilt", "storage": { - "prefix": "MerkleMountainRange", + "prefix": "Gilt", "items": [ { - "name": "RootHash", + "name": "QueueTotals", "modifier": "Default", "type": { - "Plain": "Hash" + "plain": "Vec<(u32,BalanceOf)>" }, - "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ - " Latest MMR Root hash." + "fallback": "0x00", + "docs": [ + " The totals of items and balances within each queue. Saves a lot of storage reads in the", + " case of sparsely packed queues.", + "", + " The vector is indexed by duration in `Period`s, offset by one, so information on the queue", + " whose duration is one `Period` would be storage `0`." ] }, { - "name": "NumberOfLeaves", + "name": "Queues", "modifier": "Default", "type": { - "Plain": "u64" + "map": { + "hasher": "Blake2_128Concat", + "key": "u32", + "value": "Vec", + "linked": false + } }, - "fallback": "0x0000000000000000", - "documentation": [ - " Current size of the MMR (number of leaves)." + "fallback": "0x00", + "docs": [ + " The queues of bids ready to become gilts. Indexed by duration (in `Period`s)." ] }, { - "name": "Nodes", + "name": "ActiveTotal", + "modifier": "Default", + "type": { + "plain": "ActiveGiltsTotal" + }, + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000", + "docs": [ + " Information relating to the gilts currently active." + ] + }, + { + "name": "Active", "modifier": "Optional", "type": { - "Map": { - "hasher": "Identity", - "key": "u64", - "value": "Hash", + "map": { + "hasher": "Blake2_128Concat", + "key": "ActiveIndex", + "value": "ActiveGilt", "linked": false } }, "fallback": "0x00", - "documentation": [ - " Hashes of the nodes in the MMR.", - "", - " Note this collection only contains MMR peaks, the inner nodes (and leaves)", - " are pruned and only stored in the Offchain DB." + "docs": [ + " The currently active gilts, indexed according to the order of creation." ] } ] }, - "calls": null, - "events": null, - "constants": [], - "errors": [], - "index": 34 + "calls": [ + { + "name": "place_bid", + "args": [ + { + "name": "amount", + "type": "Compact" + }, + { + "name": "duration", + "type": "u32" + } + ], + "docs": [ + " Place a bid for a gilt to be issued.", + "", + " Origin must be Signed, and account must have at least `amount` in free balance.", + "", + " - `amount`: The amount of the bid; these funds will be reserved. If the bid is", + " successfully elevated into an issued gilt, then these funds will continue to be", + " reserved until the gilt expires. Must be at least `MinFreeze`.", + " - `duration`: The number of periods for which the funds will be locked if the gilt is", + " issued. It will expire only after this period has elapsed after the point of issuance.", + " Must be greater than 1 and no more than `QueueCount`.", + "", + " Complexities:", + " - `Queues[duration].len()` (just take max)." + ] + }, + { + "name": "retract_bid", + "args": [ + { + "name": "amount", + "type": "Compact" + }, + { + "name": "duration", + "type": "u32" + } + ], + "docs": [ + " Retract a previously placed bid.", + "", + " Origin must be Signed, and the account should have previously issued a still-active bid", + " of `amount` for `duration`.", + "", + " - `amount`: The amount of the previous bid.", + " - `duration`: The duration of the previous bid." + ] + }, + { + "name": "set_target", + "args": [ + { + "name": "target", + "type": "Compact" + } + ], + "docs": [ + " Set target proportion of gilt-funds.", + "", + " Origin must be `AdminOrigin`.", + "", + " - `target`: The target proportion of effective issued funds that should be under gilts", + " at any one time." + ] + }, + { + "name": "thaw", + "args": [ + { + "name": "index", + "type": "Compact" + } + ], + "docs": [ + " Remove an active but expired gilt. Reserved funds under gilt are freed and balance is", + " adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion", + " of effective total issued funds.", + "", + " Origin must be Signed and the account must be the owner of the gilt of the given index.", + "", + " - `index`: The index of the gilt to be thawed." + ] + } + ], + "events": [ + { + "name": "BidPlaced", + "args": [ + "AccountId", + "BalanceOf", + "u32" + ], + "docs": [ + " A bid was successfully placed.", + " \\[ who, amount, duration \\]" + ] + }, + { + "name": "BidRetracted", + "args": [ + "AccountId", + "BalanceOf", + "u32" + ], + "docs": [ + " A bid was successfully removed (before being accepted as a gilt).", + " \\[ who, amount, duration \\]" + ] + }, + { + "name": "GiltIssued", + "args": [ + "ActiveIndex", + "BlockNumber", + "AccountId", + "BalanceOf" + ], + "docs": [ + " A bid was accepted as a gilt. The balance may not be released until expiry.", + " \\[ index, expiry, who, amount \\]" + ] + }, + { + "name": "GiltThawed", + "args": [ + "ActiveIndex", + "AccountId", + "BalanceOf", + "BalanceOf" + ], + "docs": [ + " An expired gilt has been thawed.", + " \\[ index, who, original_amount, additional_amount \\]" + ] + } + ], + "constants": [ + { + "name": "QueueCount", + "type": "u32", + "value": "0x2c010000", + "docs": [ + " Number of duration queues in total. This sets the maximum duration supported, which is", + " this value multiplied by `Period`." + ] + }, + { + "name": "MaxQueueLen", + "type": "u32", + "value": "0xe8030000", + "docs": [ + " Maximum number of items that may be in each duration queue." + ] + }, + { + "name": "FifoQueueLen", + "type": "u32", + "value": "0xf4010000", + "docs": [ + " Portion of the queue which is free from ordering and just a FIFO.", + "", + " Must be no greater than `MaxQueueLen`." + ] + }, + { + "name": "Period", + "type": "BlockNumber", + "value": "0x002f0d00", + "docs": [ + " The base period for the duration queues. This is the common multiple across all", + " supported freezing durations that can be bid upon." + ] + }, + { + "name": "MinFreeze", + "type": "BalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "docs": [ + " The minimum amount of funds that may be offered to freeze for a gilt. Note that this", + " does not actually limit the amount which may be frozen in a gilt since gilts may be", + " split up in order to satisfy the desired amount of funds under gilts.", + "", + " It should be at least big enough to ensure that there is no possible storage spam attack", + " or queue-filling attack." + ] + }, + { + "name": "IntakePeriod", + "type": "BlockNumber", + "value": "0x0a000000", + "docs": [ + " The number of blocks between consecutive attempts to issue more gilts in an effort to", + " get to the target amount to be frozen.", + "", + " A larger value results in fewer storage hits each block, but a slower period to get to", + " the target." + ] + }, + { + "name": "MaxIntakeBids", + "type": "u32", + "value": "0x0a000000", + "docs": [ + " The maximum amount of bids that can be turned into issued gilts each block. A larger", + " value here means less of the block available for transactions should there be a glut of", + " bids to make into gilts to reach the target." + ] + } + ], + "errors": [ + { + "name": "DurationTooSmall", + "docs": [ + " The duration of the bid is less than one." + ] + }, + { + "name": "DurationTooBig", + "docs": [ + " The duration is the bid is greater than the number of queues." + ] + }, + { + "name": "AmountTooSmall", + "docs": [ + " The amount of the bid is less than the minimum allowed." + ] + }, + { + "name": "BidTooLow", + "docs": [ + " The queue for the bid's duration is full and the amount bid is too low to get in through", + " replacing an existing bid." + ] + }, + { + "name": "Unknown", + "docs": [ + " Gilt index is unknown." + ] + }, + { + "name": "NotOwner", + "docs": [ + " Not the owner of the gilt." + ] + }, + { + "name": "NotExpired", + "docs": [ + " Gilt not yet at expiry date." + ] + }, + { + "name": "NotFound", + "docs": [ + " The given bid for retraction is not found." + ] + } + ], + "index": 37 } ], "extrinsic": { diff --git a/packages/polkadot/tests/meta/v13.json b/packages/polkadot/tests/meta/v13.json index b9726c8e..8b1bfd2d 100644 --- a/packages/polkadot/tests/meta/v13.json +++ b/packages/polkadot/tests/meta/v13.json @@ -20,7 +20,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The full account information for a particular account ID." ] }, @@ -31,7 +31,7 @@ "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total extrinsics count for the current block." ] }, @@ -42,7 +42,7 @@ "plain": "ConsumedWeight" }, "fallback": "0x000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The current weight for the block." ] }, @@ -53,7 +53,7 @@ "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total length (in bytes) for all extrinsics put together, for the current block." ] }, @@ -69,7 +69,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Map of block numbers to block hashes." ] }, @@ -85,7 +85,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Extrinsics data for the current block (maps an extrinsic's index to its data)." ] }, @@ -96,7 +96,7 @@ "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The current block number being processed. Set by `execute_block`." ] }, @@ -107,7 +107,7 @@ "plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Hash of the previous block." ] }, @@ -118,7 +118,7 @@ "plain": "DigestOf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Digest of the current block, also part of the block header." ] }, @@ -129,7 +129,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Events deposited for the current block." ] }, @@ -140,7 +140,7 @@ "plain": "EventIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of events in the `Events` list." ] }, @@ -156,7 +156,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Mapping between a topic (represented by T::Hash) and a vector of indexes", " of events in the `>` list.", "", @@ -176,7 +176,7 @@ "plain": "LastRuntimeUpgradeInfo" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened." ] }, @@ -187,7 +187,7 @@ "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not." ] }, @@ -198,7 +198,7 @@ "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False", " (default) if not." ] @@ -210,7 +210,7 @@ "plain": "Phase" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The execution phase of the block." ] } @@ -225,7 +225,7 @@ "type": "Perbill" } ], - "documentation": [ + "docs": [ " A dispatch that will fill the block weight up to the given ratio." ] }, @@ -237,7 +237,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Make some on-chain remark.", "", " # ", @@ -253,7 +253,7 @@ "type": "u64" } ], - "documentation": [ + "docs": [ " Set the number of pages in the WebAssembly environment's heap.", "", " # ", @@ -272,7 +272,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set the new runtime code.", "", " # ", @@ -293,7 +293,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set the new runtime code without doing any checks of the given `code`.", "", " # ", @@ -312,7 +312,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Set the new changes trie configuration.", "", " # ", @@ -333,7 +333,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set some items of storage.", "", " # ", @@ -352,7 +352,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Kill some items from storage.", "", " # ", @@ -375,7 +375,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Kill all storage items with a key that starts with the given prefix.", "", " **NOTE:** We rely on the Root origin to provide us the number of subkeys under", @@ -397,7 +397,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Make some on-chain remark and emit event.", "", " # ", @@ -413,7 +413,7 @@ "args": [ "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic completed successfully. \\[info\\]" ] }, @@ -423,14 +423,14 @@ "DispatchError", "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic failed. \\[error, info\\]" ] }, { "name": "CodeUpdated", "args": [], - "documentation": [ + "docs": [ " `:code` was updated." ] }, @@ -439,7 +439,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A new \\[account\\] was created." ] }, @@ -448,7 +448,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An \\[account\\] was reaped." ] }, @@ -458,7 +458,7 @@ "AccountId", "Hash" ], - "documentation": [ + "docs": [ " On on-chain remark happened. \\[origin, remark_hash\\]" ] } @@ -468,7 +468,7 @@ "name": "BlockWeights", "type": "BlockWeights", "value": "0x00f2052a0100000000204aa9d1010000405973070000000001c06e96a62e010000010098f73e5d010000010000000000000000405973070000000001c0f6e810a30100000100204aa9d1010000010088526a740000004059730700000000000000", - "documentation": [ + "docs": [ " Block & extrinsics weights: base values and limits." ] }, @@ -476,7 +476,7 @@ "name": "BlockLength", "type": "BlockLength", "value": "0x00003c000000500000005000", - "documentation": [ + "docs": [ " The maximum length of a block (in bytes)." ] }, @@ -484,7 +484,7 @@ "name": "BlockHashCount", "type": "BlockNumber", "value": "0x60090000", - "documentation": [ + "docs": [ " Maximum number of block number to block hash mappings to keep (oldest pruned first)." ] }, @@ -492,7 +492,7 @@ "name": "DbWeight", "type": "RuntimeDbWeight", "value": "0x40787d010000000000e1f50500000000", - "documentation": [ + "docs": [ " The weight of runtime database operations the runtime can invoke." ] }, @@ -500,7 +500,7 @@ "name": "Version", "type": "RuntimeVersion", "value": "0x106e6f6465387375627374726174652d6e6f64650a0000000b0100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000", - "documentation": [ + "docs": [ " Get the chain's current version." ] }, @@ -508,7 +508,7 @@ "name": "SS58Prefix", "type": "u16", "value": "0x2a00", - "documentation": [ + "docs": [ " The designated SS85 prefix of this chain.", "", " This replaces the \"ss58Format\" property declared in the chain spec. Reason is", @@ -520,21 +520,21 @@ "errors": [ { "name": "InvalidSpecName", - "documentation": [ + "docs": [ " The name of specification does not match between the current runtime", " and the new runtime." ] }, { "name": "SpecVersionNeedsToIncrease", - "documentation": [ + "docs": [ " The specification version is not allowed to decrease between the current runtime", " and the new runtime." ] }, { "name": "FailedToExtractRuntimeVersion", - "documentation": [ + "docs": [ " Failed to extract the runtime version from the new runtime.", "", " Either calling `Core_version` or decoding `RuntimeVersion` failed." @@ -542,13 +542,13 @@ }, { "name": "NonDefaultComposite", - "documentation": [ + "docs": [ " Suicide called when the account has non-default composite data." ] }, { "name": "NonZeroRefCount", - "documentation": [ + "docs": [ " There is a non-zero reference count preventing the account from being purged." ] } @@ -567,7 +567,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Send a batch of dispatch calls.", "", " May be called from any origin.", @@ -600,7 +600,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Send a call through an indexed pseudonym of the sender.", "", " Filter from origin are passed along. The call will be dispatched with an origin which", @@ -624,7 +624,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Send a batch of dispatch calls and atomically execute them.", " The whole transaction will rollback and fail if any of the calls failed.", "", @@ -648,7 +648,7 @@ "u32", "DispatchError" ], - "documentation": [ + "docs": [ " Batch of dispatches did not complete fully. Index of first failing dispatch given, as", " well as the error. \\[index, error\\]" ] @@ -656,9 +656,16 @@ { "name": "BatchCompleted", "args": [], - "documentation": [ + "docs": [ " Batch of dispatches completed fully with no error." ] + }, + { + "name": "ItemCompleted", + "args": [], + "docs": [ + " A single item within a Batch of dispatches has completed with no error." + ] } ], "constants": [], @@ -677,7 +684,7 @@ "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current epoch index." ] }, @@ -688,7 +695,7 @@ "plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Current epoch authorities." ] }, @@ -699,7 +706,7 @@ "plain": "Slot" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The slot at which the first epoch actually started. This is 0", " until the first block of the chain." ] @@ -711,7 +718,7 @@ "plain": "Slot" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current slot number." ] }, @@ -722,7 +729,7 @@ "plain": "Randomness" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The epoch randomness for the *current* epoch.", "", " # Security", @@ -742,7 +749,7 @@ "plain": "NextConfigDescriptor" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending epoch configuration change that will be applied when the next epoch is enacted." ] }, @@ -753,7 +760,7 @@ "plain": "Randomness" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Next epoch randomness." ] }, @@ -764,7 +771,7 @@ "plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Next epoch authorities." ] }, @@ -775,7 +782,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Randomness under construction.", "", " We make a tradeoff between storage accesses and list length.", @@ -799,7 +806,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay." ] }, @@ -810,7 +817,7 @@ "plain": "MaybeRandomness" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Temporary value (cleared at block finalization) which is `Some`", " if per-block initialization has already been called for current block." ] @@ -822,10 +829,11 @@ "plain": "MaybeRandomness" }, "fallback": "0x00", - "documentation": [ - " Temporary value (cleared at block finalization) that includes the VRF output generated", - " at this block. This field should always be populated during block processing unless", - " secondary plain slots are enabled (which don't contain a VRF output)." + "docs": [ + " This field should always be populated during block processing unless", + " secondary plain slots are enabled (which don't contain a VRF output).", + "", + " It is set in `on_initialize`, before it will contain the value from the last block." ] }, { @@ -835,7 +843,7 @@ "plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The block numbers when the last and current epoch have started, respectively `N-1` and", " `N`.", " NOTE: We track this is in order to annotate the block number when a given pool of", @@ -850,7 +858,7 @@ "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " How late the current block is compared to its parent.", "", " This entry is populated as part of block execution and is cleaned up", @@ -865,7 +873,7 @@ "plain": "BabeEpochConfiguration" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The configuration for the current epoch. Should never be `None` as it is initialized in genesis." ] }, @@ -876,7 +884,7 @@ "plain": "BabeEpochConfiguration" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The configuration for the next epoch, `None` if the config will not change", " (you can fallback to `EpochConfig` instead in that case)." ] @@ -896,7 +904,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report authority equivocation/misbehavior. This method will verify", " the equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence will", @@ -915,7 +923,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report authority equivocation/misbehavior. This method will verify", " the equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence will", @@ -934,7 +942,7 @@ "type": "NextConfigDescriptor" } ], - "documentation": [ + "docs": [ " Plan an epoch config change. The epoch config change is recorded and will be enacted on", " the next call to `enact_epoch_change`. The config will be activated one epoch after.", " Multiple calls to this method will replace any existing planned config change that had", @@ -948,7 +956,7 @@ "name": "EpochDuration", "type": "u64", "value": "0xc800000000000000", - "documentation": [ + "docs": [ " The amount of time, in slots, that each epoch should last.", " NOTE: Currently it is not possible to change the epoch duration after", " the chain has started. Attempting to do so will brick block production." @@ -958,7 +966,7 @@ "name": "ExpectedBlockTime", "type": "Moment", "value": "0xb80b000000000000", - "documentation": [ + "docs": [ " The expected average block time at which BABE should be creating", " blocks. Since BABE is probabilistic it is not trivial to figure out", " what the expected average block time should be based on the slot", @@ -970,19 +978,19 @@ "errors": [ { "name": "InvalidEquivocationProof", - "documentation": [ + "docs": [ " An equivocation proof provided as part of an equivocation report is invalid." ] }, { "name": "InvalidKeyOwnershipProof", - "documentation": [ + "docs": [ " A key ownership proof provided as part of an equivocation report is invalid." ] }, { "name": "DuplicateOffenceReport", - "documentation": [ + "docs": [ " A given equivocation report is valid but already previously reported." ] } @@ -1001,7 +1009,7 @@ "plain": "Moment" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current time for the current block." ] }, @@ -1012,7 +1020,7 @@ "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Did the timestamp get updated in this block?" ] } @@ -1027,7 +1035,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the current time.", "", " This call should be invoked exactly once per block. It will panic at the finalization", @@ -1052,7 +1060,7 @@ "name": "MinimumPeriod", "type": "Moment", "value": "0xdc05000000000000", - "documentation": [ + "docs": [ " The minimum period between blocks. Beware that this is different to the *expected* period", " that the block production apparatus provides. Your chosen consensus system will generally", " work with this to determine a sensible block time. e.g. For Aura, it will be double this", @@ -1075,7 +1083,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Uncles" ] }, @@ -1086,7 +1094,7 @@ "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Author of current block." ] }, @@ -1097,7 +1105,7 @@ "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Whether uncles were already set in this block." ] } @@ -1112,53 +1120,64 @@ "type": "Vec
" } ], - "documentation": [ + "docs": [ " Provide a set of uncles." ] } ], "events": null, - "constants": [], + "constants": [ + { + "name": "UncleGenerations", + "type": "BlockNumber", + "value": "0x05000000", + "docs": [ + " The number of blocks back we should accept uncles.", + " This means that we will deal with uncle-parents that are", + " `UncleGenerations + 1` before `now`." + ] + } + ], "errors": [ { "name": "InvalidUncleParent", - "documentation": [ + "docs": [ " The uncle parent not in the chain." ] }, { "name": "UnclesAlreadySet", - "documentation": [ + "docs": [ " Uncles already set in the block." ] }, { "name": "TooManyUncles", - "documentation": [ + "docs": [ " Too many uncles." ] }, { "name": "GenesisUncle", - "documentation": [ + "docs": [ " The uncle is genesis." ] }, { "name": "TooHighUncle", - "documentation": [ + "docs": [ " The uncle is too high in chain." ] }, { "name": "UncleAlreadyIncluded", - "documentation": [ + "docs": [ " The uncle is already included." ] }, { "name": "OldUncle", - "documentation": [ + "docs": [ " The uncle isn't recent enough to be included." ] } @@ -1182,7 +1201,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The lookup from index to account." ] } @@ -1197,7 +1216,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Assign an previously unassigned index.", "", " Payment: `Deposit` is reserved from the sender account.", @@ -1230,7 +1249,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Assign an index already owned by the sender to another account. The balance reservation", " is effectively transferred to the new account.", "", @@ -1261,7 +1280,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Free up an index owned by the sender.", "", " Payment: Any previous deposit placed for the index is unreserved in the sender account.", @@ -1298,7 +1317,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Force an index to an account. This doesn't require a deposit. If the index is already", " held, then any deposit is reimbursed to its current owner.", "", @@ -1330,7 +1349,7 @@ "type": "AccountIndex" } ], - "documentation": [ + "docs": [ " Freeze an index so it will always point to the sender account. This consumes the deposit.", "", " The dispatch origin for this call must be _Signed_ and the signing account must have a", @@ -1358,7 +1377,7 @@ "AccountId", "AccountIndex" ], - "documentation": [ + "docs": [ " A account index was assigned. \\[index, who\\]" ] }, @@ -1367,7 +1386,7 @@ "args": [ "AccountIndex" ], - "documentation": [ + "docs": [ " A account index has been freed up (unassigned). \\[index\\]" ] }, @@ -1377,7 +1396,7 @@ "AccountIndex", "AccountId" ], - "documentation": [ + "docs": [ " A account index has been frozen to its current account ID. \\[index, who\\]" ] } @@ -1387,7 +1406,7 @@ "name": "Deposit", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The deposit needed for reserving an index." ] } @@ -1395,31 +1414,31 @@ "errors": [ { "name": "NotAssigned", - "documentation": [ + "docs": [ " The index was not already assigned." ] }, { "name": "NotOwner", - "documentation": [ + "docs": [ " The index is assigned to another account." ] }, { "name": "InUse", - "documentation": [ + "docs": [ " The index was not available." ] }, { "name": "NotTransfer", - "documentation": [ + "docs": [ " The source and destination accounts are identical." ] }, { "name": "Permanent", - "documentation": [ + "docs": [ " The index is permanent and may not be freed/changed." ] } @@ -1438,7 +1457,7 @@ "plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The total units issued in the system." ] }, @@ -1454,7 +1473,7 @@ } }, "fallback": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The balance of an account.", "", " NOTE: This is only used in the case that this pallet is used to store balances." @@ -1472,7 +1491,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any liquidity locks on some account balances.", " NOTE: Should only be accessed when setting, changing and freeing a lock." ] @@ -1489,7 +1508,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Named reserves on some account balances." ] }, @@ -1500,7 +1519,7 @@ "plain": "Releases" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage version of the pallet.", "", " This is set to v2.0.0 for new networks." @@ -1521,7 +1540,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Transfer some liquid free balance to another account.", "", " `transfer` will set the `FreeBalance` of the sender and receiver.", @@ -1567,7 +1586,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the balances of a given account.", "", " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", @@ -1604,7 +1623,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Exactly as `transfer`, except the origin must be root and the source account may be", " specified.", " # ", @@ -1625,7 +1644,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Same as the [`transfer`] call, but with a check that the transfer will not kill the", " origin account.", "", @@ -1651,7 +1670,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Transfer the entire transferable balance from the caller account.", "", " NOTE: This function only attempts to transfer _transferable_ balances. This means that", @@ -1680,7 +1699,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account was created with some free balance. \\[account, free_balance\\]" ] }, @@ -1690,7 +1709,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account was removed whose balance was non-zero but below ExistentialDeposit,", " resulting in an outright loss. \\[account, balance\\]" ] @@ -1702,7 +1721,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Transfer succeeded. \\[from, to, value\\]" ] }, @@ -1713,7 +1732,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " A balance was set by root. \\[who, free, reserved\\]" ] }, @@ -1723,7 +1742,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some amount was deposited (e.g. for transaction fees). \\[who, deposit\\]" ] }, @@ -1733,7 +1752,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some balance was reserved (moved from free to reserved). \\[who, value\\]" ] }, @@ -1743,7 +1762,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Some balance was unreserved (moved from reserved to free). \\[who, value\\]" ] }, @@ -1755,7 +1774,7 @@ "Balance", "BalanceStatus" ], - "documentation": [ + "docs": [ " Some balance was moved from the reserve of the first account to the second account.", " Final argument indicates the destination balance type.", " \\[from, to, balance, destination_status\\]" @@ -1767,57 +1786,74 @@ "name": "ExistentialDeposit", "type": "Balance", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The minimum amount required to keep an account open." ] + }, + { + "name": "MaxLocks", + "type": "u32", + "value": "0x32000000", + "docs": [ + " The maximum number of locks that should exist on an account.", + " Not strictly enforced, but used for weight estimation." + ] + }, + { + "name": "MaxReserves", + "type": "u32", + "value": "0x32000000", + "docs": [ + " The maximum number of named reserves that can exist on an account." + ] } ], "errors": [ { "name": "VestingBalance", - "documentation": [ + "docs": [ " Vesting balance too high to send value" ] }, { "name": "LiquidityRestrictions", - "documentation": [ + "docs": [ " Account liquidity restrictions prevent withdrawal" ] }, { "name": "InsufficientBalance", - "documentation": [ + "docs": [ " Balance too low to send value" ] }, { "name": "ExistentialDeposit", - "documentation": [ + "docs": [ " Value too low to create account due to existential deposit" ] }, { "name": "KeepAlive", - "documentation": [ + "docs": [ " Transfer/payment would kill account" ] }, { "name": "ExistingVestingSchedule", - "documentation": [ + "docs": [ " A vesting schedule already exists for this account" ] }, { "name": "DeadAccount", - "documentation": [ + "docs": [ " Beneficiary account must pre-exist" ] }, { "name": "TooManyReserves", - "documentation": [ + "docs": [ " Number of named reserves exceed MaxReserves" ] } @@ -1836,7 +1872,7 @@ "plain": "Multiplier" }, "fallback": "0x000064a7b3b6e00d0000000000000000", - "documentation": [] + "docs": [] }, { "name": "StorageVersion", @@ -1845,7 +1881,7 @@ "plain": "Releases" }, "fallback": "0x00", - "documentation": [] + "docs": [] } ] }, @@ -1856,7 +1892,7 @@ "name": "TransactionByteFee", "type": "BalanceOf", "value": "0x00e40b54020000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the per-byte portion." ] }, @@ -1864,7 +1900,7 @@ "name": "WeightToFee", "type": "Vec", "value": "0x0401000000000000000000000000000000000000000001", - "documentation": [ + "docs": [ " The polynomial that is applied in order to derive fee from weight." ] } @@ -1884,7 +1920,7 @@ "plain": "u32" }, "fallback": "0x01000000", - "documentation": [ + "docs": [ " Internal counter for the number of rounds.", "", " This is useful for de-duplication of transactions submitted to the pool, and general", @@ -1900,7 +1936,7 @@ "plain": "ElectionPhase" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Current phase." ] }, @@ -1911,7 +1947,7 @@ "plain": "ReadySolution" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Current best solution, signed or unsigned, queued to be returned upon `elect`." ] }, @@ -1922,7 +1958,7 @@ "plain": "RoundSnapshot" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Snapshot data of the round.", "", " This is created at the beginning of the signed phase and cleared upon calling `elect`." @@ -1935,7 +1971,7 @@ "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Desired number of targets to elect for this round.", "", " Only exists when [`Snapshot`] is present." @@ -1948,7 +1984,7 @@ "plain": "SolutionOrSnapshotSize" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The metadata of the [`RoundSnapshot`]", "", " Only exists when [`Snapshot`] is present." @@ -1961,7 +1997,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The next index to be assigned to an incoming signed submission.", "", " Every accepted submission is assigned a unique index; that index is bound to that particular", @@ -1980,7 +2016,7 @@ "plain": "SubmissionIndicesOf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A sorted, bounded set of `(score, index)`, where each `index` points to a value in", " `SignedSubmissions`.", "", @@ -2000,8 +2036,8 @@ "linked": false } }, - "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000", - "documentation": [ + "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000", + "docs": [ " Unchecked, signed solutions.", "", " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while", @@ -2018,7 +2054,7 @@ "plain": "ElectionScore" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The minimum score that each 'untrusted' solution must attain in order to be considered", " feasible.", "", @@ -2040,7 +2076,7 @@ "type": "SolutionOrSnapshotSize" } ], - "documentation": [ + "docs": [ " Submit a solution for the unsigned phase.", "", " The dispatch origin fo this call must be __none__.", @@ -2065,7 +2101,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Set a new value for `MinimumUntrustedScore`.", "", " Dispatch origin must be aligned with `T::ForceOrigin`.", @@ -2077,11 +2113,11 @@ "name": "set_emergency_election_result", "args": [ { - "name": "solution", - "type": "ReadySolution" + "name": "supports", + "type": "Supports" } ], - "documentation": [ + "docs": [ " Set a solution in the queue, to be handed out to the client of this pallet in the next", " call to `ElectionProvider::elect`.", "", @@ -2104,7 +2140,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Submit a solution for the signed phase.", "", " The dispatch origin fo this call must be __signed__.", @@ -2128,7 +2164,7 @@ "ElectionCompute", "bool" ], - "documentation": [ + "docs": [ " A solution was stored with the given compute.", "", " If the solution is signed, this means that it hasn't yet been processed. If the", @@ -2142,7 +2178,7 @@ "args": [ "Option" ], - "documentation": [ + "docs": [ " The election has been finalized, with `Some` of the given computation, or else if the", " election failed, `None`." ] @@ -2153,7 +2189,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has been rewarded for their signed submission being finalized." ] }, @@ -2163,7 +2199,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has been slashed for submitting an invalid signed submission." ] }, @@ -2172,7 +2208,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " The signed phase of the given round has started." ] }, @@ -2181,7 +2217,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " The unsigned phase of the given round has started." ] } @@ -2191,7 +2227,7 @@ "name": "UnsignedPhase", "type": "BlockNumber", "value": "0x32000000", - "documentation": [ + "docs": [ " Duration of the unsigned phase." ] }, @@ -2199,7 +2235,7 @@ "name": "SignedPhase", "type": "BlockNumber", "value": "0x32000000", - "documentation": [ + "docs": [ " Duration of the signed phase." ] }, @@ -2207,7 +2243,7 @@ "name": "SolutionImprovementThreshold", "type": "Perbill", "value": "0xa0860100", - "documentation": [ + "docs": [ " The minimum amount of improvement to the solution score that defines a solution as", " \"better\" (in any phase)." ] @@ -2216,18 +2252,46 @@ "name": "OffchainRepeat", "type": "BlockNumber", "value": "0x05000000", - "documentation": [ + "docs": [ " The repeat threshold of the offchain worker.", "", " For example, if it is 5, that means that at least 5 blocks will elapse between attempts", " to submit the worker's solution." ] }, + { + "name": "MinerTxPriority", + "type": "TransactionPriority", + "value": "0xfeffffffffffff7f", + "docs": [ + " The priority of the unsigned transaction submitted in the unsigned-phase" + ] + }, + { + "name": "MinerMaxIterations", + "type": "u32", + "value": "0x0a000000", + "docs": [ + " Maximum number of iteration of balancing that will be executed in the embedded miner of", + " the pallet." + ] + }, + { + "name": "MinerMaxWeight", + "type": "Weight", + "value": "0xc07c907c2d010000", + "docs": [ + " Maximum weight that the miner should consume.", + "", + " The miner will ensure that the total weight of the unsigned solution will not exceed", + " this value, based on [`WeightInfo::submit_unsigned`]." + ] + }, { "name": "SignedMaxSubmissions", "type": "u32", "value": "0x0a000000", - "documentation": [ + "docs": [ " Maximum number of signed submissions that can be queued.", "", " It is best to avoid adjusting this during an election, as it impacts downstream data", @@ -2241,7 +2305,7 @@ "name": "SignedMaxWeight", "type": "Weight", "value": "0xc07c907c2d010000", - "documentation": [ + "docs": [ " Maximum weight of a signed solution.", "", " This should probably be similar to [`Config::MinerMaxWeight`]." @@ -2251,7 +2315,7 @@ "name": "SignedRewardBase", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Base reward for a signed solution" ] }, @@ -2259,7 +2323,7 @@ "name": "SignedDepositBase", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Base deposit for a signed solution." ] }, @@ -2267,7 +2331,7 @@ "name": "SignedDepositByte", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " Per-byte deposit for a signed solution." ] }, @@ -2275,75 +2339,86 @@ "name": "SignedDepositWeight", "type": "BalanceOf", "value": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " Per-weight deposit for a signed solution." ] + }, + { + "name": "MinerMaxLength", + "type": "u32", + "value": "0x00003600", + "docs": [ + " Maximum length (bytes) that the mined solution should consume.", + "", + " The miner will ensure that the total length of the unsigned solution will not exceed", + " this value." + ] } ], "errors": [ { "name": "PreDispatchEarlySubmission", - "documentation": [ + "docs": [ " Submission was too early." ] }, { "name": "PreDispatchWrongWinnerCount", - "documentation": [ + "docs": [ " Wrong number of winners presented." ] }, { "name": "PreDispatchWeakSubmission", - "documentation": [ + "docs": [ " Submission was too weak, score-wise." ] }, { "name": "SignedQueueFull", - "documentation": [ + "docs": [ " The queue was full, and the solution was not better than any of the existing ones." ] }, { "name": "SignedCannotPayDeposit", - "documentation": [ + "docs": [ " The origin failed to pay the deposit." ] }, { "name": "SignedInvalidWitness", - "documentation": [ + "docs": [ " Witness data to dispatchable is invalid." ] }, { "name": "SignedTooMuchWeight", - "documentation": [ + "docs": [ " The signed submission consumes too much weight" ] }, { "name": "OcwCallWrongEra", - "documentation": [ + "docs": [ " OCW submitted solution for wrong round" ] }, { "name": "MissingSnapshotMetadata", - "documentation": [ + "docs": [ " Snapshot metadata should exist but didn't." ] }, { "name": "InvalidSubmissionIndex", - "documentation": [ + "docs": [ " `Self::insert_submission` returned an invalid index." ] }, { "name": "CallNotAllowed", - "documentation": [ + "docs": [ " The call is not allowed at this point." ] } @@ -2362,7 +2437,7 @@ "plain": "u32" }, "fallback": "0x54000000", - "documentation": [ + "docs": [ " Number of eras to keep in history.", "", " Information is kept for eras in `[current_era - history_depth; current_era]`.", @@ -2379,7 +2454,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The ideal number of staking participants." ] }, @@ -2390,7 +2465,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Minimum number of staking participants before emergency conditions are imposed." ] }, @@ -2401,7 +2476,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", " easy to initialize and the performance hit is minimal (we expect no more than four", " invulnerables) and restricted to testnets." @@ -2419,7 +2494,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all locked \"stash\" accounts to the controller account." ] }, @@ -2430,7 +2505,7 @@ "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The minimum active bond to become and maintain the role of a nominator." ] }, @@ -2441,7 +2516,7 @@ "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The minimum active bond to become and maintain the role of a validator." ] }, @@ -2457,7 +2532,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." ] }, @@ -2473,7 +2548,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Where the reward payment should be made. Keyed by stash." ] }, @@ -2489,7 +2564,7 @@ } }, "fallback": "0x0000", - "documentation": [ + "docs": [ " The map from (wannabe) validator stash key to the preferences of that validator.", "", " When updating this storage item, you must also update the `CounterForValidators`." @@ -2502,7 +2577,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " A tracker to keep count of the number of items in the `Validators` map." ] }, @@ -2513,7 +2588,7 @@ "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The maximum validator count before we stop allowing new validators to join.", "", " When this value is not set, no limits are enforced." @@ -2531,7 +2606,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The map from nominator stash key to the set of stash keys of all validators to nominate.", "", " When updating this storage item, you must also update the `CounterForNominators`." @@ -2544,7 +2619,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " A tracker to keep count of the number of items in the `Nominators` map." ] }, @@ -2555,7 +2630,7 @@ "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The maximum nominator count before we stop allowing new validators to join.", "", " When this value is not set, no limits are enforced." @@ -2568,7 +2643,7 @@ "plain": "EraIndex" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current era index.", "", " This is the latest planned era, depending on how the Session pallet queues the validator", @@ -2582,7 +2657,7 @@ "plain": "ActiveEraInfo" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The active era information, it holds index and start.", "", " The active era is the era being currently rewarded. Validator set of this era must be", @@ -2601,7 +2676,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The session index at which the era start for the last `HISTORY_DEPTH` eras.", "", " Note: This tracks the starting session (i.e. session index when era start being active)", @@ -2621,7 +2696,7 @@ } }, "fallback": "0x000000", - "documentation": [ + "docs": [ " Exposure of validator at era.", "", " This is keyed first by the era index to allow bulk deletion and then the stash account.", @@ -2643,7 +2718,7 @@ } }, "fallback": "0x000000", - "documentation": [ + "docs": [ " Clipped Exposure of validator at era.", "", " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the", @@ -2670,7 +2745,7 @@ } }, "fallback": "0x0000", - "documentation": [ + "docs": [ " Similar to `ErasStakers`, this holds the preferences of validators.", "", " This is keyed first by the era index to allow bulk deletion and then the stash account.", @@ -2690,7 +2765,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The total validator era payout for the last `HISTORY_DEPTH` eras.", "", " Eras that haven't finished yet or has been removed doesn't have reward." @@ -2708,7 +2783,7 @@ } }, "fallback": "0x0000000000", - "documentation": [ + "docs": [ " Rewards for the last `HISTORY_DEPTH` eras.", " If reward hasn't been set or has been removed then 0 reward is returned." ] @@ -2725,7 +2800,7 @@ } }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The total amount staked for the last `HISTORY_DEPTH` eras.", " If total hasn't been set or has been removed then 0 stake is returned." ] @@ -2737,7 +2812,7 @@ "plain": "Forcing" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Mode of era forcing." ] }, @@ -2748,7 +2823,7 @@ "plain": "Perbill" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The percentage of the slash that is distributed to reporters.", "", " The rest of the slashed value is handled by the `Slash`." @@ -2761,7 +2836,7 @@ "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The amount of currency given to reporters of a slash event which was", " canceled by extraordinary circumstances (e.g. governance)." ] @@ -2778,7 +2853,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All unapplied slashes that are queued for later." ] }, @@ -2789,7 +2864,7 @@ "plain": "Vec<(EraIndex,SessionIndex)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from still-bonded eras to the first session index of that era.", "", " Must contains information for eras for the range:", @@ -2809,7 +2884,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on validators, mapped by era to the highest slash proportion", " and slash value of the era." ] @@ -2827,7 +2902,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on nominators, mapped by era to the highest slash value of the era." ] }, @@ -2843,7 +2918,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Slashing spans for stash accounts." ] }, @@ -2859,7 +2934,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Records information about the maximum slash of a stash within a slashing span,", " as well as how much reward has been paid out." ] @@ -2871,7 +2946,7 @@ "plain": "EraIndex" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The earliest era for which we have a pending, unapplied slash." ] }, @@ -2882,10 +2957,10 @@ "plain": "SessionIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The last planned session scheduled by the session pallet.", "", - " This is basically in sync with the call to [`SessionManager::new_session`]." + " This is basically in sync with the call to [`pallet_session::SessionManager::new_session`]." ] }, { @@ -2895,11 +2970,11 @@ "plain": "Releases" }, "fallback": "0x06", - "documentation": [ + "docs": [ " True if network has been upgraded to this version.", " Storage version of the pallet.", "", - " This is set to v6.0.0 for new networks." + " This is set to v7.0.0 for new networks." ] }, { @@ -2909,7 +2984,7 @@ "plain": "Percent" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The threshold for when users can start calling `chill_other` for other validators / nominators.", " The threshold is compared to the actual number of validators / nominators (`CountFor*`) in", " the system compared to the configured max (`Max*Count`)." @@ -2934,7 +3009,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " Take the origin account as a stash and lock up `value` of its balance. `controller` will", " be the account that controls it.", "", @@ -2943,7 +3018,6 @@ " The dispatch origin for this call must be _Signed_ by the stash account.", "", " Emits `Bonded`.", - "", " # ", " - Independent of the arguments. Moderate complexity.", " - O(1).", @@ -2952,10 +3026,6 @@ " NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned", " unless the `origin` falls below _existential deposit_ and gets removed as dust.", " ------------------", - " Weight: O(1)", - " DB Weight:", - " - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks", - " - Write: Bonded, Payee, [Origin Account], Locks, Ledger", " # " ] }, @@ -2967,27 +3037,21 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add some extra amount that have appeared in the stash `free_balance` into the balance up", " for staking.", "", - " Use this if there are additional funds in your stash account that you wish to bond.", - " Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount", - " that can be added.", + " The dispatch origin for this call must be _Signed_ by the stash, not the controller.", "", - " The dispatch origin for this call must be _Signed_ by the stash, not the controller and", - " it can be only called when [`EraElectionStatus`] is `Closed`.", + " Use this if there are additional funds in your stash account that you wish to bond.", + " Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose any limitation", + " on the amount that can be added.", "", " Emits `Bonded`.", "", " # ", " - Independent of the arguments. Insignificant complexity.", " - O(1).", - " - One DB entry.", - " ------------", - " DB Weight:", - " - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks", - " - Write: [Origin Account], Locks, Ledger", " # " ] }, @@ -2999,11 +3063,13 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", " period ends. If this leaves an amount actively bonded less than", " T::Currency::minimum_balance(), then it is increased to the full amount.", "", + " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", " Once the unlock period is done, you can call `withdraw_unbonded` to actually move", " the funds out of management ready for transfer.", "", @@ -3014,27 +3080,9 @@ " If a user encounters the `InsufficientBond` error when calling this extrinsic,", " they should call `chill` first in order to free up their bonded funds.", "", - " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - " And, it can be only called when [`EraElectionStatus`] is `Closed`.", - "", " Emits `Unbonded`.", "", - " See also [`Call::withdraw_unbonded`].", - "", - " # ", - " - Independent of the arguments. Limited but potentially exploitable complexity.", - " - Contains a limited number of reads.", - " - Each call (requires the remainder of the bonded balance to be above `minimum_balance`)", - " will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage.", - " The only way to clean the aforementioned storage item is also user-controlled via", - " `withdraw_unbonded`.", - " - One DB entry.", - " ----------", - " Weight: O(1)", - " DB Weight:", - " - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash,", - " - Write: Locks, Ledger, BalanceOf Stash,", - " " + " See also [`Call::withdraw_unbonded`]." ] }, { @@ -3045,36 +3093,20 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Remove any unlocked chunks from the `unlocking` queue from our management.", "", " This essentially frees up that balance to be used by the stash account to do", " whatever it wants.", "", - " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - " And, it can be only called when [`EraElectionStatus`] is `Closed`.", + " The dispatch origin for this call must be _Signed_ by the controller.", "", " Emits `Withdrawn`.", "", " See also [`Call::unbond`].", "", " # ", - " - Could be dependent on the `origin` argument and how much `unlocking` chunks exist.", - " It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is", - " indirectly user-controlled. See [`unbond`] for more detail.", - " - Contains a limited number of reads, yet the size of which could be large based on `ledger`.", - " - Writes are limited to the `origin` account key.", - " ---------------", " Complexity O(S) where S is the number of slashing spans to remove", - " Update:", - " - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account]", - " - Writes: [Origin Account], Locks, Ledger", - " Kill:", - " - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin", - " Account], Locks, BalanceOf stash", - " - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,", - " [Origin Account], Locks, BalanceOf stash.", - " - Writes Each: SpanSlash * S", " NOTE: Weight annotation is the kill scenario, we refund otherwise.", " # " ] @@ -3087,24 +3119,12 @@ "type": "ValidatorPrefs" } ], - "documentation": [ + "docs": [ " Declare the desire to validate for the origin controller.", "", " Effects will be felt at the beginning of the next era.", "", - " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - " And, it can be only called when [`EraElectionStatus`] is `Closed`.", - "", - " # ", - " - Independent of the arguments. Insignificant complexity.", - " - Contains a limited number of reads.", - " - Writes are limited to the `origin` account key.", - " -----------", - " Weight: O(1)", - " DB Weight:", - " - Read: Era Election Status, Ledger", - " - Write: Nominators, Validators", - " # " + " The dispatch origin for this call must be _Signed_ by the controller, not the stash." ] }, { @@ -3115,48 +3135,34 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Declare the desire to nominate `targets` for the origin controller.", "", - " Effects will be felt at the beginning of the next era. This can only be called when", - " [`EraElectionStatus`] is `Closed`.", + " Effects will be felt at the beginning of the next era.", "", " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - " And, it can be only called when [`EraElectionStatus`] is `Closed`.", "", " # ", " - The transaction's complexity is proportional to the size of `targets` (N)", " which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).", " - Both the reads and writes follow a similar pattern.", - " ---------", - " Weight: O(N)", - " where N is the number of targets", - " DB Weight:", - " - Reads: Era Election Status, Ledger, Current Era", - " - Writes: Validators, Nominators", " # " ] }, { "name": "chill", "args": [], - "documentation": [ + "docs": [ " Declare no desire to either validate or nominate.", "", " Effects will be felt at the beginning of the next era.", "", " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - " And, it can be only called when [`EraElectionStatus`] is `Closed`.", "", " # ", " - Independent of the arguments. Insignificant complexity.", " - Contains one read.", " - Writes are limited to the `origin` account key.", - " --------", - " Weight: O(1)", - " DB Weight:", - " - Read: EraElectionStatus, Ledger", - " - Write: Validators, Nominators", " # " ] }, @@ -3168,7 +3174,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " (Re-)set the payment target for a controller.", "", " Effects will be felt at the beginning of the next era.", @@ -3195,7 +3201,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " (Re-)set the controller of a stash.", "", " Effects will be felt at the beginning of the next era.", @@ -3222,7 +3228,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Sets the ideal number of validators.", "", " The dispatch origin must be Root.", @@ -3241,13 +3247,13 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Increments the ideal number of validators.", "", " The dispatch origin must be Root.", "", " # ", - " Same as [`set_validator_count`].", + " Same as [`Self::set_validator_count`].", " # " ] }, @@ -3259,20 +3265,20 @@ "type": "Percent" } ], - "documentation": [ + "docs": [ " Scale up the ideal number of validators by a factor.", "", " The dispatch origin must be Root.", "", " # ", - " Same as [`set_validator_count`].", + " Same as [`Self::set_validator_count`].", " # " ] }, { "name": "force_no_eras", "args": [], - "documentation": [ + "docs": [ " Force there to be no new eras indefinitely.", "", " The dispatch origin must be Root.", @@ -3293,7 +3299,7 @@ { "name": "force_new_era", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of the next session. After this, it will be", " reset to normal (non-forced) behaviour.", "", @@ -3320,7 +3326,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set the validators who cannot be slashed (if any).", "", " The dispatch origin must be Root.", @@ -3343,7 +3349,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Force a current staker to become completely unstaked, immediately.", "", " The dispatch origin must be Root.", @@ -3359,7 +3365,7 @@ { "name": "force_new_era_always", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of sessions indefinitely.", "", " The dispatch origin must be Root.", @@ -3388,7 +3394,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Cancel enactment of a deferred slash.", "", " Can be called by the `T::SlashCancelOrigin`.", @@ -3416,7 +3422,7 @@ "type": "EraIndex" } ], - "documentation": [ + "docs": [ " Pay out all the stakers behind a single validator for a single era.", "", " - `validator_stash` is the stash account of the validator. Their nominators, up to", @@ -3426,8 +3432,6 @@ " The origin of this call must be _Signed_. Any account can call this function, even if", " it is not one of the stakers.", "", - " This can only be called when [`EraElectionStatus`] is `Closed`.", - "", " # ", " - Time complexity: at most O(MaxNominatorRewardedPerValidator).", " - Contains a limited number of reads and writes.", @@ -3436,11 +3440,6 @@ " Weight:", " - Reward Destination Staked: O(N)", " - Reward Destination Controller (Creating): O(N)", - " DB Weight:", - " - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward,", - " ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items)", - " - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items)", - " - Write Each: System Account, Locks, Ledger (3 items)", "", " NOTE: weights are assuming that payouts are made to alive stash account (Staked).", " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here.", @@ -3455,20 +3454,15 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Rebond a portion of the stash scheduled to be unlocked.", "", - " The dispatch origin must be signed by the controller, and it can be only called when", - " [`EraElectionStatus`] is `Closed`.", + " The dispatch origin must be signed by the controller.", "", " # ", " - Time complexity: O(L), where L is unlocking chunks", " - Bounded by `MAX_UNLOCKING_CHUNKS`.", " - Storage changes: Can't increase storage, only decrease it.", - " ---------------", - " - DB Weight:", - " - Reads: EraElectionStatus, Ledger, Locks, [Origin Account]", - " - Writes: [Origin Account], Locks, Ledger", " # " ] }, @@ -3484,7 +3478,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set `HistoryDepth` value. This function will delete any history information", " when `HistoryDepth` is reduced.", "", @@ -3520,7 +3514,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Remove all data structure concerning a staker/stash once its balance is at the minimum.", " This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone", " and the target `stash` must have no funds left beyond the ED.", @@ -3546,14 +3540,12 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Remove the given nominations from the calling validator.", "", " Effects will be felt at the beginning of the next era.", "", " The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - " And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller", - " account should represent a validator.", "", " - `who`: A list of nominator stash accounts who are nominating this validator which", " should no longer be nominating this validator.", @@ -3586,7 +3578,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Update the various staking limits this pallet.", "", " * `min_nominator_bond`: The minimum active bond needed to be a nominator.", @@ -3610,7 +3602,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Declare a `controller` to stop participating as either a validator or nominator.", "", " Effects will be felt at the beginning of the next era.", @@ -3631,42 +3623,41 @@ " bond required.", "", " This can be helpful if bond requirements are updated, and we need to remove old users", - " who do not satisfy these requirements.", - "" + " who do not satisfy these requirements." ] } ], "events": [ { - "name": "EraPayout", + "name": "EraPaid", "args": [ "EraIndex", "Balance", "Balance" ], - "documentation": [ + "docs": [ " The era payout has been set; the first balance is the validator-payout; the second is", " the remainder from the maximum amount of reward.", " \\[era_index, validator_payout, remainder\\]" ] }, { - "name": "Reward", + "name": "Rewarded", "args": [ "AccountId", "Balance" ], - "documentation": [ - " The staker has been rewarded by this amount. \\[stash, amount\\]" + "docs": [ + " The nominator has been rewarded by this amount. \\[stash, amount\\]" ] }, { - "name": "Slash", + "name": "Slashed", "args": [ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " One validator (and its nominators) has been slashed by the given amount.", " \\[validator, amount\\]" ] @@ -3676,15 +3667,15 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " An old slashing report from a prior era was discarded because it could", " not be processed. \\[session_index\\]" ] }, { - "name": "StakingElection", + "name": "StakersElected", "args": [], - "documentation": [ + "docs": [ " A new set of stakers was elected." ] }, @@ -3694,7 +3685,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has bonded this amount. \\[stash, amount\\]", "", " NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,", @@ -3707,7 +3698,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has unbonded this amount. \\[stash, amount\\]" ] }, @@ -3717,7 +3708,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`", " from the unlocking queue. \\[stash, amount\\]" ] @@ -3728,16 +3719,36 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A nominator has been kicked from a validator. \\[nominator, stash\\]" ] }, { "name": "StakingElectionFailed", "args": [], - "documentation": [ + "docs": [ " The election failed. No new era is planned." ] + }, + { + "name": "Chilled", + "args": [ + "AccountId" + ], + "docs": [ + " An account has stopped participating as either a validator or nominator.", + " \\[stash\\]" + ] + }, + { + "name": "PayoutStarted", + "args": [ + "EraIndex", + "AccountId" + ], + "docs": [ + " The stakers' rewards are getting paid. \\[era_index, validator_stash\\]" + ] } ], "constants": [ @@ -3745,7 +3756,7 @@ "name": "SessionsPerEra", "type": "SessionIndex", "value": "0x06000000", - "documentation": [ + "docs": [ " Number of sessions per era." ] }, @@ -3753,7 +3764,7 @@ "name": "BondingDuration", "type": "EraIndex", "value": "0xa0020000", - "documentation": [ + "docs": [ " Number of eras that staked funds must remain bonded for." ] }, @@ -3761,7 +3772,7 @@ "name": "SlashDeferDuration", "type": "EraIndex", "value": "0xa8000000", - "documentation": [ + "docs": [ " Number of eras that slashes are deferred by, after computation.", "", " This should be less than the bonding duration. Set to 0 if slashes", @@ -3772,7 +3783,7 @@ "name": "MaxNominatorRewardedPerValidator", "type": "u32", "value": "0x00010000", - "documentation": [ + "docs": [ " The maximum number of nominators rewarded for each validator.", "", " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim", @@ -3783,146 +3794,146 @@ "name": "MaxNominations", "type": "u32", "value": "0x10000000", - "documentation": [] + "docs": [] } ], "errors": [ { "name": "NotController", - "documentation": [ + "docs": [ " Not a controller account." ] }, { "name": "NotStash", - "documentation": [ + "docs": [ " Not a stash account." ] }, { "name": "AlreadyBonded", - "documentation": [ + "docs": [ " Stash is already bonded." ] }, { "name": "AlreadyPaired", - "documentation": [ + "docs": [ " Controller is already paired." ] }, { "name": "EmptyTargets", - "documentation": [ + "docs": [ " Targets cannot be empty." ] }, { "name": "DuplicateIndex", - "documentation": [ + "docs": [ " Duplicate index." ] }, { "name": "InvalidSlashIndex", - "documentation": [ + "docs": [ " Slash record index out of bounds." ] }, { "name": "InsufficientBond", - "documentation": [ + "docs": [ " Can not bond with value less than minimum required." ] }, { "name": "NoMoreChunks", - "documentation": [ + "docs": [ " Can not schedule more unlock chunks." ] }, { "name": "NoUnlockChunk", - "documentation": [ + "docs": [ " Can not rebond without unlocking chunks." ] }, { "name": "FundedTarget", - "documentation": [ + "docs": [ " Attempting to target a stash that still has funds." ] }, { "name": "InvalidEraToReward", - "documentation": [ + "docs": [ " Invalid era to reward." ] }, { "name": "InvalidNumberOfNominations", - "documentation": [ + "docs": [ " Invalid number of nominations." ] }, { "name": "NotSortedAndUnique", - "documentation": [ + "docs": [ " Items are not sorted and unique." ] }, { "name": "AlreadyClaimed", - "documentation": [ + "docs": [ " Rewards for this era have already been claimed for this validator." ] }, { "name": "IncorrectHistoryDepth", - "documentation": [ + "docs": [ " Incorrect previous history depth input provided." ] }, { "name": "IncorrectSlashingSpans", - "documentation": [ + "docs": [ " Incorrect number of slashing spans provided." ] }, { "name": "BadState", - "documentation": [ + "docs": [ " Internal state has become somehow corrupted and the operation cannot continue." ] }, { "name": "TooManyTargets", - "documentation": [ + "docs": [ " Too many nomination targets supplied." ] }, { "name": "BadTarget", - "documentation": [ + "docs": [ " A nomination target was supplied that was blocked or otherwise not a validator." ] }, { "name": "CannotChillOther", - "documentation": [ + "docs": [ " The user has enough bond and thus cannot be chilled forcefully by an external person." ] }, { "name": "TooManyNominators", - "documentation": [ + "docs": [ " There are too many nominators in the system. Governance needs to adjust the staking settings", " to keep things safe for the runtime." ] }, { "name": "TooManyValidators", - "documentation": [ + "docs": [ " There are too many validators in the system. Governance needs to adjust the staking settings", " to keep things safe for the runtime." ] @@ -3942,7 +3953,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of validators." ] }, @@ -3953,7 +3964,7 @@ "plain": "SessionIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Current index of the session." ] }, @@ -3964,7 +3975,7 @@ "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the underlying economic identities or weighting behind the validators", " has changed in the queued validator set." ] @@ -3976,7 +3987,7 @@ "plain": "Vec<(ValidatorId,Keys)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The queued keys for the next session. When the next session begins, these keys", " will be used to determine the validator's session keys." ] @@ -3988,7 +3999,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Indices of disabled validators.", "", " The set is cleared when `on_session_ending` returns a new set of identities." @@ -4006,7 +4017,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The next session keys for a validator." ] }, @@ -4022,7 +4033,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The owner of a key. The key is the `KeyTypeId` + the encoded key." ] } @@ -4041,7 +4052,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Sets the session key(s) of the function caller to `keys`.", " Allows an account to set its session key prior to becoming a validator.", " This doesn't take effect until the next session.", @@ -4061,7 +4072,7 @@ { "name": "purge_keys", "args": [], - "documentation": [ + "docs": [ " Removes any session key(s) of the function caller.", " This doesn't take effect until the next session.", "", @@ -4083,7 +4094,7 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " New session has happened. Note that the argument is the \\[session_index\\], not the block", " number as the type might suggest." ] @@ -4093,31 +4104,31 @@ "errors": [ { "name": "InvalidProof", - "documentation": [ + "docs": [ " Invalid ownership proof." ] }, { "name": "NoAssociatedValidatorId", - "documentation": [ + "docs": [ " No associated validator ID for account." ] }, { "name": "DuplicatedKey", - "documentation": [ + "docs": [ " Registered duplicate key." ] }, { "name": "NoKeys", - "documentation": [ + "docs": [ " No keys are associated with this account." ] }, { "name": "NoAccount", - "documentation": [ + "docs": [ " Key setting account is not live, so it's impossible to associate keys." ] } @@ -4136,7 +4147,7 @@ "plain": "PropIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of (public) proposals that have been made so far." ] }, @@ -4147,7 +4158,7 @@ "plain": "Vec<(PropIndex,Hash,AccountId)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The public proposals. Unsorted. The second item is the proposal's hash." ] }, @@ -4163,7 +4174,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Those who have locked a deposit.", "", " TWOX-NOTE: Safe, as increasing integer keys are safe." @@ -4181,7 +4192,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map of hashes to the proposal preimage, along with who registered it and their deposit.", " The block number is the block at which it was deposited." ] @@ -4193,7 +4204,7 @@ "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The next free referendum index, aka the number of referenda started so far." ] }, @@ -4204,7 +4215,7 @@ "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The lowest referendum index representing an unbaked referendum. Equal to", " `ReferendumCount` if there isn't a unbaked referendum." ] @@ -4221,7 +4232,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information concerning any given referendum.", "", " TWOX-NOTE: SAFE as indexes are not under an attacker’s control." @@ -4239,7 +4250,7 @@ } }, "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " All votes for a particular voter. We store the balance for the number of votes that we", " have recorded. The second item is the total amount of delegations, that will be added.", "", @@ -4258,7 +4269,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Accounts for which there are locks in action which may be removed at some point in the", " future. The value is the block number at which the lock expires and may be removed.", "", @@ -4272,7 +4283,7 @@ "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the last referendum tabled was submitted externally. False if it was a public", " proposal." ] @@ -4284,7 +4295,7 @@ "plain": "(Hash,VoteThreshold)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The referendum to be tabled whenever it would be valid to table an external proposal.", " This happens when a referendum needs to be tabled and one of two conditions are met:", " - `LastTabledWasExternal` is `false`; or", @@ -4303,7 +4314,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A record of who vetoed what. Maps proposal hash to a possible existent block number", " (until when it may not be resubmitted) and who vetoed it." ] @@ -4320,7 +4331,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Record of all proposals that have been subject to emergency cancellation." ] }, @@ -4331,7 +4342,7 @@ "plain": "Releases" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage version of the pallet.", "", " New networks start with last version." @@ -4352,7 +4363,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Propose a sensitive action to be taken.", "", " The dispatch origin of this call must be _Signed_ and the sender must", @@ -4378,7 +4389,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Signals agreement with a particular proposal.", "", " The dispatch origin of this call must be _Signed_ and the sender", @@ -4403,7 +4414,7 @@ "type": "AccountVote" } ], - "documentation": [ + "docs": [ " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", " otherwise it is a vote to keep the status quo.", "", @@ -4423,7 +4434,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", " referendum.", "", @@ -4442,7 +4453,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a referendum to be tabled once it is legal to schedule an external", " referendum.", "", @@ -4462,7 +4473,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", " an external referendum.", "", @@ -4484,7 +4495,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", " schedule an external referendum.", "", @@ -4514,7 +4525,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Schedule the currently externally-proposed majority-carries referendum to be tabled", " immediately. If there is no externally-proposed referendum currently, or if there is one", " but it is not a majority-carries referendum then it fails.", @@ -4540,7 +4551,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Veto and blacklist the external proposal hash.", "", " The dispatch origin of this call must be `VetoOrigin`.", @@ -4560,7 +4571,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove a referendum.", "", " The dispatch origin of this call must be _Root_.", @@ -4578,7 +4589,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Cancel a proposal queued for enactment.", "", " The dispatch origin of this call must be _Root_.", @@ -4604,7 +4615,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " Delegate the voting power (with some given conviction) of the sending account.", "", " The balance delegated is locked for as long as it's delegated, and thereafter for the", @@ -4630,7 +4641,7 @@ { "name": "undelegate", "args": [], - "documentation": [ + "docs": [ " Undelegate the voting power of the sending account.", "", " Tokens may be unlocked following once an amount of time consistent with the lock period", @@ -4648,7 +4659,7 @@ { "name": "clear_public_proposals", "args": [], - "documentation": [ + "docs": [ " Clears all public proposals.", "", " The dispatch origin of this call must be _Root_.", @@ -4664,7 +4675,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", " in the dispatch queue but does require a deposit, returned once enacted.", "", @@ -4685,7 +4696,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Same as `note_preimage` but origin is `OperationalPreimageOrigin`." ] }, @@ -4697,7 +4708,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This requires the proposal to be", " in the dispatch queue. No deposit is needed. When this call is successful, i.e.", " the preimage has not been uploaded before and matches some imminent proposal,", @@ -4720,7 +4731,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`." ] }, @@ -4736,7 +4747,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove an expired proposal preimage and collect the deposit.", "", " The dispatch origin of this call must be _Signed_.", @@ -4762,7 +4773,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Unlock tokens that have an expired lock.", "", " The dispatch origin of this call must be _Signed_.", @@ -4780,7 +4791,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Remove a vote for a referendum.", "", " If:", @@ -4822,7 +4833,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Remove a vote for a referendum.", "", " If the `target` is equal to the signer, then this function is exactly equivalent to", @@ -4852,7 +4863,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Enact a proposal from a referendum. For now we just make the weight be the maximum." ] }, @@ -4868,7 +4879,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Permanently place a proposal into the blacklist. This prevents it from ever being", " proposed again.", "", @@ -4894,7 +4905,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove a proposal.", "", " The dispatch origin of this call must be `CancelProposalOrigin`.", @@ -4912,7 +4923,7 @@ "PropIndex", "Balance" ], - "documentation": [ + "docs": [ " A motion has been proposed by a public account. \\[proposal_index, deposit\\]" ] }, @@ -4923,14 +4934,14 @@ "Balance", "Vec" ], - "documentation": [ + "docs": [ " A public proposal has been tabled for referendum vote. \\[proposal_index, deposit, depositors\\]" ] }, { "name": "ExternalTabled", "args": [], - "documentation": [ + "docs": [ " An external proposal has been tabled." ] }, @@ -4940,7 +4951,7 @@ "ReferendumIndex", "VoteThreshold" ], - "documentation": [ + "docs": [ " A referendum has begun. \\[ref_index, threshold\\]" ] }, @@ -4949,7 +4960,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been approved by referendum. \\[ref_index\\]" ] }, @@ -4958,7 +4969,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been rejected by referendum. \\[ref_index\\]" ] }, @@ -4967,7 +4978,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A referendum has been cancelled. \\[ref_index\\]" ] }, @@ -4975,10 +4986,10 @@ "name": "Executed", "args": [ "ReferendumIndex", - "bool" + "DispatchResult" ], - "documentation": [ - " A proposal has been enacted. \\[ref_index, is_ok\\]" + "docs": [ + " A proposal has been enacted. \\[ref_index, result\\]" ] }, { @@ -4987,7 +4998,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An account has delegated their vote to another account. \\[who, target\\]" ] }, @@ -4996,7 +5007,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An \\[account\\] has cancelled a previous delegation operation." ] }, @@ -5007,7 +5018,7 @@ "Hash", "BlockNumber" ], - "documentation": [ + "docs": [ " An external proposal has been vetoed. \\[who, proposal_hash, until\\]" ] }, @@ -5018,7 +5029,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal's preimage was noted, and the deposit taken. \\[proposal_hash, who, deposit\\]" ] }, @@ -5029,7 +5040,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal preimage was removed and used (the deposit was returned).", " \\[proposal_hash, provider, deposit\\]" ] @@ -5040,7 +5051,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was invalid.", " \\[proposal_hash, ref_index\\]" ] @@ -5051,7 +5062,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was missing.", " \\[proposal_hash, ref_index\\]" ] @@ -5064,7 +5075,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A registered preimage was removed and the deposit collected by the reaper.", " \\[proposal_hash, provider, deposit, reaper\\]" ] @@ -5074,7 +5085,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An \\[account\\] has been unlocked successfully." ] }, @@ -5083,7 +5094,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A proposal \\[hash\\] has been blacklisted permanently." ] } @@ -5093,7 +5104,7 @@ "name": "EnactmentPeriod", "type": "BlockNumber", "value": "0x002f0d00", - "documentation": [ + "docs": [ " The minimum period of locking and the period between a proposal being approved and enacted.", "", " It should generally be a little more than the unstake period to ensure that", @@ -5105,7 +5116,7 @@ "name": "LaunchPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) new public referenda are launched." ] }, @@ -5113,7 +5124,7 @@ "name": "VotingPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) to check for new votes." ] }, @@ -5121,15 +5132,25 @@ "name": "MinimumDeposit", "type": "BalanceOf", "value": "0x0000c16ff28623000000000000000000", - "documentation": [ + "docs": [ " The minimum amount to be used as a deposit for a public referendum proposal." ] }, + { + "name": "InstantAllowed", + "type": "bool", + "value": "0x01", + "docs": [ + " Indicator for whether an emergency origin is even allowed to happen. Some chains may want", + " to set this permanently to `false`, others may want to condition it on things such as", + " an upgrade having happened recently." + ] + }, { "name": "FastTrackVotingPeriod", "type": "BlockNumber", "value": "0x80510100", - "documentation": [ + "docs": [ " Minimum voting period allowed for a fast-track referendum." ] }, @@ -5137,7 +5158,7 @@ "name": "CooloffPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " Period in blocks where an external proposal may not be re-submitted after being vetoed." ] }, @@ -5145,7 +5166,7 @@ "name": "PreimageByteDeposit", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount of balance that must be deposited per byte of preimage stored." ] }, @@ -5153,211 +5174,219 @@ "name": "MaxVotes", "type": "u32", "value": "0x64000000", - "documentation": [ + "docs": [ " The maximum number of votes for an account.", "", " Also used to compute weight, an overly big value can", " lead to extrinsic with very big weight: see `delegate` for instance." ] + }, + { + "name": "MaxProposals", + "type": "u32", + "value": "0x64000000", + "docs": [ + " The maximum number of public proposals that can exist at any time." + ] } ], "errors": [ { "name": "ValueLow", - "documentation": [ + "docs": [ " Value too low" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal does not exist" ] }, { "name": "BadIndex", - "documentation": [ + "docs": [ " Unknown index" ] }, { "name": "AlreadyCanceled", - "documentation": [ + "docs": [ " Cannot cancel the same proposal twice" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Proposal already made" ] }, { "name": "ProposalBlacklisted", - "documentation": [ + "docs": [ " Proposal still blacklisted" ] }, { "name": "NotSimpleMajority", - "documentation": [ + "docs": [ " Next external proposal not simple majority" ] }, { "name": "InvalidHash", - "documentation": [ + "docs": [ " Invalid hash" ] }, { "name": "NoProposal", - "documentation": [ + "docs": [ " No external proposal" ] }, { "name": "AlreadyVetoed", - "documentation": [ + "docs": [ " Identity may not veto a proposal twice" ] }, { "name": "NotDelegated", - "documentation": [ + "docs": [ " Not delegated" ] }, { "name": "DuplicatePreimage", - "documentation": [ + "docs": [ " Preimage already noted" ] }, { "name": "NotImminent", - "documentation": [ + "docs": [ " Not imminent" ] }, { "name": "TooEarly", - "documentation": [ + "docs": [ " Too early" ] }, { "name": "Imminent", - "documentation": [ + "docs": [ " Imminent" ] }, { "name": "PreimageMissing", - "documentation": [ + "docs": [ " Preimage not found" ] }, { "name": "ReferendumInvalid", - "documentation": [ + "docs": [ " Vote given for invalid referendum" ] }, { "name": "PreimageInvalid", - "documentation": [ + "docs": [ " Invalid preimage" ] }, { "name": "NoneWaiting", - "documentation": [ + "docs": [ " No proposals waiting" ] }, { "name": "NotLocked", - "documentation": [ + "docs": [ " The target account does not have a lock." ] }, { "name": "NotExpired", - "documentation": [ + "docs": [ " The lock on the account to be unlocked has not yet expired." ] }, { "name": "NotVoter", - "documentation": [ + "docs": [ " The given account did not vote on the referendum." ] }, { "name": "NoPermission", - "documentation": [ + "docs": [ " The actor has no permission to conduct the action." ] }, { "name": "AlreadyDelegating", - "documentation": [ + "docs": [ " The account is already delegating." ] }, { "name": "InsufficientFunds", - "documentation": [ + "docs": [ " Too high a balance was provided that the account cannot afford." ] }, { "name": "NotDelegating", - "documentation": [ + "docs": [ " The account is not currently delegating." ] }, { "name": "VotesExist", - "documentation": [ + "docs": [ " The account currently has votes attached to it and the operation cannot succeed until", " these are removed, either through `unvote` or `reap_vote`." ] }, { "name": "InstantNotAllowed", - "documentation": [ + "docs": [ " The instant referendum origin is currently disallowed." ] }, { "name": "Nonsense", - "documentation": [ + "docs": [ " Delegation to oneself makes no sense." ] }, { "name": "WrongUpperBound", - "documentation": [ + "docs": [ " Invalid upper bound." ] }, { "name": "MaxVotesReached", - "documentation": [ + "docs": [ " Maximum number of votes reached." ] }, { "name": "InvalidWitness", - "documentation": [ + "docs": [ " The provided witness data is wrong." ] }, { "name": "TooManyProposals", - "documentation": [ + "docs": [ " Maximum number of proposals reached." ] } @@ -5376,7 +5405,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -5392,7 +5421,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -5408,7 +5437,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -5419,7 +5448,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -5430,7 +5459,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] }, @@ -5441,7 +5470,7 @@ "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The prime member that helps determine the default vote behavior in case of absentations." ] } @@ -5464,7 +5493,7 @@ "type": "MemberCount" } ], - "documentation": [ + "docs": [ " Set the collective's membership.", "", " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", @@ -5503,7 +5532,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective.", @@ -5532,7 +5561,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add a new proposal to either be voted on or executed directly.", "", " Requires the sender to be member.", @@ -5578,7 +5607,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Add an aye or nay vote for the sender to the given proposal.", "", " Requires the sender to be a member.", @@ -5615,7 +5644,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Close a vote that is either approved, disapproved or whose voting period has ended.", "", " May be called by any signed account in order to finish voting and close the proposal.", @@ -5656,7 +5685,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", "", " Must be called by the Root origin.", @@ -5682,7 +5711,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`).", " \\[account, proposal_index, proposal_hash, threshold\\]" @@ -5697,7 +5726,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`).", " \\[account, proposal_hash, voted, yes, no\\]" @@ -5708,7 +5737,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold.", " \\[proposal_hash\\]" ] @@ -5718,7 +5747,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold.", " \\[proposal_hash\\]" ] @@ -5729,7 +5758,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A motion was executed; result will be `Ok` if it returned without error.", " \\[proposal_hash, result\\]" ] @@ -5740,7 +5769,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A single member did some action; result will be `Ok` if it returned without error.", " \\[proposal_hash, result\\]" ] @@ -5752,7 +5781,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A proposal was closed because its threshold was reached or after its duration was up.", " \\[proposal_hash, yes, no\\]" ] @@ -5762,61 +5791,61 @@ "errors": [ { "name": "NotMember", - "documentation": [ + "docs": [ " Account is not a member" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Duplicate proposals not allowed" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal must exist" ] }, { "name": "WrongIndex", - "documentation": [ + "docs": [ " Mismatched index" ] }, { "name": "DuplicateVote", - "documentation": [ + "docs": [ " Duplicate vote ignored" ] }, { "name": "AlreadyInitialized", - "documentation": [ + "docs": [ " Members are already initialized!" ] }, { "name": "TooEarly", - "documentation": [ + "docs": [ " The close call was made too early, before the end of the voting." ] }, { "name": "TooManyProposals", - "documentation": [ + "docs": [ " There can only be a maximum of `MaxProposals` active proposals." ] }, { "name": "WrongProposalWeight", - "documentation": [ + "docs": [ " The given weight bound for the proposal was too low." ] }, { "name": "WrongProposalLength", - "documentation": [ + "docs": [ " The given length bound for the proposal was too low." ] } @@ -5835,7 +5864,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -5851,7 +5880,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -5867,7 +5896,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -5878,7 +5907,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -5889,7 +5918,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] }, @@ -5900,7 +5929,7 @@ "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The prime member that helps determine the default vote behavior in case of absentations." ] } @@ -5923,7 +5952,7 @@ "type": "MemberCount" } ], - "documentation": [ + "docs": [ " Set the collective's membership.", "", " - `new_members`: The new member list. Be nice to the chain and provide it sorted.", @@ -5962,7 +5991,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective.", @@ -5991,7 +6020,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add a new proposal to either be voted on or executed directly.", "", " Requires the sender to be member.", @@ -6037,7 +6066,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Add an aye or nay vote for the sender to the given proposal.", "", " Requires the sender to be a member.", @@ -6074,7 +6103,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Close a vote that is either approved, disapproved or whose voting period has ended.", "", " May be called by any signed account in order to finish voting and close the proposal.", @@ -6115,7 +6144,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Disapprove a proposal, close, and remove it from the system, regardless of its current state.", "", " Must be called by the Root origin.", @@ -6141,7 +6170,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`).", " \\[account, proposal_index, proposal_hash, threshold\\]" @@ -6156,7 +6185,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`).", " \\[account, proposal_hash, voted, yes, no\\]" @@ -6167,7 +6196,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold.", " \\[proposal_hash\\]" ] @@ -6177,7 +6206,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold.", " \\[proposal_hash\\]" ] @@ -6188,7 +6217,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A motion was executed; result will be `Ok` if it returned without error.", " \\[proposal_hash, result\\]" ] @@ -6199,7 +6228,7 @@ "Hash", "DispatchResult" ], - "documentation": [ + "docs": [ " A single member did some action; result will be `Ok` if it returned without error.", " \\[proposal_hash, result\\]" ] @@ -6211,7 +6240,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A proposal was closed because its threshold was reached or after its duration was up.", " \\[proposal_hash, yes, no\\]" ] @@ -6221,61 +6250,61 @@ "errors": [ { "name": "NotMember", - "documentation": [ + "docs": [ " Account is not a member" ] }, { "name": "DuplicateProposal", - "documentation": [ + "docs": [ " Duplicate proposals not allowed" ] }, { "name": "ProposalMissing", - "documentation": [ + "docs": [ " Proposal must exist" ] }, { "name": "WrongIndex", - "documentation": [ + "docs": [ " Mismatched index" ] }, { "name": "DuplicateVote", - "documentation": [ + "docs": [ " Duplicate vote ignored" ] }, { "name": "AlreadyInitialized", - "documentation": [ + "docs": [ " Members are already initialized!" ] }, { "name": "TooEarly", - "documentation": [ + "docs": [ " The close call was made too early, before the end of the voting." ] }, { "name": "TooManyProposals", - "documentation": [ + "docs": [ " There can only be a maximum of `MaxProposals` active proposals." ] }, { "name": "WrongProposalWeight", - "documentation": [ + "docs": [ " The given weight bound for the proposal was too low." ] }, { "name": "WrongProposalLength", - "documentation": [ + "docs": [ " The given length bound for the proposal was too low." ] } @@ -6294,7 +6323,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current elected members.", "", " Invariant: Always sorted based on account id." @@ -6307,7 +6336,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current reserved runners-up.", "", " Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the", @@ -6321,7 +6350,7 @@ "plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The present candidate list. A current member or runner-up can never enter this vector", " and is always implicitly assumed to be a candidate.", "", @@ -6337,7 +6366,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The total number of vote rounds that have happened, excluding the upcoming one." ] }, @@ -6353,7 +6382,7 @@ } }, "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Votes and locked stake of a particular voter.", "", " TWOX-NOTE: SAFE as `AccountId` is a crypto hash." @@ -6374,7 +6403,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Vote for a set of candidates for the upcoming round of election. This can be called to", " set the initial votes, or update already existing votes.", "", @@ -6403,7 +6432,7 @@ { "name": "remove_voter", "args": [], - "documentation": [ + "docs": [ " Remove `origin` as a voter.", "", " This removes the lock and returns the deposit.", @@ -6419,7 +6448,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Submit oneself for candidacy. A fixed amount of deposit is recorded.", "", " All candidates are wiped at the end of the term. They either become a member/runner-up,", @@ -6445,7 +6474,7 @@ "type": "Renouncing" } ], - "documentation": [ + "docs": [ " Renounce one's intention to be a candidate for the next election round. 3 potential", " outcomes exist:", "", @@ -6455,8 +6484,9 @@ " origin is removed as a runner-up.", " - `origin` is a current member. In this case, the deposit is unreserved and origin is", " removed as a member, consequently not being a candidate for the next round anymore.", - " Similar to [`remove_members`], if replacement runners exists, they are immediately", - " used. If the prime is renouncing, then no prime will exist until the next round.", + " Similar to [`remove_member`](Self::remove_member), if replacement runners exists,", + " they are immediately used. If the prime is renouncing, then no prime will exist until", + " the next round.", "", " The dispatch origin of this call must be signed, and have one of the above roles.", "", @@ -6477,7 +6507,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Remove a particular member from the set. This is effective immediately and the bond of", " the outgoing member is slashed.", "", @@ -6506,7 +6536,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Clean all voters who are defunct (i.e. they do not serve any purpose at all). The", " deposit of the removed voters are returned.", "", @@ -6526,7 +6556,7 @@ "args": [ "Vec<(AccountId,Balance)>" ], - "documentation": [ + "docs": [ " A new term with \\[new_members\\]. This indicates that enough candidates existed to run", " the election, not that enough have has been elected. The inner value must be examined", " for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond", @@ -6537,7 +6567,7 @@ { "name": "EmptyTerm", "args": [], - "documentation": [ + "docs": [ " No (or not enough) candidates existed for this round. This is different from", " `NewTerm(\\[\\])`. See the description of `NewTerm`." ] @@ -6545,7 +6575,7 @@ { "name": "ElectionError", "args": [], - "documentation": [ + "docs": [ " Internal error happened while trying to perform election." ] }, @@ -6554,7 +6584,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[member\\] has been removed. This should always be followed by either `NewTerm` or", " `EmptyTerm`." ] @@ -6564,7 +6594,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " Someone has renounced their candidacy." ] }, @@ -6574,7 +6604,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A \\[candidate\\] was slashed by \\[amount\\] due to failing to obtain a seat as member or", " runner-up.", "", @@ -6587,7 +6617,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A \\[seat holder\\] was slashed by \\[amount\\] by being forcefully removed from the set." ] } @@ -6597,7 +6627,7 @@ "name": "PalletId", "type": "LockIdentifier", "value": "0x706872656c656374", - "documentation": [ + "docs": [ " Identifier for the elections-phragmen pallet's lock" ] }, @@ -6605,7 +6635,7 @@ "name": "CandidacyBond", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [ + "docs": [ " How much should be locked up in order to submit one's candidacy." ] }, @@ -6613,7 +6643,7 @@ "name": "VotingBondBase", "type": "BalanceOf", "value": "0x00f0436de36a01000000000000000000", - "documentation": [ + "docs": [ " Base deposit associated with voting.", "", " This should be sensibly high to economically ensure the pallet cannot be attacked by", @@ -6624,7 +6654,7 @@ "name": "VotingBondFactor", "type": "BalanceOf", "value": "0x0000cc7b9fae00000000000000000000", - "documentation": [ + "docs": [ " The amount of bond that need to be locked for each vote (32 bytes)." ] }, @@ -6632,7 +6662,7 @@ "name": "DesiredMembers", "type": "u32", "value": "0x0d000000", - "documentation": [ + "docs": [ " Number of members to elect." ] }, @@ -6640,7 +6670,7 @@ "name": "DesiredRunnersUp", "type": "u32", "value": "0x07000000", - "documentation": [ + "docs": [ " Number of runners_up to keep." ] }, @@ -6648,7 +6678,7 @@ "name": "TermDuration", "type": "BlockNumber", "value": "0x80130300", - "documentation": [ + "docs": [ " How long each seat is kept. This defines the next block number at which an election", " round will happen. If set to zero, no elections are ever triggered and the module will", " be in passive mode." @@ -6658,103 +6688,103 @@ "errors": [ { "name": "UnableToVote", - "documentation": [ + "docs": [ " Cannot vote when no candidates or members exist." ] }, { "name": "NoVotes", - "documentation": [ + "docs": [ " Must vote for at least one candidate." ] }, { "name": "TooManyVotes", - "documentation": [ + "docs": [ " Cannot vote more than candidates." ] }, { "name": "MaximumVotesExceeded", - "documentation": [ + "docs": [ " Cannot vote more than maximum allowed." ] }, { "name": "LowBalance", - "documentation": [ + "docs": [ " Cannot vote with stake less than minimum balance." ] }, { "name": "UnableToPayBond", - "documentation": [ + "docs": [ " Voter can not pay voting bond." ] }, { "name": "MustBeVoter", - "documentation": [ + "docs": [ " Must be a voter." ] }, { "name": "ReportSelf", - "documentation": [ + "docs": [ " Cannot report self." ] }, { "name": "DuplicatedCandidate", - "documentation": [ + "docs": [ " Duplicated candidate submission." ] }, { "name": "MemberSubmit", - "documentation": [ + "docs": [ " Member cannot re-submit candidacy." ] }, { "name": "RunnerUpSubmit", - "documentation": [ + "docs": [ " Runner cannot re-submit candidacy." ] }, { "name": "InsufficientCandidateFunds", - "documentation": [ + "docs": [ " Candidate does not have enough funds." ] }, { "name": "NotMember", - "documentation": [ + "docs": [ " Not a member." ] }, { "name": "InvalidWitnessData", - "documentation": [ + "docs": [ " The provided count of number of candidates is incorrect." ] }, { "name": "InvalidVoteCount", - "documentation": [ + "docs": [ " The provided count of number of votes is incorrect." ] }, { "name": "InvalidRenouncing", - "documentation": [ + "docs": [ " The renouncing origin presented a wrong `Renouncing` parameter." ] }, { "name": "InvalidReplacement", - "documentation": [ + "docs": [ " Prediction regarding replacement after member removal is wrong." ] } @@ -6773,7 +6803,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current membership, stored as an ordered Vec." ] }, @@ -6784,7 +6814,7 @@ "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current prime member, if one exists." ] } @@ -6799,7 +6829,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Add a member `who` to the set.", "", " May only be called from `T::AddOrigin`." @@ -6813,7 +6843,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Remove a member `who` from the set.", "", " May only be called from `T::RemoveOrigin`." @@ -6831,7 +6861,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out one member `remove` for another `add`.", "", " May only be called from `T::SwapOrigin`.", @@ -6847,7 +6877,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Change the membership to a new set, disregarding the existing membership. Be nice and", " pass `members` pre-sorted.", "", @@ -6862,7 +6892,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out the sending member for some other key `new`.", "", " May only be called from `Signed` origin of a current member.", @@ -6878,7 +6908,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Set the prime member. Must be a current member.", "", " May only be called from `T::PrimeOrigin`." @@ -6887,7 +6917,7 @@ { "name": "clear_prime", "args": [], - "documentation": [ + "docs": [ " Remove the prime member if it exists.", "", " May only be called from `T::PrimeOrigin`." @@ -6898,35 +6928,35 @@ { "name": "MemberAdded", "args": [], - "documentation": [ + "docs": [ " The given member was added; see the transaction for who." ] }, { "name": "MemberRemoved", "args": [], - "documentation": [ + "docs": [ " The given member was removed; see the transaction for who." ] }, { "name": "MembersSwapped", "args": [], - "documentation": [ + "docs": [ " Two members were swapped; see the transaction for who." ] }, { "name": "MembersReset", "args": [], - "documentation": [ + "docs": [ " The membership was reset; see the transaction for who the new set is." ] }, { "name": "KeyChanged", "args": [], - "documentation": [ + "docs": [ " One of the members' keys changed." ] }, @@ -6935,7 +6965,7 @@ "args": [ "PhantomData" ], - "documentation": [ + "docs": [ " Phantom member, never used." ] } @@ -6944,13 +6974,13 @@ "errors": [ { "name": "AlreadyMember", - "documentation": [ + "docs": [ " Already a member." ] }, { "name": "NotMember", - "documentation": [ + "docs": [ " Not a member." ] } @@ -6969,7 +6999,7 @@ "plain": "StoredState" }, "fallback": "0x00", - "documentation": [ + "docs": [ " State of the current authority set." ] }, @@ -6980,7 +7010,7 @@ "plain": "StoredPendingChange" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending change: (signaled at, scheduled change)." ] }, @@ -6991,7 +7021,7 @@ "plain": "BlockNumber" }, "fallback": "0x00", - "documentation": [ + "docs": [ " next block number where we can force a change." ] }, @@ -7002,7 +7032,7 @@ "plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " `true` if we are currently stalled." ] }, @@ -7013,7 +7043,7 @@ "plain": "SetId" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The number of changes (both in terms of keys and underlying economic responsibilities)", " in the \"set\" of Grandpa validators from genesis." ] @@ -7030,7 +7060,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from grandpa set ID to the index of the *most recent* session for which its", " members were responsible.", "", @@ -7052,7 +7082,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report voter equivocation/misbehavior. This method will verify the", " equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence", @@ -7071,7 +7101,7 @@ "type": "KeyOwnerProof" } ], - "documentation": [ + "docs": [ " Report voter equivocation/misbehavior. This method will verify the", " equivocation proof and validate the given key ownership proof", " against the extracted offender. If both are valid, the offence", @@ -7095,7 +7125,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Note that the current authority set of the GRANDPA finality gadget has", " stalled. This will trigger a forced authority set change at the beginning", " of the next session, to be enacted `delay` blocks after that. The delay", @@ -7112,21 +7142,21 @@ "args": [ "AuthorityList" ], - "documentation": [ + "docs": [ " New authority set has been applied. \\[authority_set\\]" ] }, { "name": "Paused", "args": [], - "documentation": [ + "docs": [ " Current authority set has been paused." ] }, { "name": "Resumed", "args": [], - "documentation": [ + "docs": [ " Current authority set has been resumed." ] } @@ -7135,45 +7165,45 @@ "errors": [ { "name": "PauseFailed", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA pause when the authority set isn't live", " (either paused or already pending pause)." ] }, { "name": "ResumeFailed", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA resume when the authority set isn't paused", " (either live or already pending resume)." ] }, { "name": "ChangePending", - "documentation": [ + "docs": [ " Attempt to signal GRANDPA change with one already pending." ] }, { "name": "TooSoon", - "documentation": [ + "docs": [ " Cannot signal forced change so soon after last." ] }, { "name": "InvalidKeyOwnershipProof", - "documentation": [ + "docs": [ " A key ownership proof provided as part of an equivocation report is invalid." ] }, { "name": "InvalidEquivocationProof", - "documentation": [ + "docs": [ " An equivocation proof provided as part of an equivocation report is invalid." ] }, { "name": "DuplicateOffenceReport", - "documentation": [ + "docs": [ " A given equivocation report is valid but already previously reported." ] } @@ -7192,7 +7222,7 @@ "plain": "ProposalIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Number of proposals that have been made." ] }, @@ -7208,7 +7238,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposals that have been made." ] }, @@ -7219,7 +7249,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposal indices that have been approved but not yet awarded." ] } @@ -7238,7 +7268,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Put forward a suggestion for spending. A deposit proportional to the value", " is reserved and slashed if the proposal is rejected. It is returned once the", " proposal is awarded.", @@ -7258,7 +7288,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Reject a proposed spend. The original deposit will be slashed.", "", " May only be called from `T::RejectOrigin`.", @@ -7278,7 +7308,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", " and the original deposit will be returned.", "", @@ -7298,7 +7328,7 @@ "args": [ "ProposalIndex" ], - "documentation": [ + "docs": [ " New proposal. \\[proposal_index\\]" ] }, @@ -7307,7 +7337,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " We have ended a spend period and will now allocate funds. \\[budget_remaining\\]" ] }, @@ -7318,7 +7348,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " Some funds have been allocated. \\[proposal_index, award, beneficiary\\]" ] }, @@ -7328,7 +7358,7 @@ "ProposalIndex", "Balance" ], - "documentation": [ + "docs": [ " A proposal was rejected; funds were slashed. \\[proposal_index, slashed\\]" ] }, @@ -7337,7 +7367,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some of our funds have been burnt. \\[burn\\]" ] }, @@ -7346,7 +7376,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Spending has finished; this is the amount that rolls over until next spend.", " \\[budget_remaining\\]" ] @@ -7356,7 +7386,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some funds have been deposited. \\[deposit\\]" ] } @@ -7366,7 +7396,7 @@ "name": "ProposalBond", "type": "Permill", "value": "0x50c30000", - "documentation": [ + "docs": [ " Fraction of a proposal's value that should be bonded in order to place the proposal.", " An accepted proposal gets these back. A rejected proposal does not." ] @@ -7375,7 +7405,7 @@ "name": "ProposalBondMinimum", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Minimum amount of funds that should be placed in a deposit for making a proposal." ] }, @@ -7383,7 +7413,7 @@ "name": "SpendPeriod", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " Period between successive spends." ] }, @@ -7391,7 +7421,7 @@ "name": "Burn", "type": "Permill", "value": "0x20a10700", - "documentation": [ + "docs": [ " Percentage of spare funds (if any) that are burnt per spend period." ] }, @@ -7399,27 +7429,35 @@ "name": "PalletId", "type": "PalletId", "value": "0x70792f7472737279", - "documentation": [ - " The treasury's module id, used for deriving its sovereign account ID." + "docs": [ + " The treasury's pallet id, used for deriving its sovereign account ID." + ] + }, + { + "name": "MaxApprovals", + "type": "u32", + "value": "0x64000000", + "docs": [ + " The maximum number of approvals that can wait in the spending queue." ] } ], "errors": [ { "name": "InsufficientProposersBalance", - "documentation": [ + "docs": [ " Proposer's balance is too low." ] }, { "name": "InvalidIndex", - "documentation": [ + "docs": [ " No proposal or bounty at that index." ] }, { "name": "TooManyApprovals", - "documentation": [ + "docs": [ " Too many approvals in the queue." ] } @@ -7443,7 +7481,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from an original code hash to the original code, untouched by instrumentation." ] }, @@ -7459,7 +7497,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping between an original code hash and instrumented wasm code, ready for execution." ] }, @@ -7470,7 +7508,7 @@ "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The subtrie counter." ] }, @@ -7486,7 +7524,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The code associated with a given account.", "", " TWOX-NOTE: SAFE since `AccountId` is a secure hash." @@ -7499,7 +7537,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Evicted contracts that await child trie deletion.", "", " Child trie deletion is a heavy operation depending on the amount of storage items", @@ -7529,7 +7567,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Makes a call to an account, optionally transferring some balance.", "", " * If the account is a smart-contract account, the associated code will be", @@ -7563,7 +7601,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Instantiates a new contract from the supplied `code` optionally transferring", " some balance.", "", @@ -7611,7 +7649,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Instantiates a contract from a previously deployed wasm binary.", "", " This function is identical to [`Self::instantiate_with_code`] but without the", @@ -7631,7 +7669,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Allows block producers to claim a small reward for evicting a contract. If a block", " producer fails to do so, a regular users will be allowed to claim the reward.", "", @@ -7651,7 +7689,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Contract deployed by address at the specified address. \\[deployer, contract\\]" ] }, @@ -7660,7 +7698,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " Contract has been evicted and is now in tombstone state. \\[contract\\]" ] }, @@ -7670,7 +7708,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Contract has been terminated without leaving a tombstone.", " \\[contract, beneficiary\\]", "", @@ -7693,7 +7731,7 @@ "Hash", "Balance" ], - "documentation": [ + "docs": [ " Restoration of a contract has been successful.", " \\[restorer, dest, code_hash, rent_allowance\\]", "", @@ -7710,7 +7748,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " Code with the specified hash has been stored. \\[code_hash\\]" ] }, @@ -7719,7 +7757,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " Triggered when the current schedule is updated.", " \\[version\\]", "", @@ -7734,7 +7772,7 @@ "AccountId", "Bytes" ], - "documentation": [ + "docs": [ " A custom event emitted by the contract.", " \\[contract, data\\]", "", @@ -7750,7 +7788,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A code with the specified hash was removed.", " \\[code_hash\\]", "", @@ -7763,7 +7801,7 @@ "name": "Schedule", "type": "Schedule", "value": "0x0400000000020000000100008000000010000000001000000001000020000000200000000040000000000200020000008e0f0000b04602009a8c0300a9720000767600005e380000ea5e00000753000097000000579e030088130500b60000007a170000c11100005721000099370000483a0000d0110000d8d12c08bc4300005c430000bb2e0000a942000000260000b72300009c370000ad540000de540000ca5400000354000018550000e553000011550000c053000007540000da540000a0530000e85300008d5400004a690000bd680000a56a000096670000b053000013540000055400006a5500009255000060550000f455000033550000cae32900000000007a332a00000000004041290000000000a6fb5d000000000060c02a0000000000e6d6290000000000065329000000000062002a0000000000d425290000000000b0522a00000000005cb3540000000000b41c1600000000008057640000000000000100000000000008f6380000000000710200000000000078d68a210000000098d6de2a000000007c75640900000000466d6f000000000070baac0000000000ec73de07000000007406000000000000922c190000000000fc9f1d00000000008618ee0900000000450200000000000082dc6108000000003e573102000000002704000000000000cc94430b000000009406e1100000000096fa930800000000dc010000000000009c020000000000001843c12400000000f001000000000000b80200000000000094070000000000008a9b2a0000000000561200000000000046432b0000000000ab0c000000000000c08c260000000000b005000000000000acd2260000000000b005000000000000", - "documentation": [ + "docs": [ " Cost schedule and limits." ] }, @@ -7771,7 +7809,7 @@ "name": "SignedClaimHandicap", "type": "BlockNumber", "value": "0x02000000", - "documentation": [ + "docs": [ " Number of block delay an extrinsic claim surcharge has.", "", " When claim surcharge is called by an extrinsic the rent is checked", @@ -7782,7 +7820,7 @@ "name": "TombstoneDeposit", "type": "BalanceOf", "value": "0x00f0e8857a9c02000000000000000000", - "documentation": [ + "docs": [ " The minimum amount required to generate a tombstone." ] }, @@ -7790,7 +7828,7 @@ "name": "DepositPerContract", "type": "BalanceOf", "value": "0x00f0e8857a9c02000000000000000000", - "documentation": [ + "docs": [ " The balance every contract needs to deposit to stay alive indefinitely.", "", " This is different from the [`Self::TombstoneDeposit`] because this only needs to be", @@ -7805,7 +7843,7 @@ "name": "DepositPerStorageByte", "type": "BalanceOf", "value": "0x0060defb740500000000000000000000", - "documentation": [ + "docs": [ " The balance a contract needs to deposit per storage byte to stay alive indefinitely.", "", " Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,", @@ -7818,7 +7856,7 @@ "name": "DepositPerStorageItem", "type": "BalanceOf", "value": "0x00f0ab75a40d00000000000000000000", - "documentation": [ + "docs": [ " The balance a contract needs to deposit per storage item to stay alive indefinitely.", "", " It works the same as [`Self::DepositPerStorageByte`] but for storage items." @@ -7828,7 +7866,7 @@ "name": "RentFraction", "type": "Perbill", "value": "0x85040000", - "documentation": [ + "docs": [ " The fraction of the deposit that should be used as rent per block.", "", " When a contract hasn't enough balance deposited to stay alive indefinitely it needs", @@ -7840,7 +7878,7 @@ "name": "SurchargeReward", "type": "BalanceOf", "value": "0x005cb2ec220000000000000000000000", - "documentation": [ + "docs": [ " Reward that is received by the party whose touch has led", " to removal of a contract." ] @@ -7849,7 +7887,7 @@ "name": "DeletionQueueDepth", "type": "u32", "value": "0x1a040000", - "documentation": [ + "docs": [ " The maximum number of tries that can be queued for deletion." ] }, @@ -7857,7 +7895,7 @@ "name": "DeletionWeightLimit", "type": "Weight", "value": "0x00d0ed902e000000", - "documentation": [ + "docs": [ " The maximum amount of weight that can be consumed per block for lazy trie removal." ] } @@ -7865,55 +7903,55 @@ "errors": [ { "name": "InvalidScheduleVersion", - "documentation": [ + "docs": [ " A new schedule must have a greater version than the current one." ] }, { "name": "InvalidSurchargeClaim", - "documentation": [ + "docs": [ " An origin must be signed or inherent and auxiliary sender only provided on inherent." ] }, { "name": "InvalidSourceContract", - "documentation": [ + "docs": [ " Cannot restore from nonexisting or tombstone contract." ] }, { "name": "InvalidDestinationContract", - "documentation": [ + "docs": [ " Cannot restore to nonexisting or alive contract." ] }, { "name": "InvalidTombstone", - "documentation": [ + "docs": [ " Tombstones don't match." ] }, { "name": "InvalidContractOrigin", - "documentation": [ + "docs": [ " An origin TrieId written in the current block." ] }, { "name": "OutOfGas", - "documentation": [ + "docs": [ " The executed contract exhausted its gas limit." ] }, { "name": "OutputBufferTooSmall", - "documentation": [ + "docs": [ " The output buffer supplied to a contract API call was too small." ] }, { "name": "BelowSubsistenceThreshold", - "documentation": [ + "docs": [ " Performing the requested transfer would have brought the contract below", " the subsistence threshold. No transfer is allowed to do this in order to allow", " for a tombstone to be created. Use `seal_terminate` to remove a contract without", @@ -7922,14 +7960,14 @@ }, { "name": "NewContractNotFunded", - "documentation": [ + "docs": [ " The newly created contract is below the subsistence threshold after executing", " its contructor. No contracts are allowed to exist below that threshold." ] }, { "name": "TransferFailed", - "documentation": [ + "docs": [ " Performing the requested transfer failed for a reason originating in the", " chosen currency implementation of the runtime. Most probably the balance is", " too low or locks are placed on it." @@ -7937,20 +7975,20 @@ }, { "name": "MaxCallDepthReached", - "documentation": [ + "docs": [ " Performing a call was denied because the calling depth reached the limit", " of what is specified in the schedule." ] }, { "name": "ContractNotFound", - "documentation": [ + "docs": [ " No contract was found at the specified address." ] }, { "name": "ContractIsTombstone", - "documentation": [ + "docs": [ " A tombstone exist at the specified address.", "", " Tombstone cannot be called. Anyone can use `seal_restore_to` in order to revive", @@ -7959,7 +7997,7 @@ }, { "name": "RentNotPaid", - "documentation": [ + "docs": [ " The called contract does not have enough balance to pay for its storage.", "", " The contract ran out of balance and is therefore eligible for eviction into a", @@ -7970,75 +8008,75 @@ }, { "name": "CodeTooLarge", - "documentation": [ + "docs": [ " The code supplied to `instantiate_with_code` exceeds the limit specified in the", " current schedule." ] }, { "name": "CodeNotFound", - "documentation": [ + "docs": [ " No code could be found at the supplied code hash." ] }, { "name": "OutOfBounds", - "documentation": [ + "docs": [ " A buffer outside of sandbox memory was passed to a contract API function." ] }, { "name": "DecodingFailed", - "documentation": [ + "docs": [ " Input passed to a contract API function failed to decode as expected type." ] }, { "name": "ContractTrapped", - "documentation": [ + "docs": [ " Contract trapped during execution." ] }, { "name": "ValueTooLarge", - "documentation": [ + "docs": [ " The size defined in `T::MaxValueSize` was exceeded." ] }, { "name": "TerminatedWhileReentrant", - "documentation": [ + "docs": [ " Termination of a contract is not allowed while the contract is already", " on the call stack. Can be triggered by `seal_terminate` or `seal_restore_to." ] }, { "name": "InputForwarded", - "documentation": [ + "docs": [ " `seal_call` forwarded this contracts input. It therefore is no longer available." ] }, { "name": "RandomSubjectTooLong", - "documentation": [ + "docs": [ " The subject passed to `seal_random` exceeds the limit." ] }, { "name": "TooManyTopics", - "documentation": [ + "docs": [ " The amount of topics passed to `seal_deposit_events` exceeds the limit." ] }, { "name": "DuplicateTopics", - "documentation": [ + "docs": [ " The topics passed to `seal_deposit_events` contains at least one duplicate." ] }, { "name": "NoChainExtension", - "documentation": [ + "docs": [ " The chain does not provide a chain extension. Calling the chain extension results", " in this error. Note that this usually shouldn't happen as deploying such contracts", " is rejected." @@ -8046,7 +8084,7 @@ }, { "name": "DeletionQueueFull", - "documentation": [ + "docs": [ " Removal of a contract failed because the deletion queue is full.", "", " This can happen when either calling [`Pallet::claim_surcharge`] or `seal_terminate`.", @@ -8056,7 +8094,7 @@ }, { "name": "ContractNotEvictable", - "documentation": [ + "docs": [ " A contract could not be evicted because it has enough balance to pay rent.", "", " This can be returned from [`Pallet::claim_surcharge`] because the target", @@ -8065,7 +8103,7 @@ }, { "name": "StorageExhausted", - "documentation": [ + "docs": [ " A storage modification exhausted the 32bit type that holds the storage size.", "", " This can either happen when the accumulated storage in bytes is too large or", @@ -8074,13 +8112,13 @@ }, { "name": "DuplicateContract", - "documentation": [ + "docs": [ " A contract with the same AccountId already exists." ] }, { "name": "TerminatedInConstructor", - "documentation": [ + "docs": [ " A contract self destructed in its constructor.", "", " This can be triggered by a call to `seal_terminate` or `seal_restore_to`." @@ -8088,13 +8126,13 @@ }, { "name": "DebugMessageInvalidUTF8", - "documentation": [ + "docs": [ " The debug message specified to `seal_debug_message` does contain invalid UTF-8." ] }, { "name": "ReentranceDenied", - "documentation": [ + "docs": [ " A call tried to invoke a contract that is flagged as non-reentrant." ] } @@ -8113,7 +8151,7 @@ "plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The `AccountId` of the sudo key." ] } @@ -8128,7 +8166,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Root` origin.", "", " The dispatch origin for this call must be _Signed_.", @@ -8153,7 +8191,7 @@ "type": "Weight" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Root` origin.", " This function does not check the weight of the call, and instead allows the", " Sudo user to specify the weight of the call.", @@ -8174,7 +8212,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", "", " The dispatch origin for this call must be _Signed_.", @@ -8198,7 +8236,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Signed` origin from", " a given account.", "", @@ -8219,7 +8257,7 @@ "args": [ "DispatchResult" ], - "documentation": [ + "docs": [ " A sudo just took place. \\[result\\]" ] }, @@ -8228,7 +8266,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " The \\[sudoer\\] just switched identity; the old key is supplied." ] }, @@ -8237,7 +8275,7 @@ "args": [ "DispatchResult" ], - "documentation": [ + "docs": [ " A sudo just took place. \\[result\\]" ] } @@ -8246,7 +8284,7 @@ "errors": [ { "name": "RequireSudo", - "documentation": [ + "docs": [ " Sender must be the Sudo account" ] } @@ -8265,7 +8303,7 @@ "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The block number after which it's ok to send heartbeats in the current", " session.", "", @@ -8286,7 +8324,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of keys that may issue a heartbeat." ] }, @@ -8303,7 +8341,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " For each session index, we keep a mapping of `AuthIndex` to", " `offchain::OpaqueNetworkState`." ] @@ -8321,7 +8359,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " For each session index, we keep a mapping of `ValidatorId` to the", " number of blocks authored by the given authority." ] @@ -8341,7 +8379,7 @@ "type": "Signature" } ], - "documentation": [ + "docs": [ " # ", " - Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len)", " and E is length of `heartbeat.network_state.external_address`", @@ -8360,14 +8398,14 @@ "args": [ "AuthorityId" ], - "documentation": [ + "docs": [ " A new heartbeat was received from `AuthorityId` \\[authority_id\\]" ] }, { "name": "AllGood", "args": [], - "documentation": [ + "docs": [ " At the end of the session, no offence was committed." ] }, @@ -8376,22 +8414,34 @@ "args": [ "Vec" ], - "documentation": [ + "docs": [ " At the end of the session, at least one validator was found to be \\[offline\\]." ] } ], - "constants": [], + "constants": [ + { + "name": "UnsignedPriority", + "type": "TransactionPriority", + "value": "0xffffffffffffffff", + "docs": [ + " A configuration for base priority of unsigned transactions.", + "", + " This is exposed so that it can be tuned for particular runtime, when", + " multiple pallets send unsigned transactions." + ] + } + ], "errors": [ { "name": "InvalidKey", - "documentation": [ + "docs": [ " Non existent public key." ] }, { "name": "DuplicatedHeartbeat", - "documentation": [ + "docs": [ " Duplicated heartbeat." ] } @@ -8424,7 +8474,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The primary structure that holds all offence records keyed by report identifiers." ] }, @@ -8441,7 +8491,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A vector of reports of the same kind that happened at the same time slot." ] }, @@ -8457,7 +8507,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Enumerates all reports of a kind along with the time they happened.", "", " All reports are sorted by the time of offence.", @@ -8476,7 +8526,7 @@ "Kind", "OpaqueTimeSlot" ], - "documentation": [ + "docs": [ " There is an offence reported of the given `kind` happened at the `session_index` and", " (kind-specific) time slot. This event is not deposited for duplicate slashes.", " \\[kind, timeslot\\]." @@ -8508,7 +8558,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Series of block headers from the last 81 blocks that acts as random seed material. This", " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", " the oldest hash." @@ -8539,7 +8589,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information that is pertinent to identify the entity behind an account.", "", " TWOX-NOTE: OK ― `AccountId` is a secure hash." @@ -8557,7 +8607,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The super-identity of an alternative \"sub\" identity together with its name, within that", " context. If the account is not some other account's sub-identity, then just `None`." ] @@ -8574,7 +8624,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " Alternative \"sub\" identities of this account.", "", " The first item is the deposit, the second is a vector of the accounts.", @@ -8589,7 +8639,7 @@ "plain": "Vec>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of registrars. Not expected to get very big as can only be added through a", " special origin (likely a council motion).", "", @@ -8607,7 +8657,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Add a registrar to the system.", "", " The dispatch origin for this call must be `T::RegistrarOrigin`.", @@ -8631,7 +8681,7 @@ "type": "IdentityInfo" } ], - "documentation": [ + "docs": [ " Set an account's identity information and reserve the appropriate deposit.", "", " If the account already has identity information, the deposit is taken as part payment", @@ -8661,7 +8711,7 @@ "type": "Vec<(AccountId,Data)>" } ], - "documentation": [ + "docs": [ " Set the sub-accounts of the sender.", "", " Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", @@ -8688,7 +8738,7 @@ { "name": "clear_identity", "args": [], - "documentation": [ + "docs": [ " Clear an account's identity info and all sub-accounts and return all deposits.", "", " Payment: All reserved balances on the account are returned.", @@ -8721,7 +8771,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Request a judgement from a registrar.", "", " Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", @@ -8755,7 +8805,7 @@ "type": "RegistrarIndex" } ], - "documentation": [ + "docs": [ " Cancel a previous request.", "", " Payment: A previously reserved deposit is returned on success.", @@ -8787,7 +8837,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the fee required for a judgement to be requested from a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8815,7 +8865,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Change the account associated with a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8843,7 +8893,7 @@ "type": "IdentityFields" } ], - "documentation": [ + "docs": [ " Set the field information for a registrar.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8875,7 +8925,7 @@ "type": "IdentityJudgement" } ], - "documentation": [ + "docs": [ " Provide a judgement for an account's identity.", "", " The dispatch origin for this call must be _Signed_ and the sender must be the account", @@ -8905,7 +8955,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove an account's identity and sub-account information and slash the deposits.", "", " Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", @@ -8939,7 +8989,7 @@ "type": "Data" } ], - "documentation": [ + "docs": [ " Add the given account to the sender's subs.", "", " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", @@ -8961,7 +9011,7 @@ "type": "Data" } ], - "documentation": [ + "docs": [ " Alter the associated name of the given sub-account.", "", " The dispatch origin for this call must be _Signed_ and the sender must have a registered", @@ -8976,7 +9026,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove the given account from the sender's subs.", "", " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", @@ -8989,7 +9039,7 @@ { "name": "quit_sub", "args": [], - "documentation": [ + "docs": [ " Remove the sender as a sub-account.", "", " Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", @@ -9009,7 +9059,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A name was set or reset (which will remove all judgements). \\[who\\]" ] }, @@ -9019,7 +9069,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was cleared, and the given balance returned. \\[who, deposit\\]" ] }, @@ -9029,7 +9079,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was removed and the given balance slashed. \\[who, deposit\\]" ] }, @@ -9039,7 +9089,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement was asked from a registrar. \\[who, registrar_index\\]" ] }, @@ -9049,7 +9099,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement request was retracted. \\[who, registrar_index\\]" ] }, @@ -9059,7 +9109,7 @@ "AccountId", "RegistrarIndex" ], - "documentation": [ + "docs": [ " A judgement was given by a registrar. \\[target, registrar_index\\]" ] }, @@ -9068,7 +9118,7 @@ "args": [ "RegistrarIndex" ], - "documentation": [ + "docs": [ " A registrar was added. \\[registrar_index\\]" ] }, @@ -9079,7 +9129,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A sub-identity was added to an identity and the deposit paid. \\[sub, main, deposit\\]" ] }, @@ -9090,7 +9140,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A sub-identity was removed from an identity and the deposit freed.", " \\[sub, main, deposit\\]" ] @@ -9102,7 +9152,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A sub-identity was cleared, and the given deposit repatriated from the", " main identity account to the sub-identity account. \\[sub, main, deposit\\]" ] @@ -9113,7 +9163,7 @@ "name": "BasicDeposit", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for a registered identity" ] }, @@ -9121,7 +9171,7 @@ "name": "FieldDeposit", "type": "BalanceOf", "value": "0x00a031a95fe300000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit per additional field for a registered identity." ] }, @@ -9129,7 +9179,7 @@ "name": "SubAccountDeposit", "type": "BalanceOf", "value": "0x0080f420e6b500000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for a registered subaccount. This should account for the fact", " that one storage item's value will increase by the size of an account ID, and there will be", " another trie item whose value is the size of an account ID plus 32 bytes." @@ -9139,7 +9189,7 @@ "name": "MaxSubAccounts", "type": "u32", "value": "0x64000000", - "documentation": [ + "docs": [ " The maximum number of sub-accounts allowed per identified account." ] }, @@ -9147,7 +9197,7 @@ "name": "MaxAdditionalFields", "type": "u32", "value": "0x64000000", - "documentation": [ + "docs": [ " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O", " required to access an identity, but can be pretty high." ] @@ -9156,7 +9206,7 @@ "name": "MaxRegistrars", "type": "u32", "value": "0x14000000", - "documentation": [ + "docs": [ " Maxmimum number of registrars allowed in the system. Needed to bound the complexity", " of, e.g., updating judgements." ] @@ -9165,97 +9215,97 @@ "errors": [ { "name": "TooManySubAccounts", - "documentation": [ + "docs": [ " Too many subs-accounts." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Account isn't found." ] }, { "name": "NotNamed", - "documentation": [ + "docs": [ " Account isn't named." ] }, { "name": "EmptyIndex", - "documentation": [ + "docs": [ " Empty index." ] }, { "name": "FeeChanged", - "documentation": [ + "docs": [ " Fee is changed." ] }, { "name": "NoIdentity", - "documentation": [ + "docs": [ " No identity found." ] }, { "name": "StickyJudgement", - "documentation": [ + "docs": [ " Sticky judgement." ] }, { "name": "JudgementGiven", - "documentation": [ + "docs": [ " Judgement given." ] }, { "name": "InvalidJudgement", - "documentation": [ + "docs": [ " Invalid judgement." ] }, { "name": "InvalidIndex", - "documentation": [ + "docs": [ " The index is invalid." ] }, { "name": "InvalidTarget", - "documentation": [ + "docs": [ " The target is invalid." ] }, { "name": "TooManyFields", - "documentation": [ + "docs": [ " Too many additional fields." ] }, { "name": "TooManyRegistrars", - "documentation": [ + "docs": [ " Maximum amount of registrars reached. Cannot add any more." ] }, { "name": "AlreadyClaimed", - "documentation": [ + "docs": [ " Account ID is already named." ] }, { "name": "NotSub", - "documentation": [ + "docs": [ " Sender is not a sub-account." ] }, { "name": "NotOwned", - "documentation": [ + "docs": [ " Sub-account isn't owned by sender." ] } @@ -9274,7 +9324,7 @@ "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The first member." ] }, @@ -9285,7 +9335,7 @@ "plain": "Hash" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A hash of the rules of this society concerning membership. Can only be set once and", " only by the founder." ] @@ -9297,7 +9347,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of candidates; bidders that are attempting to become members." ] }, @@ -9313,7 +9363,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of suspended candidates." ] }, @@ -9324,7 +9374,7 @@ "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " Amount of our account balance that is specifically for the next round's bid(s)." ] }, @@ -9335,7 +9385,7 @@ "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The most primary from the most recently approved members." ] }, @@ -9346,7 +9396,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of members, ordered." ] }, @@ -9362,7 +9412,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of suspended members." ] }, @@ -9373,7 +9423,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current bids, stored ordered by the value of the bid." ] }, @@ -9389,7 +9439,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Members currently vouching or banned from vouching again" ] }, @@ -9405,7 +9455,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending payouts; ordered by block number, with the amount that should be paid out." ] }, @@ -9421,7 +9471,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The ongoing number of losing votes cast by the member." ] }, @@ -9438,7 +9488,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Double map from Candidate -> Voter -> (Maybe) Vote." ] }, @@ -9449,7 +9499,7 @@ "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The defending member currently being challenged." ] }, @@ -9465,7 +9515,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes for the defender." ] }, @@ -9476,7 +9526,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The max number of members for the society at one time." ] } @@ -9491,7 +9541,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " A user outside of the society can make a bid for entry.", "", " Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", @@ -9535,7 +9585,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " A bidder can remove their bid for entry into society.", " By doing so, they will have their candidate deposit returned or", " they will unvouch their voucher.", @@ -9573,7 +9623,7 @@ "type": "BalanceOf" } ], - "documentation": [ + "docs": [ " As a member, vouch for someone to join society by placing a bid on their behalf.", "", " There is no deposit required to vouch for a new bid, but a member can only vouch for", @@ -9628,7 +9678,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " As a vouching member, unvouch a bid. This only works while vouched user is", " only a bidder (and not a candidate).", "", @@ -9660,7 +9710,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " As a member, vote on a candidate.", "", " The dispatch origin for this call must be _Signed_ and a member.", @@ -9690,7 +9740,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " As a member, vote on the defender.", "", " The dispatch origin for this call must be _Signed_ and a member.", @@ -9712,7 +9762,7 @@ { "name": "payout", "args": [], - "documentation": [ + "docs": [ " Transfer the first matured payout for the sender and remove it from the records.", "", " NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts.", @@ -9751,7 +9801,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Found the society.", "", " This is done as a discrete action in order to allow for the", @@ -9776,7 +9826,7 @@ { "name": "unfound", "args": [], - "documentation": [ + "docs": [ " Annul the founding of the society.", "", " The dispatch origin for this call must be Signed, and the signing account must be both", @@ -9804,7 +9854,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Allow suspension judgement origin to make judgement on a suspended member.", "", " If a suspended member is forgiven, we simply add them back as a member, not affecting", @@ -9846,7 +9896,7 @@ "type": "SocietyJudgement" } ], - "documentation": [ + "docs": [ " Allow suspended judgement origin to make judgement on a suspended candidate.", "", " If the judgement is `Approve`, we add them to society as a member with the appropriate", @@ -9897,7 +9947,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Allows root origin to change the maximum number of members in society.", " Max membership count must be greater than 1.", "", @@ -9921,7 +9971,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " The society is founded by the given identity. \\[founder\\]" ] }, @@ -9931,7 +9981,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A membership bid just happened. The given account is the candidate's ID and their offer", " is the second. \\[candidate_id, offer\\]" ] @@ -9943,7 +9993,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A membership bid just happened by vouching. The given account is the candidate's ID and", " their offer is the second. The vouching party is the third. \\[candidate_id, offer, vouching\\]" ] @@ -9953,7 +10003,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[candidate\\] was dropped (due to an excess of bids in the system)." ] }, @@ -9962,7 +10012,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[candidate\\] was dropped (by their request)." ] }, @@ -9971,7 +10021,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[candidate\\] was dropped (by request of who vouched for them)." ] }, @@ -9981,7 +10031,7 @@ "AccountId", "Vec" ], - "documentation": [ + "docs": [ " A group of candidates have been inducted. The batch's primary is the first value, the", " batch in full is the second. \\[primary, candidates\\]" ] @@ -9992,7 +10042,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A suspended member has been judged. \\[who, judged\\]" ] }, @@ -10001,7 +10051,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[candidate\\] has been suspended" ] }, @@ -10010,7 +10060,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[member\\] has been suspended" ] }, @@ -10019,7 +10069,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A \\[member\\] has been challenged" ] }, @@ -10030,7 +10080,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A vote has been placed \\[candidate, voter, vote\\]" ] }, @@ -10040,7 +10090,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A vote has been placed for a defending member \\[voter, vote\\]" ] }, @@ -10049,7 +10099,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " A new \\[max\\] member count has been set" ] }, @@ -10058,7 +10108,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " Society is unfounded. \\[founder\\]" ] }, @@ -10067,7 +10117,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some funds were deposited into the society account. \\[value\\]" ] } @@ -10077,7 +10127,7 @@ "name": "CandidateDeposit", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [ + "docs": [ " The minimum amount of a deposit required for a bid to be made." ] }, @@ -10085,7 +10135,7 @@ "name": "WrongSideDeduction", "type": "BalanceOf", "value": "0x0080f420e6b500000000000000000000", - "documentation": [ + "docs": [ " The amount of the unpaid reward that gets deducted in the case that either a skeptic", " doesn't vote or someone votes in the wrong way." ] @@ -10094,7 +10144,7 @@ "name": "MaxStrikes", "type": "u32", "value": "0x0a000000", - "documentation": [ + "docs": [ " The number of times a member may vote the wrong way (or not at all, when they are a skeptic)", " before they become suspended." ] @@ -10103,7 +10153,7 @@ "name": "PeriodSpend", "type": "BalanceOf", "value": "0x0000c52ebca2b1000000000000000000", - "documentation": [ + "docs": [ " The amount of incentive paid within each period. Doesn't include VoterTip." ] }, @@ -10111,7 +10161,7 @@ "name": "RotationPeriod", "type": "BlockNumber", "value": "0x00770100", - "documentation": [ + "docs": [ " The number of blocks between candidate/membership rotation periods." ] }, @@ -10119,7 +10169,7 @@ "name": "ChallengePeriod", "type": "BlockNumber", "value": "0x80130300", - "documentation": [ + "docs": [ " The number of blocks between membership challenges." ] }, @@ -10127,7 +10177,7 @@ "name": "PalletId", "type": "PalletId", "value": "0x70792f736f636965", - "documentation": [ + "docs": [ " The societies's module id" ] }, @@ -10135,7 +10185,7 @@ "name": "MaxCandidateIntake", "type": "u32", "value": "0x0a000000", - "documentation": [ + "docs": [ " Maximum candidate intake per round." ] } @@ -10143,109 +10193,109 @@ "errors": [ { "name": "BadPosition", - "documentation": [ + "docs": [ " An incorrect position was provided." ] }, { "name": "NotMember", - "documentation": [ + "docs": [ " User is not a member." ] }, { "name": "AlreadyMember", - "documentation": [ + "docs": [ " User is already a member." ] }, { "name": "Suspended", - "documentation": [ + "docs": [ " User is suspended." ] }, { "name": "NotSuspended", - "documentation": [ + "docs": [ " User is not suspended." ] }, { "name": "NoPayout", - "documentation": [ + "docs": [ " Nothing to payout." ] }, { "name": "AlreadyFounded", - "documentation": [ + "docs": [ " Society already founded." ] }, { "name": "InsufficientPot", - "documentation": [ + "docs": [ " Not enough in pot to accept candidate." ] }, { "name": "AlreadyVouching", - "documentation": [ + "docs": [ " Member is already vouching or banned from vouching again." ] }, { "name": "NotVouching", - "documentation": [ + "docs": [ " Member is not vouching." ] }, { "name": "Head", - "documentation": [ + "docs": [ " Cannot remove the head of the chain." ] }, { "name": "Founder", - "documentation": [ + "docs": [ " Cannot remove the founder." ] }, { "name": "AlreadyBid", - "documentation": [ + "docs": [ " User has already made a bid." ] }, { "name": "AlreadyCandidate", - "documentation": [ + "docs": [ " User is already a candidate." ] }, { "name": "NotCandidate", - "documentation": [ + "docs": [ " User is not a candidate." ] }, { "name": "MaxMembers", - "documentation": [ + "docs": [ " Too many members in the society." ] }, { "name": "NotFounder", - "documentation": [ + "docs": [ " The caller is not the founder." ] }, { "name": "NotHead", - "documentation": [ + "docs": [ " The caller is not the head." ] } @@ -10269,7 +10319,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of recoverable accounts and their recovery configuration." ] }, @@ -10286,7 +10336,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Active recovery attempts.", "", " First account is the account to be recovered, and the second account", @@ -10305,7 +10355,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The list of allowed proxy accounts.", "", " Map from the user who can access it to the recovered account." @@ -10326,7 +10376,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Send a call through a recovered account.", "", " The dispatch origin for this call must be _Signed_ and registered to", @@ -10354,7 +10404,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow ROOT to bypass the recovery process and set an a rescuer account", " for a lost account directly.", "", @@ -10386,7 +10436,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Create a recovery configuration for your account. This makes your account recoverable.", "", " Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", @@ -10424,7 +10474,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Initiate the process for recovering a recoverable account.", "", " Payment: `RecoveryDeposit` balance will be reserved for initiating the", @@ -10461,7 +10511,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow a \"friend\" of a recoverable account to vouch for an active recovery", " process for that account.", "", @@ -10497,7 +10547,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Allow a successful rescuer to claim their recovered account.", "", " The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", @@ -10528,7 +10578,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " As the controller of a recoverable account, close an active recovery", " process for your account.", "", @@ -10554,7 +10604,7 @@ { "name": "remove_recovery", "args": [], - "documentation": [ + "docs": [ " Remove the recovery process for your account. Recovered accounts are still accessible.", "", " NOTE: The user must make sure to call `close_recovery` on all active", @@ -10586,7 +10636,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Cancel the ability to use `as_recovered` for `account`.", "", " The dispatch origin for this call must be _Signed_ and registered to", @@ -10607,7 +10657,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been set up for an \\[account\\]." ] }, @@ -10617,7 +10667,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been initiated for lost account by rescuer account.", " \\[lost, rescuer\\]" ] @@ -10629,7 +10679,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process for lost account by rescuer account has been vouched for by sender.", " \\[lost, rescuer, sender\\]" ] @@ -10640,7 +10690,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " A recovery process for lost account by rescuer account has been closed.", " \\[lost, rescuer\\]" ] @@ -10651,7 +10701,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Lost account has been successfully recovered by rescuer account.", " \\[lost, rescuer\\]" ] @@ -10661,7 +10711,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A recovery process has been removed for an \\[account\\]." ] } @@ -10671,7 +10721,7 @@ "name": "ConfigDepositBase", "type": "BalanceOf", "value": "0x00406352bfc601000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for creating a recovery configuration.", "", " This is held for an additional storage item whose value size is", @@ -10682,7 +10732,7 @@ "name": "FriendDepositFactor", "type": "BalanceOf", "value": "0x00203d88792d00000000000000000000", - "documentation": [ + "docs": [ " The amount of currency needed per additional user when creating a recovery configuration.", "", " This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage value." @@ -10692,7 +10742,7 @@ "name": "MaxFriends", "type": "u16", "value": "0x0900", - "documentation": [ + "docs": [ " The maximum amount of friends allowed in a recovery configuration." ] }, @@ -10700,7 +10750,7 @@ "name": "RecoveryDeposit", "type": "BalanceOf", "value": "0x00406352bfc601000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for starting a recovery.", "", " This is primarily held for deterring malicious recovery attempts, and should", @@ -10714,97 +10764,97 @@ "errors": [ { "name": "NotAllowed", - "documentation": [ + "docs": [ " User is not allowed to make a call on behalf of this account" ] }, { "name": "ZeroThreshold", - "documentation": [ + "docs": [ " Threshold must be greater than zero" ] }, { "name": "NotEnoughFriends", - "documentation": [ + "docs": [ " Friends list must be greater than zero and threshold" ] }, { "name": "MaxFriends", - "documentation": [ + "docs": [ " Friends list must be less than max friends" ] }, { "name": "NotSorted", - "documentation": [ + "docs": [ " Friends list must be sorted and free of duplicates" ] }, { "name": "NotRecoverable", - "documentation": [ + "docs": [ " This account is not set up for recovery" ] }, { "name": "AlreadyRecoverable", - "documentation": [ + "docs": [ " This account is already set up for recovery" ] }, { "name": "AlreadyStarted", - "documentation": [ + "docs": [ " A recovery process has already started for this account" ] }, { "name": "NotStarted", - "documentation": [ + "docs": [ " A recovery process has not started for this rescuer" ] }, { "name": "NotFriend", - "documentation": [ + "docs": [ " This account is not a friend who can vouch" ] }, { "name": "DelayPeriod", - "documentation": [ + "docs": [ " The friend must wait until the delay period to vouch for this recovery" ] }, { "name": "AlreadyVouched", - "documentation": [ + "docs": [ " This user has already vouched for this recovery" ] }, { "name": "Threshold", - "documentation": [ + "docs": [ " The threshold for recovering this account has not been met" ] }, { "name": "StillActive", - "documentation": [ + "docs": [ " There are still active recovery attempts that need to be closed" ] }, { "name": "AlreadyProxy", - "documentation": [ + "docs": [ " This account is already set up for recovery" ] }, { "name": "BadState", - "documentation": [ + "docs": [ " Some internal state is broken." ] } @@ -10828,7 +10878,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information regarding the vesting of a given account." ] } @@ -10838,7 +10888,7 @@ { "name": "vest", "args": [], - "documentation": [ + "docs": [ " Unlock any vested funds of the sender account.", "", " The dispatch origin for this call must be _Signed_ and the sender must have funds still", @@ -10862,7 +10912,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Unlock any vested funds of a `target` account.", "", " The dispatch origin for this call must be _Signed_.", @@ -10892,7 +10942,7 @@ "type": "VestingInfo" } ], - "documentation": [ + "docs": [ " Create a vested transfer.", "", " The dispatch origin for this call must be _Signed_.", @@ -10927,7 +10977,7 @@ "type": "VestingInfo" } ], - "documentation": [ + "docs": [ " Force a vested transfer.", "", " The dispatch origin for this call must be _Root_.", @@ -10955,7 +11005,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " The amount vested has been updated. This could indicate more funds are available. The", " balance given is the amount which is left unvested (and thus locked).", " \\[account, unvested\\]" @@ -10966,7 +11016,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An \\[account\\] has become fully vested. No further vesting can happen." ] } @@ -10976,7 +11026,7 @@ "name": "MinVestedTransfer", "type": "BalanceOf", "value": "0x0000c16ff28623000000000000000000", - "documentation": [ + "docs": [ " The minimum amount transferred to call `vested_transfer`." ] } @@ -10984,19 +11034,19 @@ "errors": [ { "name": "NotVesting", - "documentation": [ + "docs": [ " The account given is not vesting." ] }, { "name": "ExistingVestingSchedule", - "documentation": [ + "docs": [ " An existing vesting schedule already exists for this account that cannot be clobbered." ] }, { "name": "AmountLow", - "documentation": [ + "docs": [ " Amount being transferred is too low to create a vesting schedule." ] } @@ -11020,7 +11070,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Items to be executed, indexed by the block number that they should be executed on." ] }, @@ -11036,7 +11086,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Lookup from identity to the block number and index of the task." ] }, @@ -11047,7 +11097,7 @@ "plain": "Releases" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage version of the pallet.", "", " New networks start with last version." @@ -11076,7 +11126,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Anonymously schedule a task.", "", " # ", @@ -11101,7 +11151,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Cancel an anonymously scheduled task.", "", " # ", @@ -11138,7 +11188,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Schedule a named task.", "", " # ", @@ -11159,7 +11209,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Cancel a named scheduled task.", "", " # ", @@ -11192,7 +11242,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Anonymously schedule a task after a delay.", "", " # ", @@ -11224,11 +11274,11 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Schedule a named task after a delay.", "", " # ", - " Same as [`schedule_named`].", + " Same as [`schedule_named`](Self::schedule_named).", " # " ] } @@ -11240,7 +11290,7 @@ "BlockNumber", "u32" ], - "documentation": [ + "docs": [ " Scheduled some task. \\[when, index\\]" ] }, @@ -11250,7 +11300,7 @@ "BlockNumber", "u32" ], - "documentation": [ + "docs": [ " Canceled some task. \\[when, index\\]" ] }, @@ -11261,34 +11311,53 @@ "Option", "DispatchResult" ], - "documentation": [ + "docs": [ " Dispatched some task. \\[task, id, result\\]" ] } ], - "constants": [], + "constants": [ + { + "name": "MaximumWeight", + "type": "Weight", + "value": "0x00806e8774010000", + "docs": [ + " The maximum weight that may be scheduled per block for any dispatchables of less priority", + " than `schedule::HARD_DEADLINE`." + ] + }, + { + "name": "MaxScheduledPerBlock", + "type": "u32", + "value": "0x32000000", + "docs": [ + " The maximum number of scheduled calls in the queue for a single block.", + " Not strictly enforced, but used for weight estimation." + ] + } + ], "errors": [ { "name": "FailedToSchedule", - "documentation": [ + "docs": [ " Failed to schedule a call" ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Cannot find the scheduled call." ] }, { "name": "TargetBlockNumberInPast", - "documentation": [ + "docs": [ " Given target block number is in the past." ] }, { "name": "RescheduleNoChange", - "documentation": [ + "docs": [ " Reschedule failed because it does not change scheduled time." ] } @@ -11312,7 +11381,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " The set of account proxies. Maps the account which has delegated to the accounts", " which are being delegated to, together with the amount held on deposit." ] @@ -11329,7 +11398,7 @@ } }, "fallback": "0x0000000000000000000000000000000000", - "documentation": [ + "docs": [ " The announcements made by the proxy (key)." ] } @@ -11352,7 +11421,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Dispatch the given `call` from an account that the sender is authorised for through", " `add_proxy`.", "", @@ -11386,7 +11455,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Register a proxy account for the sender that is able to make calls on its behalf.", "", " The dispatch origin for this call must be _Signed_.", @@ -11418,7 +11487,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Unregister a proxy account for the sender.", "", " The dispatch origin for this call must be _Signed_.", @@ -11435,7 +11504,7 @@ { "name": "remove_proxies", "args": [], - "documentation": [ + "docs": [ " Unregister all proxy accounts for the sender.", "", " The dispatch origin for this call must be _Signed_.", @@ -11464,7 +11533,7 @@ "type": "u16" } ], - "documentation": [ + "docs": [ " Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and", " initialize it with a proxy of `proxy_type` for `origin` sender.", "", @@ -11514,7 +11583,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Removes a previously spawned anonymous proxy.", "", " WARNING: **All access to this account will be lost.** Any funds held in it will be", @@ -11549,7 +11618,7 @@ "type": "CallHashOf" } ], - "documentation": [ + "docs": [ " Publish the hash of a proxy-call that will be made in the future.", "", " This must be called some number of blocks before the corresponding `proxy` is attempted", @@ -11585,7 +11654,7 @@ "type": "CallHashOf" } ], - "documentation": [ + "docs": [ " Remove a given announcement.", "", " May be called by a proxy account to remove a call they previously announced and return", @@ -11616,7 +11685,7 @@ "type": "CallHashOf" } ], - "documentation": [ + "docs": [ " Remove the given announcement of a delegate.", "", " May be called by a target (proxied) account to remove a call that one of their delegates", @@ -11655,7 +11724,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Dispatch the given `call` from an account that the sender is authorized for through", " `add_proxy`.", "", @@ -11682,7 +11751,7 @@ "args": [ "DispatchResult" ], - "documentation": [ + "docs": [ " A proxy was executed correctly, with the given \\[result\\]." ] }, @@ -11694,7 +11763,7 @@ "ProxyType", "u16" ], - "documentation": [ + "docs": [ " Anonymous account has been created by new proxy with given", " disambiguation index and proxy type. \\[anonymous, who, proxy_type, disambiguation_index\\]" ] @@ -11706,7 +11775,7 @@ "AccountId", "Hash" ], - "documentation": [ + "docs": [ " An announcement was placed to make a call in the future. \\[real, proxy, call_hash\\]" ] } @@ -11716,7 +11785,7 @@ "name": "ProxyDepositBase", "type": "BalanceOf", "value": "0x00f09e544c3900000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for creating a proxy.", "", " This is held for an additional storage item whose value size is", @@ -11727,7 +11796,7 @@ "name": "ProxyDepositFactor", "type": "BalanceOf", "value": "0x0060aa7714b400000000000000000000", - "documentation": [ + "docs": [ " The amount of currency needed per proxy added.", "", " This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing", @@ -11739,7 +11808,7 @@ "name": "MaxProxies", "type": "u32", "value": "0x20000000", - "documentation": [ + "docs": [ " The maximum amount of proxies allowed for a single account." ] }, @@ -11747,7 +11816,7 @@ "name": "MaxPending", "type": "u32", "value": "0x20000000", - "documentation": [ + "docs": [ " The maximum amount of time-delayed announcements that are allowed to be pending." ] }, @@ -11755,7 +11824,7 @@ "name": "AnnouncementDepositBase", "type": "BalanceOf", "value": "0x00f09e544c3900000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for creating an announcement.", "", " This is held when a new storage item holding a `Balance` is created (typically 16 bytes)." @@ -11765,7 +11834,7 @@ "name": "AnnouncementDepositFactor", "type": "BalanceOf", "value": "0x00c054ef286801000000000000000000", - "documentation": [ + "docs": [ " The amount of currency needed per announcement made.", "", " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)", @@ -11776,49 +11845,49 @@ "errors": [ { "name": "TooMany", - "documentation": [ + "docs": [ " There are too many proxies registered or too many announcements pending." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Proxy registration not found." ] }, { "name": "NotProxy", - "documentation": [ + "docs": [ " Sender is not a proxy of the account to be proxied." ] }, { "name": "Unproxyable", - "documentation": [ + "docs": [ " A call which is incompatible with the proxy type's filter was attempted." ] }, { "name": "Duplicate", - "documentation": [ + "docs": [ " Account is already a proxy." ] }, { "name": "NoPermission", - "documentation": [ + "docs": [ " Call may not be made by proxy because it may escalate its privileges." ] }, { "name": "Unannounced", - "documentation": [ + "docs": [ " Announcement, if made at all, was made too recently." ] }, { "name": "NoSelfProxy", - "documentation": [ + "docs": [ " Cannot add self as proxy." ] } @@ -11843,7 +11912,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The set of open multisig operations." ] }, @@ -11859,7 +11928,7 @@ } }, "fallback": "0x00", - "documentation": [] + "docs": [] } ] }, @@ -11876,7 +11945,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Immediately dispatch a multi-signature call using a single approval from the caller.", "", " The dispatch origin for this call must be _Signed_.", @@ -11923,7 +11992,7 @@ "type": "Weight" } ], - "documentation": [ + "docs": [ " Register approval for a dispatch to be made from a deterministic composite account if", " approved by a total of `threshold - 1` of `other_signatories`.", "", @@ -11996,7 +12065,7 @@ "type": "Weight" } ], - "documentation": [ + "docs": [ " Register approval for a dispatch to be made from a deterministic composite account if", " approved by a total of `threshold - 1` of `other_signatories`.", "", @@ -12055,7 +12124,7 @@ "type": "[u8;32]" } ], - "documentation": [ + "docs": [ " Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", " for this operation will be unreserved on success.", "", @@ -12093,7 +12162,7 @@ "AccountId", "CallHash" ], - "documentation": [ + "docs": [ " A new multisig operation has begun. \\[approving, multisig, call_hash\\]" ] }, @@ -12105,7 +12174,7 @@ "AccountId", "CallHash" ], - "documentation": [ + "docs": [ " A multisig operation has been approved by someone.", " \\[approving, timepoint, multisig, call_hash\\]" ] @@ -12119,7 +12188,7 @@ "CallHash", "DispatchResult" ], - "documentation": [ + "docs": [ " A multisig operation has been executed. \\[approving, timepoint, multisig, call_hash\\]" ] }, @@ -12131,7 +12200,7 @@ "AccountId", "CallHash" ], - "documentation": [ + "docs": [ " A multisig operation has been cancelled. \\[cancelling, timepoint, multisig, call_hash\\]" ] } @@ -12141,7 +12210,7 @@ "name": "DepositBase", "type": "BalanceOf", "value": "0x00f01c0adbed01000000000000000000", - "documentation": [ + "docs": [ " The base amount of currency needed to reserve for creating a multisig execution or to store", " a dispatch call for later.", "", @@ -12154,7 +12223,7 @@ "name": "DepositFactor", "type": "BalanceOf", "value": "0x0000cc7b9fae00000000000000000000", - "documentation": [ + "docs": [ " The amount of currency needed per unit threshold when creating a multisig execution.", "", " This is held for adding 32 bytes more into a pre-existing storage value." @@ -12164,7 +12233,7 @@ "name": "MaxSignatories", "type": "u16", "value": "0x6400", - "documentation": [ + "docs": [ " The maximum amount of signatories allowed in the multisig." ] } @@ -12172,85 +12241,85 @@ "errors": [ { "name": "MinimumThreshold", - "documentation": [ + "docs": [ " Threshold must be 2 or greater." ] }, { "name": "AlreadyApproved", - "documentation": [ + "docs": [ " Call is already approved by this signatory." ] }, { "name": "NoApprovalsNeeded", - "documentation": [ + "docs": [ " Call doesn't need any (more) approvals." ] }, { "name": "TooFewSignatories", - "documentation": [ + "docs": [ " There are too few signatories in the list." ] }, { "name": "TooManySignatories", - "documentation": [ + "docs": [ " There are too many signatories in the list." ] }, { "name": "SignatoriesOutOfOrder", - "documentation": [ + "docs": [ " The signatories were provided out of order; they should be ordered." ] }, { "name": "SenderInSignatories", - "documentation": [ + "docs": [ " The sender was contained in the other signatories; it shouldn't be." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " Multisig operation not found when attempting to cancel." ] }, { "name": "NotOwner", - "documentation": [ + "docs": [ " Only the account that originally created the multisig is able to cancel it." ] }, { "name": "NoTimepoint", - "documentation": [ + "docs": [ " No timepoint was given, yet the multisig operation is already underway." ] }, { "name": "WrongTimepoint", - "documentation": [ + "docs": [ " A different timepoint was given to the multisig operation that is underway." ] }, { "name": "UnexpectedTimepoint", - "documentation": [ + "docs": [ " A timepoint was given, yet no multisig operation is underway." ] }, { "name": "MaxWeightTooLow", - "documentation": [ + "docs": [ " The maximum weight information provided was too low." ] }, { "name": "AlreadyStored", - "documentation": [ + "docs": [ " The data to be stored is already stored." ] } @@ -12269,7 +12338,7 @@ "plain": "BountyIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Number of bounty proposals that have been made." ] }, @@ -12285,7 +12354,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Bounties that have been made." ] }, @@ -12301,7 +12370,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The description of each bounty." ] }, @@ -12312,7 +12381,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Bounty indices that have been approved but not yet funded." ] } @@ -12331,7 +12400,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Propose a new bounty.", "", " The dispatch origin for this call must be _Signed_.", @@ -12354,7 +12423,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Approve a bounty proposal. At a later time, the bounty will be funded and become active", " and the original deposit will be returned.", "", @@ -12381,7 +12450,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Assign a curator to a funded bounty.", "", " May only be called from `T::ApproveOrigin`.", @@ -12399,7 +12468,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Unassign curator from a bounty.", "", " This function can only be called by the `RejectOrigin` a signed origin.", @@ -12428,7 +12497,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Accept the curator role for a bounty.", " A deposit will be reserved from curator and refund upon successful payout.", "", @@ -12451,7 +12520,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay.", "", " The dispatch origin for this call must be the curator of this bounty.", @@ -12472,7 +12541,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Claim the payout from an awarded bounty after payout delay.", "", " The dispatch origin for this call must be the beneficiary of this bounty.", @@ -12492,7 +12561,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Cancel a proposed or active bounty. All the funds will be sent to treasury and", " the curator deposit will be unreserved if possible.", "", @@ -12517,7 +12586,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Extend the expiry time of an active bounty.", "", " The dispatch origin for this call must be the curator of this bounty.", @@ -12537,7 +12606,7 @@ "args": [ "BountyIndex" ], - "documentation": [ + "docs": [ " New bounty proposal. \\[index\\]" ] }, @@ -12547,7 +12616,7 @@ "BountyIndex", "Balance" ], - "documentation": [ + "docs": [ " A bounty proposal was rejected; funds were slashed. \\[index, bond\\]" ] }, @@ -12556,7 +12625,7 @@ "args": [ "BountyIndex" ], - "documentation": [ + "docs": [ " A bounty proposal is funded and became active. \\[index\\]" ] }, @@ -12566,7 +12635,7 @@ "BountyIndex", "AccountId" ], - "documentation": [ + "docs": [ " A bounty is awarded to a beneficiary. \\[index, beneficiary\\]" ] }, @@ -12577,7 +12646,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A bounty is claimed by beneficiary. \\[index, payout, beneficiary\\]" ] }, @@ -12586,7 +12655,7 @@ "args": [ "BountyIndex" ], - "documentation": [ + "docs": [ " A bounty is cancelled. \\[index\\]" ] }, @@ -12595,7 +12664,7 @@ "args": [ "BountyIndex" ], - "documentation": [ + "docs": [ " A bounty expiry is extended. \\[index\\]" ] } @@ -12605,7 +12674,7 @@ "name": "DataDepositPerByte", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit per byte within bounty description." ] }, @@ -12613,7 +12682,7 @@ "name": "BountyDepositBase", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for placing a bounty proposal." ] }, @@ -12621,7 +12690,7 @@ "name": "BountyDepositPayoutDelay", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " The delay period for which a bounty beneficiary need to wait before claim the payout." ] }, @@ -12629,7 +12698,7 @@ "name": "BountyUpdatePeriod", "type": "BlockNumber", "value": "0x00270600", - "documentation": [ + "docs": [ " Bounty duration in blocks." ] }, @@ -12637,7 +12706,7 @@ "name": "BountyCuratorDeposit", "type": "Permill", "value": "0x20a10700", - "documentation": [ + "docs": [ " Percentage of the curator fee that will be reserved upfront as deposit for bounty curator." ] }, @@ -12645,7 +12714,7 @@ "name": "BountyValueMinimum", "type": "BalanceOf", "value": "0x00406352bfc601000000000000000000", - "documentation": [ + "docs": [ " Minimum value for a bounty." ] }, @@ -12653,7 +12722,7 @@ "name": "MaximumReasonLength", "type": "u32", "value": "0x00400000", - "documentation": [ + "docs": [ " Maximum acceptable reason length." ] } @@ -12661,56 +12730,56 @@ "errors": [ { "name": "InsufficientProposersBalance", - "documentation": [ + "docs": [ " Proposer's balance is too low." ] }, { "name": "InvalidIndex", - "documentation": [ + "docs": [ " No proposal or bounty at that index." ] }, { "name": "ReasonTooBig", - "documentation": [ + "docs": [ " The reason given is just too big." ] }, { "name": "UnexpectedStatus", - "documentation": [ + "docs": [ " The bounty status is unexpected." ] }, { "name": "RequireCurator", - "documentation": [ + "docs": [ " Require bounty curator." ] }, { "name": "InvalidValue", - "documentation": [ + "docs": [ " Invalid bounty value." ] }, { "name": "InvalidFee", - "documentation": [ + "docs": [ " Invalid bounty fee." ] }, { "name": "PendingPayout", - "documentation": [ + "docs": [ " A bounty payout is pending.", " To cancel the bounty, you must unassign and slash the curator." ] }, { "name": "Premature", - "documentation": [ + "docs": [ " The bounties cannot be claimed/closed because it's still in the countdown period." ] } @@ -12734,7 +12803,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", " This has the insecure enumerable hash function since the key itself is already", " guaranteed to be a secure hash." @@ -12752,7 +12821,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Simple preimage lookup from the reason's hash to the original data. Again, has an", " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." ] @@ -12772,7 +12841,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Report something `reason` that deserves a tip and claim any eventual the finder's fee.", "", " The dispatch origin for this call must be _Signed_.", @@ -12802,7 +12871,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", "", " If successful, the original deposit will be unreserved.", @@ -12840,7 +12909,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Give a tip for something new; no finder's fee will be taken.", "", " The dispatch origin for this call must be _Signed_ and the signing account must be a", @@ -12877,7 +12946,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Declare a tip value for an already-open tip.", "", " The dispatch origin for this call must be _Signed_ and the signing account must be a", @@ -12913,7 +12982,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Close and payout a tip.", "", " The dispatch origin for this call must be _Signed_.", @@ -12941,7 +13010,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Remove and slash an already-open tip.", "", " May only be called from `T::RejectOrigin`.", @@ -12963,7 +13032,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A new tip suggestion has been opened. \\[tip_hash\\]" ] }, @@ -12972,7 +13041,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A tip suggestion has reached threshold and is closing. \\[tip_hash\\]" ] }, @@ -12983,7 +13052,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A tip suggestion has been closed. \\[tip_hash, who, payout\\]" ] }, @@ -12992,7 +13061,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A tip suggestion has been retracted. \\[tip_hash\\]" ] }, @@ -13003,7 +13072,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A tip suggestion has been slashed. \\[tip_hash, finder, deposit\\]" ] } @@ -13013,7 +13082,7 @@ "name": "TipCountdown", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " The period for which a tip remains open after is has achieved threshold tippers." ] }, @@ -13021,7 +13090,7 @@ "name": "TipFindersFee", "type": "Percent", "value": "0x14", - "documentation": [ + "docs": [ " The amount of the final tip which goes to the original reporter of the tip." ] }, @@ -13029,7 +13098,7 @@ "name": "TipReportDepositBase", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit for placing a tip report." ] }, @@ -13037,7 +13106,7 @@ "name": "DataDepositPerByte", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount held on deposit per byte within the tip report reason." ] }, @@ -13045,7 +13114,7 @@ "name": "MaximumReasonLength", "type": "u32", "value": "0x00400000", - "documentation": [ + "docs": [ " Maximum acceptable reason length." ] } @@ -13053,37 +13122,37 @@ "errors": [ { "name": "ReasonTooBig", - "documentation": [ + "docs": [ " The reason given is just too big." ] }, { "name": "AlreadyKnown", - "documentation": [ + "docs": [ " The tip was already found/started." ] }, { "name": "UnknownTip", - "documentation": [ + "docs": [ " The tip hash is unknown." ] }, { "name": "NotFinder", - "documentation": [ + "docs": [ " The account attempting to retract the tip is not the finder of the tip." ] }, { "name": "StillOpen", - "documentation": [ + "docs": [ " The tip cannot be claimed/closed because there are not enough tippers yet." ] }, { "name": "Premature", - "documentation": [ + "docs": [ " The tip cannot be claimed/closed because it's still in the countdown period." ] } @@ -13107,7 +13176,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Details of an asset." ] }, @@ -13124,7 +13193,7 @@ } }, "fallback": "0x00000000000000000000", - "documentation": [ + "docs": [ " The number of units of assets held by any given account." ] }, @@ -13147,7 +13216,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Approved balance transfers. First balance is the amount approved for transfer. Second", " is the amount of `T::Currency` reserved for storing this.", " First key is the asset ID, second key is the owner and third key is the delegate." @@ -13165,7 +13234,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Metadata of an asset." ] } @@ -13188,7 +13257,7 @@ "type": "TAssetBalance" } ], - "documentation": [ + "docs": [ " Issue a new class of fungible assets from a public origin.", "", " This new asset class has no assets initially and its owner is the origin.", @@ -13230,7 +13299,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Issue a new class of fungible assets from a privileged origin.", "", " This new asset class has no assets initially.", @@ -13264,7 +13333,7 @@ "type": "AssetDestroyWitness" } ], - "documentation": [ + "docs": [ " Destroy a class of fungible assets.", "", " The origin must conform to `ForceOrigin` or must be Signed and the sender must be the", @@ -13301,7 +13370,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Mint assets of a particular class.", "", " The origin must be Signed and the sender must be the Issuer of the asset `id`.", @@ -13332,7 +13401,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Reduce the balance of `who` by as much as possible up to `amount` assets of `id`.", "", " Origin must be Signed and the sender should be the Manager of the asset `id`.", @@ -13366,7 +13435,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Move some assets from the sender account to another.", "", " Origin must be Signed.", @@ -13403,7 +13472,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Move some assets from the sender account to another, keeping the sender account alive.", "", " Origin must be Signed.", @@ -13444,7 +13513,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Move some assets from one account to another.", "", " Origin must be Signed and the sender should be the Admin of the asset `id`.", @@ -13478,7 +13547,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Disallow further unprivileged transfers from an account.", "", " Origin must be Signed and the sender should be the Freezer of the asset `id`.", @@ -13503,7 +13572,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Allow unprivileged transfers from an account again.", "", " Origin must be Signed and the sender should be the Admin of the asset `id`.", @@ -13524,7 +13593,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Disallow further unprivileged transfers for the asset class.", "", " Origin must be Signed and the sender should be the Freezer of the asset `id`.", @@ -13544,7 +13613,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Allow unprivileged transfers for the asset again.", "", " Origin must be Signed and the sender should be the Admin of the asset `id`.", @@ -13568,7 +13637,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Change the Owner of an asset.", "", " Origin must be Signed and the sender should be the Owner of the asset `id`.", @@ -13601,7 +13670,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Change the Issuer, Admin and Freezer of an asset.", "", " Origin must be Signed and the sender should be the Owner of the asset `id`.", @@ -13636,7 +13705,7 @@ "type": "u8" } ], - "documentation": [ + "docs": [ " Set the metadata for an asset.", "", " Origin must be Signed and the sender should be the Owner of the asset `id`.", @@ -13663,7 +13732,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Clear the metadata for an asset.", "", " Origin must be Signed and the sender should be the Owner of the asset `id`.", @@ -13701,7 +13770,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Force the metadata for an asset to some value.", "", " Origin must be ForceOrigin.", @@ -13726,7 +13795,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Clear the metadata for an asset.", "", " Origin must be ForceOrigin.", @@ -13776,7 +13845,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Alter the attributes of a given asset.", "", " Origin must be `ForceOrigin`.", @@ -13817,7 +13886,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Approve an amount of asset for transfer by a delegated third-party account.", "", " Origin must be Signed.", @@ -13852,7 +13921,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Cancel all of some asset approved for delegated transfer by a third-party account.", "", " Origin must be Signed and there must be an approval in place between signer and", @@ -13884,7 +13953,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Cancel all of some asset approved for delegated transfer by a third-party account.", "", " Origin must be either ForceOrigin or Signed origin with the signer being the Admin", @@ -13920,7 +13989,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Transfer some asset balance from a previously delegated account to some third-party", " account.", "", @@ -13950,7 +14019,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Some asset class was created. \\[asset_id, creator, owner\\]" ] }, @@ -13961,7 +14030,7 @@ "AccountId", "TAssetBalance" ], - "documentation": [ + "docs": [ " Some assets were issued. \\[asset_id, owner, total_supply\\]" ] }, @@ -13973,7 +14042,7 @@ "AccountId", "TAssetBalance" ], - "documentation": [ + "docs": [ " Some assets were transferred. \\[asset_id, from, to, amount\\]" ] }, @@ -13984,7 +14053,7 @@ "AccountId", "TAssetBalance" ], - "documentation": [ + "docs": [ " Some assets were destroyed. \\[asset_id, owner, balance\\]" ] }, @@ -13996,7 +14065,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " The management team changed \\[asset_id, issuer, admin, freezer\\]" ] }, @@ -14006,7 +14075,7 @@ "AssetId", "AccountId" ], - "documentation": [ + "docs": [ " The owner changed \\[asset_id, owner\\]" ] }, @@ -14016,7 +14085,7 @@ "AssetId", "AccountId" ], - "documentation": [ + "docs": [ " Some account `who` was frozen. \\[asset_id, who\\]" ] }, @@ -14026,7 +14095,7 @@ "AssetId", "AccountId" ], - "documentation": [ + "docs": [ " Some account `who` was thawed. \\[asset_id, who\\]" ] }, @@ -14035,7 +14104,7 @@ "args": [ "AssetId" ], - "documentation": [ + "docs": [ " Some asset `asset_id` was frozen. \\[asset_id\\]" ] }, @@ -14044,7 +14113,7 @@ "args": [ "AssetId" ], - "documentation": [ + "docs": [ " Some asset `asset_id` was thawed. \\[asset_id\\]" ] }, @@ -14053,7 +14122,7 @@ "args": [ "AssetId" ], - "documentation": [ + "docs": [ " An asset class was destroyed." ] }, @@ -14063,7 +14132,7 @@ "AssetId", "AccountId" ], - "documentation": [ + "docs": [ " Some asset class was force-created. \\[asset_id, owner\\]" ] }, @@ -14076,7 +14145,7 @@ "u8", "bool" ], - "documentation": [ + "docs": [ " New metadata has been set for an asset. \\[asset_id, name, symbol, decimals, is_frozen\\]" ] }, @@ -14085,7 +14154,7 @@ "args": [ "AssetId" ], - "documentation": [ + "docs": [ " Metadata has been cleared for an asset. \\[asset_id\\]" ] }, @@ -14097,7 +14166,7 @@ "AccountId", "TAssetBalance" ], - "documentation": [ + "docs": [ " (Additional) funds have been approved for transfer to a destination account.", " \\[asset_id, source, delegate, amount\\]" ] @@ -14109,7 +14178,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An approval for account `delegate` was cancelled by `owner`.", " \\[id, owner, delegate\\]" ] @@ -14123,7 +14192,7 @@ "AccountId", "TAssetBalance" ], - "documentation": [ + "docs": [ " An `amount` was transferred in its entirety from `owner` to `destination` by", " the approved `delegate`.", " \\[id, owner, delegate, destination\\]" @@ -14134,83 +14203,125 @@ "args": [ "AssetId" ], - "documentation": [ + "docs": [ " An asset has had its attributes changed by the `Force` origin.", " \\[id\\]" ] } ], - "constants": [], + "constants": [ + { + "name": "AssetDeposit", + "type": "DepositBalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "docs": [ + " The basic amount of funds that must be reserved for an asset." + ] + }, + { + "name": "MetadataDepositBase", + "type": "DepositBalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "docs": [ + " The basic amount of funds that must be reserved when adding metadata to your asset." + ] + }, + { + "name": "MetadataDepositPerByte", + "type": "DepositBalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "docs": [ + " The additional funds that must be reserved for the number of bytes you store in your", + " metadata." + ] + }, + { + "name": "ApprovalDeposit", + "type": "DepositBalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "docs": [ + " The amount of funds that must be reserved when creating a new approval." + ] + }, + { + "name": "StringLimit", + "type": "u32", + "value": "0x32000000", + "docs": [ + " The maximum length of a name or symbol stored on-chain." + ] + } + ], "errors": [ { "name": "BalanceLow", - "documentation": [ + "docs": [ " Account balance must be greater than or equal to the transfer amount." ] }, { "name": "BalanceZero", - "documentation": [ + "docs": [ " Balance should be non-zero." ] }, { "name": "NoPermission", - "documentation": [ + "docs": [ " The signing account has no permission to do the operation." ] }, { "name": "Unknown", - "documentation": [ + "docs": [ " The given asset ID is unknown." ] }, { "name": "Frozen", - "documentation": [ + "docs": [ " The origin account is frozen." ] }, { "name": "InUse", - "documentation": [ + "docs": [ " The asset ID is already taken." ] }, { "name": "BadWitness", - "documentation": [ + "docs": [ " Invalid witness data given." ] }, { "name": "MinBalanceZero", - "documentation": [ + "docs": [ " Minimum balance should be non-zero." ] }, { "name": "NoProvider", - "documentation": [ + "docs": [ " No provider reference exists to allow a non-zero balance of a non-self-sufficient asset." ] }, { "name": "BadMetadata", - "documentation": [ + "docs": [ " Invalid metadata given." ] }, { "name": "Unapproved", - "documentation": [ + "docs": [ " No approval exists that would allow the transfer." ] }, { "name": "WouldDie", - "documentation": [ + "docs": [ " The source account would not survive the transfer and it needs to stay alive." ] } @@ -14220,7 +14331,7 @@ { "name": "Mmr", "storage": { - "prefix": "MerkleMountainRange", + "prefix": "Mmr", "items": [ { "name": "RootHash", @@ -14229,7 +14340,7 @@ "plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Latest MMR Root hash." ] }, @@ -14240,7 +14351,7 @@ "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current size of the MMR (number of leaves)." ] }, @@ -14256,7 +14367,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Hashes of the nodes in the MMR.", "", " Note this collection only contains MMR peaks, the inner nodes (and leaves)", @@ -14283,7 +14394,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [] + "docs": [] }, { "name": "Lottery", @@ -14292,7 +14403,7 @@ "plain": "LotteryConfig" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The configuration for the current lottery." ] }, @@ -14308,7 +14419,7 @@ } }, "fallback": "0x0000000000", - "documentation": [ + "docs": [ " Users who have purchased a ticket. (Lottery Index, Tickets Purchased)" ] }, @@ -14319,7 +14430,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Total number of tickets sold." ] }, @@ -14335,7 +14446,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Each ticket's owner.", "", " May have residual storage from previous lotteries. Use `TicketsCount` to see which ones", @@ -14349,7 +14460,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The calls stored in this pallet to be used in an active lottery if configured", " by `Config::ValidateCall`." ] @@ -14365,7 +14476,7 @@ "type": "Call" } ], - "documentation": [ + "docs": [ " Buy a ticket to enter the lottery.", "", " This extrinsic acts as a passthrough function for `call`. In all", @@ -14387,7 +14498,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set calls in storage which can be used to purchase a lottery ticket.", "", " This function only matters if you use the `ValidateCall` implementation", @@ -14416,7 +14527,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Start a lottery using the provided configuration.", "", " This extrinsic must be called by the `ManagerOrigin`.", @@ -14432,7 +14543,7 @@ { "name": "stop_repeat", "args": [], - "documentation": [ + "docs": [ " If a lottery is repeating, you can use this to stop the repeat.", " The lottery will continue to run to completion.", "", @@ -14444,14 +14555,14 @@ { "name": "LotteryStarted", "args": [], - "documentation": [ + "docs": [ " A lottery has been started!" ] }, { "name": "CallsUpdated", "args": [], - "documentation": [ + "docs": [ " A new set of calls have been set!" ] }, @@ -14461,7 +14572,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A winner has been chosen!" ] }, @@ -14471,7 +14582,7 @@ "AccountId", "CallIndex" ], - "documentation": [ + "docs": [ " A ticket has been bought!" ] } @@ -14481,7 +14592,7 @@ "name": "PalletId", "type": "PalletId", "value": "0x70792f6c6f74746f", - "documentation": [ + "docs": [ " The Lottery's pallet id" ] }, @@ -14489,51 +14600,61 @@ "name": "MaxCalls", "type": "u32", "value": "0x0a000000", - "documentation": [ + "docs": [ " The max number of calls available in a single lottery." ] + }, + { + "name": "MaxGenerateRandom", + "type": "u32", + "value": "0x0a000000", + "docs": [ + " Number of time we should try to generate a random number that has no modulo bias.", + " The larger this number, the more potential computation is used for picking the winner,", + " but also the more likely that the chosen winner is done fairly." + ] } ], "errors": [ { "name": "NotConfigured", - "documentation": [ + "docs": [ " A lottery has not been configured." ] }, { "name": "InProgress", - "documentation": [ + "docs": [ " A lottery is already in progress." ] }, { "name": "AlreadyEnded", - "documentation": [ + "docs": [ " A lottery has already ended." ] }, { "name": "InvalidCall", - "documentation": [ + "docs": [ " The call is not valid for an open lottery." ] }, { "name": "AlreadyParticipating", - "documentation": [ + "docs": [ " You are already participating in the lottery with this call." ] }, { "name": "TooManyCalls", - "documentation": [ + "docs": [ " Too many calls for a single lottery." ] }, { "name": "EncodingFailed", - "documentation": [ + "docs": [ " Failed to encode calls" ] } @@ -14552,7 +14673,7 @@ "plain": "Vec<(u32,BalanceOf)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The totals of items and balances within each queue. Saves a lot of storage reads in the", " case of sparsely packed queues.", "", @@ -14572,7 +14693,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The queues of bids ready to become gilts. Indexed by duration (in `Period`s)." ] }, @@ -14583,7 +14704,7 @@ "plain": "ActiveGiltsTotal" }, "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Information relating to the gilts currently active." ] }, @@ -14599,7 +14720,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The currently active gilts, indexed according to the order of creation." ] } @@ -14618,7 +14739,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Place a bid for a gilt to be issued.", "", " Origin must be Signed, and account must have at least `amount` in free balance.", @@ -14646,7 +14767,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Retract a previously placed bid.", "", " Origin must be Signed, and the account should have previously issued a still-active bid", @@ -14664,7 +14785,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set target proportion of gilt-funds.", "", " Origin must be `AdminOrigin`.", @@ -14681,7 +14802,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove an active but expired gilt. Reserved funds under gilt are freed and balance is", " adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion", " of effective total issued funds.", @@ -14700,7 +14821,7 @@ "BalanceOf", "u32" ], - "documentation": [ + "docs": [ " A bid was successfully placed.", " \\[ who, amount, duration \\]" ] @@ -14712,7 +14833,7 @@ "BalanceOf", "u32" ], - "documentation": [ + "docs": [ " A bid was successfully removed (before being accepted as a gilt).", " \\[ who, amount, duration \\]" ] @@ -14725,7 +14846,7 @@ "AccountId", "BalanceOf" ], - "documentation": [ + "docs": [ " A bid was accepted as a gilt. The balance may not be released until expiry.", " \\[ index, expiry, who, amount \\]" ] @@ -14738,18 +14859,27 @@ "BalanceOf", "BalanceOf" ], - "documentation": [ + "docs": [ " An expired gilt has been thawed.", " \\[ index, who, original_amount, additional_amount \\]" ] } ], "constants": [ + { + "name": "IgnoredIssuance", + "type": "BalanceOf", + "value": "0x00000000000000000000000000000000", + "docs": [ + " The issuance to ignore. This is subtracted from the `Currency`'s `total_issuance` to get", + " the issuance by which we inflate or deflate the gilt." + ] + }, { "name": "QueueCount", "type": "u32", "value": "0x2c010000", - "documentation": [ + "docs": [ " Number of duration queues in total. This sets the maximum duration supported, which is", " this value multiplied by `Period`." ] @@ -14758,7 +14888,7 @@ "name": "MaxQueueLen", "type": "u32", "value": "0xe8030000", - "documentation": [ + "docs": [ " Maximum number of items that may be in each duration queue." ] }, @@ -14766,7 +14896,7 @@ "name": "FifoQueueLen", "type": "u32", "value": "0xf4010000", - "documentation": [ + "docs": [ " Portion of the queue which is free from ordering and just a FIFO.", "", " Must be no greater than `MaxQueueLen`." @@ -14776,7 +14906,7 @@ "name": "Period", "type": "BlockNumber", "value": "0x002f0d00", - "documentation": [ + "docs": [ " The base period for the duration queues. This is the common multiple across all", " supported freezing durations that can be bid upon." ] @@ -14785,7 +14915,7 @@ "name": "MinFreeze", "type": "BalanceOf", "value": "0x0000c16ff28623000000000000000000", - "documentation": [ + "docs": [ " The minimum amount of funds that may be offered to freeze for a gilt. Note that this", " does not actually limit the amount which may be frozen in a gilt since gilts may be", " split up in order to satisfy the desired amount of funds under gilts.", @@ -14798,7 +14928,7 @@ "name": "IntakePeriod", "type": "BlockNumber", "value": "0x0a000000", - "documentation": [ + "docs": [ " The number of blocks between consecutive attempts to issue more gilts in an effort to", " get to the target amount to be frozen.", "", @@ -14810,7 +14940,7 @@ "name": "MaxIntakeBids", "type": "u32", "value": "0x0a000000", - "documentation": [ + "docs": [ " The maximum amount of bids that can be turned into issued gilts each block. A larger", " value here means less of the block available for transactions should there be a glut of", " bids to make into gilts to reach the target." @@ -14820,50 +14950,50 @@ "errors": [ { "name": "DurationTooSmall", - "documentation": [ + "docs": [ " The duration of the bid is less than one." ] }, { "name": "DurationTooBig", - "documentation": [ + "docs": [ " The duration is the bid is greater than the number of queues." ] }, { "name": "AmountTooSmall", - "documentation": [ + "docs": [ " The amount of the bid is less than the minimum allowed." ] }, { "name": "BidTooLow", - "documentation": [ + "docs": [ " The queue for the bid's duration is full and the amount bid is too low to get in through", " replacing an existing bid." ] }, { "name": "Unknown", - "documentation": [ + "docs": [ " Gilt index is unknown." ] }, { "name": "NotOwner", - "documentation": [ + "docs": [ " Not the owner of the gilt." ] }, { "name": "NotExpired", - "documentation": [ + "docs": [ " Gilt not yet at expiry date." ] }, { "name": "NotFound", - "documentation": [ + "docs": [ " The given bid for retraction is not found." ] } @@ -14887,7 +15017,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Details of an asset class." ] }, @@ -14910,7 +15040,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The assets held by any given account; set out this way so that assets owned by a single", " account can be enumerated." ] @@ -14928,7 +15058,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The assets in existence and their ownership details." ] }, @@ -14944,7 +15074,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Metadata of an asset class." ] }, @@ -14961,7 +15091,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Metadata of an asset instance." ] }, @@ -14984,7 +15114,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Metadata of an asset class." ] } @@ -15003,7 +15133,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Issue a new class of non-fungible assets from a public origin.", "", " This new asset class has no assets initially and its owner is the origin.", @@ -15038,7 +15168,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Issue a new class of non-fungible assets from a privileged origin.", "", " This new asset class has no assets initially.", @@ -15069,7 +15199,7 @@ "type": "DestroyWitness" } ], - "documentation": [ + "docs": [ " Destroy a class of fungible assets.", "", " The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the", @@ -15103,7 +15233,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Mint an asset instance of a particular class.", "", " The origin must be Signed and the sender must be the Issuer of the asset `class`.", @@ -15133,7 +15263,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Destroy a single asset instance.", "", " Origin must be Signed and the sender should be the Admin of the asset `class`.", @@ -15165,7 +15295,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Move an asset from the sender account to another.", "", " Origin must be Signed and the signing account must be either:", @@ -15195,7 +15325,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Reevaluate the deposits on some assets.", "", " Origin must be Signed and the sender should be the Owner of the asset `class`.", @@ -15227,7 +15357,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Disallow further unprivileged transfer of an asset instance.", "", " Origin must be Signed and the sender should be the Freezer of the asset `class`.", @@ -15252,7 +15382,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Re-allow unprivileged transfer of an asset instance.", "", " Origin must be Signed and the sender should be the Freezer of the asset `class`.", @@ -15273,7 +15403,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Disallow further unprivileged transfers for a whole asset class.", "", " Origin must be Signed and the sender should be the Freezer of the asset `class`.", @@ -15293,7 +15423,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Re-allow unprivileged transfers for a whole asset class.", "", " Origin must be Signed and the sender should be the Admin of the asset `class`.", @@ -15317,7 +15447,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Change the Owner of an asset class.", "", " Origin must be Signed and the sender should be the Owner of the asset `class`.", @@ -15350,7 +15480,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Change the Issuer, Admin and Freezer of an asset class.", "", " Origin must be Signed and the sender should be the Owner of the asset `class`.", @@ -15381,7 +15511,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Approve an instance to be transferred by a delegated third-party account.", "", " Origin must be Signed and must be the owner of the asset `instance`.", @@ -15411,7 +15541,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Cancel the prior approval for the transfer of an asset by a delegate.", "", " Origin must be either:", @@ -15462,7 +15592,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Alter the attributes of a given asset.", "", " Origin must be `ForceOrigin`.", @@ -15502,7 +15632,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set an attribute for an asset class or instance.", "", " Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", @@ -15538,7 +15668,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set an attribute for an asset class or instance.", "", " Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", @@ -15578,7 +15708,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Set the metadata for an asset instance.", "", " Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", @@ -15610,7 +15740,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Clear the metadata for an asset instance.", "", " Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", @@ -15642,7 +15772,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " Set the metadata for an asset class.", "", " Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of", @@ -15669,7 +15799,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Clear the metadata for an asset class.", "", " Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of", @@ -15693,7 +15823,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An asset class was created. \\[ class, creator, owner \\]" ] }, @@ -15703,7 +15833,7 @@ "ClassId", "AccountId" ], - "documentation": [ + "docs": [ " An asset class was force-created. \\[ class, owner \\]" ] }, @@ -15712,7 +15842,7 @@ "args": [ "ClassId" ], - "documentation": [ + "docs": [ " An asset `class` was destroyed. \\[ class \\]" ] }, @@ -15723,7 +15853,7 @@ "InstanceId", "AccountId" ], - "documentation": [ + "docs": [ " An asset `instace` was issued. \\[ class, instance, owner \\]" ] }, @@ -15735,7 +15865,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An asset `instace` was transferred. \\[ class, instance, from, to \\]" ] }, @@ -15746,7 +15876,7 @@ "InstanceId", "AccountId" ], - "documentation": [ + "docs": [ " An asset `instance` was destroyed. \\[ class, instance, owner \\]" ] }, @@ -15756,7 +15886,7 @@ "ClassId", "InstanceId" ], - "documentation": [ + "docs": [ " Some asset `instance` was frozen. \\[ class, instance \\]" ] }, @@ -15766,7 +15896,7 @@ "ClassId", "InstanceId" ], - "documentation": [ + "docs": [ " Some asset `instance` was thawed. \\[ class, instance \\]" ] }, @@ -15775,7 +15905,7 @@ "args": [ "ClassId" ], - "documentation": [ + "docs": [ " Some asset `class` was frozen. \\[ class \\]" ] }, @@ -15784,7 +15914,7 @@ "args": [ "ClassId" ], - "documentation": [ + "docs": [ " Some asset `class` was thawed. \\[ class \\]" ] }, @@ -15794,7 +15924,7 @@ "ClassId", "AccountId" ], - "documentation": [ + "docs": [ " The owner changed \\[ class, new_owner \\]" ] }, @@ -15806,7 +15936,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " The management team changed \\[ class, issuer, admin, freezer \\]" ] }, @@ -15818,7 +15948,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An `instance` of an asset `class` has been approved by the `owner` for transfer by a", " `delegate`.", " \\[ class, instance, owner, delegate \\]" @@ -15832,7 +15962,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An approval for a `delegate` account to transfer the `instance` of an asset `class` was", " cancelled by its `owner`.", " \\[ class, instance, owner, delegate \\]" @@ -15843,7 +15973,7 @@ "args": [ "ClassId" ], - "documentation": [ + "docs": [ " An asset `class` has had its attributes changed by the `Force` origin.", " \\[ class \\]" ] @@ -15855,7 +15985,7 @@ "Bytes", "bool" ], - "documentation": [ + "docs": [ " New metadata has been set for an asset class. \\[ class, data, is_frozen \\]" ] }, @@ -15864,7 +15994,7 @@ "args": [ "ClassId" ], - "documentation": [ + "docs": [ " Metadata has been cleared for an asset class. \\[ class \\]" ] }, @@ -15876,7 +16006,7 @@ "Bytes", "bool" ], - "documentation": [ + "docs": [ " New metadata has been set for an asset instance.", " \\[ class, instance, data, is_frozen \\]" ] @@ -15887,7 +16017,7 @@ "ClassId", "InstanceId" ], - "documentation": [ + "docs": [ " Metadata has been cleared for an asset instance. \\[ class, instance \\]" ] }, @@ -15897,7 +16027,7 @@ "ClassId", "Vec" ], - "documentation": [ + "docs": [ " Metadata has been cleared for an asset instance. \\[ class, successful_instances \\]" ] }, @@ -15909,7 +16039,7 @@ "Bytes", "Bytes" ], - "documentation": [ + "docs": [ " New attribute metadata has been set for an asset class or instance.", " \\[ class, maybe_instance, key, value \\]" ] @@ -15921,71 +16051,137 @@ "Option", "Bytes" ], - "documentation": [ + "docs": [ " Attribute metadata has been cleared for an asset class or instance.", " \\[ class, maybe_instance, key, maybe_value \\]" ] } ], - "constants": [], + "constants": [ + { + "name": "ClassDeposit", + "type": "DepositBalanceOf", + "value": "0x0000c16ff28623000000000000000000", + "docs": [ + " The basic amount of funds that must be reserved for an asset class." + ] + }, + { + "name": "InstanceDeposit", + "type": "DepositBalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "docs": [ + " The basic amount of funds that must be reserved for an asset instance." + ] + }, + { + "name": "MetadataDepositBase", + "type": "DepositBalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "docs": [ + " The basic amount of funds that must be reserved when adding metadata to your asset." + ] + }, + { + "name": "AttributeDepositBase", + "type": "DepositBalanceOf", + "value": "0x0080c6a47e8d03000000000000000000", + "docs": [ + " The basic amount of funds that must be reserved when adding an attribute to an asset." + ] + }, + { + "name": "DepositPerByte", + "type": "DepositBalanceOf", + "value": "0x00407a10f35a00000000000000000000", + "docs": [ + " The additional funds that must be reserved for the number of bytes store in metadata,", + " either \"normal\" metadata or attribute metadata." + ] + }, + { + "name": "StringLimit", + "type": "u32", + "value": "0x32000000", + "docs": [ + " The maximum length of data stored on-chain." + ] + }, + { + "name": "KeyLimit", + "type": "u32", + "value": "0x20000000", + "docs": [ + " The maximum length of an attribute key." + ] + }, + { + "name": "ValueLimit", + "type": "u32", + "value": "0x00010000", + "docs": [ + " The maximum length of an attribute value." + ] + } + ], "errors": [ { "name": "NoPermission", - "documentation": [ + "docs": [ " The signing account has no permission to do the operation." ] }, { "name": "Unknown", - "documentation": [ + "docs": [ " The given asset ID is unknown." ] }, { "name": "AlreadyExists", - "documentation": [ + "docs": [ " The asset instance ID has already been used for an asset." ] }, { "name": "WrongOwner", - "documentation": [ + "docs": [ " The owner turned out to be different to what was expected." ] }, { "name": "BadWitness", - "documentation": [ + "docs": [ " Invalid witness data given." ] }, { "name": "InUse", - "documentation": [ + "docs": [ " The asset ID is already taken." ] }, { "name": "Frozen", - "documentation": [ + "docs": [ " The asset instance or class is frozen." ] }, { "name": "WrongDelegate", - "documentation": [ + "docs": [ " The delegate turned out to be different to what was expected." ] }, { "name": "NoDelegate", - "documentation": [ + "docs": [ " There is no delegate approved." ] }, { "name": "Unapproved", - "documentation": [ + "docs": [ " No approval exists that would allow the transfer." ] } @@ -16009,7 +16205,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Collection of transaction metadata by block number." ] }, @@ -16025,7 +16221,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Count indexed chunks for each block." ] }, @@ -16036,7 +16232,7 @@ "plain": "BalanceOf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage fee per byte." ] }, @@ -16047,7 +16243,7 @@ "plain": "BalanceOf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Storage fee per transaction." ] }, @@ -16058,7 +16254,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Maximum data set in a single transaction in bytes." ] }, @@ -16069,7 +16265,7 @@ "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Maximum number of indexed transactions in the block." ] }, @@ -16080,7 +16276,7 @@ "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Storage period for data in blocks. Should match `sp_storage_proof::DEFAULT_STORAGE_PERIOD`", " for block authoring." ] @@ -16092,7 +16288,7 @@ "plain": "Vec" }, "fallback": "0x00", - "documentation": [] + "docs": [] }, { "name": "ProofChecked", @@ -16101,7 +16297,7 @@ "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Was the proof checked in this block?" ] } @@ -16116,7 +16312,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Index and store data on chain. Minimum data size is 1 bytes, maximum is `MaxTransactionSize`.", " Data will be removed after `STORAGE_PERIOD` blocks, unless `renew` is called.", " # ", @@ -16137,7 +16333,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Renew previously stored data. Parameters are the block number that contains", " previous `store` or `renew` call and transaction index within that block.", " Transaction index is emitted in the `Stored` or `Renewed` event.", @@ -16155,7 +16351,7 @@ "type": "TransactionStorageProof" } ], - "documentation": [ + "docs": [ " Check storage proof for block number `block_number() - StoragePeriod`.", " If such block does not exist the proof is expected to be `None`.", " # ", @@ -16172,7 +16368,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " Stored data under specified index." ] }, @@ -16181,14 +16377,14 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " Renewed data under specified index." ] }, { "name": "ProofChecked", "args": [], - "documentation": [ + "docs": [ " Storage proof was successfully checked." ] } @@ -16197,79 +16393,79 @@ "errors": [ { "name": "InsufficientFunds", - "documentation": [ + "docs": [ " Insufficient account balance." ] }, { "name": "NotConfigured", - "documentation": [ + "docs": [ " Invalid configuration." ] }, { "name": "RenewedNotFound", - "documentation": [ + "docs": [ " Renewed extrinsic is not found." ] }, { "name": "EmptyTransaction", - "documentation": [ + "docs": [ " Attempting to store empty transaction" ] }, { "name": "UnexpectedProof", - "documentation": [ + "docs": [ " Proof was not expected in this block." ] }, { "name": "InvalidProof", - "documentation": [ + "docs": [ " Proof failed verification." ] }, { "name": "MissingProof", - "documentation": [ + "docs": [ " Missing storage proof." ] }, { "name": "MissingStateData", - "documentation": [ + "docs": [ " Unable to verify proof becasue state data is missing." ] }, { "name": "DoubleCheck", - "documentation": [ + "docs": [ " Double proof check in the block." ] }, { "name": "ProofNotChecked", - "documentation": [ + "docs": [ " Storage proof was not checked in the block." ] }, { "name": "TransactionTooLarge", - "documentation": [ + "docs": [ " Transaction is too large." ] }, { "name": "TooManyTransactions", - "documentation": [ + "docs": [ " Too many transactions in the block." ] }, { "name": "BadContext", - "documentation": [ + "docs": [ " Attempted to call `store` outside of block execution." ] } @@ -16291,4 +16487,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/polkadot/tests/meta/v9.json b/packages/polkadot/tests/meta/v9.json index b3986785..d58dc108 100644 --- a/packages/polkadot/tests/meta/v9.json +++ b/packages/polkadot/tests/meta/v9.json @@ -1,7 +1,7 @@ { "magicNumber": 1635018093, "metadata": { - "V9": { + "v9": { "modules": [ { "name": "System", @@ -12,7 +12,7 @@ "name": "AccountNonce", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Index", @@ -20,7 +20,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Extrinsics nonce for accounts." ] }, @@ -28,10 +28,10 @@ "name": "ExtrinsicCount", "modifier": "Optional", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total extrinsics count for the current block." ] }, @@ -39,10 +39,10 @@ "name": "AllExtrinsicsWeight", "modifier": "Optional", "type": { - "Plain": "Weight" + "plain": "Weight" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total weight for all extrinsics put together, for the current block." ] }, @@ -50,10 +50,10 @@ "name": "AllExtrinsicsLen", "modifier": "Optional", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Total length (in bytes) for all extrinsics put together, for the current block." ] }, @@ -61,7 +61,7 @@ "name": "BlockHash", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "BlockNumber", "value": "Hash", @@ -69,7 +69,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Map of block numbers to block hashes." ] }, @@ -77,7 +77,7 @@ "name": "ExtrinsicData", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "u32", "value": "Bytes", @@ -85,7 +85,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Extrinsics data for the current block (maps an extrinsic's index to its data)." ] }, @@ -93,10 +93,10 @@ "name": "Number", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The current block number being processed. Set by `execute_block`." ] }, @@ -104,10 +104,10 @@ "name": "ParentHash", "modifier": "Default", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Hash of the previous block." ] }, @@ -115,10 +115,10 @@ "name": "ExtrinsicsRoot", "modifier": "Default", "type": { - "Plain": "Hash" + "plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Extrinsics root of the current block, also part of the block header." ] }, @@ -126,10 +126,10 @@ "name": "Digest", "modifier": "Default", "type": { - "Plain": "DigestOf" + "plain": "DigestOf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Digest of the current block, also part of the block header." ] }, @@ -137,10 +137,10 @@ "name": "Events", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Events deposited for the current block." ] }, @@ -148,10 +148,10 @@ "name": "EventCount", "modifier": "Default", "type": { - "Plain": "EventIndex" + "plain": "EventIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of events in the `Events` list." ] }, @@ -159,7 +159,7 @@ "name": "EventTopics", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "()", "key2": "Hash", @@ -168,7 +168,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Mapping between a topic (represented by T::Hash) and a vector of indexes", " of events in the `>` list.", "", @@ -190,7 +190,7 @@ { "name": "fill_block", "args": [], - "documentation": [ + "docs": [ " A big dispatch that will disallow any other transaction to be included." ] }, @@ -202,7 +202,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Make some on-chain remark." ] }, @@ -214,7 +214,7 @@ "type": "u64" } ], - "documentation": [ + "docs": [ " Set the number of pages in the WebAssembly environment's heap." ] }, @@ -226,7 +226,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set the new code." ] }, @@ -238,7 +238,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set some items of storage." ] }, @@ -250,7 +250,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Kill some items from storage." ] }, @@ -262,7 +262,7 @@ "type": "Key" } ], - "documentation": [ + "docs": [ " Kill all storage items with a key that starts with the given prefix." ] } @@ -273,7 +273,7 @@ "args": [ "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic completed successfully." ] }, @@ -283,7 +283,7 @@ "DispatchError", "DispatchInfo" ], - "documentation": [ + "docs": [ " An extrinsic failed." ] } @@ -292,15 +292,15 @@ "errors": [ { "name": "RequireSignedOrigin", - "documentation": [] + "docs": [] }, { "name": "RequireRootOrigin", - "documentation": [] + "docs": [] }, { "name": "RequireNoOrigin", - "documentation": [] + "docs": [] } ] }, @@ -316,7 +316,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Send a batch of dispatch calls (only root)." ] } @@ -327,7 +327,7 @@ "args": [ "Vec>" ], - "documentation": [] + "docs": [] } ], "constants": [], @@ -342,10 +342,10 @@ "name": "EpochIndex", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current epoch index." ] }, @@ -353,10 +353,10 @@ "name": "Authorities", "modifier": "Default", "type": { - "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" + "plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Current epoch authorities." ] }, @@ -364,10 +364,10 @@ "name": "GenesisSlot", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The slot at which the first epoch actually started. This is 0", " until the first block of the chain." ] @@ -376,10 +376,10 @@ "name": "CurrentSlot", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current slot number." ] }, @@ -387,10 +387,10 @@ "name": "Randomness", "modifier": "Default", "type": { - "Plain": "[u8;32]" + "plain": "[u8;32]" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The epoch randomness for the *current* epoch.", "", " # Security", @@ -407,10 +407,10 @@ "name": "NextRandomness", "modifier": "Default", "type": { - "Plain": "[u8;32]" + "plain": "[u8;32]" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Next epoch randomness." ] }, @@ -418,10 +418,10 @@ "name": "SegmentIndex", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Randomness under construction.", "", " We make a tradeoff between storage accesses and list length.", @@ -437,7 +437,7 @@ "name": "UnderConstruction", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "u32", "value": "Vec<[u8;32]>", @@ -445,16 +445,16 @@ } }, "fallback": "0x00", - "documentation": [] + "docs": [] }, { "name": "Initialized", "modifier": "Optional", "type": { - "Plain": "MaybeVrf" + "plain": "MaybeVrf" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Temporary value (cleared at block finalization) which is `Some`", " if per-block initialization has already been called for current block." ] @@ -468,7 +468,7 @@ "name": "EpochDuration", "type": "u64", "value": "0xc800000000000000", - "documentation": [ + "docs": [ " The number of **slots** that an epoch takes. We couple sessions to", " epochs, i.e. we start a new session once the new epoch begins." ] @@ -477,7 +477,7 @@ "name": "ExpectedBlockTime", "type": "Moment", "value": "0xb80b000000000000", - "documentation": [ + "docs": [ " The expected average block time at which BABE should be creating", " blocks. Since BABE is probabilistic it is not trivial to figure out", " what the expected average block time should be based on the slot", @@ -497,10 +497,10 @@ "name": "Now", "modifier": "Default", "type": { - "Plain": "Moment" + "plain": "Moment" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Current time for the current block." ] }, @@ -508,10 +508,10 @@ "name": "DidUpdate", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Did the timestamp get updated in this block?" ] } @@ -526,7 +526,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the current time.", "", " This call should be invoked exactly once per block. It will panic at the finalization", @@ -545,7 +545,7 @@ "name": "MinimumPeriod", "type": "Moment", "value": "0xdc05000000000000", - "documentation": [ + "docs": [ " The minimum period between blocks. Beware that this is different to the *expected* period", " that the block production apparatus provides. Your chosen consensus system will generally", " work with this to determine a sensible block time. e.g. For Aura, it will be double this", @@ -564,10 +564,10 @@ "name": "Uncles", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Uncles" ] }, @@ -575,10 +575,10 @@ "name": "Author", "modifier": "Optional", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Author of current block." ] }, @@ -586,10 +586,10 @@ "name": "DidSetUncles", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Whether uncles were already set in this block." ] } @@ -604,7 +604,7 @@ "type": "Vec
" } ], - "documentation": [ + "docs": [ " Provide a set of uncles." ] } @@ -622,10 +622,10 @@ "name": "NextEnumSet", "modifier": "Default", "type": { - "Plain": "AccountIndex" + "plain": "AccountIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The next free enumeration set." ] }, @@ -633,7 +633,7 @@ "name": "EnumSet", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountIndex", "value": "Vec", @@ -641,7 +641,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The enumeration sets." ] } @@ -655,7 +655,7 @@ "AccountId", "AccountIndex" ], - "documentation": [ + "docs": [ " A new account index was assigned.", "", " This event is not triggered when an existing index is reassigned", @@ -675,10 +675,10 @@ "name": "TotalIssuance", "modifier": "Default", "type": { - "Plain": "Balance" + "plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The total units issued in the system." ] }, @@ -686,7 +686,7 @@ "name": "Vesting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "VestingSchedule", @@ -694,7 +694,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information regarding the vesting of a given account." ] }, @@ -702,7 +702,7 @@ "name": "FreeBalance", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Balance", @@ -710,7 +710,7 @@ } }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The 'free' balance of a given account.", "", " This is the only balance that matters in terms of most operations on tokens. It", @@ -728,7 +728,7 @@ "name": "ReservedBalance", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Balance", @@ -736,7 +736,7 @@ } }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The amount of the balance of a given account that is externally reserved; this can still get", " slashed, but gets slashed last of all.", "", @@ -754,7 +754,7 @@ "name": "Locks", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Vec", @@ -762,7 +762,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any liquidity locks on some account balances." ] } @@ -781,7 +781,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Transfer some liquid free balance to another account.", "", " `transfer` will set the `FreeBalance` of the sender and receiver.", @@ -825,7 +825,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Set the balances of a given account.", "", " This will alter `FreeBalance` and `ReservedBalance` in storage. it will", @@ -857,7 +857,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Exactly as `transfer`, except the origin must be root and the source account may be", " specified." ] @@ -874,7 +874,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Same as the [`transfer`] call, but with a check that the transfer will not kill the", " origin account.", "", @@ -891,7 +891,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A new account was created." ] }, @@ -900,7 +900,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An account was reaped." ] }, @@ -912,7 +912,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " Transfer succeeded (from, to, value, fees)." ] } @@ -922,7 +922,7 @@ "name": "ExistentialDeposit", "type": "Balance", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The minimum amount required to keep an account open." ] }, @@ -930,7 +930,7 @@ "name": "TransferFee", "type": "Balance", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to make a transfer." ] }, @@ -938,7 +938,7 @@ "name": "CreationFee", "type": "Balance", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to create an account." ] } @@ -954,10 +954,10 @@ "name": "NextFeeMultiplier", "modifier": "Default", "type": { - "Plain": "Multiplier" + "plain": "Multiplier" }, "fallback": "0x0000000000000000", - "documentation": [] + "docs": [] } ] }, @@ -968,7 +968,7 @@ "name": "TransactionBaseFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the base." ] }, @@ -976,7 +976,7 @@ "name": "TransactionByteFee", "type": "BalanceOf", "value": "0x00e40b54020000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the per-byte portion." ] } @@ -992,10 +992,10 @@ "name": "ValidatorCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The ideal number of staking participants." ] }, @@ -1003,10 +1003,10 @@ "name": "MinimumValidatorCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x04000000", - "documentation": [ + "docs": [ " Minimum number of staking participants before emergency conditions are imposed." ] }, @@ -1014,10 +1014,10 @@ "name": "Invulnerables", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", " easy to initialize and the performance hit is minimal (we expect no more than four", " invulnerables) and restricted to testnets." @@ -1027,7 +1027,7 @@ "name": "Bonded", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "AccountId", @@ -1035,7 +1035,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all locked \"stash\" accounts to the controller account." ] }, @@ -1043,7 +1043,7 @@ "name": "Ledger", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "StakingLedger", @@ -1051,7 +1051,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." ] }, @@ -1059,7 +1059,7 @@ "name": "Payee", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "RewardDestination", @@ -1067,7 +1067,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Where the reward payment should be made. Keyed by stash." ] }, @@ -1075,7 +1075,7 @@ "name": "Validators", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "ValidatorPrefs", @@ -1083,7 +1083,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The map from (wannabe) validator stash key to the preferences of that validator." ] }, @@ -1091,7 +1091,7 @@ "name": "Nominators", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Nominations", @@ -1099,7 +1099,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The map from nominator stash key to the set of stash keys of all validators to nominate.", "", " NOTE: is private so that we can ensure upgraded before all typical accesses.", @@ -1110,7 +1110,7 @@ "name": "Stakers", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Exposure", @@ -1118,7 +1118,7 @@ } }, "fallback": "0x000000", - "documentation": [ + "docs": [ " Nominators for a particular account that is in action right now. You can't iterate", " through validators here, but you can find them in the Session module.", "", @@ -1129,10 +1129,10 @@ "name": "CurrentElected", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The currently elected validator set keyed by stash account ID." ] }, @@ -1140,10 +1140,10 @@ "name": "CurrentEra", "modifier": "Default", "type": { - "Plain": "EraIndex" + "plain": "EraIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The current era index." ] }, @@ -1151,10 +1151,10 @@ "name": "CurrentEraStart", "modifier": "Default", "type": { - "Plain": "MomentOf" + "plain": "MomentOf" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The start of the current era." ] }, @@ -1162,10 +1162,10 @@ "name": "CurrentEraStartSessionIndex", "modifier": "Default", "type": { - "Plain": "SessionIndex" + "plain": "SessionIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The session index at which the current era started." ] }, @@ -1173,10 +1173,10 @@ "name": "CurrentEraPointsEarned", "modifier": "Default", "type": { - "Plain": "EraPoints" + "plain": "EraPoints" }, "fallback": "0x0000000000", - "documentation": [ + "docs": [ " Rewards for the current era. Using indices of current elected set." ] }, @@ -1184,10 +1184,10 @@ "name": "SlotStake", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The amount of balance actively at stake for each validator slot, currently.", "", " This is used to derive rewards and punishments." @@ -1197,10 +1197,10 @@ "name": "ForceEra", "modifier": "Default", "type": { - "Plain": "Forcing" + "plain": "Forcing" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the next session change will be a new era regardless of index." ] }, @@ -1208,10 +1208,10 @@ "name": "SlashRewardFraction", "modifier": "Default", "type": { - "Plain": "Perbill" + "plain": "Perbill" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The percentage of the slash that is distributed to reporters.", "", " The rest of the slashed value is handled by the `Slash`." @@ -1221,10 +1221,10 @@ "name": "CanceledSlashPayout", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " The amount of currency given to reporters of a slash event which was", " canceled by extraordinary circumstances (e.g. governance)." ] @@ -1233,7 +1233,7 @@ "name": "UnappliedSlashes", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "EraIndex", "value": "Vec", @@ -1241,7 +1241,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All unapplied slashes that are queued for later." ] }, @@ -1249,10 +1249,10 @@ "name": "BondedEras", "modifier": "Default", "type": { - "Plain": "Vec<(EraIndex,SessionIndex)>" + "plain": "Vec<(EraIndex,SessionIndex)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from still-bonded eras to the first session index of that era." ] }, @@ -1260,7 +1260,7 @@ "name": "ValidatorSlashInEra", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "EraIndex", "key2": "AccountId", @@ -1269,7 +1269,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on validators, mapped by era to the highest slash proportion", " and slash value of the era." ] @@ -1278,7 +1278,7 @@ "name": "NominatorSlashInEra", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "EraIndex", "key2": "AccountId", @@ -1287,7 +1287,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " All slashing events on nominators, mapped by era to the highest slash value of the era." ] }, @@ -1295,7 +1295,7 @@ "name": "SlashingSpans", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "SlashingSpans", @@ -1303,7 +1303,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Slashing spans for stash accounts." ] }, @@ -1311,7 +1311,7 @@ "name": "SpanSlash", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "(AccountId,SpanIndex)", "value": "SpanRecord", @@ -1319,7 +1319,7 @@ } }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Records information about the maximum slash of a stash within a slashing span,", " as well as how much reward has been paid out." ] @@ -1328,10 +1328,10 @@ "name": "EarliestUnappliedSlash", "modifier": "Optional", "type": { - "Plain": "EraIndex" + "plain": "EraIndex" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The earliest era for which we have a pending, unapplied slash." ] }, @@ -1339,10 +1339,10 @@ "name": "StorageVersion", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The version of storage for upgrade." ] } @@ -1365,7 +1365,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " Take the origin account as a stash and lock up `value` of its balance. `controller` will", " be the account that controls it.", "", @@ -1391,7 +1391,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Add some extra amount that have appeared in the stash `free_balance` into the balance up", " for staking.", "", @@ -1416,7 +1416,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Schedule a portion of the stash to be unlocked ready for transfer out after the bond", " period ends. If this leaves an amount actively bonded less than", " T::Currency::minimum_balance(), then it is increased to the full amount.", @@ -1445,7 +1445,7 @@ { "name": "withdraw_unbonded", "args": [], - "documentation": [ + "docs": [ " Remove any unlocked chunks from the `unlocking` queue from our management.", "", " This essentially frees up that balance to be used by the stash account to do", @@ -1472,7 +1472,7 @@ "type": "ValidatorPrefs" } ], - "documentation": [ + "docs": [ " Declare the desire to validate for the origin controller.", "", " Effects will be felt at the beginning of the next era.", @@ -1494,7 +1494,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Declare the desire to nominate `targets` for the origin controller.", "", " Effects will be felt at the beginning of the next era.", @@ -1511,7 +1511,7 @@ { "name": "chill", "args": [], - "documentation": [ + "docs": [ " Declare no desire to either validate or nominate.", "", " Effects will be felt at the beginning of the next era.", @@ -1533,7 +1533,7 @@ "type": "RewardDestination" } ], - "documentation": [ + "docs": [ " (Re-)set the payment target for a controller.", "", " Effects will be felt at the beginning of the next era.", @@ -1555,7 +1555,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " (Re-)set the controller of a stash.", "", " Effects will be felt at the beginning of the next era.", @@ -1577,14 +1577,14 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " The ideal number of validators." ] }, { "name": "force_no_eras", "args": [], - "documentation": [ + "docs": [ " Force there to be no new eras indefinitely.", "", " # ", @@ -1595,7 +1595,7 @@ { "name": "force_new_era", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of the next session. After this, it will be", " reset to normal (non-forced) behaviour.", "", @@ -1612,7 +1612,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set the validators who cannot be slashed (if any)." ] }, @@ -1624,14 +1624,14 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Force a current staker to become completely unstaked, immediately." ] }, { "name": "force_new_era_always", "args": [], - "documentation": [ + "docs": [ " Force there to be a new era at the end of sessions indefinitely.", "", " # ", @@ -1651,7 +1651,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Cancel enactment of a deferred slash. Can be called by either the root origin or", " the `T::SlashCancelOrigin`.", " passing the era and indices of the slashes for that era to kill.", @@ -1669,7 +1669,7 @@ "Balance", "Balance" ], - "documentation": [ + "docs": [ " All validators have been rewarded by the first balance; the second is the remainder", " from the maximum amount of reward." ] @@ -1680,7 +1680,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " One validator (and its nominators) has been slashed by the given amount." ] }, @@ -1689,7 +1689,7 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " An old slashing report from a prior era was discarded because it could", " not be processed." ] @@ -1700,7 +1700,7 @@ "name": "SessionsPerEra", "type": "SessionIndex", "value": "0x06000000", - "documentation": [ + "docs": [ " Number of sessions per era." ] }, @@ -1708,7 +1708,7 @@ "name": "BondingDuration", "type": "EraIndex", "value": "0xa0020000", - "documentation": [ + "docs": [ " Number of eras that staked funds must remain bonded for." ] } @@ -1724,10 +1724,10 @@ "name": "Validators", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of validators." ] }, @@ -1735,10 +1735,10 @@ "name": "CurrentIndex", "modifier": "Default", "type": { - "Plain": "SessionIndex" + "plain": "SessionIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Current index of the session." ] }, @@ -1746,10 +1746,10 @@ "name": "QueuedChanged", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the underlying economic identities or weighting behind the validators", " has changed in the queued validator set." ] @@ -1758,10 +1758,10 @@ "name": "QueuedKeys", "modifier": "Default", "type": { - "Plain": "Vec<(ValidatorId,Keys)>" + "plain": "Vec<(ValidatorId,Keys)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The queued keys for the next session. When the next session begins, these keys", " will be used to determine the validator's session keys." ] @@ -1770,10 +1770,10 @@ "name": "DisabledValidators", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Indices of disabled validators.", "", " The set is cleared when `on_session_ending` returns a new set of identities." @@ -1783,7 +1783,7 @@ "name": "NextKeys", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "Bytes", "key2": "ValidatorId", @@ -1792,7 +1792,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The next session keys for a validator.", "", " The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of", @@ -1803,7 +1803,7 @@ "name": "KeyOwner", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Twox64Concat", "key1": "Bytes", "key2": "(KeyTypeId,Bytes)", @@ -1812,7 +1812,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The owner of a key. The second key is the `KeyTypeId` + the encoded key.", "", " The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of", @@ -1834,7 +1834,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Sets the session key(s) of the function caller to `key`.", " Allows an account to set its session key prior to becoming a validator.", " This doesn't take effect until the next session.", @@ -1854,7 +1854,7 @@ "args": [ "SessionIndex" ], - "documentation": [ + "docs": [ " New session has happened. Note that the argument is the session index, not the block", " number as the type might suggest." ] @@ -1865,7 +1865,7 @@ "name": "DEDUP_KEY_PREFIX", "type": "Bytes", "value": "0x343a73657373696f6e3a6b657973", - "documentation": [ + "docs": [ " Used as first key for `NextKeys` and `KeyOwner` to put all the data into the same branch", " of the trie." ] @@ -1882,10 +1882,10 @@ "name": "PublicPropCount", "modifier": "Default", "type": { - "Plain": "PropIndex" + "plain": "PropIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The number of (public) proposals that have been made so far." ] }, @@ -1893,10 +1893,10 @@ "name": "PublicProps", "modifier": "Default", "type": { - "Plain": "Vec<(PropIndex,Hash,AccountId)>" + "plain": "Vec<(PropIndex,Hash,AccountId)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The public proposals. Unsorted. The second item is the proposal's hash." ] }, @@ -1904,7 +1904,7 @@ "name": "Preimages", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "(Bytes,AccountId,BalanceOf,BlockNumber)", @@ -1912,7 +1912,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Map of hashes to the proposal preimage, along with who registered it and their deposit.", " The block number is the block at which it was deposited." ] @@ -1921,7 +1921,7 @@ "name": "DepositOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "PropIndex", "value": "(BalanceOf,Vec)", @@ -1929,7 +1929,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Those who have locked a deposit." ] }, @@ -1937,10 +1937,10 @@ "name": "ReferendumCount", "modifier": "Default", "type": { - "Plain": "ReferendumIndex" + "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The next free referendum index, aka the number of referenda started so far." ] }, @@ -1948,10 +1948,10 @@ "name": "NextTally", "modifier": "Default", "type": { - "Plain": "ReferendumIndex" + "plain": "ReferendumIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The next referendum index that should be tallied." ] }, @@ -1959,7 +1959,7 @@ "name": "ReferendumInfoOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "ReferendumIndex", "value": "ReferendumInfo", @@ -1967,7 +1967,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Information concerning any given referendum." ] }, @@ -1975,7 +1975,7 @@ "name": "DispatchQueue", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Twox64Concat", "key": "BlockNumber", "value": "Vec>", @@ -1983,7 +1983,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Queue of successful referenda to be dispatched." ] }, @@ -1991,7 +1991,7 @@ "name": "VotersFor", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "ReferendumIndex", "value": "Vec", @@ -1999,7 +1999,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Get the voters for the current proposal." ] }, @@ -2007,7 +2007,7 @@ "name": "VoteOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "(ReferendumIndex,AccountId)", "value": "Vote", @@ -2015,7 +2015,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Get the vote in a given referendum of a particular voter. The result is meaningful only", " if `voters_for` includes the voter when called with the referendum (you'll get the", " default `Vote` value otherwise). If you don't want to check `voters_for`, then you can", @@ -2026,7 +2026,7 @@ "name": "Proxy", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "AccountId", @@ -2034,7 +2034,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Who is able to vote for whom. Value is the fund-holding account, key is the", " vote-transaction-sending account." ] @@ -2043,7 +2043,7 @@ "name": "Delegations", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "(AccountId,Conviction)", @@ -2051,7 +2051,7 @@ } }, "fallback": "0x000000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " Get the account (and lock periods) to which another account is delegating vote." ] }, @@ -2059,10 +2059,10 @@ "name": "LastTabledWasExternal", "modifier": "Default", "type": { - "Plain": "bool" + "plain": "bool" }, "fallback": "0x00", - "documentation": [ + "docs": [ " True if the last referendum tabled was submitted externally. False if it was a public", " proposal." ] @@ -2071,10 +2071,10 @@ "name": "NextExternal", "modifier": "Optional", "type": { - "Plain": "(Hash,VoteThreshold)" + "plain": "(Hash,VoteThreshold)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The referendum to be tabled whenever it would be valid to table an external proposal.", " This happens when a referendum needs to be tabled and one of two conditions are met:", " - `LastTabledWasExternal` is `false`; or", @@ -2085,7 +2085,7 @@ "name": "Blacklist", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "(BlockNumber,Vec)", @@ -2093,7 +2093,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A record of who vetoed what. Maps proposal hash to a possible existent block number", " (until when it may not be resubmitted) and who vetoed it." ] @@ -2102,7 +2102,7 @@ "name": "Cancellations", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "bool", @@ -2110,7 +2110,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Record of all proposals that have been subject to emergency cancellation." ] } @@ -2129,7 +2129,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Propose a sensitive action to be taken.", "", " # ", @@ -2146,7 +2146,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Propose a sensitive action to be taken.", "", " # ", @@ -2167,7 +2167,7 @@ "type": "Vote" } ], - "documentation": [ + "docs": [ " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", " otherwise it is a vote to keep the status quo.", "", @@ -2189,7 +2189,7 @@ "type": "Vote" } ], - "documentation": [ + "docs": [ " Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact", " the proposal; otherwise it is a vote to keep the status quo.", "", @@ -2207,7 +2207,7 @@ "type": "ReferendumIndex" } ], - "documentation": [ + "docs": [ " Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", " referendum." ] @@ -2220,7 +2220,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a referendum to be tabled once it is legal to schedule an external", " referendum." ] @@ -2233,7 +2233,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a majority-carries referendum to be tabled next once it is legal to schedule", " an external referendum.", "", @@ -2249,7 +2249,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", " schedule an external referendum.", "", @@ -2273,7 +2273,7 @@ "type": "BlockNumber" } ], - "documentation": [ + "docs": [ " Schedule the currently externally-proposed majority-carries referendum to be tabled", " immediately. If there is no externally-proposed referendum currently, or if there is one", " but it is not a majority-carries referendum then it fails.", @@ -2293,7 +2293,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Veto and blacklist the external proposal hash." ] }, @@ -2305,7 +2305,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Remove a referendum." ] }, @@ -2325,7 +2325,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Cancel a proposal queued for enactment." ] }, @@ -2337,7 +2337,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Specify a proxy. Called by the stash.", "", " # ", @@ -2348,7 +2348,7 @@ { "name": "resign_proxy", "args": [], - "documentation": [ + "docs": [ " Clear the proxy. Called by the proxy.", "", " # ", @@ -2364,7 +2364,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Clear the proxy. Called by the stash.", "", " # ", @@ -2384,7 +2384,7 @@ "type": "Conviction" } ], - "documentation": [ + "docs": [ " Delegate vote.", "", " # ", @@ -2395,7 +2395,7 @@ { "name": "undelegate", "args": [], - "documentation": [ + "docs": [ " Undelegate vote.", "", " # ", @@ -2406,7 +2406,7 @@ { "name": "clear_public_proposals", "args": [], - "documentation": [ + "docs": [ " Veto and blacklist the proposal hash. Must be from Root origin." ] }, @@ -2418,7 +2418,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This doesn't require the proposal to be", " in the dispatch queue but does require a deposit, returned once enacted." ] @@ -2439,7 +2439,7 @@ "type": "u32" } ], - "documentation": [ + "docs": [ " Register the preimage for an upcoming proposal. This requires the proposal to be", " in the dispatch queue. No deposit is needed." ] @@ -2452,7 +2452,7 @@ "type": "Hash" } ], - "documentation": [ + "docs": [ " Remove an expired proposal preimage and collect the deposit." ] } @@ -2464,7 +2464,7 @@ "PropIndex", "Balance" ], - "documentation": [ + "docs": [ " A motion has been proposed by a public account." ] }, @@ -2475,14 +2475,14 @@ "Balance", "Vec" ], - "documentation": [ + "docs": [ " A public proposal has been tabled for referendum vote." ] }, { "name": "ExternalTabled", "args": [], - "documentation": [ + "docs": [ " An external proposal has been tabled." ] }, @@ -2492,7 +2492,7 @@ "ReferendumIndex", "VoteThreshold" ], - "documentation": [ + "docs": [ " A referendum has begun." ] }, @@ -2501,7 +2501,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been approved by referendum." ] }, @@ -2510,7 +2510,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal has been rejected by referendum." ] }, @@ -2519,7 +2519,7 @@ "args": [ "ReferendumIndex" ], - "documentation": [ + "docs": [ " A referendum has been cancelled." ] }, @@ -2529,7 +2529,7 @@ "ReferendumIndex", "bool" ], - "documentation": [ + "docs": [ " A proposal has been enacted." ] }, @@ -2539,7 +2539,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " An account has delegated their vote to another account." ] }, @@ -2548,7 +2548,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " An account has cancelled a previous delegation operation." ] }, @@ -2559,7 +2559,7 @@ "Hash", "BlockNumber" ], - "documentation": [ + "docs": [ " An external proposal has been vetoed." ] }, @@ -2570,7 +2570,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal's preimage was noted, and the deposit taken." ] }, @@ -2581,7 +2581,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A proposal preimage was removed and used (the deposit was returned)." ] }, @@ -2591,7 +2591,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was invalid." ] }, @@ -2601,7 +2601,7 @@ "Hash", "ReferendumIndex" ], - "documentation": [ + "docs": [ " A proposal could not be executed because its preimage was missing." ] }, @@ -2613,7 +2613,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " A registered preimage was removed and the deposit collected by the reaper (last item)." ] } @@ -2623,7 +2623,7 @@ "name": "EnactmentPeriod", "type": "BlockNumber", "value": "0x002f0d00", - "documentation": [ + "docs": [ " The minimum period of locking and the period between a proposal being approved and enacted.", "", " It should generally be a little more than the unstake period to ensure that", @@ -2635,7 +2635,7 @@ "name": "LaunchPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) new public referenda are launched." ] }, @@ -2643,7 +2643,7 @@ "name": "VotingPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " How often (in blocks) to check for new votes." ] }, @@ -2651,7 +2651,7 @@ "name": "MinimumDeposit", "type": "BalanceOf", "value": "0x0000c16ff28623000000000000000000", - "documentation": [ + "docs": [ " The minimum amount to be used as a deposit for a public referendum proposal." ] }, @@ -2659,7 +2659,7 @@ "name": "EmergencyVotingPeriod", "type": "BlockNumber", "value": "0x80510100", - "documentation": [ + "docs": [ " Minimum voting period allowed for an emergency referendum." ] }, @@ -2667,7 +2667,7 @@ "name": "CooloffPeriod", "type": "BlockNumber", "value": "0x004e0c00", - "documentation": [ + "docs": [ " Period in blocks where an external proposal may not be re-submitted after being vetoed." ] }, @@ -2675,7 +2675,7 @@ "name": "PreimageByteDeposit", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The amount of balance that must be deposited per byte of preimage stored." ] } @@ -2691,10 +2691,10 @@ "name": "Proposals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -2702,7 +2702,7 @@ "name": "ProposalOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "Proposal", @@ -2710,7 +2710,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -2718,7 +2718,7 @@ "name": "Voting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "Votes", @@ -2726,7 +2726,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -2734,10 +2734,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -2745,10 +2745,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] } @@ -2763,7 +2763,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set the collective's membership manually to `new_members`. Be nice to the chain and", " provide it pre-sorted.", "", @@ -2778,7 +2778,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective." @@ -2796,7 +2796,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " # ", " - Bounded storage reads and writes.", " - Argument `threshold` has bearing on weight.", @@ -2819,7 +2819,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " # ", " - Bounded storage read and writes.", " - Will be slightly heavier if the proposal is approved / disapproved after the vote.", @@ -2836,7 +2836,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`)." ] @@ -2850,7 +2850,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`)." ] @@ -2860,7 +2860,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold." ] }, @@ -2869,7 +2869,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold." ] }, @@ -2879,7 +2879,7 @@ "Hash", "bool" ], - "documentation": [ + "docs": [ " A motion was executed; `bool` is true if returned without error." ] }, @@ -2889,7 +2889,7 @@ "Hash", "bool" ], - "documentation": [ + "docs": [ " A single member did some action; `bool` is true if returned without error." ] } @@ -2906,10 +2906,10 @@ "name": "Proposals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The hashes of the active proposals." ] }, @@ -2917,7 +2917,7 @@ "name": "ProposalOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "Proposal", @@ -2925,7 +2925,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Actual proposal for a given hash, if it's current." ] }, @@ -2933,7 +2933,7 @@ "name": "Voting", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Hash", "value": "Votes", @@ -2941,7 +2941,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes on a given proposal, if it is ongoing." ] }, @@ -2949,10 +2949,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Proposals so far." ] }, @@ -2960,10 +2960,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current members of the collective. This is stored sorted (just by value)." ] } @@ -2978,7 +2978,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Set the collective's membership manually to `new_members`. Be nice to the chain and", " provide it pre-sorted.", "", @@ -2993,7 +2993,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " Dispatch a proposal from a member using the `Member` origin.", "", " Origin must be a member of the collective." @@ -3011,7 +3011,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " # ", " - Bounded storage reads and writes.", " - Argument `threshold` has bearing on weight.", @@ -3034,7 +3034,7 @@ "type": "bool" } ], - "documentation": [ + "docs": [ " # ", " - Bounded storage read and writes.", " - Will be slightly heavier if the proposal is approved / disapproved after the vote.", @@ -3051,7 +3051,7 @@ "Hash", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been proposed (by given account) with a threshold (given", " `MemberCount`)." ] @@ -3065,7 +3065,7 @@ "MemberCount", "MemberCount" ], - "documentation": [ + "docs": [ " A motion (given hash) has been voted on by given account, leaving", " a tally (yes votes and no votes given respectively as `MemberCount`)." ] @@ -3075,7 +3075,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was approved by the required threshold." ] }, @@ -3084,7 +3084,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " A motion was not approved by the required threshold." ] }, @@ -3094,7 +3094,7 @@ "Hash", "bool" ], - "documentation": [ + "docs": [ " A motion was executed; `bool` is true if returned without error." ] }, @@ -3104,7 +3104,7 @@ "Hash", "bool" ], - "documentation": [ + "docs": [ " A single member did some action; `bool` is true if returned without error." ] } @@ -3121,10 +3121,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec<(AccountId,BalanceOf)>" + "plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current elected membership. Sorted based on account id." ] }, @@ -3132,10 +3132,10 @@ "name": "RunnersUp", "modifier": "Default", "type": { - "Plain": "Vec<(AccountId,BalanceOf)>" + "plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current runners_up. Sorted based on low to high merit (worse to best runner)." ] }, @@ -3143,10 +3143,10 @@ "name": "ElectionRounds", "modifier": "Default", "type": { - "Plain": "u32" + "plain": "u32" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The total number of vote rounds that have happened, excluding the upcoming one." ] }, @@ -3154,7 +3154,7 @@ "name": "VotesOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "Vec", @@ -3162,7 +3162,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Votes of a particular voter, with the round index of the votes." ] }, @@ -3170,7 +3170,7 @@ "name": "StakeOf", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "BalanceOf", @@ -3178,7 +3178,7 @@ } }, "fallback": "0x00000000000000000000000000000000", - "documentation": [ + "docs": [ " Locked stake of a voter." ] }, @@ -3186,10 +3186,10 @@ "name": "Candidates", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The present candidate list. Sorted based on account id. A current member can never enter", " this vector and is always implicitly assumed to be a candidate." ] @@ -3209,7 +3209,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Vote for a set of candidates for the upcoming round of election.", "", " The `votes` should:", @@ -3230,7 +3230,7 @@ { "name": "remove_voter", "args": [], - "documentation": [ + "docs": [ " Remove `origin` as a voter. This removes the lock and returns the bond.", "", " # ", @@ -3248,7 +3248,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Report `target` for being an defunct voter. In case of a valid report, the reporter is", " rewarded by the bond amount of `target`. Otherwise, the reporter itself is removed and", " their bond is slashed.", @@ -3267,7 +3267,7 @@ { "name": "submit_candidacy", "args": [], - "documentation": [ + "docs": [ " Submit oneself for candidacy.", "", " A candidate will either:", @@ -3286,7 +3286,7 @@ { "name": "renounce_candidacy", "args": [], - "documentation": [ + "docs": [ " Renounce one's intention to be a candidate for the next election round. 3 potential", " outcomes exist:", " - `origin` is a candidate and not elected in any set. In this case, the bond is", @@ -3306,7 +3306,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove a particular member from the set. This is effective immediately and the bond of", " the outgoing member is slashed.", "", @@ -3329,7 +3329,7 @@ "args": [ "Vec<(AccountId,Balance)>" ], - "documentation": [ + "docs": [ " A new term with new members. This indicates that enough candidates existed, not that", " enough have has been elected. The inner value must be examined for this purpose." ] @@ -3337,7 +3337,7 @@ { "name": "EmptyTerm", "args": [], - "documentation": [ + "docs": [ " No (or not enough) candidates existed for this round." ] }, @@ -3346,7 +3346,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A member has been removed. This should always be followed by either `NewTerm` ot", " `EmptyTerm`." ] @@ -3356,7 +3356,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A member has renounced their candidacy." ] }, @@ -3367,7 +3367,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A voter (first element) was reported (byt the second element) with the the report being", " successful or not (third element)." ] @@ -3378,31 +3378,31 @@ "name": "CandidacyBond", "type": "BalanceOf", "value": "0x0080c6a47e8d03000000000000000000", - "documentation": [] + "docs": [] }, { "name": "VotingBond", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [] + "docs": [] }, { "name": "DesiredMembers", "type": "u32", "value": "0x0d000000", - "documentation": [] + "docs": [] }, { "name": "DesiredRunnersUp", "type": "u32", "value": "0x07000000", - "documentation": [] + "docs": [] }, { "name": "TermDuration", "type": "BlockNumber", "value": "0x80130300", - "documentation": [] + "docs": [] } ], "errors": [] @@ -3416,10 +3416,10 @@ "name": "Members", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current membership, stored as an ordered Vec." ] } @@ -3434,7 +3434,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Add a member `who` to the set.", "", " May only be called from `AddOrigin` or root." @@ -3448,7 +3448,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Remove a member `who` from the set.", "", " May only be called from `RemoveOrigin` or root." @@ -3466,7 +3466,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out one member `remove` for another `add`.", "", " May only be called from `SwapOrigin` or root." @@ -3480,7 +3480,7 @@ "type": "Vec" } ], - "documentation": [ + "docs": [ " Change the membership to a new set, disregarding the existing membership. Be nice and", " pass `members` pre-sorted.", "", @@ -3495,7 +3495,7 @@ "type": "AccountId" } ], - "documentation": [ + "docs": [ " Swap out the sending member for some other key `new`.", "", " May only be called from `Signed` origin of a current member." @@ -3506,35 +3506,35 @@ { "name": "MemberAdded", "args": [], - "documentation": [ + "docs": [ " The given member was added; see the transaction for who." ] }, { "name": "MemberRemoved", "args": [], - "documentation": [ + "docs": [ " The given member was removed; see the transaction for who." ] }, { "name": "MembersSwapped", "args": [], - "documentation": [ + "docs": [ " Two members were swapped; see the transaction for who." ] }, { "name": "MembersReset", "args": [], - "documentation": [ + "docs": [ " The membership was reset; see the transaction for who the new set is." ] }, { "name": "KeyChanged", "args": [], - "documentation": [ + "docs": [ " One of the members' keys changed." ] }, @@ -3543,7 +3543,7 @@ "args": [ "PhantomData" ], - "documentation": [ + "docs": [ " Phantom member, never used." ] } @@ -3563,7 +3563,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Hint that the author of this block thinks the best finalized", " block is the given number." ] @@ -3575,7 +3575,7 @@ "name": "WindowSize", "type": "BlockNumber", "value": "0x65000000", - "documentation": [ + "docs": [ " The number of recent samples to keep from this chain. Default is 101." ] }, @@ -3583,7 +3583,7 @@ "name": "ReportLatency", "type": "BlockNumber", "value": "0xe8030000", - "documentation": [ + "docs": [ " The delay after which point things become suspicious. Default is 1000." ] } @@ -3599,10 +3599,10 @@ "name": "Authorities", "modifier": "Default", "type": { - "Plain": "AuthorityList" + "plain": "AuthorityList" }, "fallback": "0x00", - "documentation": [ + "docs": [ " DEPRECATED", "", " This used to store the current authority set, which has been migrated to the well-known", @@ -3613,10 +3613,10 @@ "name": "State", "modifier": "Default", "type": { - "Plain": "StoredState" + "plain": "StoredState" }, "fallback": "0x00", - "documentation": [ + "docs": [ " State of the current authority set." ] }, @@ -3624,10 +3624,10 @@ "name": "PendingChange", "modifier": "Optional", "type": { - "Plain": "StoredPendingChange" + "plain": "StoredPendingChange" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Pending change: (signaled at, scheduled change)." ] }, @@ -3635,10 +3635,10 @@ "name": "NextForced", "modifier": "Optional", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00", - "documentation": [ + "docs": [ " next block number where we can force a change." ] }, @@ -3646,10 +3646,10 @@ "name": "Stalled", "modifier": "Optional", "type": { - "Plain": "(BlockNumber,BlockNumber)" + "plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", - "documentation": [ + "docs": [ " `true` if we are currently stalled." ] }, @@ -3657,10 +3657,10 @@ "name": "CurrentSetId", "modifier": "Default", "type": { - "Plain": "SetId" + "plain": "SetId" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The number of changes (both in terms of keys and underlying economic responsibilities)", " in the \"set\" of Grandpa validators from genesis." ] @@ -3669,7 +3669,7 @@ "name": "SetIdSession", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "SetId", "value": "SessionIndex", @@ -3677,7 +3677,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from grandpa set ID to the index of the *most recent* session for which its members were responsible." ] } @@ -3692,7 +3692,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Report some misbehavior." ] } @@ -3703,21 +3703,21 @@ "args": [ "AuthorityList" ], - "documentation": [ + "docs": [ " New authority set has been applied." ] }, { "name": "Paused", "args": [], - "documentation": [ + "docs": [ " Current authority set has been paused." ] }, { "name": "Resumed", "args": [], - "documentation": [ + "docs": [ " Current authority set has been resumed." ] } @@ -3734,10 +3734,10 @@ "name": "ProposalCount", "modifier": "Default", "type": { - "Plain": "ProposalIndex" + "plain": "ProposalIndex" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " Number of proposals that have been made." ] }, @@ -3745,7 +3745,7 @@ "name": "Proposals", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "ProposalIndex", "value": "TreasuryProposal", @@ -3753,7 +3753,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposals that have been made." ] }, @@ -3761,10 +3761,10 @@ "name": "Approvals", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Proposal indices that have been approved but not yet awarded." ] } @@ -3783,7 +3783,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Put forward a suggestion for spending. A deposit proportional to the value", " is reserved and slashed if the proposal is rejected. It is returned once the", " proposal is awarded.", @@ -3803,7 +3803,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Reject a proposed spend. The original deposit will be slashed.", "", " # ", @@ -3821,7 +3821,7 @@ "type": "Compact" } ], - "documentation": [ + "docs": [ " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", " and the original deposit will be returned.", "", @@ -3839,7 +3839,7 @@ "args": [ "ProposalIndex" ], - "documentation": [ + "docs": [ " New proposal." ] }, @@ -3848,7 +3848,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " We have ended a spend period and will now allocate funds." ] }, @@ -3859,7 +3859,7 @@ "Balance", "AccountId" ], - "documentation": [ + "docs": [ " Some funds have been allocated." ] }, @@ -3868,7 +3868,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some of our funds have been burnt." ] }, @@ -3877,7 +3877,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Spending has finished; this is the amount that rolls over until next spend." ] }, @@ -3886,7 +3886,7 @@ "args": [ "Balance" ], - "documentation": [ + "docs": [ " Some funds have been deposited." ] } @@ -3896,7 +3896,7 @@ "name": "ProposalBond", "type": "Permill", "value": "0x50c30000", - "documentation": [ + "docs": [ " Fraction of a proposal's value that should be bonded in order to place the proposal.", " An accepted proposal gets these back. A rejected proposal does not." ] @@ -3905,7 +3905,7 @@ "name": "ProposalBondMinimum", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Minimum amount of funds that should be placed in a deposit for making a proposal." ] }, @@ -3913,7 +3913,7 @@ "name": "SpendPeriod", "type": "BlockNumber", "value": "0x80700000", - "documentation": [ + "docs": [ " Period between successive spends." ] }, @@ -3921,7 +3921,7 @@ "name": "Burn", "type": "Permill", "value": "0x20a10700", - "documentation": [ + "docs": [ " Percentage of spare funds (if any) that are burnt per spend period." ] } @@ -3937,10 +3937,10 @@ "name": "GasSpent", "modifier": "Default", "type": { - "Plain": "Gas" + "plain": "Gas" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " Gas spent so far in this block." ] }, @@ -3948,10 +3948,10 @@ "name": "CurrentSchedule", "modifier": "Default", "type": { - "Plain": "Schedule" + "plain": "Schedule" }, "fallback": "0x0000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af0000000000000001000000000000000100000000000000040000000000010010000000004000000020000000", - "documentation": [ + "docs": [ " Current cost schedule for contracts." ] }, @@ -3959,7 +3959,7 @@ "name": "PristineCode", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "CodeHash", "value": "Bytes", @@ -3967,7 +3967,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping from an original code hash to the original code, untouched by instrumentation." ] }, @@ -3975,7 +3975,7 @@ "name": "CodeStorage", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "CodeHash", "value": "PrefabWasmModule", @@ -3983,7 +3983,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A mapping between an original code hash and instrumented wasm code, ready for execution." ] }, @@ -3991,10 +3991,10 @@ "name": "AccountCounter", "modifier": "Default", "type": { - "Plain": "u64" + "plain": "u64" }, "fallback": "0x0000000000000000", - "documentation": [ + "docs": [ " The subtrie counter." ] }, @@ -4002,7 +4002,7 @@ "name": "ContractInfoOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "ContractInfo", @@ -4010,7 +4010,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The code associated with a given account." ] }, @@ -4018,10 +4018,10 @@ "name": "GasPrice", "modifier": "Default", "type": { - "Plain": "BalanceOf" + "plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", - "documentation": [ + "docs": [ " The price of one unit of gas." ] } @@ -4036,7 +4036,7 @@ "type": "Schedule" } ], - "documentation": [ + "docs": [ " Updates the schedule for metering contracts.", "", " The schedule must have a greater version than the stored schedule." @@ -4054,7 +4054,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Stores the given binary Wasm code into the chain's storage and returns its `codehash`.", " You can instantiate contracts only with stored code." ] @@ -4079,7 +4079,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Makes a call to an account, optionally transferring some balance.", "", " * If the account is a smart-contract account, the associated code will be", @@ -4109,7 +4109,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Instantiates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance.", "", " Instantiation is executed as follows:", @@ -4134,7 +4134,7 @@ "type": "Option" } ], - "documentation": [ + "docs": [ " Allows block producers to claim a small reward for evicting a contract. If a block producer", " fails to do so, a regular users will be allowed to claim the reward.", "", @@ -4151,7 +4151,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " Transfer happened `from` to `to` with given `value` as part of a `call` or `instantiate`." ] }, @@ -4161,7 +4161,7 @@ "AccountId", "AccountId" ], - "documentation": [ + "docs": [ " Contract deployed by address at the specified address." ] }, @@ -4170,7 +4170,7 @@ "args": [ "Hash" ], - "documentation": [ + "docs": [ " Code with the specified hash has been stored." ] }, @@ -4179,7 +4179,7 @@ "args": [ "u32" ], - "documentation": [ + "docs": [ " Triggered when the current schedule is updated." ] }, @@ -4189,7 +4189,7 @@ "AccountId", "bool" ], - "documentation": [ + "docs": [ " A call was dispatched from the given account. The bool signals whether it was", " successful execution or not." ] @@ -4200,7 +4200,7 @@ "AccountId", "Bytes" ], - "documentation": [ + "docs": [ " An event from contract of account." ] } @@ -4210,7 +4210,7 @@ "name": "SignedClaimHandicap", "type": "BlockNumber", "value": "0x02000000", - "documentation": [ + "docs": [ " Number of block delay an extrinsic claim surcharge has.", "", " When claim surcharge is called by an extrinsic the rent is checked", @@ -4221,7 +4221,7 @@ "name": "TombstoneDeposit", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " The minimum amount required to generate a tombstone." ] }, @@ -4229,7 +4229,7 @@ "name": "StorageSizeOffset", "type": "u32", "value": "0x08000000", - "documentation": [ + "docs": [ " Size of a contract at the time of instantiaion. This is a simple way to ensure that", " empty contracts eventually gets deleted." ] @@ -4238,7 +4238,7 @@ "name": "RentByteFee", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Price of a byte of storage per one block interval. Should be greater than 0." ] }, @@ -4246,7 +4246,7 @@ "name": "RentDepositOffset", "type": "BalanceOf", "value": "0x00008a5d784563010000000000000000", - "documentation": [ + "docs": [ " The amount of funds a contract should deposit in order to offset", " the cost of one byte.", "", @@ -4260,7 +4260,7 @@ "name": "SurchargeReward", "type": "BalanceOf", "value": "0x0080a1a76b4a35000000000000000000", - "documentation": [ + "docs": [ " Reward that is received by the party whose touch has led", " to removal of a contract." ] @@ -4269,7 +4269,7 @@ "name": "TransferFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to make a transfer." ] }, @@ -4277,7 +4277,7 @@ "name": "CreationFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to create an account." ] }, @@ -4285,7 +4285,7 @@ "name": "TransactionBaseFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the base." ] }, @@ -4293,7 +4293,7 @@ "name": "TransactionByteFee", "type": "BalanceOf", "value": "0x00e40b54020000000000000000000000", - "documentation": [ + "docs": [ " The fee to be paid for making a transaction; the per-byte portion." ] }, @@ -4301,7 +4301,7 @@ "name": "ContractFee", "type": "BalanceOf", "value": "0x0010a5d4e80000000000000000000000", - "documentation": [ + "docs": [ " The fee required to instantiate a contract instance. A reasonable default value", " is 21." ] @@ -4310,7 +4310,7 @@ "name": "CallBaseFee", "type": "Gas", "value": "0xe803000000000000", - "documentation": [ + "docs": [ " The base fee charged for calling into a contract. A reasonable default", " value is 135." ] @@ -4319,7 +4319,7 @@ "name": "InstantiateBaseFee", "type": "Gas", "value": "0xe803000000000000", - "documentation": [ + "docs": [ " The base fee charged for instantiating a contract. A reasonable default value", " is 175." ] @@ -4328,7 +4328,7 @@ "name": "MaxDepth", "type": "u32", "value": "0x20000000", - "documentation": [ + "docs": [ " The maximum nesting level of a call/instantiate stack. A reasonable default", " value is 100." ] @@ -4337,7 +4337,7 @@ "name": "MaxValueSize", "type": "u32", "value": "0x00400000", - "documentation": [ + "docs": [ " The maximum size of a storage value in bytes. A reasonable default is 16 KiB." ] }, @@ -4345,7 +4345,7 @@ "name": "BlockGasLimit", "type": "Gas", "value": "0x8096980000000000", - "documentation": [ + "docs": [ " The maximum amount of gas that could be expended per block. A reasonable", " default value is 10_000_000." ] @@ -4362,10 +4362,10 @@ "name": "Key", "modifier": "Default", "type": { - "Plain": "AccountId" + "plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ + "docs": [ " The `AccountId` of the sudo key." ] } @@ -4380,7 +4380,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Root` origin.", "", " The dispatch origin for this call must be _Signed_.", @@ -4401,7 +4401,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.", "", " The dispatch origin for this call must be _Signed_.", @@ -4425,7 +4425,7 @@ "type": "Proposal" } ], - "documentation": [ + "docs": [ " Authenticates the sudo key and dispatches a function call with `Signed` origin from", " a given account.", "", @@ -4446,7 +4446,7 @@ "args": [ "bool" ], - "documentation": [ + "docs": [ " A sudo just took place." ] }, @@ -4455,7 +4455,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " The sudoer just switched identity; the old key is supplied." ] }, @@ -4464,7 +4464,7 @@ "args": [ "bool" ], - "documentation": [ + "docs": [ " A sudo just took place." ] } @@ -4481,10 +4481,10 @@ "name": "GossipAt", "modifier": "Default", "type": { - "Plain": "BlockNumber" + "plain": "BlockNumber" }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " The block number when we should gossip." ] }, @@ -4492,10 +4492,10 @@ "name": "Keys", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " The current set of keys that may issue a heartbeat." ] }, @@ -4503,7 +4503,7 @@ "name": "ReceivedHeartbeats", "modifier": "Optional", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "SessionIndex", "key2": "AuthIndex", @@ -4512,7 +4512,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " For each session index, we keep a mapping of `AuthIndex`", " to `offchain::OpaqueNetworkState`." ] @@ -4521,7 +4521,7 @@ "name": "AuthoredBlocks", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "SessionIndex", "key2": "ValidatorId", @@ -4530,7 +4530,7 @@ } }, "fallback": "0x00000000", - "documentation": [ + "docs": [ " For each session index, we keep a mapping of `T::ValidatorId` to the", " number of blocks authored by the given authority." ] @@ -4550,7 +4550,7 @@ "type": "Signature" } ], - "documentation": [] + "docs": [] } ], "events": [ @@ -4559,14 +4559,14 @@ "args": [ "AuthorityId" ], - "documentation": [ + "docs": [ " A new heartbeat was received from `AuthorityId`" ] }, { "name": "AllGood", "args": [], - "documentation": [ + "docs": [ " At the end of the session, no offence was committed." ] }, @@ -4575,7 +4575,7 @@ "args": [ "Vec" ], - "documentation": [ + "docs": [ " At the end of the session, at least once validator was found to be offline." ] } @@ -4600,7 +4600,7 @@ "name": "Reports", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "ReportIdOf", "value": "OffenceDetails", @@ -4608,7 +4608,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The primary structure that holds all offence records keyed by report identifiers." ] }, @@ -4616,7 +4616,7 @@ "name": "ConcurrentReportsIndex", "modifier": "Default", "type": { - "DoubleMap": { + "doubleMap": { "hasher": "Blake2_256", "key1": "Kind", "key2": "OpaqueTimeSlot", @@ -4625,7 +4625,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " A vector of reports of the same kind that happened at the same time slot." ] }, @@ -4633,7 +4633,7 @@ "name": "ReportsByKindIndex", "modifier": "Default", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "Kind", "value": "Bytes", @@ -4641,7 +4641,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " Enumerates all reports of a kind along with the time they happened.", "", " All reports are sorted by the time of offence.", @@ -4660,7 +4660,7 @@ "Kind", "OpaqueTimeSlot" ], - "documentation": [ + "docs": [ " There is an offence reported of the given `kind` happened at the `session_index` and", " (kind-specific) time slot. This event is not deposited for duplicate slashes." ] @@ -4678,10 +4678,10 @@ "name": "RandomMaterial", "modifier": "Default", "type": { - "Plain": "Vec" + "plain": "Vec" }, "fallback": "0x00", - "documentation": [ + "docs": [ " Series of block headers from the last 81 blocks that acts as random seed material. This", " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", " the oldest hash." @@ -4703,7 +4703,7 @@ "name": "NameOf", "modifier": "Optional", "type": { - "Map": { + "map": { "hasher": "Blake2_256", "key": "AccountId", "value": "(Bytes,BalanceOf)", @@ -4711,7 +4711,7 @@ } }, "fallback": "0x00", - "documentation": [ + "docs": [ " The lookup table for names." ] } @@ -4726,7 +4726,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set an account's name. The name should be a UTF-8-encoded string by convention, though", " we don't check it.", "", @@ -4748,7 +4748,7 @@ { "name": "clear_name", "args": [], - "documentation": [ + "docs": [ " Clear an account's name and return the deposit. Fails if the account was not named.", "", " The dispatch origin for this call must be _Signed_.", @@ -4769,7 +4769,7 @@ "type": "LookupSource" } ], - "documentation": [ + "docs": [ " Remove an account's name and take charge of the deposit.", "", " Fails if `who` has not been named. The deposit is dealt with through `T::Slashed`", @@ -4797,7 +4797,7 @@ "type": "Bytes" } ], - "documentation": [ + "docs": [ " Set a third-party account's name with no deposit.", "", " No length checking is done on the name.", @@ -4819,7 +4819,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A name was set." ] }, @@ -4828,7 +4828,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A name was forcibly set." ] }, @@ -4837,7 +4837,7 @@ "args": [ "AccountId" ], - "documentation": [ + "docs": [ " A name was changed." ] }, @@ -4847,7 +4847,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was cleared, and the given balance returned." ] }, @@ -4857,7 +4857,7 @@ "AccountId", "Balance" ], - "documentation": [ + "docs": [ " A name was removed and the given balance slashed." ] } @@ -4867,7 +4867,7 @@ "name": "ReservationFee", "type": "BalanceOf", "value": "0x00407a10f35a00000000000000000000", - "documentation": [ + "docs": [ " Reservation fee." ] }, @@ -4875,7 +4875,7 @@ "name": "MinLength", "type": "u32", "value": "0x03000000", - "documentation": [ + "docs": [ " The minimum length a name may be." ] }, @@ -4883,7 +4883,7 @@ "name": "MaxLength", "type": "u32", "value": "0x10000000", - "documentation": [ + "docs": [ " The maximum length a name may be." ] } From ffeb41fc9695fd033434f15543af9c52d0ce3c3d Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 11 Aug 2021 08:11:47 +0300 Subject: [PATCH 202/237] polkadot: added extrinsic send example --- examples/polkadot/Main.hs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/examples/polkadot/Main.hs b/examples/polkadot/Main.hs index f9c0579d..2f6a86e9 100644 --- a/examples/polkadot/Main.hs +++ b/examples/polkadot/Main.hs @@ -28,8 +28,19 @@ main = do Right account <- query "system" "account" [Argument alice] liftIO . putStrLn $ "Alice account: " ++ show (account :: AccountInfo) - State.getRuntimeVersion best + me <- liftIO generate + liftIO . putStrLn $ "My account: " ++ show (multi_signer (me :: Ed25519)) + + liftIO $ putStrLn "Please send 1000 Unit and press any key" + liftIO getLine + + Right account <- query "system" "account" [Argument (into_account $ multi_signer me)] + liftIO . putStrLn $ "My account: " ++ show (account :: AccountInfo) + + transfer <- new_call "Balances" "transfer" (MaId alice, Compact 200000000000000) + liftIO . putStrLn $ "Sign and send 200 Unit transfer transaction: " ++ show transfer + sign_and_send me transfer 0 case result of Left err -> error (show err) - Right version -> putStrLn (show version) + Right tx_hash -> putStrLn ("Extrinsic sent " ++ show tx_hash) From d63ce43a5de964aa9259c1b5cde4b98be4bf6465 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Wed, 11 Aug 2021 08:45:15 +0300 Subject: [PATCH 203/237] docs: added polkadot extrinsic section --- docs/index.rst | 1 + docs/polkadot_extrinsic.rst | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 docs/polkadot_extrinsic.rst diff --git a/docs/index.rst b/docs/index.rst index e5b48993..44c4c4e8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,7 @@ Haskell Web3 Documentation ethereum_node_api polkadot_node_api polkadot_storage + polkadot_extrinsic ethereum_accounts smart_contracts ipfs_client_api diff --git a/docs/polkadot_extrinsic.rst b/docs/polkadot_extrinsic.rst new file mode 100644 index 00000000..adeadf1a --- /dev/null +++ b/docs/polkadot_extrinsic.rst @@ -0,0 +1,46 @@ +Polkadot Extrinsic +================== + +Extrinsic is a piece of data from external world that proposed to be a part of blockchain. Generally exist two kinds of extrinsics: ``unsigned`` (inherents) and ``signed`` (transactions). + +Lets try to send Polkadot transaction with ``runWeb3'`` function using ``ghci``. + +.. code-block:: haskell + + > import Network.Web3.Provider + > import Network.Polkadot + +The first, let's create new one account. + +.. code-block:: haskell + + > me <- generate :: IO Ed25519 + > multi_signer me + "5D7c97BufUFEqrGGn2nyw5HhgMTzQT2YkBZ33mojWwBijFLQ" + +Where ``Ed25519`` generated and its Base58 encoded address printed out. I've use ``multi_signer`` wrapper because of ``MultiAddress`` format used in Polkadot. + +The next, let's make a call structure that encodes function arguments and parameters required for Polkadot runtime dispatcher. + +.. code-block:: haskell + + > let Right alice = from_ss58check "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" + > Right myCall <- runWeb3' (WsProvider "127.0.0.1" 9944) $ new_call "Balances" "transfer" (MaId alice, Compact 200000000000000) + > myCall + Call 0 5 (MaId 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d, Compact 200000000000000) + +Where ``alice`` is transfer destination account on chain, ``from_ss58check`` decodes it from Base58 and pack into ``AccountId`` type. It also should be wrapped in call arguments into ``MultiAddress`` type using ``MaId`` constructor. The ``new_call`` function gets module name, function name, arguments tuple and returns encodable structure for Polkadot runtime dispatcher. + +Next step is signing the call and other extrinsic related staff like lifetime, nonce and etc. Fortunately, Haskell Web3 has ``sign_and_send`` function that makes it automatically. + +.. code-block:: haskell + + > Right myTx <- runWeb3' (WsProvider "127.0.0.1" 9944) $ sign_and_send me myCall 0 + > myTx + 0x9034fb2c7e46b5de6e681565a657cefc32fb2aa93c21aad03acc20b79fb31e68 + +The ``sign_and_send`` function gets crypto pair to sign extrinsic, the call structure and tips amount (zero is acceptable in general case). If everything ok then you will get transaction hash as result. + +.. note:: + + More usage details available in `Polkadot example `_ app. From bd1fda6e144b16fca33735ea585bacede6b4992f Mon Sep 17 00:00:00 2001 From: Tim Pierson Date: Wed, 6 Oct 2021 00:35:38 +0100 Subject: [PATCH 204/237] Fix ghc 8.6 (#113) * Add MonadFail import * Add MonadFail import * Add monadFil import --- packages/polkadot/src/Network/Polkadot/Call.hs | 1 + packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs | 3 ++- packages/provider/src/Network/Web3/Provider.hs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/polkadot/src/Network/Polkadot/Call.hs b/packages/polkadot/src/Network/Polkadot/Call.hs index e1d3c749..e9dcdf39 100644 --- a/packages/polkadot/src/Network/Polkadot/Call.hs +++ b/packages/polkadot/src/Network/Polkadot/Call.hs @@ -15,6 +15,7 @@ module Network.Polkadot.Call where import Codec.Scale (Decode, Encode, Generic, decode) +import Control.Monad.Fail (MonadFail) import Data.List (findIndex) import Data.Text (Text) import Data.Word (Word8) diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs index 6adea454..61be3d7a 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs @@ -20,7 +20,8 @@ module Network.Polkadot.Metadata.Type.Parser , sanitize , sanitizeM ) where - + +import Control.Monad.Fail (MonadFail) import Data.Text (Text, intercalate, pack, diff --git a/packages/provider/src/Network/Web3/Provider.hs b/packages/provider/src/Network/Web3/Provider.hs index e812b81e..792e1f3f 100644 --- a/packages/provider/src/Network/Web3/Provider.hs +++ b/packages/provider/src/Network/Web3/Provider.hs @@ -22,6 +22,7 @@ module Network.Web3.Provider where import Control.Concurrent.Async (Async, async) import Control.Exception (Exception, try) import Control.Monad.Catch (MonadThrow) +import Control.Monad.Fail (MonadFail) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.State (MonadState (..)) import Control.Monad.Trans.State (StateT, evalStateT, withStateT) From 76c74c88e8ab54c408dc03ac649724c56ea86058 Mon Sep 17 00:00:00 2001 From: Ivan Gromakovskii Date: Wed, 6 Oct 2021 02:37:41 +0300 Subject: [PATCH 205/237] getBlock* related improvements (#111) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Return `Maybe Block` from `getBlockBy*` methods Problem: Infura docs¹ say that `getBlockByNumber` and its friend return "A block object, or null when no block was found". `getBlockByHash` and `getBlockByNumber` do not account for that and throw `ParsingException` with auto-generated message when null is received. That's quite inconvenient to handle because you need to depend on this auto-generated message. Solution: return `Maybe Block` instead of just `Block`. `instance FromJSON (Maybe a)` is defined in such a way that null is parsed as `Nothing` and everything else is parsed using `a` parser, which is exactly what we want. Note that `getTransactionByHash` for example already returns `Maybe Transaction` and was inconsistent with `getBlockByHash`. ¹ https://infura.io/docs/ethereum/json-rpc/eth-getBlockByHash * Rename blockReceiptsRoot Problem: in Infura docs¹ there is a field called `receiptsRoot`, but in code it's called `blockReceiptRoot`, so apparently it's always parsed as `Nothing` because parser is auto-generated from the field name. Solution: rename the field. ¹ https://infura.io/docs/ethereum/json-rpc/eth-getBlockByHash * Add methods to download blocks without tx bodies Problem: `eth_getBlockByHash` accepts a boolean argument that determines whether full transaction objects will be included in the response or only transaction hashes. The existing API hardcodes this argument to True, but sometimes passing False is desired (at least for performance reasons). Solution: 1. Generalize `Block` to have a type parameter. Alternatively we could define another type very similar to the existing `Block`, but it would be some duplication of code. 2. Add `getBlockByHashLite` and `getBlockByNumberLite` methods that pass False and return `BlockT HexString`. --- .../ethereum/src/Network/Ethereum/Api/Eth.hs | 20 ++++++++++++++----- .../src/Network/Ethereum/Api/Types.hs | 13 ++++++++---- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs index a1a2994d..ec737f79 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs @@ -18,9 +18,9 @@ module Network.Ethereum.Api.Eth where import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address (Address) import Data.Text (Text) -import Network.Ethereum.Api.Types (Block, Call, Change, DefaultBlock, - Filter, Quantity, SyncingState, - Transaction, TxReceipt) +import Network.Ethereum.Api.Types (Block, BlockT, Call, Change, + DefaultBlock, Filter, Quantity, + SyncingState, Transaction, TxReceipt) import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Returns the current ethereum protocol version. @@ -145,13 +145,23 @@ estimateGas :: JsonRpc m => Call -> m Quantity {-# INLINE estimateGas #-} estimateGas = remote "eth_estimateGas" +-- | Returns information about a block by hash with only hashes of the transactions in it. +getBlockByHashLite :: JsonRpc m => HexString -> m (Maybe (BlockT HexString)) +{-# INLINE getBlockByHashLite #-} +getBlockByHashLite = flip (remote "eth_getBlockByHash") False + +-- | Returns information about a block by block number with only hashes of the transactions in it. +getBlockByNumberLite :: JsonRpc m => Quantity -> m (Maybe (BlockT HexString)) +{-# INLINE getBlockByNumberLite #-} +getBlockByNumberLite = flip (remote "eth_getBlockByNumber") False + -- | Returns information about a block by hash. -getBlockByHash :: JsonRpc m => HexString -> m Block +getBlockByHash :: JsonRpc m => HexString -> m (Maybe Block) {-# INLINE getBlockByHash #-} getBlockByHash = flip (remote "eth_getBlockByHash") True -- | Returns information about a block by block number. -getBlockByNumber :: JsonRpc m => Quantity -> m Block +getBlockByNumber :: JsonRpc m => Quantity -> m (Maybe Block) {-# INLINE getBlockByNumber #-} getBlockByNumber = flip (remote "eth_getBlockByNumber") True diff --git a/packages/ethereum/src/Network/Ethereum/Api/Types.hs b/packages/ethereum/src/Network/Ethereum/Api/Types.hs index 800e06be..41a84002 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Types.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Types.hs @@ -249,8 +249,13 @@ data Transaction = Transaction $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 2 }) ''Transaction) +-- | Block information with full transactions. +type Block = BlockT Transaction + -- | Block information. -data Block = Block +-- It is parameterized by the type of transactions stored in the block because +-- sometimes only TX hashes may be stored. +data BlockT tx = Block { blockNumber :: !(Maybe Quantity) -- ^ QUANTITY - the block number. null when its pending block. , blockHash :: !(Maybe HexString) @@ -267,7 +272,7 @@ data Block = Block -- ^ DATA, 32 Bytes - the root of the transaction trie of the block. , blockStateRoot :: !HexString -- ^ DATA, 32 Bytes - the root of the final state trie of the block. - , blockReceiptRoot :: !(Maybe HexString) + , blockReceiptsRoot :: !(Maybe HexString) -- ^ DATA, 32 Bytes - the root of the receipts trie of the block. , blockMiner :: !Address -- ^ DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given. @@ -285,7 +290,7 @@ data Block = Block -- ^ QUANTITY - the total used gas by all transactions in this block. , blockTimestamp :: !Quantity -- ^ QUANTITY - the unix timestamp for when the block was collated. - , blockTransactions :: ![Transaction] + , blockTransactions :: ![tx] -- ^ Array of transaction objects. , blockUncles :: ![HexString] -- ^ Array - Array of uncle hashes. @@ -293,4 +298,4 @@ data Block = Block deriving (Show, Generic) $(deriveJSON (defaultOptions - { fieldLabelModifier = over _head toLower . drop 5 }) ''Block) + { fieldLabelModifier = over _head toLower . drop 5 }) ''BlockT) From e3fc3199eca81578ee0b9b69be15c1b4d4d5a3ca Mon Sep 17 00:00:00 2001 From: Ivan Gromakovskii Date: Mon, 1 Nov 2021 17:59:22 +0300 Subject: [PATCH 206/237] Bump some upper bounds (#118) * Bump upper bound for `random` Changelog: https://hackage.haskell.org/package/random-1.2.1/changelog * Bump upper bound for `cryptonite` Changelog: https://hackage.haskell.org/package/cryptonite-0.29/changelog --- packages/crypto/package.yaml | 2 +- packages/jsonrpc/package.yaml | 2 +- packages/polkadot/package.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index ede1c408..f2a0510e 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -22,7 +22,7 @@ dependencies: - vector >0.12 && <0.13 - containers >0.6 && <0.7 - uuid-types >1.0 && <1.1 -- cryptonite >0.22 && <0.28 +- cryptonite >0.22 && <0.30 - bytestring >0.10 && <0.11 - web3-hexstring >=1.0 && <1.1 diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index c3258164..f1f6b25c 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -14,7 +14,7 @@ dependencies: - base >4.11 && <4.15 - text >1.2 && <1.3 - aeson >1.2 && <1.6 -- random >1.0 && <1.2 +- random >1.0 && <1.3 - bytestring >0.10 && <0.11 - exceptions >0.8 && <0.11 - websockets >0.10 && <0.13 diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index b6f81654..4d6942da 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -19,7 +19,7 @@ dependencies: - memory >0.14 && <0.16 - microlens >0.4 && <0.5 - containers >0.6 && <0.7 -- cryptonite >0.22 && <0.28 +- cryptonite >0.22 && <0.30 - bytestring >0.10 && <0.11 - base58-bytestring >=0.1 && <0.2 - animalcase >0.1 && <0.2 From 647ea58339b56717d1a8c03f2cae1305d96be76d Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 25 Jan 2022 11:56:25 +0300 Subject: [PATCH 207/237] Update to latest LTS, change pkg names a bit --- examples/scale/package.yaml | 4 ++-- packages/bignum/package.yaml | 6 +++--- packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs | 4 ++-- packages/crypto/package.yaml | 2 +- packages/ethereum/package.yaml | 4 ++-- packages/hexstring/package.yaml | 4 ++-- packages/jsonrpc/package.yaml | 3 +-- packages/polkadot/package.yaml | 6 +++--- .../polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs | 1 + packages/provider/package.yaml | 2 +- packages/scale/package.yaml | 2 +- packages/solidity/package.yaml | 2 +- stack.yaml | 6 +----- 13 files changed, 21 insertions(+), 25 deletions(-) diff --git a/examples/scale/package.yaml b/examples/scale/package.yaml index 98689a1e..35bc01dd 100644 --- a/examples/scale/package.yaml +++ b/examples/scale/package.yaml @@ -10,9 +10,9 @@ category: Network dependencies: - base +- scale - generics-sop -- web3-scale -- web3-hexstring +- memory-hexstring executables: example-scale: diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index 15c108b9..bdb2e052 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -12,11 +12,11 @@ category: Network dependencies: - base >4.11 && <4.15 +- scale >=1.0 && <1.1 - memory >0.14 && <0.16 +- memory-hexstring >=1.0 && <1.1 - cereal >0.5 && <0.6 - wide-word >0.1 && <0.2 -- web3-scale >=1.0 && <1.1 -- web3-hexstring >=1.0 && <1.1 ghc-options: - -funbox-strict-fields @@ -54,7 +54,7 @@ tests: - tests - src dependencies: - - web3-hexstring >=1.0 && <1.1 + - memory-hexstring >=1.0 && <1.1 - hspec-expectations >=0.8.2 && <0.9 - hspec-discover >=2.4.4 && <2.8 - hspec-contrib >=0.4.0 && <0.6 diff --git a/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs index 1582cda8..2b480ef0 100644 --- a/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs +++ b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs @@ -12,11 +12,11 @@ module Data.BigNum.Test.BigNumSpec where -import Basement.Types.Word128 (Word128) -import Basement.Types.Word256 (Word256) import Codec.Scale (decode, encode) import Control.Monad (forM_) import Data.ByteArray.HexString (HexString) +import Data.WideWord.Word128 (Word128) +import Data.WideWord.Word256 (Word256) import Test.Hspec import Data.BigNum (H160, H256, H512) diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index f2a0510e..bcfd19ec 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -24,7 +24,7 @@ dependencies: - uuid-types >1.0 && <1.1 - cryptonite >0.22 && <0.30 - bytestring >0.10 && <0.11 -- web3-hexstring >=1.0 && <1.1 +- memory-hexstring >=1.0 && <1.1 ghc-options: - -funbox-strict-fields diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index c2c3aecb..001f4b6b 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -30,9 +30,9 @@ dependencies: - template-haskell >2.11 && <2.17 - mtl >2.2 && <2.3 - web3-crypto >=1.0 && <1.1 -- web3-jsonrpc >=1.0 && <1.1 - web3-solidity >=1.0 && <1.1 -- web3-hexstring >=1.0 && <1.1 +- memory-hexstring >=1.0 && <1.1 +- jsonrpc-tinyclient >=1.0 && <1.1 ghc-options: - -funbox-strict-fields diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index 7669b414..25e14955 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -1,4 +1,4 @@ -name: web3-hexstring +name: memory-hexstring version: 1.0.0.0 synopsis: Hex-string type for Haskell Web3 library. description: Client library for Third Generation of Web. @@ -17,7 +17,7 @@ dependencies: - memory >0.14 && <0.16 - bytestring >0.10 && <0.11 - template-haskell >2.11 && <2.17 -- web3-scale >=1.0 && <1.1 +- scale >=1.0 && <1.1 ghc-options: - -funbox-strict-fields diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index f1f6b25c..85f95f53 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -1,7 +1,6 @@ -name: web3-jsonrpc +name: jsonrpc-tinyclient version: 1.0.0.0 synopsis: Tiny JSON-RPC client for Haskell Web3 library. -description: Client library for Third Generation of Web. github: "airalab/hs-web3" license: Apache-2.0 license-file: LICENSE diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 4d6942da..6e903878 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -15,6 +15,7 @@ dependencies: - base >4.11 && <4.15 - text >1.2 && <1.3 - aeson >1.2 && <1.6 +- scale >=1.0 && <1.1 - parsec >3.0 && <3.2 - memory >0.14 && <0.16 - microlens >0.4 && <0.5 @@ -26,11 +27,10 @@ dependencies: - generics-sop >0.3 && <0.6 - microlens-th >0.4 && <0.5 - microlens-mtl >0.2 && <0.3 -- web3-scale >=1.0 && <1.1 - web3-crypto >=1.0 && <1.1 - web3-bignum >=1.0 && <1.1 -- web3-jsonrpc >=1.0 && <1.1 -- web3-hexstring >=1.0 && <1.1 +- jsonrpc-tinyclient >=1.0 && <1.1 +- memory-hexstring >=1.0 && <1.1 ghc-options: - -funbox-strict-fields diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs index 61be3d7a..3285da3f 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs @@ -52,6 +52,7 @@ render_box :: Text -> Maybe [TypeAst] -> Text render_box name Nothing = name render_box name (Just args) | any (== name) allowed_boxes = name <> "<" <> intercalate "," (toText <$> args) <> ">" + | name == "BoundedVec" = "Vec<" <> intercalate "," (toText <$> args) <> ">" | name == "Box" = toText (head args) | otherwise = name diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml index 2821e67f..1282f727 100644 --- a/packages/provider/package.yaml +++ b/packages/provider/package.yaml @@ -21,7 +21,7 @@ dependencies: - http-client >0.5 && <0.7 - data-default >0.7 && <0.8 - transformers >0.5 && <0.6 -- web3-jsonrpc >=1.0 && <1.1 +- jsonrpc-tinyclient >=1.0 && <1.1 ghc-options: - -funbox-strict-fields diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index 386beb9d..691e41b0 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -1,4 +1,4 @@ -name: web3-scale +name: scale version: 1.0.0.0 synopsis: SCALE v2.0 codec for Haskell Web3 library. description: Client library for Third Generation of Web. diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml index 25a03e90..7fb6f4d0 100644 --- a/packages/solidity/package.yaml +++ b/packages/solidity/package.yaml @@ -16,6 +16,7 @@ dependencies: - aeson >1.2 && <1.6 - cereal >0.5 && <0.6 - memory >0.14 && <0.16 +- memory-hexstring >=1.0 && <1.1 - tagged >0.8 && <0.9 - parsec >3.1 && <3.2 - basement >0.0 && <0.1 @@ -26,7 +27,6 @@ dependencies: - data-default >0.7 && <0.8 - template-haskell >2.11 && <2.17 - web3-crypto >=1.0 && <1.1 -- web3-hexstring >=1.0 && <1.1 ghc-options: - -funbox-strict-fields diff --git a/stack.yaml b/stack.yaml index dc0377ef..42f760ba 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-16.23 +resolver: lts-18.23 # User packages to be built. packages: @@ -20,11 +20,7 @@ packages: # Extra package dependencies extra-deps: -- hspec-expectations-json-1.0.0.2@sha256:a8c771b7a5449ef600c984d596304ebace8e109f5830f5351566a4d13c0072d4 -- base58-bytestring-0.1.0@sha256:a1da72ee89d5450bac1c792d9fcbe95ed7154ab7246f2172b57bd4fd9b5eab79 - animalcase-0.1.0.2@sha256:d7b80c3130c68d7ce8ddd9782588b2c4dd7da86461f302c54cc4acddf0902b51 -- relapse-1.0.0.0@sha256:b89ea23189e07f377be4e2a4deccf3d6ba7f547ed8ad77e27b35d78801efd81c -- vinyl-0.12.1@sha256:03f5e246fae2434250987bbfe708015dc6e23f60c20739c34738acde1383b96c # Dependencies bounds pvp-bounds: both From d143bd299852882e11db3fcd46945cc9ee6ab8b7 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 25 Jan 2022 12:14:04 +0300 Subject: [PATCH 208/237] Updated descriptions --- packages/bignum/package.yaml | 2 +- packages/crypto/package.yaml | 2 +- packages/jsonrpc/package.yaml | 1 + packages/provider/package.yaml | 2 +- packages/solidity/package.yaml | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index bdb2e052..5aee69c2 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -1,7 +1,7 @@ name: web3-bignum version: 1.0.0.0 synopsis: Fixed size big integers for Haskell Web3 library. -description: Client library for Third Generation of Web. +description: This package implements codec instances and other helper functions. github: "airalab/hs-web3" license: Apache-2.0 license-file: LICENSE diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index bcfd19ec..0ec52e9e 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -1,7 +1,7 @@ name: web3-crypto version: 1.0.0.0 synopsis: Cryptograhical primitives for Haskell Web3 library. -description: Client library for Third Generation of Web. +description: This package implements Web3 specific cryptography and helper functions. github: "airalab/hs-web3" license: Apache-2.0 license-file: LICENSE diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index 85f95f53..c5bc2cdc 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -1,6 +1,7 @@ name: jsonrpc-tinyclient version: 1.0.0.0 synopsis: Tiny JSON-RPC client for Haskell Web3 library. +description: Minimalistic JSON-RPC client, inspired by haxr library. github: "airalab/hs-web3" license: Apache-2.0 license-file: LICENSE diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml index 1282f727..6e6f9f7a 100644 --- a/packages/provider/package.yaml +++ b/packages/provider/package.yaml @@ -1,7 +1,7 @@ name: web3-provider version: 1.0.0.0 synopsis: Node connection provider for Haskell Web3 library. -description: Client library for Third Generation of Web. +description: This package contains general Web3 node adapters and connection helpers. github: "airalab/hs-web3" license: Apache-2.0 license-file: LICENSE diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml index 7fb6f4d0..6e24f36c 100644 --- a/packages/solidity/package.yaml +++ b/packages/solidity/package.yaml @@ -1,7 +1,7 @@ name: web3-solidity version: 1.0.0.0 synopsis: Solidity language for Haskell Web3 library. -description: Client library for Third Generation of Web. +description: This package contains Solidity parsec-based parser and primitive types. github: "airalab/hs-web3" license: Apache-2.0 license-file: LICENSE From 4280171c8e9f828c1364ce47ff08e93f5860b064 Mon Sep 17 00:00:00 2001 From: AriFordsham <37623136+AriFordsham@users.noreply.github.com> Date: Thu, 10 Feb 2022 23:24:47 +0000 Subject: [PATCH 209/237] Added .cabal files to repo (#123) See: https://docs.haskellstack.org/en/stable/stack_yaml_vs_cabal_package_file/#should-i-check-in-generated-cabal-files https://github.com/commercialhaskell/stack/issues/5210 --- .gitignore | 1 - packages/bignum/web3-bignum.cabal | 64 ++++++++ packages/crypto/web3-crypto.cabal | 105 +++++++++++++ packages/ethereum/web3-ethereum.cabal | 149 ++++++++++++++++++ packages/hexstring/memory-hexstring.cabal | 44 ++++++ packages/ipfs/web3-ipfs.cabal | 68 +++++++++ packages/jsonrpc/jsonrpc-tinyclient.cabal | 44 ++++++ packages/polkadot/web3-polkadot.cabal | 176 ++++++++++++++++++++++ packages/provider/web3-provider.cabal | 45 ++++++ packages/scale/scale.cabal | 88 +++++++++++ packages/solidity/web3-solidity.cabal | 117 ++++++++++++++ packages/web3/web3.cabal | 38 +++++ 12 files changed, 938 insertions(+), 1 deletion(-) create mode 100644 packages/bignum/web3-bignum.cabal create mode 100644 packages/crypto/web3-crypto.cabal create mode 100644 packages/ethereum/web3-ethereum.cabal create mode 100644 packages/hexstring/memory-hexstring.cabal create mode 100644 packages/ipfs/web3-ipfs.cabal create mode 100644 packages/jsonrpc/jsonrpc-tinyclient.cabal create mode 100644 packages/polkadot/web3-polkadot.cabal create mode 100644 packages/provider/web3-provider.cabal create mode 100644 packages/scale/scale.cabal create mode 100644 packages/solidity/web3-solidity.cabal create mode 100644 packages/web3/web3.cabal diff --git a/.gitignore b/.gitignore index 077ef307..73751a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ build/ dist/ docs/_build -*.cabal stack.yaml.lock diff --git a/packages/bignum/web3-bignum.cabal b/packages/bignum/web3-bignum.cabal new file mode 100644 index 00000000..18813448 --- /dev/null +++ b/packages/bignum/web3-bignum.cabal @@ -0,0 +1,64 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: web3-bignum +version: 1.0.0.0 +synopsis: Fixed size big integers for Haskell Web3 library. +description: This package implements codec instances and other helper functions. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Data.BigNum + other-modules: + Paths_web3_bignum + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + base >4.11 && <4.15 + , cereal >0.5 && <0.6 + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , scale ==1.0.* + , wide-word >0.1 && <0.2 + default-language: Haskell2010 + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Data.BigNum.Test.BigNumSpec + Data.BigNum + Paths_web3_bignum + hs-source-dirs: + tests + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + build-depends: + base >4.11 && <4.15 + , cereal >0.5 && <0.6 + , hspec >=2.4.4 && <2.8 + , hspec-contrib >=0.4.0 && <0.6 + , hspec-discover >=2.4.4 && <2.8 + , hspec-expectations >=0.8.2 && <0.9 + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , scale ==1.0.* + , wide-word >0.1 && <0.2 + default-language: Haskell2010 diff --git a/packages/crypto/web3-crypto.cabal b/packages/crypto/web3-crypto.cabal new file mode 100644 index 00000000..37b110d6 --- /dev/null +++ b/packages/crypto/web3-crypto.cabal @@ -0,0 +1,105 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: web3-crypto +version: 1.0.0.0 +synopsis: Cryptograhical primitives for Haskell Web3 library. +description: This package implements Web3 specific cryptography and helper functions. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple +extra-source-files: + src/cbits/xxhash.h + src/cbits/xxhash.c + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Crypto.Bip39 + Crypto.Ecdsa.Signature + Crypto.Ecdsa.Utils + Crypto.Ethereum + Crypto.Ethereum.Keyfile + Crypto.Ethereum.Signature + Crypto.Ethereum.Utils + Crypto.Random.HmacDrbg + Data.Digest.Blake2 + Data.Digest.XXHash + other-modules: + Paths_web3_crypto + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + include-dirs: + src/cbits + c-sources: + src/cbits/xxhash.c + build-depends: + aeson >1.2 && <1.6 + , base >4.11 && <4.15 + , bytestring >0.10 && <0.11 + , containers >0.6 && <0.7 + , cryptonite >0.22 && <0.30 + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , text >1.2 && <1.3 + , uuid-types >1.0 && <1.1 + , vector >0.12 && <0.13 + default-language: Haskell2010 + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Crypto.Ethereum.Test.KeyfileSpec + Crypto.Ethereum.Test.SignatureSpec + Crypto.Random.Test.HmacDrbgSpec + Data.Digest.Test.Blake2Spec + Data.Digest.Test.XXHashSpec + Crypto.Bip39 + Crypto.Ecdsa.Signature + Crypto.Ecdsa.Utils + Crypto.Ethereum + Crypto.Ethereum.Keyfile + Crypto.Ethereum.Signature + Crypto.Ethereum.Utils + Crypto.Random.HmacDrbg + Data.Digest.Blake2 + Data.Digest.XXHash + Paths_web3_crypto + hs-source-dirs: + tests + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + include-dirs: + src/cbits + c-sources: + src/cbits/xxhash.c + build-depends: + aeson >1.2 && <1.6 + , base >4.11 && <4.15 + , bytestring >0.10 && <0.11 + , containers >0.6 && <0.7 + , cryptonite >0.22 && <0.30 + , hspec >=2.4.4 && <2.8 + , hspec-contrib >=0.4.0 && <0.6 + , hspec-discover >=2.4.4 && <2.8 + , hspec-expectations >=0.8.2 && <0.9 + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , text >1.2 && <1.3 + , uuid-types >1.0 && <1.1 + , vector >0.12 && <0.13 + default-language: Haskell2010 diff --git a/packages/ethereum/web3-ethereum.cabal b/packages/ethereum/web3-ethereum.cabal new file mode 100644 index 00000000..c1b35e39 --- /dev/null +++ b/packages/ethereum/web3-ethereum.cabal @@ -0,0 +1,149 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: web3-ethereum +version: 1.0.0.0 +synopsis: Ethereum support for Haskell Web3 library. +description: Client library for Third Generation of Web. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Network.Ethereum + Network.Ethereum.Account + Network.Ethereum.Account.Class + Network.Ethereum.Account.Default + Network.Ethereum.Account.Internal + Network.Ethereum.Account.LocalKey + Network.Ethereum.Account.Personal + Network.Ethereum.Account.Safe + Network.Ethereum.Api.Eth + Network.Ethereum.Api.Net + Network.Ethereum.Api.Personal + Network.Ethereum.Api.Types + Network.Ethereum.Api.Web3 + Network.Ethereum.Chain + Network.Ethereum.Contract + Network.Ethereum.Contract.Event + Network.Ethereum.Contract.Event.Common + Network.Ethereum.Contract.Event.MultiFilter + Network.Ethereum.Contract.Event.SingleFilter + Network.Ethereum.Contract.Method + Network.Ethereum.Contract.TH + Network.Ethereum.Ens + Network.Ethereum.Ens.PublicResolver + Network.Ethereum.Ens.Registry + Network.Ethereum.Transaction + Network.Ethereum.Unit + other-modules: + Paths_web3_ethereum + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + OneTuple >0.2 && <0.3 + , aeson >1.2 && <1.6 + , base >4.11 && <4.15 + , bytestring >0.10 && <0.11 + , data-default >0.7 && <0.8 + , exceptions >0.8 && <0.11 + , generics-sop >0.3 && <0.6 + , jsonrpc-tinyclient ==1.0.* + , machines >0.6 && <0.8 + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , microlens >0.4 && <0.5 + , microlens-aeson >2.2 && <2.4 + , mtl >2.2 && <2.3 + , relapse >=1.0 && <2.0 + , tagged >0.8 && <0.9 + , template-haskell >2.11 && <2.17 + , text >1.2 && <1.3 + , transformers >0.5 && <0.6 + , vinyl >0.5 && <0.14 + , web3-crypto ==1.0.* + , web3-solidity ==1.0.* + default-language: Haskell2010 + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Network.Ethereum.Test.EventSpec + Network.Ethereum.Test.MethodDumpSpec + Network.Ethereum.Test.THSpec + Network.Ethereum.Test.TransactionSpec + Network.Ethereum + Network.Ethereum.Account + Network.Ethereum.Account.Class + Network.Ethereum.Account.Default + Network.Ethereum.Account.Internal + Network.Ethereum.Account.LocalKey + Network.Ethereum.Account.Personal + Network.Ethereum.Account.Safe + Network.Ethereum.Api.Eth + Network.Ethereum.Api.Net + Network.Ethereum.Api.Personal + Network.Ethereum.Api.Types + Network.Ethereum.Api.Web3 + Network.Ethereum.Chain + Network.Ethereum.Contract + Network.Ethereum.Contract.Event + Network.Ethereum.Contract.Event.Common + Network.Ethereum.Contract.Event.MultiFilter + Network.Ethereum.Contract.Event.SingleFilter + Network.Ethereum.Contract.Method + Network.Ethereum.Contract.TH + Network.Ethereum.Ens + Network.Ethereum.Ens.PublicResolver + Network.Ethereum.Ens.Registry + Network.Ethereum.Transaction + Network.Ethereum.Unit + Paths_web3_ethereum + hs-source-dirs: + tests + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + build-depends: + OneTuple >0.2 && <0.3 + , aeson >1.2 && <1.6 + , base >4.11 && <4.15 + , bytestring >0.10 && <0.11 + , data-default >0.7 && <0.8 + , exceptions >0.8 && <0.11 + , generics-sop >0.3 && <0.6 + , hspec >=2.4.4 && <2.8 + , hspec-contrib >=0.4.0 && <0.6 + , hspec-discover >=2.4.4 && <2.8 + , hspec-expectations >=0.8.2 && <0.9 + , jsonrpc-tinyclient ==1.0.* + , machines >0.6 && <0.8 + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , microlens >0.4 && <0.5 + , microlens-aeson >2.2 && <2.4 + , mtl >2.2 && <2.3 + , relapse >=1.0 && <2.0 + , tagged >0.8 && <0.9 + , template-haskell >2.11 && <2.17 + , text >1.2 && <1.3 + , transformers >0.5 && <0.6 + , vinyl >0.5 && <0.14 + , web3-crypto ==1.0.* + , web3-solidity ==1.0.* + default-language: Haskell2010 diff --git a/packages/hexstring/memory-hexstring.cabal b/packages/hexstring/memory-hexstring.cabal new file mode 100644 index 00000000..f6bb7134 --- /dev/null +++ b/packages/hexstring/memory-hexstring.cabal @@ -0,0 +1,44 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: memory-hexstring +version: 1.0.0.0 +synopsis: Hex-string type for Haskell Web3 library. +description: Client library for Third Generation of Web. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Data.ByteArray.HexString + Data.ByteArray.HexString.Convert + Data.ByteArray.HexString.Internal + Data.ByteArray.HexString.TH + other-modules: + Paths_memory_hexstring + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + aeson >1.2 && <1.6 + , base >4.11 && <4.15 + , bytestring >0.10 && <0.11 + , memory >0.14 && <0.16 + , scale ==1.0.* + , template-haskell >2.11 && <2.17 + , text >1.2 && <1.3 + default-language: Haskell2010 diff --git a/packages/ipfs/web3-ipfs.cabal b/packages/ipfs/web3-ipfs.cabal new file mode 100644 index 00000000..4ce79514 --- /dev/null +++ b/packages/ipfs/web3-ipfs.cabal @@ -0,0 +1,68 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: web3-ipfs +version: 1.0.0.0 +synopsis: IPFS support for Haskell Web3 library. +description: Client library for Third Generation of Web. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Network.Ipfs.Api.Bitswap + Network.Ipfs.Api.Block + Network.Ipfs.Api.Bootstrap + Network.Ipfs.Api.Cid + Network.Ipfs.Api.Config + Network.Ipfs.Api.Core + Network.Ipfs.Api.Dag + Network.Ipfs.Api.Dht + Network.Ipfs.Api.Files + Network.Ipfs.Api.Internal + Network.Ipfs.Api.Internal.Call + Network.Ipfs.Api.Internal.Stream + Network.Ipfs.Api.Key + Network.Ipfs.Api.Log + Network.Ipfs.Api.Object + Network.Ipfs.Api.Pin + Network.Ipfs.Api.Pubsub + Network.Ipfs.Api.Repo + Network.Ipfs.Api.Stats + Network.Ipfs.Api.Swarm + Network.Ipfs.Api.Types + Network.Ipfs.Api.Types.Stream + Network.Ipfs.Client + other-modules: + Paths_web3_ipfs + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + aeson >1.2 && <1.6 + , base >4.11 && <4.15 + , bytestring >0.10 && <0.11 + , http-client >0.5 && <0.7 + , http-media >0.6 && <0.8.1 + , http-types >0.11 && <0.14 + , mtl >2.2 && <2.3 + , servant >0.12 && <0.19 + , servant-client >0.12 && <0.19 + , tar >0.4 && <0.6 + , text >1.2 && <1.3 + , unordered-containers >0.1 && <0.3 + default-language: Haskell2010 diff --git a/packages/jsonrpc/jsonrpc-tinyclient.cabal b/packages/jsonrpc/jsonrpc-tinyclient.cabal new file mode 100644 index 00000000..96a709c1 --- /dev/null +++ b/packages/jsonrpc/jsonrpc-tinyclient.cabal @@ -0,0 +1,44 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: jsonrpc-tinyclient +version: 1.0.0.0 +synopsis: Tiny JSON-RPC client for Haskell Web3 library. +description: Minimalistic JSON-RPC client, inspired by haxr library. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Network.JsonRpc.TinyClient + other-modules: + Paths_jsonrpc_tinyclient + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + aeson >1.2 && <1.6 + , base >4.11 && <4.15 + , bytestring >0.10 && <0.11 + , exceptions >0.8 && <0.11 + , http-client >0.5 && <0.7 + , http-client-tls >0.3 && <0.4 + , mtl >2.2 && <2.3 + , random >1.0 && <1.3 + , text >1.2 && <1.3 + , websockets >0.10 && <0.13 + default-language: Haskell2010 diff --git a/packages/polkadot/web3-polkadot.cabal b/packages/polkadot/web3-polkadot.cabal new file mode 100644 index 00000000..77c68342 --- /dev/null +++ b/packages/polkadot/web3-polkadot.cabal @@ -0,0 +1,176 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: web3-polkadot +version: 1.0.0.0 +synopsis: Polkadot support for Haskell Web3 library. +description: Client library for Third Generation of Web. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Network.Polkadot + Network.Polkadot.Account + Network.Polkadot.Call + Network.Polkadot.Crypto + Network.Polkadot.Extrinsic + Network.Polkadot.Extrinsic.Era + Network.Polkadot.Extrinsic.Payload + Network.Polkadot.Extrinsic.SignedExtension + Network.Polkadot.Extrinsic.SignedExtension.System + Network.Polkadot.Extrinsic.SignedExtension.TransactionPayment + Network.Polkadot.Extrinsic.Unchecked + Network.Polkadot.Metadata + Network.Polkadot.Metadata.MagicNumber + Network.Polkadot.Metadata.Type + Network.Polkadot.Metadata.Type.Ast + Network.Polkadot.Metadata.Type.Discovery + Network.Polkadot.Metadata.Type.Parser + Network.Polkadot.Metadata.Type.ParserCombinators + Network.Polkadot.Metadata.V10 + Network.Polkadot.Metadata.V11 + Network.Polkadot.Metadata.V12 + Network.Polkadot.Metadata.V13 + Network.Polkadot.Metadata.V9 + Network.Polkadot.Primitives + Network.Polkadot.Query + Network.Polkadot.Rpc.Account + Network.Polkadot.Rpc.Author + Network.Polkadot.Rpc.Babe + Network.Polkadot.Rpc.Chain + Network.Polkadot.Rpc.Childstate + Network.Polkadot.Rpc.Contracts + Network.Polkadot.Rpc.Engine + Network.Polkadot.Rpc.Grandpa + Network.Polkadot.Rpc.Offchain + Network.Polkadot.Rpc.Payment + Network.Polkadot.Rpc.Rpc + Network.Polkadot.Rpc.State + Network.Polkadot.Rpc.System + Network.Polkadot.Rpc.Types + Network.Polkadot.Storage + Network.Polkadot.Storage.Key + other-modules: + Paths_web3_polkadot + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + aeson >1.2 && <1.6 + , animalcase >0.1 && <0.2 + , base >4.11 && <4.15 + , base58-bytestring ==0.1.* + , bytestring >0.10 && <0.11 + , containers >0.6 && <0.7 + , cryptonite >0.22 && <0.30 + , generics-sop >0.3 && <0.6 + , jsonrpc-tinyclient ==1.0.* + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , microlens >0.4 && <0.5 + , microlens-mtl >0.2 && <0.3 + , microlens-th >0.4 && <0.5 + , mtl >2.2 && <2.3 + , parsec >3.0 && <3.2 + , scale ==1.0.* + , text >1.2 && <1.3 + , web3-bignum ==1.0.* + , web3-crypto ==1.0.* + default-language: Haskell2010 + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Network.Polkadot.Test.AccountSpec + Network.Polkadot.Test.ExtrinsicSpec + Network.Polkadot.Test.MetadataSpec + Network.Polkadot.Test.StorageSpec + Network.Polkadot + Network.Polkadot.Account + Network.Polkadot.Call + Network.Polkadot.Crypto + Network.Polkadot.Extrinsic + Network.Polkadot.Extrinsic.Era + Network.Polkadot.Extrinsic.Payload + Network.Polkadot.Extrinsic.SignedExtension + Network.Polkadot.Extrinsic.SignedExtension.System + Network.Polkadot.Extrinsic.SignedExtension.TransactionPayment + Network.Polkadot.Extrinsic.Unchecked + Network.Polkadot.Metadata + Network.Polkadot.Metadata.MagicNumber + Network.Polkadot.Metadata.Type + Network.Polkadot.Metadata.Type.Ast + Network.Polkadot.Metadata.Type.Discovery + Network.Polkadot.Metadata.Type.Parser + Network.Polkadot.Metadata.Type.ParserCombinators + Network.Polkadot.Metadata.V10 + Network.Polkadot.Metadata.V11 + Network.Polkadot.Metadata.V12 + Network.Polkadot.Metadata.V13 + Network.Polkadot.Metadata.V9 + Network.Polkadot.Primitives + Network.Polkadot.Query + Network.Polkadot.Rpc.Account + Network.Polkadot.Rpc.Author + Network.Polkadot.Rpc.Babe + Network.Polkadot.Rpc.Chain + Network.Polkadot.Rpc.Childstate + Network.Polkadot.Rpc.Contracts + Network.Polkadot.Rpc.Engine + Network.Polkadot.Rpc.Grandpa + Network.Polkadot.Rpc.Offchain + Network.Polkadot.Rpc.Payment + Network.Polkadot.Rpc.Rpc + Network.Polkadot.Rpc.State + Network.Polkadot.Rpc.System + Network.Polkadot.Rpc.Types + Network.Polkadot.Storage + Network.Polkadot.Storage.Key + Paths_web3_polkadot + hs-source-dirs: + tests + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + build-depends: + aeson >1.2 && <1.6 + , animalcase >0.1 && <0.2 + , base >4.11 && <4.15 + , base58-bytestring ==0.1.* + , bytestring >0.10 && <0.11 + , containers >0.6 && <0.7 + , cryptonite >0.22 && <0.30 + , generics-sop >0.3 && <0.6 + , hspec >=2.4.4 && <2.8 + , hspec-contrib >=0.4.0 && <0.6 + , hspec-discover >=2.4.4 && <2.8 + , hspec-expectations >=0.8.2 && <0.9 + , hspec-expectations-json >=1.0.0 && <1.1 + , jsonrpc-tinyclient ==1.0.* + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , microlens >0.4 && <0.5 + , microlens-mtl >0.2 && <0.3 + , microlens-th >0.4 && <0.5 + , mtl >2.2 && <2.3 + , parsec >3.0 && <3.2 + , scale ==1.0.* + , text >1.2 && <1.3 + , web3-bignum ==1.0.* + , web3-crypto ==1.0.* + default-language: Haskell2010 diff --git a/packages/provider/web3-provider.cabal b/packages/provider/web3-provider.cabal new file mode 100644 index 00000000..aac1c4c2 --- /dev/null +++ b/packages/provider/web3-provider.cabal @@ -0,0 +1,45 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: web3-provider +version: 1.0.0.0 +synopsis: Node connection provider for Haskell Web3 library. +description: This package contains general Web3 node adapters and connection helpers. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Network.Web3.Provider + other-modules: + Paths_web3_provider + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + async >2.1 && <2.3 + , base >4.11 && <4.15 + , data-default >0.7 && <0.8 + , exceptions >0.8 && <0.11 + , http-client >0.5 && <0.7 + , jsonrpc-tinyclient ==1.0.* + , mtl >2.2 && <2.3 + , network >2.5 && <3.2 + , text >1.2 && <1.3 + , transformers >0.5 && <0.6 + , websockets >0.10 && <0.13 + default-language: Haskell2010 diff --git a/packages/scale/scale.cabal b/packages/scale/scale.cabal new file mode 100644 index 00000000..228a45c9 --- /dev/null +++ b/packages/scale/scale.cabal @@ -0,0 +1,88 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: scale +version: 1.0.0.0 +synopsis: SCALE v2.0 codec for Haskell Web3 library. +description: Client library for Third Generation of Web. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Codec.Scale + Codec.Scale.Class + Codec.Scale.Compact + Codec.Scale.Core + Codec.Scale.Generic + Codec.Scale.SingletonEnum + Codec.Scale.Skip + Codec.Scale.TH + other-modules: + Paths_scale + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + base >4.11 && <4.15 + , bitvec >1.0 && <2.0 + , bytestring >0.10 && <0.11 + , cereal >0.5 && <0.6 + , data-default >0.7 && <0.8 + , generics-sop >0.3 && <0.6 + , memory >0.14 && <0.16 + , template-haskell >2.11 && <2.17 + , text >1.2 && <1.3 + , vector >0.12 && <0.13 + default-language: Haskell2010 + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Codec.Scale.Test.CoreSpec + Codec.Scale.Test.SingleFieldStructSpec + Codec.Scale.Test.SkipSpec + Codec.Scale + Codec.Scale.Class + Codec.Scale.Compact + Codec.Scale.Core + Codec.Scale.Generic + Codec.Scale.SingletonEnum + Codec.Scale.Skip + Codec.Scale.TH + Paths_scale + hs-source-dirs: + tests + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + build-depends: + base >4.11 && <4.15 + , bitvec >1.0 && <2.0 + , bytestring >0.10 && <0.11 + , cereal >0.5 && <0.6 + , data-default >0.7 && <0.8 + , generics-sop >0.3 && <0.6 + , hspec >=2.4.4 && <2.8 + , hspec-contrib >=0.4.0 && <0.6 + , hspec-discover >=2.4.4 && <2.8 + , hspec-expectations >=0.8.2 && <0.9 + , memory >0.14 && <0.16 + , template-haskell >2.11 && <2.17 + , text >1.2 && <1.3 + , vector >0.12 && <0.13 + default-language: Haskell2010 diff --git a/packages/solidity/web3-solidity.cabal b/packages/solidity/web3-solidity.cabal new file mode 100644 index 00000000..2f5449aa --- /dev/null +++ b/packages/solidity/web3-solidity.cabal @@ -0,0 +1,117 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: web3-solidity +version: 1.0.0.0 +synopsis: Solidity language for Haskell Web3 library. +description: This package contains Solidity parsec-based parser and primitive types. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Data.Solidity.Abi + Data.Solidity.Abi.Codec + Data.Solidity.Abi.Generic + Data.Solidity.Event + Data.Solidity.Event.Internal + Data.Solidity.Prim + Data.Solidity.Prim.Address + Data.Solidity.Prim.Bool + Data.Solidity.Prim.Bytes + Data.Solidity.Prim.Int + Data.Solidity.Prim.List + Data.Solidity.Prim.String + Data.Solidity.Prim.Tagged + Data.Solidity.Prim.Tuple + Data.Solidity.Prim.Tuple.TH + Language.Solidity.Abi + other-modules: + Paths_web3_solidity + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + OneTuple >0.2 && <0.3 + , aeson >1.2 && <1.6 + , base >4.11 && <4.15 + , basement >0.0 && <0.1 + , bytestring >0.10 && <0.11 + , cereal >0.5 && <0.6 + , data-default >0.7 && <0.8 + , generics-sop >0.3 && <0.6 + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , microlens >0.4 && <0.5 + , parsec >3.1 && <3.2 + , tagged >0.8 && <0.9 + , template-haskell >2.11 && <2.17 + , text >1.2 && <1.3 + , web3-crypto ==1.0.* + default-language: Haskell2010 + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Data.Solidity.Test.AddressSpec + Data.Solidity.Test.EncodingSpec + Data.Solidity.Test.IntSpec + Language.Solidity.Test.AbiSpec + Data.Solidity.Abi + Data.Solidity.Abi.Codec + Data.Solidity.Abi.Generic + Data.Solidity.Event + Data.Solidity.Event.Internal + Data.Solidity.Prim + Data.Solidity.Prim.Address + Data.Solidity.Prim.Bool + Data.Solidity.Prim.Bytes + Data.Solidity.Prim.Int + Data.Solidity.Prim.List + Data.Solidity.Prim.String + Data.Solidity.Prim.Tagged + Data.Solidity.Prim.Tuple + Data.Solidity.Prim.Tuple.TH + Language.Solidity.Abi + Paths_web3_solidity + hs-source-dirs: + tests + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + build-depends: + OneTuple >0.2 && <0.3 + , aeson >1.2 && <1.6 + , base >4.11 && <4.15 + , basement >0.0 && <0.1 + , bytestring >0.10 && <0.11 + , cereal >0.5 && <0.6 + , data-default >0.7 && <0.8 + , generics-sop >0.3 && <0.6 + , hspec >=2.4.4 && <2.8 + , hspec-contrib >=0.4.0 && <0.6 + , hspec-discover >=2.4.4 && <2.8 + , hspec-expectations >=0.8.2 && <0.9 + , memory >0.14 && <0.16 + , memory-hexstring ==1.0.* + , microlens >0.4 && <0.5 + , parsec >3.1 && <3.2 + , tagged >0.8 && <0.9 + , template-haskell >2.11 && <2.17 + , text >1.2 && <1.3 + , web3-crypto ==1.0.* + default-language: Haskell2010 diff --git a/packages/web3/web3.cabal b/packages/web3/web3.cabal new file mode 100644 index 00000000..0fc90e52 --- /dev/null +++ b/packages/web3/web3.cabal @@ -0,0 +1,38 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.6. +-- +-- see: https://github.com/sol/hpack + +name: web3 +version: 1.0.0.0 +synopsis: Haskell Web3 library. +description: Client library for Third Generation of Web. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +license-file: LICENSE +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +library + exposed-modules: + Network.Web3 + other-modules: + Paths_web3 + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + base >4.11 && <4.15 + , web3-ethereum ==1.0.* + , web3-polkadot ==1.0.* + , web3-provider ==1.0.* + default-language: Haskell2010 From a63bb5f23185aa605a200cc46266d418903593b9 Mon Sep 17 00:00:00 2001 From: AriFordsham <37623136+AriFordsham@users.noreply.github.com> Date: Sun, 13 Feb 2022 05:59:49 +0000 Subject: [PATCH 210/237] Haddock fix (#124) * Added .cabal files to repo See: https://docs.haskellstack.org/en/stable/stack_yaml_vs_cabal_package_file/#should-i-check-in-generated-cabal-files https://github.com/commercialhaskell/stack/issues/5210 * Fix haddock build --- packages/polkadot/src/Network/Polkadot/Storage/Key.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs index 980abc99..93cf70d3 100644 --- a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs +++ b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs @@ -35,7 +35,7 @@ import Network.Polkadot.Metadata.V13 (NMapType (..), -- | General type wrapper for SCALE encodable storage index argument. data Argument where Argument :: Encode a => a -> Argument - -- ^ Wrapped type should be encodable. + -- ^ Wrapped type should be encodable. instance Encode Argument where put arg = case arg of Argument a -> put a From 078bcd35b11e585ad93aa82b5a98fbfa5d02ac52 Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Wed, 16 Mar 2022 18:29:12 +0000 Subject: [PATCH 211/237] fix typo in comment (#128) --- packages/provider/src/Network/Web3/Provider.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/provider/src/Network/Web3/Provider.hs b/packages/provider/src/Network/Web3/Provider.hs index 792e1f3f..02043b01 100644 --- a/packages/provider/src/Network/Web3/Provider.hs +++ b/packages/provider/src/Network/Web3/Provider.hs @@ -45,7 +45,7 @@ newtype Web3 a = Web3 { unWeb3 :: StateT JsonRpcClient IO a } instance JsonRpc Web3 --- | Some peace of error response +-- | Some piece of error response data Web3Error = JsonRpcFail !String | ParserFail !String | UserFail !String From 7d40474832f0a125a2e212b5905b3d04bc6cda0b Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Mon, 2 May 2022 17:04:29 +0100 Subject: [PATCH 212/237] refactor(#127): Alternative implementation for combineEncodedValues (#129) --- .../solidity/src/Data/Solidity/Abi/Generic.hs | 96 +++++++++++-------- 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/packages/solidity/src/Data/Solidity/Abi/Generic.hs b/packages/solidity/src/Data/Solidity/Abi/Generic.hs index 8f2f9a5f..4d061026 100644 --- a/packages/solidity/src/Data/Solidity/Abi/Generic.hs +++ b/packages/solidity/src/Data/Solidity/Abi/Generic.hs @@ -37,44 +37,68 @@ import Data.Solidity.Abi (AbiGet (..), AbiPut (..), AbiType (..), import Data.Solidity.Prim.Int (getWord256, putWord256) data EncodedValue = EncodedValue - { order :: Int64 - , offset :: Maybe Int64 - , encoding :: Put + { evOrder :: Int64 + , evIsDynamic :: Bool + , evEncoding :: Put + , evEncodingLengthInBytes :: Int64 -- cache } instance Eq EncodedValue where - ev1 == ev2 = order ev1 == order ev2 + ev1 == ev2 = evOrder ev1 == evOrder ev2 instance Ord EncodedValue where - compare ev1 ev2 = order ev1 `compare` order ev2 + compare ev1 ev2 = evOrder ev1 `compare` evOrder ev2 +-- from https://docs.soliditylang.org/en/v0.8.12/abi-spec.html#examples +-- +-- if Ti is static: +-- head(X(i)) = enc(X(i)) and tail(X(i)) = "" (the empty string) +-- otherwise, i.e. if Ti is dynamic: +-- head(X(i)) = enc(len( head(X(1)) ... head(X(k)) tail(X(1)) ... tail(X(i-1)) )) tail(X(i)) = enc(X(i)) combineEncodedValues :: [EncodedValue] -> Put combineEncodedValues encodings = - let sortedEs = adjust headsOffset $ L.sort encodings - encodings' = addTailOffsets headsOffset [] sortedEs - in let heads = foldl (\acc EncodedValue{..} -> case offset of - Nothing -> acc <> encoding - Just o -> acc <> putWord256 (fromIntegral o) - ) mempty encodings' - tails = foldl (\acc EncodedValue{..} -> case offset of - Nothing -> acc - Just _ -> acc <> encoding - ) mempty encodings' + let sortedEncodings = L.sort encodings + + wordLengthInBytes :: Int64 + wordLengthInBytes = 32 + + headsOffsetInBytes :: Int64 + headsOffsetInBytes = foldl (+) 0 $ map (\EncodedValue{..} -> if evIsDynamic then wordLengthInBytes else evEncodingLengthInBytes) encodings + + heads = fst $ foldl + (\(accumulator, lengthOfPreviousDynamicValues) EncodedValue{..} -> if evIsDynamic + then ( accumulator <> putWord256 (fromIntegral $ headsOffsetInBytes + lengthOfPreviousDynamicValues) + , lengthOfPreviousDynamicValues + evEncodingLengthInBytes + ) + else ( accumulator <> evEncoding + , lengthOfPreviousDynamicValues + ) + ) + (mempty, 0) + sortedEncodings + tails = foldMap + (\EncodedValue{..} -> if evIsDynamic + then evEncoding + else mempty + ) + sortedEncodings in heads <> tails where - adjust :: Int64 -> [EncodedValue] -> [EncodedValue] - adjust n = map (\ev -> ev {offset = (+) n <$> offset ev}) - addTailOffsets :: Int64 -> [EncodedValue] -> [EncodedValue] -> [EncodedValue] - addTailOffsets init' acc es = case es of - [] -> reverse acc - (e : tail') -> case offset e of - Nothing -> addTailOffsets init' (e : acc) tail' - Just _ -> addTailOffsets init' (e : acc) (adjust (LBS.length . runPutLazy . encoding $ e) tail') - headsOffset :: Int64 - headsOffset = foldl (\acc e -> case offset e of - Nothing -> acc + (LBS.length . runPutLazy . encoding $ e) - Just _ -> acc + 32 - ) 0 encodings + +-- aIsDynamic is a variable because of https://github.com/airalab/hs-web3/pull/129#issuecomment-1074045478 +-- TODO: call the `isDynamic` function in the `mkEncodedValue` function +mkEncodedValue :: (AbiType a, AbiPut a) => [EncodedValue] -> a -> Bool -> EncodedValue +mkEncodedValue otherEncodedArray a aIsDynamic = + let encoding = abiPut a + in EncodedValue + { evEncoding = encoding + , evOrder = fromInteger . toInteger . L.length $ otherEncodedArray + , evIsDynamic = aIsDynamic + , evEncodingLengthInBytes = lengthInBytes encoding + } + where + lengthInBytes :: Put -> Int64 + lengthInBytes e = LBS.length . runPutLazy $ e class AbiData a where _serialize :: [EncodedValue] -> a -> [EncodedValue] @@ -82,20 +106,8 @@ class AbiData a where instance AbiData (NP f '[]) where _serialize encoded _ = encoded -instance (AbiType b, AbiPut b, AbiData (NP I as)) => AbiData (NP I (b :as)) where - _serialize encoded (I b :* a) = - if isDynamic (Proxy :: Proxy b) - then _serialize (dynEncoding : encoded) a - else _serialize (staticEncoding : encoded) a - where - staticEncoding = EncodedValue { encoding = abiPut b - , offset = Nothing - , order = 1 + (fromInteger . toInteger . L.length $ encoded) - } - dynEncoding = EncodedValue { encoding = abiPut b - , offset = Just 0 - , order = 1 + (fromInteger . toInteger . L.length $ encoded) - } +instance (AbiType b, AbiPut b, AbiData (NP I as)) => AbiData (NP I (b : as)) where + _serialize encoded (I b :* a) = _serialize (mkEncodedValue encoded b (isDynamic (Proxy :: Proxy b)) : encoded) a instance AbiData (NP f as) => GenericAbiPut (SOP f '[as]) where gAbiPut (SOP (Z a)) = combineEncodedValues $ _serialize [] a From b6d863d7388065c13318b44412b59f8ac1c33395 Mon Sep 17 00:00:00 2001 From: Stephen Blackheath Date: Tue, 3 May 2022 05:05:31 +1300 Subject: [PATCH 213/237] Add support for Solidity error declarations. (#126) * Add support for Solidity error declarations. * Throw an error when the type of a tuple is neither "tuple" not "tuple[]" Co-authored-by: Stephen Blackheath --- .../solidity/src/Data/Solidity/Prim/List.hs | 27 ++++++++- .../solidity/src/Language/Solidity/Abi.hs | 56 ++++++++++++------- 2 files changed, 60 insertions(+), 23 deletions(-) diff --git a/packages/solidity/src/Data/Solidity/Prim/List.hs b/packages/solidity/src/Data/Solidity/Prim/List.hs index 1b3f9f21..348043f0 100644 --- a/packages/solidity/src/Data/Solidity/Prim/List.hs +++ b/packages/solidity/src/Data/Solidity/Prim/List.hs @@ -1,6 +1,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE ScopedTypeVariables #-} -- | -- Module : Data.Solidity.Prim.List @@ -23,7 +24,13 @@ module Data.Solidity.Prim.List import Basement.Nat (NatWithinBound) import Basement.Sized.List (ListN, toListN_, unListN) import qualified Basement.Sized.List as SL (mapM_, replicateM) -import Control.Monad (replicateM) +import Basement.Types.Word256 (Word256) +import Control.Monad (replicateM, mapM_, forM) +import qualified Data.ByteString as B +import Data.List (init, scanl') +import Data.Proxy (Proxy (..)) +import Data.Serialize.Put (runPut, putByteString) +import Data.Serialize.Get (skip, lookAhead) import GHC.Exts (IsList (..)) import GHC.TypeLits (KnownNat) @@ -35,11 +42,25 @@ instance AbiType [a] where instance AbiPut a => AbiPut [a] where abiPut l = do putWord256 $ fromIntegral (length l) - foldMap abiPut l + if isDynamic (Proxy :: Proxy a) then do + let encs = map (runPut . abiPut) l + lengths = map ((fromIntegral :: Int -> Word256) . B.length) encs + offsets = init $ scanl' (+) (fromIntegral (0x20 * length l)) lengths + mapM_ putWord256 offsets + mapM_ putByteString encs + else + foldMap abiPut l instance AbiGet a => AbiGet [a] where abiGet = do len <- fromIntegral <$> getWord256 - replicateM len abiGet + if isDynamic (Proxy :: Proxy a) then do + offsets <- replicateM len getWord256 + let currentOffset = 0x20 * len + forM offsets $ \dataOffset -> lookAhead $ do + skip (fromIntegral dataOffset - currentOffset) + abiGet + else + replicateM len abiGet instance AbiType (ListN n a) where isDynamic _ = False diff --git a/packages/solidity/src/Language/Solidity/Abi.hs b/packages/solidity/src/Language/Solidity/Abi.hs index 607d361f..c4cc3c88 100644 --- a/packages/solidity/src/Language/Solidity/Abi.hs +++ b/packages/solidity/src/Language/Solidity/Abi.hs @@ -109,6 +109,11 @@ data Declaration = DConstructor , eveAnonymous :: Bool -- ^ Event } + | DError + { errName :: Text + , errInputs :: [FunctionArg] + -- ^ Error + } | DFallback { falPayable :: Bool -- ^ Fallback function @@ -119,6 +124,7 @@ instance Eq Declaration where (DConstructor a) == (DConstructor b) = length a == length b (DFunction a _ _ _) == (DFunction b _ _ _) = a == b (DEvent a _ _) == (DEvent b _ _) = a == b + (DError a _) == (DError b _) = a == b (DFallback _) == (DFallback _) = True (==) _ _ = False @@ -126,23 +132,33 @@ instance Ord Declaration where compare (DConstructor a) (DConstructor b) = compare (length a) (length b) compare (DFunction a _ _ _) (DFunction b _ _ _) = compare a b compare (DEvent a _ _) (DEvent b _ _) = compare a b + compare (DError a _) (DError b _) = compare a b compare (DFallback _) (DFallback _) = EQ compare DConstructor {} DFunction {} = LT compare DConstructor {} DEvent {} = LT + compare DConstructor {} DError {} = LT compare DConstructor {} DFallback {} = LT compare DFunction {} DConstructor {} = GT compare DFunction {} DEvent {} = LT + compare DFunction {} DError {} = LT compare DFunction {} DFallback {} = LT compare DEvent {} DConstructor {} = GT compare DEvent {} DFunction {} = GT + compare DEvent {} DError {} = LT compare DEvent {} DFallback {} = LT + compare DError {} DConstructor {} = GT + compare DError {} DFunction {} = GT + compare DError {} DEvent {} = GT + compare DError {} DFallback {} = LT + compare DFallback {} DConstructor {} = GT compare DFallback {} DFunction {} = GT compare DFallback {} DEvent {} = GT + compare DFallback {} DError {} = GT instance FromJSON Declaration where parseJSON = withObject "Declaration" $ \o -> do @@ -151,6 +167,7 @@ instance FromJSON Declaration where "fallback" -> DFallback <$> o .: "payable" "constructor" -> DConstructor <$> o .: "inputs" "event" -> DEvent <$> o .: "name" <*> o .: "inputs" <*> o .: "anonymous" + "error" -> DError <$> o .: "name" <*> o .: "inputs" "function" -> DFunction <$> o .: "name" <*> parseSm o <*> o .: "inputs" <*> o .:? "outputs" _ -> fail "value of 'type' not recognized" where @@ -207,28 +224,23 @@ showMethod x = case x of ["\t\t" <> methodId x <> " " <> signature x] _ -> [] +funArgs :: [FunctionArg] -> Text +funArgs [] = "" +funArgs [x] = funArgType x +funArgs (x:xs) = case funArgComponents x of + Nothing -> funArgType x <> "," <> funArgs xs + Just cmps -> case funArgType x of + "tuple" -> "(" <> funArgs cmps <> ")," <> funArgs xs + "tuple[]" -> "[(" <> funArgs cmps <> ")]," <> funArgs xs + typ -> error $ "Unexpected type " ++ T.unpack typ ++ " - expected tuple or tuple[]" + -- | Take a signature by given decl, e.g. foo(uint,string) signature :: Declaration -> Text -signature (DConstructor inputs) = "(" <> args inputs <> ")" - where - args [] = "" - args [x] = funArgType x - args (x:xs) = case funArgComponents x of - Nothing -> funArgType x <> "," <> args xs - Just cmps -> "(" <> args cmps <> ")," <> args xs - +signature (DConstructor inputs) = "(" <> funArgs inputs <> ")" signature (DFallback _) = "()" - -signature (DFunction name _ inputs _) = name <> "(" <> args inputs <> ")" - where - args :: [FunctionArg] -> Text - args [] = "" - args [x] = funArgType x - args (x:xs) = case funArgComponents x of - Nothing -> funArgType x <> "," <> args xs - Just cmps -> "(" <> args cmps <> ")," <> args xs - +signature (DFunction name _ inputs _) = name <> "(" <> funArgs inputs <> ")" +signature (DError name inputs) = name <> "(" <> funArgs inputs <> ")" signature (DEvent name inputs _) = name <> "(" <> args inputs <> ")" where args :: [EventArg] -> Text @@ -329,8 +341,12 @@ solidityTypeParser = parseSolidityFunctionArgType :: FunctionArg -> Either ParseError SolidityType parseSolidityFunctionArgType (FunctionArg _ typ mcmps) = case mcmps of Nothing -> parse solidityTypeParser "Solidity" typ - Just cmps -> SolidityTuple <$> mapM parseSolidityFunctionArgType cmps - + Just cmps -> do + tpl <- SolidityTuple <$> mapM parseSolidityFunctionArgType cmps + case typ of + "tuple" -> return tpl + "tuple[]" -> return $ SolidityArray tpl + _ -> error $ "Unexpected type " ++ T.unpack typ ++ " - expected tuple or tuple[]" parseSolidityEventArgType :: EventArg -> Either ParseError SolidityType parseSolidityEventArgType (EventArg _ typ _) = parse solidityTypeParser "Solidity" typ From 49b920384b025ab7de0f9fce3efe9f471d95e71f Mon Sep 17 00:00:00 2001 From: pkozakowski <59868637+pkozakowski@users.noreply.github.com> Date: Mon, 2 May 2022 18:06:39 +0200 Subject: [PATCH 214/237] Implement transaction timeouts. (#122) * Implement transaction timeouts. * Remove the redundant getTimeout. * Make send return an Either instead of throwing TransactionTimeout. * Fix a name shadowing. --- .../ethereum/src/Network/Ethereum/Account.hs | 3 +- .../src/Network/Ethereum/Account/Class.hs | 5 +-- .../src/Network/Ethereum/Account/Default.hs | 3 +- .../src/Network/Ethereum/Account/Internal.hs | 32 ++++++++++++++----- .../src/Network/Ethereum/Account/LocalKey.hs | 2 +- .../src/Network/Ethereum/Account/Personal.hs | 4 +-- .../src/Network/Ethereum/Account/Safe.hs | 12 +++++-- .../ethereum/src/Network/Ethereum/Contract.hs | 12 +++++-- .../src/Network/Ethereum/Contract/TH.hs | 4 ++- 9 files changed, 55 insertions(+), 22 deletions(-) diff --git a/packages/ethereum/src/Network/Ethereum/Account.hs b/packages/ethereum/src/Network/Ethereum/Account.hs index b1916188..13c57f3c 100644 --- a/packages/ethereum/src/Network/Ethereum/Account.hs +++ b/packages/ethereum/src/Network/Ethereum/Account.hs @@ -40,13 +40,14 @@ module Network.Ethereum.Account , gasPrice , block , account + , timeout ) where import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Account.Default (DefaultAccount) import Network.Ethereum.Account.Internal (account, block, gasLimit, - gasPrice, to, value, + gasPrice, timeout, to, value, withParam) import Network.Ethereum.Account.LocalKey (LocalKey (..), LocalKeyAccount) diff --git a/packages/ethereum/src/Network/Ethereum/Account/Class.hs b/packages/ethereum/src/Network/Ethereum/Account/Class.hs index c4736be1..80104183 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Class.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Class.hs @@ -17,6 +17,7 @@ module Network.Ethereum.Account.Class where import Control.Monad.Trans (MonadTrans) +import Data.ByteArray.HexString (HexString) import Data.Solidity.Abi (AbiGet) import Network.Ethereum.Api.Types (TxReceipt) import Network.Ethereum.Contract.Method (Method) @@ -43,8 +44,8 @@ class MonadTrans t => Account a t | t -> a where send :: (JsonRpc m, Method args) => args -- ^ Contract method arguments - -> t m TxReceipt - -- ^ Receipt of sended transaction + -> t m (Either HexString TxReceipt) + -- ^ Receipt of the sent transaction, or transaction hash in case of a timeout -- | Call constant method of contract, like a 'read' command call :: (JsonRpc m, Method args, AbiGet result) diff --git a/packages/ethereum/src/Network/Ethereum/Account/Default.hs b/packages/ethereum/src/Network/Ethereum/Account/Default.hs index 198c4c75..e13118ba 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Default.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Default.hs @@ -45,6 +45,7 @@ instance Account () DefaultAccount where send (args :: a) = do c <- getCall + timeout <- _timeout <$> get lift $ do accounts <- Eth.accounts let dat = selector (Proxy :: Proxy a) <> encode args @@ -57,7 +58,7 @@ instance Account () DefaultAccount where gasLimit <- Eth.estimateGas params return $ params { callGas = Just gasLimit } - getReceipt =<< Eth.sendTransaction params' + getReceipt timeout =<< Eth.sendTransaction params' call (args :: a) = do c <- getCall diff --git a/packages/ethereum/src/Network/Ethereum/Account/Internal.hs b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs index 6597dc2a..cae4688a 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Internal.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs @@ -23,6 +23,7 @@ import Control.Monad.State.Strict (MonadState (..), StateT (..), withStateT) import Control.Monad.Trans (MonadTrans (..)) import Data.Default (Default (..)) +import Data.Either (fromRight) import Data.Maybe (fromMaybe) import Lens.Micro (Lens', lens) @@ -52,6 +53,8 @@ data CallParam p = CallParam -- ^ Call block number , _account :: p -- ^ Account params to sign transaction + , _timeout :: Maybe Int + -- ^ Transaction timeout in microseconds } deriving Eq -- | Transaction recipient lens @@ -78,6 +81,10 @@ block = lens _block $ \a b -> a { _block = b } account :: Lens' (CallParam p) p account = lens _account $ \a b -> a { _account = b } +-- | Transaction timeout lens +timeout :: Lens' (CallParam p) (Maybe Int) +timeout = lens _timeout $ \a b -> a { _timeout = b } + -- | Monad transformer for sending parametrized transactions from account newtype AccountT p m a = AccountT { runAccountT :: StateT (CallParam p) m a } @@ -104,7 +111,7 @@ withParam f m = AccountT $ withStateT f $ runAccountT m defaultCallParam :: a -> CallParam a {-# INLINE defaultCallParam #-} -defaultCallParam = CallParam def 0 Nothing Nothing Latest +defaultCallParam acc = CallParam def 0 Nothing Nothing Latest acc Nothing getCall :: MonadState (CallParam p) m => m Call getCall = do @@ -115,16 +122,25 @@ getCall = do , callGasPrice = fromInteger <$> _gasPrice } -getReceipt :: JsonRpc m => HexString -> m TxReceipt -getReceipt tx = do +getReceipt :: JsonRpc m => Maybe Int -> HexString -> m (Either HexString TxReceipt) +getReceipt mbtimeout tx = do mbreceipt <- Eth.getTransactionReceipt tx case mbreceipt of - Just receipt -> return receipt - Nothing -> do + Just receipt -> return $ Right receipt + Nothing -> case mbtimeout of + Just us + | us > 0 -> retry $ Just $ us - 100000 + | otherwise -> return $ Left tx + Nothing -> retry Nothing + where + retry mbtimeout' = do liftIO $ threadDelay 100000 - -- TODO: avoid inifinite loop - getReceipt tx + getReceipt mbtimeout' tx + +getReceipt' :: JsonRpc m => HexString -> m TxReceipt +getReceipt' = fmap (fromRight undefined) . getReceipt Nothing updateReceipt :: JsonRpc m => TxReceipt -> m TxReceipt {-# INLINE updateReceipt #-} -updateReceipt = getReceipt . receiptTransactionHash +-- No timeout, because we update the receipt of an already processed transaction. +updateReceipt = getReceipt' . receiptTransactionHash diff --git a/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs b/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs index 647fcd5c..c9655682 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs @@ -82,7 +82,7 @@ instance Account LocalKey LocalKeyAccount where let packer = encodeTransaction params' (localKeyChainId _account) signed = signTransaction packer (localKeyPrivate _account) - lift $ getReceipt =<< Eth.sendRawTransaction signed + lift $ getReceipt _timeout =<< Eth.sendRawTransaction signed call (args :: a) = do CallParam{..} <- get diff --git a/packages/ethereum/src/Network/Ethereum/Account/Personal.hs b/packages/ethereum/src/Network/Ethereum/Account/Personal.hs index e5ea588b..f8f320cb 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Personal.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Personal.hs @@ -70,12 +70,12 @@ instance Account Personal PersonalAccount where gasLimit <- Eth.estimateGas params return $ params { callGas = Just gasLimit } - getReceipt =<< Personal.sendTransaction params' (personalPassphrase _account) + getReceipt _timeout =<< Personal.sendTransaction params' (personalPassphrase _account) call (args :: a) = do s <- get case s of - CallParam _ _ _ _ block (Personal address _) -> do + CallParam _ _ _ _ block (Personal address _) _ -> do c <- getCall let dat = selector (Proxy :: Proxy a) <> encode args params = c { callFrom = Just address, callData = Just $ BA.convert dat } diff --git a/packages/ethereum/src/Network/Ethereum/Account/Safe.hs b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs index 56e67621..e4790e7d 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Safe.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs @@ -17,6 +17,7 @@ module Network.Ethereum.Account.Safe where import Control.Concurrent (threadDelay) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans (lift) +import Data.ByteArray.HexString (HexString) import Network.Ethereum.Account.Class (Account (send)) import Network.Ethereum.Account.Internal (updateReceipt) @@ -32,10 +33,15 @@ safeSend :: (Account p t, JsonRpc m, Method args, Monad (t m)) -- ^ Confirmation in blocks -> args -- ^ Contract method arguments - -> t m TxReceipt - -- ^ Receipt of sended transaction -safeSend b a = lift . waiting =<< send a + -> t m (Either HexString TxReceipt) + -- ^ Receipt of the sent transaction, or transaction data in case of a timeout +safeSend b a = lift . withReceipt waiting =<< send a where + withReceipt f receiptOrTx = + case receiptOrTx of + Left tx -> return $ Left tx + Right receipt -> Right <$> f receipt + waiting receipt = case receiptBlockNumber receipt of Nothing -> do diff --git a/packages/ethereum/src/Network/Ethereum/Contract.hs b/packages/ethereum/src/Network/Ethereum/Contract.hs index 449eae31..a90ee11d 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract.hs @@ -43,6 +43,12 @@ class Contract a where new :: (Account p t, JsonRpc m, Method a, Monad (t m)) => a -- ^ Contract constructor - -> t m (Maybe Address) - -- ^ Address of deployed contract when transaction success -new = fmap receiptContractAddress . safeSend safeConfirmations + -> t m (Either HexString (Maybe Address)) + -- ^ Address of deployed contract when transaction success; + -- transaction hash in case of a timeout +new = fmap (mapRight receiptContractAddress) . safeSend safeConfirmations + where + mapRight f e = + case e of + Left x -> Left x + Right y -> Right $ f y diff --git a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs index 46683a30..0b0d74dd 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs @@ -47,6 +47,7 @@ import Control.Applicative ((<|>)) import Control.Monad (replicateM, (<=<)) import qualified Data.Aeson as Aeson (encode) import Data.ByteArray (convert) +import Data.ByteArray.HexString (HexString) import Data.Char (toLower, toUpper) import qualified Data.Char as Char import Data.Default (Default (..)) @@ -175,11 +176,12 @@ funWrapper c name dname args result = do Just [x] -> [t|$t $m $(typeFuncQ x)|] Just xs -> let outs = fmap typeFuncQ xs in [t|$t $m $(foldl appT (tupleT (length xs)) outs)|] + receiptT = [t|$t $m (Either HexString TxReceipt)|] sequence [ sigD name $ [t| (JsonRpc $m, Account $a $t, Functor ($t $m)) => - $(arrowing $ inputT ++ [if c then outputT else [t|$t $m TxReceipt|]]) + $(arrowing $ inputT ++ [if c then outputT else receiptT]) |] , if c then funD' name (varP <$> vars) $ case result of From e6f5cbf8262d42af23cdf520e851c814fcc2573b Mon Sep 17 00:00:00 2001 From: Dai Truong Date: Sat, 30 Jul 2022 01:17:50 +0700 Subject: [PATCH 215/237] Fix: Incorrect methodId & signature when tuple[] is used (#131) --- .../solidity/src/Language/Solidity/Abi.hs | 2 +- .../tests/Language/Solidity/Test/AbiSpec.hs | 67 +++++++++++++------ 2 files changed, 46 insertions(+), 23 deletions(-) diff --git a/packages/solidity/src/Language/Solidity/Abi.hs b/packages/solidity/src/Language/Solidity/Abi.hs index c4cc3c88..1aef40a0 100644 --- a/packages/solidity/src/Language/Solidity/Abi.hs +++ b/packages/solidity/src/Language/Solidity/Abi.hs @@ -231,7 +231,7 @@ funArgs (x:xs) = case funArgComponents x of Nothing -> funArgType x <> "," <> funArgs xs Just cmps -> case funArgType x of "tuple" -> "(" <> funArgs cmps <> ")," <> funArgs xs - "tuple[]" -> "[(" <> funArgs cmps <> ")]," <> funArgs xs + "tuple[]" -> "(" <> funArgs cmps <> ")[]," <> funArgs xs typ -> error $ "Unexpected type " ++ T.unpack typ ++ " - expected tuple or tuple[]" -- | Take a signature by given decl, e.g. foo(uint,string) diff --git a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs index 92210c8e..4fdc5395 100644 --- a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs +++ b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs @@ -3,6 +3,7 @@ module Language.Solidity.Test.AbiSpec where import Data.Either (isLeft) +import Data.Text (Text) import Language.Solidity.Abi import Test.Hspec @@ -21,40 +22,62 @@ spec = parallel $ do let tupleFA = FunctionArg "order" "tuple" Nothing eRes = parseSolidityFunctionArgType tupleFA isLeft eRes `shouldBe` True - describe "signature" $ + describe "signature" $ do it "can generate signature for fillOrder" $ do - let fillOrderDec = buildFillOrderDec - expected = "fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)" + let expected = "fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)" sig = signature fillOrderDec sig `shouldBe` expected - describe "methodId" $ + it "can generate signature for fillManyOrders" $ do + let expected = "fillManyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes)" + sig = signature fillManyOrdersDec + sig `shouldBe` expected + describe "methodId" $ do it "can generate methodId for fillOrder" $ do - let fillOrderDec = buildFillOrderDec - expected = "0xb4be83d5" + let expected = "0xb4be83d5" mId = methodId fillOrderDec mId `shouldBe` expected + it "can generate methodId for fillManyOrders" $ do + let expected = "0xd52e8a68" + mId = methodId fillManyOrdersDec + mId `shouldBe` expected -buildFillOrderDec :: Declaration -buildFillOrderDec = DFunction "fillOrder" False funInputs' funOutputs' +orderTupleComponents :: [(Text, Text)] +orderTupleComponents = + [ ("makerAddress", "address") + , ("takerAddress", "address") + , ("feeRecipientAddress", "address") + , ("senderAddress", "address") + , ("makerAssetAmount", "uint256") + , ("takerAssetAmount", "uint256") + , ("makerFee", "uint256") + , ("takerFee", "uint256") + , ("expirationTimeSeconds", "uint256") + , ("salt", "uint256") + , ("makerAssetData", "bytes") + , ("takerAssetData", "bytes") + ] + +fillOrderDec :: Declaration +fillOrderDec = DFunction "fillOrder" False funInputs' funOutputs' where funInputs' = - [ makeTupleFuncArg ("order", "tuple") tupleComponents + [ makeTupleFuncArg ("order", "tuple") orderTupleComponents , makeBasicFuncArg ("takerAssetFillAmount", "uint256") , makeBasicFuncArg ("signature", "bytes") ] - tupleComponents = - [ ("makerAddress", "address") - , ("takerAddress", "address") - , ("feeRecipientAddress", "address") - , ("senderAddress", "address") - , ("makerAssetAmount", "uint256") - , ("takerAssetAmount", "uint256") - , ("makerFee", "uint256") - , ("takerFee", "uint256") - , ("expirationTimeSeconds", "uint256") - , ("salt", "uint256") - , ("makerAssetData", "bytes") - , ("takerAssetData", "bytes") + funOutputs' = Nothing + makeBasicFuncArg (n,t) = + FunctionArg n t Nothing + makeTupleFuncArg (n,t) cmps = + FunctionArg n t (Just $ map makeBasicFuncArg cmps) + +fillManyOrdersDec :: Declaration +fillManyOrdersDec = DFunction "fillManyOrders" False funInputs' funOutputs' + where + funInputs' = + [ makeTupleFuncArg ("orders", "tuple[]") orderTupleComponents + , makeBasicFuncArg ("takerAssetFillAmount", "uint256") + , makeBasicFuncArg ("signature", "bytes") ] funOutputs' = Nothing makeBasicFuncArg (n,t) = From c242f23b41f0f3ec1542f7b5484d18998dbe3152 Mon Sep 17 00:00:00 2001 From: Eitan Chatav Date: Wed, 7 Sep 2022 06:24:21 -0700 Subject: [PATCH 216/237] Relax Upper Bounds for Dependencies (#135) * Relax upper bounds for GHC9 compatibility * Update Tuple.hs * fix up a bit * remove cabals --- packages/bignum/package.yaml | 10 +++--- packages/bignum/web3-bignum.cabal | 16 +++++----- packages/crypto/package.yaml | 12 +++---- packages/crypto/web3-crypto.cabal | 20 ++++++------ packages/ethereum/package.yaml | 18 +++++------ .../tests/Network/Ethereum/Test/THSpec.hs | 2 +- packages/ethereum/web3-ethereum.cabal | 32 +++++++++---------- packages/hexstring/memory-hexstring.cabal | 12 +++---- packages/hexstring/package.yaml | 10 +++--- packages/ipfs/package.yaml | 12 +++---- packages/ipfs/src/Network/Ipfs/Api/Types.hs | 5 +++ packages/ipfs/web3-ipfs.cabal | 14 ++++---- packages/jsonrpc/jsonrpc-tinyclient.cabal | 10 +++--- packages/jsonrpc/package.yaml | 8 ++--- packages/polkadot/package.yaml | 12 +++---- packages/polkadot/web3-polkadot.cabal | 20 ++++++------ packages/provider/package.yaml | 6 ++-- packages/provider/web3-provider.cabal | 8 ++--- packages/scale/package.yaml | 12 +++---- packages/scale/scale.cabal | 20 ++++++------ packages/solidity/package.yaml | 16 +++++----- .../solidity/src/Data/Solidity/Prim/Tuple.hs | 13 +++++--- .../solidity/src/Language/Solidity/Abi.hs | 11 +++---- .../tests/Data/Solidity/Test/EncodingSpec.hs | 2 +- packages/solidity/web3-solidity.cabal | 28 ++++++++-------- packages/web3/package.yaml | 4 +-- packages/web3/web3.cabal | 6 ++-- stack.yaml | 3 +- 28 files changed, 176 insertions(+), 166 deletions(-) diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index 5aee69c2..5cb65671 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -1,5 +1,5 @@ name: web3-bignum -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Fixed size big integers for Haskell Web3 library. description: This package implements codec instances and other helper functions. github: "airalab/hs-web3" @@ -11,9 +11,9 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - scale >=1.0 && <1.1 -- memory >0.14 && <0.16 +- memory >0.14 && <0.17 - memory-hexstring >=1.0 && <1.1 - cereal >0.5 && <0.6 - wide-word >0.1 && <0.2 @@ -56,9 +56,9 @@ tests: dependencies: - memory-hexstring >=1.0 && <1.1 - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.8 + - hspec-discover >=2.4.4 && <2.9 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.8 + - hspec >=2.4.4 && <2.9 ghc-options: - -threaded - -rtsopts diff --git a/packages/bignum/web3-bignum.cabal b/packages/bignum/web3-bignum.cabal index 18813448..bb525f61 100644 --- a/packages/bignum/web3-bignum.cabal +++ b/packages/bignum/web3-bignum.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: web3-bignum -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Fixed size big integers for Haskell Web3 library. description: This package implements codec instances and other helper functions. category: Network @@ -31,9 +31,9 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.15 + base >4.11 && <4.16 , cereal >0.5 && <0.6 - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , scale ==1.0.* , wide-word >0.1 && <0.2 @@ -51,13 +51,13 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.15 + base >4.11 && <4.16 , cereal >0.5 && <0.6 - , hspec >=2.4.4 && <2.8 + , hspec >=2.4.4 && <2.9 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.8 + , hspec-discover >=2.4.4 && <2.9 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , scale ==1.0.* , wide-word >0.1 && <0.2 diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index 0ec52e9e..212f7b14 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -1,5 +1,5 @@ name: web3-crypto -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Cryptograhical primitives for Haskell Web3 library. description: This package implements Web3 specific cryptography and helper functions. github: "airalab/hs-web3" @@ -15,10 +15,10 @@ extra-source-files: - src/cbits/xxhash.c dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - text >1.2 && <1.3 -- aeson >1.2 && <1.6 -- memory >0.14 && <0.16 +- aeson >1.2 && <2.2 +- memory >0.14 && <0.17 - vector >0.12 && <0.13 - containers >0.6 && <0.7 - uuid-types >1.0 && <1.1 @@ -67,9 +67,9 @@ tests: c-sources: src/cbits/xxhash.c dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.8 + - hspec-discover >=2.4.4 && <2.9 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.8 + - hspec >=2.4.4 && <2.9 ghc-options: - -threaded - -rtsopts diff --git a/packages/crypto/web3-crypto.cabal b/packages/crypto/web3-crypto.cabal index 37b110d6..1c2c5f3e 100644 --- a/packages/crypto/web3-crypto.cabal +++ b/packages/crypto/web3-crypto.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: web3-crypto -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Cryptograhical primitives for Haskell Web3 library. description: This package implements Web3 specific cryptography and helper functions. category: Network @@ -47,12 +47,12 @@ library c-sources: src/cbits/xxhash.c build-depends: - aeson >1.2 && <1.6 - , base >4.11 && <4.15 + aeson >1.2 && <2.2 + , base >4.11 && <4.16 , bytestring >0.10 && <0.11 , containers >0.6 && <0.7 , cryptonite >0.22 && <0.30 - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , text >1.2 && <1.3 , uuid-types >1.0 && <1.1 @@ -88,16 +88,16 @@ test-suite tests c-sources: src/cbits/xxhash.c build-depends: - aeson >1.2 && <1.6 - , base >4.11 && <4.15 + aeson >1.2 && <2.2 + , base >4.11 && <4.16 , bytestring >0.10 && <0.11 , containers >0.6 && <0.7 , cryptonite >0.22 && <0.30 - , hspec >=2.4.4 && <2.8 + , hspec >=2.4.4 && <2.9 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.8 + , hspec-discover >=2.4.4 && <2.9 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , text >1.2 && <1.3 , uuid-types >1.0 && <1.1 diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index 001f4b6b..ce962542 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -1,5 +1,5 @@ name: web3-ethereum -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Ethereum support for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -11,14 +11,14 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - text >1.2 && <1.3 - vinyl >0.5 && <0.14 -- aeson >1.2 && <1.6 +- aeson >1.2 && <2.2 - tagged >0.8 && <0.9 -- memory >0.14 && <0.16 +- memory >0.14 && <0.17 - relapse >=1.0 && <2.0 -- OneTuple >0.2 && <0.3 +- OneTuple >0.2 && <0.4 - machines >0.6 && <0.8 - microlens >0.4 && <0.5 - bytestring >0.10 && <0.11 @@ -26,8 +26,8 @@ dependencies: - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 - transformers >0.5 && <0.6 -- microlens-aeson >2.2 && <2.4 -- template-haskell >2.11 && <2.17 +- microlens-aeson >2.2 && <2.5 +- template-haskell >2.11 && <2.18 - mtl >2.2 && <2.3 - web3-crypto >=1.0 && <1.1 - web3-solidity >=1.0 && <1.1 @@ -71,9 +71,9 @@ tests: - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.8 + - hspec-discover >=2.4.4 && <2.9 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.8 + - hspec >=2.4.4 && <2.9 ghc-options: - -threaded - -rtsopts diff --git a/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs index f1d4f72f..4cbfb9fb 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs @@ -6,7 +6,7 @@ {-# LANGUAGE QuasiQuotes #-} module Network.Ethereum.Test.THSpec where -import Data.Tuple.OneTuple (OneTuple(..)) +import Data.Tuple.OneTuple import Network.Ethereum.Contract.TH import Test.Hspec diff --git a/packages/ethereum/web3-ethereum.cabal b/packages/ethereum/web3-ethereum.cabal index c1b35e39..8950d93e 100644 --- a/packages/ethereum/web3-ethereum.cabal +++ b/packages/ethereum/web3-ethereum.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: web3-ethereum -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Ethereum support for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -56,23 +56,23 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - OneTuple >0.2 && <0.3 - , aeson >1.2 && <1.6 - , base >4.11 && <4.15 + OneTuple >0.2 && <0.4 + , aeson >1.2 && <2.2 + , base >4.11 && <4.16 , bytestring >0.10 && <0.11 , data-default >0.7 && <0.8 , exceptions >0.8 && <0.11 , generics-sop >0.3 && <0.6 , jsonrpc-tinyclient ==1.0.* , machines >0.6 && <0.8 - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 - , microlens-aeson >2.2 && <2.4 + , microlens-aeson >2.2 && <2.5 , mtl >2.2 && <2.3 , relapse >=1.0 && <2.0 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.17 + , template-haskell >2.11 && <2.18 , text >1.2 && <1.3 , transformers >0.5 && <0.6 , vinyl >0.5 && <0.14 @@ -120,27 +120,27 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - OneTuple >0.2 && <0.3 - , aeson >1.2 && <1.6 - , base >4.11 && <4.15 + OneTuple >0.2 && <0.4 + , aeson >1.2 && <2.2 + , base >4.11 && <4.16 , bytestring >0.10 && <0.11 , data-default >0.7 && <0.8 , exceptions >0.8 && <0.11 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.8 + , hspec >=2.4.4 && <2.9 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.8 + , hspec-discover >=2.4.4 && <2.9 , hspec-expectations >=0.8.2 && <0.9 , jsonrpc-tinyclient ==1.0.* , machines >0.6 && <0.8 - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 - , microlens-aeson >2.2 && <2.4 + , microlens-aeson >2.2 && <2.5 , mtl >2.2 && <2.3 , relapse >=1.0 && <2.0 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.17 + , template-haskell >2.11 && <2.18 , text >1.2 && <1.3 , transformers >0.5 && <0.6 , vinyl >0.5 && <0.14 diff --git a/packages/hexstring/memory-hexstring.cabal b/packages/hexstring/memory-hexstring.cabal index f6bb7134..095bfbd3 100644 --- a/packages/hexstring/memory-hexstring.cabal +++ b/packages/hexstring/memory-hexstring.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: memory-hexstring -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Hex-string type for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -34,11 +34,11 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <1.6 - , base >4.11 && <4.15 + aeson >1.2 && <2.2 + , base >4.11 && <4.16 , bytestring >0.10 && <0.11 - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , scale ==1.0.* - , template-haskell >2.11 && <2.17 + , template-haskell >2.11 && <2.18 , text >1.2 && <1.3 default-language: Haskell2010 diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index 25e14955..cb53ec4d 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -1,5 +1,5 @@ name: memory-hexstring -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Hex-string type for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -11,12 +11,12 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - text >1.2 && <1.3 -- aeson >1.2 && <1.6 -- memory >0.14 && <0.16 +- aeson >1.2 && <2.2 +- memory >0.14 && <0.17 - bytestring >0.10 && <0.11 -- template-haskell >2.11 && <2.17 +- template-haskell >2.11 && <2.18 - scale >=1.0 && <1.1 ghc-options: diff --git a/packages/ipfs/package.yaml b/packages/ipfs/package.yaml index 0f2246ea..ad05f55c 100644 --- a/packages/ipfs/package.yaml +++ b/packages/ipfs/package.yaml @@ -1,5 +1,5 @@ name: web3-ipfs -version: 1.0.0.0 +version: 1.0.0.1 synopsis: IPFS support for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -11,17 +11,17 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - mtl >2.2 && <2.3 - tar >0.4 && <0.6 - text >1.2 && <1.3 -- aeson >1.2 && <1.6 -- servant >0.12 && <0.19 +- aeson >1.2 && <2.2 +- servant >0.12 && <0.20 - http-media >0.6 && <0.8.1 - bytestring >0.10 && <0.11 - http-types >0.11 && <0.14 -- http-client >0.5 && <0.7 -- servant-client >0.12 && <0.19 +- http-client >0.5 && <0.8 +- servant-client >0.12 && <0.20 - unordered-containers >0.1 && <0.3 ghc-options: diff --git a/packages/ipfs/src/Network/Ipfs/Api/Types.hs b/packages/ipfs/src/Network/Ipfs/Api/Types.hs index 0219034d..f92feb41 100644 --- a/packages/ipfs/src/Network/Ipfs/Api/Types.hs +++ b/packages/ipfs/src/Network/Ipfs/Api/Types.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} @@ -23,7 +24,11 @@ import Control.Monad import Data.Aeson import Data.ByteString.Lazy (toStrict) import qualified Data.ByteString.Lazy.Char8 () +#if MIN_VERSION_aeson(2,0,0) +import qualified Data.Aeson.KeyMap as H +#else import qualified Data.HashMap.Strict as H +#endif import Data.Int import Data.Text (Text) import qualified Data.Text.Encoding as TextS diff --git a/packages/ipfs/web3-ipfs.cabal b/packages/ipfs/web3-ipfs.cabal index 4ce79514..e05e72c3 100644 --- a/packages/ipfs/web3-ipfs.cabal +++ b/packages/ipfs/web3-ipfs.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: web3-ipfs -version: 1.0.0.0 +version: 1.0.0.1 synopsis: IPFS support for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -53,15 +53,15 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <1.6 - , base >4.11 && <4.15 + aeson >1.2 && <2.2 + , base >4.11 && <4.16 , bytestring >0.10 && <0.11 - , http-client >0.5 && <0.7 + , http-client >0.5 && <0.8 , http-media >0.6 && <0.8.1 , http-types >0.11 && <0.14 , mtl >2.2 && <2.3 - , servant >0.12 && <0.19 - , servant-client >0.12 && <0.19 + , servant >0.12 && <0.20 + , servant-client >0.12 && <0.20 , tar >0.4 && <0.6 , text >1.2 && <1.3 , unordered-containers >0.1 && <0.3 diff --git a/packages/jsonrpc/jsonrpc-tinyclient.cabal b/packages/jsonrpc/jsonrpc-tinyclient.cabal index 96a709c1..b3a3ade1 100644 --- a/packages/jsonrpc/jsonrpc-tinyclient.cabal +++ b/packages/jsonrpc/jsonrpc-tinyclient.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: jsonrpc-tinyclient -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Tiny JSON-RPC client for Haskell Web3 library. description: Minimalistic JSON-RPC client, inspired by haxr library. category: Network @@ -31,11 +31,11 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <1.6 - , base >4.11 && <4.15 + aeson >1.2 && <2.2 + , base >4.11 && <4.16 , bytestring >0.10 && <0.11 , exceptions >0.8 && <0.11 - , http-client >0.5 && <0.7 + , http-client >0.5 && <0.8 , http-client-tls >0.3 && <0.4 , mtl >2.2 && <2.3 , random >1.0 && <1.3 diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index c5bc2cdc..93e0f5e8 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -1,5 +1,5 @@ name: jsonrpc-tinyclient -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Tiny JSON-RPC client for Haskell Web3 library. description: Minimalistic JSON-RPC client, inspired by haxr library. github: "airalab/hs-web3" @@ -11,14 +11,14 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - text >1.2 && <1.3 -- aeson >1.2 && <1.6 +- aeson >1.2 && <2.2 - random >1.0 && <1.3 - bytestring >0.10 && <0.11 - exceptions >0.8 && <0.11 - websockets >0.10 && <0.13 -- http-client >0.5 && <0.7 +- http-client >0.5 && <0.8 - http-client-tls >0.3 && <0.4 - mtl >2.2 && <2.3 diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 6e903878..d86b47d5 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -1,5 +1,5 @@ name: web3-polkadot -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Polkadot support for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -12,12 +12,12 @@ category: Network dependencies: - mtl >2.2 && <2.3 -- base >4.11 && <4.15 +- base >4.11 && <4.16 - text >1.2 && <1.3 -- aeson >1.2 && <1.6 +- aeson >1.2 && <2.1 - scale >=1.0 && <1.1 - parsec >3.0 && <3.2 -- memory >0.14 && <0.16 +- memory >0.14 && <0.17 - microlens >0.4 && <0.5 - containers >0.6 && <0.7 - cryptonite >0.22 && <0.30 @@ -70,9 +70,9 @@ tests: dependencies: - hspec-expectations-json >=1.0.0 && <1.1 - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.8 + - hspec-discover >=2.4.4 && <2.9 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.8 + - hspec >=2.4.4 && <2.9 ghc-options: - -threaded - -rtsopts diff --git a/packages/polkadot/web3-polkadot.cabal b/packages/polkadot/web3-polkadot.cabal index 77c68342..dae692c4 100644 --- a/packages/polkadot/web3-polkadot.cabal +++ b/packages/polkadot/web3-polkadot.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: web3-polkadot -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Polkadot support for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -71,16 +71,16 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <1.6 + aeson >1.2 && <2.1 , animalcase >0.1 && <0.2 - , base >4.11 && <4.15 + , base >4.11 && <4.16 , base58-bytestring ==0.1.* , bytestring >0.10 && <0.11 , containers >0.6 && <0.7 , cryptonite >0.22 && <0.30 , generics-sop >0.3 && <0.6 , jsonrpc-tinyclient ==1.0.* - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , microlens-mtl >0.2 && <0.3 @@ -148,21 +148,21 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - aeson >1.2 && <1.6 + aeson >1.2 && <2.1 , animalcase >0.1 && <0.2 - , base >4.11 && <4.15 + , base >4.11 && <4.16 , base58-bytestring ==0.1.* , bytestring >0.10 && <0.11 , containers >0.6 && <0.7 , cryptonite >0.22 && <0.30 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.8 + , hspec >=2.4.4 && <2.9 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.8 + , hspec-discover >=2.4.4 && <2.9 , hspec-expectations >=0.8.2 && <0.9 , hspec-expectations-json >=1.0.0 && <1.1 , jsonrpc-tinyclient ==1.0.* - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , microlens-mtl >0.2 && <0.3 diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml index 6e6f9f7a..84d003e8 100644 --- a/packages/provider/package.yaml +++ b/packages/provider/package.yaml @@ -1,5 +1,5 @@ name: web3-provider -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Node connection provider for Haskell Web3 library. description: This package contains general Web3 node adapters and connection helpers. github: "airalab/hs-web3" @@ -11,14 +11,14 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - mtl >2.2 && <2.3 - text >1.2 && <1.3 - async >2.1 && <2.3 - network >2.5 && <3.2 - websockets >0.10 && <0.13 - exceptions >0.8 && <0.11 -- http-client >0.5 && <0.7 +- http-client >0.5 && <0.8 - data-default >0.7 && <0.8 - transformers >0.5 && <0.6 - jsonrpc-tinyclient >=1.0 && <1.1 diff --git a/packages/provider/web3-provider.cabal b/packages/provider/web3-provider.cabal index aac1c4c2..4026d119 100644 --- a/packages/provider/web3-provider.cabal +++ b/packages/provider/web3-provider.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: web3-provider -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Node connection provider for Haskell Web3 library. description: This package contains general Web3 node adapters and connection helpers. category: Network @@ -32,10 +32,10 @@ library ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: async >2.1 && <2.3 - , base >4.11 && <4.15 + , base >4.11 && <4.16 , data-default >0.7 && <0.8 , exceptions >0.8 && <0.11 - , http-client >0.5 && <0.7 + , http-client >0.5 && <0.8 , jsonrpc-tinyclient ==1.0.* , mtl >2.2 && <2.3 , network >2.5 && <3.2 diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index 691e41b0..cb9d9a19 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -1,5 +1,5 @@ name: scale -version: 1.0.0.0 +version: 1.0.0.1 synopsis: SCALE v2.0 codec for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -11,16 +11,16 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - text >1.2 && <1.3 - cereal >0.5 && <0.6 - bitvec >1.0 && <2.0 - vector >0.12 && <0.13 -- memory >0.14 && <0.16 +- memory >0.14 && <0.17 - bytestring >0.10 && <0.11 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.17 +- template-haskell >2.11 && <2.18 ghc-options: - -funbox-strict-fields @@ -60,9 +60,9 @@ tests: dependencies: - bytestring >0.10 && <0.11 - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.8 + - hspec-discover >=2.4.4 && <2.9 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.8 + - hspec >=2.4.4 && <2.9 ghc-options: - -threaded - -rtsopts diff --git a/packages/scale/scale.cabal b/packages/scale/scale.cabal index 228a45c9..fa4ce970 100644 --- a/packages/scale/scale.cabal +++ b/packages/scale/scale.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: scale -version: 1.0.0.0 +version: 1.0.0.1 synopsis: SCALE v2.0 codec for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -38,14 +38,14 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.15 + base >4.11 && <4.16 , bitvec >1.0 && <2.0 , bytestring >0.10 && <0.11 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , memory >0.14 && <0.16 - , template-haskell >2.11 && <2.17 + , memory >0.14 && <0.17 + , template-haskell >2.11 && <2.18 , text >1.2 && <1.3 , vector >0.12 && <0.13 default-language: Haskell2010 @@ -71,18 +71,18 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.15 + base >4.11 && <4.16 , bitvec >1.0 && <2.0 , bytestring >0.10 && <0.11 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.8 + , hspec >=2.4.4 && <2.9 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.8 + , hspec-discover >=2.4.4 && <2.9 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.16 - , template-haskell >2.11 && <2.17 + , memory >0.14 && <0.17 + , template-haskell >2.11 && <2.18 , text >1.2 && <1.3 , vector >0.12 && <0.13 default-language: Haskell2010 diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml index 6e24f36c..0fce4436 100644 --- a/packages/solidity/package.yaml +++ b/packages/solidity/package.yaml @@ -1,5 +1,5 @@ name: web3-solidity -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Solidity language for Haskell Web3 library. description: This package contains Solidity parsec-based parser and primitive types. github: "airalab/hs-web3" @@ -11,21 +11,21 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - text >1.2 && <1.3 -- aeson >1.2 && <1.6 +- aeson >1.2 && <2.1 - cereal >0.5 && <0.6 -- memory >0.14 && <0.16 +- memory >0.14 && <0.17 - memory-hexstring >=1.0 && <1.1 - tagged >0.8 && <0.9 - parsec >3.1 && <3.2 - basement >0.0 && <0.1 -- OneTuple >0.2 && <0.3 +- OneTuple >0.2 && <0.4 - microlens >0.4 && <0.5 - bytestring >0.10 && <0.11 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.17 +- template-haskell >2.11 && <2.18 - web3-crypto >=1.0 && <1.1 ghc-options: @@ -65,9 +65,9 @@ tests: - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.8 + - hspec-discover >=2.4.4 && <2.9 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.8 + - hspec >=2.4.4 && <2.9 ghc-options: - -threaded - -rtsopts diff --git a/packages/solidity/src/Data/Solidity/Prim/Tuple.hs b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs index 5ac5798b..a8a8f890 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Tuple.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs @@ -1,7 +1,9 @@ -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE StandaloneDeriving #-} -{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeSynonymInstances #-} -- | -- Module : Data.Solidity.Prim.Tuple @@ -26,7 +28,10 @@ import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Abi.Generic () import Data.Solidity.Prim.Tuple.TH (tupleDecs) +#if MIN_VERSION_base(4,15,0) +#else deriving instance GHC.Generic (OneTuple a) +#endif instance Generic (OneTuple a) instance AbiType a => AbiType (OneTuple a) where diff --git a/packages/solidity/src/Language/Solidity/Abi.hs b/packages/solidity/src/Language/Solidity/Abi.hs index 1aef40a0..79c38776 100644 --- a/packages/solidity/src/Language/Solidity/Abi.hs +++ b/packages/solidity/src/Language/Solidity/Abi.hs @@ -91,6 +91,11 @@ data StateMutability | SMNonPayable deriving (Eq, Ord, Show) +$(deriveJSON (defaultOptions { + sumEncoding = TaggedObject "stateMutability" "contents" + , constructorTagModifier = fmap toLower . drop 2 }) + ''StateMutability) + -- | Elementary contract interface item data Declaration = DConstructor { conInputs :: [FunctionArg] @@ -183,12 +188,6 @@ $(deriveToJSON , fieldLabelModifier = over _head toLower . drop 3 }) ''Declaration) -$(deriveJSON (defaultOptions { - sumEncoding = TaggedObject "stateMutability" "contents" - , constructorTagModifier = fmap toLower . drop 2 }) - ''StateMutability) - - -- | Contract Abi is a list of method / event declarations newtype ContractAbi = ContractAbi { unAbi :: [Declaration] } deriving (Eq, Ord) diff --git a/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs b/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs index 0a981cdd..75a84250 100644 --- a/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs +++ b/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs @@ -8,7 +8,7 @@ module Data.Solidity.Test.EncodingSpec where import Control.Exception (evaluate) import Data.Text (Text) -import Data.Tuple.OneTuple (OneTuple (..)) +import Data.Tuple.OneTuple import Generics.SOP (Generic, Rep) import Test.Hspec diff --git a/packages/solidity/web3-solidity.cabal b/packages/solidity/web3-solidity.cabal index 2f5449aa..64b17887 100644 --- a/packages/solidity/web3-solidity.cabal +++ b/packages/solidity/web3-solidity.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: web3-solidity -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Solidity language for Haskell Web3 library. description: This package contains Solidity parsec-based parser and primitive types. category: Network @@ -46,20 +46,20 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - OneTuple >0.2 && <0.3 - , aeson >1.2 && <1.6 - , base >4.11 && <4.15 + OneTuple >0.2 && <0.4 + , aeson >1.2 && <2.1 + , base >4.11 && <4.16 , basement >0.0 && <0.1 , bytestring >0.10 && <0.11 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , parsec >3.1 && <3.2 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.17 + , template-haskell >2.11 && <2.18 , text >1.2 && <1.3 , web3-crypto ==1.0.* default-language: Haskell2010 @@ -94,24 +94,24 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - OneTuple >0.2 && <0.3 - , aeson >1.2 && <1.6 - , base >4.11 && <4.15 + OneTuple >0.2 && <0.4 + , aeson >1.2 && <2.1 + , base >4.11 && <4.16 , basement >0.0 && <0.1 , bytestring >0.10 && <0.11 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.8 + , hspec >=2.4.4 && <2.9 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.8 + , hspec-discover >=2.4.4 && <2.9 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.16 + , memory >0.14 && <0.17 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , parsec >3.1 && <3.2 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.17 + , template-haskell >2.11 && <2.18 , text >1.2 && <1.3 , web3-crypto ==1.0.* default-language: Haskell2010 diff --git a/packages/web3/package.yaml b/packages/web3/package.yaml index d72ea3ac..de930f58 100644 --- a/packages/web3/package.yaml +++ b/packages/web3/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- base >4.11 && <4.15 +- base >4.11 && <4.16 - web3-provider >=1.0 && <1.1 - web3-ethereum >=1.0 && <1.1 - web3-polkadot >=1.0 && <1.1 diff --git a/packages/web3/web3.cabal b/packages/web3/web3.cabal index 0fc90e52..8542f4e7 100644 --- a/packages/web3/web3.cabal +++ b/packages/web3/web3.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.6. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: web3 -version: 1.0.0.0 +version: 1.0.0.1 synopsis: Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -31,7 +31,7 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.15 + base >4.11 && <4.16 , web3-ethereum ==1.0.* , web3-polkadot ==1.0.* , web3-provider ==1.0.* diff --git a/stack.yaml b/stack.yaml index 42f760ba..b9c30f39 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-18.23 +resolver: lts-19.21 # User packages to be built. packages: @@ -21,6 +21,7 @@ packages: # Extra package dependencies extra-deps: - animalcase-0.1.0.2@sha256:d7b80c3130c68d7ce8ddd9782588b2c4dd7da86461f302c54cc4acddf0902b51 +- relapse-1.0.0.1 # Dependencies bounds pvp-bounds: both From 60db7fc223d31ab61efa94caadde371c7138e019 Mon Sep 17 00:00:00 2001 From: Ruben Astudillo Date: Fri, 30 Sep 2022 09:22:18 -0300 Subject: [PATCH 217/237] Add ToJSON instances for IntN, UintN and generated datatypes (#136) * Add ToJSON instances for IntN and UIntN * Add ToJSON instances to generated data types --- packages/ethereum/package.yaml | 1 + packages/ethereum/src/Network/Ethereum/Contract/TH.hs | 11 ++++++++++- packages/ethereum/web3-ethereum.cabal | 4 +++- packages/solidity/src/Data/Solidity/Prim/Int.hs | 7 +++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index ce962542..e1ac7f57 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -15,6 +15,7 @@ dependencies: - text >1.2 && <1.3 - vinyl >0.5 && <0.14 - aeson >1.2 && <2.2 +- aeson-casing >=0.2 && <0.3 - tagged >0.8 && <0.9 - memory >0.14 && <0.17 - relapse >=1.0 && <2.0 diff --git a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs index 0b0d74dd..4e7c090a 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs @@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} +{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} @@ -45,7 +46,8 @@ module Network.Ethereum.Contract.TH import Control.Applicative ((<|>)) import Control.Monad (replicateM, (<=<)) -import qualified Data.Aeson as Aeson (encode) +import qualified Data.Aeson as Aeson +import Data.Aeson.Casing (aesonDrop, camelCase) import Data.ByteArray (convert) import Data.ByteArray.HexString (HexString) import Data.Char (toLower, toUpper) @@ -207,6 +209,7 @@ mkDecl ev@(DEvent uncheckedName inputs anonymous) = sequence , instanceD' nonIndexedName (conT ''AbiGet) [] , dataD' allName (recC allName (map (\(n, a) -> (\(b,t) -> return (n,b,t)) <=< toBang <=< typeEventQ $ a) allArgs)) derivingD , instanceD' allName (conT ''Generic) [] + , instanceD' allName (conT ''Aeson.ToJSON) [funD' 'Aeson.toJSON [] [| Aeson.genericToJSON $ aesonDrop nameL (init' . camelCase) |] ] , instanceD (cxt []) (pure $ ConT ''IndexedEvent `AppT` ConT indexedName `AppT` ConT nonIndexedName `AppT` ConT allName) [funD' 'isAnonymous [] [|const anonymous|]] @@ -216,6 +219,7 @@ mkDecl ev@(DEvent uncheckedName inputs anonymous) = sequence ] where name = if toLower (T.head uncheckedName) == Char.toUpper (T.head uncheckedName) then "EvT" <> uncheckedName else uncheckedName + !nameL = length (T.unpack name) topics = [Just (T.unpack $ eventId ev)] <> replicate (length indexedArgs) Nothing toBang ty = bangType (bang sourceNoUnpack sourceStrict) (return ty) tag (n, ty) = AppT (AppT (ConT ''Tagged) (LitT $ NumTyLit n)) <$> typeEventQ ty @@ -251,6 +255,11 @@ mkDecl fun@(DFunction name constant inputs outputs) = (++) mkDecl _ = return [] +-- | Best-effort name recovery from ADT to original 'eveArgName' on inputs. +init' :: String -> String +init' [] = [] +init' xs = if Char.isDigit (last xs) then xs else init xs + mkContractDecl :: Text -> Text -> Text -> Declaration -> DecsQ mkContractDecl name a b (DConstructor inputs) = sequence [ dataD' dataName (normalC dataName bangInput) derivingD diff --git a/packages/ethereum/web3-ethereum.cabal b/packages/ethereum/web3-ethereum.cabal index 8950d93e..7e2a8010 100644 --- a/packages/ethereum/web3-ethereum.cabal +++ b/packages/ethereum/web3-ethereum.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.34.7. -- -- see: https://github.com/sol/hpack @@ -58,6 +58,7 @@ library build-depends: OneTuple >0.2 && <0.4 , aeson >1.2 && <2.2 + , aeson-casing ==0.2.* , base >4.11 && <4.16 , bytestring >0.10 && <0.11 , data-default >0.7 && <0.8 @@ -122,6 +123,7 @@ test-suite tests build-depends: OneTuple >0.2 && <0.4 , aeson >1.2 && <2.2 + , aeson-casing ==0.2.* , base >4.11 && <4.16 , bytestring >0.10 && <0.11 , data-default >0.7 && <0.8 diff --git a/packages/solidity/src/Data/Solidity/Prim/Int.hs b/packages/solidity/src/Data/Solidity/Prim/Int.hs index 25106115..842876b1 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Int.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Int.hs @@ -34,6 +34,7 @@ module Data.Solidity.Prim.Int import qualified Basement.Numerical.Number as Basement (toInteger) import Basement.Types.Word256 (Word256 (Word256)) import qualified Basement.Types.Word256 as Basement (quot, rem) +import Data.Aeson (ToJSON(..)) import Data.Bits (Bits (testBit), (.&.)) import Data.Proxy (Proxy (..)) import Data.Serialize (Get, Putter, Serialize (get, put)) @@ -90,6 +91,9 @@ instance (n <= 256) => AbiGet (UIntN n) where instance (n <= 256) => AbiPut (UIntN n) where abiPut = putWord256 . unUIntN +instance (KnownNat n, n <= 256) => ToJSON (UIntN n) where + toJSON = toJSON . toInteger + -- | Signed integer with fixed length in bits. newtype IntN (n :: Nat) = IntN { unIntN :: Word256 } deriving (Eq, Ord, Enum, Bits, Generic) @@ -130,6 +134,9 @@ instance (n <= 256) => AbiGet (IntN n) where instance (n <= 256) => AbiPut (IntN n) where abiPut = putWord256 . unIntN +instance (KnownNat n, n <= 256) => ToJSON (IntN n) where + toJSON = toJSON . toInteger + -- | Serialize 256 bit unsigned integer. putWord256 :: Putter Word256 putWord256 (Word256 a3 a2 a1 a0) = From ee4a802d5feb3afcd1c28a13824614545868acd7 Mon Sep 17 00:00:00 2001 From: Eitan Chatav Date: Mon, 9 Jan 2023 02:41:30 -0800 Subject: [PATCH 218/237] Fix ABI encoding for fixed length lists (#137) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix ABI encoding for fixed length lists The ABI encoding for fixed length Solidity lists `T[k]` was wrong in the case that `T` is dynamic. If T is dynamic, then according to the [spec](https://docs.soliditylang.org/en/v0.5.3/abi-spec.html#formal-specification-of-the-encoding), > The following types are called “dynamic”: > `T[k]` for any dynamic `T` and any `k >= 0` This PR ensures this is the case and handles encoding for dynamic `T` similar to how it is handled in the variable length array case for `T[]` which was fixed in #126. * unneccessary fromInteger --- .../solidity/src/Data/Solidity/Prim/List.hs | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/packages/solidity/src/Data/Solidity/Prim/List.hs b/packages/solidity/src/Data/Solidity/Prim/List.hs index 348043f0..b3c0eaef 100644 --- a/packages/solidity/src/Data/Solidity/Prim/List.hs +++ b/packages/solidity/src/Data/Solidity/Prim/List.hs @@ -1,7 +1,9 @@ +{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeOperators #-} -- | -- Module : Data.Solidity.Prim.List @@ -23,16 +25,16 @@ module Data.Solidity.Prim.List import Basement.Nat (NatWithinBound) import Basement.Sized.List (ListN, toListN_, unListN) -import qualified Basement.Sized.List as SL (mapM_, replicateM) +import qualified Basement.Sized.List as SL (init, map, mapM, mapM_, replicateM, scanl') import Basement.Types.Word256 (Word256) -import Control.Monad (replicateM, mapM_, forM) +import Control.Monad (replicateM, forM) import qualified Data.ByteString as B -import Data.List (init, scanl') +import Data.List (scanl') import Data.Proxy (Proxy (..)) import Data.Serialize.Put (runPut, putByteString) import Data.Serialize.Get (skip, lookAhead) import GHC.Exts (IsList (..)) -import GHC.TypeLits (KnownNat) +import GHC.TypeLits (KnownNat, natVal, type (+), type (<=)) import Data.Solidity.Abi (AbiGet (..), AbiPut (..), AbiType (..)) import Data.Solidity.Prim.Int (getWord256, putWord256) @@ -62,14 +64,30 @@ instance AbiGet a => AbiGet [a] where else replicateM len abiGet -instance AbiType (ListN n a) where - isDynamic _ = False +instance (AbiType a, KnownNat n) => AbiType (ListN n a) where + isDynamic _ = natVal (Proxy :: Proxy n) > 0 && isDynamic (Proxy :: Proxy a) -instance AbiPut a => AbiPut (ListN n a) where - abiPut = SL.mapM_ abiPut +instance (AbiPut a, KnownNat n, 1 <= n+1) => AbiPut (ListN n a) where + abiPut l = if isDynamic (Proxy :: Proxy a) then do + let encs = SL.map (runPut . abiPut) l + lengths = SL.map ((fromIntegral :: Int -> Word256) . B.length) encs + len = natVal (Proxy :: Proxy n) + offsets = SL.init $ SL.scanl' (+) (fromIntegral (0x20 * len)) lengths + SL.mapM_ putWord256 offsets + SL.mapM_ putByteString encs + else + SL.mapM_ abiPut l instance (NatWithinBound Int n, KnownNat n, AbiGet a) => AbiGet (ListN n a) where - abiGet = SL.replicateM abiGet + abiGet = do let len = fromInteger (natVal (Proxy :: Proxy n)) + if isDynamic (Proxy :: Proxy a) then do + offsets <- SL.replicateM getWord256 + let currentOffset = 0x20 * len + flip SL.mapM offsets $ \dataOffset -> lookAhead $ do + skip (fromIntegral dataOffset - currentOffset) + abiGet + else + SL.replicateM abiGet instance (NatWithinBound Int n, KnownNat n) => IsList (ListN n a) where type Item (ListN n a) = a From 620c774f81d0d09d4b1265f8e4f7482d5c35ffd2 Mon Sep 17 00:00:00 2001 From: Tim Pierson Date: Sun, 23 Apr 2023 13:12:57 +0100 Subject: [PATCH 219/237] add cpp for OneTuple > 0.3 (#138) --- packages/solidity/src/Data/Solidity/Prim/Tuple.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/solidity/src/Data/Solidity/Prim/Tuple.hs b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs index a8a8f890..cd2d3113 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Tuple.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs @@ -20,7 +20,11 @@ module Data.Solidity.Prim.Tuple where import Data.Proxy (Proxy (..)) +#if MIN_VERSION_OneTuple(0,3,0) +import Data.Tuple.Solo (Solo (..)) +#else import Data.Tuple.OneTuple (OneTuple (..)) +#endif import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) @@ -28,6 +32,14 @@ import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Abi.Generic () import Data.Solidity.Prim.Tuple.TH (tupleDecs) +#if MIN_VERSION_OneTuple(0,3,0) +instance Generic (Solo a) +instance AbiType a => AbiType (Solo a) where + isDynamic _ = isDynamic (Proxy :: Proxy a) + +instance AbiGet a => AbiGet (Solo a) +instance AbiPut a => AbiPut (Solo a) +#else #if MIN_VERSION_base(4,15,0) #else deriving instance GHC.Generic (OneTuple a) @@ -39,5 +51,5 @@ instance AbiType a => AbiType (OneTuple a) where instance AbiGet a => AbiGet (OneTuple a) instance AbiPut a => AbiPut (OneTuple a) - +#endif $(concat <$> mapM tupleDecs [2..20]) From 63f4e26747be9e057956cc9fde78b291de2d26a5 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 3 Oct 2024 15:17:23 +0300 Subject: [PATCH 220/237] Update dependencies, bump version --- CHANGELOG.md | 7 + packages/bignum/package.yaml | 14 +- packages/bignum/src/Data/BigNum.hs | 2 +- .../tests/Data/BigNum/Test/BigNumSpec.hs | 2 +- packages/bignum/web3-bignum.cabal | 22 +- packages/crypto/package.yaml | 22 +- packages/crypto/src/Crypto/Bip39.hs | 2 +- packages/crypto/src/Crypto/Ecdsa/Signature.hs | 2 +- packages/crypto/src/Crypto/Ecdsa/Utils.hs | 2 +- packages/crypto/src/Crypto/Ethereum.hs | 2 +- .../crypto/src/Crypto/Ethereum/Keyfile.hs | 2 +- .../crypto/src/Crypto/Ethereum/Signature.hs | 2 +- packages/crypto/src/Crypto/Ethereum/Utils.hs | 2 +- packages/crypto/src/Crypto/Random/HmacDrbg.hs | 2 +- .../tests/Crypto/Ethereum/Test/KeyfileSpec.hs | 11 + .../Crypto/Ethereum/Test/SignatureSpec.hs | 11 + .../tests/Crypto/Random/Test/HmacDrbgSpec.hs | 12 + .../tests/Data/Digest/Test/Blake2Spec.hs | 11 + .../tests/Data/Digest/Test/XXHashSpec.hs | 11 + packages/crypto/web3-crypto.cabal | 38 +- packages/ethereum/package.yaml | 26 +- packages/ethereum/src/Network/Ethereum.hs | 2 +- .../ethereum/src/Network/Ethereum/Account.hs | 9 +- .../src/Network/Ethereum/Account/Class.hs | 2 +- .../src/Network/Ethereum/Account/Default.hs | 2 +- .../src/Network/Ethereum/Account/Internal.hs | 2 +- .../src/Network/Ethereum/Account/LocalKey.hs | 2 +- .../src/Network/Ethereum/Account/Personal.hs | 2 +- .../src/Network/Ethereum/Account/Safe.hs | 4 +- .../ethereum/src/Network/Ethereum/Api/Eth.hs | 5 +- .../ethereum/src/Network/Ethereum/Api/Net.hs | 2 +- .../src/Network/Ethereum/Api/Types.hs | 7 +- .../ethereum/src/Network/Ethereum/Api/Web3.hs | 2 +- .../ethereum/src/Network/Ethereum/Chain.hs | 2 +- .../ethereum/src/Network/Ethereum/Contract.hs | 4 +- .../src/Network/Ethereum/Contract/Event.hs | 2 +- .../src/Network/Ethereum/Contract/Method.hs | 2 +- .../src/Network/Ethereum/Contract/TH.hs | 13 +- packages/ethereum/src/Network/Ethereum/Ens.hs | 2 +- .../Network/Ethereum/Ens/PublicResolver.hs | 2 +- .../src/Network/Ethereum/Ens/Registry.hs | 2 +- .../src/Network/Ethereum/Transaction.hs | 2 +- .../ethereum/src/Network/Ethereum/Unit.hs | 2 +- .../tests/Network/Ethereum/Test/EventSpec.hs | 10 + .../Network/Ethereum/Test/MethodDumpSpec.hs | 10 + .../tests/Network/Ethereum/Test/THSpec.hs | 11 + .../Network/Ethereum/Test/TransactionSpec.hs | 11 + packages/ethereum/web3-ethereum.cabal | 46 +- packages/hexstring/memory-hexstring.cabal | 18 +- packages/hexstring/package.yaml | 16 +- .../hexstring/src/Data/ByteArray/HexString.hs | 2 +- .../src/Data/ByteArray/HexString/Convert.hs | 2 +- .../src/Data/ByteArray/HexString/Internal.hs | 2 +- .../src/Data/ByteArray/HexString/TH.hs | 4 +- packages/ipfs/LICENSE | 211 ----- packages/ipfs/Setup.hs | 2 - packages/ipfs/package.yaml | 54 -- packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs | 41 - packages/ipfs/src/Network/Ipfs/Api/Block.hs | 39 - .../ipfs/src/Network/Ipfs/Api/Bootstrap.hs | 34 - packages/ipfs/src/Network/Ipfs/Api/Cid.hs | 44 - packages/ipfs/src/Network/Ipfs/Api/Config.hs | 40 - packages/ipfs/src/Network/Ipfs/Api/Core.hs | 88 -- packages/ipfs/src/Network/Ipfs/Api/Dag.hs | 40 - packages/ipfs/src/Network/Ipfs/Api/Dht.hs | 41 - packages/ipfs/src/Network/Ipfs/Api/Files.hs | 74 -- .../ipfs/src/Network/Ipfs/Api/Internal.hs | 100 --- .../src/Network/Ipfs/Api/Internal/Call.hs | 58 -- .../src/Network/Ipfs/Api/Internal/Stream.hs | 41 - packages/ipfs/src/Network/Ipfs/Api/Key.hs | 48 - packages/ipfs/src/Network/Ipfs/Api/Log.hs | 42 - packages/ipfs/src/Network/Ipfs/Api/Object.hs | 81 -- packages/ipfs/src/Network/Ipfs/Api/Pin.hs | 29 - packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs | 39 - packages/ipfs/src/Network/Ipfs/Api/Repo.hs | 37 - packages/ipfs/src/Network/Ipfs/Api/Stats.hs | 28 - packages/ipfs/src/Network/Ipfs/Api/Swarm.hs | 49 -- packages/ipfs/src/Network/Ipfs/Api/Types.hs | 828 ------------------ .../ipfs/src/Network/Ipfs/Api/Types/Stream.hs | 154 ---- packages/ipfs/src/Network/Ipfs/Client.hs | 47 - packages/ipfs/web3-ipfs.cabal | 68 -- packages/jsonrpc/jsonrpc-tinyclient.cabal | 14 +- packages/jsonrpc/package.yaml | 12 +- .../jsonrpc/src/Network/JsonRpc/TinyClient.hs | 4 +- packages/polkadot/package.yaml | 22 +- packages/polkadot/src/Network/Polkadot.hs | 2 +- .../polkadot/src/Network/Polkadot/Account.hs | 2 +- .../polkadot/src/Network/Polkadot/Call.hs | 2 +- .../polkadot/src/Network/Polkadot/Crypto.hs | 2 +- .../src/Network/Polkadot/Extrinsic.hs | 2 +- .../src/Network/Polkadot/Extrinsic/Era.hs | 2 +- .../src/Network/Polkadot/Extrinsic/Payload.hs | 2 +- .../Polkadot/Extrinsic/SignedExtension.hs | 2 +- .../Extrinsic/SignedExtension/System.hs | 2 +- .../SignedExtension/TransactionPayment.hs | 2 +- .../Network/Polkadot/Extrinsic/Unchecked.hs | 2 +- .../polkadot/src/Network/Polkadot/Metadata.hs | 2 +- .../Network/Polkadot/Metadata/MagicNumber.hs | 2 +- .../src/Network/Polkadot/Metadata/Type.hs | 2 +- .../src/Network/Polkadot/Metadata/Type/Ast.hs | 2 +- .../Polkadot/Metadata/Type/Discovery.hs | 2 +- .../Network/Polkadot/Metadata/Type/Parser.hs | 4 +- .../Metadata/Type/ParserCombinators.hs | 2 +- .../src/Network/Polkadot/Metadata/V10.hs | 2 +- .../src/Network/Polkadot/Metadata/V11.hs | 2 +- .../src/Network/Polkadot/Metadata/V12.hs | 2 +- .../src/Network/Polkadot/Metadata/V13.hs | 2 +- .../src/Network/Polkadot/Metadata/V9.hs | 2 +- .../src/Network/Polkadot/Primitives.hs | 4 +- .../polkadot/src/Network/Polkadot/Query.hs | 2 +- .../src/Network/Polkadot/Rpc/Account.hs | 2 +- .../src/Network/Polkadot/Rpc/Author.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Babe.hs | 2 +- .../src/Network/Polkadot/Rpc/Chain.hs | 2 +- .../src/Network/Polkadot/Rpc/Childstate.hs | 2 +- .../src/Network/Polkadot/Rpc/Contracts.hs | 2 +- .../src/Network/Polkadot/Rpc/Engine.hs | 2 +- .../src/Network/Polkadot/Rpc/Grandpa.hs | 2 +- .../src/Network/Polkadot/Rpc/Offchain.hs | 2 +- .../src/Network/Polkadot/Rpc/Payment.hs | 2 +- .../polkadot/src/Network/Polkadot/Rpc/Rpc.hs | 2 +- .../src/Network/Polkadot/Rpc/State.hs | 2 +- .../src/Network/Polkadot/Rpc/System.hs | 2 +- .../src/Network/Polkadot/Rpc/Types.hs | 2 +- .../polkadot/src/Network/Polkadot/Storage.hs | 6 +- .../src/Network/Polkadot/Storage/Key.hs | 2 +- .../Network/Polkadot/Test/AccountSpec.hs | 2 +- .../Network/Polkadot/Test/ExtrinsicSpec.hs | 2 +- .../Network/Polkadot/Test/MetadataSpec.hs | 2 +- .../Network/Polkadot/Test/StorageSpec.hs | 2 +- packages/polkadot/web3-polkadot.cabal | 40 +- packages/provider/package.yaml | 10 +- .../provider/src/Network/Web3/Provider.hs | 2 +- packages/provider/web3-provider.cabal | 12 +- packages/scale/package.yaml | 24 +- packages/scale/scale.cabal | 38 +- packages/scale/src/Codec/Scale.hs | 5 +- packages/scale/src/Codec/Scale/Class.hs | 3 +- packages/scale/src/Codec/Scale/Compact.hs | 2 +- packages/scale/src/Codec/Scale/Core.hs | 2 +- packages/scale/src/Codec/Scale/Generic.hs | 2 +- .../scale/src/Codec/Scale/SingletonEnum.hs | 2 +- packages/scale/src/Codec/Scale/Skip.hs | 2 +- packages/scale/src/Codec/Scale/TH.hs | 2 +- .../scale/tests/Codec/Scale/Test/CoreSpec.hs | 2 +- .../Codec/Scale/Test/SingleFieldStructSpec.hs | 2 +- .../scale/tests/Codec/Scale/Test/SkipSpec.hs | 2 +- packages/solidity/package.yaml | 24 +- packages/solidity/src/Data/Solidity/Abi.hs | 3 +- .../solidity/src/Data/Solidity/Abi/Codec.hs | 5 +- .../solidity/src/Data/Solidity/Abi/Generic.hs | 2 +- packages/solidity/src/Data/Solidity/Event.hs | 2 +- .../src/Data/Solidity/Event/Internal.hs | 2 +- packages/solidity/src/Data/Solidity/Prim.hs | 2 +- .../src/Data/Solidity/Prim/Address.hs | 2 +- .../solidity/src/Data/Solidity/Prim/Bool.hs | 2 +- .../solidity/src/Data/Solidity/Prim/Bytes.hs | 27 +- .../solidity/src/Data/Solidity/Prim/Int.hs | 40 +- .../solidity/src/Data/Solidity/Prim/List.hs | 15 +- .../solidity/src/Data/Solidity/Prim/String.hs | 2 +- .../solidity/src/Data/Solidity/Prim/Tagged.hs | 2 +- .../solidity/src/Data/Solidity/Prim/Tuple.hs | 5 +- .../src/Data/Solidity/Prim/Tuple/TH.hs | 6 +- .../solidity/src/Language/Solidity/Abi.hs | 30 +- .../tests/Data/Solidity/Test/AddressSpec.hs | 11 + .../tests/Data/Solidity/Test/EncodingSpec.hs | 11 + .../tests/Data/Solidity/Test/IntSpec.hs | 11 + .../tests/Language/Solidity/Test/AbiSpec.hs | 11 + packages/solidity/web3-solidity.cabal | 42 +- packages/web3/package.yaml | 8 +- packages/web3/src/Network/Web3.hs | 2 +- packages/web3/web3.cabal | 10 +- stack.yaml | 5 +- 173 files changed, 568 insertions(+), 2784 deletions(-) delete mode 100644 packages/ipfs/LICENSE delete mode 100644 packages/ipfs/Setup.hs delete mode 100644 packages/ipfs/package.yaml delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Block.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Cid.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Config.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Core.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Dag.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Dht.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Files.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Internal.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Key.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Log.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Object.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Pin.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Repo.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Stats.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Swarm.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Types.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs delete mode 100644 packages/ipfs/src/Network/Ipfs/Client.hs delete mode 100644 packages/ipfs/web3-ipfs.cabal diff --git a/CHANGELOG.md b/CHANGELOG.md index f3563c51..01d68978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog All notable changes to this project will be documented in this file. +## [1.0.1.0] 2024-10-03 +### Changed +- Update dependencies, switch to LTS-21.25 + +### Removed +- IPFS library as outdated + ## [1.0.0.0] 2020-10-00 ### Changed - Library splitted for multiple independent packages diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index 5cb65671..b63072bd 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -1,5 +1,5 @@ name: web3-bignum -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Fixed size big integers for Haskell Web3 library. description: This package implements codec instances and other helper functions. github: "airalab/hs-web3" @@ -7,13 +7,13 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.16 +- base >4.11 && <4.18 - scale >=1.0 && <1.1 -- memory >0.14 && <0.17 +- memory >0.14 && <0.19 - memory-hexstring >=1.0 && <1.1 - cereal >0.5 && <0.6 - wide-word >0.1 && <0.2 @@ -21,7 +21,6 @@ dependencies: ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -32,7 +31,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds @@ -56,9 +54,9 @@ tests: dependencies: - memory-hexstring >=1.0 && <1.1 - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.9 + - hspec-discover >=2.4.4 && <2.11 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.9 + - hspec >=2.4.4 && <2.11 ghc-options: - -threaded - -rtsopts diff --git a/packages/bignum/src/Data/BigNum.hs b/packages/bignum/src/Data/BigNum.hs index 9f6e334e..96f59bf0 100644 --- a/packages/bignum/src/Data/BigNum.hs +++ b/packages/bignum/src/Data/BigNum.hs @@ -3,7 +3,7 @@ -- | -- Module : Data.BigNum --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs index 2b480ef0..af29ad6e 100644 --- a/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs +++ b/packages/bignum/tests/Data/BigNum/Test/BigNumSpec.hs @@ -2,7 +2,7 @@ -- | -- Module : Data.BigNum.Test.BigNumSpec --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/bignum/web3-bignum.cabal b/packages/bignum/web3-bignum.cabal index bb525f61..a0d2bfe5 100644 --- a/packages/bignum/web3-bignum.cabal +++ b/packages/bignum/web3-bignum.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: web3-bignum -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Fixed size big integers for Haskell Web3 library. description: This package implements codec instances and other helper functions. category: Network @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2024 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -29,11 +29,11 @@ library Paths_web3_bignum hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.16 + base >4.11 && <4.18 , cereal >0.5 && <0.6 - , memory >0.14 && <0.17 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , scale ==1.0.* , wide-word >0.1 && <0.2 @@ -49,15 +49,15 @@ test-suite tests hs-source-dirs: tests src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.16 + base >4.11 && <4.18 , cereal >0.5 && <0.6 - , hspec >=2.4.4 && <2.9 + , hspec >=2.4.4 && <2.11 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.9 + , hspec-discover >=2.4.4 && <2.11 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.17 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , scale ==1.0.* , wide-word >0.1 && <0.2 diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index 212f7b14..64c059fe 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -1,5 +1,5 @@ name: web3-crypto -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Cryptograhical primitives for Haskell Web3 library. description: This package implements Web3 specific cryptography and helper functions. github: "airalab/hs-web3" @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network extra-source-files: @@ -15,21 +15,20 @@ extra-source-files: - src/cbits/xxhash.c dependencies: -- base >4.11 && <4.16 -- text >1.2 && <1.3 +- base >4.11 && <4.18 +- text >1.2 && <2.1 - aeson >1.2 && <2.2 -- memory >0.14 && <0.17 -- vector >0.12 && <0.13 +- memory >0.14 && <0.19 +- vector >0.12 && <0.14 - containers >0.6 && <0.7 - uuid-types >1.0 && <1.1 -- cryptonite >0.22 && <0.30 -- bytestring >0.10 && <0.11 +- cryptonite >0.22 && <0.31 +- bytestring >0.10 && <0.12 - memory-hexstring >=1.0 && <1.1 ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -40,7 +39,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds @@ -67,9 +65,9 @@ tests: c-sources: src/cbits/xxhash.c dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.9 + - hspec-discover >=2.4.4 && <2.11 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.9 + - hspec >=2.4.4 && <2.11 ghc-options: - -threaded - -rtsopts diff --git a/packages/crypto/src/Crypto/Bip39.hs b/packages/crypto/src/Crypto/Bip39.hs index f58d26d6..1bb81752 100644 --- a/packages/crypto/src/Crypto/Bip39.hs +++ b/packages/crypto/src/Crypto/Bip39.hs @@ -2,7 +2,7 @@ -- | -- Module : Crypto.Bip39 --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ecdsa/Signature.hs b/packages/crypto/src/Crypto/Ecdsa/Signature.hs index b753e644..f89c0830 100644 --- a/packages/crypto/src/Crypto/Ecdsa/Signature.hs +++ b/packages/crypto/src/Crypto/Ecdsa/Signature.hs @@ -2,7 +2,7 @@ -- | -- Module : Crypto.Ecdsa.Signature --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ecdsa/Utils.hs b/packages/crypto/src/Crypto/Ecdsa/Utils.hs index eeb67777..e89cc1f4 100644 --- a/packages/crypto/src/Crypto/Ecdsa/Utils.hs +++ b/packages/crypto/src/Crypto/Ecdsa/Utils.hs @@ -1,6 +1,6 @@ -- | -- Module : Crypto.Ecdsa.Utils --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ethereum.hs b/packages/crypto/src/Crypto/Ethereum.hs index 10c8d7d1..ee0dbdb6 100644 --- a/packages/crypto/src/Crypto/Ethereum.hs +++ b/packages/crypto/src/Crypto/Ethereum.hs @@ -1,6 +1,6 @@ -- | -- Module : Crypto.Ethereum --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ethereum/Keyfile.hs b/packages/crypto/src/Crypto/Ethereum/Keyfile.hs index 1b2fbda4..43cca2a1 100644 --- a/packages/crypto/src/Crypto/Ethereum/Keyfile.hs +++ b/packages/crypto/src/Crypto/Ethereum/Keyfile.hs @@ -4,7 +4,7 @@ -- | -- Module : Crypto.Ethereum.Keyfile --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ethereum/Signature.hs b/packages/crypto/src/Crypto/Ethereum/Signature.hs index 0883ea8b..e4358e51 100644 --- a/packages/crypto/src/Crypto/Ethereum/Signature.hs +++ b/packages/crypto/src/Crypto/Ethereum/Signature.hs @@ -2,7 +2,7 @@ -- | -- Module : Crypto.Ecdsa.Signature --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Ethereum/Utils.hs b/packages/crypto/src/Crypto/Ethereum/Utils.hs index 928e3fd4..8b4462c7 100644 --- a/packages/crypto/src/Crypto/Ethereum/Utils.hs +++ b/packages/crypto/src/Crypto/Ethereum/Utils.hs @@ -1,6 +1,6 @@ -- | -- Module : Crypto.Ethereum.Utils --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/src/Crypto/Random/HmacDrbg.hs b/packages/crypto/src/Crypto/Random/HmacDrbg.hs index 8b48cf02..b03155de 100644 --- a/packages/crypto/src/Crypto/Random/HmacDrbg.hs +++ b/packages/crypto/src/Crypto/Random/HmacDrbg.hs @@ -1,6 +1,6 @@ -- | -- Module : Crypto.Random.HmacDrbg --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs b/packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs index aa300be5..113f7c68 100644 --- a/packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs +++ b/packages/crypto/tests/Crypto/Ethereum/Test/KeyfileSpec.hs @@ -1,4 +1,15 @@ {-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Crypto.Ethereum.Test.KeyfileSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Crypto.Ethereum.Test.KeyfileSpec where import Data.Aeson (eitherDecode) diff --git a/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs b/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs index 93d60271..fe5c91e3 100644 --- a/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs +++ b/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs @@ -1,4 +1,15 @@ {-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Crypto.Ethereum.Test.SignatureSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Crypto.Ethereum.Test.SignatureSpec where import Crypto.Ecdsa.Utils (importKey) diff --git a/packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs b/packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs index f56629d0..5faabe59 100644 --- a/packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs +++ b/packages/crypto/tests/Crypto/Random/Test/HmacDrbgSpec.hs @@ -1,5 +1,17 @@ {-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Crypto.Random.Test.HmacDrbgSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- -- Inspired by https://github.com/indutny/hmac-drbg +-- + module Crypto.Random.Test.HmacDrbgSpec where import Crypto.Hash.Algorithms (SHA256) diff --git a/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs b/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs index d9aff599..18cdf9f7 100644 --- a/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs +++ b/packages/crypto/tests/Data/Digest/Test/Blake2Spec.hs @@ -1,4 +1,15 @@ {-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Data.Digest.Test.Blake2Spec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Data.Digest.Test.Blake2Spec where import Data.ByteArray (convert) diff --git a/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs b/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs index 121425ce..44595a13 100644 --- a/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs +++ b/packages/crypto/tests/Data/Digest/Test/XXHashSpec.hs @@ -1,4 +1,15 @@ {-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Data.Digest.Test.XXHashSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Data.Digest.Test.XXHashSpec where import Data.ByteArray (convert) diff --git a/packages/crypto/web3-crypto.cabal b/packages/crypto/web3-crypto.cabal index 1c2c5f3e..0de46fe4 100644 --- a/packages/crypto/web3-crypto.cabal +++ b/packages/crypto/web3-crypto.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: web3-crypto -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Cryptograhical primitives for Haskell Web3 library. description: This package implements Web3 specific cryptography and helper functions. category: Network @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2024 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -41,22 +41,22 @@ library Paths_web3_crypto hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs include-dirs: src/cbits c-sources: src/cbits/xxhash.c build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.16 - , bytestring >0.10 && <0.11 + , base >4.11 && <4.18 + , bytestring >0.10 && <0.12 , containers >0.6 && <0.7 - , cryptonite >0.22 && <0.30 - , memory >0.14 && <0.17 + , cryptonite >0.22 && <0.31 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* - , text >1.2 && <1.3 + , text >1.2 && <2.1 , uuid-types >1.0 && <1.1 - , vector >0.12 && <0.13 + , vector >0.12 && <0.14 default-language: Haskell2010 test-suite tests @@ -82,24 +82,24 @@ test-suite tests hs-source-dirs: tests src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N include-dirs: src/cbits c-sources: src/cbits/xxhash.c build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.16 - , bytestring >0.10 && <0.11 + , base >4.11 && <4.18 + , bytestring >0.10 && <0.12 , containers >0.6 && <0.7 - , cryptonite >0.22 && <0.30 - , hspec >=2.4.4 && <2.9 + , cryptonite >0.22 && <0.31 + , hspec >=2.4.4 && <2.11 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.9 + , hspec-discover >=2.4.4 && <2.11 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.17 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* - , text >1.2 && <1.3 + , text >1.2 && <2.1 , uuid-types >1.0 && <1.1 - , vector >0.12 && <0.13 + , vector >0.12 && <0.14 default-language: Haskell2010 diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index e1ac7f57..643f6868 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -1,5 +1,5 @@ name: web3-ethereum -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Ethereum support for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -7,28 +7,28 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.16 -- text >1.2 && <1.3 -- vinyl >0.5 && <0.14 +- base >4.11 && <4.18 +- text >1.2 && <2.1 +- vinyl >0.5 && <0.15 - aeson >1.2 && <2.2 - aeson-casing >=0.2 && <0.3 - tagged >0.8 && <0.9 -- memory >0.14 && <0.17 +- memory >0.14 && <0.19 - relapse >=1.0 && <2.0 -- OneTuple >0.2 && <0.4 +- OneTuple >0.2 && <0.5 - machines >0.6 && <0.8 - microlens >0.4 && <0.5 -- bytestring >0.10 && <0.11 +- bytestring >0.10 && <0.12 - exceptions >0.8 && <0.11 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 - transformers >0.5 && <0.6 -- microlens-aeson >2.2 && <2.5 -- template-haskell >2.11 && <2.18 +- microlens-aeson >2.2 && <2.6 +- template-haskell >2.11 && <2.20 - mtl >2.2 && <2.3 - web3-crypto >=1.0 && <1.1 - web3-solidity >=1.0 && <1.1 @@ -38,7 +38,6 @@ dependencies: ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -49,7 +48,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds @@ -72,9 +70,9 @@ tests: - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.9 + - hspec-discover >=2.4.4 && <2.11 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.9 + - hspec >=2.4.4 && <2.11 ghc-options: - -threaded - -rtsopts diff --git a/packages/ethereum/src/Network/Ethereum.hs b/packages/ethereum/src/Network/Ethereum.hs index a2539c85..0237f942 100644 --- a/packages/ethereum/src/Network/Ethereum.hs +++ b/packages/ethereum/src/Network/Ethereum.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account.hs b/packages/ethereum/src/Network/Ethereum/Account.hs index 13c57f3c..754cf7a8 100644 --- a/packages/ethereum/src/Network/Ethereum/Account.hs +++ b/packages/ethereum/src/Network/Ethereum/Account.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum.Account --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -8,7 +8,8 @@ -- Portability : unportable -- -- In Etereun there are two types of accounts: --- * Externally owned account (EOAs): an account controlled by a private key, and if you own the private key associated with the EOA you have the ability to send ether and messages from it. +-- * Externally owned account (EOAs): an account controlled by a private key, and if you own +-- the private key associated with the EOA you have the ability to send ether and messages from it. -- * Contract: an account that has its own code, and is controlled by code. -- -- This module exports different kinds of EOAs: default, node managed and local. Node managed accounts @@ -47,8 +48,8 @@ module Network.Ethereum.Account import Network.Ethereum.Account.Class (Account (..)) import Network.Ethereum.Account.Default (DefaultAccount) import Network.Ethereum.Account.Internal (account, block, gasLimit, - gasPrice, timeout, to, value, - withParam) + gasPrice, timeout, to, + value, withParam) import Network.Ethereum.Account.LocalKey (LocalKey (..), LocalKeyAccount) import Network.Ethereum.Account.Personal (Personal (..), diff --git a/packages/ethereum/src/Network/Ethereum/Account/Class.hs b/packages/ethereum/src/Network/Ethereum/Account/Class.hs index 80104183..e7c8f917 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Class.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Class.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Account.Class --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account/Default.hs b/packages/ethereum/src/Network/Ethereum/Account/Default.hs index e13118ba..4c197e9b 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Default.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Default.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Account.Default --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account/Internal.hs b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs index cae4688a..7f77a517 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Internal.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Account.Internal --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs b/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs index c9655682..11a9e021 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/LocalKey.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Account.LocalKey --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- Roy Blankman 2018 -- License : Apache-2.0 -- diff --git a/packages/ethereum/src/Network/Ethereum/Account/Personal.hs b/packages/ethereum/src/Network/Ethereum/Account/Personal.hs index f8f320cb..62bf58c9 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Personal.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Personal.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Ethereum.Account.Personal --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Account/Safe.hs b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs index e4790e7d..adb2eec1 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Safe.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Ethereum.Account.Safe --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -39,7 +39,7 @@ safeSend b a = lift . withReceipt waiting =<< send a where withReceipt f receiptOrTx = case receiptOrTx of - Left tx -> return $ Left tx + Left tx -> return $ Left tx Right receipt -> Right <$> f receipt waiting receipt = diff --git a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs index ec737f79..c0f12cdd 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Web3.Eth --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -20,7 +20,8 @@ import Data.Solidity.Prim.Address (Address) import Data.Text (Text) import Network.Ethereum.Api.Types (Block, BlockT, Call, Change, DefaultBlock, Filter, Quantity, - SyncingState, Transaction, TxReceipt) + SyncingState, Transaction, + TxReceipt) import Network.JsonRpc.TinyClient (JsonRpc (..)) -- | Returns the current ethereum protocol version. diff --git a/packages/ethereum/src/Network/Ethereum/Api/Net.hs b/packages/ethereum/src/Network/Ethereum/Api/Net.hs index 6f9fa760..afbde9d3 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Net.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Net.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Api.Net --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Api/Types.hs b/packages/ethereum/src/Network/Ethereum/Api/Types.hs index 41a84002..25b173af 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Types.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Types.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Ethereum.Api.Types --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -18,7 +18,8 @@ module Network.Ethereum.Api.Types where -import Data.Aeson (FromJSON (..), Options (fieldLabelModifier, omitNothingFields), +import Data.Aeson (FromJSON (..), + Options (fieldLabelModifier, omitNothingFields), ToJSON (..), Value (Bool, String), defaultOptions, object, (.=)) import Data.Aeson.TH (deriveJSON) @@ -32,7 +33,7 @@ import qualified Data.Text.Lazy.Builder as B (toLazyText) import qualified Data.Text.Lazy.Builder.Int as B (hexadecimal) import qualified Data.Text.Read as R (decimal, hexadecimal) import GHC.Generics (Generic) -import Lens.Micro (over, _head) +import Lens.Micro (_head, over) -- | Should be viewed as type to representing QUANTITY in Web3 JSON RPC docs -- diff --git a/packages/ethereum/src/Network/Ethereum/Api/Web3.hs b/packages/ethereum/src/Network/Ethereum/Api/Web3.hs index 5df6eff3..1a0b6f3a 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Web3.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Web3.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Api.Web3 --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Chain.hs b/packages/ethereum/src/Network/Ethereum/Chain.hs index a3a87d41..6993fa5e 100644 --- a/packages/ethereum/src/Network/Ethereum/Chain.hs +++ b/packages/ethereum/src/Network/Ethereum/Chain.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum.Chain --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Contract.hs b/packages/ethereum/src/Network/Ethereum/Contract.hs index a90ee11d..c021fff3 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Contract --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -50,5 +50,5 @@ new = fmap (mapRight receiptContractAddress) . safeSend safeConfirmations where mapRight f e = case e of - Left x -> Left x + Left x -> Left x Right y -> Right $ f y diff --git a/packages/ethereum/src/Network/Ethereum/Contract/Event.hs b/packages/ethereum/src/Network/Ethereum/Contract/Event.hs index 736e866d..cbd20455 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/Event.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/Event.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum.Contract.Event --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Contract/Method.hs b/packages/ethereum/src/Network/Ethereum/Contract/Method.hs index 8cb56c4b..c41b13ea 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/Method.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/Method.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Ethereum.Contract.Method --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs index 4e7c090a..ff3a13a9 100644 --- a/packages/ethereum/src/Network/Ethereum/Contract/TH.hs +++ b/packages/ethereum/src/Network/Ethereum/Contract/TH.hs @@ -1,13 +1,13 @@ +{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} -- | -- Module : Network.Ethereum.Contract.TH --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -64,8 +64,8 @@ import Generics.SOP (Generic) import qualified GHC.Generics as GHC (Generic) import Language.Haskell.TH import Language.Haskell.TH.Quote -import Lens.Micro (over, (^?), _head) -import Lens.Micro.Aeson (key, _JSON, _String) +import Lens.Micro (_head, over, (^?)) +import Lens.Micro.Aeson (_JSON, _String, key) import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Event (IndexedEvent (..)) @@ -75,8 +75,7 @@ import Language.Solidity.Abi (ContractAbi (..), Declaration (..), EventArg (..), FunctionArg (..), - SolidityType (..), - eventId, + SolidityType (..), eventId, methodId, parseSolidityEventArgType, parseSolidityFunctionArgType) @@ -350,7 +349,7 @@ quoteAbiDec str = Just (ContractAbi decs) -> do funEvDecs <- concat <$> mapM mkDecl (escape decs) case constructorSpec str of - Nothing -> return funEvDecs + Nothing -> return funEvDecs Just (a, b, c, d) -> (funEvDecs ++) <$> mkContractDecl a b c d -- | Abi information string diff --git a/packages/ethereum/src/Network/Ethereum/Ens.hs b/packages/ethereum/src/Network/Ethereum/Ens.hs index f507e1a6..c1b4491e 100644 --- a/packages/ethereum/src/Network/Ethereum/Ens.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Ethereum.Ens --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs b/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs index d704c4b5..c63881e1 100644 --- a/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens/PublicResolver.hs @@ -8,7 +8,7 @@ -- | -- Module : Network.Ethereum.Ens.PublicResolver --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs b/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs index 2d31ee39..abd64aad 100644 --- a/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs +++ b/packages/ethereum/src/Network/Ethereum/Ens/Registry.hs @@ -8,7 +8,7 @@ -- | -- Module : Network.Ethereum.Ens.Registry --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/src/Network/Ethereum/Transaction.hs b/packages/ethereum/src/Network/Ethereum/Transaction.hs index 7a5538bc..31d20839 100644 --- a/packages/ethereum/src/Network/Ethereum/Transaction.hs +++ b/packages/ethereum/src/Network/Ethereum/Transaction.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Ethereum.Transaction --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- Roy Blankman 2018 -- License : Apache-2.0 -- diff --git a/packages/ethereum/src/Network/Ethereum/Unit.hs b/packages/ethereum/src/Network/Ethereum/Unit.hs index 53fe8a7c..05d5749b 100644 --- a/packages/ethereum/src/Network/Ethereum/Unit.hs +++ b/packages/ethereum/src/Network/Ethereum/Unit.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Ethereum.Unit --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs index 716f09af..3d42d8f4 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/EventSpec.hs @@ -3,6 +3,16 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} +-- | +-- Module : Network.Ethereum.Test.EventSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Network.Ethereum.Test.EventSpec where import Data.Tagged (Tagged) diff --git a/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs index ec00352e..2a2e793b 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/MethodDumpSpec.hs @@ -1,5 +1,15 @@ {-# LANGUAGE QuasiQuotes #-} +-- | +-- Module : Network.Ethereum.Test.MethodDumpSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Network.Ethereum.Test.MethodDumpSpec where import Network.Ethereum.Contract.TH diff --git a/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs index 4cbfb9fb..e8331f3c 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/THSpec.hs @@ -4,6 +4,17 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} + +-- | +-- Module : Network.Ethereum.Test.THSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Network.Ethereum.Test.THSpec where import Data.Tuple.OneTuple diff --git a/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs b/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs index c5c06942..f54b60ba 100644 --- a/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs +++ b/packages/ethereum/tests/Network/Ethereum/Test/TransactionSpec.hs @@ -1,4 +1,15 @@ {-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Network.Ethereum.Test.TransactionSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Network.Ethereum.Test.TransactionSpec where import Crypto.Ecdsa.Utils (importKey) diff --git a/packages/ethereum/web3-ethereum.cabal b/packages/ethereum/web3-ethereum.cabal index 7e2a8010..110ea934 100644 --- a/packages/ethereum/web3-ethereum.cabal +++ b/packages/ethereum/web3-ethereum.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.7. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: web3-ethereum -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Ethereum support for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2024 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -54,29 +54,29 @@ library Paths_web3_ethereum hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - OneTuple >0.2 && <0.4 + OneTuple >0.2 && <0.5 , aeson >1.2 && <2.2 , aeson-casing ==0.2.* - , base >4.11 && <4.16 - , bytestring >0.10 && <0.11 + , base >4.11 && <4.18 + , bytestring >0.10 && <0.12 , data-default >0.7 && <0.8 , exceptions >0.8 && <0.11 , generics-sop >0.3 && <0.6 , jsonrpc-tinyclient ==1.0.* , machines >0.6 && <0.8 - , memory >0.14 && <0.17 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 - , microlens-aeson >2.2 && <2.5 + , microlens-aeson >2.2 && <2.6 , mtl >2.2 && <2.3 , relapse >=1.0 && <2.0 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.18 - , text >1.2 && <1.3 + , template-haskell >2.11 && <2.20 + , text >1.2 && <2.1 , transformers >0.5 && <0.6 - , vinyl >0.5 && <0.14 + , vinyl >0.5 && <0.15 , web3-crypto ==1.0.* , web3-solidity ==1.0.* default-language: Haskell2010 @@ -119,33 +119,33 @@ test-suite tests hs-source-dirs: tests src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - OneTuple >0.2 && <0.4 + OneTuple >0.2 && <0.5 , aeson >1.2 && <2.2 , aeson-casing ==0.2.* - , base >4.11 && <4.16 - , bytestring >0.10 && <0.11 + , base >4.11 && <4.18 + , bytestring >0.10 && <0.12 , data-default >0.7 && <0.8 , exceptions >0.8 && <0.11 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.9 + , hspec >=2.4.4 && <2.11 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.9 + , hspec-discover >=2.4.4 && <2.11 , hspec-expectations >=0.8.2 && <0.9 , jsonrpc-tinyclient ==1.0.* , machines >0.6 && <0.8 - , memory >0.14 && <0.17 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 - , microlens-aeson >2.2 && <2.5 + , microlens-aeson >2.2 && <2.6 , mtl >2.2 && <2.3 , relapse >=1.0 && <2.0 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.18 - , text >1.2 && <1.3 + , template-haskell >2.11 && <2.20 + , text >1.2 && <2.1 , transformers >0.5 && <0.6 - , vinyl >0.5 && <0.14 + , vinyl >0.5 && <0.15 , web3-crypto ==1.0.* , web3-solidity ==1.0.* default-language: Haskell2010 diff --git a/packages/hexstring/memory-hexstring.cabal b/packages/hexstring/memory-hexstring.cabal index 095bfbd3..09d21295 100644 --- a/packages/hexstring/memory-hexstring.cabal +++ b/packages/hexstring/memory-hexstring.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: memory-hexstring -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Hex-string type for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2024 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -32,13 +32,13 @@ library Paths_memory_hexstring hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.16 - , bytestring >0.10 && <0.11 - , memory >0.14 && <0.17 + , base >4.11 && <4.18 + , bytestring >0.10 && <0.12 + , memory >0.14 && <0.19 , scale ==1.0.* - , template-haskell >2.11 && <2.18 - , text >1.2 && <1.3 + , template-haskell >2.11 && <2.20 + , text >1.2 && <2.1 default-language: Haskell2010 diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index cb53ec4d..a8fa6f0f 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -1,5 +1,5 @@ name: memory-hexstring -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Hex-string type for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -7,22 +7,21 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.16 -- text >1.2 && <1.3 +- base >4.11 && <4.18 +- text >1.2 && <2.1 - aeson >1.2 && <2.2 -- memory >0.14 && <0.17 -- bytestring >0.10 && <0.11 -- template-haskell >2.11 && <2.18 +- memory >0.14 && <0.19 +- bytestring >0.10 && <0.12 +- template-haskell >2.11 && <2.20 - scale >=1.0 && <1.1 ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -33,7 +32,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds diff --git a/packages/hexstring/src/Data/ByteArray/HexString.hs b/packages/hexstring/src/Data/ByteArray/HexString.hs index 26af1785..12f36bcd 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.ByteArray.HexString --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/hexstring/src/Data/ByteArray/HexString/Convert.hs b/packages/hexstring/src/Data/ByteArray/HexString/Convert.hs index 825f3fac..ececd1fb 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString/Convert.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString/Convert.hs @@ -2,7 +2,7 @@ -- | -- Module : Data.ByteArray.HexString.Convert --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/hexstring/src/Data/ByteArray/HexString/Internal.hs b/packages/hexstring/src/Data/ByteArray/HexString/Internal.hs index e4204cc7..1e7ad8ad 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString/Internal.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString/Internal.hs @@ -3,7 +3,7 @@ -- | -- Module : Data.ByteArray.HexString.Internal --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/hexstring/src/Data/ByteArray/HexString/TH.hs b/packages/hexstring/src/Data/ByteArray/HexString/TH.hs index d7f08219..f332a6c1 100644 --- a/packages/hexstring/src/Data/ByteArray/HexString/TH.hs +++ b/packages/hexstring/src/Data/ByteArray/HexString/TH.hs @@ -3,7 +3,7 @@ -- | -- Module : Data.ByteArray.HexString.TH --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -19,9 +19,11 @@ import Data.ByteArray.HexString.Internal (HexString) import Data.String (fromString) import Language.Haskell.TH.Quote (QuasiQuoter (..), quoteFile) +-- | Get hex string from a file. hexFrom :: QuasiQuoter hexFrom = quoteFile hex +-- | Get hex string from plain text. hex :: QuasiQuoter hex = QuasiQuoter { quoteExp = \s -> [|fromString s :: HexString|] diff --git a/packages/ipfs/LICENSE b/packages/ipfs/LICENSE deleted file mode 100644 index 0d8d1a8b..00000000 --- a/packages/ipfs/LICENSE +++ /dev/null @@ -1,211 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright 2016-2021 Aleksandr Krupenkin - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - NOTE - -Individual files contain the following tag instead of the full license -text. - - SPDX-License-Identifier: Apache-2.0 - -This enables machine processing of license information based on the SPDX -License Identifiers that are here available: http://spdx.org/licenses/ diff --git a/packages/ipfs/Setup.hs b/packages/ipfs/Setup.hs deleted file mode 100644 index 9a994af6..00000000 --- a/packages/ipfs/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/packages/ipfs/package.yaml b/packages/ipfs/package.yaml deleted file mode 100644 index ad05f55c..00000000 --- a/packages/ipfs/package.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: web3-ipfs -version: 1.0.0.1 -synopsis: IPFS support for Haskell Web3 library. -description: Client library for Third Generation of Web. -github: "airalab/hs-web3" -license: Apache-2.0 -license-file: LICENSE -author: Aleksandr Krupenkin -maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" -category: Network - -dependencies: -- base >4.11 && <4.16 -- mtl >2.2 && <2.3 -- tar >0.4 && <0.6 -- text >1.2 && <1.3 -- aeson >1.2 && <2.2 -- servant >0.12 && <0.20 -- http-media >0.6 && <0.8.1 -- bytestring >0.10 && <0.11 -- http-types >0.11 && <0.14 -- http-client >0.5 && <0.8 -- servant-client >0.12 && <0.20 -- unordered-containers >0.1 && <0.3 - -ghc-options: -- -funbox-strict-fields -- -Wduplicate-exports -- -Whi-shadowing -- -Widentities -- -Woverlapping-patterns -- -Wpartial-type-signatures -- -Wunrecognised-pragmas -- -Wtyped-holes -- -Wincomplete-patterns -- -Wincomplete-uni-patterns -- -Wmissing-fields -- -Wmissing-methods -- -Wmissing-exported-signatures -- -Wmissing-monadfail-instances -- -Wmissing-signatures -- -Wname-shadowing -- -Wunused-binds -- -Wunused-top-binds -- -Wunused-local-binds -- -Wunused-pattern-binds -- -Wunused-imports -- -Wunused-matches -- -Wunused-foralls -- -Wtabs - -library: - source-dirs: src diff --git a/packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs b/packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs deleted file mode 100644 index f63114fe..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Bitswap.hs +++ /dev/null @@ -1,41 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Bitswap --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `bitswap` prefix. --- - -module Network.Ipfs.Api.Bitswap where - -import Control.Monad.IO.Class (MonadIO (..)) -import Data.Text (Text) - -import Network.Ipfs.Api.Internal (_bitswapLedger, - _bitswapReprovide, - _bitswapStat, _bitswapWL) -import Network.Ipfs.Api.Internal.Call (call) -import Network.Ipfs.Api.Types (BitswapLedgerObj, - BitswapStatObj, BitswapWLObj, - ReprovideReturnType) -import Network.Ipfs.Client (IpfsT) - --- | 'Show some diagnostic information on the bitswap agent. -stat :: MonadIO m => IpfsT m BitswapStatObj -stat = call _bitswapStat - --- | Show blocks currently on the wantlist. -wl :: MonadIO m => IpfsT m BitswapWLObj -wl = call _bitswapWL - --- | Show the current ledger for a peer. -ledger :: MonadIO m => Text -> IpfsT m BitswapLedgerObj -ledger = call . _bitswapLedger - --- | Trigger reprovider. -reprovide :: MonadIO m => IpfsT m ReprovideReturnType -reprovide = call _bitswapReprovide diff --git a/packages/ipfs/src/Network/Ipfs/Api/Block.hs b/packages/ipfs/src/Network/Ipfs/Api/Block.hs deleted file mode 100644 index 26162638..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Block.hs +++ /dev/null @@ -1,39 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Network.Ipfs.Api.Block --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `block` prefix. --- - -module Network.Ipfs.Api.Block where - -import Control.Monad.IO.Class (MonadIO) -import Data.Aeson (decode) -import Data.Text (Text) -import Network.HTTP.Client (responseBody) - -import Network.Ipfs.Api.Internal (_blockGet, _blockStat) -import Network.Ipfs.Api.Internal.Call (call, multipartCall) -import Network.Ipfs.Api.Types (BlockObj, BlockReturnType) -import Network.Ipfs.Client (IpfsT) - --- | Get a raw IPFS block. -get :: MonadIO m => Text -> IpfsT m BlockReturnType -get = call . _blockGet - --- | Store input as an IPFS block. -put :: MonadIO m => Text -> IpfsT m (Maybe BlockObj) -put = fmap decodeResponse . multipartCall "block/put" - where - decodeResponse = decode . responseBody - --- | Print information of a raw IPFS block. -stat :: MonadIO m => Text -> IpfsT m BlockObj -stat = call . _blockStat diff --git a/packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs b/packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs deleted file mode 100644 index e0a117e7..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Bootstrap.hs +++ /dev/null @@ -1,34 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Bootstrap --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `bootstrap` prefix. --- - -module Network.Ipfs.Api.Bootstrap where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text) - -import Network.Ipfs.Api.Internal (_bootstrapAdd, _bootstrapList, - _bootstrapRM) -import Network.Ipfs.Api.Internal.Call (call) -import Network.Ipfs.Api.Types (BootstrapObj) -import Network.Ipfs.Client (IpfsT) - --- | Add peers to the bootstrap list. -add :: MonadIO m => Text -> IpfsT m BootstrapObj -add = call . _bootstrapAdd . Just - --- | Show peers in the bootstrap list. -list :: MonadIO m => IpfsT m BootstrapObj -list = call _bootstrapList - --- | Remove peers from the bootstrap list. -rm :: MonadIO m => Text -> IpfsT m BootstrapObj -rm = call . _bootstrapRM . Just diff --git a/packages/ipfs/src/Network/Ipfs/Api/Cid.hs b/packages/ipfs/src/Network/Ipfs/Api/Cid.hs deleted file mode 100644 index 253ba841..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Cid.hs +++ /dev/null @@ -1,44 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Cid --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `cid` prefix. --- - -module Network.Ipfs.Api.Cid where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text) - -import Network.Ipfs.Api.Internal (_cidBase32, _cidBases, - _cidCodecs, _cidFormat, - _cidHashes) -import Network.Ipfs.Api.Internal.Call (call) -import Network.Ipfs.Api.Types (CidBasesObj, CidCodecsObj, - CidHashesObj, CidObj) -import Network.Ipfs.Client (IpfsT) - --- | List available multibase encodings. -bases :: MonadIO m => IpfsT m [CidBasesObj] -bases = call _cidBases - --- | List available CID codecs. -codecs :: MonadIO m => IpfsT m [CidCodecsObj] -codecs = call _cidCodecs - --- | List available multihashes. -hashes :: MonadIO m => IpfsT m [CidHashesObj] -hashes = call _cidHashes - --- | Convert CIDs to Base32 CID version 1. -base32 :: MonadIO m => Text -> IpfsT m CidObj -base32 = call . _cidBase32 - --- | Format and convert a CID in various useful ways. -format :: MonadIO m => Text -> IpfsT m CidObj -format = call . _cidFormat diff --git a/packages/ipfs/src/Network/Ipfs/Api/Config.hs b/packages/ipfs/src/Network/Ipfs/Api/Config.hs deleted file mode 100644 index 24405c73..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Config.hs +++ /dev/null @@ -1,40 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Network.Ipfs.Api.Config --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `config` prefix. --- - -module Network.Ipfs.Api.Config where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text) -import Network.HTTP.Client (responseStatus) -import Network.HTTP.Types (Status (..)) - -import Network.Ipfs.Api.Internal (_configGet, _configSet) -import Network.Ipfs.Api.Internal.Call (call, multipartCall) -import Network.Ipfs.Api.Types (ConfigObj) -import Network.Ipfs.Client (IpfsT) - - --- | Get ipfs config values. -get :: MonadIO m => Text -> IpfsT m ConfigObj -get = call . _configGet - --- | Set ipfs config values. -set :: MonadIO m => Text -> Maybe Text -> IpfsT m ConfigObj -set key = call . _configSet key - --- | Replace the config with the file at . -replace :: MonadIO m => Text -> IpfsT m Bool -replace = fmap isSuccess . multipartCall "config/replace" - where - isSuccess = (== 200) . statusCode . responseStatus diff --git a/packages/ipfs/src/Network/Ipfs/Api/Core.hs b/packages/ipfs/src/Network/Ipfs/Api/Core.hs deleted file mode 100644 index 05a984a6..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Core.hs +++ /dev/null @@ -1,88 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Network.Ipfs.Api.Core --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Core IPFS API calls. --- - -module Network.Ipfs.Api.Core where - -import qualified Codec.Archive.Tar as Tar -import Control.Monad.IO.Class (MonadIO (..)) -import Data.Aeson (decode) -import Data.ByteString.Lazy (fromStrict) -import Data.Text (Text) -import Data.Text.Encoding (encodeUtf8) -import Network.HTTP.Client (responseBody) -import Servant.API.ContentTypes (NoContent) - -import Network.Ipfs.Api.Internal (_cat, _dns, _get, _id, - _idPeer, _ls, _shutdown, - _version) -import Network.Ipfs.Api.Internal.Call (call, multipartCall, - streamCall) -import Network.Ipfs.Api.Internal.Stream (_ping, _refs, _refsLocal) -import Network.Ipfs.Api.Types (AddObj, CatReturnType, - DnsObj, IdObj, LsObj, - VersionObj) -import Network.Ipfs.Client (IpfsT) - --- | Show IPFS object data. -cat :: MonadIO m => Text -> IpfsT m CatReturnType -cat = call . _cat - --- | Add a file or directory to ipfs. -add :: MonadIO m => Text -> IpfsT m (Maybe AddObj) -add = fmap decodeResponse . multipartCall "add" - where - decodeResponse = decode . responseBody - --- | List directory contents for Unix filesystem objects. -ls :: MonadIO m => Text -> IpfsT m LsObj -ls = call . _ls - --- | Download IPFS objects. -get :: MonadIO m => Text -> IpfsT m Text -get hash = do - ret <- call $ _get hash - do liftIO $ Tar.unpack "getResponseDirectory" . Tar.read . fromStrict $ encodeUtf8 ret - pure "The content has been stored in getResponseDirectory." - --- | Show ipfs version information. -version :: MonadIO m => IpfsT m VersionObj -version = call _version - --- | Show ipfs node id info. -id :: MonadIO m => IpfsT m IdObj -id = call _id - --- | Show ipfs node id info of the given peerId. -idPeer :: MonadIO m => Text -> IpfsT m IdObj -idPeer = call . _idPeer - --- | Resolve DNS links. -dns :: MonadIO m => Text -> IpfsT m DnsObj -dns = call . _dns - --- | List links (references) from an object. -refs :: MonadIO m => Text -> m () -refs = streamCall . _refs - --- | List all local references. -refsLocal :: MonadIO m => m () -refsLocal = streamCall _refsLocal - --- | Send echo request packets to IPFS hosts. -ping :: MonadIO m => Text -> m () -ping = streamCall . _ping - --- | Shut down the ipfs daemon. -shutdown :: MonadIO m => IpfsT m NoContent -shutdown = call _shutdown diff --git a/packages/ipfs/src/Network/Ipfs/Api/Dag.hs b/packages/ipfs/src/Network/Ipfs/Api/Dag.hs deleted file mode 100644 index e5f39eb2..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Dag.hs +++ /dev/null @@ -1,40 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Network.Ipfs.Api.Dag --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `dag` prefix. --- - -module Network.Ipfs.Api.Dag where - -import Control.Monad.IO.Class (MonadIO) -import Data.Aeson (decode) -import Data.Text (Text) -import Network.HTTP.Client (responseBody) - -import Network.Ipfs.Api.Internal (_dagGet, _dagResolve) -import Network.Ipfs.Api.Internal.Call (call, multipartCall) -import Network.Ipfs.Api.Types (DagPutObj, DagResolveObj, - DagReturnType) -import Network.Ipfs.Client (IpfsT) - --- | Get a dag node from ipfs. -get :: MonadIO m => Text -> IpfsT m DagReturnType -get = call . _dagGet - --- | Resolve ipld block. -resolve :: MonadIO m => Text -> IpfsT m DagResolveObj -resolve = call . _dagResolve - --- | Add a dag node to ipfs. -put :: MonadIO m => Text -> IpfsT m (Maybe DagPutObj) -put = fmap decodeResponse . multipartCall "dag/put" - where - decodeResponse = decode . responseBody diff --git a/packages/ipfs/src/Network/Ipfs/Api/Dht.hs b/packages/ipfs/src/Network/Ipfs/Api/Dht.hs deleted file mode 100644 index 7a1650d2..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Dht.hs +++ /dev/null @@ -1,41 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Dht --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `dht` prefix. --- - -module Network.Ipfs.Api.Dht where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text) - -import Network.Ipfs.Api.Internal.Call (streamCall) -import Network.Ipfs.Api.Internal.Stream (_dhtFindPeer, _dhtFindProvs, - _dhtGet, _dhtProvide, - _dhtQuery) - --- | Find the multiaddresses associated with the given peerId. -findPeer :: MonadIO m => Text -> m () -findPeer = streamCall . _dhtFindPeer - --- | Find peers that can provide a specific value, given a key. -findProvs :: MonadIO m => Text -> m () -findProvs = streamCall . _dhtFindProvs - --- | Given a key, query the routing system for its best value. -get :: MonadIO m => Text -> m () -get cid = streamCall $ _dhtGet cid - --- | Announce to the network that you are providing given values. -provide :: MonadIO m => Text -> m () -provide = streamCall . _dhtProvide - --- | Find the closest Peer IDs to a given peerID by querying the DHT. -query :: MonadIO m => Text -> m () -query = streamCall . _dhtQuery diff --git a/packages/ipfs/src/Network/Ipfs/Api/Files.hs b/packages/ipfs/src/Network/Ipfs/Api/Files.hs deleted file mode 100644 index 15b050c6..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Files.hs +++ /dev/null @@ -1,74 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Network.Ipfs.Api.Files --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `files` prefix. --- - -module Network.Ipfs.Api.Files where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text, pack) -import Network.HTTP.Client (responseStatus) -import Network.HTTP.Types (Status (..)) -import Servant.API.ContentTypes (NoContent) - -import Network.Ipfs.Api.Internal (_filesChcid, _filesCp, - _filesFlush, _filesLs, - _filesMkdir, _filesMv, - _filesRead, _filesRm, - _filesStat) -import Network.Ipfs.Api.Internal.Call (call, multipartCall) -import Network.Ipfs.Api.Types (FilesFlushObj, FilesLsObj, - FilesReadType, FilesStatObj) -import Network.Ipfs.Client (IpfsT) - --- | Change the cid version or hash function of the root node of a given mfsPath. -chcidVer :: MonadIO m => Text -> Int -> IpfsT m NoContent -chcidVer mfsPath = call . _filesChcid (Just mfsPath) . Just - --- | Copy files into mfs. -cp :: MonadIO m => Text -> Text -> IpfsT m NoContent -cp src = call . _filesCp (Just src) . Just - --- | Flush a given path's data to disk. -flush :: MonadIO m => Text -> IpfsT m FilesFlushObj -flush = call . _filesFlush . Just - --- | List directories in the local mutable namespace. -ls :: MonadIO m => Text -> IpfsT m FilesLsObj -ls = call . _filesLs . Just - --- | Make directories. -mkdir :: MonadIO m => Text -> IpfsT m NoContent -mkdir = call . _filesMkdir . Just - --- | Move files. -mv :: MonadIO m => Text -> Text -> IpfsT m NoContent -mv src = call . _filesMv (Just src) . Just - --- | Read a file in a given mfs. -read :: MonadIO m => Text -> IpfsT m FilesReadType -read = call . _filesRead . Just - --- | Display file status. -stat :: MonadIO m => Text -> IpfsT m FilesStatObj -stat = call . _filesStat . Just - --- | Remove a file. -filesRm :: MonadIO m => Text -> IpfsT m NoContent -filesRm = call . flip _filesRm (Just True) . Just - --- | Write to a mutable file in a given filesystem. -write :: MonadIO m => Text -> Text -> Bool -> IpfsT m Bool -write mfsPath filePath toTruncate = isSuccess <$> multipartCall uri filePath - where - uri = "files/write?arg=" <> mfsPath <> "&create=true" <> "&truncate=" <> (pack $ show toTruncate) - isSuccess = (200 ==) . statusCode . responseStatus diff --git a/packages/ipfs/src/Network/Ipfs/Api/Internal.hs b/packages/ipfs/src/Network/Ipfs/Api/Internal.hs deleted file mode 100644 index c1ac1eb2..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Internal.hs +++ /dev/null @@ -1,100 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Internal --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : portable --- --- IPFS API internals. --- - -module Network.Ipfs.Api.Internal where - -import Data.Proxy (Proxy (..)) -import Data.Text (Text) -import Servant.API -import Servant.Client (ClientM, client) - -import Network.Ipfs.Api.Types - -_ipfsApi :: Proxy IpfsApi -_ipfsApi = Proxy - -_cat :: Text -> ClientM CatReturnType -_ls :: Text -> ClientM LsObj -_get :: Text -> ClientM GetReturnType -_swarmPeers :: ClientM SwarmPeersObj -_swarmConnect :: Maybe Text -> ClientM SwarmObj -_swarmDisconnect :: Maybe Text -> ClientM SwarmObj -_swarmFilters :: ClientM SwarmObj -_swarmFilterAdd :: Maybe Text -> ClientM SwarmObj -_swarmFilterRm :: Maybe Text -> ClientM SwarmObj -_bitswapStat :: ClientM BitswapStatObj -_bitswapWL :: ClientM BitswapWLObj -_bitswapLedger :: Text -> ClientM BitswapLedgerObj -_bitswapReprovide :: ClientM ReprovideReturnType -_cidBases :: ClientM [CidBasesObj] -_cidCodecs :: ClientM [CidCodecsObj] -_cidHashes :: ClientM [CidHashesObj] -_cidBase32 :: Text -> ClientM CidObj -_cidFormat :: Text -> ClientM CidObj -_blockGet :: Text -> ClientM BlockReturnType -_blockStat :: Text -> ClientM BlockObj -_dagGet :: Text -> ClientM DagReturnType -_dagResolve :: Text -> ClientM DagResolveObj -_configGet :: Text -> ClientM ConfigObj -_configSet :: Text -> Maybe Text -> ClientM ConfigObj -_objectData :: Text -> ClientM ObjectReturnType -_objectNew :: ClientM ObjectObj -_objectGetLinks :: Text -> ClientM ObjectLinksObj -_objectAddLink :: Text -> Maybe Text -> Maybe Text -> ClientM ObjectLinksObj -_objectRmLink :: Text -> Maybe Text -> ClientM ObjectLinksObj -_objectGet :: Text -> ClientM ObjectGetObj -_objectDiff :: Text -> Maybe Text -> ClientM ObjectDiffObj -_objectStat :: Text -> ClientM ObjectStatObj -_pinAdd :: Text -> ClientM PinObj -_pinRemove :: Text -> ClientM PinObj -_bootstrapAdd :: Maybe Text -> ClientM BootstrapObj -_bootstrapList :: ClientM BootstrapObj -_bootstrapRM :: Maybe Text -> ClientM BootstrapObj -_statsBw :: ClientM StatsBwObj -_statsRepo :: ClientM StatsRepoObj -_version :: ClientM VersionObj -_id :: ClientM IdObj -_idPeer :: Text -> ClientM IdObj -_dns :: Text -> ClientM DnsObj -_pubsubLs :: ClientM PubsubObj -_pubsubPeers :: ClientM PubsubObj -_pubsubPublish :: Text -> Maybe Text -> ClientM NoContent -_logLs :: ClientM LogLsObj -_logLevel :: Text -> Maybe Text -> ClientM LogLevelObj -_repoVersion :: ClientM RepoVersionObj -_repoFsck :: ClientM RepoFsckObj -_keyGen :: Text -> (Maybe Text) -> ClientM KeyDetailsObj -_keyList :: ClientM KeyObj -_keyRename :: Text -> (Maybe Text) -> ClientM KeyRenameObj -_keyRm :: Text -> ClientM KeyObj -_filesChcid :: Maybe Text -> Maybe Int -> ClientM NoContent -_filesCp :: Maybe Text -> Maybe Text -> ClientM NoContent -_filesFlush :: Maybe Text -> ClientM FilesFlushObj -_filesLs :: Maybe Text -> ClientM FilesLsObj -_filesMkdir :: Maybe Text -> ClientM NoContent -_filesMv :: Maybe Text -> Maybe Text -> ClientM NoContent -_filesRead :: Maybe Text -> ClientM FilesReadType -_filesRm :: Maybe Text -> Maybe Bool -> ClientM NoContent -_filesStat :: Maybe Text -> ClientM FilesStatObj -_shutdown :: ClientM NoContent - -_cat :<|> _ls :<|> _get :<|> _swarmPeers :<|> _swarmConnect :<|> _swarmDisconnect :<|> - _swarmFilters :<|> _swarmFilterAdd :<|> _swarmFilterRm :<|> _bitswapStat :<|> _bitswapWL :<|> _bitswapLedger :<|> - _bitswapReprovide :<|> _cidBases :<|> _cidCodecs :<|> _cidHashes :<|> _cidBase32 :<|> _cidFormat :<|> - _blockGet :<|> _blockStat :<|> _dagGet :<|> _dagResolve :<|> _configGet :<|> - _configSet :<|> _objectData :<|> _objectNew :<|> _objectGetLinks :<|> _objectAddLink :<|> _objectRmLink :<|> - _objectGet :<|> _objectDiff :<|> _objectStat :<|> _pinAdd :<|> _pinRemove :<|> _bootstrapAdd :<|> - _bootstrapList :<|> _bootstrapRM :<|> _statsBw :<|> _statsRepo :<|> _version :<|> _id :<|> _idPeer :<|> - _dns :<|> _pubsubLs :<|> _pubsubPeers :<|> _pubsubPublish :<|> _logLs :<|> _logLevel :<|> _repoVersion :<|> - _repoFsck :<|> _keyGen :<|> _keyList :<|> _keyRename :<|> _keyRm :<|> _filesChcid :<|> _filesCp :<|> - _filesFlush :<|> _filesLs :<|> _filesMkdir :<|> _filesMv :<|> _filesRead :<|> _filesRm :<|> _filesStat :<|> - _shutdown = client _ipfsApi diff --git a/packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs b/packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs deleted file mode 100644 index f3748734..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Internal/Call.hs +++ /dev/null @@ -1,58 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE TypeOperators #-} - --- | --- Module : Network.Ipfs.Api.Internal.Call --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Module containing IPFS API call functions. --- - -module Network.Ipfs.Api.Internal.Call where - -import Control.Monad.Except -import Control.Monad.Reader -import Data.ByteString.Lazy (ByteString) -import Data.Text (Text, pack, unpack) -import Network.HTTP.Client as Net hiding (Proxy) -import Network.HTTP.Client.MultipartFormData -import Servant.Client -import qualified Servant.Client.Streaming as S -import Servant.Types.SourceT (SourceT (..), foreach) - -import Network.Ipfs.Client (IpfsT) - --- | Regular Call function. -call :: MonadIO m => ClientM a -> IpfsT m a -call func = do - (manager', url, _) <- ask - resp <- liftIO (runClientM func (mkClientEnv manager' url)) - case resp of - Left l -> throwError l - Right r -> return r - --- | Call function for ‘multipart/form-data’. -multipartCall :: MonadIO m => Text -> Text -> IpfsT m (Net.Response ByteString) -multipartCall funcUri filePath = do - (reqManager, _, url) <- ask - req <- liftIO $ parseRequest $ unpack (pack url <> "/" <> funcUri ) - liftIO $ flip httpLbs reqManager =<< formDataBody form req - where - form = [ partFileSource "file" $ unpack filePath ] - --- | Call function for Streams. -streamCall :: (MonadIO m, Show a) => S.ClientM (SourceT IO a) -> m () -streamCall func = liftIO $ do - manager' <- newManager defaultManagerSettings - S.withClientM func (S.mkClientEnv manager' (BaseUrl Http "localhost" 5001 "/api/v0")) $ \e -> case e of - Left err -> putStrLn $ "Error: " ++ show err - Right rs -> foreach fail print rs diff --git a/packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs b/packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs deleted file mode 100644 index 265964e9..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Internal/Stream.hs +++ /dev/null @@ -1,41 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Internal.Stream --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : portable --- --- Ipfs Stream API provider. --- - -module Network.Ipfs.Api.Internal.Stream where - -import qualified Data.ByteString.Lazy.Char8 () -import Data.Proxy -import Data.Text -import Network.HTTP.Client () -import Servant.API -import Servant.Client.Streaming as S - -import Network.Ipfs.Api.Types.Stream - -_ipfsStreamApi :: Proxy IpfsStreamApi -_ipfsStreamApi = Proxy - -_ping :: Text -> ClientM (SourceIO PingObj) -_dhtFindPeer :: Text -> ClientM (SourceIO DhtObj) -_dhtFindProvs :: Text -> ClientM (SourceIO DhtObj) -_dhtGet :: Text -> ClientM (SourceIO DhtObj) -_dhtProvide :: Text -> ClientM (SourceIO DhtObj) -_dhtQuery :: Text -> ClientM (SourceIO DhtObj) -_logTail :: ClientM (SourceIO LogReturnType) -_repoGc :: ClientM (SourceIO RepoGcObj) -_repoVerify :: ClientM (SourceIO RepoVerifyObj) -_refs :: Text -> ClientM (SourceIO RefsObj) -_refsLocal :: ClientM (SourceIO RefsObj) -_pubsubSubscribe :: Text -> ClientM (SourceIO PubsubSubObj) - -_ping :<|> _dhtFindPeer :<|> _dhtFindProvs :<|> _dhtGet :<|> _dhtProvide :<|> _dhtQuery :<|> - _logTail :<|> _repoGc :<|> _repoVerify :<|> _refs :<|> _refsLocal :<|> _pubsubSubscribe = client _ipfsStreamApi diff --git a/packages/ipfs/src/Network/Ipfs/Api/Key.hs b/packages/ipfs/src/Network/Ipfs/Api/Key.hs deleted file mode 100644 index 3692b67b..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Key.hs +++ /dev/null @@ -1,48 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE TypeOperators #-} - --- | --- Module : Network.Ipfs.Api.Key --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `key` prefix. --- - -module Network.Ipfs.Api.Key where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text) - -import Network.Ipfs.Api.Internal (_keyGen, _keyList, _keyRename, - _keyRm) -import Network.Ipfs.Api.Internal.Call (call) -import Network.Ipfs.Api.Types (KeyDetailsObj, KeyObj, - KeyRenameObj) -import Network.Ipfs.Client (IpfsT) - - --- | 'List all local keypairs. -list :: MonadIO m => IpfsT m KeyObj -list = call _keyList - --- | Create a new keypair. -gen :: MonadIO m => Text -> Text -> IpfsT m KeyDetailsObj -gen name = call . _keyGen name . Just - --- | Rename a keypair. -rename :: MonadIO m => Text -> Text -> IpfsT m KeyRenameObj -rename was = call . _keyRename was . Just - --- | Remove a keypair. -rm :: MonadIO m => Text -> IpfsT m KeyObj -rm = call . _keyRm - diff --git a/packages/ipfs/src/Network/Ipfs/Api/Log.hs b/packages/ipfs/src/Network/Ipfs/Api/Log.hs deleted file mode 100644 index 25ac2742..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Log.hs +++ /dev/null @@ -1,42 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE TypeOperators #-} - --- | --- Module : Network.Ipfs.Api.Log --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `log` prefix. --- - -module Network.Ipfs.Api.Log where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text) - -import Network.Ipfs.Api.Internal (_logLevel, _logLs) -import Network.Ipfs.Api.Internal.Call (call, streamCall) -import Network.Ipfs.Api.Internal.Stream (_logTail) -import Network.Ipfs.Api.Types (LogLevelObj, LogLsObj) -import Network.Ipfs.Client (IpfsT) - - --- | Change the logging level. -level :: MonadIO m => Text -> Text -> IpfsT m LogLevelObj -level subsystem = call . _logLevel subsystem . Just - --- | Read the event log. -tail :: MonadIO m => m () -tail = streamCall _logTail - --- | List the logging subsystems. -ls :: MonadIO m => IpfsT m LogLsObj -ls = call _logLs diff --git a/packages/ipfs/src/Network/Ipfs/Api/Object.hs b/packages/ipfs/src/Network/Ipfs/Api/Object.hs deleted file mode 100644 index d2b8c30b..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Object.hs +++ /dev/null @@ -1,81 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - --- | --- Module : Network.Ipfs.Api.Object --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `object` prefix. --- - -module Network.Ipfs.Api.Object where - -import Control.Monad.IO.Class (MonadIO) -import Data.Aeson (decode) -import Data.Text (Text) -import Network.HTTP.Client (responseBody) - -import Network.Ipfs.Api.Internal (_objectAddLink, _objectData, - _objectDiff, _objectGet, - _objectGetLinks, _objectNew, - _objectRmLink, _objectStat) -import Network.Ipfs.Api.Internal.Call (call, multipartCall) -import Network.Ipfs.Api.Types (ObjectDiffObj, ObjectGetObj, - ObjectLinksObj, ObjectObj, - ObjectReturnType, - ObjectStatObj) -import Network.Ipfs.Client (IpfsT) - --- | Output the raw bytes of an IPFS object. -object :: MonadIO m => Text -> IpfsT m ObjectReturnType -object = call . _objectData - --- | Create a new object from an ipfs template. -new :: MonadIO m => IpfsT m ObjectObj -new = call _objectNew - --- | Output the links pointed to by the specified object. -getLinks :: MonadIO m => Text -> IpfsT m ObjectLinksObj -getLinks = call . _objectGetLinks - --- | Add a Merkle-link to the given object and return the hash of the result. -addLink :: MonadIO m => Text -> Text -> Text -> IpfsT m ObjectLinksObj -addLink hash name = call . _objectAddLink hash (Just name) . Just - --- | Remove a Merkle-link from the given object and return the hash of the result. -rmLink :: MonadIO m => Text -> Text -> IpfsT m ObjectLinksObj -rmLink key = call . _objectRmLink key . Just - --- | Append data to what already exists in the data segment in the given object. -appendData :: MonadIO m => Text -> Text -> IpfsT m (Maybe ObjectLinksObj) -appendData key = fmap decodeResponse . multipartCall ("object/patch/append-data?arg=" <> key) - where - decodeResponse = decode . responseBody - --- | Set the data field of an IPFS object. -setData :: MonadIO m => Text -> Text -> IpfsT m (Maybe ObjectLinksObj) -setData key = fmap decodeResponse . multipartCall ("object/patch/set-data?arg=" <> key) - where - decodeResponse = decode . responseBody - --- | Get and serialize the DAG node named by key. -get :: MonadIO m => Text -> IpfsT m ObjectGetObj -get = call . _objectGet - --- | 'Display the diff between two ipfs objects. -diff :: MonadIO m => Text -> Text -> IpfsT m ObjectDiffObj -diff firstKey = call . _objectDiff firstKey . Just - --- | Store input as a DAG object, print its key. -put :: MonadIO m => Text -> IpfsT m (Maybe ObjectObj) -put = fmap decodeResponse . multipartCall "object/put" - where - decodeResponse = decode . responseBody - --- | Get stats for the DAG node named by key. -objectStat :: MonadIO m => Text -> IpfsT m ObjectStatObj -objectStat = call . _objectStat diff --git a/packages/ipfs/src/Network/Ipfs/Api/Pin.hs b/packages/ipfs/src/Network/Ipfs/Api/Pin.hs deleted file mode 100644 index 2baa548d..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Pin.hs +++ /dev/null @@ -1,29 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Pin --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `pin` prefix. --- - -module Network.Ipfs.Api.Pin where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text) - -import Network.Ipfs.Api.Internal (_pinAdd, _pinRemove) -import Network.Ipfs.Api.Internal.Call (call) -import Network.Ipfs.Api.Types (PinObj) -import Network.Ipfs.Client (IpfsT) - --- | Pin objects to local storage. -add :: MonadIO m => Text -> IpfsT m PinObj -add = call . _pinAdd - --- | Remove pinned objects from local storage. -remove :: MonadIO m => Text -> IpfsT m PinObj -remove = call . _pinRemove diff --git a/packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs b/packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs deleted file mode 100644 index 1b4363c1..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Pubsub.hs +++ /dev/null @@ -1,39 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Pubsub --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `pubsub` prefix. --- - -module Network.Ipfs.Api.Pubsub where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text) -import Servant.API.ContentTypes (NoContent) - -import Network.Ipfs.Api.Internal (_pubsubLs, _pubsubPeers, - _pubsubPublish) -import Network.Ipfs.Api.Internal.Call (call) -import Network.Ipfs.Api.Types (PubsubObj) -import Network.Ipfs.Client (IpfsT) - --- | List subscribed topics by name. -ls :: MonadIO m => IpfsT m PubsubObj -ls = call _pubsubLs - --- | List peers we are currently pubsubbing with. -peers :: MonadIO m => IpfsT m PubsubObj -peers = call _pubsubPeers - --- | Publish a message to a given pubsub topic. -publish :: MonadIO m => Text -> Text -> IpfsT m NoContent -publish topic = call . _pubsubPublish topic . Just - --- | Subscribe to messages on a given topic. ---subscribe :: Text -> m () ---subscribe = pubsubCall . _pubsubSubscribe diff --git a/packages/ipfs/src/Network/Ipfs/Api/Repo.hs b/packages/ipfs/src/Network/Ipfs/Api/Repo.hs deleted file mode 100644 index 31d831bb..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Repo.hs +++ /dev/null @@ -1,37 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Repo --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `repo` prefix. --- - -module Network.Ipfs.Api.Repo where - -import Control.Monad.IO.Class (MonadIO) - -import Network.Ipfs.Api.Internal (_repoFsck, _repoVersion) -import Network.Ipfs.Api.Internal.Call (call, streamCall) -import Network.Ipfs.Api.Internal.Stream (_repoGc, _repoVerify) -import Network.Ipfs.Api.Types (RepoFsckObj, RepoVersionObj) -import Network.Ipfs.Client (IpfsT) - --- | Show the repo version. -version :: MonadIO m => IpfsT m RepoVersionObj -version = call _repoVersion - --- | Remove repo lockfiles. -fsck :: MonadIO m => IpfsT m RepoFsckObj -fsck = call _repoFsck - --- | Perform a garbage collection sweep on the repo. -gc :: MonadIO m => m () -gc = streamCall _repoGc - --- | Verify all blocks in repo are not corrupted. -repoVerify :: MonadIO m => m () -repoVerify = streamCall _repoVerify diff --git a/packages/ipfs/src/Network/Ipfs/Api/Stats.hs b/packages/ipfs/src/Network/Ipfs/Api/Stats.hs deleted file mode 100644 index 67dfac85..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Stats.hs +++ /dev/null @@ -1,28 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Stats --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `stats` prefix. --- - -module Network.Ipfs.Api.Stats where - -import Control.Monad.IO.Class (MonadIO) - -import Network.Ipfs.Api.Internal (_statsBw, _statsRepo) -import Network.Ipfs.Api.Internal.Call (call) -import Network.Ipfs.Api.Types (StatsBwObj, StatsRepoObj) -import Network.Ipfs.Client (IpfsT) - --- | IPFS bandwidth information. -bw :: MonadIO m => IpfsT m StatsBwObj -bw = call _statsBw - --- | Get stats for the currently used repo. -repo :: MonadIO m => IpfsT m StatsRepoObj -repo = call _statsRepo diff --git a/packages/ipfs/src/Network/Ipfs/Api/Swarm.hs b/packages/ipfs/src/Network/Ipfs/Api/Swarm.hs deleted file mode 100644 index 809e0dd7..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Swarm.hs +++ /dev/null @@ -1,49 +0,0 @@ --- | --- Module : Network.Ipfs.Api.Swarm --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- Api calls with `swarm` prefix. --- - -module Network.Ipfs.Api.Swarm where - -import Control.Monad.IO.Class (MonadIO) -import Data.Text (Text) - -import Network.Ipfs.Api.Internal (_swarmConnect, - _swarmDisconnect, - _swarmFilterAdd, - _swarmFilterRm, _swarmFilters, - _swarmPeers) -import Network.Ipfs.Api.Internal.Call (call) -import Network.Ipfs.Api.Types (SwarmObj, SwarmPeersObj) -import Network.Ipfs.Client (IpfsT) - --- | List peers with open connections. -swarmPeers :: MonadIO m => IpfsT m SwarmPeersObj -swarmPeers = call _swarmPeers - --- | Open connection to a given address. 'peerId' has to be of the format - /ipfs/id -connect :: MonadIO m => Text -> IpfsT m SwarmObj -connect = call . _swarmConnect . Just - --- | Close connection to a given address. 'peerId' has to be of the format - /ipfs/id -disconnect :: MonadIO m => Text -> IpfsT m SwarmObj -disconnect = call . _swarmDisconnect . Just - --- | Manipulate address filters. -filters :: MonadIO m => IpfsT m SwarmObj -filters = call _swarmFilters - --- | Add an address filter. 'peerId' has to be of the format - /ip4/{IP addr of peer}/ipcidr/{ip network prefix} -filterAdd :: MonadIO m => Text -> IpfsT m SwarmObj -filterAdd = call . _swarmFilterAdd . Just - --- | Remove an address filter. -filterRm :: MonadIO m => Text -> IpfsT m SwarmObj -filterRm = call . _swarmFilterRm . Just diff --git a/packages/ipfs/src/Network/Ipfs/Api/Types.hs b/packages/ipfs/src/Network/Ipfs/Api/Types.hs deleted file mode 100644 index f92feb41..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Types.hs +++ /dev/null @@ -1,828 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE TypeOperators #-} - --- | --- Module : Network.Ipfs.Api.Types --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : portable --- --- IPFS API types. --- - -module Network.Ipfs.Api.Types where - -import Control.Arrow (left) -import Control.Monad -import Data.Aeson -import Data.ByteString.Lazy (toStrict) -import qualified Data.ByteString.Lazy.Char8 () -#if MIN_VERSION_aeson(2,0,0) -import qualified Data.Aeson.KeyMap as H -#else -import qualified Data.HashMap.Strict as H -#endif -import Data.Int -import Data.Text (Text) -import qualified Data.Text.Encoding as TextS -import Data.Typeable -import Network.HTTP.Client () -import qualified Network.HTTP.Media as M ((//)) -import Servant.API - -type CatReturnType = Text -type ReprovideReturnType = Text -type GetReturnType = Text -type BlockReturnType = Text -type DagReturnType = Text -type ObjectReturnType = Text -type FilesReadType = Text - -data DirLink = DirLink - { dlName :: Text - , dlHash :: Text - , dlSize :: Int64 - , dlContentType :: Int - , dlTarget :: Text - } - deriving (Show, Eq) - -data DirObj = DirObj - { dirHash :: Text - , links :: [DirLink] - } - deriving (Show, Eq) - -data AddObj = AddObj - { name :: Text - , hash :: Text - , size :: Text - } - deriving (Show, Eq) - -instance FromJSON AddObj where - parseJSON (Object o) = - AddObj <$> o .: "Name" - <*> o .: "Hash" - <*> o .: "Size" - - parseJSON _ = mzero - -data LsObj = LsObj - { objs :: [DirObj] - } - deriving (Show, Eq) - -data SwarmStreamObj = SwarmStreamObj - { protocol :: Text - } - deriving (Show, Eq) - -data SwarmPeerObj = SwarmPeerObj - { address :: Text - , direction :: Int - , latency :: Text - , muxer :: Text - , peer :: Text - , streams :: Maybe [SwarmStreamObj] - } - deriving (Show, Eq) - -data SwarmPeersObj = SwarmPeersObj - { peers :: [SwarmPeerObj] - } - deriving (Show, Eq) - -data SwarmObj = SwarmObj - { strings :: [Text] - } - deriving (Show, Eq) - -data WantlistObj = WantlistObj - { forSlash :: Text - } - deriving (Show, Eq) - -data BitswapStatObj = BitswapStatObj - { blocksReceived :: Int64 - , blocksSent :: Int64 - , dataReceived :: Int64 - , dataSent :: Int64 - , dupBlksReceived :: Int64 - , dupDataReceived :: Int64 - , messagesReceived :: Int64 - , bitswapPeers :: [Text] - , provideBufLen :: Int - , wantlist :: [WantlistObj] - } - deriving (Show, Eq) - -data BitswapWLObj = BitswapWLObj - { bitswapKeys :: [WantlistObj] - } - deriving (Show, Eq) - -data BitswapLedgerObj = BitswapLedgerObj - { exchanged :: Int64 - , ledgerPeer :: Text - , recv :: Int64 - , sent :: Int64 - , value :: Double - } - deriving (Show, Eq) - -data CidBasesObj = CidBasesObj - { baseCode :: Int - , baseName :: Text - } - deriving (Show, Eq) - -data CidCodecsObj = CidCodecsObj - { codecCode :: Int - , codecName :: Text - } - deriving (Show, Eq) - -data CidHashesObj = CidHashesObj - { multihashCode :: Int - , multihashName :: Text - } - deriving (Show, Eq) - -data CidObj = CidObj - { cidStr :: Text - , errorMsg :: Text - , formatted :: Text - } - deriving (Show, Eq) - -data BlockObj = BlockObj - { key :: Text - , blockSize :: Int - } - deriving (Show, Eq) - -data DagCidObj = DagCidObj - { cidSlash :: Text - } - deriving (Show, Eq) - -data DagResolveObj = DagResolveObj - { cid :: DagCidObj - , remPath :: Text - } - deriving (Show, Eq) - -data DagPutObj = DagPutObj - { putCid :: DagCidObj - } - deriving (Show, Eq) - -data ConfigObj = ConfigObj - { configKey :: Text - , configValue :: Text - } - deriving (Show, Eq) - -data ObjectLinkObj = ObjectLinkObj - { linkHash :: Text - , linkName :: Text - , linkSize :: Int64 - } - deriving (Show, Eq) - -data ObjectObj = ObjectObj - { newObjectHash :: Text - } - deriving (Show, Eq) - -data ObjectLinksObj = WithLinks - { objectHash :: Text - , objectLinks :: [ObjectLinkObj] - } - | WithoutLinks - { objectHash :: Text - } - deriving (Show, Eq) - -data ObjectGetObj = ObjectGetObj - { objectName :: Text - , objectGetLinks :: [ObjectLinkObj] - } - deriving (Show, Eq) - -data ObjectStatObj = ObjectStatObj - { objBlockSize :: Int - , cumulativeSize :: Int - , dataSize :: Int - , objHash :: Text - , linksSize :: Int - , numLinks :: Int - } - deriving (Show, Eq) - -data DiffObj = DiffObj - { diffSlash :: Text - } - deriving (Show, Eq) - -data ObjectChangeObj = ObjectChangeObj - { after :: Maybe DiffObj - , before :: DiffObj - , path :: Text - , diffType :: Int - } - deriving (Show, Eq) - -data ObjectDiffObj = ObjectDiffObj - { changes :: [ObjectChangeObj] - } - deriving (Show, Eq) - -data PinObj = WithoutProgress - { pins :: [Text] - } - | WithProgress - { pins :: [Text] - , progress :: Int - } - deriving (Show, Eq) - -data BootstrapObj = BootstrapObj - { bootstrapPeers :: [Text] - } - deriving (Show, Eq) - -data StatsBwObj = StatsBwObj - { rateIn :: Double - , rateOut :: Double - , totalIn :: Int64 - , totalOut :: Int64 - } - deriving (Show, Eq) - -data StatsRepoObj = StatsRepoObj - { numObjects :: Int64 - , repoPath :: Text - , repoSize :: Int64 - , storageMax :: Int64 - , repoVersion :: Text - } - deriving (Show, Eq) - -data VersionObj = VersionObj - { commit :: Text - , golang :: Text - , repo :: Text - , system :: Text - , version :: Text - } - deriving (Show, Eq) - -data IdObj = IdObj - { addresses :: [Text] - , agentVersion :: Text - , id :: Text - , protocolVersion :: Text - , publicKey :: Text - } - deriving (Show, Eq) - -data DnsObj = DnsObj - { dnsPath :: Text - } - deriving (Show, Eq) - -data PubsubObj = PubsubObj - { pubsubStrings :: [Text] - } - deriving (Show, Eq) - -data LogLsObj = LogLsObj - { logLsStrings :: [Text] - } - deriving (Show, Eq) - -data LogLevelObj = LogLevelObj - { message :: Text - } - deriving (Show, Eq) - -data RepoVersionObj = RepoVersionObj - { repoVer :: Text - } - deriving (Show, Eq) - -data RepoFsckObj = RepoFsckObj - { repoMessage :: Text - } - deriving (Show, Eq) - -data KeyDetailsObj = KeyDetailsObj - { keyId :: Text - , keyName :: Text - } - deriving (Show, Eq) - -data KeyObj = KeyObj - { keys :: [KeyDetailsObj] - } - deriving (Show, Eq) - -data KeyRenameObj = KeyRenameObj - { peerId :: Text - , now :: Text - , overwrite :: Bool - , was :: Text - } - deriving (Show, Eq) - -data FilesStatObj = FilesStatObj - { fileObjectHash :: Text - , objectSize :: Int - , cumulativeObjectSize :: Int - , blocks :: Int - , objectType :: Text - } - deriving (Show, Eq) - -data FilesEntryObj = FilesEntryObj - { entryName :: Text - , entryType :: Int - , entrySize :: Int - , entryHash :: Text - } - deriving (Show, Eq) - -data FilesLsObj = FilesLsObj - { enteries :: [FilesEntryObj] - } - deriving (Show, Eq) - -data FilesFlushObj = FilesFlushObj - { fileCid :: Text - } - deriving (Show, Eq) - -instance FromJSON DirLink where - parseJSON (Object o) = - DirLink <$> o .: "Name" - <*> o .: "Hash" - <*> o .: "Size" - <*> o .: "Type" - <*> o .: "Target" - - parseJSON _ = mzero - -instance FromJSON DirObj where - parseJSON (Object o) = - DirObj <$> o .: "Hash" - <*> o .: "Links" - - parseJSON _ = mzero - -instance FromJSON LsObj where - parseJSON (Object o) = - LsObj <$> o .: "Objects" - - parseJSON _ = mzero - - -instance FromJSON SwarmStreamObj where - parseJSON (Object o) = - SwarmStreamObj <$> o .: "Protocol" - - parseJSON _ = mzero - -instance FromJSON SwarmPeerObj where - parseJSON (Object o) = - SwarmPeerObj <$> o .: "Addr" - <*> o .: "Direction" - <*> o .: "Latency" - <*> o .: "Muxer" - <*> o .: "Peer" - <*> o .: "Streams" - - parseJSON _ = mzero - -instance FromJSON SwarmPeersObj where - parseJSON (Object o) = - SwarmPeersObj <$> o .: "Peers" - - parseJSON _ = mzero - - -instance FromJSON SwarmObj where - parseJSON (Object o) = - SwarmObj <$> o .: "Strings" - - parseJSON _ = mzero - -instance FromJSON WantlistObj where - parseJSON (Object o) = - WantlistObj <$> o .: "/" - - parseJSON _ = mzero - -instance FromJSON BitswapStatObj where - parseJSON (Object o) = - BitswapStatObj <$> o .: "BlocksReceived" - <*> o .: "BlocksSent" - <*> o .: "DataReceived" - <*> o .: "DataSent" - <*> o .: "DupBlksReceived" - <*> o .: "DupDataReceived" - <*> o .: "MessagesReceived" - <*> o .: "Peers" - <*> o .: "ProvideBufLen" - <*> o .: "Wantlist" - - parseJSON _ = mzero - - -instance FromJSON BitswapWLObj where - parseJSON (Object o) = - BitswapWLObj <$> o .: "Keys" - - parseJSON _ = mzero - -instance FromJSON BitswapLedgerObj where - parseJSON (Object o) = - BitswapLedgerObj <$> o .: "Exchanged" - <*> o .: "Peer" - <*> o .: "Recv" - <*> o .: "Sent" - <*> o .: "Value" - - parseJSON _ = mzero - -instance FromJSON CidBasesObj where - parseJSON (Object o) = - CidBasesObj <$> o .: "Code" - <*> o .: "Name" - - parseJSON _ = mzero - -instance FromJSON CidCodecsObj where - parseJSON (Object o) = - CidCodecsObj <$> o .: "Code" - <*> o .: "Name" - - parseJSON _ = mzero - -instance FromJSON CidHashesObj where - parseJSON (Object o) = - CidHashesObj <$> o .: "Code" - <*> o .: "Name" - - parseJSON _ = mzero - -instance FromJSON CidObj where - parseJSON (Object o) = - CidObj <$> o .: "CidStr" - <*> o .: "ErrorMsg" - <*> o .: "Formatted" - - parseJSON _ = mzero - -instance FromJSON BlockObj where - parseJSON (Object o) = - BlockObj <$> o .: "Key" - <*> o .: "Size" - - parseJSON _ = mzero - -instance FromJSON DagCidObj where - parseJSON (Object o) = - DagCidObj <$> o .: "/" - - parseJSON _ = mzero - -instance FromJSON DagResolveObj where - parseJSON (Object o) = - DagResolveObj <$> o .: "Cid" - <*> o .: "RemPath" - - parseJSON _ = mzero - -instance FromJSON DagPutObj where - parseJSON (Object o) = - DagPutObj <$> o .: "Cid" - - parseJSON _ = mzero - -instance FromJSON ConfigObj where - parseJSON (Object o) = - ConfigObj <$> o .: "Key" - <*> o .: "Value" - - parseJSON _ = mzero - -instance FromJSON ObjectLinkObj where - parseJSON (Object o) = - ObjectLinkObj <$> o .: "Hash" - <*> o .: "Name" - <*> o .: "Size" - - parseJSON _ = mzero - -instance FromJSON ObjectObj where - parseJSON (Object o) = - ObjectObj <$> o .: "Hash" - - parseJSON _ = mzero - -instance FromJSON ObjectLinksObj where - parseJSON (Object v) = - case H.lookup "Links" v of - Just (_) -> WithLinks <$> v .: "Hash" - <*> v .: "Links" - - Nothing -> - case H.lookup "Hash" v of - Just (_) -> WithoutLinks <$> v .: "Hash" - Nothing -> mzero - - parseJSON _ = mzero - -instance FromJSON ObjectGetObj where - parseJSON (Object o) = - ObjectGetObj <$> o .: "Data" - <*> o .: "Links" - - parseJSON _ = mzero - -instance FromJSON ObjectStatObj where - parseJSON (Object o) = - ObjectStatObj <$> o .: "BlockSize" - <*> o .: "CumulativeSize" - <*> o .: "DataSize" - <*> o .: "Hash" - <*> o .: "LinksSize" - <*> o .: "NumLinks" - - parseJSON _ = mzero - -instance FromJSON ObjectChangeObj where - parseJSON (Object o) = - ObjectChangeObj <$> o .: "After" - <*> o .: "Before" - <*> o .: "Path" - <*> o .: "Type" - - parseJSON _ = mzero - -instance FromJSON DiffObj where - parseJSON (Object o) = - DiffObj <$> o .: "/" - - parseJSON _ = mzero - -instance FromJSON ObjectDiffObj where - parseJSON (Object o) = - ObjectDiffObj <$> o .: "Changes" - - parseJSON _ = mzero - -instance FromJSON PinObj where - parseJSON (Object v) = - case H.lookup "Progress" v of - Just (_) -> WithProgress <$> v .: "Pins" - <*> v .: "Progress" - - Nothing -> - case H.lookup "Pins" v of - Just (_) -> WithoutProgress <$> v .: "Pins" - Nothing -> mzero - - parseJSON _ = mzero - -instance FromJSON BootstrapObj where - parseJSON (Object o) = - BootstrapObj <$> o .: "Peers" - - parseJSON _ = mzero - -instance FromJSON StatsBwObj where - parseJSON (Object o) = - StatsBwObj <$> o .: "RateIn" - <*> o .: "RateOut" - <*> o .: "TotalIn" - <*> o .: "TotalOut" - - parseJSON _ = mzero - -instance FromJSON StatsRepoObj where - parseJSON (Object o) = - StatsRepoObj <$> o .: "NumObjects" - <*> o .: "RepoPath" - <*> o .: "RepoSize" - <*> o .: "StorageMax" - <*> o .: "Version" - - parseJSON _ = mzero - -instance FromJSON VersionObj where - parseJSON (Object o) = - VersionObj <$> o .: "Commit" - <*> o .: "Golang" - <*> o .: "Repo" - <*> o .: "System" - <*> o .: "Version" - - parseJSON _ = mzero - -instance FromJSON IdObj where - parseJSON (Object o) = - IdObj <$> o .: "Addresses" - <*> o .: "AgentVersion" - <*> o .: "ID" - <*> o .: "ProtocolVersion" - <*> o .: "PublicKey" - - parseJSON _ = mzero - -instance FromJSON DnsObj where - parseJSON (Object o) = - DnsObj <$> o .: "Path" - - parseJSON _ = mzero - -instance FromJSON PubsubObj where - parseJSON (Object o) = - PubsubObj <$> o .: "Strings" - - parseJSON _ = mzero - -instance FromJSON LogLsObj where - parseJSON (Object o) = - LogLsObj <$> o .: "Strings" - - parseJSON _ = mzero - -instance FromJSON LogLevelObj where - parseJSON (Object o) = - LogLevelObj <$> o .: "Message" - - parseJSON _ = mzero - -instance FromJSON RepoVersionObj where - parseJSON (Object o) = - RepoVersionObj <$> o .: "Version" - - parseJSON _ = mzero - -instance FromJSON RepoFsckObj where - parseJSON (Object o) = - RepoFsckObj <$> o .: "Message" - - parseJSON _ = mzero - - -instance FromJSON KeyDetailsObj where - parseJSON (Object o) = - KeyDetailsObj <$> o .: "Id" - <*> o .: "Name" - - parseJSON _ = mzero - -instance FromJSON KeyObj where - parseJSON (Object o) = - KeyObj <$> o .: "Keys" - - parseJSON _ = mzero - -instance FromJSON KeyRenameObj where - parseJSON (Object o) = - KeyRenameObj <$> o .: "Id" - <*> o .: "Now" - <*> o .: "Overwrite" - <*> o .: "Was" - - parseJSON _ = mzero - -instance FromJSON FilesStatObj where - parseJSON (Object o) = - FilesStatObj <$> o .: "Hash" - <*> o .: "Size" - <*> o .: "CumulativeSize" - <*> o .: "Blocks" - <*> o .: "Type" - - parseJSON _ = mzero - -instance FromJSON FilesEntryObj where - parseJSON (Object o) = - FilesEntryObj <$> o .: "Name" - <*> o .: "Type" - <*> o .: "Size" - <*> o .: "Hash" - - parseJSON _ = mzero - -instance FromJSON FilesLsObj where - parseJSON (Object o) = - FilesLsObj <$> o .: "Entries" - - parseJSON _ = mzero - -instance FromJSON FilesFlushObj where - parseJSON (Object o) = - FilesFlushObj <$> o .: "Cid" - - parseJSON _ = mzero - --- | Defining a content type same as PlainText without charset -data IpfsText deriving Typeable - -instance Servant.API.Accept IpfsText where - contentType _ = "text" M.// "plain" - --- | @left show . TextS.decodeUtf8' . toStrict@ -instance MimeUnrender IpfsText Text where - mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict - - --- | Defining a content type same as IpfsJSON -data IpfsJSON deriving Typeable - -instance Servant.API.Accept IpfsJSON where - contentType _ = "application" M.// "json" - --- | @left show . TextS.decodeUtf8' . toStrict@ -instance MimeUnrender IpfsJSON Text where - mimeUnrender _ = left show . TextS.decodeUtf8' . toStrict - -type IpfsApi = "cat" :> Capture "arg" Text :> Get '[IpfsText] CatReturnType - :<|> "ls" :> Capture "arg" Text :> Get '[JSON] LsObj - :<|> "get" :> Capture "arg" Text :> Get '[IpfsText] GetReturnType - :<|> "swarm" :> "peers" :> Get '[JSON] SwarmPeersObj - :<|> "swarm" :> "connect" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj - :<|> "swarm" :> "disconnect" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj - :<|> "swarm" :> "filters" :> Get '[JSON] SwarmObj - :<|> "swarm" :> "filters" :> "add" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj - :<|> "swarm" :> "filters" :> "rm" :> QueryParam "arg" Text :> Get '[JSON] SwarmObj - :<|> "bitswap" :> "stat" :> Get '[JSON] BitswapStatObj - :<|> "bitswap" :> "wantlist" :> Get '[JSON] BitswapWLObj - :<|> "bitswap" :> "ledger" :> Capture "peerId" Text :> Get '[JSON] BitswapLedgerObj - :<|> "bitswap" :> "reprovide" :> Get '[IpfsText] ReprovideReturnType - :<|> "cid" :> "bases" :> Get '[JSON] [CidBasesObj] - :<|> "cid" :> "codecs" :> Get '[JSON] [CidCodecsObj] - :<|> "cid" :> "hashes" :> Get '[JSON] [CidHashesObj] - :<|> "cid" :> "base32" :> Capture "cid" Text :> Get '[JSON] CidObj - :<|> "cid" :> "format" :> Capture "cid" Text :> Get '[JSON] CidObj - :<|> "block" :> "get" :> Capture "key" Text :> Get '[IpfsText] BlockReturnType - :<|> "block" :> "stat" :> Capture "key" Text :> Get '[JSON] BlockObj - :<|> "dag" :> "get" :> Capture "ref" Text :> Get '[IpfsJSON] DagReturnType - :<|> "dag" :> "resolve" :> Capture "ref" Text :> Get '[JSON] DagResolveObj - :<|> "config" :> Capture "ref" Text :> Get '[JSON] ConfigObj - :<|> "config" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ConfigObj - :<|> "object" :> "data" :> Capture "ref" Text :> Get '[IpfsText] ObjectReturnType - :<|> "object" :> "new" :> Get '[JSON] ObjectObj - :<|> "object" :> "links" :> Capture "ref" Text :> Get '[JSON] ObjectLinksObj - :<|> "object" :> "patch" :> "add-link" :> Capture "arg" Text - :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ObjectLinksObj - :<|> "object" :> "patch" :> "rm-link" :> Capture "arg" Text - :> QueryParam "arg" Text :> Get '[JSON] ObjectLinksObj - :<|> "object" :> "get" :> Capture "arg" Text :> Get '[JSON] ObjectGetObj - :<|> "object" :> "diff" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] ObjectDiffObj - :<|> "object" :> "stat" :> Capture "arg" Text :> Get '[JSON] ObjectStatObj - :<|> "pin" :> "add" :> Capture "arg" Text :> Get '[JSON] PinObj - :<|> "pin" :> "rm" :> Capture "arg" Text :> Get '[JSON] PinObj - :<|> "bootstrap" :> "add" :> QueryParam "arg" Text :> Get '[JSON] BootstrapObj - :<|> "bootstrap" :> "list" :> Get '[JSON] BootstrapObj - :<|> "bootstrap" :> "rm" :> QueryParam "arg" Text :> Get '[JSON] BootstrapObj - :<|> "stats" :> "bw" :> Get '[JSON] StatsBwObj - :<|> "stats" :> "repo" :> Get '[JSON] StatsRepoObj - :<|> "version" :> Get '[JSON] VersionObj - :<|> "id" :> Get '[JSON] IdObj - :<|> "id" :> Capture "arg" Text :> Get '[JSON] IdObj - :<|> "dns" :> Capture "arg" Text :> Get '[JSON] DnsObj - :<|> "pubsub" :> "ls" :> Get '[JSON] PubsubObj - :<|> "pubsub" :> "peers" :> Get '[JSON] PubsubObj - :<|> "pubsub" :> "pub" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent - :<|> "log" :> "ls" :> Get '[JSON] LogLsObj - :<|> "log" :> "level" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] LogLevelObj - :<|> "repo" :> "version" :> Get '[JSON] RepoVersionObj - :<|> "repo" :> "fsck" :> Get '[JSON] RepoFsckObj - :<|> "key" :> "gen" :> Capture "arg" Text :> QueryParam "type" Text :> Get '[JSON] KeyDetailsObj - :<|> "key" :> "list" :> Get '[JSON] KeyObj - :<|> "key" :> "rename" :> Capture "arg" Text :> QueryParam "arg" Text :> Get '[JSON] KeyRenameObj - :<|> "key" :> "rm" :> Capture "arg" Text :> Get '[JSON] KeyObj - :<|> "files" :> "chcid" :> QueryParam "arg" Text :> QueryParam "cid-version" Int :> Get '[JSON] NoContent - :<|> "files" :> "cp" :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent - :<|> "files" :> "flush" :> QueryParam "arg" Text :> Get '[JSON] FilesFlushObj - :<|> "files" :> "ls" :> QueryParam "arg" Text :> Get '[JSON] FilesLsObj - :<|> "files" :> "mkdir" :> QueryParam "arg" Text :> Get '[JSON] NoContent - :<|> "files" :> "mv" :> QueryParam "arg" Text :> QueryParam "arg" Text :> Get '[JSON] NoContent - :<|> "files" :> "read" :> QueryParam "arg" Text :> Get '[IpfsText] FilesReadType - :<|> "files" :> "rm" :> QueryParam "arg" Text :> QueryParam "recursive" Bool :> Get '[JSON] NoContent - :<|> "files" :> "stat" :> QueryParam "arg" Text :> Get '[JSON] FilesStatObj - :<|> "shutdown" :> Get '[JSON] NoContent diff --git a/packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs b/packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs deleted file mode 100644 index 670ebad6..00000000 --- a/packages/ipfs/src/Network/Ipfs/Api/Types/Stream.hs +++ /dev/null @@ -1,154 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE TypeOperators #-} - --- | --- Module : Network.Ipfs.Api.Types.Stream --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : portable --- --- Ipfs Stream API types. --- - -module Network.Ipfs.Api.Types.Stream where - -import Control.Monad -import Data.Aeson -import qualified Data.ByteString.Lazy.Char8 () -import Data.Int -import Data.Text -import Network.HTTP.Client () -import Servant.API - -import Network.Ipfs.Api.Types (IpfsText) - -type LogReturnType = Text - -data PingObj = PingObj - { success :: Bool - , text :: Text - , time :: Int64 - } - deriving (Show, Eq) - -data ResponseObj = ResponseObj - { addrs :: Maybe [Text] - , id :: Text - } - deriving (Show, Eq) - -data DhtObj = DhtObj - { extra :: Text - , addrid :: Text - , responses :: Maybe [ResponseObj] - , addrType :: Int - } - deriving (Show, Eq) - -data RepoKeyObj = RepoKeyObj - { repoSlash :: Text - } - deriving (Show, Eq) - -data RepoGcObj = RepoGcObj - { repoKey :: RepoKeyObj - } - deriving (Show, Eq) - -data RepoVerifyObj = RepoVerifyObj - { msg :: Text - , progress :: Int - } - deriving (Show, Eq) - -data RefsObj = RefsObj - { error :: Text - , ref :: Text - } - deriving (Show, Eq) - -data PubsubSubObj = PubsubSubObj - { mssgdata :: Text - , from :: Text - , seqno :: Text - , topicIDs :: [Text] - } - deriving (Show, Eq) - -instance FromJSON PingObj where - parseJSON (Object o) = - PingObj <$> o .: "Success" - <*> o .: "Text" - <*> o .: "Time" - - parseJSON _ = mzero - -instance FromJSON DhtObj where - parseJSON (Object o) = - DhtObj <$> o .: "Extra" - <*> o .: "ID" - <*> o .: "Responses" - <*> o .: "Type" - - parseJSON _ = mzero - -instance FromJSON ResponseObj where - parseJSON (Object o) = - ResponseObj <$> o .: "Addrs" - <*> o .: "ID" - - parseJSON _ = mzero - -instance FromJSON RepoKeyObj where - parseJSON (Object o) = - RepoKeyObj <$> o .: "/" - - parseJSON _ = mzero - -instance FromJSON RepoGcObj where - parseJSON (Object o) = - RepoGcObj <$> o .: "Key" - - parseJSON _ = mzero - -instance FromJSON RepoVerifyObj where - parseJSON (Object o) = - RepoVerifyObj <$> o .: "Msg" - <*> o .: "Progress" - - parseJSON _ = mzero - -instance FromJSON RefsObj where - parseJSON (Object o) = - RefsObj <$> o .: "Err" - <*> o .: "Ref" - - parseJSON _ = mzero - -instance FromJSON PubsubSubObj where - parseJSON (Object o) = - PubsubSubObj <$> o .: "data" - <*> o .: "from" - <*> o .: "seqno" - <*> o .: "topicIDs" - - parseJSON _ = mzero - -type IpfsStreamApi = "ping" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO PingObj ) - :<|> "dht" :> "findpeer" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) - :<|> "dht" :> "findprovs" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) - :<|> "dht" :> "get" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) - :<|> "dht" :> "provide" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) - :<|> "dht" :> "query" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO DhtObj ) - :<|> "log" :> "tail" :> StreamGet NewlineFraming IpfsText ( SourceIO LogReturnType) - :<|> "repo" :> "gc" :> StreamGet NewlineFraming JSON ( SourceIO RepoGcObj) - :<|> "repo" :> "verify" :> StreamGet NewlineFraming JSON ( SourceIO RepoVerifyObj) - :<|> "refs" :> Capture "arg" Text :> StreamGet NewlineFraming JSON (SourceIO RefsObj) - :<|> "refs" :> "local" :> StreamGet NewlineFraming JSON (SourceIO RefsObj) - :<|> "pubsub" :> "sub" :> Capture "arg" Text :> StreamGet NewlineFraming JSON ( SourceIO PubsubSubObj ) diff --git a/packages/ipfs/src/Network/Ipfs/Client.hs b/packages/ipfs/src/Network/Ipfs/Client.hs deleted file mode 100644 index 0bcc5e94..00000000 --- a/packages/ipfs/src/Network/Ipfs/Client.hs +++ /dev/null @@ -1,47 +0,0 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} - --- | --- Module : Network.Ipfs.Client --- Copyright : Aleksandr Krupenkin 2016-2021 --- License : Apache-2.0 --- --- Maintainer : mail@akru.me --- Stability : experimental --- Portability : unknown --- --- IPFS daemon HTTP client. --- - -module Network.Ipfs.Client where - -import Control.Monad.Except -import Control.Monad.Reader -import Network.HTTP.Client as Net hiding (Proxy) -import Servant.Client - -newtype IpfsT m a = IpfsT { unIpfs :: ReaderT (Manager, BaseUrl, String) (ExceptT ClientError m) a } - deriving ( Functor - , Applicative - , Monad - , MonadIO - , MonadReader (Manager, BaseUrl, String) - , MonadError ClientError - ) - -instance MonadTrans IpfsT where - lift = IpfsT . lift . lift - -type Ipfs a = IpfsT IO a - --- | 'IpfsT' monad runner. -runIpfs' :: BaseUrl -> Ipfs a -> IO () -runIpfs' url ipfs = do - manager' <- liftIO $ newManager defaultManagerSettings - ret <- runExceptT (runReaderT (unIpfs ipfs) (manager', url, showBaseUrl url)) - case ret of - Left err -> putStrLn $ "Error: " ++ show err - Right _ -> putStr "" - --- | 'IpfsT' monad runner with default arguments. -runIpfs :: Ipfs a -> IO () -runIpfs = runIpfs' (BaseUrl Http "localhost" 5001 "/api/v0") diff --git a/packages/ipfs/web3-ipfs.cabal b/packages/ipfs/web3-ipfs.cabal deleted file mode 100644 index e05e72c3..00000000 --- a/packages/ipfs/web3-ipfs.cabal +++ /dev/null @@ -1,68 +0,0 @@ -cabal-version: 1.12 - --- This file has been generated from package.yaml by hpack version 0.34.4. --- --- see: https://github.com/sol/hpack - -name: web3-ipfs -version: 1.0.0.1 -synopsis: IPFS support for Haskell Web3 library. -description: Client library for Third Generation of Web. -category: Network -homepage: https://github.com/airalab/hs-web3#readme -bug-reports: https://github.com/airalab/hs-web3/issues -author: Aleksandr Krupenkin -maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 -license: Apache-2.0 -license-file: LICENSE -build-type: Simple - -source-repository head - type: git - location: https://github.com/airalab/hs-web3 - -library - exposed-modules: - Network.Ipfs.Api.Bitswap - Network.Ipfs.Api.Block - Network.Ipfs.Api.Bootstrap - Network.Ipfs.Api.Cid - Network.Ipfs.Api.Config - Network.Ipfs.Api.Core - Network.Ipfs.Api.Dag - Network.Ipfs.Api.Dht - Network.Ipfs.Api.Files - Network.Ipfs.Api.Internal - Network.Ipfs.Api.Internal.Call - Network.Ipfs.Api.Internal.Stream - Network.Ipfs.Api.Key - Network.Ipfs.Api.Log - Network.Ipfs.Api.Object - Network.Ipfs.Api.Pin - Network.Ipfs.Api.Pubsub - Network.Ipfs.Api.Repo - Network.Ipfs.Api.Stats - Network.Ipfs.Api.Swarm - Network.Ipfs.Api.Types - Network.Ipfs.Api.Types.Stream - Network.Ipfs.Client - other-modules: - Paths_web3_ipfs - hs-source-dirs: - src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs - build-depends: - aeson >1.2 && <2.2 - , base >4.11 && <4.16 - , bytestring >0.10 && <0.11 - , http-client >0.5 && <0.8 - , http-media >0.6 && <0.8.1 - , http-types >0.11 && <0.14 - , mtl >2.2 && <2.3 - , servant >0.12 && <0.20 - , servant-client >0.12 && <0.20 - , tar >0.4 && <0.6 - , text >1.2 && <1.3 - , unordered-containers >0.1 && <0.3 - default-language: Haskell2010 diff --git a/packages/jsonrpc/jsonrpc-tinyclient.cabal b/packages/jsonrpc/jsonrpc-tinyclient.cabal index b3a3ade1..6c49bc4b 100644 --- a/packages/jsonrpc/jsonrpc-tinyclient.cabal +++ b/packages/jsonrpc/jsonrpc-tinyclient.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: jsonrpc-tinyclient -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Tiny JSON-RPC client for Haskell Web3 library. description: Minimalistic JSON-RPC client, inspired by haxr library. category: Network @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2024 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -29,16 +29,16 @@ library Paths_jsonrpc_tinyclient hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.16 - , bytestring >0.10 && <0.11 + , base >4.11 && <4.18 + , bytestring >0.10 && <0.12 , exceptions >0.8 && <0.11 , http-client >0.5 && <0.8 , http-client-tls >0.3 && <0.4 , mtl >2.2 && <2.3 , random >1.0 && <1.3 - , text >1.2 && <1.3 + , text >1.2 && <2.1 , websockets >0.10 && <0.13 default-language: Haskell2010 diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index 93e0f5e8..fef8be06 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -1,5 +1,5 @@ name: jsonrpc-tinyclient -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Tiny JSON-RPC client for Haskell Web3 library. description: Minimalistic JSON-RPC client, inspired by haxr library. github: "airalab/hs-web3" @@ -7,15 +7,15 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.16 -- text >1.2 && <1.3 +- base >4.11 && <4.18 +- text >1.2 && <2.1 - aeson >1.2 && <2.2 - random >1.0 && <1.3 -- bytestring >0.10 && <0.11 +- bytestring >0.10 && <0.12 - exceptions >0.8 && <0.11 - websockets >0.10 && <0.13 - http-client >0.5 && <0.8 @@ -25,7 +25,6 @@ dependencies: ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -36,7 +35,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds diff --git a/packages/jsonrpc/src/Network/JsonRpc/TinyClient.hs b/packages/jsonrpc/src/Network/JsonRpc/TinyClient.hs index d2d8f15c..a310f507 100644 --- a/packages/jsonrpc/src/Network/JsonRpc/TinyClient.hs +++ b/packages/jsonrpc/src/Network/JsonRpc/TinyClient.hs @@ -11,7 +11,7 @@ -- | -- Module : Network.JsonRpc.TinyClient --- Copyright : Aleksandr Krupenkin 2016-2018 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -106,7 +106,7 @@ defaultSettings srv = liftIO $ JsonRpcHttpClient instance Show JsonRpcClient where show JsonRpcHttpClient{..} = "" - show JsonRpcWsClient{..} = "" + show JsonRpcWsClient{..} = "" -- | JSON-RPC request. data Request = Request diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index d86b47d5..83b8d5e4 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -1,5 +1,5 @@ name: web3-polkadot -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Polkadot support for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -12,18 +12,18 @@ category: Network dependencies: - mtl >2.2 && <2.3 -- base >4.11 && <4.16 -- text >1.2 && <1.3 -- aeson >1.2 && <2.1 +- base >4.11 && <4.18 +- text >1.2 && <2.1 +- aeson >1.2 && <2.2 - scale >=1.0 && <1.1 - parsec >3.0 && <3.2 -- memory >0.14 && <0.17 +- memory >0.14 && <0.19 - microlens >0.4 && <0.5 - containers >0.6 && <0.7 -- cryptonite >0.22 && <0.30 -- bytestring >0.10 && <0.11 +- cryptonite >0.22 && <0.31 +- bytestring >0.10 && <0.12 - base58-bytestring >=0.1 && <0.2 -- animalcase >0.1 && <0.2 +- cases >0.1 && <0.2 - generics-sop >0.3 && <0.6 - microlens-th >0.4 && <0.5 - microlens-mtl >0.2 && <0.3 @@ -35,7 +35,6 @@ dependencies: ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -46,7 +45,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds @@ -70,9 +68,9 @@ tests: dependencies: - hspec-expectations-json >=1.0.0 && <1.1 - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.9 + - hspec-discover >=2.4.4 && <2.11 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.9 + - hspec >=2.4.4 && <2.11 ghc-options: - -threaded - -rtsopts diff --git a/packages/polkadot/src/Network/Polkadot.hs b/packages/polkadot/src/Network/Polkadot.hs index d721c08e..c81ad024 100644 --- a/packages/polkadot/src/Network/Polkadot.hs +++ b/packages/polkadot/src/Network/Polkadot.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Account.hs b/packages/polkadot/src/Network/Polkadot/Account.hs index 0e6269b0..48eff351 100644 --- a/packages/polkadot/src/Network/Polkadot/Account.hs +++ b/packages/polkadot/src/Network/Polkadot/Account.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Account --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Call.hs b/packages/polkadot/src/Network/Polkadot/Call.hs index e9dcdf39..9817508c 100644 --- a/packages/polkadot/src/Network/Polkadot/Call.hs +++ b/packages/polkadot/src/Network/Polkadot/Call.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Call --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Crypto.hs b/packages/polkadot/src/Network/Polkadot/Crypto.hs index a684ac00..c5370446 100644 --- a/packages/polkadot/src/Network/Polkadot/Crypto.hs +++ b/packages/polkadot/src/Network/Polkadot/Crypto.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Polkadot.Crypto --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs index 091bbb1e..a6cf4e89 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Polkadot.Extrinsic --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs index efdaae2b..34985548 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Era.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot.Extrinsic.Era --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs index 9c435fc3..7df1d13a 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Payload.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot.Extrinsic.Payload --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension.hs index 5b75f3a5..e6fcef7a 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Extrinsic.SignedExtension --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs index 84c9a764..4a47ab37 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/System.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Extrinsic.SignedExtension.System --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/TransactionPayment.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/TransactionPayment.hs index a908662b..a77f95fa 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/TransactionPayment.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/SignedExtension/TransactionPayment.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Extrinsic.SignedExtension.TransactionPayment --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Extrinsic/Unchecked.hs b/packages/polkadot/src/Network/Polkadot/Extrinsic/Unchecked.hs index 38b5f834..6628596a 100644 --- a/packages/polkadot/src/Network/Polkadot/Extrinsic/Unchecked.hs +++ b/packages/polkadot/src/Network/Polkadot/Extrinsic/Unchecked.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Extrinsic.Unchecked --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata.hs b/packages/polkadot/src/Network/Polkadot/Metadata.hs index c232f6f5..32fa5b3f 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Metadata --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs index 7d32c08d..4c62b44e 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/MagicNumber.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Metadata.MagicNumber --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs index e39877ca..d7409885 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot.Metadata.Type --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs index 17a2b3c1..77e17eda 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Ast.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot.Metadata.Type.Ast --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs index c25f19eb..c1deba04 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Discovery.hs @@ -9,7 +9,7 @@ -- | -- Module : Network.Polkadot.Metadata.Type.Discovery --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs index 3285da3f..232982c1 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/Parser.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Polkadot.Metadata.Type.Parser --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -20,7 +20,7 @@ module Network.Polkadot.Metadata.Type.Parser , sanitize , sanitizeM ) where - + import Control.Monad.Fail (MonadFail) import Data.Text (Text, intercalate, diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs b/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs index a99c67c0..6167d653 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/Type/ParserCombinators.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Metadata.Type.ParserCombinators --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs index 64ad6816..8cbed9c1 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V10.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Metadata.V10 --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs index e84dc9f4..8d4a6798 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V11.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Metadata.V11 --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs index d9f53804..e01b94f2 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V12.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Metadata.V12 --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs index 4dc11907..b736a11b 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V13.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Metadata.V13 --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs index c90f88f0..6250d002 100644 --- a/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs +++ b/packages/polkadot/src/Network/Polkadot/Metadata/V9.hs @@ -5,7 +5,7 @@ -- | -- Module : Network.Polkadot.Metadata.V9 --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Primitives.hs b/packages/polkadot/src/Network/Polkadot/Primitives.hs index c9917e81..7926e781 100644 --- a/packages/polkadot/src/Network/Polkadot/Primitives.hs +++ b/packages/polkadot/src/Network/Polkadot/Primitives.hs @@ -4,7 +4,7 @@ -- | -- Module : Network.Polkadot.Primitives --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -21,8 +21,8 @@ import Codec.Scale.Compact (Compact) import Data.BigNum (H160, H256, H512, Word128) import Data.ByteArray.HexString (HexString) import Data.Word (Word32, Word64, Word8) -import qualified GHC.Generics as GHC (Generic) import Generics.SOP (Generic) +import qualified GHC.Generics as GHC (Generic) -- | The user account balance, 'u128' type. type Balance = Word128 diff --git a/packages/polkadot/src/Network/Polkadot/Query.hs b/packages/polkadot/src/Network/Polkadot/Query.hs index bb5f1572..0824b743 100644 --- a/packages/polkadot/src/Network/Polkadot/Query.hs +++ b/packages/polkadot/src/Network/Polkadot/Query.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Polkadot.Query --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs index 90955333..8f1747e8 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Account.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Account --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs index e4b6f53d..5931ee40 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Author.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Author --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs index 5312a26a..74c89742 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Babe.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Babe --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs index ffcbfafc..05d364b2 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Chain.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Chain --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs index c4e2bdaf..d1f3dfcf 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Childstate.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Childstate --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs index a35cc614..cc0464bc 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Contracts.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Contracts --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs index 86483a71..2e63a774 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Engine --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs index 299104e7..71b719b0 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Grandpa.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Grandpa --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs index 3206a5af..bf28ed93 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Offchain.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Offchain --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs index b50bd7ec..d4c61cf0 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Payment.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Payment --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs index bcf50c53..5d8b2b18 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Rpc.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.Rpc --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/State.hs b/packages/polkadot/src/Network/Polkadot/Rpc/State.hs index 9f45f951..28fee2d0 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/State.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/State.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.State --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/System.hs b/packages/polkadot/src/Network/Polkadot/Rpc/System.hs index 49edaee5..eb0aa336 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/System.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/System.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Rpc.System --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs b/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs index ab5f94b5..dcca5438 100644 --- a/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs +++ b/packages/polkadot/src/Network/Polkadot/Rpc/Types.hs @@ -6,7 +6,7 @@ -- | -- Module : Network.Polkadot.Rpc.Types --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/src/Network/Polkadot/Storage.hs b/packages/polkadot/src/Network/Polkadot/Storage.hs index 30d5252e..b07d92c2 100644 --- a/packages/polkadot/src/Network/Polkadot/Storage.hs +++ b/packages/polkadot/src/Network/Polkadot/Storage.hs @@ -2,7 +2,7 @@ -- | -- Module : Network.Polkadot.Storage --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -18,6 +18,7 @@ module Network.Polkadot.Storage where +import Cases (camelize) import Control.Arrow ((&&&)) import Data.ByteArray (convert) import Data.ByteArray.HexString (HexString) @@ -27,7 +28,6 @@ import qualified Data.Map.Strict as Map (fromList, lookup) import Data.Maybe (mapMaybe) import Data.Text (Text) import qualified Data.Text as T (cons, head, tail) -import Text.AnimalCase (toCamelCase) import Network.Polkadot.Metadata.V13 (Metadata (modules), ModuleMetadata (..), @@ -52,7 +52,7 @@ fromMetadata = Map.fromList . mapMaybe go . modules toLowerFirst = uncurry T.cons . (toLower . T.head &&& T.tail) go ModuleMetadata{..} = do StorageMetadata prefix items <- moduleStorage - let section = toCamelCase moduleName + let section = camelize moduleName toEntry meta@StorageEntryMetadata{..} = (toLowerFirst entryName, newEntry prefix meta) return (toLowerFirst section, Map.fromList $ fmap toEntry items) diff --git a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs index 93cf70d3..21d717ca 100644 --- a/packages/polkadot/src/Network/Polkadot/Storage/Key.hs +++ b/packages/polkadot/src/Network/Polkadot/Storage/Key.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Storage.Key --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/tests/Network/Polkadot/Test/AccountSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/AccountSpec.hs index 3d7c2eea..f697e7c8 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/AccountSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/AccountSpec.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Test.AccountSpec --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs index 1c43c70e..399a45ae 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/ExtrinsicSpec.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Test.ExtrinsicSpec --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs index 7aa0443f..ec601aef 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/MetadataSpec.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Test.MetadataSpec --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs index 738ed12d..748f75b6 100644 --- a/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs +++ b/packages/polkadot/tests/Network/Polkadot/Test/StorageSpec.hs @@ -3,7 +3,7 @@ -- | -- Module : Network.Polkadot.Test.StorageSpec --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/polkadot/web3-polkadot.cabal b/packages/polkadot/web3-polkadot.cabal index dae692c4..010d6a4b 100644 --- a/packages/polkadot/web3-polkadot.cabal +++ b/packages/polkadot/web3-polkadot.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: web3-polkadot -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Polkadot support for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -69,18 +69,18 @@ library Paths_web3_polkadot hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <2.1 - , animalcase >0.1 && <0.2 - , base >4.11 && <4.16 + aeson >1.2 && <2.2 + , base >4.11 && <4.18 , base58-bytestring ==0.1.* - , bytestring >0.10 && <0.11 + , bytestring >0.10 && <0.12 + , cases >0.1 && <0.2 , containers >0.6 && <0.7 - , cryptonite >0.22 && <0.30 + , cryptonite >0.22 && <0.31 , generics-sop >0.3 && <0.6 , jsonrpc-tinyclient ==1.0.* - , memory >0.14 && <0.17 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , microlens-mtl >0.2 && <0.3 @@ -88,7 +88,7 @@ library , mtl >2.2 && <2.3 , parsec >3.0 && <3.2 , scale ==1.0.* - , text >1.2 && <1.3 + , text >1.2 && <2.1 , web3-bignum ==1.0.* , web3-crypto ==1.0.* default-language: Haskell2010 @@ -146,23 +146,23 @@ test-suite tests hs-source-dirs: tests src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - aeson >1.2 && <2.1 - , animalcase >0.1 && <0.2 - , base >4.11 && <4.16 + aeson >1.2 && <2.2 + , base >4.11 && <4.18 , base58-bytestring ==0.1.* - , bytestring >0.10 && <0.11 + , bytestring >0.10 && <0.12 + , cases >0.1 && <0.2 , containers >0.6 && <0.7 - , cryptonite >0.22 && <0.30 + , cryptonite >0.22 && <0.31 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.9 + , hspec >=2.4.4 && <2.11 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.9 + , hspec-discover >=2.4.4 && <2.11 , hspec-expectations >=0.8.2 && <0.9 , hspec-expectations-json >=1.0.0 && <1.1 , jsonrpc-tinyclient ==1.0.* - , memory >0.14 && <0.17 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , microlens-mtl >0.2 && <0.3 @@ -170,7 +170,7 @@ test-suite tests , mtl >2.2 && <2.3 , parsec >3.0 && <3.2 , scale ==1.0.* - , text >1.2 && <1.3 + , text >1.2 && <2.1 , web3-bignum ==1.0.* , web3-crypto ==1.0.* default-language: Haskell2010 diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml index 84d003e8..e0f9b8ad 100644 --- a/packages/provider/package.yaml +++ b/packages/provider/package.yaml @@ -1,5 +1,5 @@ name: web3-provider -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Node connection provider for Haskell Web3 library. description: This package contains general Web3 node adapters and connection helpers. github: "airalab/hs-web3" @@ -7,13 +7,13 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.16 +- base >4.11 && <4.18 - mtl >2.2 && <2.3 -- text >1.2 && <1.3 +- text >1.2 && <2.1 - async >2.1 && <2.3 - network >2.5 && <3.2 - websockets >0.10 && <0.13 @@ -26,7 +26,6 @@ dependencies: ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -37,7 +36,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds diff --git a/packages/provider/src/Network/Web3/Provider.hs b/packages/provider/src/Network/Web3/Provider.hs index 02043b01..d5ad00fd 100644 --- a/packages/provider/src/Network/Web3/Provider.hs +++ b/packages/provider/src/Network/Web3/Provider.hs @@ -7,7 +7,7 @@ -- | -- Module : Network.Web3.Provider --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/provider/web3-provider.cabal b/packages/provider/web3-provider.cabal index 4026d119..6e0e6514 100644 --- a/packages/provider/web3-provider.cabal +++ b/packages/provider/web3-provider.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: web3-provider -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Node connection provider for Haskell Web3 library. description: This package contains general Web3 node adapters and connection helpers. category: Network @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2024 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -29,17 +29,17 @@ library Paths_web3_provider hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: async >2.1 && <2.3 - , base >4.11 && <4.16 + , base >4.11 && <4.18 , data-default >0.7 && <0.8 , exceptions >0.8 && <0.11 , http-client >0.5 && <0.8 , jsonrpc-tinyclient ==1.0.* , mtl >2.2 && <2.3 , network >2.5 && <3.2 - , text >1.2 && <1.3 + , text >1.2 && <2.1 , transformers >0.5 && <0.6 , websockets >0.10 && <0.13 default-language: Haskell2010 diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index cb9d9a19..e91ae2aa 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -1,5 +1,5 @@ name: scale -version: 1.0.0.1 +version: 1.0.1.0 synopsis: SCALE v2.0 codec for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -7,25 +7,24 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.16 -- text >1.2 && <1.3 +- base >4.11 && <4.18 +- text >1.2 && <2.1 - cereal >0.5 && <0.6 - bitvec >1.0 && <2.0 -- vector >0.12 && <0.13 -- memory >0.14 && <0.17 -- bytestring >0.10 && <0.11 +- vector >0.12 && <0.14 +- memory >0.14 && <0.19 +- bytestring >0.10 && <0.12 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.18 +- template-haskell >2.11 && <2.20 ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -36,7 +35,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds @@ -58,11 +56,11 @@ tests: - tests - src dependencies: - - bytestring >0.10 && <0.11 + - bytestring >0.10 && <0.12 - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.9 + - hspec-discover >=2.4.4 && <2.11 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.9 + - hspec >=2.4.4 && <2.11 ghc-options: - -threaded - -rtsopts diff --git a/packages/scale/scale.cabal b/packages/scale/scale.cabal index fa4ce970..cf775192 100644 --- a/packages/scale/scale.cabal +++ b/packages/scale/scale.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: scale -version: 1.0.0.1 +version: 1.0.1.0 synopsis: SCALE v2.0 codec for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2024 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -36,18 +36,18 @@ library Paths_scale hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.16 + base >4.11 && <4.18 , bitvec >1.0 && <2.0 - , bytestring >0.10 && <0.11 + , bytestring >0.10 && <0.12 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , memory >0.14 && <0.17 - , template-haskell >2.11 && <2.18 - , text >1.2 && <1.3 - , vector >0.12 && <0.13 + , memory >0.14 && <0.19 + , template-haskell >2.11 && <2.20 + , text >1.2 && <2.1 + , vector >0.12 && <0.14 default-language: Haskell2010 test-suite tests @@ -69,20 +69,20 @@ test-suite tests hs-source-dirs: tests src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.16 + base >4.11 && <4.18 , bitvec >1.0 && <2.0 - , bytestring >0.10 && <0.11 + , bytestring >0.10 && <0.12 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.9 + , hspec >=2.4.4 && <2.11 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.9 + , hspec-discover >=2.4.4 && <2.11 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.17 - , template-haskell >2.11 && <2.18 - , text >1.2 && <1.3 - , vector >0.12 && <0.13 + , memory >0.14 && <0.19 + , template-haskell >2.11 && <2.20 + , text >1.2 && <2.1 + , vector >0.12 && <0.14 default-language: Haskell2010 diff --git a/packages/scale/src/Codec/Scale.hs b/packages/scale/src/Codec/Scale.hs index e4423495..d325dd47 100644 --- a/packages/scale/src/Codec/Scale.hs +++ b/packages/scale/src/Codec/Scale.hs @@ -1,8 +1,9 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} -- | -- Module : Codec.Scale.Class --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Class.hs b/packages/scale/src/Codec/Scale/Class.hs index 6cd43217..7c268398 100644 --- a/packages/scale/src/Codec/Scale/Class.hs +++ b/packages/scale/src/Codec/Scale/Class.hs @@ -1,10 +1,11 @@ {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} -- | -- Module : Codec.Scale.Class --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Compact.hs b/packages/scale/src/Codec/Scale/Compact.hs index 0e2c6f6a..7268a455 100644 --- a/packages/scale/src/Codec/Scale/Compact.hs +++ b/packages/scale/src/Codec/Scale/Compact.hs @@ -1,6 +1,6 @@ -- | -- Module : Codec.Scale.Compact --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Core.hs b/packages/scale/src/Codec/Scale/Core.hs index f9a769a7..79aeb9d0 100644 --- a/packages/scale/src/Codec/Scale/Core.hs +++ b/packages/scale/src/Codec/Scale/Core.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Core --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Generic.hs b/packages/scale/src/Codec/Scale/Generic.hs index 165a7667..9e927f15 100644 --- a/packages/scale/src/Codec/Scale/Generic.hs +++ b/packages/scale/src/Codec/Scale/Generic.hs @@ -8,7 +8,7 @@ -- | -- Module : Codec.Scale.Generic --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/SingletonEnum.hs b/packages/scale/src/Codec/Scale/SingletonEnum.hs index dbc13672..e53f0b83 100644 --- a/packages/scale/src/Codec/Scale/SingletonEnum.hs +++ b/packages/scale/src/Codec/Scale/SingletonEnum.hs @@ -1,6 +1,6 @@ -- | -- Module : Codec.Scale.SingletonEnum --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/Skip.hs b/packages/scale/src/Codec/Scale/Skip.hs index 8411b9f1..33f842d5 100644 --- a/packages/scale/src/Codec/Scale/Skip.hs +++ b/packages/scale/src/Codec/Scale/Skip.hs @@ -1,6 +1,6 @@ -- | -- Module : Codec.Scale.Skip --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/src/Codec/Scale/TH.hs b/packages/scale/src/Codec/Scale/TH.hs index 5c0a0c1e..7f24ec75 100644 --- a/packages/scale/src/Codec/Scale/TH.hs +++ b/packages/scale/src/Codec/Scale/TH.hs @@ -2,7 +2,7 @@ -- | -- Module : Codec.Scale.TH --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs index 9ee54155..ed7272f7 100644 --- a/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/CoreSpec.hs @@ -5,7 +5,7 @@ -- | -- Module : Codec.Scale.Test.CoreSpec --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs b/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs index c0fbfc70..fce4e88e 100644 --- a/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/SingleFieldStructSpec.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Test.SingleFieldStructSpec --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs index 5fe7c4a4..4d7dab0a 100644 --- a/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs +++ b/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs @@ -4,7 +4,7 @@ -- | -- Module : Codec.Scale.Test.SkipSpec --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : BSD3 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml index 0fce4436..2949c02e 100644 --- a/packages/solidity/package.yaml +++ b/packages/solidity/package.yaml @@ -1,5 +1,5 @@ name: web3-solidity -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Solidity language for Haskell Web3 library. description: This package contains Solidity parsec-based parser and primitive types. github: "airalab/hs-web3" @@ -7,31 +7,30 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.16 -- text >1.2 && <1.3 -- aeson >1.2 && <2.1 +- base >4.11 && <4.18 +- text >1.2 && <2.1 +- aeson >1.2 && <2.2 - cereal >0.5 && <0.6 -- memory >0.14 && <0.17 +- memory >0.14 && <0.19 - memory-hexstring >=1.0 && <1.1 - tagged >0.8 && <0.9 - parsec >3.1 && <3.2 - basement >0.0 && <0.1 -- OneTuple >0.2 && <0.4 +- OneTuple >0.2 && <0.5 - microlens >0.4 && <0.5 -- bytestring >0.10 && <0.11 +- bytestring >0.10 && <0.12 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.18 +- template-haskell >2.11 && <2.20 - web3-crypto >=1.0 && <1.1 ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -42,7 +41,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds @@ -65,9 +63,9 @@ tests: - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.9 + - hspec-discover >=2.4.4 && <2.11 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.9 + - hspec >=2.4.4 && <2.11 ghc-options: - -threaded - -rtsopts diff --git a/packages/solidity/src/Data/Solidity/Abi.hs b/packages/solidity/src/Data/Solidity/Abi.hs index 1cd97598..402175d3 100644 --- a/packages/solidity/src/Data/Solidity/Abi.hs +++ b/packages/solidity/src/Data/Solidity/Abi.hs @@ -1,10 +1,11 @@ {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} -- | -- Module : Data.Solidity.Abi --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Abi/Codec.hs b/packages/solidity/src/Data/Solidity/Abi/Codec.hs index 82fe0a7e..13e3346f 100644 --- a/packages/solidity/src/Data/Solidity/Abi/Codec.hs +++ b/packages/solidity/src/Data/Solidity/Abi/Codec.hs @@ -1,8 +1,9 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} -- | -- Module : Data.Solidity.Abi.Codec --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Abi/Generic.hs b/packages/solidity/src/Data/Solidity/Abi/Generic.hs index 4d061026..4b3f9b9a 100644 --- a/packages/solidity/src/Data/Solidity/Abi/Generic.hs +++ b/packages/solidity/src/Data/Solidity/Abi/Generic.hs @@ -9,7 +9,7 @@ -- | -- Module : Data.Solidity.Abi.Generic --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Event.hs b/packages/solidity/src/Data/Solidity/Event.hs index 6542eb6f..82520bbe 100644 --- a/packages/solidity/src/Data/Solidity/Event.hs +++ b/packages/solidity/src/Data/Solidity/Event.hs @@ -10,7 +10,7 @@ -- | -- Module : Data.Solidity.Event --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Event/Internal.hs b/packages/solidity/src/Data/Solidity/Event/Internal.hs index 9c25c174..31246d3e 100644 --- a/packages/solidity/src/Data/Solidity/Event/Internal.hs +++ b/packages/solidity/src/Data/Solidity/Event/Internal.hs @@ -12,7 +12,7 @@ -- | -- Module : Data.Solidity.Event.Internal --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim.hs b/packages/solidity/src/Data/Solidity/Prim.hs index 622839c0..3185bd7b 100644 --- a/packages/solidity/src/Data/Solidity/Prim.hs +++ b/packages/solidity/src/Data/Solidity/Prim.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.Solidity.Prim --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Address.hs b/packages/solidity/src/Data/Solidity/Prim/Address.hs index cb2385ee..934d0e1d 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Address.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Address.hs @@ -4,7 +4,7 @@ -- | -- Module : Data.Solidity.Prim.Address --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Bool.hs b/packages/solidity/src/Data/Solidity/Prim/Bool.hs index 3f0e174a..17464a64 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Bool.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Bool.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.Solidity.Prim.Bool --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Bytes.hs b/packages/solidity/src/Data/Solidity/Prim/Bytes.hs index 0781d0e3..96684d24 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Bytes.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Bytes.hs @@ -1,14 +1,15 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE UndecidableInstances #-} -- | -- Module : Data.Solidity.Prim.Bytes --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -85,7 +86,7 @@ instance ToJSON Bytes where -- | Sized byte array with fixed length in bytes type BytesN n = SizedByteArray n Bytes -instance (n <= 32) => AbiType (BytesN n) where +instance KnownNat n => AbiType (BytesN n) where isDynamic _ = False instance (KnownNat n, n <= 32) => AbiGet (BytesN n) where @@ -93,21 +94,21 @@ instance (KnownNat n, n <= 32) => AbiGet (BytesN n) where ba <- unsafeFromByteArrayAccess <$> getBytes 32 return $ S.take (ba :: BytesN 32) -instance (KnownNat n, n <= 32) => AbiPut (BytesN n) where +instance KnownNat n => AbiPut (BytesN n) where abiPut ba = putByteString $ convert ba <> zero (32 - len) where len = fromIntegral $ natVal (Proxy :: Proxy n) -instance (KnownNat n, n <= 32) => IsString (BytesN n) where +instance KnownNat n => IsString (BytesN n) where fromString s = unsafeFromByteArrayAccess padded where bytes = fromString s :: Bytes len = fromIntegral $ natVal (Proxy :: Proxy n) padded = bytes <> zero (len - length bytes) -instance (KnownNat n, n <= 32) => FromJSON (BytesN n) where +instance KnownNat n => FromJSON (BytesN n) where parseJSON v = do ba <- parseJSON v return $ unsafeFromByteArrayAccess (ba :: Bytes) -instance (KnownNat n, n <= 32) => ToJSON (BytesN n) where +instance KnownNat n => ToJSON (BytesN n) where toJSON ba = toJSON (unSizedByteArray ba :: Bytes) abiGetByteString :: Get ByteString diff --git a/packages/solidity/src/Data/Solidity/Prim/Int.hs b/packages/solidity/src/Data/Solidity/Prim/Int.hs index 842876b1..a4de0dec 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Int.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Int.hs @@ -8,7 +8,7 @@ -- | -- Module : Data.Solidity.Prim.Int --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -34,7 +34,7 @@ module Data.Solidity.Prim.Int import qualified Basement.Numerical.Number as Basement (toInteger) import Basement.Types.Word256 (Word256 (Word256)) import qualified Basement.Types.Word256 as Basement (quot, rem) -import Data.Aeson (ToJSON(..)) +import Data.Aeson (ToJSON (..)) import Data.Bits (Bits (testBit), (.&.)) import Data.Proxy (Proxy (..)) import Data.Serialize (Get, Putter, Serialize (get, put)) @@ -55,7 +55,7 @@ instance Integral Word256 where newtype UIntN (n :: Nat) = UIntN { unUIntN :: Word256 } deriving (Eq, Ord, Enum, Bits, Generic) -instance (KnownNat n, n <= 256) => Num (UIntN n) where +instance KnownNat n => Num (UIntN n) where a + b = fromInteger (toInteger a + toInteger b) a - b = fromInteger (toInteger a - toInteger b) a * b = fromInteger (toInteger a * toInteger b) @@ -68,44 +68,44 @@ instance (KnownNat n, n <= 256) => Num (UIntN n) where where mask = (maxBound .&.) :: UIntN n -> UIntN n -instance (KnownNat n, n <= 256) => Show (UIntN n) where +instance KnownNat n => Show (UIntN n) where show = show . unUIntN -instance (KnownNat n, n <= 256) => Bounded (UIntN n) where +instance KnownNat n => Bounded (UIntN n) where minBound = UIntN 0 maxBound = UIntN $ 2 ^ natVal (Proxy :: Proxy n) - 1 -instance (KnownNat n, n <= 256) => Real (UIntN n) where +instance KnownNat n => Real (UIntN n) where toRational = toRational . toInteger -instance (KnownNat n, n <= 256) => Integral (UIntN n) where +instance KnownNat n => Integral (UIntN n) where toInteger = toInteger . unUIntN quotRem (UIntN a) (UIntN b) = (UIntN $ quot a b, UIntN $ rem a b) -instance (n <= 256) => AbiType (UIntN n) where +instance KnownNat n => AbiType (UIntN n) where isDynamic _ = False -instance (n <= 256) => AbiGet (UIntN n) where +instance KnownNat n => AbiGet (UIntN n) where abiGet = UIntN <$> getWord256 -instance (n <= 256) => AbiPut (UIntN n) where +instance KnownNat n => AbiPut (UIntN n) where abiPut = putWord256 . unUIntN -instance (KnownNat n, n <= 256) => ToJSON (UIntN n) where +instance KnownNat n => ToJSON (UIntN n) where toJSON = toJSON . toInteger -- | Signed integer with fixed length in bits. newtype IntN (n :: Nat) = IntN { unIntN :: Word256 } deriving (Eq, Ord, Enum, Bits, Generic) -instance (KnownNat n, n <= 256) => Show (IntN n) where +instance KnownNat n => Show (IntN n) where show = show . toInteger -instance (KnownNat n, n <= 256) => Bounded (IntN n) where +instance KnownNat n => Bounded (IntN n) where minBound = IntN $ negate $ 2 ^ (natVal (Proxy :: Proxy (n :: Nat)) - 1) maxBound = IntN $ 2 ^ (natVal (Proxy :: Proxy (n :: Nat)) - 1) - 1 -instance (KnownNat n, n <= 256) => Num (IntN n) where +instance KnownNat n => Num (IntN n) where a + b = fromInteger (toInteger a + toInteger b) a - b = fromInteger (toInteger a - toInteger b) a * b = fromInteger (toInteger a * toInteger b) @@ -116,25 +116,25 @@ instance (KnownNat n, n <= 256) => Num (IntN n) where | x >= 0 = IntN (fromInteger x) | otherwise = IntN (fromInteger $ 2 ^ 256 + x) -instance (KnownNat n, n <= 256) => Real (IntN n) where +instance KnownNat n => Real (IntN n) where toRational = toRational . toInteger -instance (KnownNat n, n <= 256) => Integral (IntN n) where +instance KnownNat n => Integral (IntN n) where quotRem (IntN a) (IntN b) = (IntN $ quot a b, IntN $ rem a b) toInteger x | testBit x 255 = toInteger (unIntN x) - 2 ^ 256 | otherwise = toInteger $ unIntN x -instance (n <= 256) => AbiType (IntN n) where +instance KnownNat n => AbiType (IntN n) where isDynamic _ = False -instance (n <= 256) => AbiGet (IntN n) where +instance KnownNat n => AbiGet (IntN n) where abiGet = IntN <$> getWord256 -instance (n <= 256) => AbiPut (IntN n) where +instance KnownNat n => AbiPut (IntN n) where abiPut = putWord256 . unIntN -instance (KnownNat n, n <= 256) => ToJSON (IntN n) where +instance KnownNat n => ToJSON (IntN n) where toJSON = toJSON . toInteger -- | Serialize 256 bit unsigned integer. diff --git a/packages/solidity/src/Data/Solidity/Prim/List.hs b/packages/solidity/src/Data/Solidity/Prim/List.hs index b3c0eaef..eff1f6df 100644 --- a/packages/solidity/src/Data/Solidity/Prim/List.hs +++ b/packages/solidity/src/Data/Solidity/Prim/List.hs @@ -1,13 +1,13 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} +{-# LANGUAGE UndecidableInstances #-} -- | -- Module : Data.Solidity.Prim.List --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -25,14 +25,15 @@ module Data.Solidity.Prim.List import Basement.Nat (NatWithinBound) import Basement.Sized.List (ListN, toListN_, unListN) -import qualified Basement.Sized.List as SL (init, map, mapM, mapM_, replicateM, scanl') +import qualified Basement.Sized.List as SL (init, map, mapM, mapM_, + replicateM, scanl') import Basement.Types.Word256 (Word256) -import Control.Monad (replicateM, forM) +import Control.Monad (forM, replicateM) import qualified Data.ByteString as B import Data.List (scanl') import Data.Proxy (Proxy (..)) -import Data.Serialize.Put (runPut, putByteString) -import Data.Serialize.Get (skip, lookAhead) +import Data.Serialize.Get (lookAhead, skip) +import Data.Serialize.Put (putByteString, runPut) import GHC.Exts (IsList (..)) import GHC.TypeLits (KnownNat, natVal, type (+), type (<=)) diff --git a/packages/solidity/src/Data/Solidity/Prim/String.hs b/packages/solidity/src/Data/Solidity/Prim/String.hs index 0bccf5f7..244eabbc 100644 --- a/packages/solidity/src/Data/Solidity/Prim/String.hs +++ b/packages/solidity/src/Data/Solidity/Prim/String.hs @@ -1,6 +1,6 @@ -- | -- Module : Data.Solidity.Prim.String --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Tagged.hs b/packages/solidity/src/Data/Solidity/Prim/Tagged.hs index d6a10fe7..7119c298 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Tagged.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tagged.hs @@ -3,7 +3,7 @@ -- | -- Module : Data.Solidity.Prim.Tagged --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/solidity/src/Data/Solidity/Prim/Tuple.hs b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs index cd2d3113..9ca0ac1d 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Tuple.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tuple.hs @@ -7,7 +7,7 @@ -- | -- Module : Data.Solidity.Prim.Tuple --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -26,7 +26,10 @@ import Data.Tuple.Solo (Solo (..)) import Data.Tuple.OneTuple (OneTuple (..)) #endif import Generics.SOP (Generic) +#if MIN_VERSION_base(4,15,0) +#else import qualified GHC.Generics as GHC (Generic) +#endif import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) import Data.Solidity.Abi.Generic () diff --git a/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs b/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs index c9e83bf1..f9f5242b 100644 --- a/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs +++ b/packages/solidity/src/Data/Solidity/Prim/Tuple/TH.hs @@ -2,7 +2,7 @@ -- | -- Module : Data.Solidity.Prim.Tuple.TH --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -19,8 +19,8 @@ module Data.Solidity.Prim.Tuple.TH (tupleDecs) where import Control.Monad (replicateM) import Data.Proxy import Language.Haskell.TH (DecsQ, Type (VarT), appT, clause, conT, - cxt, funD, instanceD, listE, newName, normalB, - tupleT) + cxt, funD, instanceD, listE, newName, + normalB, tupleT) import Data.Solidity.Abi (AbiGet, AbiPut, AbiType (..)) diff --git a/packages/solidity/src/Language/Solidity/Abi.hs b/packages/solidity/src/Language/Solidity/Abi.hs index 79c38776..70013c2a 100644 --- a/packages/solidity/src/Language/Solidity/Abi.hs +++ b/packages/solidity/src/Language/Solidity/Abi.hs @@ -1,11 +1,11 @@ -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TemplateHaskell #-} -- | -- Module : Data.Solidity.Abi.Json --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me @@ -37,9 +37,11 @@ module Language.Solidity.Abi import Control.Monad (void) import Crypto.Ethereum.Utils (keccak256) -import Data.Aeson (FromJSON (parseJSON), Options (constructorTagModifier, fieldLabelModifier, sumEncoding), +import Data.Aeson (FromJSON (parseJSON), + Options (constructorTagModifier, fieldLabelModifier, sumEncoding), SumEncoding (TaggedObject), - ToJSON (toJSON), defaultOptions, withObject, (.:), (.:?)) + ToJSON (toJSON), defaultOptions, + withObject, (.:), (.:?)) import Data.Aeson.TH (deriveJSON, deriveToJSON) import qualified Data.ByteArray as A (take) import Data.ByteArray.HexString (toText) @@ -47,7 +49,7 @@ import Data.Char (toLower) import Data.Text (Text) import qualified Data.Text as T (dropEnd, unlines, unpack) import Data.Text.Encoding (encodeUtf8) -import Lens.Micro (over, _head) +import Lens.Micro (_head, over) import Text.Parsec (ParseError, char, choice, digit, eof, lookAhead, many1, manyTill, optionMaybe, parse, string, try, @@ -115,8 +117,8 @@ data Declaration = DConstructor -- ^ Event } | DError - { errName :: Text - , errInputs :: [FunctionArg] + { errName :: Text + , errInputs :: [FunctionArg] -- ^ Error } | DFallback @@ -126,12 +128,12 @@ data Declaration = DConstructor deriving Show instance Eq Declaration where - (DConstructor a) == (DConstructor b) = length a == length b + (DConstructor a) == (DConstructor b) = length a == length b (DFunction a _ _ _) == (DFunction b _ _ _) = a == b - (DEvent a _ _) == (DEvent b _ _) = a == b - (DError a _) == (DError b _) = a == b - (DFallback _) == (DFallback _) = True - (==) _ _ = False + (DEvent a _ _) == (DEvent b _ _) = a == b + (DError a _) == (DError b _) = a == b + (DFallback _) == (DFallback _) = True + (==) _ _ = False instance Ord Declaration where compare (DConstructor a) (DConstructor b) = compare (length a) (length b) diff --git a/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs b/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs index c5403177..dffafc08 100644 --- a/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs +++ b/packages/solidity/tests/Data/Solidity/Test/AddressSpec.hs @@ -1,4 +1,15 @@ {-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Data.Solidity.Test.AddressSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Data.Solidity.Test.AddressSpec where import Data.ByteString (ByteString) diff --git a/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs b/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs index 75a84250..456fadc2 100644 --- a/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs +++ b/packages/solidity/tests/Data/Solidity/Test/EncodingSpec.hs @@ -3,6 +3,17 @@ {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} + +-- | +-- Module : Data.Solidity.Test.EncodingSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- module Data.Solidity.Test.EncodingSpec where diff --git a/packages/solidity/tests/Data/Solidity/Test/IntSpec.hs b/packages/solidity/tests/Data/Solidity/Test/IntSpec.hs index b89bd41e..560a0a45 100644 --- a/packages/solidity/tests/Data/Solidity/Test/IntSpec.hs +++ b/packages/solidity/tests/Data/Solidity/Test/IntSpec.hs @@ -1,4 +1,15 @@ {-# LANGUAGE DataKinds #-} + +-- | +-- Module : Data.Solidity.Test.IntSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Data.Solidity.Test.IntSpec where import Test.Hspec diff --git a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs index 4fdc5395..3be0f543 100644 --- a/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs +++ b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs @@ -1,4 +1,15 @@ {-# LANGUAGE OverloadedStrings #-} + +-- | +-- Module : Language.Solidity.Test.AbiSpec +-- Copyright : Aleksandr Krupenkin 2016-2024 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me +-- Stability : experimental +-- Portability : unportable +-- + module Language.Solidity.Test.AbiSpec where diff --git a/packages/solidity/web3-solidity.cabal b/packages/solidity/web3-solidity.cabal index 64b17887..026c4b49 100644 --- a/packages/solidity/web3-solidity.cabal +++ b/packages/solidity/web3-solidity.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: web3-solidity -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Solidity language for Haskell Web3 library. description: This package contains Solidity parsec-based parser and primitive types. category: Network @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2024 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -44,23 +44,23 @@ library Paths_web3_solidity hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - OneTuple >0.2 && <0.4 - , aeson >1.2 && <2.1 - , base >4.11 && <4.16 + OneTuple >0.2 && <0.5 + , aeson >1.2 && <2.2 + , base >4.11 && <4.18 , basement >0.0 && <0.1 - , bytestring >0.10 && <0.11 + , bytestring >0.10 && <0.12 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , memory >0.14 && <0.17 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , parsec >3.1 && <3.2 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.18 - , text >1.2 && <1.3 + , template-haskell >2.11 && <2.20 + , text >1.2 && <2.1 , web3-crypto ==1.0.* default-language: Haskell2010 @@ -92,26 +92,26 @@ test-suite tests hs-source-dirs: tests src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - OneTuple >0.2 && <0.4 - , aeson >1.2 && <2.1 - , base >4.11 && <4.16 + OneTuple >0.2 && <0.5 + , aeson >1.2 && <2.2 + , base >4.11 && <4.18 , basement >0.0 && <0.1 - , bytestring >0.10 && <0.11 + , bytestring >0.10 && <0.12 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.9 + , hspec >=2.4.4 && <2.11 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.9 + , hspec-discover >=2.4.4 && <2.11 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.17 + , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , parsec >3.1 && <3.2 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.18 - , text >1.2 && <1.3 + , template-haskell >2.11 && <2.20 + , text >1.2 && <2.1 , web3-crypto ==1.0.* default-language: Haskell2010 diff --git a/packages/web3/package.yaml b/packages/web3/package.yaml index de930f58..69d162d1 100644 --- a/packages/web3/package.yaml +++ b/packages/web3/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -7,11 +7,11 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.16 +- base >4.11 && <4.18 - web3-provider >=1.0 && <1.1 - web3-ethereum >=1.0 && <1.1 - web3-polkadot >=1.0 && <1.1 @@ -19,7 +19,6 @@ dependencies: ghc-options: - -funbox-strict-fields - -Wduplicate-exports -- -Whi-shadowing - -Widentities - -Woverlapping-patterns - -Wpartial-type-signatures @@ -30,7 +29,6 @@ ghc-options: - -Wmissing-fields - -Wmissing-methods - -Wmissing-exported-signatures -- -Wmissing-monadfail-instances - -Wmissing-signatures - -Wname-shadowing - -Wunused-binds diff --git a/packages/web3/src/Network/Web3.hs b/packages/web3/src/Network/Web3.hs index 1c378579..d3b1d6ad 100644 --- a/packages/web3/src/Network/Web3.hs +++ b/packages/web3/src/Network/Web3.hs @@ -1,6 +1,6 @@ -- | -- Module : Network.Web3 --- Copyright : Aleksandr Krupenkin 2016-2021 +-- Copyright : Aleksandr Krupenkin 2016-2024 -- License : Apache-2.0 -- -- Maintainer : mail@akru.me diff --git a/packages/web3/web3.cabal b/packages/web3/web3.cabal index 8542f4e7..06bde6ce 100644 --- a/packages/web3/web3.cabal +++ b/packages/web3/web3.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: web3 -version: 1.0.0.1 +version: 1.0.1.0 synopsis: Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2024 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -29,9 +29,9 @@ library Paths_web3 hs-source-dirs: src - ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.16 + base >4.11 && <4.18 , web3-ethereum ==1.0.* , web3-polkadot ==1.0.* , web3-provider ==1.0.* diff --git a/stack.yaml b/stack.yaml index b9c30f39..3167b4fa 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,10 +1,9 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-19.21 +resolver: lts-21.25 # User packages to be built. packages: - 'packages/web3' -- 'packages/ipfs' - 'packages/scale' - 'packages/crypto' - 'packages/bignum' @@ -20,8 +19,6 @@ packages: # Extra package dependencies extra-deps: -- animalcase-0.1.0.2@sha256:d7b80c3130c68d7ce8ddd9782588b2c4dd7da86461f302c54cc4acddf0902b51 -- relapse-1.0.0.1 # Dependencies bounds pvp-bounds: both From bd02f7aac8c741a6128d8e26fe7861a3efc9bcad Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 3 Oct 2024 15:21:27 +0300 Subject: [PATCH 221/237] cryptonite is archived, and the crypton fork continues the library. --- packages/crypto/package.yaml | 2 +- packages/crypto/web3-crypto.cabal | 4 ++-- packages/polkadot/package.yaml | 2 +- packages/polkadot/web3-polkadot.cabal | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index 64c059fe..d550f315 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -22,7 +22,7 @@ dependencies: - vector >0.12 && <0.14 - containers >0.6 && <0.7 - uuid-types >1.0 && <1.1 -- cryptonite >0.22 && <0.31 +- crypton >0.30 && <1.0 - bytestring >0.10 && <0.12 - memory-hexstring >=1.0 && <1.1 diff --git a/packages/crypto/web3-crypto.cabal b/packages/crypto/web3-crypto.cabal index 0de46fe4..da2b5e3f 100644 --- a/packages/crypto/web3-crypto.cabal +++ b/packages/crypto/web3-crypto.cabal @@ -51,7 +51,7 @@ library , base >4.11 && <4.18 , bytestring >0.10 && <0.12 , containers >0.6 && <0.7 - , cryptonite >0.22 && <0.31 + , crypton >0.30 && <1.0 , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , text >1.2 && <2.1 @@ -92,7 +92,7 @@ test-suite tests , base >4.11 && <4.18 , bytestring >0.10 && <0.12 , containers >0.6 && <0.7 - , cryptonite >0.22 && <0.31 + , crypton >0.30 && <1.0 , hspec >=2.4.4 && <2.11 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.11 diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 83b8d5e4..bd0dea45 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -20,7 +20,7 @@ dependencies: - memory >0.14 && <0.19 - microlens >0.4 && <0.5 - containers >0.6 && <0.7 -- cryptonite >0.22 && <0.31 +- crypton >0.30 && <1.0 - bytestring >0.10 && <0.12 - base58-bytestring >=0.1 && <0.2 - cases >0.1 && <0.2 diff --git a/packages/polkadot/web3-polkadot.cabal b/packages/polkadot/web3-polkadot.cabal index 010d6a4b..21cae61f 100644 --- a/packages/polkadot/web3-polkadot.cabal +++ b/packages/polkadot/web3-polkadot.cabal @@ -77,7 +77,7 @@ library , bytestring >0.10 && <0.12 , cases >0.1 && <0.2 , containers >0.6 && <0.7 - , cryptonite >0.22 && <0.31 + , crypton >0.30 && <1.0 , generics-sop >0.3 && <0.6 , jsonrpc-tinyclient ==1.0.* , memory >0.14 && <0.19 @@ -154,7 +154,7 @@ test-suite tests , bytestring >0.10 && <0.12 , cases >0.1 && <0.2 , containers >0.6 && <0.7 - , cryptonite >0.22 && <0.31 + , crypton >0.30 && <1.0 , generics-sop >0.3 && <0.6 , hspec >=2.4.4 && <2.11 , hspec-contrib >=0.4.0 && <0.6 From 8bd5e646ae06d578348ecd13b7b724ab2ff7c439 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 3 Oct 2024 15:21:44 +0300 Subject: [PATCH 222/237] [CI] update actions --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dda1e7d..8e1d2d98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup latest stack - uses: actions/setup-haskell@v1 + uses: haskell/actions/setup@v2 with: enable-stack: true stack-version: 'latest' From 4fa0965d4d6155d3eee8e87d07dd4af1885889c2 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 3 Oct 2024 15:46:28 +0300 Subject: [PATCH 223/237] Uplift to lts-22.27 --- README.md | 2 +- packages/bignum/package.yaml | 6 +++--- packages/bignum/web3-bignum.cabal | 8 ++++---- packages/crypto/package.yaml | 6 +++--- packages/crypto/web3-crypto.cabal | 8 ++++---- packages/ethereum/package.yaml | 12 ++++++------ packages/ethereum/web3-ethereum.cabal | 20 ++++++++++---------- packages/hexstring/memory-hexstring.cabal | 4 ++-- packages/hexstring/package.yaml | 4 ++-- packages/jsonrpc/jsonrpc-tinyclient.cabal | 4 ++-- packages/jsonrpc/package.yaml | 4 ++-- packages/polkadot/package.yaml | 8 ++++---- packages/polkadot/web3-polkadot.cabal | 12 ++++++------ packages/provider/package.yaml | 6 +++--- packages/provider/web3-provider.cabal | 6 +++--- packages/scale/package.yaml | 8 ++++---- packages/scale/scale.cabal | 12 ++++++------ packages/solidity/package.yaml | 8 ++++---- packages/solidity/web3-solidity.cabal | 12 ++++++------ packages/web3/package.yaml | 2 +- packages/web3/web3.cabal | 2 +- stack.yaml | 2 +- 22 files changed, 78 insertions(+), 78 deletions(-) diff --git a/README.md b/README.md index 1dff31e1..eeb5ac74 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This library implements Haskell API client for popular Web3 platforms. [![CI](https://github.com/airalab/hs-web3/workflows/CI/badge.svg)](https://github.com/airalab/hs-web3/actions) [![Hackage Matrix](https://matrix.hackage.haskell.org/api/v2/packages/web3/badge)](https://matrix.hackage.haskell.org/package/web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) -[![LTS-14](http://stackage.org/package/web3/badge/lts-14)](http://stackage.org/lts-14/package/web3) +[![LTS-22](http://stackage.org/package/web3/badge/lts-22)](http://stackage.org/lts-22/package/web3) [![nightly](http://stackage.org/package/web3/badge/nightly)](http://stackage.org/nightly/package/web3) [![Code Triagers](https://www.codetriage.com/airalab/hs-web3/badges/users.svg)](https://www.codetriage.com/airalab/hs-web3) diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index b63072bd..89a0732e 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.18 +- base >4.11 && <4.19 - scale >=1.0 && <1.1 - memory >0.14 && <0.19 - memory-hexstring >=1.0 && <1.1 @@ -54,9 +54,9 @@ tests: dependencies: - memory-hexstring >=1.0 && <1.1 - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.11 + - hspec-discover >=2.4.4 && <2.12 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.11 + - hspec >=2.4.4 && <2.12 ghc-options: - -threaded - -rtsopts diff --git a/packages/bignum/web3-bignum.cabal b/packages/bignum/web3-bignum.cabal index a0d2bfe5..0962f138 100644 --- a/packages/bignum/web3-bignum.cabal +++ b/packages/bignum/web3-bignum.cabal @@ -31,7 +31,7 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.18 + base >4.11 && <4.19 , cereal >0.5 && <0.6 , memory >0.14 && <0.19 , memory-hexstring ==1.0.* @@ -51,11 +51,11 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.18 + base >4.11 && <4.19 , cereal >0.5 && <0.6 - , hspec >=2.4.4 && <2.11 + , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.11 + , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , memory >0.14 && <0.19 , memory-hexstring ==1.0.* diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index d550f315..8901b5d2 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -15,7 +15,7 @@ extra-source-files: - src/cbits/xxhash.c dependencies: -- base >4.11 && <4.18 +- base >4.11 && <4.19 - text >1.2 && <2.1 - aeson >1.2 && <2.2 - memory >0.14 && <0.19 @@ -65,9 +65,9 @@ tests: c-sources: src/cbits/xxhash.c dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.11 + - hspec-discover >=2.4.4 && <2.12 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.11 + - hspec >=2.4.4 && <2.12 ghc-options: - -threaded - -rtsopts diff --git a/packages/crypto/web3-crypto.cabal b/packages/crypto/web3-crypto.cabal index da2b5e3f..3262e9d4 100644 --- a/packages/crypto/web3-crypto.cabal +++ b/packages/crypto/web3-crypto.cabal @@ -48,7 +48,7 @@ library src/cbits/xxhash.c build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.18 + , base >4.11 && <4.19 , bytestring >0.10 && <0.12 , containers >0.6 && <0.7 , crypton >0.30 && <1.0 @@ -89,13 +89,13 @@ test-suite tests src/cbits/xxhash.c build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.18 + , base >4.11 && <4.19 , bytestring >0.10 && <0.12 , containers >0.6 && <0.7 , crypton >0.30 && <1.0 - , hspec >=2.4.4 && <2.11 + , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.11 + , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , memory >0.14 && <0.19 , memory-hexstring ==1.0.* diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index 643f6868..c040be9c 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.18 +- base >4.11 && <4.19 - text >1.2 && <2.1 - vinyl >0.5 && <0.15 - aeson >1.2 && <2.2 @@ -26,10 +26,10 @@ dependencies: - exceptions >0.8 && <0.11 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 -- transformers >0.5 && <0.6 +- transformers >0.5 && <0.7 - microlens-aeson >2.2 && <2.6 -- template-haskell >2.11 && <2.20 -- mtl >2.2 && <2.3 +- template-haskell >2.11 && <2.21 +- mtl >2.2 && <2.4 - web3-crypto >=1.0 && <1.1 - web3-solidity >=1.0 && <1.1 - memory-hexstring >=1.0 && <1.1 @@ -70,9 +70,9 @@ tests: - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.11 + - hspec-discover >=2.4.4 && <2.12 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.11 + - hspec >=2.4.4 && <2.12 ghc-options: - -threaded - -rtsopts diff --git a/packages/ethereum/web3-ethereum.cabal b/packages/ethereum/web3-ethereum.cabal index 110ea934..52837061 100644 --- a/packages/ethereum/web3-ethereum.cabal +++ b/packages/ethereum/web3-ethereum.cabal @@ -59,7 +59,7 @@ library OneTuple >0.2 && <0.5 , aeson >1.2 && <2.2 , aeson-casing ==0.2.* - , base >4.11 && <4.18 + , base >4.11 && <4.19 , bytestring >0.10 && <0.12 , data-default >0.7 && <0.8 , exceptions >0.8 && <0.11 @@ -70,12 +70,12 @@ library , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , microlens-aeson >2.2 && <2.6 - , mtl >2.2 && <2.3 + , mtl >2.2 && <2.4 , relapse >=1.0 && <2.0 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.20 + , template-haskell >2.11 && <2.21 , text >1.2 && <2.1 - , transformers >0.5 && <0.6 + , transformers >0.5 && <0.7 , vinyl >0.5 && <0.15 , web3-crypto ==1.0.* , web3-solidity ==1.0.* @@ -124,14 +124,14 @@ test-suite tests OneTuple >0.2 && <0.5 , aeson >1.2 && <2.2 , aeson-casing ==0.2.* - , base >4.11 && <4.18 + , base >4.11 && <4.19 , bytestring >0.10 && <0.12 , data-default >0.7 && <0.8 , exceptions >0.8 && <0.11 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.11 + , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.11 + , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , jsonrpc-tinyclient ==1.0.* , machines >0.6 && <0.8 @@ -139,12 +139,12 @@ test-suite tests , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , microlens-aeson >2.2 && <2.6 - , mtl >2.2 && <2.3 + , mtl >2.2 && <2.4 , relapse >=1.0 && <2.0 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.20 + , template-haskell >2.11 && <2.21 , text >1.2 && <2.1 - , transformers >0.5 && <0.6 + , transformers >0.5 && <0.7 , vinyl >0.5 && <0.15 , web3-crypto ==1.0.* , web3-solidity ==1.0.* diff --git a/packages/hexstring/memory-hexstring.cabal b/packages/hexstring/memory-hexstring.cabal index 09d21295..e2e338c7 100644 --- a/packages/hexstring/memory-hexstring.cabal +++ b/packages/hexstring/memory-hexstring.cabal @@ -35,10 +35,10 @@ library ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.18 + , base >4.11 && <4.19 , bytestring >0.10 && <0.12 , memory >0.14 && <0.19 , scale ==1.0.* - , template-haskell >2.11 && <2.20 + , template-haskell >2.11 && <2.21 , text >1.2 && <2.1 default-language: Haskell2010 diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index a8fa6f0f..94cd963e 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -11,12 +11,12 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.18 +- base >4.11 && <4.19 - text >1.2 && <2.1 - aeson >1.2 && <2.2 - memory >0.14 && <0.19 - bytestring >0.10 && <0.12 -- template-haskell >2.11 && <2.20 +- template-haskell >2.11 && <2.21 - scale >=1.0 && <1.1 ghc-options: diff --git a/packages/jsonrpc/jsonrpc-tinyclient.cabal b/packages/jsonrpc/jsonrpc-tinyclient.cabal index 6c49bc4b..43867b24 100644 --- a/packages/jsonrpc/jsonrpc-tinyclient.cabal +++ b/packages/jsonrpc/jsonrpc-tinyclient.cabal @@ -32,12 +32,12 @@ library ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.18 + , base >4.11 && <4.19 , bytestring >0.10 && <0.12 , exceptions >0.8 && <0.11 , http-client >0.5 && <0.8 , http-client-tls >0.3 && <0.4 - , mtl >2.2 && <2.3 + , mtl >2.2 && <2.4 , random >1.0 && <1.3 , text >1.2 && <2.1 , websockets >0.10 && <0.13 diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index fef8be06..e9ea4fdd 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.18 +- base >4.11 && <4.19 - text >1.2 && <2.1 - aeson >1.2 && <2.2 - random >1.0 && <1.3 @@ -20,7 +20,7 @@ dependencies: - websockets >0.10 && <0.13 - http-client >0.5 && <0.8 - http-client-tls >0.3 && <0.4 -- mtl >2.2 && <2.3 +- mtl >2.2 && <2.4 ghc-options: - -funbox-strict-fields diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index bd0dea45..9c615eb1 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -11,8 +11,8 @@ copyright: "(c) Aleksandr Krupenkin 2016-2021" category: Network dependencies: -- mtl >2.2 && <2.3 -- base >4.11 && <4.18 +- mtl >2.2 && <2.4 +- base >4.11 && <4.19 - text >1.2 && <2.1 - aeson >1.2 && <2.2 - scale >=1.0 && <1.1 @@ -68,9 +68,9 @@ tests: dependencies: - hspec-expectations-json >=1.0.0 && <1.1 - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.11 + - hspec-discover >=2.4.4 && <2.12 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.11 + - hspec >=2.4.4 && <2.12 ghc-options: - -threaded - -rtsopts diff --git a/packages/polkadot/web3-polkadot.cabal b/packages/polkadot/web3-polkadot.cabal index 21cae61f..6c69cd3e 100644 --- a/packages/polkadot/web3-polkadot.cabal +++ b/packages/polkadot/web3-polkadot.cabal @@ -72,7 +72,7 @@ library ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.18 + , base >4.11 && <4.19 , base58-bytestring ==0.1.* , bytestring >0.10 && <0.12 , cases >0.1 && <0.2 @@ -85,7 +85,7 @@ library , microlens >0.4 && <0.5 , microlens-mtl >0.2 && <0.3 , microlens-th >0.4 && <0.5 - , mtl >2.2 && <2.3 + , mtl >2.2 && <2.4 , parsec >3.0 && <3.2 , scale ==1.0.* , text >1.2 && <2.1 @@ -149,16 +149,16 @@ test-suite tests ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: aeson >1.2 && <2.2 - , base >4.11 && <4.18 + , base >4.11 && <4.19 , base58-bytestring ==0.1.* , bytestring >0.10 && <0.12 , cases >0.1 && <0.2 , containers >0.6 && <0.7 , crypton >0.30 && <1.0 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.11 + , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.11 + , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , hspec-expectations-json >=1.0.0 && <1.1 , jsonrpc-tinyclient ==1.0.* @@ -167,7 +167,7 @@ test-suite tests , microlens >0.4 && <0.5 , microlens-mtl >0.2 && <0.3 , microlens-th >0.4 && <0.5 - , mtl >2.2 && <2.3 + , mtl >2.2 && <2.4 , parsec >3.0 && <3.2 , scale ==1.0.* , text >1.2 && <2.1 diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml index e0f9b8ad..ca96593f 100644 --- a/packages/provider/package.yaml +++ b/packages/provider/package.yaml @@ -11,8 +11,8 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.18 -- mtl >2.2 && <2.3 +- base >4.11 && <4.19 +- mtl >2.2 && <2.4 - text >1.2 && <2.1 - async >2.1 && <2.3 - network >2.5 && <3.2 @@ -20,7 +20,7 @@ dependencies: - exceptions >0.8 && <0.11 - http-client >0.5 && <0.8 - data-default >0.7 && <0.8 -- transformers >0.5 && <0.6 +- transformers >0.5 && <0.7 - jsonrpc-tinyclient >=1.0 && <1.1 ghc-options: diff --git a/packages/provider/web3-provider.cabal b/packages/provider/web3-provider.cabal index 6e0e6514..28baad0a 100644 --- a/packages/provider/web3-provider.cabal +++ b/packages/provider/web3-provider.cabal @@ -32,14 +32,14 @@ library ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: async >2.1 && <2.3 - , base >4.11 && <4.18 + , base >4.11 && <4.19 , data-default >0.7 && <0.8 , exceptions >0.8 && <0.11 , http-client >0.5 && <0.8 , jsonrpc-tinyclient ==1.0.* - , mtl >2.2 && <2.3 + , mtl >2.2 && <2.4 , network >2.5 && <3.2 , text >1.2 && <2.1 - , transformers >0.5 && <0.6 + , transformers >0.5 && <0.7 , websockets >0.10 && <0.13 default-language: Haskell2010 diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index e91ae2aa..c6e41199 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.18 +- base >4.11 && <4.19 - text >1.2 && <2.1 - cereal >0.5 && <0.6 - bitvec >1.0 && <2.0 @@ -20,7 +20,7 @@ dependencies: - bytestring >0.10 && <0.12 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.20 +- template-haskell >2.11 && <2.21 ghc-options: - -funbox-strict-fields @@ -58,9 +58,9 @@ tests: dependencies: - bytestring >0.10 && <0.12 - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.11 + - hspec-discover >=2.4.4 && <2.12 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.11 + - hspec >=2.4.4 && <2.12 ghc-options: - -threaded - -rtsopts diff --git a/packages/scale/scale.cabal b/packages/scale/scale.cabal index cf775192..13350c97 100644 --- a/packages/scale/scale.cabal +++ b/packages/scale/scale.cabal @@ -38,14 +38,14 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.18 + base >4.11 && <4.19 , bitvec >1.0 && <2.0 , bytestring >0.10 && <0.12 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 , memory >0.14 && <0.19 - , template-haskell >2.11 && <2.20 + , template-haskell >2.11 && <2.21 , text >1.2 && <2.1 , vector >0.12 && <0.14 default-language: Haskell2010 @@ -71,18 +71,18 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.18 + base >4.11 && <4.19 , bitvec >1.0 && <2.0 , bytestring >0.10 && <0.12 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.11 + , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.11 + , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , memory >0.14 && <0.19 - , template-haskell >2.11 && <2.20 + , template-haskell >2.11 && <2.21 , text >1.2 && <2.1 , vector >0.12 && <0.14 default-language: Haskell2010 diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml index 2949c02e..4219dedf 100644 --- a/packages/solidity/package.yaml +++ b/packages/solidity/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.18 +- base >4.11 && <4.19 - text >1.2 && <2.1 - aeson >1.2 && <2.2 - cereal >0.5 && <0.6 @@ -25,7 +25,7 @@ dependencies: - bytestring >0.10 && <0.12 - generics-sop >0.3 && <0.6 - data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.20 +- template-haskell >2.11 && <2.21 - web3-crypto >=1.0 && <1.1 ghc-options: @@ -63,9 +63,9 @@ tests: - src dependencies: - hspec-expectations >=0.8.2 && <0.9 - - hspec-discover >=2.4.4 && <2.11 + - hspec-discover >=2.4.4 && <2.12 - hspec-contrib >=0.4.0 && <0.6 - - hspec >=2.4.4 && <2.11 + - hspec >=2.4.4 && <2.12 ghc-options: - -threaded - -rtsopts diff --git a/packages/solidity/web3-solidity.cabal b/packages/solidity/web3-solidity.cabal index 026c4b49..7fd1fb03 100644 --- a/packages/solidity/web3-solidity.cabal +++ b/packages/solidity/web3-solidity.cabal @@ -48,7 +48,7 @@ library build-depends: OneTuple >0.2 && <0.5 , aeson >1.2 && <2.2 - , base >4.11 && <4.18 + , base >4.11 && <4.19 , basement >0.0 && <0.1 , bytestring >0.10 && <0.12 , cereal >0.5 && <0.6 @@ -59,7 +59,7 @@ library , microlens >0.4 && <0.5 , parsec >3.1 && <3.2 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.20 + , template-haskell >2.11 && <2.21 , text >1.2 && <2.1 , web3-crypto ==1.0.* default-language: Haskell2010 @@ -96,22 +96,22 @@ test-suite tests build-depends: OneTuple >0.2 && <0.5 , aeson >1.2 && <2.2 - , base >4.11 && <4.18 + , base >4.11 && <4.19 , basement >0.0 && <0.1 , bytestring >0.10 && <0.12 , cereal >0.5 && <0.6 , data-default >0.7 && <0.8 , generics-sop >0.3 && <0.6 - , hspec >=2.4.4 && <2.11 + , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 - , hspec-discover >=2.4.4 && <2.11 + , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , memory >0.14 && <0.19 , memory-hexstring ==1.0.* , microlens >0.4 && <0.5 , parsec >3.1 && <3.2 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.20 + , template-haskell >2.11 && <2.21 , text >1.2 && <2.1 , web3-crypto ==1.0.* default-language: Haskell2010 diff --git a/packages/web3/package.yaml b/packages/web3/package.yaml index 69d162d1..2568d6bd 100644 --- a/packages/web3/package.yaml +++ b/packages/web3/package.yaml @@ -11,7 +11,7 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.18 +- base >4.11 && <4.19 - web3-provider >=1.0 && <1.1 - web3-ethereum >=1.0 && <1.1 - web3-polkadot >=1.0 && <1.1 diff --git a/packages/web3/web3.cabal b/packages/web3/web3.cabal index 06bde6ce..c55b02ea 100644 --- a/packages/web3/web3.cabal +++ b/packages/web3/web3.cabal @@ -31,7 +31,7 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.18 + base >4.11 && <4.19 , web3-ethereum ==1.0.* , web3-polkadot ==1.0.* , web3-provider ==1.0.* diff --git a/stack.yaml b/stack.yaml index 3167b4fa..bc526581 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-21.25 +resolver: lts-22.27 # User packages to be built. packages: From 8ba313ddf8855e48fd3cc5a3ff4e0e8054f8c093 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Thu, 3 Oct 2024 15:55:11 +0300 Subject: [PATCH 224/237] [README] Drop hackage matrix badge (obsolete) --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index eeb5ac74..28baa2df 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ This library implements Haskell API client for popular Web3 platforms. [![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) [![CI](https://github.com/airalab/hs-web3/workflows/CI/badge.svg)](https://github.com/airalab/hs-web3/actions) -[![Hackage Matrix](https://matrix.hackage.haskell.org/api/v2/packages/web3/badge)](https://matrix.hackage.haskell.org/package/web3) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) [![LTS-22](http://stackage.org/package/web3/badge/lts-22)](http://stackage.org/lts-22/package/web3) [![nightly](http://stackage.org/package/web3/badge/nightly)](http://stackage.org/nightly/package/web3) From 8873ba6bdb4044088123049ef327e6123088bb26 Mon Sep 17 00:00:00 2001 From: Charles Crain Date: Fri, 25 Oct 2024 06:43:26 -0400 Subject: [PATCH 225/237] Update Types.hs (#142) --- packages/ethereum/src/Network/Ethereum/Api/Types.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ethereum/src/Network/Ethereum/Api/Types.hs b/packages/ethereum/src/Network/Ethereum/Api/Types.hs index 25b173af..15cdcb22 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Types.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Types.hs @@ -279,7 +279,7 @@ data BlockT tx = Block -- ^ DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given. , blockDifficulty :: !Quantity -- ^ QUANTITY - integer of the difficulty for this block. - , blockTotalDifficulty :: !Quantity + , blockTotalDifficulty :: !(Maybe Quantity) -- ^ QUANTITY - integer of the total difficulty of the chain until this block. , blockExtraData :: !HexString -- ^ DATA - the "extra data" field of this block. From f073e74a7615963662ba688cb0d7a482ecab6bd8 Mon Sep 17 00:00:00 2001 From: jinchui-crypto Date: Thu, 20 Nov 2025 10:20:33 +1100 Subject: [PATCH 226/237] Fix signature encoding for shorter integer values of `r`, `s` (#144) --- packages/crypto/src/Crypto/Ecdsa/Signature.hs | 11 +++++++++-- .../tests/Crypto/Ethereum/Test/SignatureSpec.hs | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/crypto/src/Crypto/Ecdsa/Signature.hs b/packages/crypto/src/Crypto/Ecdsa/Signature.hs index f89c0830..457dad2a 100644 --- a/packages/crypto/src/Crypto/Ecdsa/Signature.hs +++ b/packages/crypto/src/Crypto/Ecdsa/Signature.hs @@ -34,7 +34,7 @@ import Data.Bits (xor, (.|.)) import Data.ByteArray (ByteArray, ByteArrayAccess, Bytes, convert, singleton, takeView, view) -import qualified Data.ByteArray as BA (unpack) +import qualified Data.ByteArray as BA (length, replicate, unpack) import Data.Word (Word8) import Crypto.Ecdsa.Utils (exportKey) @@ -93,4 +93,11 @@ unpack vrs = (r, s, v) -- | Pack recoverable signature as byte array (65 byte length). pack :: ByteArray rsv => (Integer, Integer, Word8) -> rsv -pack (r, s, v) = i2osp r <> i2osp s <> singleton v +pack (r, s, v) = leftPad 32 (i2osp r) <> leftPad 32 (i2osp s) <> singleton v + where + leftPad :: (ByteArray b) => Int -> b -> b + leftPad targetLen bs + | BA.length bs >= targetLen = bs + | otherwise = BA.replicate paddingLen 0 <> bs + where + paddingLen = targetLen - BA.length bs diff --git a/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs b/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs index fe5c91e3..6b227bb9 100644 --- a/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs +++ b/packages/crypto/tests/Crypto/Ethereum/Test/SignatureSpec.hs @@ -30,7 +30,9 @@ test_vector = [ ("0xd3ba712ef9dd8f8b37d805a9d1c2b5ee92db66dda0fd8582d55cec1b2519d18dfff2333e29081e80544af7244f2f22", "0x330ee59f080c59252218d1245029d8689b48b021dcf2c438938264bbc61d05af", "0xcf96a0f05e40d05ebcedbff0af522a68e6c846e63b44245a1208592ddf03cc12136ad522656f08fd838c55ff78e093d387d23b30b88a57e467636e63c786e04e1c"), ("0x1e99da3e7bb02e1f239bbf0b2ea113848673dd52da24c87f2f40", "0x52c58101fe861f9292fb6ad3df74551b5fb3feca9983b108645a5a9354bfbe99", "0x8eebcef599eb67e9379e7d6b074123628c1a65f1b754647704eb003fa61aff0a0e5c79fb022970fea80409e20a12bd4b8e1a79a787394a547fbc93c2d3c1e2dc1c"), ("0x1e973d1b5b158acc7d710099700c793e702b215a1fa534317d5c44406000fc727c", "0x1280413acfcd88a97b759e72e60069a1dc4f0a595e815aad9a1a83fa73f81af2", "0x7a77a37f2f4378dab5a0ba7f55b858a2a116f885f2eeab30dcd0b6d1f7286fbb7cbdccbd52721ce68fbcf2448a2f450a6bc6bc7f0027906259821bb3800133181b"), - ("0x95da865540bd1336402a325a0435a920768f47d4b1ec0d89e0063f811872d1cb6423b5f4a4b931c9f41b216def", "0x0d537e54120ea923621225e3114b91a568a1abe7b7315b642017cad28cfad40b", "0xe04196529154ab89ceb598654f7d1ae178ecdcf73395aa8e8abb9200b504c39c58a93a6e502aaaddc2cbd712b436e9c9fb1010323927835ac54a7a77f11957f91c") + ("0x95da865540bd1336402a325a0435a920768f47d4b1ec0d89e0063f811872d1cb6423b5f4a4b931c9f41b216def", "0x0d537e54120ea923621225e3114b91a568a1abe7b7315b642017cad28cfad40b", "0xe04196529154ab89ceb598654f7d1ae178ecdcf73395aa8e8abb9200b504c39c58a93a6e502aaaddc2cbd712b436e9c9fb1010323927835ac54a7a77f11957f91c"), + ("0x5f6f0fb4805de6c07057", "0x2fe8fc66c90cca91bb502d4ab3d9ecec1621ee1d3c3e5837d98fbd1e08484980", "0x5f1760725b719a0f4f06078868511b397d87b7e3a76aa95671ac774587b5d68a000894b31c26288e67190910b7589b36d3ce7d182b8dc4b903e06284ea61fc811b"), + ("0x64ee1efda1b47bd975f7b14737", "0x8bd280c92fdf874ed9cf46616a2da0ce383c3c9c93daa599844168e6883f527d", "0x00f47d9633245b095ba5f9fa8e4f71a02bff785469f0dd1a3b146578d84061c17a4283bea20c54c2c27e8975e51311d6556acd9c19a783cccc0934d4c7592ba61b") ] test_key :: HexString From 417b55b3727324e14efae6e770c84cfb8ac3372c Mon Sep 17 00:00:00 2001 From: jinchui-crypto Date: Thu, 20 Nov 2025 10:23:29 +1100 Subject: [PATCH 227/237] Add `eth_feeHistory` method to Eth API (#146) --- .../ethereum/src/Network/Ethereum/Api/Eth.hs | 22 ++++++++++++++----- .../src/Network/Ethereum/Api/Types.hs | 20 +++++++++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs index c0f12cdd..c8e664e4 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs @@ -18,11 +18,19 @@ module Network.Ethereum.Api.Eth where import Data.ByteArray.HexString (HexString) import Data.Solidity.Prim.Address (Address) import Data.Text (Text) -import Network.Ethereum.Api.Types (Block, BlockT, Call, Change, - DefaultBlock, Filter, Quantity, - SyncingState, Transaction, - TxReceipt) -import Network.JsonRpc.TinyClient (JsonRpc (..)) +import Network.Ethereum.Api.Types + ( Block + , BlockT + , Call + , Change + , DefaultBlock + , Filter + , Quantity + , SyncingState + , Transaction + , TxReceipt + ) +import Network.JsonRpc.TinyClient (JsonRpc(..)) -- | Returns the current ethereum protocol version. protocolVersion :: JsonRpc m => m Text @@ -146,6 +154,10 @@ estimateGas :: JsonRpc m => Call -> m Quantity {-# INLINE estimateGas #-} estimateGas = remote "eth_estimateGas" +-- | Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range. +feeHistory :: (JsonRpc m) => Quantity -> DefaultBlock -> [Double] -> m FeeHistory +feeHistory = remote "eth_feeHistory" + -- | Returns information about a block by hash with only hashes of the transactions in it. getBlockByHashLite :: JsonRpc m => HexString -> m (Maybe (BlockT HexString)) {-# INLINE getBlockByHashLite #-} diff --git a/packages/ethereum/src/Network/Ethereum/Api/Types.hs b/packages/ethereum/src/Network/Ethereum/Api/Types.hs index 15cdcb22..f0d6a67c 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Types.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Types.hs @@ -300,3 +300,23 @@ data BlockT tx = Block $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 5 }) ''BlockT) + +--| Fee History information +data FeeHistory + = FeeHistory + { feeHistoryBaseFeePerBlobGas :: [Quantity] + -- ^ array of block base fees per blob gas. + , feeHistoryBaseFeePerGas :: [Quantity] + -- ^ Array of block base fees per gas. + , feeHistoryBlobGasUsedRatio :: [Rational] + -- ^ Array of block base fees per blob gas. + , feeHistoryGasUsedRatio :: [Rational] + -- ^ Array of block gas used ratios. + , feeHistoryOldestBlock :: Quantity + -- ^ QUANTITY - lowest number block of returned range. + , feeHistoryReward :: [[Quantity]] + -- ^ Two-dimensional array of effective priority fees per gas at the requested block percentiles. + } + deriving (Generic, Show) + +$(deriveJSON defaultOptions{fieldLabelModifier = over _head toLower . drop 10} ''FeeHistory) From 622ba4e37e055a8385e1d056b2a5580f04f14aea Mon Sep 17 00:00:00 2001 From: jinchui-crypto Date: Thu, 20 Nov 2025 10:24:14 +1100 Subject: [PATCH 228/237] Fix block struct according to the spec (#147) --- packages/ethereum/src/Network/Ethereum/Api/Types.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/ethereum/src/Network/Ethereum/Api/Types.hs b/packages/ethereum/src/Network/Ethereum/Api/Types.hs index f0d6a67c..63abf19f 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Types.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Types.hs @@ -277,10 +277,8 @@ data BlockT tx = Block -- ^ DATA, 32 Bytes - the root of the receipts trie of the block. , blockMiner :: !Address -- ^ DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given. - , blockDifficulty :: !Quantity + , blockDifficulty :: !(Maybe Quantity) -- ^ QUANTITY - integer of the difficulty for this block. - , blockTotalDifficulty :: !(Maybe Quantity) - -- ^ QUANTITY - integer of the total difficulty of the chain until this block. , blockExtraData :: !HexString -- ^ DATA - the "extra data" field of this block. , blockSize :: !Quantity From 837f6f7c4c95e2eef7fa312b77a5ebf2c6e14bfe Mon Sep 17 00:00:00 2001 From: jinchui-crypto Date: Thu, 20 Nov 2025 10:25:29 +1100 Subject: [PATCH 229/237] Update TxReceipt API according to the RPC ethereum documentation (#148) --- .../src/Network/Ethereum/Account/Internal.hs | 7 +-- .../src/Network/Ethereum/Account/Safe.hs | 18 ++---- .../src/Network/Ethereum/Api/Types.hs | 62 +++++++++++++++++-- 3 files changed, 64 insertions(+), 23 deletions(-) diff --git a/packages/ethereum/src/Network/Ethereum/Account/Internal.hs b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs index 7f77a517..36b0ed10 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Internal.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Internal.hs @@ -33,7 +33,7 @@ import Network.Ethereum.Account.Class (Account) import qualified Network.Ethereum.Api.Eth as Eth (getTransactionReceipt) import Network.Ethereum.Api.Types (Call (..), DefaultBlock (Latest), - TxReceipt (receiptTransactionHash)) + TxReceipt) import Network.Ethereum.Unit (Unit (..)) import Network.JsonRpc.TinyClient (JsonRpc) @@ -139,8 +139,3 @@ getReceipt mbtimeout tx = do getReceipt' :: JsonRpc m => HexString -> m TxReceipt getReceipt' = fmap (fromRight undefined) . getReceipt Nothing - -updateReceipt :: JsonRpc m => TxReceipt -> m TxReceipt -{-# INLINE updateReceipt #-} --- No timeout, because we update the receipt of an already processed transaction. -updateReceipt = getReceipt' . receiptTransactionHash diff --git a/packages/ethereum/src/Network/Ethereum/Account/Safe.hs b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs index adb2eec1..7856bd02 100644 --- a/packages/ethereum/src/Network/Ethereum/Account/Safe.hs +++ b/packages/ethereum/src/Network/Ethereum/Account/Safe.hs @@ -20,7 +20,6 @@ import Control.Monad.Trans (lift) import Data.ByteArray.HexString (HexString) import Network.Ethereum.Account.Class (Account (send)) -import Network.Ethereum.Account.Internal (updateReceipt) import qualified Network.Ethereum.Api.Eth as Eth import Network.Ethereum.Api.Types (TxReceipt (receiptBlockNumber)) import Network.Ethereum.Contract.Method (Method) @@ -42,17 +41,12 @@ safeSend b a = lift . withReceipt waiting =<< send a Left tx -> return $ Left tx Right receipt -> Right <$> f receipt - waiting receipt = - case receiptBlockNumber receipt of - Nothing -> do - liftIO $ threadDelay 1000000 - waiting =<< updateReceipt receipt - Just bn -> do - current <- Eth.blockNumber - if current - bn >= fromInteger b - then return receipt - else do liftIO $ threadDelay 1000000 - waiting receipt + waiting receipt = do + current <- Eth.blockNumber + if current - receiptBlockNumber receipt >= fromInteger b + then return receipt + else do liftIO $ threadDelay 1000000 + waiting receipt -- | Count block confirmation to keep secure -- According to Vitalik post diff --git a/packages/ethereum/src/Network/Ethereum/Api/Types.hs b/packages/ethereum/src/Network/Ethereum/Api/Types.hs index 63abf19f..66599448 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Types.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Types.hs @@ -32,6 +32,7 @@ import qualified Data.Text as T (pack) import qualified Data.Text.Lazy.Builder as B (toLazyText) import qualified Data.Text.Lazy.Builder.Int as B (hexadecimal) import qualified Data.Text.Read as R (decimal, hexadecimal) +import Data.Word (Word8) import GHC.Generics (Generic) import Lens.Micro (_head, over) @@ -74,6 +75,43 @@ instance FromJSON Quantity where _ -> fail $ "Quantity " ++ show v <> " is not valid hex" parseJSON _ = fail "Quantity should be a JSON String" +-- | Type representing a Byte in Web3 JSON RPC docs ("#/components/schemas/byte") +-- +-- The encoding is similar to Quantity, encoding as hex string. +newtype Byte = Byte { unByte :: Word8 } + deriving (Num, Real, Integral, Enum, Eq, Ord, Generic) + +instance Show Byte where + show = show . unByte + +instance IsString Byte where + fromString ('0' : 'x' : hex) = + case R.hexadecimal (T.pack hex) of + Right (x, "") + | toInteger (minBound :: Word8) <= x && x <= toInteger (maxBound :: Word8) -> Byte (fromInteger x) + | otherwise -> error ("Byte " ++ show hex ++ "is not within bounds") + _ -> error ("Byte " ++ show hex ++ " is not valid hex") + + fromString num = + case R.decimal (T.pack num) of + Right (x, "") + | toInteger (minBound :: Word8) <= x && x <= toInteger (maxBound :: Word8) -> Byte (fromInteger x) + | otherwise -> error ("Byte " ++ show num ++ "is not within bounds") + _ -> error ("Byte " ++ show num ++ " is not valid decimal") + +instance ToJSON Byte where + toJSON (Byte x) = + let hexValue = B.toLazyText (B.hexadecimal x) + in toJSON ("0x" <> hexValue) + +instance FromJSON Byte where + parseJSON (String v) = + case R.hexadecimal v of + Right (x, "") -> return (Byte x) + _ -> fail $ "Byte " ++ show v <> " is not valid hex" + parseJSON _ = fail "Byte should be a JSON String" + + -- | An object with sync status data. data SyncActive = SyncActive { syncStartingBlock :: !Quantity @@ -194,26 +232,40 @@ instance Ord DefaultBlock where -- | The Receipt of a Transaction data TxReceipt = TxReceipt - { receiptTransactionHash :: !HexString + { receiptType :: !(Maybe Byte) + -- ^ BYTE - type of the transaction 0x00 for legacy transactions, 0x01 EIP-2930, 0x02 EIP-1559 + , receiptTransactionHash :: !HexString -- ^ DATA, 32 Bytes - hash of the transaction. , receiptTransactionIndex :: !Quantity -- ^ QUANTITY - index of the transaction. - , receiptBlockHash :: !(Maybe HexString) - -- ^ DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending. - , receiptBlockNumber :: !(Maybe Quantity) - -- ^ QUANTITY - block number where this transaction was in. null when its pending. + , receiptBlockHash :: !HexString + -- ^ DATA, 32 Bytes - hash of the block where this transaction was in. + , receiptBlockNumber :: !Quantity + -- ^ QUANTITY - block number where this transaction was in. + , receiptFrom :: !Address + -- ^ DATA, 20 Bytes - the address of the sender + , receiptTo :: !(Maybe Address) + -- ^ DATA, 20 Bytes - The address of the receiver. null when the transaction is a contract creation transaction. , receiptCumulativeGasUsed :: !Quantity -- ^ QUANTITY - The total amount of gas used when this transaction was executed in the block. , receiptGasUsed :: !Quantity -- ^ QUANTITY - The amount of gas used by this specific transaction alone. + , receiptBlobGasUsed :: !(Maybe Quantity) + -- ^ QUANTITY - The amount of blob gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844. , receiptContractAddress :: !(Maybe Address) -- ^ DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null. , receiptLogs :: ![Change] -- ^ Array - Array of log objects, which this transaction generated. , receiptLogsBloom :: !HexString -- ^ DATA, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs. + , receiptRoot :: !(Maybe HexString) + -- ^ DATA, 32 Bytes - The post-transaction state root. Only specified for transactions included before the Byzantium upgrade. , receiptStatus :: !(Maybe Quantity) -- ^ QUANTITY either 1 (success) or 0 (failure) + , receiptEffectiveGasPrice :: !Quantity + -- ^ QUANTITY - The actual value per gas deducted from the sender's account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas). + , blobGasPrice :: !(Maybe Quantity) + -- ^ QUANTITY - The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844. } deriving (Show, Generic) From 947aa6f477bdb6cd2c492e126858777f828dc443 Mon Sep 17 00:00:00 2001 From: jinchui-crypto Date: Thu, 20 Nov 2025 10:26:01 +1100 Subject: [PATCH 230/237] Add chainId call (#150) --- packages/ethereum/src/Network/Ethereum/Api/Eth.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs index c8e664e4..72eee520 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs @@ -269,3 +269,8 @@ submitWork = remote "eth_submitWork" submitHashrate :: JsonRpc m => HexString -> HexString -> m Bool {-# INLINE submitHashrate #-} submitHashrate = remote "eth_submitHashrate" + +-- | Returns the chain ID of the current network. +chainId :: JsonRpc m => m Quantity +{-# INLINE chainId #-} +chainId = remote "eth_chainId" From 505698da6ef348f7a1f11a28b5a69cab2e4f404b Mon Sep 17 00:00:00 2001 From: jinchui-crypto Date: Thu, 27 Nov 2025 18:53:20 +1100 Subject: [PATCH 231/237] Implement EIP712Signature module (#145) --- packages/crypto/package.yaml | 2 + .../src/Crypto/Ethereum/Eip712Signature.hs | 395 ++++++++++++++++++ .../Ethereum/Test/EIP712SignatureSpec.hs | 220 ++++++++++ packages/crypto/web3-crypto.cabal | 9 +- 4 files changed, 625 insertions(+), 1 deletion(-) create mode 100644 packages/crypto/src/Crypto/Ethereum/Eip712Signature.hs create mode 100644 packages/crypto/tests/Crypto/Ethereum/Test/EIP712SignatureSpec.hs diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index 8901b5d2..1e958392 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -25,6 +25,8 @@ dependencies: - crypton >0.30 && <1.0 - bytestring >0.10 && <0.12 - memory-hexstring >=1.0 && <1.1 +- basement >=0.0.16 && < 0.1 +- scientific >=0.3.7 && < 0.4 ghc-options: - -funbox-strict-fields diff --git a/packages/crypto/src/Crypto/Ethereum/Eip712Signature.hs b/packages/crypto/src/Crypto/Ethereum/Eip712Signature.hs new file mode 100644 index 00000000..3a53808b --- /dev/null +++ b/packages/crypto/src/Crypto/Ethereum/Eip712Signature.hs @@ -0,0 +1,395 @@ +{-# LANGUAGE ImpredicativeTypes #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TypeApplications #-} + +-- | +-- Module : Crypto.Ethereum.Eip712Signature +-- Copyright : Jin Chui 2025 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me jinchui@pm.me +-- Stability : experimental +-- Portability : portable +-- +-- Ethereum EIP712 Singature implementation. +-- Spec https://eips.ethereum.org/EIPS/eip-712. +-- + +module Crypto.Ethereum.Eip712Signature + ( EIP712Name + , BitWidth (..) + , ByteWidth (..) + , HasWidth (..) + , EIP712FieldType (..) + , EIP712TypedData (..) + , EIP712Struct (..) + , EIP712Field (..) + , EIP712Types + , signTypedData + , signTypedData' + , hashStruct + , encodeType + , encodeData + , typedDataSignHash + ) +where + +import Basement.Types.Word256 (Word256(..)) +import Control.Monad (when) +import Crypto.Ecdsa.Signature (pack, sign) +import Crypto.Ethereum (PrivateKey, keccak256) +import Data.Aeson (Object, (.=)) +import qualified Data.Aeson as Aeson +import Data.Aeson.Key (fromText) +import qualified Data.Aeson.KeyMap as Aeson +import Data.Aeson.Types (object) +import Data.ByteArray (ByteArray, zero) +import qualified Data.ByteArray as BA +import Data.ByteArray.HexString (hexString) +import Data.ByteString (ByteString, toStrict) +import qualified Data.ByteString as BS +import Data.ByteString.Builder (toLazyByteString, word64BE) +import Data.Either (partitionEithers) +import Data.Foldable (toList) +import Data.List (find, intercalate) +import Data.Maybe (mapMaybe) +import Data.Scientific (Scientific, floatingOrInteger) +import Data.Set (Set) +import qualified Data.Set as Set +import Data.String (fromString) +import Data.Text (Text) +import qualified Data.Text as T +import Data.Text.Encoding (encodeUtf8) +import qualified Data.Text.Encoding as TE +import Data.Word (Word8) +import Numeric.Natural (Natural) + +type DefaultByteArray = ByteString + +-- Bit and Byte width constants, used for defining field types + +data BitWidth + = Si8 + | Si16 + | Si24 + | Si32 + | Si40 + | Si48 + | Si56 + | Si64 + | Si72 + | Si80 + | Si88 + | Si96 + | Si104 + | Si112 + | Si120 + | Si128 + | Si136 + | Si144 + | Si152 + | Si160 + | Si168 + | Si176 + | Si184 + | Si192 + | Si200 + | Si208 + | Si216 + | Si224 + | Si232 + | Si240 + | Si248 + | Si256 + deriving (Show, Eq, Bounded, Enum) + +data ByteWidth + = S1 + | S2 + | S3 + | S4 + | S5 + | S6 + | S7 + | S8 + | S9 + | S10 + | S11 + | S12 + | S13 + | S14 + | S15 + | S16 + | S17 + | S18 + | S19 + | S20 + | S21 + | S22 + | S23 + | S24 + | S25 + | S26 + | S27 + | S28 + | S29 + | S30 + | S31 + | S32 + deriving (Show, Eq, Bounded, Enum) + +class HasWidth a where + bytesOf :: a -> Int + +instance HasWidth ByteWidth where + bytesOf a = fromEnum a + 1 + +instance HasWidth BitWidth where + bytesOf a = fromEnum a + 1 + +bitsOf :: (HasWidth a) => a -> Int +bitsOf a = bytesOf a * 8 + +-- EIP712 Data structures + +type EIP712Name = Text + +data EIP712FieldType + = FieldTypeBytesN ByteWidth + | FieldTypeUInt BitWidth + | FieldTypeInt BitWidth + | FieldTypeBool + | FieldTypeAddress + | FieldTypeBytes + | FieldTypeString + | FieldTypeArrayN Natural EIP712FieldType + | FieldTypeArray EIP712FieldType + | FieldTypeStruct EIP712Name + deriving (Show, Eq) + +data EIP712Field = EIP712Field + { eip712FieldName :: EIP712Name + , eip712FieldType :: EIP712FieldType + } + deriving (Show, Eq) + +data EIP712Struct = EIP712Struct + { eip712StructName :: EIP712Name + , eip712StructFields :: [EIP712Field] + } + deriving (Show, Eq) + +type EIP712Types = [EIP712Struct] + +data EIP712TypedData + = EIP712TypedData + { typedDataTypes :: EIP712Types + , typedDataPrimaryType :: EIP712Name + , typedDataDomain :: Object + , typedDataMessage :: Object + } + deriving (Show) + +-- ToJSON serialization + +instance Aeson.ToJSON EIP712Field where + toJSON field = object ["name" .= eip712FieldName field, "type" .= TE.decodeUtf8 (encode $ eip712FieldType field)] + +instance Aeson.ToJSON EIP712TypedData where + toJSON typedData = + object + [ "types" + .= object + [ fromText (eip712StructName s) .= eip712StructFields s + | s <- typedDataTypes typedData + ] + , "primaryType" .= typedDataPrimaryType typedData + , "domain" .= typedDataDomain typedData + , "message" .= typedDataMessage typedData + ] + +-- Custom EIP712 encoding + +class EIP712Encoded a where + encode :: (ByteArray bout) => a -> bout + +instance EIP712Encoded EIP712FieldType where + encode = \case + FieldTypeBytesN sb -> utf8 "bytes" <> toByteArray (bytesOf sb) + FieldTypeUInt sb -> utf8 "uint" <> toByteArray (bitsOf sb) + FieldTypeInt sb -> utf8 "int" <> toByteArray (bitsOf sb) + FieldTypeBool -> utf8 "bool" + FieldTypeAddress -> utf8 "address" + FieldTypeBytes -> utf8 "bytes" + FieldTypeString -> utf8 "string" + FieldTypeArrayN n t -> encode t <> utf8 "[" <> toByteArray n <> utf8 "]" + FieldTypeArray t -> encode t <> utf8 "[]" + FieldTypeStruct name -> utf8 name + +instance EIP712Encoded EIP712Field where + encode EIP712Field{..} = encode eip712FieldType <> utf8 " " <> utf8 eip712FieldName + +-- | Encode a type according to the EIP712 specification (see Definition of `encodeType`) +encodeType :: (ByteArray bout) => EIP712Types -> EIP712Name -> Either String bout +encodeType types typeName = do + struct <- lookupType types typeName + refs <- referencedTypesEncoded struct + let base = encodeUtf8 typeName <> "(" <> fieldsEncoded struct <> ")" + pure $ BA.convert $ base <> refs + where + fieldsEncoded :: EIP712Struct -> BS.ByteString + fieldsEncoded = BS.intercalate "," . fmap encode . eip712StructFields + + referencedTypesEncoded :: EIP712Struct -> Either String ByteString + referencedTypesEncoded = + fmap (BS.concat . toList) + . traverse (encodeType types) + . Set.toList + . referencedTypesNames + + referencedTypesNames :: EIP712Struct -> Set EIP712Name + referencedTypesNames = Set.fromList . mapMaybe (maybeReferenceTypeName . eip712FieldType) . eip712StructFields + + maybeReferenceTypeName :: EIP712FieldType -> Maybe EIP712Name + maybeReferenceTypeName = \case + FieldTypeArray inner -> maybeReferenceTypeName inner + FieldTypeArrayN _ inner -> maybeReferenceTypeName inner + FieldTypeStruct name -> Just name + _ -> Nothing + +-- | Encode data according to the EIP712 specification (see Definition of `encodeData`) +encodeData :: (ByteArray bout) => EIP712Types -> EIP712Name -> Aeson.Object -> Either String bout +encodeData types typeName obj = do + encodedFields <- fieldsAndValues >>= mapM (uncurry encodeValue) + return $ BA.concat encodedFields + where + findValue :: Text -> Either String Aeson.Value + findValue fieldName = case Aeson.lookup (fromString $ T.unpack fieldName) obj of + Just v -> Right v + Nothing -> Left $ fromString $ T.unpack fieldName + + fieldsAndValues :: Either String [(EIP712FieldType, Aeson.Value)] + fieldsAndValues = do + fields <- eip712StructFields <$> lookupType types typeName + let valueOrFieldNameList = fmap (findValue . eip712FieldName) fields + let (missingFields, values) = partitionEithers valueOrFieldNameList + if (not . null) missingFields + then Left $ "missing fields" <> intercalate ", " missingFields + else Right $ zip (fmap eip712FieldType fields) values + + encodeValue :: EIP712FieldType -> Aeson.Value -> Either String BA.Bytes + encodeValue (FieldTypeBytesN s) v = do + encodedBytes <- extractString v >>= hexString . encodeUtf8 + when (BA.length encodedBytes /= bytesOf s) $ Left $ "expected " <> show (bytesOf s) <> "bytes, got " <> show (BA.length encodedBytes) + return $ BA.convert encodedBytes <> zero (32 - bytesOf s) + encodeValue (FieldTypeUInt _) v = do + value <- extractNumber v >>= scientificToWord256 + when (value < 0) $ Left $ "expected unsigned int, got negative value " <> show value + return $ encodeWord256 value + encodeValue (FieldTypeInt _) v = encodeWord256 <$> (extractNumber v >>= scientificToWord256) + encodeValue FieldTypeBool v = encodeWord256 . fromIntegral . fromEnum <$> extractBool v + encodeValue FieldTypeAddress v = do + valueAsHexString <- extractString v >>= hexString . encodeUtf8 + when (BA.length valueAsHexString /= 20) $ Left ("address not valid:" <> show v) + return $ BA.convert $ zero 12 <> valueAsHexString + encodeValue FieldTypeBytes v = do + valueAsHexString <- extractString v >>= hexString . encodeUtf8 + return $ keccak256 valueAsHexString + encodeValue FieldTypeString v = keccak256 . encodeUtf8 <$> extractString v + encodeValue (FieldTypeArrayN _ innerType) v = encodeArray innerType v + encodeValue (FieldTypeArray innerType) v = encodeArray innerType v + encodeValue (FieldTypeStruct innerTypeName) v = do + valueAsObject <- extractObject v + hashStruct types innerTypeName valueAsObject + + encodeArray innerType v = do + valueAsArray <- extractArray v + encodedValues <- traverse (encodeValue innerType) valueAsArray + return $ keccak256 $ BA.concat @BA.Bytes @BA.Bytes $ toList encodedValues + + encodeWord256 (Word256 a3 a2 a1 a0) = BA.convert $ toStrict $ toLazyByteString $ word64BE a3 <> word64BE a2 <> word64BE a1 <> word64BE a0 + + +-- | Compute a hash for the struct according to EIP712 (see Definition of `hashStruct`) +hashStruct :: (ByteArray bout) => EIP712Types -> EIP712Name -> Aeson.Object -> Either String bout +hashStruct types typeName obj = do + encodedData <- encodeData @DefaultByteArray types typeName obj + encodedType <- encodeType @DefaultByteArray types typeName + let typeHash = keccak256 encodedType + return $ keccak256 $ typeHash <> encodedData + +-- | Sign a EIP712 type data, returns encoded version of the signature +signTypedData :: (ByteArray rsv) => PrivateKey -> EIP712TypedData -> Either String rsv +signTypedData key typedData = pack <$> signTypedData' key typedData + +-- | Sign a EIP712 type data, returns (r, s, v) +signTypedData' :: PrivateKey -> EIP712TypedData -> Either String (Integer, Integer, Word8) +signTypedData' key typedData = sign @DefaultByteArray key <$> typedDataSignHash typedData + +-- | Returns the hash that needs to be signed by the private key +typedDataSignHash :: (ByteArray bout) => EIP712TypedData -> Either String bout +typedDataSignHash typedData = do + domainSeparator <- hashStruct (typedDataTypes typedData) "EIP712Domain" (typedDataDomain typedData) + hashStructMessage <- hashStruct (typedDataTypes typedData) (typedDataPrimaryType typedData) (typedDataMessage typedData) + return $ keccak256 @DefaultByteArray (BA.pack [0x19, 0x01] <> domainSeparator <> hashStructMessage) + +-------------------------------------------------------------------------------------------------------- +-- Utility functions for data manipulation +-------------------------------------------------------------------------------------------------------- + +lookupType :: EIP712Types -> EIP712Name -> Either String EIP712Struct +lookupType types typeName = + case find ((== typeName) . eip712StructName) types of + Just struct -> Right struct + Nothing -> + Left $ "EIP712 type not found: " <> show typeName + +describeJsonType :: Aeson.Value -> String +describeJsonType (Aeson.String _) = "string" +describeJsonType (Aeson.Number _) = "number" +describeJsonType (Aeson.Bool _) = "boolean" +describeJsonType (Aeson.Array _) = "array" +describeJsonType (Aeson.Object _) = "object" +describeJsonType Aeson.Null = "null" + +extractError :: String -> Aeson.Value -> Either String b +extractError expected v = Left $ "expected " <> expected <> ", got " <> describeJsonType v + +extractString :: Aeson.Value -> Either String Text +extractString (Aeson.String v) = Right v +extractString v = extractError "string" v + +extractNumber :: Aeson.Value -> Either String Scientific +extractNumber (Aeson.Number v) = Right v +extractNumber v = extractError "number" v + +extractBool :: Aeson.Value -> Either String Bool +extractBool (Aeson.Bool v) = Right v +extractBool v = extractError "bool" v + +extractArray :: Aeson.Value -> Either String Aeson.Array +extractArray (Aeson.Array v) = Right v +extractArray v = extractError "array" v + +extractObject :: Aeson.Value -> Either String Aeson.Object +extractObject (Aeson.Object v) = Right v +extractObject v = extractError "object" v + +scientificToWord256 :: Scientific -> Either String Word256 +scientificToWord256 n = case floatingOrInteger @Double n of + Right r -> Right $ fromInteger r + Left r -> Left $ "Number is not an integer: " <> show r + +-------------------------------------------------------------------------------------------------------- +-- Utility functions for encoding +-------------------------------------------------------------------------------------------------------- + +-- | Generic "to UTF8 bytes" helper +utf8 :: (BA.ByteArray b) => T.Text -> b +utf8 = BA.convert . TE.encodeUtf8 + +-- | Convert a Show-able value to UTF8 bytes +toByteArray :: (Show a, BA.ByteArray b) => a -> b +toByteArray = utf8 . T.pack . show diff --git a/packages/crypto/tests/Crypto/Ethereum/Test/EIP712SignatureSpec.hs b/packages/crypto/tests/Crypto/Ethereum/Test/EIP712SignatureSpec.hs new file mode 100644 index 00000000..cead1dc4 --- /dev/null +++ b/packages/crypto/tests/Crypto/Ethereum/Test/EIP712SignatureSpec.hs @@ -0,0 +1,220 @@ +{-# LANGUAGE ImpredicativeTypes #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeApplications #-} + +-- | +-- Module : Crypto.Ethereum.Test.EIP712SignatureSpec +-- Copyright : Jin Chui 2025 +-- License : Apache-2.0 +-- +-- Maintainer : mail@akru.me jinchui@pm.me +-- Stability : experimental +-- Portability : unportable +-- + +module Crypto.Ethereum.Test.EIP712SignatureSpec (spec) where + +import Crypto.Ethereum.Eip712Signature +import Crypto.Ethereum.Utils (keccak256) +import Data.Aeson (toJSON) +import qualified Data.Aeson as Aeson +import qualified Data.Aeson.KeyMap as Aeson +import qualified Data.ByteArray.Encoding as BAE +import Data.ByteString (ByteString) +import Data.Either (fromRight) +import Test.Hspec + +encodeTypeConcrete :: EIP712Types -> EIP712Name -> Either String ByteString +encodeTypeConcrete = encodeType + +keccak256Concrete :: ByteString -> ByteString +keccak256Concrete = keccak256 + +hexEncode :: ByteString -> ByteString +hexEncode = BAE.convertToBase BAE.Base16 + +encodeDataConcrete :: EIP712Types -> EIP712Name -> Aeson.Object -> Either String ByteString +encodeDataConcrete = encodeData + +hashStructConcrete :: EIP712Types -> EIP712Name -> Aeson.Object -> Either String ByteString +hashStructConcrete = hashStruct + +mailTypes :: EIP712Types +mailTypes = + [ EIP712Struct + { eip712StructName = "Mail" + , eip712StructFields = + [ EIP712Field "from" (FieldTypeStruct "Person") + , EIP712Field "to" (FieldTypeStruct "Person") + , EIP712Field "contents" FieldTypeString + ] + } + , EIP712Struct + { eip712StructName = "Person" + , eip712StructFields = + [ EIP712Field "name" FieldTypeString + , EIP712Field "wallet" FieldTypeAddress + ] + } + , EIP712Struct + { eip712StructName = "EIP712Domain" + , eip712StructFields = + [ EIP712Field "name" FieldTypeString + , EIP712Field "version" FieldTypeString + , EIP712Field "chainId" (FieldTypeUInt Si256) + , EIP712Field "verifyingContract" FieldTypeAddress + ] + } + ] + +nestedArrayTypes :: EIP712Types +nestedArrayTypes = + [ EIP712Struct + { eip712StructName = "foo" + , eip712StructFields = + [ EIP712Field "a" (FieldTypeArray (FieldTypeArray (FieldTypeUInt Si256))) + , EIP712Field "b" FieldTypeString + ] + } + ] + +safeTxType :: EIP712Struct +safeTxType = + EIP712Struct + { eip712StructName = "SafeTx" + , eip712StructFields = + [ EIP712Field "to" FieldTypeAddress + , EIP712Field "value" (FieldTypeUInt Si256) + , EIP712Field "data" FieldTypeBytes + , EIP712Field "operation" (FieldTypeUInt Si8) + , EIP712Field "safeTxGas" (FieldTypeUInt Si256) + , EIP712Field "baseGas" (FieldTypeUInt Si256) + , EIP712Field "gasPrice" (FieldTypeUInt Si256) + , EIP712Field "gasToken" FieldTypeAddress + , EIP712Field "refundReceiver" FieldTypeAddress + , EIP712Field "nonce" (FieldTypeUInt Si256) + ] + } + +expectedEncodedSafeTxType :: ByteString +expectedEncodedSafeTxType = "SafeTx(\ + \address to,\ + \uint256 value,\ + \bytes data,\ + \uint8 operation,\ + \uint256 safeTxGas,\ + \uint256 baseGas,\ + \uint256 gasPrice,\ + \address gasToken,\ + \address refundReceiver,\ + \uint256 nonce)" + +safeDomainType :: EIP712Struct +safeDomainType = + EIP712Struct + { eip712StructName = "EIP712Domain" + , eip712StructFields = + [ EIP712Field "chainId" (FieldTypeUInt Si256) + , EIP712Field "verifyingContract" FieldTypeAddress + ] + } + +safeDomain :: Aeson.KeyMap Aeson.Value +safeDomain = + Aeson.fromList + [("chainId", toJSON @Int 8453), ("verifyingContract", toJSON @String "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826")] + +expectedEncodedSafeDomain :: ByteString +expectedEncodedSafeDomain = "0000000000000000000000000000000000000000000000000000000000002105\ + \000000000000000000000000cd2a3d9f938e13cd947ec05abc7fe734df8dd826" + +safeMessage :: Aeson.KeyMap Aeson.Value +safeMessage = + Aeson.fromList + [ ("to",toJSON @String "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ) + , ("value", toJSON @Integer 0 ) + , ("data", toJSON @String "0x0b89085a01a3b67d2231c6a136f9c8eea75d7d479a83a127356f8540ee15af010c22b846886e98aeffc1f1166d4b3586") + , ("operation", toJSON @Integer 0) + , ("safeTxGas", toJSON @Integer 0) + , ("baseGas", toJSON @Integer 0) + , ("gasPrice", toJSON @Integer 0) + , ("gasToken", toJSON @String "0x0000000000000000000000000000000000000000") + , ("refundReceiver", toJSON @String "0x0000000000000000000000000000000000000000") + , ("nonce", toJSON (37 :: Integer)) + ] + +expectedEncodedSafeMessage :: ByteString +expectedEncodedSafeMessage = "000000000000000000000000aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ + \0000000000000000000000000000000000000000000000000000000000000000\ + \059c15417e7e213ad30596d872d2e906e4feafd54fa0c9ac864b421ab1ba5adb\ + \0000000000000000000000000000000000000000000000000000000000000000\ + \0000000000000000000000000000000000000000000000000000000000000000\ + \0000000000000000000000000000000000000000000000000000000000000000\ + \0000000000000000000000000000000000000000000000000000000000000000\ + \0000000000000000000000000000000000000000000000000000000000000000\ + \0000000000000000000000000000000000000000000000000000000000000000\ + \0000000000000000000000000000000000000000000000000000000000000025" + +safeTxTypedData :: EIP712TypedData +safeTxTypedData = EIP712TypedData + { typedDataTypes = [safeTxType, safeDomainType] + , typedDataPrimaryType = "SafeTx" + , typedDataDomain = safeDomain + , typedDataMessage = safeMessage + } + + +spec :: Spec +spec = do + describe "encodeType" $ do + it "simple types should be encoding properly" $ do + let eip712structs = mailTypes + encodeTypeConcrete eip712structs "Person" `shouldBe` Right "Person(string name,address wallet)" + encodeTypeConcrete eip712structs "Mail" + `shouldBe` Right "Mail(Person from,Person to,string contents)Person(string name,address wallet)" + encodeTypeConcrete eip712structs "EIP712Domain" + `shouldBe` Right "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" + it "should work for Safe transactions" $ do + + encodeTypeConcrete [safeDomainType] "EIP712Domain" `shouldBe` Right "EIP712Domain(uint256 chainId,address verifyingContract)" + hexEncode . keccak256Concrete <$> encodeTypeConcrete [safeDomainType] "EIP712Domain" + `shouldBe` Right "47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218" + hexEncode <$> hashStruct [safeDomainType] "EIP712Domain" safeDomain + `shouldBe` Right "b3a3e869527602e68d877d9edcc629823648c73a3b10ee1e23cf4ab81b599cf5" + + it "should work for safe transaction" $ encodeTypeConcrete [safeTxType] "SafeTx" + `shouldBe` Right expectedEncodedSafeTxType + + describe "encodeData" $ do + it "should encode simple data" $ do + let eip712structs = mailTypes + let typeName = "Person" + let message = + Aeson.fromList + [("name", toJSON ("Cow" :: String)), ("wallet", toJSON ("0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826" :: String))] + let encodedDataOrError = encodeDataConcrete eip712structs typeName message + let expectedEncodedData = "8c1d2bd5348394761719da11ec67eedae9502d137e8940fee8ecd6f641ee1648\ + \000000000000000000000000cd2a3d9f938e13cd947ec05abc7fe734df8dd826" + hexEncode <$> encodedDataOrError `shouldBe` Right expectedEncodedData + hashStructConcrete eip712structs "Person" message + `shouldBe` Right (keccak256Concrete $ keccak256Concrete "Person(string name,address wallet)" <> fromRight undefined encodedDataOrError) + + it "should encode nested arrays" $ do + let message = + Aeson.fromList + [ ("a", toJSON [[35 :: Int, 36], [37]]) + , ("b", toJSON ("hello" :: String)) + ] + encodeTypeConcrete nestedArrayTypes "foo" `shouldBe` Right "foo(uint256[][] a,string b)" + let expectedDataEncoded = "fa5ffe3a0504d850bc7c9eeda1cf960b596b73f4dc0272a6fa89dace08e32029\ + \1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8" + hexEncode <$> encodeDataConcrete nestedArrayTypes "foo" message `shouldBe` Right expectedDataEncoded + it "should encode Safe domain" $ + (hexEncode <$> encodeDataConcrete [safeDomainType] "EIP712Domain" safeDomain) `shouldBe` Right expectedEncodedSafeDomain + + it "should encode Safe transaction" $ + (hexEncode <$> encodeDataConcrete [safeTxType] "SafeTx" safeMessage) `shouldBe` Right expectedEncodedSafeMessage + + + describe "typedDataSignHash" $ it "encode properly a safe transaction" $ do + hexEncode <$> typedDataSignHash safeTxTypedData `shouldBe` Right "cd3b59061dd8a7060486fb14e75e2f066a19a6e93f6888dbf83c77fbfeb8874b" diff --git a/packages/crypto/web3-crypto.cabal b/packages/crypto/web3-crypto.cabal index 3262e9d4..81f1e608 100644 --- a/packages/crypto/web3-crypto.cabal +++ b/packages/crypto/web3-crypto.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.38.1. -- -- see: https://github.com/sol/hpack @@ -31,6 +31,7 @@ library Crypto.Ecdsa.Signature Crypto.Ecdsa.Utils Crypto.Ethereum + Crypto.Ethereum.Eip712Signature Crypto.Ethereum.Keyfile Crypto.Ethereum.Signature Crypto.Ethereum.Utils @@ -49,11 +50,13 @@ library build-depends: aeson >1.2 && <2.2 , base >4.11 && <4.19 + , basement >=0.0.16 && <0.1 , bytestring >0.10 && <0.12 , containers >0.6 && <0.7 , crypton >0.30 && <1.0 , memory >0.14 && <0.19 , memory-hexstring ==1.0.* + , scientific >=0.3.7 && <0.4 , text >1.2 && <2.1 , uuid-types >1.0 && <1.1 , vector >0.12 && <0.14 @@ -63,6 +66,7 @@ test-suite tests type: exitcode-stdio-1.0 main-is: Spec.hs other-modules: + Crypto.Ethereum.Test.EIP712SignatureSpec Crypto.Ethereum.Test.KeyfileSpec Crypto.Ethereum.Test.SignatureSpec Crypto.Random.Test.HmacDrbgSpec @@ -72,6 +76,7 @@ test-suite tests Crypto.Ecdsa.Signature Crypto.Ecdsa.Utils Crypto.Ethereum + Crypto.Ethereum.Eip712Signature Crypto.Ethereum.Keyfile Crypto.Ethereum.Signature Crypto.Ethereum.Utils @@ -90,6 +95,7 @@ test-suite tests build-depends: aeson >1.2 && <2.2 , base >4.11 && <4.19 + , basement >=0.0.16 && <0.1 , bytestring >0.10 && <0.12 , containers >0.6 && <0.7 , crypton >0.30 && <1.0 @@ -99,6 +105,7 @@ test-suite tests , hspec-expectations >=0.8.2 && <0.9 , memory >0.14 && <0.19 , memory-hexstring ==1.0.* + , scientific >=0.3.7 && <0.4 , text >1.2 && <2.1 , uuid-types >1.0 && <1.1 , vector >0.12 && <0.14 From 3f345f4037c58abd9436fe1a89e43e5eb826de73 Mon Sep 17 00:00:00 2001 From: jinchui-crypto Date: Thu, 18 Dec 2025 12:08:39 +1100 Subject: [PATCH 232/237] Fix build problems and CI workflow (#151) --- .github/workflows/ci.yml | 4 ++-- packages/ethereum/src/Network/Ethereum/Api/Eth.hs | 1 + packages/ethereum/src/Network/Ethereum/Api/Types.hs | 2 +- stack.yaml | 5 +++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e1d2d98..bac5503f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,13 +20,13 @@ jobs: - uses: actions/checkout@v2 - name: Setup latest stack - uses: haskell/actions/setup@v2 + uses: haskell-actions/setup@v2 with: enable-stack: true stack-version: 'latest' - name: Cache .stack-root - uses: actions/cache@v1 + uses: actions/cache@v4 env: cache-name: stack-root with: diff --git a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs index 72eee520..7806e2aa 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Eth.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Eth.hs @@ -24,6 +24,7 @@ import Network.Ethereum.Api.Types , Call , Change , DefaultBlock + , FeeHistory , Filter , Quantity , SyncingState diff --git a/packages/ethereum/src/Network/Ethereum/Api/Types.hs b/packages/ethereum/src/Network/Ethereum/Api/Types.hs index 66599448..08133cb0 100644 --- a/packages/ethereum/src/Network/Ethereum/Api/Types.hs +++ b/packages/ethereum/src/Network/Ethereum/Api/Types.hs @@ -351,7 +351,7 @@ data BlockT tx = Block $(deriveJSON (defaultOptions { fieldLabelModifier = over _head toLower . drop 5 }) ''BlockT) ---| Fee History information +-- | Fee History information data FeeHistory = FeeHistory { feeHistoryBaseFeePerBlobGas :: [Quantity] diff --git a/stack.yaml b/stack.yaml index bc526581..00ce4338 100644 --- a/stack.yaml +++ b/stack.yaml @@ -29,3 +29,8 @@ nix: - haskellPackages.stylish-haskell - haskellPackages.hlint - zlib + +flags: + # bitvec C FFI causes unkown symbol error in windows build, disabling it + bitvec: + simd: false \ No newline at end of file From 92b361e39512b97ca95509e2a56379ca1da9b12d Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Feb 2026 09:28:20 +0300 Subject: [PATCH 233/237] Bump deps to LTS-24 --- README.md | 6 +- examples/erc20/example-erc20.cabal | 38 ++ examples/polkadot/example-polkadot.cabal | 36 ++ examples/scale/example-scale.cabal | 37 ++ packages/bignum/package.yaml | 10 +- packages/bignum/web3-bignum.cabal | 16 +- packages/crypto/package.yaml | 16 +- packages/crypto/web3-crypto.cabal | 32 +- packages/ethereum/package.yaml | 22 +- packages/ethereum/web3-ethereum.cabal | 44 +- packages/hexstring/memory-hexstring.cabal | 16 +- packages/hexstring/package.yaml | 14 +- packages/jsonrpc/jsonrpc-tinyclient.cabal | 14 +- packages/jsonrpc/package.yaml | 12 +- packages/polkadot/package.yaml | 24 +- packages/polkadot/web3-polkadot.cabal | 48 +- packages/provider/package.yaml | 14 +- packages/provider/web3-provider.cabal | 16 +- packages/scale/package.yaml | 13 +- packages/scale/scale.cabal | 24 +- packages/solidity/package.yaml | 18 +- packages/solidity/web3-solidity.cabal | 36 +- packages/web3/package.yaml | 10 +- packages/web3/web3.cabal | 12 +- stack.yaml | 4 +- web3.cabal | 600 ++++++++++++++++++++++ 26 files changed, 920 insertions(+), 212 deletions(-) create mode 100644 examples/erc20/example-erc20.cabal create mode 100644 examples/polkadot/example-polkadot.cabal create mode 100644 examples/scale/example-scale.cabal create mode 100644 web3.cabal diff --git a/README.md b/README.md index 28baa2df..7c6b7fa5 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,7 @@ This library implements Haskell API client for popular Web3 platforms. [![Documentation Status](https://readthedocs.org/projects/hs-web3/badge/?version=latest)](https://hs-web3.readthedocs.io/en/latest/?badge=latest) [![CI](https://github.com/airalab/hs-web3/workflows/CI/badge.svg)](https://github.com/airalab/hs-web3/actions) [![Hackage](https://img.shields.io/hackage/v/web3.svg)](http://hackage.haskell.org/package/web3) -[![LTS-22](http://stackage.org/package/web3/badge/lts-22)](http://stackage.org/lts-22/package/web3) -[![nightly](http://stackage.org/package/web3/badge/nightly)](http://stackage.org/nightly/package/web3) +[![Stackage](http://stackage.org/package/web3/badge/lts-24)](http://stackage.org/lts-24/package/web3) [![Code Triagers](https://www.codetriage.com/airalab/hs-web3/badges/users.svg)](https://www.codetriage.com/airalab/hs-web3) Install @@ -82,5 +81,4 @@ Read more in the [documentation on ReadTheDocs](https://hs-web3.readthedocs.io). License ------- -* `Network.Polkadot` and `Codec.Scale` is licensed under [Apache 2.0](https://github.com/airalab/hs-web3/blob/master/LICENSE-APACHE2) -* All other source is licensed under [BSD-3-Clause](https://github.com/airalab/hs-web3/blob/master/LICENSE-BSD3) +* Licensed under [Apache 2.0](https://github.com/airalab/hs-web3/blob/master/LICENSE-APACHE2) diff --git a/examples/erc20/example-erc20.cabal b/examples/erc20/example-erc20.cabal new file mode 100644 index 00000000..f5b7cd27 --- /dev/null +++ b/examples/erc20/example-erc20.cabal @@ -0,0 +1,38 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.37.0. +-- +-- see: https://github.com/sol/hpack + +name: example-erc20 +version: 0.0.0.0 +synopsis: ERC20 token example. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +executable example-erc20 + main-is: Main.hs + other-modules: + ERC20 + Paths_example_erc20 + hs-source-dirs: + ./ + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + base + , data-default + , microlens + , text + , web3 + , web3-ethereum + default-language: Haskell2010 diff --git a/examples/polkadot/example-polkadot.cabal b/examples/polkadot/example-polkadot.cabal new file mode 100644 index 00000000..330010d2 --- /dev/null +++ b/examples/polkadot/example-polkadot.cabal @@ -0,0 +1,36 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.37.0. +-- +-- see: https://github.com/sol/hpack +-- +-- hash: b81d48727b0e6109f04bc46ca049cfcc79d6ab939bdb985c2f325f239afaaa4e + +name: example-polkadot +version: 0.0.0.0 +synopsis: Polkadot API example. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +executable example-polkadot + main-is: Main.hs + other-modules: + Paths_example_polkadot + hs-source-dirs: + ./ + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + base + , web3-polkadot + , web3-provider + default-language: Haskell2010 diff --git a/examples/scale/example-scale.cabal b/examples/scale/example-scale.cabal new file mode 100644 index 00000000..d01e133c --- /dev/null +++ b/examples/scale/example-scale.cabal @@ -0,0 +1,37 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.37.0. +-- +-- see: https://github.com/sol/hpack +-- +-- hash: 238f42572bfe1561436246f28217f679a1f9c3de71d296734e8ba3f056e71681 + +name: example-scale +version: 0.0.0.0 +synopsis: SCALE codec example. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Aleksandr Krupenkin +maintainer: mail@akru.me +copyright: (c) Aleksandr Krupenkin 2016-2021 +license: Apache-2.0 +build-type: Simple + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +executable example-scale + main-is: Main.hs + other-modules: + Paths_example_scale + hs-source-dirs: + ./ + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + base + , generics-sop + , memory-hexstring + , scale + default-language: Haskell2010 diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index 89a0732e..1c1374bd 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -1,5 +1,5 @@ name: web3-bignum -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Fixed size big integers for Haskell Web3 library. description: This package implements codec instances and other helper functions. github: "airalab/hs-web3" @@ -11,10 +11,10 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.19 -- scale >=1.0 && <1.1 +- base >4.11 && <4.21 +- scale >=1.0 && <1.2 - memory >0.14 && <0.19 -- memory-hexstring >=1.0 && <1.1 +- memory-hexstring >=1.0 && <1.2 - cereal >0.5 && <0.6 - wide-word >0.1 && <0.2 @@ -52,7 +52,7 @@ tests: - tests - src dependencies: - - memory-hexstring >=1.0 && <1.1 + - memory-hexstring >=1.0 && <1.2 - hspec-expectations >=0.8.2 && <0.9 - hspec-discover >=2.4.4 && <2.12 - hspec-contrib >=0.4.0 && <0.6 diff --git a/packages/bignum/web3-bignum.cabal b/packages/bignum/web3-bignum.cabal index 0962f138..53b79121 100644 --- a/packages/bignum/web3-bignum.cabal +++ b/packages/bignum/web3-bignum.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: web3-bignum -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Fixed size big integers for Haskell Web3 library. description: This package implements codec instances and other helper functions. category: Network @@ -31,11 +31,11 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.19 + base >4.11 && <4.21 , cereal >0.5 && <0.6 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* - , scale ==1.0.* + , memory-hexstring >=1.0 && <1.2 + , scale >=1.0 && <1.2 , wide-word >0.1 && <0.2 default-language: Haskell2010 @@ -51,14 +51,14 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.19 + base >4.11 && <4.21 , cereal >0.5 && <0.6 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* - , scale ==1.0.* + , memory-hexstring >=1.0 && <1.2 + , scale >=1.0 && <1.2 , wide-word >0.1 && <0.2 default-language: Haskell2010 diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index 1e958392..f77fc7f2 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -1,5 +1,5 @@ name: web3-crypto -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Cryptograhical primitives for Haskell Web3 library. description: This package implements Web3 specific cryptography and helper functions. github: "airalab/hs-web3" @@ -15,16 +15,16 @@ extra-source-files: - src/cbits/xxhash.c dependencies: -- base >4.11 && <4.19 -- text >1.2 && <2.1 -- aeson >1.2 && <2.2 +- base >4.11 && <4.21 +- text >1.2 && <2.2 +- aeson >1.2 && <2.3 - memory >0.14 && <0.19 - vector >0.12 && <0.14 -- containers >0.6 && <0.7 +- containers >0.6 && <0.8 - uuid-types >1.0 && <1.1 -- crypton >0.30 && <1.0 -- bytestring >0.10 && <0.12 -- memory-hexstring >=1.0 && <1.1 +- crypton >0.30 && <1.1 +- bytestring >0.10 && <0.13 +- memory-hexstring >=1.0 && <1.2 - basement >=0.0.16 && < 0.1 - scientific >=0.3.7 && < 0.4 diff --git a/packages/crypto/web3-crypto.cabal b/packages/crypto/web3-crypto.cabal index 81f1e608..5fcf55e0 100644 --- a/packages/crypto/web3-crypto.cabal +++ b/packages/crypto/web3-crypto.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.38.1. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: web3-crypto -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Cryptograhical primitives for Haskell Web3 library. description: This package implements Web3 specific cryptography and helper functions. category: Network @@ -48,16 +48,16 @@ library c-sources: src/cbits/xxhash.c build-depends: - aeson >1.2 && <2.2 - , base >4.11 && <4.19 + aeson >1.2 && <2.3 + , base >4.11 && <4.21 , basement >=0.0.16 && <0.1 - , bytestring >0.10 && <0.12 - , containers >0.6 && <0.7 - , crypton >0.30 && <1.0 + , bytestring >0.10 && <0.13 + , containers >0.6 && <0.8 + , crypton >0.30 && <1.1 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* + , memory-hexstring >=1.0 && <1.2 , scientific >=0.3.7 && <0.4 - , text >1.2 && <2.1 + , text >1.2 && <2.2 , uuid-types >1.0 && <1.1 , vector >0.12 && <0.14 default-language: Haskell2010 @@ -93,20 +93,20 @@ test-suite tests c-sources: src/cbits/xxhash.c build-depends: - aeson >1.2 && <2.2 - , base >4.11 && <4.19 + aeson >1.2 && <2.3 + , base >4.11 && <4.21 , basement >=0.0.16 && <0.1 - , bytestring >0.10 && <0.12 - , containers >0.6 && <0.7 - , crypton >0.30 && <1.0 + , bytestring >0.10 && <0.13 + , containers >0.6 && <0.8 + , crypton >0.30 && <1.1 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* + , memory-hexstring >=1.0 && <1.2 , scientific >=0.3.7 && <0.4 - , text >1.2 && <2.1 + , text >1.2 && <2.2 , uuid-types >1.0 && <1.1 , vector >0.12 && <0.14 default-language: Haskell2010 diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index c040be9c..c64bfb45 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -1,5 +1,5 @@ name: web3-ethereum -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Ethereum support for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -11,10 +11,10 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.19 -- text >1.2 && <2.1 +- base >4.11 && <4.21 +- text >1.2 && <2.2 - vinyl >0.5 && <0.15 -- aeson >1.2 && <2.2 +- aeson >1.2 && <2.3 - aeson-casing >=0.2 && <0.3 - tagged >0.8 && <0.9 - memory >0.14 && <0.19 @@ -22,18 +22,18 @@ dependencies: - OneTuple >0.2 && <0.5 - machines >0.6 && <0.8 - microlens >0.4 && <0.5 -- bytestring >0.10 && <0.12 +- bytestring >0.10 && <0.13 - exceptions >0.8 && <0.11 - generics-sop >0.3 && <0.6 -- data-default >0.7 && <0.8 +- data-default >0.7 && <0.9 - transformers >0.5 && <0.7 - microlens-aeson >2.2 && <2.6 -- template-haskell >2.11 && <2.21 +- template-haskell >2.11 && <2.23 - mtl >2.2 && <2.4 -- web3-crypto >=1.0 && <1.1 -- web3-solidity >=1.0 && <1.1 -- memory-hexstring >=1.0 && <1.1 -- jsonrpc-tinyclient >=1.0 && <1.1 +- web3-crypto >=1.0 && <1.2 +- web3-solidity >=1.0 && <1.2 +- memory-hexstring >=1.0 && <1.2 +- jsonrpc-tinyclient >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/ethereum/web3-ethereum.cabal b/packages/ethereum/web3-ethereum.cabal index 52837061..aa201168 100644 --- a/packages/ethereum/web3-ethereum.cabal +++ b/packages/ethereum/web3-ethereum.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: web3-ethereum -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Ethereum support for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -57,28 +57,28 @@ library ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: OneTuple >0.2 && <0.5 - , aeson >1.2 && <2.2 + , aeson >1.2 && <2.3 , aeson-casing ==0.2.* - , base >4.11 && <4.19 - , bytestring >0.10 && <0.12 - , data-default >0.7 && <0.8 + , base >4.11 && <4.21 + , bytestring >0.10 && <0.13 + , data-default >0.7 && <0.9 , exceptions >0.8 && <0.11 , generics-sop >0.3 && <0.6 - , jsonrpc-tinyclient ==1.0.* + , jsonrpc-tinyclient >=1.0 && <1.2 , machines >0.6 && <0.8 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* + , memory-hexstring >=1.0 && <1.2 , microlens >0.4 && <0.5 , microlens-aeson >2.2 && <2.6 , mtl >2.2 && <2.4 , relapse >=1.0 && <2.0 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.21 - , text >1.2 && <2.1 + , template-haskell >2.11 && <2.23 + , text >1.2 && <2.2 , transformers >0.5 && <0.7 , vinyl >0.5 && <0.15 - , web3-crypto ==1.0.* - , web3-solidity ==1.0.* + , web3-crypto >=1.0 && <1.2 + , web3-solidity >=1.0 && <1.2 default-language: Haskell2010 test-suite tests @@ -122,30 +122,30 @@ test-suite tests ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: OneTuple >0.2 && <0.5 - , aeson >1.2 && <2.2 + , aeson >1.2 && <2.3 , aeson-casing ==0.2.* - , base >4.11 && <4.19 - , bytestring >0.10 && <0.12 - , data-default >0.7 && <0.8 + , base >4.11 && <4.21 + , bytestring >0.10 && <0.13 + , data-default >0.7 && <0.9 , exceptions >0.8 && <0.11 , generics-sop >0.3 && <0.6 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 - , jsonrpc-tinyclient ==1.0.* + , jsonrpc-tinyclient >=1.0 && <1.2 , machines >0.6 && <0.8 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* + , memory-hexstring >=1.0 && <1.2 , microlens >0.4 && <0.5 , microlens-aeson >2.2 && <2.6 , mtl >2.2 && <2.4 , relapse >=1.0 && <2.0 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.21 - , text >1.2 && <2.1 + , template-haskell >2.11 && <2.23 + , text >1.2 && <2.2 , transformers >0.5 && <0.7 , vinyl >0.5 && <0.15 - , web3-crypto ==1.0.* - , web3-solidity ==1.0.* + , web3-crypto >=1.0 && <1.2 + , web3-solidity >=1.0 && <1.2 default-language: Haskell2010 diff --git a/packages/hexstring/memory-hexstring.cabal b/packages/hexstring/memory-hexstring.cabal index e2e338c7..6b5ee2fe 100644 --- a/packages/hexstring/memory-hexstring.cabal +++ b/packages/hexstring/memory-hexstring.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: memory-hexstring -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Hex-string type for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -34,11 +34,11 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <2.2 - , base >4.11 && <4.19 - , bytestring >0.10 && <0.12 + aeson >1.2 && <2.3 + , base >4.11 && <4.21 + , bytestring >0.10 && <0.13 , memory >0.14 && <0.19 - , scale ==1.0.* - , template-haskell >2.11 && <2.21 - , text >1.2 && <2.1 + , scale >=1.0 && <1.2 + , template-haskell >2.11 && <2.23 + , text >1.2 && <2.2 default-language: Haskell2010 diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index 94cd963e..8fd6941a 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -1,5 +1,5 @@ name: memory-hexstring -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Hex-string type for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -11,13 +11,13 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.19 -- text >1.2 && <2.1 -- aeson >1.2 && <2.2 +- base >4.11 && <4.21 +- text >1.2 && <2.2 +- aeson >1.2 && <2.3 - memory >0.14 && <0.19 -- bytestring >0.10 && <0.12 -- template-haskell >2.11 && <2.21 -- scale >=1.0 && <1.1 +- bytestring >0.10 && <0.13 +- template-haskell >2.11 && <2.23 +- scale >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/jsonrpc/jsonrpc-tinyclient.cabal b/packages/jsonrpc/jsonrpc-tinyclient.cabal index 43867b24..2dc729b9 100644 --- a/packages/jsonrpc/jsonrpc-tinyclient.cabal +++ b/packages/jsonrpc/jsonrpc-tinyclient.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: jsonrpc-tinyclient -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Tiny JSON-RPC client for Haskell Web3 library. description: Minimalistic JSON-RPC client, inspired by haxr library. category: Network @@ -31,14 +31,14 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <2.2 - , base >4.11 && <4.19 - , bytestring >0.10 && <0.12 + aeson >1.2 && <2.3 + , base >4.11 && <4.21 + , bytestring >0.10 && <0.13 , exceptions >0.8 && <0.11 , http-client >0.5 && <0.8 , http-client-tls >0.3 && <0.4 , mtl >2.2 && <2.4 , random >1.0 && <1.3 - , text >1.2 && <2.1 - , websockets >0.10 && <0.13 + , text >1.2 && <2.2 + , websockets >0.10 && <0.14 default-language: Haskell2010 diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index e9ea4fdd..d6ce7354 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -1,5 +1,5 @@ name: jsonrpc-tinyclient -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Tiny JSON-RPC client for Haskell Web3 library. description: Minimalistic JSON-RPC client, inspired by haxr library. github: "airalab/hs-web3" @@ -11,13 +11,13 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.19 -- text >1.2 && <2.1 -- aeson >1.2 && <2.2 +- base >4.11 && <4.21 +- text >1.2 && <2.2 +- aeson >1.2 && <2.3 - random >1.0 && <1.3 -- bytestring >0.10 && <0.12 +- bytestring >0.10 && <0.13 - exceptions >0.8 && <0.11 -- websockets >0.10 && <0.13 +- websockets >0.10 && <0.14 - http-client >0.5 && <0.8 - http-client-tls >0.3 && <0.4 - mtl >2.2 && <2.4 diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 9c615eb1..2adc22b6 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -1,5 +1,5 @@ name: web3-polkadot -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Polkadot support for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -12,25 +12,25 @@ category: Network dependencies: - mtl >2.2 && <2.4 -- base >4.11 && <4.19 -- text >1.2 && <2.1 -- aeson >1.2 && <2.2 -- scale >=1.0 && <1.1 +- base >4.11 && <4.21 +- text >1.2 && <2.2 +- aeson >1.2 && <2.3 +- scale >=1.0 && <1.2 - parsec >3.0 && <3.2 - memory >0.14 && <0.19 - microlens >0.4 && <0.5 -- containers >0.6 && <0.7 -- crypton >0.30 && <1.0 -- bytestring >0.10 && <0.12 +- containers >0.6 && <0.8 +- crypton >0.30 && <1.1 +- bytestring >0.10 && <0.13 - base58-bytestring >=0.1 && <0.2 - cases >0.1 && <0.2 - generics-sop >0.3 && <0.6 - microlens-th >0.4 && <0.5 - microlens-mtl >0.2 && <0.3 -- web3-crypto >=1.0 && <1.1 -- web3-bignum >=1.0 && <1.1 -- jsonrpc-tinyclient >=1.0 && <1.1 -- memory-hexstring >=1.0 && <1.1 +- web3-crypto >=1.0 && <1.2 +- web3-bignum >=1.0 && <1.2 +- jsonrpc-tinyclient >=1.0 && <1.2 +- memory-hexstring >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/polkadot/web3-polkadot.cabal b/packages/polkadot/web3-polkadot.cabal index 6c69cd3e..ee1e101e 100644 --- a/packages/polkadot/web3-polkadot.cabal +++ b/packages/polkadot/web3-polkadot.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: web3-polkadot -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Polkadot support for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -71,26 +71,26 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <2.2 - , base >4.11 && <4.19 + aeson >1.2 && <2.3 + , base >4.11 && <4.21 , base58-bytestring ==0.1.* - , bytestring >0.10 && <0.12 + , bytestring >0.10 && <0.13 , cases >0.1 && <0.2 - , containers >0.6 && <0.7 - , crypton >0.30 && <1.0 + , containers >0.6 && <0.8 + , crypton >0.30 && <1.1 , generics-sop >0.3 && <0.6 - , jsonrpc-tinyclient ==1.0.* + , jsonrpc-tinyclient >=1.0 && <1.2 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* + , memory-hexstring >=1.0 && <1.2 , microlens >0.4 && <0.5 , microlens-mtl >0.2 && <0.3 , microlens-th >0.4 && <0.5 , mtl >2.2 && <2.4 , parsec >3.0 && <3.2 - , scale ==1.0.* - , text >1.2 && <2.1 - , web3-bignum ==1.0.* - , web3-crypto ==1.0.* + , scale >=1.0 && <1.2 + , text >1.2 && <2.2 + , web3-bignum >=1.0 && <1.2 + , web3-crypto >=1.0 && <1.2 default-language: Haskell2010 test-suite tests @@ -148,29 +148,29 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - aeson >1.2 && <2.2 - , base >4.11 && <4.19 + aeson >1.2 && <2.3 + , base >4.11 && <4.21 , base58-bytestring ==0.1.* - , bytestring >0.10 && <0.12 + , bytestring >0.10 && <0.13 , cases >0.1 && <0.2 - , containers >0.6 && <0.7 - , crypton >0.30 && <1.0 + , containers >0.6 && <0.8 + , crypton >0.30 && <1.1 , generics-sop >0.3 && <0.6 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , hspec-expectations-json >=1.0.0 && <1.1 - , jsonrpc-tinyclient ==1.0.* + , jsonrpc-tinyclient >=1.0 && <1.2 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* + , memory-hexstring >=1.0 && <1.2 , microlens >0.4 && <0.5 , microlens-mtl >0.2 && <0.3 , microlens-th >0.4 && <0.5 , mtl >2.2 && <2.4 , parsec >3.0 && <3.2 - , scale ==1.0.* - , text >1.2 && <2.1 - , web3-bignum ==1.0.* - , web3-crypto ==1.0.* + , scale >=1.0 && <1.2 + , text >1.2 && <2.2 + , web3-bignum >=1.0 && <1.2 + , web3-crypto >=1.0 && <1.2 default-language: Haskell2010 diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml index ca96593f..47e6a43a 100644 --- a/packages/provider/package.yaml +++ b/packages/provider/package.yaml @@ -1,5 +1,5 @@ name: web3-provider -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Node connection provider for Haskell Web3 library. description: This package contains general Web3 node adapters and connection helpers. github: "airalab/hs-web3" @@ -11,17 +11,17 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.19 +- base >4.11 && <4.21 - mtl >2.2 && <2.4 -- text >1.2 && <2.1 +- text >1.2 && <2.2 - async >2.1 && <2.3 -- network >2.5 && <3.2 -- websockets >0.10 && <0.13 +- network >2.5 && <3.3 +- websockets >0.10 && <0.14 - exceptions >0.8 && <0.11 - http-client >0.5 && <0.8 -- data-default >0.7 && <0.8 +- data-default >0.7 && <0.9 - transformers >0.5 && <0.7 -- jsonrpc-tinyclient >=1.0 && <1.1 +- jsonrpc-tinyclient >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/provider/web3-provider.cabal b/packages/provider/web3-provider.cabal index 28baad0a..4fa7cea2 100644 --- a/packages/provider/web3-provider.cabal +++ b/packages/provider/web3-provider.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: web3-provider -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Node connection provider for Haskell Web3 library. description: This package contains general Web3 node adapters and connection helpers. category: Network @@ -32,14 +32,14 @@ library ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: async >2.1 && <2.3 - , base >4.11 && <4.19 - , data-default >0.7 && <0.8 + , base >4.11 && <4.21 + , data-default >0.7 && <0.9 , exceptions >0.8 && <0.11 , http-client >0.5 && <0.8 - , jsonrpc-tinyclient ==1.0.* + , jsonrpc-tinyclient >=1.0 && <1.2 , mtl >2.2 && <2.4 - , network >2.5 && <3.2 - , text >1.2 && <2.1 + , network >2.5 && <3.3 + , text >1.2 && <2.2 , transformers >0.5 && <0.7 - , websockets >0.10 && <0.13 + , websockets >0.10 && <0.14 default-language: Haskell2010 diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index c6e41199..7b1477ce 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -1,5 +1,5 @@ name: scale -version: 1.0.1.0 +version: 1.1.0.0 synopsis: SCALE v2.0 codec for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -11,16 +11,16 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.19 -- text >1.2 && <2.1 +- base >4.11 && <4.21 +- text >1.2 && <2.2 - cereal >0.5 && <0.6 - bitvec >1.0 && <2.0 - vector >0.12 && <0.14 - memory >0.14 && <0.19 -- bytestring >0.10 && <0.12 +- bytestring >0.10 && <0.13 - generics-sop >0.3 && <0.6 -- data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.21 +- data-default >0.7 && <0.9 +- template-haskell >2.11 && <2.23 ghc-options: - -funbox-strict-fields @@ -56,7 +56,6 @@ tests: - tests - src dependencies: - - bytestring >0.10 && <0.12 - hspec-expectations >=0.8.2 && <0.9 - hspec-discover >=2.4.4 && <2.12 - hspec-contrib >=0.4.0 && <0.6 diff --git a/packages/scale/scale.cabal b/packages/scale/scale.cabal index 13350c97..8a8bb01a 100644 --- a/packages/scale/scale.cabal +++ b/packages/scale/scale.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: scale -version: 1.0.1.0 +version: 1.1.0.0 synopsis: SCALE v2.0 codec for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -38,15 +38,15 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.19 + base >4.11 && <4.21 , bitvec >1.0 && <2.0 - , bytestring >0.10 && <0.12 + , bytestring >0.10 && <0.13 , cereal >0.5 && <0.6 - , data-default >0.7 && <0.8 + , data-default >0.7 && <0.9 , generics-sop >0.3 && <0.6 , memory >0.14 && <0.19 - , template-haskell >2.11 && <2.21 - , text >1.2 && <2.1 + , template-haskell >2.11 && <2.23 + , text >1.2 && <2.2 , vector >0.12 && <0.14 default-language: Haskell2010 @@ -71,18 +71,18 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.19 + base >4.11 && <4.21 , bitvec >1.0 && <2.0 - , bytestring >0.10 && <0.12 + , bytestring >0.10 && <0.13 , cereal >0.5 && <0.6 - , data-default >0.7 && <0.8 + , data-default >0.7 && <0.9 , generics-sop >0.3 && <0.6 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , memory >0.14 && <0.19 - , template-haskell >2.11 && <2.21 - , text >1.2 && <2.1 + , template-haskell >2.11 && <2.23 + , text >1.2 && <2.2 , vector >0.12 && <0.14 default-language: Haskell2010 diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml index 4219dedf..44e69791 100644 --- a/packages/solidity/package.yaml +++ b/packages/solidity/package.yaml @@ -1,5 +1,5 @@ name: web3-solidity -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Solidity language for Haskell Web3 library. description: This package contains Solidity parsec-based parser and primitive types. github: "airalab/hs-web3" @@ -11,22 +11,22 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.19 -- text >1.2 && <2.1 -- aeson >1.2 && <2.2 +- base >4.11 && <4.21 +- text >1.2 && <2.2 +- aeson >1.2 && <2.3 - cereal >0.5 && <0.6 - memory >0.14 && <0.19 -- memory-hexstring >=1.0 && <1.1 +- memory-hexstring >=1.0 && <1.2 - tagged >0.8 && <0.9 - parsec >3.1 && <3.2 - basement >0.0 && <0.1 - OneTuple >0.2 && <0.5 - microlens >0.4 && <0.5 -- bytestring >0.10 && <0.12 +- bytestring >0.10 && <0.13 - generics-sop >0.3 && <0.6 -- data-default >0.7 && <0.8 -- template-haskell >2.11 && <2.21 -- web3-crypto >=1.0 && <1.1 +- data-default >0.7 && <0.9 +- template-haskell >2.11 && <2.23 +- web3-crypto >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/solidity/web3-solidity.cabal b/packages/solidity/web3-solidity.cabal index 7fd1fb03..ea23b7a4 100644 --- a/packages/solidity/web3-solidity.cabal +++ b/packages/solidity/web3-solidity.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: web3-solidity -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Solidity language for Haskell Web3 library. description: This package contains Solidity parsec-based parser and primitive types. category: Network @@ -47,21 +47,21 @@ library ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: OneTuple >0.2 && <0.5 - , aeson >1.2 && <2.2 - , base >4.11 && <4.19 + , aeson >1.2 && <2.3 + , base >4.11 && <4.21 , basement >0.0 && <0.1 - , bytestring >0.10 && <0.12 + , bytestring >0.10 && <0.13 , cereal >0.5 && <0.6 - , data-default >0.7 && <0.8 + , data-default >0.7 && <0.9 , generics-sop >0.3 && <0.6 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* + , memory-hexstring >=1.0 && <1.2 , microlens >0.4 && <0.5 , parsec >3.1 && <3.2 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.21 - , text >1.2 && <2.1 - , web3-crypto ==1.0.* + , template-haskell >2.11 && <2.23 + , text >1.2 && <2.2 + , web3-crypto >=1.0 && <1.2 default-language: Haskell2010 test-suite tests @@ -95,23 +95,23 @@ test-suite tests ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: OneTuple >0.2 && <0.5 - , aeson >1.2 && <2.2 - , base >4.11 && <4.19 + , aeson >1.2 && <2.3 + , base >4.11 && <4.21 , basement >0.0 && <0.1 - , bytestring >0.10 && <0.12 + , bytestring >0.10 && <0.13 , cereal >0.5 && <0.6 - , data-default >0.7 && <0.8 + , data-default >0.7 && <0.9 , generics-sop >0.3 && <0.6 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , memory >0.14 && <0.19 - , memory-hexstring ==1.0.* + , memory-hexstring >=1.0 && <1.2 , microlens >0.4 && <0.5 , parsec >3.1 && <3.2 , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.21 - , text >1.2 && <2.1 - , web3-crypto ==1.0.* + , template-haskell >2.11 && <2.23 + , text >1.2 && <2.2 + , web3-crypto >=1.0 && <1.2 default-language: Haskell2010 diff --git a/packages/web3/package.yaml b/packages/web3/package.yaml index 2568d6bd..80a954bf 100644 --- a/packages/web3/package.yaml +++ b/packages/web3/package.yaml @@ -1,5 +1,5 @@ name: web3 -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -11,10 +11,10 @@ copyright: "(c) Aleksandr Krupenkin 2016-2024" category: Network dependencies: -- base >4.11 && <4.19 -- web3-provider >=1.0 && <1.1 -- web3-ethereum >=1.0 && <1.1 -- web3-polkadot >=1.0 && <1.1 +- base >4.11 && <4.21 +- web3-provider >=1.0 && <1.2 +- web3-ethereum >=1.0 && <1.2 +- web3-polkadot >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/web3/web3.cabal b/packages/web3/web3.cabal index c55b02ea..c137cade 100644 --- a/packages/web3/web3.cabal +++ b/packages/web3/web3.cabal @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0. +-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: web3 -version: 1.0.1.0 +version: 1.1.0.0 synopsis: Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -31,8 +31,8 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.19 - , web3-ethereum ==1.0.* - , web3-polkadot ==1.0.* - , web3-provider ==1.0.* + base >4.11 && <4.21 + , web3-ethereum >=1.0 && <1.2 + , web3-polkadot >=1.0 && <1.2 + , web3-provider >=1.0 && <1.2 default-language: Haskell2010 diff --git a/stack.yaml b/stack.yaml index 00ce4338..c28919da 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-22.27 +resolver: lts-24.30 # User packages to be built. packages: @@ -33,4 +33,4 @@ nix: flags: # bitvec C FFI causes unkown symbol error in windows build, disabling it bitvec: - simd: false \ No newline at end of file + simd: false diff --git a/web3.cabal b/web3.cabal new file mode 100644 index 00000000..5ed7f650 --- /dev/null +++ b/web3.cabal @@ -0,0 +1,600 @@ +cabal-version: 2.2 + +-- This file has been generated from package.yaml by hpack version 0.37.0. +-- +-- see: https://github.com/sol/hpack +-- +-- hash: 8629eacf81afc4f67aa79d16d9f4fc8c77d49100c617c8237e7154357c699d6e + +name: web3 +version: 0.9.1.0 +synopsis: Web3 API for Haskell. +description: Client library for Third Generation of Web. +category: Network +homepage: https://github.com/airalab/hs-web3#readme +bug-reports: https://github.com/airalab/hs-web3/issues +author: Alexander Krupenkin +maintainer: mail@akru.me +copyright: (c) Alexander Krupenkin 2016 +license: BSD-3-Clause +license-file: LICENSE +build-type: Simple +extra-source-files: + README.md + CHANGELOG.md + stack.yaml + examples/token/ERC20.hs + examples/token/ERC20.json + examples/token/Main.hs + examples/token/stack.yaml + examples/token/package.yaml + examples/polkadot/Main.hs + examples/polkadot/stack.yaml + examples/polkadot/package.yaml + examples/scale/Main.hs + examples/scale/stack.yaml + examples/scale/package.yaml + test/contracts/Registry.json + test/contracts/SimpleStorage.json + test/contracts/ComplexStorage.json + test/contracts/Linearization.json + +source-repository head + type: git + location: https://github.com/airalab/hs-web3 + +flag compiler + description: Enable Solidity compiler + manual: True + default: False + +flag debug + description: Enable debug compiler options + manual: True + default: False + +library + exposed-modules: + Codec.Scale + Codec.Scale.Class + Codec.Scale.Compact + Codec.Scale.Core + Codec.Scale.Generic + Codec.Scale.SingletonEnum + Codec.Scale.Skip + Codec.Scale.TH + Crypto.Ecdsa.Signature + Crypto.Ecdsa.Utils + Crypto.Ethereum + Crypto.Ethereum.Keyfile + Crypto.Ethereum.Signature + Crypto.Ethereum.Utils + Crypto.Random.HmacDrbg + Data.ByteArray.HexString + Data.Solidity.Abi + Data.Solidity.Abi.Codec + Data.Solidity.Abi.Generic + Data.Solidity.Event + Data.Solidity.Event.Internal + Data.Solidity.Prim + Data.Solidity.Prim.Address + Data.Solidity.Prim.Bool + Data.Solidity.Prim.Bytes + Data.Solidity.Prim.Int + Data.Solidity.Prim.List + Data.Solidity.Prim.String + Data.Solidity.Prim.Tagged + Data.Solidity.Prim.Tuple + Data.Solidity.Prim.Tuple.TH + Data.String.Extra + Language.Solidity.Abi + Network.Ethereum + Network.Ethereum.Account + Network.Ethereum.Account.Class + Network.Ethereum.Account.Default + Network.Ethereum.Account.Internal + Network.Ethereum.Account.LocalKey + Network.Ethereum.Account.Personal + Network.Ethereum.Account.Safe + Network.Ethereum.Api.Eth + Network.Ethereum.Api.Net + Network.Ethereum.Api.Personal + Network.Ethereum.Api.Types + Network.Ethereum.Api.Web3 + Network.Ethereum.Chain + Network.Ethereum.Contract + Network.Ethereum.Contract.Event + Network.Ethereum.Contract.Event.Common + Network.Ethereum.Contract.Event.MultiFilter + Network.Ethereum.Contract.Event.SingleFilter + Network.Ethereum.Contract.Method + Network.Ethereum.Contract.TH + Network.Ethereum.Ens + Network.Ethereum.Ens.PublicResolver + Network.Ethereum.Ens.Registry + Network.Ethereum.Transaction + Network.Ethereum.Unit + Network.Ipfs.Api.Bitswap + Network.Ipfs.Api.Block + Network.Ipfs.Api.Bootstrap + Network.Ipfs.Api.Cid + Network.Ipfs.Api.Config + Network.Ipfs.Api.Core + Network.Ipfs.Api.Dag + Network.Ipfs.Api.Dht + Network.Ipfs.Api.Files + Network.Ipfs.Api.Internal + Network.Ipfs.Api.Internal.Call + Network.Ipfs.Api.Internal.Stream + Network.Ipfs.Api.Key + Network.Ipfs.Api.Log + Network.Ipfs.Api.Object + Network.Ipfs.Api.Pin + Network.Ipfs.Api.Pubsub + Network.Ipfs.Api.Repo + Network.Ipfs.Api.Stats + Network.Ipfs.Api.Swarm + Network.Ipfs.Api.Types + Network.Ipfs.Api.Types.Stream + Network.Ipfs.Client + Network.JsonRpc.TinyClient + Network.Polkadot.Api.Account + Network.Polkadot.Api.Author + Network.Polkadot.Api.Babe + Network.Polkadot.Api.Chain + Network.Polkadot.Api.Childstate + Network.Polkadot.Api.Contracts + Network.Polkadot.Api.Engine + Network.Polkadot.Api.Grandpa + Network.Polkadot.Api.Offchain + Network.Polkadot.Api.Payment + Network.Polkadot.Api.Rpc + Network.Polkadot.Api.State + Network.Polkadot.Api.System + Network.Polkadot.Api.Types + Network.Web3 + Network.Web3.Provider + other-modules: + Paths_web3 + autogen-modules: + Paths_web3 + hs-source-dirs: + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs + build-depends: + OneTuple >=0.2.1 && <0.5 + , aeson >=1.2.2.0 && <2.2 + , async >=2.1.1.1 && <2.3 + , attoparsec >=0.13.2.1 && <0.15 + , base >4.11 && <4.18 + , base58string >=0.10.0 && <0.11 + , basement >=0.0.4 && <0.1 + , bitvec >=1.0.0 && <2.0 + , bytestring >=0.10.8.1 && <0.12 + , cereal >=0.5.4.0 && <0.6 + , cryptonite >=0.23 && <0.31 + , data-default >=0.7.1.1 && <0.8 + , errors >=2.2 && <2.4 + , exceptions >=0.8.3 && <0.11 + , generics-sop >=0.3.1.0 && <0.6 + , hspec >=2.4 && <2.11 + , http-client >=0.5.7.1 && <0.8 + , http-client-tls >=0.3.5.1 && <0.4 + , http-media >=0.7 && <0.8.2 + , http-types >=0.12 && <0.14 + , machines >=0.6.3 && <0.8 + , memory >=0.14.11 && <0.19 + , microlens >=0.4.8.1 && <0.5 + , microlens-aeson >=2.2.0.2 && <2.6 + , microlens-mtl >=0.1.11.0 && <0.3 + , microlens-th >=0.4.1.1 && <0.5 + , mtl >=2.2.1 && <2.3 + , network >=2.6 && <3.2 + , parsec >=3.1.11 && <3.2 + , relapse >=1.0.0.0 && <2.0 + , servant >=0.13 && <0.20 + , servant-client >=0.13 && <0.20 + , tagged >=0.8.5 && <0.9 + , tar ==0.5.* + , template-haskell >=2.12 && <2.20 + , text >=1.2.2.2 && <2.1 + , transformers >=0.5.2.0 && <0.6 + , unordered-containers ==0.2.* + , uuid-types >=1.0.3 && <1.1 + , vector >=0.12 && <0.14 + , vinyl >=0.5.3 && <0.15 + , websockets >=0.11 && <0.13 + default-language: Haskell2010 + if flag(debug) + ghc-options: -ddump-splices + if flag(compiler) + other-modules: + Language.Solidity.Compiler + Language.Solidity.Compiler.Foreign + hs-source-dirs: + compiler + cpp-options: -DSOLIDITY_COMPILER + include-dirs: + ./compiler/cbits + c-sources: + ./compiler/cbits/solidity_lite.cpp + extra-libraries: + solidity + build-depends: + containers + +test-suite live + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Network.Ethereum.Test.ComplexStorageSpec + Network.Ethereum.Test.ERC20Spec + Network.Ethereum.Test.LinearizationSpec + Network.Ethereum.Test.LocalAccountSpec + Network.Ethereum.Test.RegistrySpec + Network.Ethereum.Test.SimpleStorageSpec + Network.Ethereum.Test.Utils + Network.Ipfs.Api.Test.Key + Codec.Scale + Codec.Scale.Class + Codec.Scale.Compact + Codec.Scale.Core + Codec.Scale.Generic + Codec.Scale.SingletonEnum + Codec.Scale.Skip + Codec.Scale.TH + Crypto.Ecdsa.Signature + Crypto.Ecdsa.Utils + Crypto.Ethereum + Crypto.Ethereum.Keyfile + Crypto.Ethereum.Signature + Crypto.Ethereum.Utils + Crypto.Random.HmacDrbg + Data.ByteArray.HexString + Data.Solidity.Abi + Data.Solidity.Abi.Codec + Data.Solidity.Abi.Generic + Data.Solidity.Event + Data.Solidity.Event.Internal + Data.Solidity.Prim + Data.Solidity.Prim.Address + Data.Solidity.Prim.Bool + Data.Solidity.Prim.Bytes + Data.Solidity.Prim.Int + Data.Solidity.Prim.List + Data.Solidity.Prim.String + Data.Solidity.Prim.Tagged + Data.Solidity.Prim.Tuple + Data.Solidity.Prim.Tuple.TH + Data.String.Extra + Language.Solidity.Abi + Network.Ethereum + Network.Ethereum.Account + Network.Ethereum.Account.Class + Network.Ethereum.Account.Default + Network.Ethereum.Account.Internal + Network.Ethereum.Account.LocalKey + Network.Ethereum.Account.Personal + Network.Ethereum.Account.Safe + Network.Ethereum.Api.Eth + Network.Ethereum.Api.Net + Network.Ethereum.Api.Personal + Network.Ethereum.Api.Types + Network.Ethereum.Api.Web3 + Network.Ethereum.Chain + Network.Ethereum.Contract + Network.Ethereum.Contract.Event + Network.Ethereum.Contract.Event.Common + Network.Ethereum.Contract.Event.MultiFilter + Network.Ethereum.Contract.Event.SingleFilter + Network.Ethereum.Contract.Method + Network.Ethereum.Contract.TH + Network.Ethereum.Ens + Network.Ethereum.Ens.PublicResolver + Network.Ethereum.Ens.Registry + Network.Ethereum.Transaction + Network.Ethereum.Unit + Network.Ipfs.Api.Bitswap + Network.Ipfs.Api.Block + Network.Ipfs.Api.Bootstrap + Network.Ipfs.Api.Cid + Network.Ipfs.Api.Config + Network.Ipfs.Api.Core + Network.Ipfs.Api.Dag + Network.Ipfs.Api.Dht + Network.Ipfs.Api.Files + Network.Ipfs.Api.Internal + Network.Ipfs.Api.Internal.Call + Network.Ipfs.Api.Internal.Stream + Network.Ipfs.Api.Key + Network.Ipfs.Api.Log + Network.Ipfs.Api.Object + Network.Ipfs.Api.Pin + Network.Ipfs.Api.Pubsub + Network.Ipfs.Api.Repo + Network.Ipfs.Api.Stats + Network.Ipfs.Api.Swarm + Network.Ipfs.Api.Types + Network.Ipfs.Api.Types.Stream + Network.Ipfs.Client + Network.JsonRpc.TinyClient + Network.Polkadot.Api.Account + Network.Polkadot.Api.Author + Network.Polkadot.Api.Babe + Network.Polkadot.Api.Chain + Network.Polkadot.Api.Childstate + Network.Polkadot.Api.Contracts + Network.Polkadot.Api.Engine + Network.Polkadot.Api.Grandpa + Network.Polkadot.Api.Offchain + Network.Polkadot.Api.Payment + Network.Polkadot.Api.Rpc + Network.Polkadot.Api.State + Network.Polkadot.Api.System + Network.Polkadot.Api.Types + Network.Web3 + Network.Web3.Provider + Paths_web3 + autogen-modules: + Paths_web3 + hs-source-dirs: + test + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + build-depends: + OneTuple >=0.2.1 && <0.5 + , aeson >=1.2.2.0 && <2.2 + , async >=2.1.1.1 && <2.3 + , attoparsec >=0.13.2.1 && <0.15 + , base >4.11 && <4.18 + , base58string >=0.10.0 && <0.11 + , basement >=0.0.4 && <0.1 + , bitvec >=1.0.0 && <2.0 + , bytestring >=0.10.8.1 && <0.12 + , cereal >=0.5.4.0 && <0.6 + , cryptonite >=0.23 && <0.31 + , data-default >=0.7.1.1 && <0.8 + , errors >=2.2 && <2.4 + , exceptions >=0.8.3 && <0.11 + , generics-sop >=0.3.1.0 && <0.6 + , hspec >=2.4.4 && <2.8 + , hspec-contrib >=0.4.0 && <0.6 + , hspec-discover >=2.4.4 && <2.8 + , hspec-expectations >=0.8.2 && <0.9 + , http-client >=0.5.7.1 && <0.8 + , http-client-tls >=0.3.5.1 && <0.4 + , http-media >=0.7 && <0.8.2 + , http-types >=0.12 && <0.14 + , machines >=0.6.3 && <0.8 + , memory >=0.14.11 && <0.19 + , microlens >=0.4.8.1 && <0.5 + , microlens-aeson >=2.2.0.2 && <2.6 + , microlens-mtl >=0.1.11.0 && <0.3 + , microlens-th >=0.4.1.1 && <0.5 + , mtl >=2.2.1 && <2.3 + , network >=2.6 && <3.2 + , parsec >=3.1.11 && <3.2 + , random ==1.1.* + , relapse >=1.0.0.0 && <2.0 + , servant >=0.13 && <0.20 + , servant-client >=0.13 && <0.20 + , split >=0.2.3 && <0.3 + , stm >=2.4.4 && <2.6 + , tagged >=0.8.5 && <0.9 + , tar ==0.5.* + , template-haskell >=2.12 && <2.20 + , text >=1.2.2.2 && <2.1 + , time >=1.6.0 && <1.11 + , transformers >=0.5.2.0 && <0.6 + , unordered-containers ==0.2.* + , uuid-types >=1.0.3 && <1.1 + , vector >=0.12 && <0.14 + , vinyl >=0.5.3 && <0.15 + , websockets >=0.11 && <0.13 + default-language: Haskell2010 + if flag(debug) + ghc-options: -ddump-splices + if flag(compiler) + other-modules: + Language.Solidity.Compiler + Language.Solidity.Compiler.Foreign + hs-source-dirs: + compiler + cpp-options: -DSOLIDITY_COMPILER + include-dirs: + ./compiler/cbits + c-sources: + ./compiler/cbits/solidity_lite.cpp + extra-libraries: + solidity + build-depends: + containers + +test-suite unit + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Codec.Scale.Test.CoreSpec + Codec.Scale.Test.SingleFieldStructSpec + Codec.Scale.Test.SkipSpec + Crypto.Ethereum.Test.KeyfileSpec + Crypto.Ethereum.Test.SignatureSpec + Crypto.Random.Test.HmacDrbgSpec + Data.Solidity.Test.AddressSpec + Data.Solidity.Test.EncodingSpec + Data.Solidity.Test.IntSpec + Language.Solidity.Test.AbiSpec + Language.Solidity.Test.CompilerSpec + Network.Ethereum.Contract.Test.THSpec + Network.Ethereum.Web3.Test.EventSpec + Network.Ethereum.Web3.Test.MethodDumpSpec + Codec.Scale + Codec.Scale.Class + Codec.Scale.Compact + Codec.Scale.Core + Codec.Scale.Generic + Codec.Scale.SingletonEnum + Codec.Scale.Skip + Codec.Scale.TH + Crypto.Ecdsa.Signature + Crypto.Ecdsa.Utils + Crypto.Ethereum + Crypto.Ethereum.Keyfile + Crypto.Ethereum.Signature + Crypto.Ethereum.Utils + Crypto.Random.HmacDrbg + Data.ByteArray.HexString + Data.Solidity.Abi + Data.Solidity.Abi.Codec + Data.Solidity.Abi.Generic + Data.Solidity.Event + Data.Solidity.Event.Internal + Data.Solidity.Prim + Data.Solidity.Prim.Address + Data.Solidity.Prim.Bool + Data.Solidity.Prim.Bytes + Data.Solidity.Prim.Int + Data.Solidity.Prim.List + Data.Solidity.Prim.String + Data.Solidity.Prim.Tagged + Data.Solidity.Prim.Tuple + Data.Solidity.Prim.Tuple.TH + Data.String.Extra + Language.Solidity.Abi + Network.Ethereum + Network.Ethereum.Account + Network.Ethereum.Account.Class + Network.Ethereum.Account.Default + Network.Ethereum.Account.Internal + Network.Ethereum.Account.LocalKey + Network.Ethereum.Account.Personal + Network.Ethereum.Account.Safe + Network.Ethereum.Api.Eth + Network.Ethereum.Api.Net + Network.Ethereum.Api.Personal + Network.Ethereum.Api.Types + Network.Ethereum.Api.Web3 + Network.Ethereum.Chain + Network.Ethereum.Contract + Network.Ethereum.Contract.Event + Network.Ethereum.Contract.Event.Common + Network.Ethereum.Contract.Event.MultiFilter + Network.Ethereum.Contract.Event.SingleFilter + Network.Ethereum.Contract.Method + Network.Ethereum.Contract.TH + Network.Ethereum.Ens + Network.Ethereum.Ens.PublicResolver + Network.Ethereum.Ens.Registry + Network.Ethereum.Transaction + Network.Ethereum.Unit + Network.Ipfs.Api.Bitswap + Network.Ipfs.Api.Block + Network.Ipfs.Api.Bootstrap + Network.Ipfs.Api.Cid + Network.Ipfs.Api.Config + Network.Ipfs.Api.Core + Network.Ipfs.Api.Dag + Network.Ipfs.Api.Dht + Network.Ipfs.Api.Files + Network.Ipfs.Api.Internal + Network.Ipfs.Api.Internal.Call + Network.Ipfs.Api.Internal.Stream + Network.Ipfs.Api.Key + Network.Ipfs.Api.Log + Network.Ipfs.Api.Object + Network.Ipfs.Api.Pin + Network.Ipfs.Api.Pubsub + Network.Ipfs.Api.Repo + Network.Ipfs.Api.Stats + Network.Ipfs.Api.Swarm + Network.Ipfs.Api.Types + Network.Ipfs.Api.Types.Stream + Network.Ipfs.Client + Network.JsonRpc.TinyClient + Network.Polkadot.Api.Account + Network.Polkadot.Api.Author + Network.Polkadot.Api.Babe + Network.Polkadot.Api.Chain + Network.Polkadot.Api.Childstate + Network.Polkadot.Api.Contracts + Network.Polkadot.Api.Engine + Network.Polkadot.Api.Grandpa + Network.Polkadot.Api.Offchain + Network.Polkadot.Api.Payment + Network.Polkadot.Api.Rpc + Network.Polkadot.Api.State + Network.Polkadot.Api.System + Network.Polkadot.Api.Types + Network.Web3 + Network.Web3.Provider + Paths_web3 + autogen-modules: + Paths_web3 + hs-source-dirs: + unit + src + ghc-options: -funbox-strict-fields -Wduplicate-exports -Whi-shadowing -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-monadfail-instances -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N + build-depends: + OneTuple >=0.2.1 && <0.5 + , aeson >=1.2.2.0 && <2.2 + , async >=2.1.1.1 && <2.3 + , attoparsec >=0.13.2.1 && <0.15 + , base >4.11 && <4.18 + , base58string >=0.10.0 && <0.11 + , basement >=0.0.4 && <0.1 + , bitvec >=1.0.0 && <2.0 + , bytestring >=0.10.8.1 && <0.12 + , cereal >=0.5.4.0 && <0.6 + , cryptonite >=0.23 && <0.31 + , data-default >=0.7.1.1 && <0.8 + , errors >=2.2 && <2.4 + , exceptions >=0.8.3 && <0.11 + , generics-sop >=0.3.1.0 && <0.6 + , hspec >=2.4.4 && <2.8 + , hspec-contrib >=0.4.0 && <0.6 + , hspec-discover >=2.4.4 && <2.8 + , hspec-expectations >=0.8.2 && <0.9 + , http-client >=0.5.7.1 && <0.8 + , http-client-tls >=0.3.5.1 && <0.4 + , http-media >=0.7 && <0.8.2 + , http-types >=0.12 && <0.14 + , machines >=0.6.3 && <0.8 + , memory >=0.14.11 && <0.19 + , microlens >=0.4.8.1 && <0.5 + , microlens-aeson >=2.2.0.2 && <2.6 + , microlens-mtl >=0.1.11.0 && <0.3 + , microlens-th >=0.4.1.1 && <0.5 + , mtl >=2.2.1 && <2.3 + , network >=2.6 && <3.2 + , parsec >=3.1.11 && <3.2 + , relapse >=1.0.0.0 && <2.0 + , servant >=0.13 && <0.20 + , servant-client >=0.13 && <0.20 + , tagged >=0.8.5 && <0.9 + , tar ==0.5.* + , template-haskell >=2.12 && <2.20 + , text >=1.2.2.2 && <2.1 + , transformers >=0.5.2.0 && <0.6 + , unordered-containers ==0.2.* + , uuid-types >=1.0.3 && <1.1 + , vector >=0.12 && <0.14 + , vinyl >=0.5.3 && <0.15 + , websockets >=0.11 && <0.13 + default-language: Haskell2010 + if flag(debug) + ghc-options: -ddump-splices + if flag(compiler) + other-modules: + Language.Solidity.Compiler + Language.Solidity.Compiler.Foreign + hs-source-dirs: + compiler + cpp-options: -DSOLIDITY_COMPILER + include-dirs: + ./compiler/cbits + c-sources: + ./compiler/cbits/solidity_lite.cpp + extra-libraries: + solidity + build-depends: + containers From 256648846ce700e993a7585b2d0244ad1c138ded Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Feb 2026 09:34:24 +0300 Subject: [PATCH 234/237] Update CHANGELOG.md --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01d68978..58204860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,20 @@ # Changelog All notable changes to this project will be documented in this file. +## [1.1.0.0] 2026-02-09 +### Added +- Implement EIP712Signature module (#145) +- Add `chainId` call (#150) +- Add `eth_feeHistory` method to Eth API (#146) + +### Changed +- Update dependencies, switch to LTS-24.30 +- Fix build problems and CI workflow (#151) +- Update TxReceipt API according to the RPC ethereum documentation (#148) +- Fix block struct according to the spec (#147) +- Fix signature encoding for shorter integer values of r, s (#144) +- Update Types.hs (#142) + ## [1.0.1.0] 2024-10-03 ### Changed - Update dependencies, switch to LTS-21.25 From 00d9d6db32a316b918500dec4ee2fcb838edea43 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Feb 2026 09:44:26 +0300 Subject: [PATCH 235/237] Fix hackage warnings, update license years --- packages/bignum/LICENSE | 2 +- packages/bignum/package.yaml | 14 ++--- packages/bignum/web3-bignum.cabal | 18 +++--- packages/crypto/LICENSE | 2 +- packages/crypto/package.yaml | 24 ++++---- packages/crypto/web3-crypto.cabal | 38 ++++++------ packages/ethereum/LICENSE | 2 +- packages/ethereum/package.yaml | 48 ++++++++-------- packages/ethereum/web3-ethereum.cabal | 70 +++++++++++------------ packages/hexstring/LICENSE | 2 +- packages/hexstring/memory-hexstring.cabal | 14 ++--- packages/hexstring/package.yaml | 16 +++--- packages/jsonrpc/LICENSE | 2 +- packages/jsonrpc/jsonrpc-tinyclient.cabal | 22 +++---- packages/jsonrpc/package.yaml | 22 +++---- packages/polkadot/LICENSE | 2 +- packages/polkadot/package.yaml | 42 +++++++------- packages/polkadot/web3-polkadot.cabal | 58 +++++++++---------- packages/provider/LICENSE | 2 +- packages/provider/package.yaml | 24 ++++---- packages/provider/web3-provider.cabal | 22 +++---- packages/scale/LICENSE | 2 +- packages/scale/package.yaml | 22 +++---- packages/scale/scale.cabal | 42 +++++++------- packages/solidity/LICENSE | 2 +- packages/solidity/package.yaml | 34 +++++------ packages/solidity/web3-solidity.cabal | 58 +++++++++---------- packages/web3/LICENSE | 2 +- packages/web3/package.yaml | 10 ++-- packages/web3/web3.cabal | 4 +- 30 files changed, 311 insertions(+), 311 deletions(-) diff --git a/packages/bignum/LICENSE b/packages/bignum/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/bignum/LICENSE +++ b/packages/bignum/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/bignum/package.yaml b/packages/bignum/package.yaml index 1c1374bd..506229e4 100644 --- a/packages/bignum/package.yaml +++ b/packages/bignum/package.yaml @@ -7,16 +7,16 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2024" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network dependencies: -- base >4.11 && <4.21 -- scale >=1.0 && <1.2 -- memory >0.14 && <0.19 -- memory-hexstring >=1.0 && <1.2 -- cereal >0.5 && <0.6 -- wide-word >0.1 && <0.2 +- base >=4.11 && <4.21 +- scale >=1.0 && <1.2 +- memory >=0.14 && <0.19 +- memory-hexstring >=1.0 && <1.2 +- cereal >=0.5 && <0.6 +- wide-word >=0.1 && <0.2 ghc-options: - -funbox-strict-fields diff --git a/packages/bignum/web3-bignum.cabal b/packages/bignum/web3-bignum.cabal index 53b79121..7890355f 100644 --- a/packages/bignum/web3-bignum.cabal +++ b/packages/bignum/web3-bignum.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2024 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -31,12 +31,12 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.21 - , cereal >0.5 && <0.6 - , memory >0.14 && <0.19 + base >=4.11 && <4.21 + , cereal ==0.5.* + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 , scale >=1.0 && <1.2 - , wide-word >0.1 && <0.2 + , wide-word ==0.1.* default-language: Haskell2010 test-suite tests @@ -51,14 +51,14 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.21 - , cereal >0.5 && <0.6 + base >=4.11 && <4.21 + , cereal ==0.5.* , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.19 + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 , scale >=1.0 && <1.2 - , wide-word >0.1 && <0.2 + , wide-word ==0.1.* default-language: Haskell2010 diff --git a/packages/crypto/LICENSE b/packages/crypto/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/crypto/LICENSE +++ b/packages/crypto/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/crypto/package.yaml b/packages/crypto/package.yaml index f77fc7f2..95a5b4e1 100644 --- a/packages/crypto/package.yaml +++ b/packages/crypto/package.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2024" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network extra-source-files: @@ -15,18 +15,18 @@ extra-source-files: - src/cbits/xxhash.c dependencies: -- base >4.11 && <4.21 -- text >1.2 && <2.2 -- aeson >1.2 && <2.3 -- memory >0.14 && <0.19 -- vector >0.12 && <0.14 -- containers >0.6 && <0.8 -- uuid-types >1.0 && <1.1 -- crypton >0.30 && <1.1 -- bytestring >0.10 && <0.13 -- memory-hexstring >=1.0 && <1.2 +- base >=4.11 && <4.21 +- text >=1.2 && <2.2 +- aeson >=1.2 && <2.3 +- memory >=0.14 && <0.19 +- vector >=0.12 && <0.14 +- containers >=0.6 && <0.8 +- uuid-types >=1.0 && <1.1 +- crypton >=0.30 && <1.1 +- bytestring >=0.10 && <0.13 +- memory-hexstring >=1.0 && <1.2 - basement >=0.0.16 && < 0.1 -- scientific >=0.3.7 && < 0.4 +- scientific >=0.3.7 && < 0.4 ghc-options: - -funbox-strict-fields diff --git a/packages/crypto/web3-crypto.cabal b/packages/crypto/web3-crypto.cabal index 5fcf55e0..a5684f7f 100644 --- a/packages/crypto/web3-crypto.cabal +++ b/packages/crypto/web3-crypto.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2024 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -48,18 +48,18 @@ library c-sources: src/cbits/xxhash.c build-depends: - aeson >1.2 && <2.3 - , base >4.11 && <4.21 + aeson >=1.2 && <2.3 + , base >=4.11 && <4.21 , basement >=0.0.16 && <0.1 - , bytestring >0.10 && <0.13 - , containers >0.6 && <0.8 - , crypton >0.30 && <1.1 - , memory >0.14 && <0.19 + , bytestring >=0.10 && <0.13 + , containers >=0.6 && <0.8 + , crypton >=0.30 && <1.1 + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 , scientific >=0.3.7 && <0.4 - , text >1.2 && <2.2 - , uuid-types >1.0 && <1.1 - , vector >0.12 && <0.14 + , text >=1.2 && <2.2 + , uuid-types ==1.0.* + , vector >=0.12 && <0.14 default-language: Haskell2010 test-suite tests @@ -93,20 +93,20 @@ test-suite tests c-sources: src/cbits/xxhash.c build-depends: - aeson >1.2 && <2.3 - , base >4.11 && <4.21 + aeson >=1.2 && <2.3 + , base >=4.11 && <4.21 , basement >=0.0.16 && <0.1 - , bytestring >0.10 && <0.13 - , containers >0.6 && <0.8 - , crypton >0.30 && <1.1 + , bytestring >=0.10 && <0.13 + , containers >=0.6 && <0.8 + , crypton >=0.30 && <1.1 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.19 + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 , scientific >=0.3.7 && <0.4 - , text >1.2 && <2.2 - , uuid-types >1.0 && <1.1 - , vector >0.12 && <0.14 + , text >=1.2 && <2.2 + , uuid-types ==1.0.* + , vector >=0.12 && <0.14 default-language: Haskell2010 diff --git a/packages/ethereum/LICENSE b/packages/ethereum/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/ethereum/LICENSE +++ b/packages/ethereum/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index c64bfb45..85393aa2 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -7,33 +7,33 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2024" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network dependencies: -- base >4.11 && <4.21 -- text >1.2 && <2.2 -- vinyl >0.5 && <0.15 -- aeson >1.2 && <2.3 -- aeson-casing >=0.2 && <0.3 -- tagged >0.8 && <0.9 -- memory >0.14 && <0.19 -- relapse >=1.0 && <2.0 -- OneTuple >0.2 && <0.5 -- machines >0.6 && <0.8 -- microlens >0.4 && <0.5 -- bytestring >0.10 && <0.13 -- exceptions >0.8 && <0.11 -- generics-sop >0.3 && <0.6 -- data-default >0.7 && <0.9 -- transformers >0.5 && <0.7 -- microlens-aeson >2.2 && <2.6 -- template-haskell >2.11 && <2.23 -- mtl >2.2 && <2.4 -- web3-crypto >=1.0 && <1.2 -- web3-solidity >=1.0 && <1.2 -- memory-hexstring >=1.0 && <1.2 -- jsonrpc-tinyclient >=1.0 && <1.2 +- base >=4.11 && <4.21 +- text >=1.2 && <2.2 +- vinyl >=0.5 && <0.15 +- aeson >=1.2 && <2.3 +- aeson-casing >=0.2 && <0.3 +- tagged >=0.8 && <0.9 +- memory >=0.14 && <0.19 +- relapse >=1.0 && <2.0 +- OneTuple >=0.2 && <0.5 +- machines >=0.6 && <0.8 +- microlens >=0.4 && <0.5 +- bytestring >=0.10 && <0.13 +- exceptions >=0.8 && <0.11 +- generics-sop >=0.3 && <0.6 +- data-default >=0.7 && <0.9 +- transformers >=0.5 && <0.7 +- microlens-aeson >=2.2 && <2.6 +- template-haskell >=2.11 && <2.23 +- mtl >=2.2 && <2.4 +- web3-crypto >=1.0 && <1.2 +- web3-solidity >=1.0 && <1.2 +- memory-hexstring >=1.0 && <1.2 +- jsonrpc-tinyclient >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/ethereum/web3-ethereum.cabal b/packages/ethereum/web3-ethereum.cabal index aa201168..c053f0d1 100644 --- a/packages/ethereum/web3-ethereum.cabal +++ b/packages/ethereum/web3-ethereum.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2024 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -56,27 +56,27 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - OneTuple >0.2 && <0.5 - , aeson >1.2 && <2.3 + OneTuple >=0.2 && <0.5 + , aeson >=1.2 && <2.3 , aeson-casing ==0.2.* - , base >4.11 && <4.21 - , bytestring >0.10 && <0.13 - , data-default >0.7 && <0.9 - , exceptions >0.8 && <0.11 - , generics-sop >0.3 && <0.6 + , base >=4.11 && <4.21 + , bytestring >=0.10 && <0.13 + , data-default >=0.7 && <0.9 + , exceptions >=0.8 && <0.11 + , generics-sop >=0.3 && <0.6 , jsonrpc-tinyclient >=1.0 && <1.2 - , machines >0.6 && <0.8 - , memory >0.14 && <0.19 + , machines >=0.6 && <0.8 + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 - , microlens >0.4 && <0.5 - , microlens-aeson >2.2 && <2.6 - , mtl >2.2 && <2.4 + , microlens ==0.4.* + , microlens-aeson >=2.2 && <2.6 + , mtl >=2.2 && <2.4 , relapse >=1.0 && <2.0 - , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.23 - , text >1.2 && <2.2 - , transformers >0.5 && <0.7 - , vinyl >0.5 && <0.15 + , tagged ==0.8.* + , template-haskell >=2.11 && <2.23 + , text >=1.2 && <2.2 + , transformers >=0.5 && <0.7 + , vinyl >=0.5 && <0.15 , web3-crypto >=1.0 && <1.2 , web3-solidity >=1.0 && <1.2 default-language: Haskell2010 @@ -121,31 +121,31 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - OneTuple >0.2 && <0.5 - , aeson >1.2 && <2.3 + OneTuple >=0.2 && <0.5 + , aeson >=1.2 && <2.3 , aeson-casing ==0.2.* - , base >4.11 && <4.21 - , bytestring >0.10 && <0.13 - , data-default >0.7 && <0.9 - , exceptions >0.8 && <0.11 - , generics-sop >0.3 && <0.6 + , base >=4.11 && <4.21 + , bytestring >=0.10 && <0.13 + , data-default >=0.7 && <0.9 + , exceptions >=0.8 && <0.11 + , generics-sop >=0.3 && <0.6 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , jsonrpc-tinyclient >=1.0 && <1.2 - , machines >0.6 && <0.8 - , memory >0.14 && <0.19 + , machines >=0.6 && <0.8 + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 - , microlens >0.4 && <0.5 - , microlens-aeson >2.2 && <2.6 - , mtl >2.2 && <2.4 + , microlens ==0.4.* + , microlens-aeson >=2.2 && <2.6 + , mtl >=2.2 && <2.4 , relapse >=1.0 && <2.0 - , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.23 - , text >1.2 && <2.2 - , transformers >0.5 && <0.7 - , vinyl >0.5 && <0.15 + , tagged ==0.8.* + , template-haskell >=2.11 && <2.23 + , text >=1.2 && <2.2 + , transformers >=0.5 && <0.7 + , vinyl >=0.5 && <0.15 , web3-crypto >=1.0 && <1.2 , web3-solidity >=1.0 && <1.2 default-language: Haskell2010 diff --git a/packages/hexstring/LICENSE b/packages/hexstring/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/hexstring/LICENSE +++ b/packages/hexstring/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/hexstring/memory-hexstring.cabal b/packages/hexstring/memory-hexstring.cabal index 6b5ee2fe..f3b212c2 100644 --- a/packages/hexstring/memory-hexstring.cabal +++ b/packages/hexstring/memory-hexstring.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2024 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -34,11 +34,11 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <2.3 - , base >4.11 && <4.21 - , bytestring >0.10 && <0.13 - , memory >0.14 && <0.19 + aeson >=1.2 && <2.3 + , base >=4.11 && <4.21 + , bytestring >=0.10 && <0.13 + , memory >=0.14 && <0.19 , scale >=1.0 && <1.2 - , template-haskell >2.11 && <2.23 - , text >1.2 && <2.2 + , template-haskell >=2.11 && <2.23 + , text >=1.2 && <2.2 default-language: Haskell2010 diff --git a/packages/hexstring/package.yaml b/packages/hexstring/package.yaml index 8fd6941a..829850c2 100644 --- a/packages/hexstring/package.yaml +++ b/packages/hexstring/package.yaml @@ -7,17 +7,17 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2024" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network dependencies: -- base >4.11 && <4.21 -- text >1.2 && <2.2 -- aeson >1.2 && <2.3 -- memory >0.14 && <0.19 -- bytestring >0.10 && <0.13 -- template-haskell >2.11 && <2.23 -- scale >=1.0 && <1.2 +- base >=4.11 && <4.21 +- text >=1.2 && <2.2 +- aeson >=1.2 && <2.3 +- memory >=0.14 && <0.19 +- bytestring >=0.10 && <0.13 +- template-haskell >=2.11 && <2.23 +- scale >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/jsonrpc/LICENSE b/packages/jsonrpc/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/jsonrpc/LICENSE +++ b/packages/jsonrpc/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/jsonrpc/jsonrpc-tinyclient.cabal b/packages/jsonrpc/jsonrpc-tinyclient.cabal index 2dc729b9..0eaf6022 100644 --- a/packages/jsonrpc/jsonrpc-tinyclient.cabal +++ b/packages/jsonrpc/jsonrpc-tinyclient.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2024 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -31,14 +31,14 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <2.3 - , base >4.11 && <4.21 - , bytestring >0.10 && <0.13 - , exceptions >0.8 && <0.11 - , http-client >0.5 && <0.8 - , http-client-tls >0.3 && <0.4 - , mtl >2.2 && <2.4 - , random >1.0 && <1.3 - , text >1.2 && <2.2 - , websockets >0.10 && <0.14 + aeson >=1.2 && <2.3 + , base >=4.11 && <4.21 + , bytestring >=0.10 && <0.13 + , exceptions >=0.8 && <0.11 + , http-client >=0.5 && <0.8 + , http-client-tls ==0.3.* + , mtl >=2.2 && <2.4 + , random >=1.0 && <1.3 + , text >=1.2 && <2.2 + , websockets >=0.10 && <0.14 default-language: Haskell2010 diff --git a/packages/jsonrpc/package.yaml b/packages/jsonrpc/package.yaml index d6ce7354..11e55ddf 100644 --- a/packages/jsonrpc/package.yaml +++ b/packages/jsonrpc/package.yaml @@ -7,20 +7,20 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2024" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network dependencies: -- base >4.11 && <4.21 -- text >1.2 && <2.2 -- aeson >1.2 && <2.3 -- random >1.0 && <1.3 -- bytestring >0.10 && <0.13 -- exceptions >0.8 && <0.11 -- websockets >0.10 && <0.14 -- http-client >0.5 && <0.8 -- http-client-tls >0.3 && <0.4 -- mtl >2.2 && <2.4 +- base >=4.11 && <4.21 +- text >=1.2 && <2.2 +- aeson >=1.2 && <2.3 +- random >=1.0 && <1.3 +- bytestring >=0.10 && <0.13 +- exceptions >=0.8 && <0.11 +- websockets >=0.10 && <0.14 +- http-client >=0.5 && <0.8 +- http-client-tls >=0.3 && <0.4 +- mtl >=2.2 && <2.4 ghc-options: - -funbox-strict-fields diff --git a/packages/polkadot/LICENSE b/packages/polkadot/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/polkadot/LICENSE +++ b/packages/polkadot/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 2adc22b6..88fb0e8f 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -7,30 +7,30 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2021" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network dependencies: -- mtl >2.2 && <2.4 -- base >4.11 && <4.21 -- text >1.2 && <2.2 -- aeson >1.2 && <2.3 -- scale >=1.0 && <1.2 -- parsec >3.0 && <3.2 -- memory >0.14 && <0.19 -- microlens >0.4 && <0.5 -- containers >0.6 && <0.8 -- crypton >0.30 && <1.1 -- bytestring >0.10 && <0.13 -- base58-bytestring >=0.1 && <0.2 -- cases >0.1 && <0.2 -- generics-sop >0.3 && <0.6 -- microlens-th >0.4 && <0.5 -- microlens-mtl >0.2 && <0.3 -- web3-crypto >=1.0 && <1.2 -- web3-bignum >=1.0 && <1.2 -- jsonrpc-tinyclient >=1.0 && <1.2 -- memory-hexstring >=1.0 && <1.2 +- mtl >=2.2 && <2.4 +- base >=4.11 && <4.21 +- text >=1.2 && <2.2 +- aeson >=1.2 && <2.3 +- scale >=1.0 && <1.2 +- parsec >=3.0 && <3.2 +- memory >=0.14 && <0.19 +- microlens >=0.4 && <0.5 +- containers >=0.6 && <0.8 +- crypton >=0.30 && <1.1 +- bytestring >=0.10 && <0.13 +- base58-bytestring >=0.1 && <0.2 +- cases >=0.1 && <0.2 +- generics-sop >=0.3 && <0.6 +- microlens-th >=0.4 && <0.5 +- microlens-mtl >=0.2 && <0.3 +- web3-crypto >=1.0 && <1.2 +- web3-bignum >=1.0 && <1.2 +- jsonrpc-tinyclient >=1.0 && <1.2 +- memory-hexstring >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/polkadot/web3-polkadot.cabal b/packages/polkadot/web3-polkadot.cabal index ee1e101e..edc1122e 100644 --- a/packages/polkadot/web3-polkadot.cabal +++ b/packages/polkadot/web3-polkadot.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2021 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -71,24 +71,24 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - aeson >1.2 && <2.3 - , base >4.11 && <4.21 + aeson >=1.2 && <2.3 + , base >=4.11 && <4.21 , base58-bytestring ==0.1.* - , bytestring >0.10 && <0.13 - , cases >0.1 && <0.2 - , containers >0.6 && <0.8 - , crypton >0.30 && <1.1 - , generics-sop >0.3 && <0.6 + , bytestring >=0.10 && <0.13 + , cases ==0.1.* + , containers >=0.6 && <0.8 + , crypton >=0.30 && <1.1 + , generics-sop >=0.3 && <0.6 , jsonrpc-tinyclient >=1.0 && <1.2 - , memory >0.14 && <0.19 + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 - , microlens >0.4 && <0.5 - , microlens-mtl >0.2 && <0.3 - , microlens-th >0.4 && <0.5 - , mtl >2.2 && <2.4 - , parsec >3.0 && <3.2 + , microlens ==0.4.* + , microlens-mtl ==0.2.* + , microlens-th ==0.4.* + , mtl >=2.2 && <2.4 + , parsec >=3.0 && <3.2 , scale >=1.0 && <1.2 - , text >1.2 && <2.2 + , text >=1.2 && <2.2 , web3-bignum >=1.0 && <1.2 , web3-crypto >=1.0 && <1.2 default-language: Haskell2010 @@ -148,29 +148,29 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - aeson >1.2 && <2.3 - , base >4.11 && <4.21 + aeson >=1.2 && <2.3 + , base >=4.11 && <4.21 , base58-bytestring ==0.1.* - , bytestring >0.10 && <0.13 - , cases >0.1 && <0.2 - , containers >0.6 && <0.8 - , crypton >0.30 && <1.1 - , generics-sop >0.3 && <0.6 + , bytestring >=0.10 && <0.13 + , cases ==0.1.* + , containers >=0.6 && <0.8 + , crypton >=0.30 && <1.1 + , generics-sop >=0.3 && <0.6 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 , hspec-expectations-json >=1.0.0 && <1.1 , jsonrpc-tinyclient >=1.0 && <1.2 - , memory >0.14 && <0.19 + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 - , microlens >0.4 && <0.5 - , microlens-mtl >0.2 && <0.3 - , microlens-th >0.4 && <0.5 - , mtl >2.2 && <2.4 - , parsec >3.0 && <3.2 + , microlens ==0.4.* + , microlens-mtl ==0.2.* + , microlens-th ==0.4.* + , mtl >=2.2 && <2.4 + , parsec >=3.0 && <3.2 , scale >=1.0 && <1.2 - , text >1.2 && <2.2 + , text >=1.2 && <2.2 , web3-bignum >=1.0 && <1.2 , web3-crypto >=1.0 && <1.2 default-language: Haskell2010 diff --git a/packages/provider/LICENSE b/packages/provider/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/provider/LICENSE +++ b/packages/provider/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/provider/package.yaml b/packages/provider/package.yaml index 47e6a43a..f119d2d3 100644 --- a/packages/provider/package.yaml +++ b/packages/provider/package.yaml @@ -7,21 +7,21 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2024" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network dependencies: -- base >4.11 && <4.21 -- mtl >2.2 && <2.4 -- text >1.2 && <2.2 -- async >2.1 && <2.3 -- network >2.5 && <3.3 -- websockets >0.10 && <0.14 -- exceptions >0.8 && <0.11 -- http-client >0.5 && <0.8 -- data-default >0.7 && <0.9 -- transformers >0.5 && <0.7 -- jsonrpc-tinyclient >=1.0 && <1.2 +- base >=4.11 && <4.21 +- mtl >=2.2 && <2.4 +- text >=1.2 && <2.2 +- async >=2.1 && <2.3 +- network >=2.5 && <3.3 +- websockets >=0.10 && <0.14 +- exceptions >=0.8 && <0.11 +- http-client >=0.5 && <0.8 +- data-default >=0.7 && <0.9 +- transformers >=0.5 && <0.7 +- jsonrpc-tinyclient >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/provider/web3-provider.cabal b/packages/provider/web3-provider.cabal index 4fa7cea2..067a42ce 100644 --- a/packages/provider/web3-provider.cabal +++ b/packages/provider/web3-provider.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2024 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -31,15 +31,15 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - async >2.1 && <2.3 - , base >4.11 && <4.21 - , data-default >0.7 && <0.9 - , exceptions >0.8 && <0.11 - , http-client >0.5 && <0.8 + async >=2.1 && <2.3 + , base >=4.11 && <4.21 + , data-default >=0.7 && <0.9 + , exceptions >=0.8 && <0.11 + , http-client >=0.5 && <0.8 , jsonrpc-tinyclient >=1.0 && <1.2 - , mtl >2.2 && <2.4 - , network >2.5 && <3.3 - , text >1.2 && <2.2 - , transformers >0.5 && <0.7 - , websockets >0.10 && <0.14 + , mtl >=2.2 && <2.4 + , network >=2.5 && <3.3 + , text >=1.2 && <2.2 + , transformers >=0.5 && <0.7 + , websockets >=0.10 && <0.14 default-language: Haskell2010 diff --git a/packages/scale/LICENSE b/packages/scale/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/scale/LICENSE +++ b/packages/scale/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index 7b1477ce..97bd8076 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -7,20 +7,20 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2024" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network dependencies: -- base >4.11 && <4.21 -- text >1.2 && <2.2 -- cereal >0.5 && <0.6 -- bitvec >1.0 && <2.0 -- vector >0.12 && <0.14 -- memory >0.14 && <0.19 -- bytestring >0.10 && <0.13 -- generics-sop >0.3 && <0.6 -- data-default >0.7 && <0.9 -- template-haskell >2.11 && <2.23 +- base >=4.11 && <4.21 +- text >=1.2 && <2.2 +- cereal >=0.5 && <0.6 +- bitvec >=1.0 && <2.0 +- vector >=0.12 && <0.14 +- memory >=0.14 && <0.19 +- bytestring >=0.10 && <0.13 +- generics-sop >=0.3 && <0.6 +- data-default >=0.7 && <0.9 +- template-haskell >=2.11 && <2.23 ghc-options: - -funbox-strict-fields diff --git a/packages/scale/scale.cabal b/packages/scale/scale.cabal index 8a8bb01a..49ec5bd6 100644 --- a/packages/scale/scale.cabal +++ b/packages/scale/scale.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2024 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -38,16 +38,16 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.21 - , bitvec >1.0 && <2.0 - , bytestring >0.10 && <0.13 - , cereal >0.5 && <0.6 - , data-default >0.7 && <0.9 - , generics-sop >0.3 && <0.6 - , memory >0.14 && <0.19 - , template-haskell >2.11 && <2.23 - , text >1.2 && <2.2 - , vector >0.12 && <0.14 + base >=4.11 && <4.21 + , bitvec >=1.0 && <2.0 + , bytestring >=0.10 && <0.13 + , cereal ==0.5.* + , data-default >=0.7 && <0.9 + , generics-sop >=0.3 && <0.6 + , memory >=0.14 && <0.19 + , template-haskell >=2.11 && <2.23 + , text >=1.2 && <2.2 + , vector >=0.12 && <0.14 default-language: Haskell2010 test-suite tests @@ -71,18 +71,18 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - base >4.11 && <4.21 - , bitvec >1.0 && <2.0 - , bytestring >0.10 && <0.13 - , cereal >0.5 && <0.6 - , data-default >0.7 && <0.9 - , generics-sop >0.3 && <0.6 + base >=4.11 && <4.21 + , bitvec >=1.0 && <2.0 + , bytestring >=0.10 && <0.13 + , cereal ==0.5.* + , data-default >=0.7 && <0.9 + , generics-sop >=0.3 && <0.6 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.19 - , template-haskell >2.11 && <2.23 - , text >1.2 && <2.2 - , vector >0.12 && <0.14 + , memory >=0.14 && <0.19 + , template-haskell >=2.11 && <2.23 + , text >=1.2 && <2.2 + , vector >=0.12 && <0.14 default-language: Haskell2010 diff --git a/packages/solidity/LICENSE b/packages/solidity/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/solidity/LICENSE +++ b/packages/solidity/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/solidity/package.yaml b/packages/solidity/package.yaml index 44e69791..d90bc160 100644 --- a/packages/solidity/package.yaml +++ b/packages/solidity/package.yaml @@ -7,26 +7,26 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2024" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network dependencies: -- base >4.11 && <4.21 -- text >1.2 && <2.2 -- aeson >1.2 && <2.3 -- cereal >0.5 && <0.6 -- memory >0.14 && <0.19 -- memory-hexstring >=1.0 && <1.2 -- tagged >0.8 && <0.9 -- parsec >3.1 && <3.2 -- basement >0.0 && <0.1 -- OneTuple >0.2 && <0.5 -- microlens >0.4 && <0.5 -- bytestring >0.10 && <0.13 -- generics-sop >0.3 && <0.6 -- data-default >0.7 && <0.9 -- template-haskell >2.11 && <2.23 -- web3-crypto >=1.0 && <1.2 +- base >=4.11 && <4.21 +- text >=1.2 && <2.2 +- aeson >=1.2 && <2.3 +- cereal >=0.5 && <0.6 +- memory >=0.14 && <0.19 +- memory-hexstring >=1.0 && <1.2 +- tagged >=0.8 && <0.9 +- parsec >=3.1 && <3.2 +- basement >=0.0 && <0.1 +- OneTuple >=0.2 && <0.5 +- microlens >=0.4 && <0.5 +- bytestring >=0.10 && <0.13 +- generics-sop >=0.3 && <0.6 +- data-default >=0.7 && <0.9 +- template-haskell >=2.11 && <2.23 +- web3-crypto >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/solidity/web3-solidity.cabal b/packages/solidity/web3-solidity.cabal index ea23b7a4..3e453121 100644 --- a/packages/solidity/web3-solidity.cabal +++ b/packages/solidity/web3-solidity.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2024 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -46,21 +46,21 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - OneTuple >0.2 && <0.5 - , aeson >1.2 && <2.3 - , base >4.11 && <4.21 - , basement >0.0 && <0.1 - , bytestring >0.10 && <0.13 - , cereal >0.5 && <0.6 - , data-default >0.7 && <0.9 - , generics-sop >0.3 && <0.6 - , memory >0.14 && <0.19 + OneTuple >=0.2 && <0.5 + , aeson >=1.2 && <2.3 + , base >=4.11 && <4.21 + , basement ==0.0.* + , bytestring >=0.10 && <0.13 + , cereal ==0.5.* + , data-default >=0.7 && <0.9 + , generics-sop >=0.3 && <0.6 + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 - , microlens >0.4 && <0.5 - , parsec >3.1 && <3.2 - , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.23 - , text >1.2 && <2.2 + , microlens ==0.4.* + , parsec ==3.1.* + , tagged ==0.8.* + , template-haskell >=2.11 && <2.23 + , text >=1.2 && <2.2 , web3-crypto >=1.0 && <1.2 default-language: Haskell2010 @@ -94,24 +94,24 @@ test-suite tests src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: - OneTuple >0.2 && <0.5 - , aeson >1.2 && <2.3 - , base >4.11 && <4.21 - , basement >0.0 && <0.1 - , bytestring >0.10 && <0.13 - , cereal >0.5 && <0.6 - , data-default >0.7 && <0.9 - , generics-sop >0.3 && <0.6 + OneTuple >=0.2 && <0.5 + , aeson >=1.2 && <2.3 + , base >=4.11 && <4.21 + , basement ==0.0.* + , bytestring >=0.10 && <0.13 + , cereal ==0.5.* + , data-default >=0.7 && <0.9 + , generics-sop >=0.3 && <0.6 , hspec >=2.4.4 && <2.12 , hspec-contrib >=0.4.0 && <0.6 , hspec-discover >=2.4.4 && <2.12 , hspec-expectations >=0.8.2 && <0.9 - , memory >0.14 && <0.19 + , memory >=0.14 && <0.19 , memory-hexstring >=1.0 && <1.2 - , microlens >0.4 && <0.5 - , parsec >3.1 && <3.2 - , tagged >0.8 && <0.9 - , template-haskell >2.11 && <2.23 - , text >1.2 && <2.2 + , microlens ==0.4.* + , parsec ==3.1.* + , tagged ==0.8.* + , template-haskell >=2.11 && <2.23 + , text >=1.2 && <2.2 , web3-crypto >=1.0 && <1.2 default-language: Haskell2010 diff --git a/packages/web3/LICENSE b/packages/web3/LICENSE index 0d8d1a8b..500bc3e6 100644 --- a/packages/web3/LICENSE +++ b/packages/web3/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2016-2021 Aleksandr Krupenkin +Copyright 2016-2026 Aleksandr Krupenkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/web3/package.yaml b/packages/web3/package.yaml index 80a954bf..98f898bd 100644 --- a/packages/web3/package.yaml +++ b/packages/web3/package.yaml @@ -7,14 +7,14 @@ license: Apache-2.0 license-file: LICENSE author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: "(c) Aleksandr Krupenkin 2016-2024" +copyright: "(c) Aleksandr Krupenkin 2016-2026" category: Network dependencies: -- base >4.11 && <4.21 -- web3-provider >=1.0 && <1.2 -- web3-ethereum >=1.0 && <1.2 -- web3-polkadot >=1.0 && <1.2 +- base >=4.11 && <4.21 +- web3-provider >=1.0 && <1.2 +- web3-ethereum >=1.0 && <1.2 +- web3-polkadot >=1.0 && <1.2 ghc-options: - -funbox-strict-fields diff --git a/packages/web3/web3.cabal b/packages/web3/web3.cabal index c137cade..0de6b050 100644 --- a/packages/web3/web3.cabal +++ b/packages/web3/web3.cabal @@ -13,7 +13,7 @@ homepage: https://github.com/airalab/hs-web3#readme bug-reports: https://github.com/airalab/hs-web3/issues author: Aleksandr Krupenkin maintainer: mail@akru.me -copyright: (c) Aleksandr Krupenkin 2016-2024 +copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple @@ -31,7 +31,7 @@ library src ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: - base >4.11 && <4.21 + base >=4.11 && <4.21 , web3-ethereum >=1.0 && <1.2 , web3-polkadot >=1.0 && <1.2 , web3-provider >=1.0 && <1.2 From 1c49486379bd3cda4a847e08893edc0a66a93f63 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Mon, 9 Feb 2026 09:48:34 +0300 Subject: [PATCH 236/237] Fix upper bounds with trailing zeros --- packages/ethereum/package.yaml | 2 +- packages/ethereum/web3-ethereum.cabal | 4 ++-- packages/scale/package.yaml | 2 +- packages/scale/scale.cabal | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index 85393aa2..51c0e7e5 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -18,7 +18,7 @@ dependencies: - aeson-casing >=0.2 && <0.3 - tagged >=0.8 && <0.9 - memory >=0.14 && <0.19 -- relapse >=1.0 && <2.0 +- relapse >=1.0 && <1.1 - OneTuple >=0.2 && <0.5 - machines >=0.6 && <0.8 - microlens >=0.4 && <0.5 diff --git a/packages/ethereum/web3-ethereum.cabal b/packages/ethereum/web3-ethereum.cabal index c053f0d1..b8eb8f8b 100644 --- a/packages/ethereum/web3-ethereum.cabal +++ b/packages/ethereum/web3-ethereum.cabal @@ -71,7 +71,7 @@ library , microlens ==0.4.* , microlens-aeson >=2.2 && <2.6 , mtl >=2.2 && <2.4 - , relapse >=1.0 && <2.0 + , relapse ==1.0.* , tagged ==0.8.* , template-haskell >=2.11 && <2.23 , text >=1.2 && <2.2 @@ -140,7 +140,7 @@ test-suite tests , microlens ==0.4.* , microlens-aeson >=2.2 && <2.6 , mtl >=2.2 && <2.4 - , relapse >=1.0 && <2.0 + , relapse ==1.0.* , tagged ==0.8.* , template-haskell >=2.11 && <2.23 , text >=1.2 && <2.2 diff --git a/packages/scale/package.yaml b/packages/scale/package.yaml index 97bd8076..ea64f066 100644 --- a/packages/scale/package.yaml +++ b/packages/scale/package.yaml @@ -14,7 +14,7 @@ dependencies: - base >=4.11 && <4.21 - text >=1.2 && <2.2 - cereal >=0.5 && <0.6 -- bitvec >=1.0 && <2.0 +- bitvec >=1.0 && <1.2 - vector >=0.12 && <0.14 - memory >=0.14 && <0.19 - bytestring >=0.10 && <0.13 diff --git a/packages/scale/scale.cabal b/packages/scale/scale.cabal index 49ec5bd6..212e4629 100644 --- a/packages/scale/scale.cabal +++ b/packages/scale/scale.cabal @@ -39,7 +39,7 @@ library ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs build-depends: base >=4.11 && <4.21 - , bitvec >=1.0 && <2.0 + , bitvec >=1.0 && <1.2 , bytestring >=0.10 && <0.13 , cereal ==0.5.* , data-default >=0.7 && <0.9 @@ -72,7 +72,7 @@ test-suite tests ghc-options: -funbox-strict-fields -Wduplicate-exports -Widentities -Woverlapping-patterns -Wpartial-type-signatures -Wunrecognised-pragmas -Wtyped-holes -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-fields -Wmissing-methods -Wmissing-exported-signatures -Wmissing-signatures -Wname-shadowing -Wunused-binds -Wunused-top-binds -Wunused-local-binds -Wunused-pattern-binds -Wunused-imports -Wunused-matches -Wunused-foralls -Wtabs -threaded -rtsopts -with-rtsopts=-N build-depends: base >=4.11 && <4.21 - , bitvec >=1.0 && <2.0 + , bitvec >=1.0 && <1.2 , bytestring >=0.10 && <0.13 , cereal ==0.5.* , data-default >=0.7 && <0.9 From e9f343dcc355b8709e9f1e0f485bfaee927bdaf0 Mon Sep 17 00:00:00 2001 From: Alexander Krupenkin Date: Tue, 24 Feb 2026 16:30:52 +0300 Subject: [PATCH 237/237] Add extra data files into polkadot & ethereum dists --- packages/ethereum/package.yaml | 5 ++++- packages/ethereum/web3-ethereum.cabal | 6 +++++- packages/polkadot/package.yaml | 6 +++++- packages/polkadot/web3-polkadot.cabal | 13 ++++++++++++- stack.yaml | 2 +- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/packages/ethereum/package.yaml b/packages/ethereum/package.yaml index 51c0e7e5..f315ebb7 100644 --- a/packages/ethereum/package.yaml +++ b/packages/ethereum/package.yaml @@ -1,5 +1,5 @@ name: web3-ethereum -version: 1.1.0.0 +version: 1.1.0.1 synopsis: Ethereum support for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -62,6 +62,9 @@ ghc-options: library: source-dirs: src +data-files: +- tests/contracts/*.json + tests: tests: main: Spec.hs diff --git a/packages/ethereum/web3-ethereum.cabal b/packages/ethereum/web3-ethereum.cabal index b8eb8f8b..d6b3dc4c 100644 --- a/packages/ethereum/web3-ethereum.cabal +++ b/packages/ethereum/web3-ethereum.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: web3-ethereum -version: 1.1.0.0 +version: 1.1.0.1 synopsis: Ethereum support for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -17,6 +17,10 @@ copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple +data-files: + tests/contracts/ERC20.json + tests/contracts/Exchange.json + tests/contracts/SingleField.json source-repository head type: git diff --git a/packages/polkadot/package.yaml b/packages/polkadot/package.yaml index 88fb0e8f..93446967 100644 --- a/packages/polkadot/package.yaml +++ b/packages/polkadot/package.yaml @@ -1,5 +1,5 @@ name: web3-polkadot -version: 1.1.0.0 +version: 1.1.0.1 synopsis: Polkadot support for Haskell Web3 library. description: Client library for Third Generation of Web. github: "airalab/hs-web3" @@ -59,6 +59,10 @@ ghc-options: library: source-dirs: src +data-files: +- tests/meta/*.hex +- tests/meta/*.json + tests: tests: main: Spec.hs diff --git a/packages/polkadot/web3-polkadot.cabal b/packages/polkadot/web3-polkadot.cabal index edc1122e..eb003468 100644 --- a/packages/polkadot/web3-polkadot.cabal +++ b/packages/polkadot/web3-polkadot.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: web3-polkadot -version: 1.1.0.0 +version: 1.1.0.1 synopsis: Polkadot support for Haskell Web3 library. description: Client library for Third Generation of Web. category: Network @@ -17,6 +17,17 @@ copyright: (c) Aleksandr Krupenkin 2016-2026 license: Apache-2.0 license-file: LICENSE build-type: Simple +data-files: + tests/meta/v10.hex + tests/meta/v11.hex + tests/meta/v12.hex + tests/meta/v13.hex + tests/meta/v9.hex + tests/meta/v10.json + tests/meta/v11.json + tests/meta/v12.json + tests/meta/v13.json + tests/meta/v9.json source-repository head type: git diff --git a/stack.yaml b/stack.yaml index c28919da..50f799de 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ # Resolver to choose a 'specific' stackage snapshot or a compiler version. -resolver: lts-24.30 +resolver: lts-24.32 # User packages to be built. packages: